|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[118,5,6,7,8,10,16],{"+NIl":function(j,Y,D){(function(L){L(D("VrN/"))})(function(L){"use strict";L.defineMode("stex",function(g,T){"use strict";function P(o,h){o.cmdState.push(h)}function p(o){return o.cmdState.length>0?o.cmdState[o.cmdState.length-1]:null}function v(o){var h=o.cmdState.pop();h&&h.closeBracket()}function S(o){for(var h=o.cmdState,m=h.length-1;m>=0;m--){var s=h[m];if(s.name=="DEFAULT")continue;return s}return{styleIdentifier:function(){return null}}}function b(o,h,m){return function(){this.name=o,this.bracketNo=0,this.style=h,this.styles=m,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var d={};d.importmodule=b("importmodule","tag",["string","builtin"]),d.documentclass=b("documentclass","tag",["","atom"]),d.usepackage=b("usepackage","tag",["atom"]),d.begin=b("begin","tag",["atom"]),d.end=b("end","tag",["atom"]),d.label=b("label","tag",["atom"]),d.ref=b("ref","tag",["atom"]),d.eqref=b("eqref","tag",["atom"]),d.cite=b("cite","tag",["atom"]),d.bibitem=b("bibitem","tag",["atom"]),d.Bibitem=b("Bibitem","tag",["atom"]),d.RBibitem=b("RBibitem","tag",["atom"]),d.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function l(o,h){o.f=h}function n(o,h){var m;if(o.match(/^\\[a-zA-Z@]+/)){var s=o.current().slice(1);return m=d.hasOwnProperty(s)?d[s]:d.DEFAULT,m=new m,P(h,m),l(h,u),m.style}if(o.match(/^\\[$&%#{}_]/))return"tag";if(o.match(/^\\[,;!\/\\]/))return"tag";if(o.match("\\["))return l(h,function(a,t){return c(a,t,"\\]")}),"keyword";if(o.match("\\("))return l(h,function(a,t){return c(a,t,"\\)")}),"keyword";if(o.match("$$"))return l(h,function(a,t){return c(a,t,"$$")}),"keyword";if(o.match("$"))return l(h,function(a,t){return c(a,t,"$")}),"keyword";var r=o.next();if(r=="%")return o.skipToEnd(),"comment";if(r=="}"||r=="]"){if(m=p(h),m)m.closeBracket(r),l(h,u);else return"error";return"bracket"}else return r=="{"||r=="["?(m=d.DEFAULT,m=new m,P(h,m),"bracket"):/\d/.test(r)?(o.eatWhile(/[\w.%]/),"atom"):(o.eatWhile(/[\w\-_]/),m=S(h),m.name=="begin"&&(m.argument=o.current()),m.styleIdentifier())}function c(o,h,m){if(o.eatSpace())return null;if(m&&o.match(m))return l(h,n),"keyword";if(o.match(/^\\[a-zA-Z@]+/))return"tag";if(o.match(/^[a-zA-Z]+/))return"variable-2";if(o.match(/^\\[$&%#{}_]/))return"tag";if(o.match(/^\\[,;!\/]/))return"tag";if(o.match(/^[\^_&]/))return"tag";if(o.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(o.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var s=o.next();return s=="{"||s=="}"||s=="["||s=="]"||s=="("||s==")"?"bracket":s=="%"?(o.skipToEnd(),"comment"):"error"}function u(o,h){var m=o.peek(),s;return m=="{"||m=="["?(s=p(h),s.openBracket(m),o.eat(m),l(h,n),"bracket"):/[ \t\r]/.test(m)?(o.eat(m),null):(l(h,n),v(h),n(o,h))}return{startState:function(){var o=T.inMathMode?function(h,m){return c(h,m)}:n;return{cmdState:[],f:o}},copyState:function(o){return{cmdState:o.cmdState.slice(),f:o.f}},token:function(o,h){return h.f(o,h)},blankLine:function(o){o.f=n,o.cmdState.length=0},lineComment:"%"}}),L.defineMIME("text/x-stex","stex"),L.defineMIME("text/x-latex","stex")})},"+ua5":function(j,Y,D){},"/cxE":function(j,Y,D){"use strict";D.d(Y,"e",function(){return T}),D.d(Y,"f",function(){return P}),D.d(Y,"g",function(){return p}),D.d(Y,"d",function(){return S}),D.d(Y,"a",function(){return b}),D.d(Y,"b",function(){return d}),D.d(Y,"c",function(){return l});var L=function(){function n(){this.listeners=[],this.unexpectedErrorHandler=function(c){setTimeout(function(){throw c.stack?new Error(c.message+`
|
|
|
|
|
|
`+c.stack):c},0)}}return n.prototype.emit=function(c){this.listeners.forEach(function(u){u(c)})},n.prototype.onUnexpectedError=function(c){this.unexpectedErrorHandler(c),this.emit(c)},n.prototype.onUnexpectedExternalError=function(c){this.unexpectedErrorHandler(c)},n}(),g=new L;function T(n){S(n)||g.onUnexpectedError(n);return}function P(n){S(n)||g.onUnexpectedExternalError(n);return}function p(n){if(n instanceof Error){var c=n.name,u=n.message,o=n.stacktrace||n.stack;return{$isError:!0,name:c,message:u,stack:o}}return n}var v="Canceled";function S(n){return n instanceof Error&&n.name===v&&n.message===v}function b(){var n=new Error(v);return n.name=n.message,n}function d(n){return n?new Error("Illegal argument: "+n):new Error("Illegal argument")}function l(n){return n?new Error("Illegal state: "+n):new Error("Illegal state")}},"19Vz":function(j,Y,D){(function(L){L(D("VrN/"))})(function(L){L.defineOption("placeholder","",function(b,d,l){var n=l&&l!=L.Init;if(d&&!n)b.on("blur",p),b.on("change",v),b.on("swapDoc",v),L.on(b.getInputField(),"compositionupdate",b.state.placeholderCompose=function(){P(b)}),v(b);else if(!d&&n){b.off("blur",p),b.off("change",v),b.off("swapDoc",v),L.off(b.getInputField(),"compositionupdate",b.state.placeholderCompose),g(b);var c=b.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}d&&!b.hasFocus()&&p(b)});function g(b){b.state.placeholder&&(b.state.placeholder.parentNode.removeChild(b.state.placeholder),b.state.placeholder=null)}function T(b){g(b);var d=b.state.placeholder=document.createElement("pre");d.style.cssText="height: 0; overflow: visible",d.style.direction=b.getOption("direction"),d.className="CodeMirror-placeholder CodeMirror-line-like";var l=b.getOption("placeholder");typeof l=="string"&&(l=document.createTextNode(l)),d.appendChild(l),b.display.lineSpace.insertBefore(d,b.display.lineSpace.firstChild)}function P(b){setTimeout(function(){var d=!1,l=b.getInputField();l.nodeName=="TEXTAREA"?d=!l.value:b.lineCount()==1&&(d=!/[^\u200b]/.test(l.querySelector(".CodeMirror-line").textContent)),d?T(b):g(b)},20)}function p(b){S(b)&&T(b)}function v(b){var d=b.getWrapperElement(),l=S(b);d.className=d.className.replace(" CodeMirror-empty","")+(l?" CodeMirror-empty":""),l?T(b):g(b)}function S(b){return b.lineCount()===1&&b.getLine(0)===""}})},"1ZF9":function(j,Y,D){j.exports=D.p+"static/Authorize.cc9c212f.png"},"1eCo":function(j,Y,D){(function(L){L(D("VrN/"))})(function(L){"use strict";var g={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},T={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};L.defineMode("xml",function(P,p){var v=P.indentUnit,S={},b=p.htmlMode?g:T;for(var d in b)S[d]=b[d];for(var d in p)S[d]=p[d];var l,n;function c(_,M){function I(H){return M.tokenize=H,H(_,M)}var N=_.next();if(N=="<")return _.eat("!")?_.eat("[")?_.match("CDATA[")?I(h("atom","]]>")):null:_.match("--")?I(h("comment","-->")):_.match("DOCTYPE",!0,!0)?(_.eatWhile(/[\w\._\-]/),I(m(1))):null:_.eat("?")?(_.eatWhile(/[\w\._\-]/),M.tokenize=h("meta","?>"),"meta"):(l=_.eat("/")?"closeTag":"openTag",M.tokenize=u,"tag bracket");if(N=="&"){var G;return _.eat("#")?_.eat("x")?G=_.eatWhile(/[a-fA-F\d]/)&&_.eat(";"):G=_.eatWhile(/[\d]/)&&_.eat(";"):G=_.eatWhile(/[\w\.\-:]/)&&_.eat(";"),G?"atom":"error"}else return _.eatWhile(/[^&<]/),null}c.isInText=!0;function u(_,M){var I=_.next();if(I==">"||I=="/"&&_.eat(">"))return M.tokenize=c,l=I==">"?"endTag":"selfcloseTag","tag bracket";if(I=="=")return l="equals",null;if(I=="<"){M.tokenize=c,M.state=t,M.tagName=M.tagStart=null;var N=M.tokenize(_,M);return N?N+" tag error":"tag error"}else return/[\'\"]/.test(I)?(M.tokenize=o(I),M.stringStartCol=_.column(),M.tokenize(_,M)):(_.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function o(_){var M=function(I,N){for(;!I.eol();)if(I.next()==_){N.tokenize=u;break}return"string"};return M.isInAttribute=!0,M}function h(_,M){return function(I,N){for(;!I.eol();){if(I.match(M)){N.tokenize=c;break}I.next()}return _}}function m(_){return function(M,I){for(var N;(N=M.next())!=null;){if(N=="<")return I.tokenize=m(_+1),I.tokenize(M,I);if(N==">")if(_==1){I.tokenize=c;break}else return I.tokenize=m(_-1),I.tokenize(M,I)}return"meta"}}function s(_,M,I){this.prev=_.context,this.tagName=M,this.indent=_.indented,this.startOfLine=I,(S.doNotIndent.hasOwnProperty(M)||_.context&&_.context.noIndent)&&(this.noIndent=!0)}function r(_){_.context&&(_.context=_.context.prev)}function a(_,M){for(var I;;){if(!_.context)return;if(I=_.context.tagName,!S.contextGrabbers.hasOwnProperty(I)||!S.contextGrabbers[I].hasOwnProperty(M))return;r(_)}}function t(_,M,I){return _=="openTag"?(I.tagStart=M.column(),w):_=="closeTag"?E:t}function w(_,M,I){return _=="word"?(I.tagName=M.current(),n="tag",O):S.allowMissingTagName&&_=="endTag"?(n="tag bracket",O(_,M,I)):(n="error",w)}function E(_,M,I){if(_=="word"){var N=M.current();return I.context&&I.context.tagName!=N&&S.implicitlyClosed.hasOwnProperty(I.context.tagName)&&r(I),I.context&&I.context.tagName==N||S.matchClosing===!1?(n="tag",f):(n="tag error",k)}else return S.allowMissingTagName&&_=="endTag"?(n="tag bracket",f(_,M,I)):(n="error",k)}function f(_,M,I){return _!="endTag"?(n="error",f):(r(I),t)}function k(_,M,I){return n="error",f(_,M,I)}function O(_,M,I){if(_=="word")return n="attribute",C;if(_=="endTag"||_=="selfcloseTag"){var N=I.tagName,G=I.tagStart;return I.tagName=I.tagStart=null,_=="selfcloseTag"||S.autoSelfClosers.hasOwnProperty(N)?a(I,N):(a(I,N),I.context=new s(I,N,G==I.indented)),t}return n="error",O}function C(_,M,I){return _=="equals"?x:(S.allowMissing||(n="error"),O(_,M,I))}function x(_,M,I){return _=="string"?y:_=="word"&&S.allowUnquoted?(n="string",O):(n="error",O(_,M,I))}function y(_,M,I){return _=="string"?y:O(_,M,I)}return{startState:function(_){var M={tokenize:c,state:t,indented:_||0,tagName:null,tagStart:null,context:null};return _!=null&&(M.baseIndent=_),M},token:function(_,M){if(!M.tagName&&_.sol()&&(M.indented=_.indentation()),_.eatSpace())return null;l=null;var I=M.tokenize(_,M);return(I||l)&&I!="comment"&&(n=null,M.state=M.state(l||I,_,M),n&&(I=n=="error"?I+" error":n)),I},indent:function(_,M,I){var N=_.context;if(_.tokenize.isInAttribute)return _.tagStart==_.indented?_.stringStartCol+1:_.indented+v;if(N&&N.noIndent)return L.Pass;if(_.tokenize!=u&&_.tokenize!=c)return I?I.match(/^(\s*)/)[0].length:0;if(_.tagName)return S.multilineTagIndentPastTag!==!1?_.tagStart+_.tagName.length+2:_.tagStart+v*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/<!\[CDATA\[/.test(M))return 0;var G=M&&/^<(\/)?([\w_:\.-]*)/.exec(M);if(G&&G[1])for(;N;)if(N.tagName==G[2]){N=N.prev;break}else if(S.implicitlyClosed.hasOwnProperty(N.tagName))N=N.prev;else break;else if(G)for(;N;){var H=S.contextGrabbers[N.tagName];if(H&&H.hasOwnProperty(G[2]))N=N.prev;else break}for(;N&&N.prev&&!N.startOfLine;)N=N.prev;return N?N.indent+v:_.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(_){_.state==x&&(_.state=O)},xmlCurrentTag:function(_){return _.tagName?{name:_.tagName,close:_.type=="closeTag"}:null},xmlCurrentContext:function(_){for(var M=[],I=_.context;I;I=I.prev)I.tagName&&M.push(I.tagName);return M.reverse()}}}),L.defineMIME("text/xml","xml"),L.defineMIME("application/xml","xml"),L.mimeModes.hasOwnProperty("text/html")||L.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("MlIO"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.Hasher,p=g.x64,v=p.Word,S=p.WordArray,b=g.algo;function d(){return v.create.apply(v,arguments)}var l=[d(1116352408,3609767458),d(1899447441,602891725),d(3049323471,3964484399),d(3921009573,2173295548),d(961987163,4081628472),d(1508970993,3053834265),d(2453635748,2937671579),d(2870763221,3664609560),d(3624381080,2734883394),d(310598401,1164996542),d(607225278,1323610764),d(1426881987,3590304994),d(1925078388,4068182383),d(2162078206,991336113),d(2614888103,633803317),d(3248222580,3479774868),d(3835390401,2666613458),d(4022224774,944711139),d(264347078,2341262773),d(604807628,2007800933),d(770255983,1495990901),d(1249150122,1856431235),d(1555081692,3175218132),d(1996064986,2198950837),d(2554220882,3999719339),d(2821834349,766784016),d(2952996808,2566594879),d(3210313671,3203337956),d(3336571891,1034457026),d(3584528711,2466948901),d(113926993,3758326383),d(338241895,168717936),d(666307205,1188179964),d(773529912,1546045734),d(1294757372,1522805485),d(1396182291,2643833823),d(1695183700,2343527390),d(1986661051,1014477480),d(2177026350,1206759142),d(2456956037,344077627),d(2730485921,1290863460),d(2820302411,3158454273),d(3259730800,3505952657),d(3345764771,106217008),d(3516065817,3606008344),d(3600352804,1432725776),d(4094571909,1467031594),d(275423344,851169720),d(430227734,3100823752),d(506948616,1363258195),d(659060556,3750685593),d(883997877,3785050280),d(958139571,3318307427),d(1322822218,3812723403),d(1537002063,2003034995),d(1747873779,3602036899),d(1955562222,1575990012),d(2024104815,1125592928),d(2227730452,2716904306),d(2361852424,442776044),d(2428436474,593698344),d(2756734187,3733110249),d(3204031479,2999351573),d(3329325298,3815920427),d(3391569614,3928383900),d(3515267271,566280711),d(3940187606,3454069534),d(4118630271,4000239992),d(116418474,1914138554),d(174292421,2731055270),d(289380356,3203993006),d(460393269,320620315),d(685471733,587496836),d(852142971,1086792851),d(1017036298,365543100),d(1126000580,2618297676),d(1288033470,3409855158),d(1501505948,4234509866),d(1607167915,987167468),d(1816402316,1246189591)],n=[];(function(){for(var u=0;u<80;u++)n[u]=d()})();var c=b.SHA512=P.extend({_doReset:function(){this._hash=new S.init([new v.init(1779033703,4089235720),new v.init(3144134277,2227873595),new v.init(1013904242,4271175723),new v.init(2773480762,1595750129),new v.init(1359893119,2917565137),new v.init(2600822924,725511199),new v.init(528734635,4215389547),new v.init(1541459225,327033209)])},_doProcessBlock:function(u,o){for(var h=this._hash.words,m=h[0],s=h[1],r=h[2],a=h[3],t=h[4],w=h[5],E=h[6],f=h[7],k=m.high,O=m.low,C=s.high,x=s.low,y=r.high,_=r.low,M=a.high,I=a.low,N=t.high,G=t.low,H=w.high,B=w.low,K=E.high,U=E.low,W=f.high,X=f.low,ne=k,fe=O,me=C,Ae=x,De=y,ye=_,Oe=M,xe=I,ue=N,le=G,re=H,pe=B,ee=K,te=U,ce=W,q=X,Q=0;Q<80;Q++){var V,Z,be=n[Q];if(Q<16)Z=be.high=u[o+Q*2]|0,V=be.low=u[o+Q*2+1]|0;else{var ge=n[Q-15],Te=ge.high,Je=ge.low,rt=(Te>>>1|Je<<31)^(Te>>>8|Je<<24)^Te>>>7,nt=(Je>>>1|Te<<31)^(Je>>>8|Te<<24)^(Je>>>7|Te<<25),at=n[Q-2],ct=at.high,ht=at.low,He=(ct>>>19|ht<<13)^(ct<<3|ht>>>29)^ct>>>6,Re=(ht>>>19|ct<<13)^(ht<<3|ct>>>29)^(ht>>>6|ct<<26),tt=n[Q-7],ft=tt.high,Qe=tt.low,lt=n[Q-16],Ue=lt.high,Le=lt.low;V=nt+Qe,Z=rt+ft+(V>>>0<nt>>>0?1:0),V=V+Re,Z=Z+He+(V>>>0<Re>>>0?1:0),V=V+Le,Z=Z+Ue+(V>>>0<Le>>>0?1:0),be.high=Z,be.low=V}var Ie=ue&re^~ue&ee,Ce=le&pe^~le&te,Se=ne&me^ne&De^me&De,ke=fe&Ae^fe&ye^Ae&ye,Ne=(ne>>>28|fe<<4)^(ne<<30|fe>>>2)^(ne<<25|fe>>>7),et=(fe>>>28|ne<<4)^(fe<<30|ne>>>2)^(fe<<25|ne>>>7),$e=(ue>>>14|le<<18)^(ue>>>18|le<<14)^(ue<<23|le>>>9),bt=(le>>>14|ue<<18)^(le>>>18|ue<<14)^(le<<23|ue>>>9),gt=l[Q],Ut=gt.high,Nt=gt.low,hr=q+bt,mr=ce+$e+(hr>>>0<q>>>0?1:0),hr=hr+Ce,mr=mr+Ie+(hr>>>0<Ce>>>0?1:0),hr=hr+Nt,mr=mr+Ut+(hr>>>0<Nt>>>0?1:0),hr=hr+V,mr=mr+Z+(hr>>>0<V>>>0?1:0),St=et+ke,Yr=Ne+Se+(St>>>0<et>>>0?1:0);ce=ee,q=te,ee=re,te=pe,re=ue,pe=le,le=xe+hr|0,ue=Oe+mr+(le>>>0<xe>>>0?1:0)|0,Oe=De,xe=ye,De=me,ye=Ae,me=ne,Ae=fe,fe=hr+St|0,ne=mr+Yr+(fe>>>0<hr>>>0?1:0)|0}O=m.low=O+fe,m.high=k+ne+(O>>>0<fe>>>0?1:0),x=s.low=x+Ae,s.high=C+me+(x>>>0<Ae>>>0?1:0),_=r.low=_+ye,r.high=y+De+(_>>>0<ye>>>0?1:0),I=a.low=I+xe,a.high=M+Oe+(I>>>0<xe>>>0?1:0),G=t.low=G+le,t.high=N+ue+(G>>>0<le>>>0?1:0),B=w.low=B+pe,w.high=H+re+(B>>>0<pe>>>0?1:0),U=E.low=U+te,E.high=K+ee+(U>>>0<te>>>0?1:0),X=f.low=X+q,f.high=W+ce+(X>>>0<q>>>0?1:0)},_doFinalize:function(){var u=this._data,o=u.words,h=this._nDataBytes*8,m=u.sigBytes*8;o[m>>>5]|=128<<24-m%32,o[(m+128>>>10<<5)+30]=Math.floor(h/4294967296),o[(m+128>>>10<<5)+31]=h,u.sigBytes=o.length*4,this._process();var s=this._hash.toX32();return s},clone:function(){var u=P.clone.call(this);return u._hash=this._hash.clone(),u},blockSize:1024/32});g.SHA512=P._createHelper(c),g.HmacSHA512=P._createHmacHelper(c)}(),L.SHA512})},"24hK":function(j,Y,D){"use strict";D.d(Y,"a",function(){return T});var L=D("JYp7"),g=function(){function P(p){this.element=p,this.next=P.Undefined,this.prev=P.Undefined}return P.Undefined=new P(void 0),P}(),T=function(){function P(){this._first=g.Undefined,this._last=g.Undefined,this._size=0}return Object.defineProperty(P.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),P.prototype.isEmpty=function(){return this._first===g.Undefined},P.prototype.clear=function(){this._first=g.Undefined,this._last=g.Undefined,this._size=0},P.prototype.unshift=function(p){return this._insert(p,!1)},P.prototype.push=function(p){return this._insert(p,!0)},P.prototype._insert=function(p,v){var S=this,b=new g(p);if(this._first===g.Undefined)this._first=b,this._last=b;else if(v){var d=this._last;this._last=b,b.prev=d,d.next=b}else{var l=this._first;this._first=b,b.next=l,l.prev=b}this._size+=1;var n=!1;return function(){n||(n=!0,S._remove(b))}},P.prototype.shift=function(){if(this._first===g.Undefined)return;var p=this._first.element;return this._remove(this._first),p},P.prototype.pop=function(){if(this._last===g.Undefined)return;var p=this._last.element;return this._remove(this._last),p},P.prototype._remove=function(p){if(p.prev!==g.Undefined&&p.next!==g.Undefined){var v=p.prev;v.next=p.next,p.next.prev=v}else p.prev===g.Undefined&&p.next===g.Undefined?(this._first=g.Undefined,this._last=g.Undefined):p.next===g.Undefined?(this._last=this._last.prev,this._last.next=g.Undefined):p.prev===g.Undefined&&(this._first=this._first.next,this._first.prev=g.Undefined);this._size-=1},P.prototype.iterator=function(){var p,v=this._first;return{next:function(){return v===g.Undefined?L.c:(p?p.value=v.element:p={done:!1,value:v.element},v=v.next,p)}}},P.prototype.toArray=function(){for(var p=[],v=this._first;v!==g.Undefined;v=v.next)p.push(v.element);return p},P}()},"3y9D":function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.WordArray,p=T.Hasher,v=g.algo,S=[],b=v.SHA1=p.extend({_doReset:function(){this._hash=new P.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(d,l){for(var n=this._hash.words,c=n[0],u=n[1],o=n[2],h=n[3],m=n[4],s=0;s<80;s++){if(s<16)S[s]=d[l+s]|0;else{var r=S[s-3]^S[s-8]^S[s-14]^S[s-16];S[s]=r<<1|r>>>31}var a=(c<<5|c>>>27)+m+S[s];s<20?a+=(u&o|~u&h)+1518500249:s<40?a+=(u^o^h)+1859775393:s<60?a+=(u&o|u&h|o&h)-1894007588:a+=(u^o^h)-899497514,m=h,h=o,o=u<<30|u>>>2,u=c,c=a}n[0]=n[0]+c|0,n[1]=n[1]+u|0,n[2]=n[2]+o|0,n[3]=n[3]+h|0,n[4]=n[4]+m|0},_doFinalize:function(){var d=this._data,l=d.words,n=this._nDataBytes*8,c=d.sigBytes*8;return l[c>>>5]|=128<<24-c%32,l[(c+64>>>9<<4)+14]=Math.floor(n/4294967296),l[(c+64>>>9<<4)+15]=n,d.sigBytes=l.length*4,this._process(),this._hash},clone:function(){var d=p.clone.call(this);return d._hash=this._hash.clone(),d}});g.SHA1=p._createHelper(b),g.HmacSHA1=p._createHmacHelper(b)}(),L.SHA1})},4:function(j,Y){},"55Ip":function(j,Y,D){"use strict";D.d(Y,"a",function(){return a}),D.d(Y,"b",function(){return O});var L=D("Ty5D"),g=D("dI71"),T=D("q1tI"),P=D.n(T),p=D("YS25"),v=D("17x9"),S=D.n(v),b=D("wx14"),d=D("zLVn"),l=D("9R94"),n=function(x){Object(g.a)(y,x);function y(){for(var M,I=arguments.length,N=new Array(I),G=0;G<I;G++)N[G]=arguments[G];return M=x.call.apply(x,[this].concat(N))||this,M.history=Object(p.a)(M.props),M}var _=y.prototype;return _.render=function(){return P.a.createElement(L.c,{history:this.history,children:this.props.children})},y}(P.a.Component),c=function(x){Object(g.a)(y,x);function y(){for(var M,I=arguments.length,N=new Array(I),G=0;G<I;G++)N[G]=arguments[G];return M=x.call.apply(x,[this].concat(N))||this,M.history=Object(p.b)(M.props),M}var _=y.prototype;return _.render=function(){return P.a.createElement(L.c,{history:this.history,children:this.props.children})},y}(P.a.Component),u=function(y,_){return typeof y=="function"?y(_):y},o=function(y,_){return typeof y=="string"?Object(p.c)(y,null,null,_):y},h=function(y){return y},m=P.a.forwardRef;typeof m=="undefined"&&(m=h);function s(x){return!!(x.metaKey||x.altKey||x.ctrlKey||x.shiftKey)}var r=m(function(x,y){var _=x.innerRef,M=x.navigate,I=x.onClick,N=Object(d.a)(x,["innerRef","navigate","onClick"]),G=N.target,H=Object(b.a)({},N,{onClick:function(K){try{I&&I(K)}catch(U){throw K.preventDefault(),U}!K.defaultPrevented&&K.button===0&&(!G||G==="_self")&&!s(K)&&(K.preventDefault(),M())}});return h!==m?H.ref=y||_:H.ref=_,P.a.createElement("a",H)}),a=m(function(x,y){var _=x.component,M=_===void 0?r:_,I=x.replace,N=x.to,G=x.innerRef,H=Object(d.a)(x,["component","replace","to","innerRef"]);return P.a.createElement(L.e.Consumer,null,function(B){B||Object(l.a)(!1);var K=B.history,U=o(u(N,B.location),B.location),W=U?K.createHref(U):"",X=Object(b.a)({},H,{href:W,navigate:function(){var fe=u(N,B.location),me=I?K.replace:K.push;me(fe)}});return h!==m?X.ref=y||G:X.innerRef=G,P.a.createElement(M,X)})});if(!1)var t,w;var E=function(y){return y},f=P.a.forwardRef;typeof f=="undefined"&&(f=E);function k(){for(var x=arguments.length,y=new Array(x),_=0;_<x;_++)y[_]=arguments[_];return y.filter(function(M){return M}).join(" ")}var O=f(function(x,y){var _=x["aria-current"],M=_===void 0?"page":_,I=x.activeClassName,N=I===void 0?"active":I,G=x.activeStyle,H=x.className,B=x.exact,K=x.isActive,U=x.location,W=x.sensitive,X=x.strict,ne=x.style,fe=x.to,me=x.innerRef,Ae=Object(d.a)(x,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return P.a.createElement(L.e.Consumer,null,function(De){De||Object(l.a)(!1);var ye=U||De.location,Oe=o(u(fe,ye),ye),xe=Oe.pathname,ue=xe&&xe.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),le=ue?Object(L.f)(ye.pathname,{path:ue,exact:B,sensitive:W,strict:X}):null,re=!!(K?K(le,ye):le),pe=re?k(H,N):H,ee=re?Object(b.a)({},ne,{},G):ne,te=Object(b.a)({"aria-current":re&&M||null,className:pe,style:ee,to:Oe},Ae);return E!==f?te.ref=y||me:te.innerRef=me,P.a.createElement(a,te)})});if(!1)var C},"5hvy":function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("MlIO"))})(this,function(L){return function(g){var T=L,P=T.lib,p=P.WordArray,v=P.Hasher,S=T.x64,b=S.Word,d=T.algo,l=[],n=[],c=[];(function(){for(var h=1,m=0,s=0;s<24;s++){l[h+5*m]=(s+1)*(s+2)/2%64;var r=m%5,a=(2*h+3*m)%5;h=r,m=a}for(var h=0;h<5;h++)for(var m=0;m<5;m++)n[h+5*m]=m+(2*h+3*m)%5*5;for(var t=1,w=0;w<24;w++){for(var E=0,f=0,k=0;k<7;k++){if(t&1){var O=(1<<k)-1;O<32?f^=1<<O:E^=1<<O-32}t&128?t=t<<1^113:t<<=1}c[w]=b.create(E,f)}})();var u=[];(function(){for(var h=0;h<25;h++)u[h]=b.create()})();var o=d.SHA3=v.extend({cfg:v.cfg.extend({outputLength:512}),_doReset:function(){for(var h=this._state=[],m=0;m<25;m++)h[m]=new b.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(h,m){for(var s=this._state,r=this.blockSize/2,a=0;a<r;a++){var t=h[m+2*a],w=h[m+2*a+1];t=(t<<8|t>>>24)&16711935|(t<<24|t>>>8)&4278255360,w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360;var E=s[a];E.high^=w,E.low^=t}for(var f=0;f<24;f++){for(var k=0;k<5;k++){for(var O=0,C=0,x=0;x<5;x++){var E=s[k+5*x];O^=E.high,C^=E.low}var y=u[k];y.high=O,y.low=C}for(var k=0;k<5;k++)for(var _=u[(k+4)%5],M=u[(k+1)%5],I=M.high,N=M.low,O=_.high^(I<<1|N>>>31),C=_.low^(N<<1|I>>>31),x=0;x<5;x++){var E=s[k+5*x];E.high^=O,E.low^=C}for(var G=1;G<25;G++){var O,C,E=s[G],H=E.high,B=E.low,K=l[G];K<32?(O=H<<K|B>>>32-K,C=B<<K|H>>>32-K):(O=B<<K-32|H>>>64-K,C=H<<K-32|B>>>64-K);var U=u[n[G]];U.high=O,U.low=C}var W=u[0],X=s[0];W.high=X.high,W.low=X.low;for(var k=0;k<5;k++)for(var x=0;x<5;x++){var G=k+5*x,E=s[G],ne=u[G],fe=u[(k+1)%5+5*x],me=u[(k+2)%5+5*x];E.high=ne.high^~fe.high&me.high,E.low=ne.low^~fe.low&me.low}var E=s[0],Ae=c[f];E.high^=Ae.high,E.low^=Ae.low}},_doFinalize:function(){var h=this._data,m=h.words,s=this._nDataBytes*8,r=h.sigBytes*8,a=this.blockSize*32;m[r>>>5]|=1<<24-r%32,m[(g.ceil((r+1)/a)*a>>>5)-1]|=128,h.sigBytes=m.length*4,this._process();for(var t=this._state,w=this.cfg.outputLength/8,E=w/8,f=[],k=0;k<E;k++){var O=t[k],C=O.high,x=O.low;C=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,f.push(x),f.push(C)}return new p.init(f,w)},clone:function(){for(var h=v.clone.call(this),m=h._state=this._state.slice(0),s=0;s<25;s++)m[s]=m[s].clone();return h}});T.SHA3=v._createHelper(o),T.HmacSHA3=v._createHmacHelper(o)}(Math),L.SHA3})},"6+eU":function(j,Y,D){"use strict";D.d(Y,"a",function(){return f});var L=D("wx14"),g=D("rePB"),T=D("VTBJ"),P=D("1OyB"),p=D("vuIU"),v=D("Ji7U"),S=D("LK+K"),b=D("q1tI"),d=D.n(b),l=D("TSYQ"),n=D.n(l),c=function(O){var C,x="".concat(O.rootPrefixCls,"-item"),y=n()(x,"".concat(x,"-").concat(O.page),(C={},Object(g.a)(C,"".concat(x,"-active"),O.active),Object(g.a)(C,O.className,!!O.className),Object(g.a)(C,"".concat(x,"-disabled"),!O.page),C)),_=function(){O.onClick(O.page)},M=function(N){O.onKeyPress(N,O.onClick,O.page)};return d.a.createElement("li",{title:O.showTitle?O.page:null,className:y,onClick:_,onKeyPress:M,tabIndex:"0"},O.itemRender(O.page,"page",d.a.createElement("a",{rel:"nofollow"},O.page)))},u=c,o={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},h=function(k){Object(v.a)(C,k);var O=Object(S.a)(C);function C(){var x;Object(P.a)(this,C);for(var y=arguments.length,_=new Array(y),M=0;M<y;M++)_[M]=arguments[M];return x=O.call.apply(O,[this].concat(_)),x.state={goInputText:""},x.buildOptionText=function(I){return"".concat(I," ").concat(x.props.locale.items_per_page)},x.changeSize=function(I){x.props.changeSize(Number(I))},x.handleChange=function(I){x.setState({goInputText:I.target.value})},x.handleBlur=function(I){var N=x.props,G=N.goButton,H=N.quickGo,B=N.rootPrefixCls,K=x.state.goInputText;if(G||K==="")return;if(I.relatedTarget&&(I.relatedTarget.className.indexOf("".concat(B,"-prev"))>=0||I.relatedTarget.className.indexOf("".concat(B,"-next"))>=0))return;x.setState({goInputText:""}),H(x.getValidValue())},x.go=function(I){var N=x.state.goInputText;if(N==="")return;(I.keyCode===o.ENTER||I.type==="click")&&(x.setState({goInputText:""}),x.props.quickGo(x.getValidValue()))},x}return Object(p.a)(C,[{key:"getValidValue",value:function(){var y=this.state,_=y.goInputText,M=y.current;return!_||isNaN(_)?M:Number(_)}},{key:"getPageSizeOptions",value:function(){var y=this.props,_=y.pageSize,M=y.pageSizeOptions;return M.some(function(I){return I.toString()===_.toString()})?M:M.concat([_.toString()]).sort(function(I,N){var G=isNaN(Number(I))?0:Number(I),H=isNaN(Number(N))?0:Number(N);return G-H})}},{key:"render",value:function(){var y=this,_=this.props,M=_.pageSize,I=_.locale,N=_.rootPrefixCls,G=_.changeSize,H=_.quickGo,B=_.goButton,K=_.selectComponentClass,U=_.buildOptionText,W=_.selectPrefixCls,X=_.disabled,ne=this.state.goInputText,fe="".concat(N,"-options"),me=K,Ae=null,De=null,ye=null;if(!G&&!H)return null;var Oe=this.getPageSizeOptions();if(G&&me){var xe=Oe.map(function(ue,le){return d.a.createElement(me.Option,{key:le,value:ue.toString()},(U||y.buildOptionText)(ue))});Ae=d.a.createElement(me,{disabled:X,prefixCls:W,showSearch:!1,className:"".concat(fe,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(M||Oe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(le){return le.parentNode}},xe)}return H&&(B&&(ye=typeof B=="boolean"?d.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:X,className:"".concat(fe,"-quick-jumper-button")},I.jump_to_confirm):d.a.createElement("span",{onClick:this.go,onKeyUp:this.go},B)),De=d.a.createElement("div",{className:"".concat(fe,"-quick-jumper")},I.jump_to,d.a.createElement("input",{disabled:X,type:"text",value:ne,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),I.page,ye)),d.a.createElement("li",{className:"".concat(fe)},Ae,De)}}]),C}(d.a.Component);h.defaultProps={pageSizeOptions:["10","20","50","100"]};var m=h,s=D("N2Kk");function r(){}function a(k){return typeof k=="number"&&isFinite(k)&&Math.floor(k)===k}function t(k,O,C){return C}function w(k,O,C){var x=typeof k=="undefined"?O.pageSize:k;return Math.floor((C.total-1)/x)+1}var E=function(k){Object(v.a)(C,k);var O=Object(S.a)(C);function C(x){var y;Object(P.a)(this,C),y=O.call(this,x),y.getJumpPrevPage=function(){return Math.max(1,y.state.current-(y.props.showLessItems?3:5))},y.getJumpNextPage=function(){return Math.min(w(void 0,y.state,y.props),y.state.current+(y.props.showLessItems?3:5))},y.getItemIcon=function(G,H){var B=y.props.prefixCls,K=G||d.a.createElement("button",{type:"button","aria-label":H,className:"".concat(B,"-item-link")});return typeof G=="function"&&(K=d.a.createElement(G,Object(T.a)({},y.props))),K},y.savePaginationNode=function(G){y.paginationNode=G},y.isValid=function(G){return a(G)&&G!==y.state.current},y.shouldDisplayQuickJumper=function(){var G=y.props,H=G.showQuickJumper,B=G.pageSize,K=G.total;return K<=B?!1:H},y.handleKeyDown=function(G){(G.keyCode===o.ARROW_UP||G.keyCode===o.ARROW_DOWN)&&G.preventDefault()},y.handleKeyUp=function(G){var H=y.getValidValue(G),B=y.state.currentInputValue;H!==B&&y.setState({currentInputValue:H}),G.keyCode===o.ENTER?y.handleChange(H):G.keyCode===o.ARROW_UP?y.handleChange(H-1):G.keyCode===o.ARROW_DOWN&&y.handleChange(H+1)},y.changePageSize=function(G){var H=y.state.current,B=w(G,y.state,y.props);H=H>B?B:H,B===0&&(H=y.state.current),typeof G=="number"&&("pageSize"in y.props||y.setState({pageSize:G}),"current"in y.props||y.setState({current:H,currentInputValue:H})),y.props.onShowSizeChange(H,G),"onChange"in y.props&&y.props.onChange&&y.props.onChange(H,G)},y.handleChange=function(G){var H=y.props.disabled,B=G;if(y.isValid(B)&&!H){var K=w(void 0,y.state,y.props);B>K?B=K:B<1&&(B=1),"current"in y.props||y.setState({current:B,currentInputValue:B});var U=y.state.pageSize;return y.props.onChange(B,U),B}return y.state.current},y.prev=function(){y.hasPrev()&&y.handleChange(y.state.current-1)},y.next=function(){y.hasNext()&&y.handleChange(y.state.current+1)},y.jumpPrev=function(){y.handleChange(y.getJumpPrevPage())},y.jumpNext=function(){y.handleChange(y.getJumpNextPage())},y.hasPrev=function(){return y.state.current>1},y.hasNext=function(){return y.state.current<w(void 0,y.state,y.props)},y.runIfEnter=function(G,H){if(G.key==="Enter"||G.charCode===13){for(var B=arguments.length,K=new Array(B>2?B-2:0),U=2;U<B;U++)K[U-2]=arguments[U];H.apply(void 0,K)}},y.runIfEnterPrev=function(G){y.runIfEnter(G,y.prev)},y.runIfEnterNext=function(G){y.runIfEnter(G,y.next)},y.runIfEnterJumpPrev=function(G){y.runIfEnter(G,y.jumpPrev)},y.runIfEnterJumpNext=function(G){y.runIfEnter(G,y.jumpNext)},y.handleGoTO=function(G){(G.keyCode===o.ENTER||G.type==="click")&&y.handleChange(y.state.currentInputValue)};var _=x.onChange!==r,M="current"in x;M&&!_&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var I=x.defaultCurrent;"current"in x&&(I=x.current);var N=x.defaultPageSize;return"pageSize"in x&&(N=x.pageSize),I=Math.min(I,w(N,void 0,x)),y.state={current:I,currentInputValue:I,pageSize:N},y}return Object(p.a)(C,[{key:"componentDidUpdate",value:function(y,_){var M=this.props.prefixCls;if(_.current!==this.state.current&&this.paginationNode){var I=this.paginationNode.querySelector(".".concat(M,"-item-").concat(_.current));I&&document.activeElement===I&&I.blur()}}},{key:"getValidValue",value:function(y){var _=y.target.value,M=w(void 0,this.state,this.props),I=this.state.currentInputValue,N;return _===""?N=_:isNaN(Number(_))?N=I:_>=M?N=M:N=Number(_),N}},{key:"getShowSizeChanger",value:function(){var y=this.props,_=y.showSizeChanger,M=y.total,I=y.totalBoundaryShowSizeChanger;return typeof _!="undefined"?_:M>I}},{key:"renderPrev",value:function(y){var _=this.props,M=_.prevIcon,I=_.itemRender,N=I(y,"prev",this.getItemIcon(M,"prev page")),G=!this.hasPrev();return Object(b.isValidElement)(N)?Object(b.cloneElement)(N,{disabled:G}):N}},{key:"renderNext",value:function(y){var _=this.props,M=_.nextIcon,I=_.itemRender,N=I(y,"next",this.getItemIcon(M,"next page")),G=!this.hasNext();return Object(b.isValidElement)(N)?Object(b.cloneElement)(N,{disabled:G}):N}},{key:"render",value:function(){var y=this,_=this.props,M=_.prefixCls,I=_.className,N=_.style,G=_.disabled,H=_.hideOnSinglePage,B=_.total,K=_.locale,U=_.showQuickJumper,W=_.showLessItems,X=_.showTitle,ne=_.showTotal,fe=_.simple,me=_.itemRender,Ae=_.showPrevNextJumpers,De=_.jumpPrevIcon,ye=_.jumpNextIcon,Oe=_.selectComponentClass,xe=_.selectPrefixCls,ue=_.pageSizeOptions,le=this.state,re=le.current,pe=le.pageSize,ee=le.currentInputValue;if(H===!0&&B<=pe)return null;var te=w(void 0,this.state,this.props),ce=[],q=null,Q=null,V=null,Z=null,be=null,ge=U&&U.goButton,Te=W?1:2,Je=re-1>0?re-1:0,rt=re+1<te?re+1:te,nt=Object.keys(this.props).reduce(function(Ce,Se){return(Se.substr(0,5)==="data-"||Se.substr(0,5)==="aria-"||Se==="role")&&(Ce[Se]=y.props[Se]),Ce},{});if(fe)return ge&&(typeof ge=="boolean"?be=d.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},K.jump_to_confirm):be=d.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ge),be=d.a.createElement("li",{title:X?"".concat(K.jump_to).concat(re,"/").concat(te):null,className:"".concat(M,"-simple-pager")},be)),d.a.createElement("ul",Object(L.a)({className:n()(M,"".concat(M,"-simple"),Object(g.a)({},"".concat(M,"-disabled"),G),I),style:N,ref:this.savePaginationNode},nt),d.a.createElement("li",{title:X?K.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:n()("".concat(M,"-prev"),Object(g.a)({},"".concat(M,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Je)),d.a.createElement("li",{title:X?"".concat(re,"/").concat(te):null,className:"".concat(M,"-simple-pager")},d.a.createElement("input",{type:"text",value:ee,disabled:G,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),d.a.createElement("span",{className:"".concat(M,"-slash")},"/"),te),d.a.createElement("li",{title:X?K.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:n()("".concat(M,"-next"),Object(g.a)({},"".concat(M,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(rt)),be);if(te<=3+Te*2){var at={locale:K,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:X,itemRender:me};te||ce.push(d.a.createElement(u,Object(L.a)({},at,{key:"noPager",page:te,className:"".concat(M,"-disabled")})));for(var ct=1;ct<=te;ct+=1){var ht=re===ct;ce.push(d.a.createElement(u,Object(L.a)({},at,{key:ct,page:ct,active:ht})))}}else{var He=W?K.prev_3:K.prev_5,Re=W?K.next_3:K.next_5;Ae&&(q=d.a.createElement("li",{title:X?He:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:n()("".concat(M,"-jump-prev"),Object(g.a)({},"".concat(M,"-jump-prev-custom-icon"),!!De))},me(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(De,"prev page"))),Q=d.a.createElement("li",{title:X?Re:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:n()("".concat(M,"-jump-next"),Object(g.a)({},"".concat(M,"-jump-next-custom-icon"),!!ye))},me(this.getJumpNextPage(),"jump-next",this.getItemIcon(ye,"next page")))),Z=d.a.createElement(u,{locale:K,last:!0,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:te,page:te,active:!1,showTitle:X,itemRender:me}),V=d.a.createElement(u,{locale:K,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:X,itemRender:me});var tt=Math.max(1,re-Te),ft=Math.min(re+Te,te);re-1<=Te&&(ft=1+Te*2),te-re<=Te&&(tt=te-Te*2);for(var Qe=tt;Qe<=ft;Qe+=1){var lt=re===Qe;ce.push(d.a.createElement(u,{locale:K,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Qe,page:Qe,active:lt,showTitle:X,itemRender:me}))}re-1>=Te*2&&re!==1+2&&(ce[0]=Object(b.cloneElement)(ce[0],{className:"".concat(M,"-item-after-jump-prev")}),ce.unshift(q)),te-re>=Te*2&&re!==te-2&&(ce[ce.length-1]=Object(b.cloneElement)(ce[ce.length-1],{className:"".concat(M,"-item-before-jump-next")}),ce.push(Q)),tt!==1&&ce.unshift(V),ft!==te&&ce.push(Z)}var Ue=null;ne&&(Ue=d.a.createElement("li",{className:"".concat(M,"-total-text")},ne(B,[B===0?0:(re-1)*pe+1,re*pe>B?B:re*pe])));var Le=!this.hasPrev()||!te,Ie=!this.hasNext()||!te;return d.a.createElement("ul",Object(L.a)({className:n()(M,I,Object(g.a)({},"".concat(M,"-disabled"),G)),style:N,unselectable:"unselectable",ref:this.savePaginationNode},nt),Ue,d.a.createElement("li",{title:X?K.prev_page:null,onClick:this.prev,tabIndex:Le?null:0,onKeyPress:this.runIfEnterPrev,className:n()("".concat(M,"-prev"),Object(g.a)({},"".concat(M,"-disabled"),Le)),"aria-disabled":Le},this.renderPrev(Je)),ce,d.a.createElement("li",{title:X?K.next_page:null,onClick:this.next,tabIndex:Ie?null:0,onKeyPress:this.runIfEnterNext,className:n()("".concat(M,"-next"),Object(g.a)({},"".concat(M,"-disabled"),Ie)),"aria-disabled":Ie},this.renderNext(rt)),d.a.createElement(m,{disabled:G,locale:K,rootPrefixCls:M,selectComponentClass:Oe,selectPrefixCls:xe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:re,pageSize:pe,pageSizeOptions:ue,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ge}))}}],[{key:"getDerivedStateFromProps",value:function(y,_){var M={};if("current"in y&&(M.current=y.current,y.current!==_.current&&(M.currentInputValue=M.current)),"pageSize"in y&&y.pageSize!==_.pageSize){var I=_.current,N=w(y.pageSize,_,y);I=I>N?N:I,"current"in y||(M.current=I,M.currentInputValue=I),M.pageSize=y.pageSize}return M}}]),C}(d.a.Component);E.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:r,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:r,locale:s.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var f=E},"6RRn":function(j,Y,D){"use strict";var L=D("wCXF"),g=D("n6Qo");D.d(Y,"b",function(){return g.a});var T=D("IBYe"),P=D("6eGT"),p=D("hW8S");D.d(Y,"a",function(){return p.a}),Y.c=L.b},"6eGT":function(j,Y,D){"use strict";function L(g){return null}Y.a=L},"746U":function(j,Y,D){"use strict";D.d(Y,"d",function(){return g}),D.d(Y,"j",function(){return T}),D.d(Y,"i",function(){return P}),D.d(Y,"h",function(){return p}),D.d(Y,"e",function(){return v}),D.d(Y,"k",function(){return S}),D.d(Y,"l",function(){return b}),D.d(Y,"a",function(){return d}),D.d(Y,"f",function(){return n}),D.d(Y,"g",function(){return c}),D.d(Y,"m",function(){return u}),D.d(Y,"c",function(){return m}),D.d(Y,"b",function(){return s}),D.d(Y,"n",function(){return r}),D.d(Y,"o",function(){return a});var L={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};function g(t){return Array.isArray?Array.isArray(t):!!(t&&typeof t.length===L.number&&t.constructor===Array)}function T(t){return typeof t===L.string||t instanceof String}function P(t){return typeof t===L.object&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}function p(t){return(typeof t===L.number||t instanceof Number)&&!isNaN(t)}function v(t){return t===!0||t===!1}function S(t){return typeof t===L.undefined}function b(t){return S(t)||t===null}function d(t,w){if(!t)throw new Error(w?"Unexpected type, expected '"+w+"'":"Unexpected type")}var l=Object.prototype.hasOwnProperty;function n(t){if(!P(t))return!1;for(var w in t)if(l.call(t,w))return!1;return!0}function c(t){return typeof t===L.function}function u(t,w){for(var E=Math.min(t.length,w.length),f=0;f<E;f++)o(t[f],w[f])}function o(t,w){if(T(w)){if(typeof t!==w)throw new Error("argument does not match constraint: typeof "+w)}else if(c(w)){try{if(t instanceof w)return}catch(E){}if(!b(t)&&t.constructor===w)return;if(w.length===1&&w.call(void 0,t)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function h(t){for(var w=[],E=Object.getPrototypeOf(t);Object.prototype!==E;)w=w.concat(Object.getOwnPropertyNames(E)),E=Object.getPrototypeOf(E);return w}function m(t){for(var w=[],E=0,f=h(t);E<f.length;E++){var k=f[E];typeof t[k]=="function"&&w.push(k)}return w}function s(t,w){for(var E=function(x){return function(){var y=Array.prototype.slice.call(arguments,0);return w(x,y)}},f={},k=0,O=t;k<O.length;k++){var C=O[k];f[C]=E(C)}return f}function r(t){return t===null?void 0:t}function a(t){return typeof t=="undefined"?null:t}},"7Cbv":function(j,Y,D){"use strict";var L=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),g=new Uint8Array(16);function T(){if(!L)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return L(g)}var P=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function p(u){return typeof u=="string"&&P.test(u)}for(var v=p,S=[],b=0;b<256;++b)S.push((b+256).toString(16).substr(1));function d(u){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,h=(S[u[o+0]]+S[u[o+1]]+S[u[o+2]]+S[u[o+3]]+"-"+S[u[o+4]]+S[u[o+5]]+"-"+S[u[o+6]]+S[u[o+7]]+"-"+S[u[o+8]]+S[u[o+9]]+"-"+S[u[o+10]]+S[u[o+11]]+S[u[o+12]]+S[u[o+13]]+S[u[o+14]]+S[u[o+15]]).toLowerCase();if(!v(h))throw TypeError("Stringified UUID is invalid");return h}var l=d;function n(u,o,h){u=u||{};var m=u.random||(u.rng||T)();if(m[6]=m[6]&15|64,m[8]=m[8]&63|128,o){h=h||0;for(var s=0;s<16;++s)o[h+s]=m[s];return o}return l(m)}var c=Y.a=n},"7ahc":function(j,Y,D){"use strict";D.d(Y,"a",function(){return w});var L=D("k1fw"),g=D("0Owb"),T=D("+L6B"),P=D("2/Rp"),p=D("y8nQ"),v=D("Vl3Y"),S=D("tJVT"),b=D("OaEy"),d=D("2fM7"),l=D("q1tI"),n=D.n(l),c=D("VrN/"),u=D.n(c),o=D("p77/"),h=D.n(o),m=D("c5Ni"),s=D.n(m),r=d.a.Option,a={labelCol:{span:4},wrapperCol:{span:20}},t={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};Y.b=function(E){var f=E.callback,k=E.onCancel,O=Object(l.useState)("python"),C=Object(S.a)(O,2),x=C[0],y=C[1];function _(I){y(t[I][1])}function M(I){f(I)}return n.a.createElement(v.a,Object(g.a)({},a,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:M}),n.a.createElement(v.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},n.a.createElement(d.a,{onChange:_},Object.keys(t).map(function(I){return n.a.createElement(r,{key:I,value:I},t[I][0])}))),n.a.createElement(v.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},n.a.createElement(w,{mode:x})),n.a.createElement("div",{className:"flex-container flex-end"},n.a.createElement(P.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),n.a.createElement(P.a,{type:"ghost",onClick:k},"\u53D6\u6D88")))};function w(E){var f=E.value,k=E.onChange,O=E.mode,C=E.options,x=C===void 0?{}:C,y=Object(l.useRef)(),_=Object(l.useState)(),M=Object(S.a)(_,2),I=M[0],N=M[1];return Object(l.useEffect)(function(){if(I){function G(H){var B=H.getValue();k&&k(B)}return I.on("change",G),function(){I.off("change",G)}}},[I,k]),Object(l.useEffect)(function(){I&&I.setOption("mode",O)},[I,O]),Object(l.useEffect)(function(){I&&((f!==I.getValue()||f==="")&&setTimeout(function(){I.setValue(f||" ")},300))},[I,f]),Object(l.useEffect)(function(){if(y.current&&!I){var G=u.a.fromTextArea(y.current,Object(L.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},x));N(G)}},[y.current,I]),n.a.createElement("div",{className:"my-codemirror-container"},n.a.createElement("textarea",{ref:y}))}},"815F":function(j,Y,D){"use strict";D.d(Y,"e",function(){return S}),D.d(Y,"c",function(){return d}),D.d(Y,"d",function(){return l}),D.d(Y,"a",function(){return c}),D.d(Y,"f",function(){return u}),D.d(Y,"b",function(){return o});var L=D("KQm4"),g=D("VTBJ"),T=D("Ff2n"),P=D("Zm9Q"),p=D("Kwbf"),v=D("OZM5");function S(h,m){return h!=null?h:m}function b(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],m=new Map;function s(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(r||[]).forEach(function(t){var w=t.key,E=t.children;Object(p.a)(w!=null,"Tree node must have a certain key: [".concat(a).concat(w,"]"));var f=String(w);Object(p.a)(!m.has(f)||w===null||w===void 0,"Same 'key' exist in the Tree: ".concat(f)),m.set(f,!0),s(E,"".concat(a).concat(f," > "))})}s(h)}function d(h){function m(s){var r=Object(P.a)(s);return r.map(function(a){if(!Object(v.i)(a))return Object(p.a)(!a,"Tree/TreeNode can only accept TreeNode as children."),null;var t=a.key,w=a.props,E=w.children,f=Object(T.a)(w,["children"]),k=Object(g.a)({key:t},f),O=m(E);return O.length&&(k.children=O),k}).filter(function(a){return a})}return m(h)}function l(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=new Set(m===!0?[]:m),r=[];function a(t){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(E,f){var k=Object(v.h)(w?w.pos:"0",f),O=S(E.key,k),C=Object(g.a)(Object(g.a)({},E),{},{parent:w,pos:k,children:null,data:E,isStart:[].concat(Object(L.a)(w?w.isStart:[]),[f===0]),isEnd:[].concat(Object(L.a)(w?w.isEnd:[]),[f===t.length-1])});return r.push(C),m===!0||s.has(O)?C.children=a(E.children||[],C):C.children=[],C})}return a(h),r}function n(h,m,s){var r;s?typeof s=="string"?r=function(w){return w[s]}:typeof s=="function"&&(r=function(w){return s(w)}):r=function(w,E){return S(w.key,E)};function a(t,w,E){var f=t?t.children:h,k=t?Object(v.h)(E.pos,w):"0";if(t){var O=r(t,k),C={node:t,index:w,pos:k,key:O,parentPos:E.node?E.pos:null,level:E.level+1};m(C)}f&&f.forEach(function(x,y){a(x,y,{node:t,pos:k,level:E?E.level+1:-1})})}a(null)}function c(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=m.initWrapper,r=m.processEntity,a=m.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,w={},E={},f={posEntities:w,keyEntities:E};return s&&(f=s(f)||f),n(h,function(k){var O=k.node,C=k.index,x=k.pos,y=k.key,_=k.parentPos,M=k.level,I={node:O,index:C,key:y,pos:x,level:M},N=S(y,x);w[x]=I,E[N]=I,I.parent=w[_],I.parent&&(I.parent.children=I.parent.children||[],I.parent.children.push(I)),r&&r(I,f)},t),a&&a(f),f}function u(h,m){var s=m.expandedKeys,r=m.selectedKeys,a=m.loadedKeys,t=m.loadingKeys,w=m.checkedKeys,E=m.halfCheckedKeys,f=m.dragOverNodeKey,k=m.dropPosition,O=m.keyEntities,C=O[h],x={eventKey:h,expanded:s.indexOf(h)!==-1,selected:r.indexOf(h)!==-1,loaded:a.indexOf(h)!==-1,loading:t.indexOf(h)!==-1,checked:w.indexOf(h)!==-1,halfChecked:E.indexOf(h)!==-1,pos:String(C?C.pos:""),dragOver:f===h&&k===0,dragOverGapTop:f===h&&k===-1,dragOverGapBottom:f===h&&k===1};return x}function o(h){var m=h.data,s=h.expanded,r=h.selected,a=h.checked,t=h.loaded,w=h.loading,E=h.halfChecked,f=h.dragOver,k=h.dragOverGapTop,O=h.dragOverGapBottom,C=h.pos,x=h.active,y=Object(g.a)(Object(g.a)({},m),{},{expanded:s,selected:r,checked:a,loaded:t,loading:w,halfChecked:E,dragOver:f,dragOverGapTop:k,dragOverGapBottom:O,pos:C,active:x});return"props"in y||Object.defineProperty(y,"props",{get:function(){return Object(p.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),h}}),y}},"8EBN":function(j,Y,D){(function(L){L(D("VrN/"))})(function(L){"use strict";L.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var g=0;g<L.modeInfo.length;g++){var T=L.modeInfo[g];T.mimes&&(T.mime=T.mimes[0])}L.findModeByMIME=function(P){P=P.toLowerCase();for(var p=0;p<L.modeInfo.length;p++){var v=L.modeInfo[p];if(v.mime==P)return v;if(v.mimes){for(var S=0;S<v.mimes.length;S++)if(v.mimes[S]==P)return v}}if(/\+xml$/.test(P))return L.findModeByMIME("application/xml");if(/\+json$/.test(P))return L.findModeByMIME("application/json")},L.findModeByExtension=function(P){P=P.toLowerCase();for(var p=0;p<L.modeInfo.length;p++){var v=L.modeInfo[p];if(v.ext){for(var S=0;S<v.ext.length;S++)if(v.ext[S]==P)return v}}},L.findModeByFileName=function(P){for(var p=0;p<L.modeInfo.length;p++){var v=L.modeInfo[p];if(v.file&&v.file.test(P))return v}var S=P.lastIndexOf("."),b=S>-1&&P.substring(S+1,P.length);if(b)return L.findModeByExtension(b)},L.findModeByName=function(P){P=P.toLowerCase();for(var p=0;p<L.modeInfo.length;p++){var v=L.modeInfo[p];if(v.name.toLowerCase()==P)return v;if(v.alias){for(var S=0;S<v.alias.length;S++)if(v.alias[S].toLowerCase()==P)return v}}}})},"8HAY":function(j,Y,D){"use strict";D.d(Y,"a",function(){return v}),D.d(Y,"b",function(){return S});var L=D("pmY6"),g=D("MI8n"),T=function(){var b=function(d,l){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,c){n.__proto__=c}||function(n,c){for(var u in c)c.hasOwnProperty(u)&&(n[u]=c[u])},b(d,l)};return function(d,l){b(d,l);function n(){this.constructor=d}d.prototype=l===null?Object.create(l):(n.prototype=l.prototype,new n)}}(),P=function(b,d,l,n){function c(u){return u instanceof l?u:new l(function(o){o(u)})}return new(l||(l=Promise))(function(u,o){function h(r){try{s(n.next(r))}catch(a){o(a)}}function m(r){try{s(n.throw(r))}catch(a){o(a)}}function s(r){r.done?u(r.value):c(r.value).then(h,m)}s((n=n.apply(b,d||[])).next())})},p=function(b,d){var l={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},n,c,u,o;return o={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function h(s){return function(r){return m([s,r])}}function m(s){if(n)throw new TypeError("Generator is already executing.");for(;l;)try{if(n=1,c&&(u=s[0]&2?c.return:s[0]?c.throw||((u=c.return)&&u.call(c),0):c.next)&&!(u=u.call(c,s[1])).done)return u;(c=0,u)&&(s=[s[0]&2,u.value]);switch(s[0]){case 0:case 1:u=s;break;case 4:return l.label++,{value:s[1],done:!1};case 5:l.label++,c=s[1],s=[0];continue;case 7:s=l.ops.pop(),l.trys.pop();continue;default:if(!(u=l.trys,u=u.length>0&&u[u.length-1])&&(s[0]===6||s[0]===2)){l=0;continue}if(s[0]===3&&(!u||s[1]>u[0]&&s[1]<u[3])){l.label=s[1];break}if(s[0]===6&&l.label<u[1]){l.label=u[1],u=s;break}if(u&&l.label<u[2]){l.label=u[2],l.ops.push(s);break}u[2]&&l.ops.pop(),l.trys.pop();continue}s=d.call(b,l)}catch(r){s=[6,r],c=0}finally{n=u=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},v=function(b){T(d,b);function d(l,n,c,u,o){n===void 0&&(n=""),c===void 0&&(c=""),u===void 0&&(u=!0);var h=b.call(this)||this;return h._onDidChange=h._register(new g.a),h.onDidChange=h._onDidChange.event,h._enabled=!0,h._checked=!1,h._id=l,h._label=n,h._cssClass=c,h._enabled=u,h._actionCallback=o,h}return Object.defineProperty(d.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"label",{get:function(){return this._label},set:function(l){this._setLabel(l)},enumerable:!0,configurable:!0}),d.prototype._setLabel=function(l){this._label!==l&&(this._label=l,this._onDidChange.fire({label:l}))},Object.defineProperty(d.prototype,"tooltip",{get:function(){return this._tooltip||""},set:function(l){this._setTooltip(l)},enumerable:!0,configurable:!0}),d.prototype._setTooltip=function(l){this._tooltip!==l&&(this._tooltip=l,this._onDidChange.fire({tooltip:l}))},Object.defineProperty(d.prototype,"class",{get:function(){return this._cssClass},set:function(l){this._setClass(l)},enumerable:!0,configurable:!0}),d.prototype._setClass=function(l){this._cssClass!==l&&(this._cssClass=l,this._onDidChange.fire({class:l}))},Object.defineProperty(d.prototype,"enabled",{get:function(){return this._enabled},set:function(l){this._setEnabled(l)},enumerable:!0,configurable:!0}),d.prototype._setEnabled=function(l){this._enabled!==l&&(this._enabled=l,this._onDidChange.fire({enabled:l}))},Object.defineProperty(d.prototype,"checked",{get:function(){return this._checked},set:function(l){this._setChecked(l)},enumerable:!0,configurable:!0}),d.prototype._setChecked=function(l){this._checked!==l&&(this._checked=l,this._onDidChange.fire({checked:l}))},d.prototype.run=function(l,n){return this._actionCallback?this._actionCallback(l):Promise.resolve(!0)},d}(L.a),S=function(b){T(d,b);function d(){var l=b!==null&&b.apply(this,arguments)||this;return l._onDidBeforeRun=l._register(new g.a),l.onDidBeforeRun=l._onDidBeforeRun.event,l._onDidRun=l._register(new g.a),l.onDidRun=l._onDidRun.event,l}return d.prototype.run=function(l,n){return P(this,void 0,void 0,function(){var c,u;return p(this,function(o){switch(o.label){case 0:if(!l.enabled)return[2,Promise.resolve(null)];this._onDidBeforeRun.fire({action:l}),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.runAction(l,n)];case 2:return c=o.sent(),this._onDidRun.fire({action:l,result:c}),[3,4];case 3:return u=o.sent(),this._onDidRun.fire({action:l,error:u}),[3,4];case 4:return[2]}})})},d.prototype.runAction=function(l,n){var c=n?l.run(n):l.run();return Promise.resolve(c)},d}(L.a)},"8hTe":function(j,Y,D){j.exports={button:"button___1wy9m"}},"9Bee":function(j,Y,D){"use strict";var L=D("DYRE"),g=D("zeV3"),T=D("+L6B"),P=D("2/Rp"),p=D("k1fw"),v=D("9og8"),S=D("tJVT"),b=D("WmNS"),d=D.n(b),l=D("q1tI"),n=D.n(l),c=D("vg9a"),u=D("DlQD"),o=D.n(u),h=D("rUJ1");function m(ae,z){var $=ae.match(/^(\s+)(?:```)/);if($===null)return z;var ie=$[1];return z.split(`
|
|
|
`).map(function(de){var se=de.match(/^\s+/);if(se===null)return de;var Ke=Object(S.a)(se,1),Rt=Ke[0];return Rt.length>=ie.length?de.slice(ie.length):de}).join(`
|
|
|
`)}var s=[],r=["<ul>"],a=new o.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function w(){s.length=0,r=["<ul>"]}var E={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function f(ae,z,$,ie){if(z>=ae.length||ae[z].level<=$)return z;var de=ae[z];ie.push("<li><a href='#"+de.anchor+"'>"+de.text+"</a>"),z++;var se=[];return z=f(ae,z,de.level,se),se.length>0&&(ie.push("<ul>"),se.forEach(function(Ke){ie.push(Ke)}),ie.push("</ul>")),ie.push("</li>"),z=f(ae,z,$,ie),z}function k(){return f(s,0,0,r),r.push("</ul>"),r.join("")}var O={heading:function(z){var $=t.exec(z);if($)return{type:"heading",raw:$[0],depth:$[1].length,text:$[2]}},fences:function(z){var $=this.rules.block.fences.exec(z);if($){var ie=$[0],de=m(ie,$[3]||""),se=$[2]?$[2].trim():$[2];if(["latex","katex","math"].indexOf(se)>=0){var Ke=y(),Rt=de;de=Ke,_[Ke]={type:"block",expression:Rt}}return{type:"code",raw:ie,lang:se,text:de}}}},C=/(?:\${2})([^\n`]+?)(?:\${2})/gi,x=0,y=function(){return"__special_katext_id_".concat(x++,"__")},_={};function M(){return _}function I(){x=0,_={}}function N(ae){return ae=ae.replace(C,function(z,$){var ie=y();return _[ie]={type:"inline",expression:$},ie}),ae}var G=a.listitem;a.listitem=function(ae){return G(N(ae))};var H=a.paragraph;a.paragraph=function(ae){return H(N(ae))};var B=a.tablecell;a.tablecell=function(ae,z){return B(N(ae),z)},a.code=function(ae,z,$){var ie=(z||"").match(/\S*/)[0];return ie?["latex","katex","math"].indexOf(ie)>=0?"<p class='editormd-tex'>".concat(ae,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(z,'">').concat($?ae:Object(h.escape)(ae,!0),`</code></pre>
|
|
|
`):'<pre class="prettyprint linenums"><code>'+($?ae:Object(h.escape)(ae,!0))+"</code></pre>"},a.heading=function(ae,z,$){var ie=this.options.headerPrefix+$.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:ie,level:z,text:ae}),"<h"+z+' id="'+ie+'">'+ae+"</h"+z+">"},o.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),o.a.use({tokenizer:O,renderer:a});var K=o.a,U=D("SJMd"),W=D("ulZh"),X=D.n(W),ne=D("m3rI"),fe=D("Oy/b"),me=D("p5ED"),Ae=D("ErOA");/*! *****************************************************************************
|
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
purpose with or without fee is hereby granted.
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
|
***************************************************************************** */var De=function(ae,z){return(De=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,ie){$.__proto__=ie}||function($,ie){for(var de in ie)Object.prototype.hasOwnProperty.call(ie,de)&&($[de]=ie[de])})(ae,z)};function ye(ae,z){function $(){this.constructor=ae}De(ae,z),ae.prototype=z===null?Object.create(z):($.prototype=z.prototype,new $)}function Oe(ae,z,$,ie){return new($||($=Promise))(function(de,se){function Ke(Er){try{Vt(ie.next(Er))}catch(Lt){se(Lt)}}function Rt(Er){try{Vt(ie.throw(Er))}catch(Lt){se(Lt)}}function Vt(Er){var Lt;Er.done?de(Er.value):(Lt=Er.value,Lt instanceof $?Lt:new $(function(zr){zr(Lt)})).then(Ke,Rt)}Vt((ie=ie.apply(ae,z||[])).next())})}function xe(ae,z){var $,ie,de,se,Ke={label:0,sent:function(){if(1&de[0])throw de[1];return de[1]},trys:[],ops:[]};return se={next:Rt(0),throw:Rt(1),return:Rt(2)},typeof Symbol=="function"&&(se[Symbol.iterator]=function(){return this}),se;function Rt(Vt){return function(Er){return function(Lt){if($)throw new TypeError("Generator is already executing.");for(;Ke;)try{if($=1,ie&&(de=2&Lt[0]?ie.return:Lt[0]?ie.throw||((de=ie.return)&&de.call(ie),0):ie.next)&&!(de=de.call(ie,Lt[1])).done)return de;switch(ie=0,de&&(Lt=[2&Lt[0],de.value]),Lt[0]){case 0:case 1:de=Lt;break;case 4:return Ke.label++,{value:Lt[1],done:!1};case 5:Ke.label++,ie=Lt[1],Lt=[0];continue;case 7:Lt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(de=Ke.trys,(de=de.length>0&&de[de.length-1])||Lt[0]!==6&&Lt[0]!==2)){Ke=0;continue}if(Lt[0]===3&&(!de||Lt[1]>de[0]&&Lt[1]<de[3])){Ke.label=Lt[1];break}if(Lt[0]===6&&Ke.label<de[1]){Ke.label=de[1],de=Lt;break}if(de&&Ke.label<de[2]){Ke.label=de[2],Ke.ops.push(Lt);break}de[2]&&Ke.ops.pop(),Ke.trys.pop();continue}Lt=z.call(ae,Ke)}catch(zr){Lt=[6,zr],ie=0}finally{$=de=0}if(5&Lt[0])throw Lt[1];return{value:Lt[0]?Lt[1]:void 0,done:!0}}([Vt,Er])}}}function ue(){for(var ae=0,z=0,$=arguments.length;z<$;z++)ae+=arguments[z].length;var ie=Array(ae),de=0;for(z=0;z<$;z++)for(var se=arguments[z],Ke=0,Rt=se.length;Ke<Rt;Ke++,de++)ie[de]=se[Ke];return ie}var le=function(){function ae(){}return ae.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ae.setAttributes=function(z,$){for(var ie=0,de=$;ie<de.length;ie++){var se=de[ie],Ke=se[0],Rt=se[1];z.setAttribute(Ke,Rt)}},ae.createRect=function(z,$,ie){var de=document.createElementNS("http://www.w3.org/2000/svg","rect");return de.setAttribute("width",z.toString()),de.setAttribute("height",$.toString()),ie&&ae.setAttributes(de,ie),de},ae.createLine=function(z,$,ie,de,se){var Ke=document.createElementNS("http://www.w3.org/2000/svg","line");return Ke.setAttribute("x1",z.toString()),Ke.setAttribute("y1",$.toString()),Ke.setAttribute("x2",ie.toString()),Ke.setAttribute("y2",de.toString()),se&&ae.setAttributes(Ke,se),Ke},ae.createPolygon=function(z,$){var ie=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ie.setAttribute("points",z),$&&ae.setAttributes(ie,$),ie},ae.createCircle=function(z,$){var ie=document.createElementNS("http://www.w3.org/2000/svg","circle");return ie.setAttribute("cx",(z/2).toString()),ie.setAttribute("cy",(z/2).toString()),ie.setAttribute("r",z.toString()),$&&ae.setAttributes(ie,$),ie},ae.createEllipse=function(z,$,ie){var de=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return de.setAttribute("cx",(z/2).toString()),de.setAttribute("cy",($/2).toString()),de.setAttribute("rx",(z/2).toString()),de.setAttribute("ry",($/2).toString()),ie&&ae.setAttributes(de,ie),de},ae.createGroup=function(z){var $=document.createElementNS("http://www.w3.org/2000/svg","g");return z&&ae.setAttributes($,z),$},ae.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ae.createMarker=function(z,$,ie,de,se,Ke,Rt){var Vt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ae.setAttributes(Vt,[["id",z],["orient",$],["markerWidth",ie.toString()],["markerHeight",de.toString()],["refX",se.toString()],["refY",Ke.toString()]]),Vt.appendChild(Rt),Vt},ae.createText=function(z){var $=document.createElementNS("http://www.w3.org/2000/svg","text");return $.setAttribute("x","0"),$.setAttribute("y","0"),z&&ae.setAttributes($,z),$},ae.createTSpan=function(z,$){var ie=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ie.textContent=z,$&&ae.setAttributes(ie,$),ie},ae.createImage=function(z){var $=document.createElementNS("http://www.w3.org/2000/svg","image");return z&&ae.setAttributes($,z),$},ae.createPoint=function(z,$){var ie=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ie.x=z,ie.y=$,ie},ae.createPath=function(z,$){var ie=document.createElementNS("http://www.w3.org/2000/svg","path");return ie.setAttribute("d",z),$&&ae.setAttributes(ie,$),ie},ae}(),re=function(){function ae(){}return ae.addKey=function(z){ae.key=z},Object.defineProperty(ae,"isLicensed",{get:function(){return!!ae.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ae.key)},enumerable:!1,configurable:!0}),ae}(),pe=function(){function ae(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ae.prototype.rasterize=function(z,$,ie){var de=this;return new Promise(function(se){var Ke=ie!==void 0?ie:document.createElement("canvas");z===null&&(de.markersOnly=!0,de.naturalSize=!1);var Rt=document.createElementNS("http://www.w3.org/2000/svg","svg");Rt.setAttribute("xmlns","http://www.w3.org/2000/svg"),Rt.setAttribute("width",$.width.baseVal.valueAsString),Rt.setAttribute("height",$.height.baseVal.valueAsString),Rt.setAttribute("viewBox","0 0 "+$.viewBox.baseVal.width.toString()+" "+$.viewBox.baseVal.height.toString()),Rt.innerHTML=$.innerHTML,de.naturalSize===!0?(Rt.width.baseVal.value=z.naturalWidth,Rt.height.baseVal.value=z.naturalHeight):de.width!==void 0&&de.height!==void 0&&(Rt.width.baseVal.value=de.width,Rt.height.baseVal.value=de.height),Ke.width=Rt.width.baseVal.value,Ke.height=Rt.height.baseVal.value;var Vt=Rt.outerHTML,Er=Ke.getContext("2d");de.markersOnly!==!0&&Er.drawImage(z,0,0,Ke.width,Ke.height);var Lt=window.URL,zr=new Image(Ke.width,Ke.height);zr.setAttribute("crossOrigin","anonymous");var Br=new Blob([Vt],{type:"image/svg+xml"}),En=Lt.createObjectURL(Br);zr.onload=function(){Er.drawImage(zr,0,0),Lt.revokeObjectURL(En);var ui=Ke.toDataURL(de.imageType,de.imageQuality);se(ui)},zr.src=En})},ae}(),ee=function(){},te=function(){function ae(z){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+z+"_"}return Object.defineProperty(ae.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ae.prototype.addClass=function(z){return this.styleSheet===void 0&&this.addStyleSheet(),z.name=""+this.classNamePrefix+z.localName,this.classes.push(z),this.styleSheet.sheet.insertRule("."+z.name+" {"+z.style+"}",this.styleSheet.sheet.cssRules.length),z},ae.prototype.addRule=function(z){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(z),this.styleSheet.sheet.insertRule(z.selector+" {"+z.style+"}",this.styleSheet.sheet.cssRules.length)},ae.prototype.addStyleSheet=function(){var z;this.styleSheet=document.createElement("style"),((z=this.styleSheetRoot)!==null&&z!==void 0?z:document.head).appendChild(this.styleSheet),this.addRule(new ce("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ce("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new ce("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new q("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new q("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},ae.prototype.removeStyleSheet=function(){var z;this.styleSheet&&(((z=this.styleSheetRoot)!==null&&z!==void 0?z:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ae}(),ce=function(ae,z){this.selector=ae,this.style=z},q=function(ae,z){this.localName=ae,this.style=z},Q=function(){function ae(z,$,ie,de,se){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=z,this.displayMode=$,this.markerItems=ie,this.uiStyleSettings=de,this.styles=se,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ae.prototype.show=function(z){var $=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=z,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var ie=document.createElement("div");ie.className=this.toolbarBlockStyleClass.name,ie.style.whiteSpace="nowrap",this.uiContainer.appendChild(ie),this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(se){var Ke=document.createElement("div");Ke.className=""+$.toolbarButtonStyleClass.name,Ke.setAttribute("data-type-name",se.typeName),Ke.innerHTML=se.icon,Ke.addEventListener("click",function(){$.markerToolbarButtonClicked(Ke,se)}),$.buttons.push(Ke),$.markerButtons.push(Ke)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var de=document.createElement("div");de.className=this.toolbarBlockStyleClass.name,de.style.whiteSpace="nowrap",de.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(de),this.addActionButton(de,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(de,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},ae.prototype.addButtonClickListener=function(z){this.buttonClickListeners.push(z)},ae.prototype.removeButtonClickListener=function(z){this.buttonClickListeners.indexOf(z)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(z),1)},ae.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ae.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var z=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var $=0;$<this.markerButtons.length;$++)$<z||$===z&&this.markerButtons.length-1===z?this.markerButtonBlock.appendChild(this.markerButtons[$]):($===z&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[$]))}},ae.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},ae.prototype.resetButtonStyles=function(){var z=this;this.buttons.forEach(function($){$.className=$.className.replace(z.uiStyleSettings.toolbarButtonStyleColorsClassName?z.uiStyleSettings.toolbarButtonStyleColorsClassName:z.toolbarButtonStyleColorsClass.name,"").trim(),$.className=$.className.replace(z.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?z.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:z.toolbarActiveButtonStyleColorsClass.name,"").trim(),$.className+=" "+(z.uiStyleSettings.toolbarButtonStyleColorsClassName?z.uiStyleSettings.toolbarButtonStyleColorsClassName:z.toolbarButtonStyleColorsClass.name)})},ae.prototype.addActionButton=function(z,$,ie){var de=this,se=document.createElement("div");switch(se.className=""+this.toolbarButtonStyleClass.name,se.innerHTML=$,se.setAttribute("data-action",ie),se.addEventListener("click",function(){de.actionToolbarButtonClicked(se,ie)}),ie){case"select":se.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":se.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":se.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":se.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":se.style.fill=this.uiStyleSettings.closeButtonColor}z.appendChild(se),this.buttons.push(se)},ae.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new q("toolbar",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new q("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new q("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new q("toolbar-overflow-block",`
|
|
|
position: absolute;
|
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
z-index: 10;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new q("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var z=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new q("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
|
|
|
padding: `+z+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new q("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new q("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ce("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new ce("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},ae.prototype.markerToolbarButtonClicked=function(z,$){this.setActiveButton(z),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("marker",$)}),this.markerButtonOverflowBlock.style.display="none"},ae.prototype.actionToolbarButtonClicked=function(z,$){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("action",$)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ae.prototype.setActiveButton=function(z){this.resetButtonStyles(),z.className=z.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),z.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ae.prototype.setActiveMarkerButton=function(z){var $=this.markerButtons.find(function(ie){return ie.getAttribute("data-type-name")===z});$&&this.setActiveButton($)},ae.prototype.setCurrentMarker=function(z){var $=this;this.currentMarker=z,this.buttons.filter(function(ie){return/delete|notes/.test(ie.getAttribute("data-action"))}).forEach(function(ie){$.currentMarker===void 0?(ie.style.fillOpacity="0.4",ie.style.pointerEvents="none"):(ie.style.fillOpacity="1",ie.style.pointerEvents="all")})},ae}(),V=function(){function ae(z,$,ie,de){this.panels=[],this.panelButtons=[],this.markerjsContainer=z,this.displayMode=$,this.uiStyleSettings=ie,this.styles=de,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ae.prototype.addStyles=function(){var z;this.toolboxStyleClass=this.styles.addClass(new q("toolbox",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
font-family: sans-serif;
|
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new q("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var $=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new q("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new q("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new q("toolbox-panel-row",`
|
|
|
display: flex;
|
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
cursor: default;
|
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new q("toolbox-panel-row_colors",`
|
|
|
background-color: `+((z=this.uiStyleSettings.toolboxBackgroundColor)!==null&&z!==void 0?z:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new q("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px;
|
|
|
padding: `+$+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new q("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new q("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new ce("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ce("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},ae.prototype.show=function(z){var $;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=z,this.uiContainer.className=this.toolboxStyleClass.name+" "+(($=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ae.prototype.setPanelButtons=function(z){var $,ie,de=this;this.panels=z,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(($=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ie=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ie!==void 0?ie:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(se){var Ke;se.uiStyleSettings=de.uiStyleSettings;var Rt=document.createElement("div");Rt.className=de.toolboxButtonStyleClass.name+" "+((Ke=de.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ke!==void 0?Ke:de.toolboxButtonStyleColorsClass.name),Rt.innerHTML=se.icon,Rt.title=se.title,Rt.addEventListener("click",function(){de.panelButtonClick(se)}),de.panelButtons.push(Rt),de.buttonRow.appendChild(Rt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ae.prototype.panelButtonClick=function(z){var $=this,ie=-1;if(z!==this.activePanel){ie=this.panels.indexOf(z),this.panelRow.innerHTML="";var de=z.getUi();de.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(de),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=z}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){$.displayMode==="inline"?$.panelRow.style.display="none":$.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(se,Ke){var Rt,Vt;se.className=$.toolboxButtonStyleClass.name+" "+(Ke===ie?""+((Rt=$.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Rt!==void 0?Rt:$.toolboxActiveButtonStyleColorsClass.name):""+((Vt=$.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Vt!==void 0?Vt:$.toolboxButtonStyleColorsClass.name))})},ae}(),Z=function(ae,z){this.title=ae,this.icon=z},be=function(ae){function z($,ie,de,se){var Ke=ae.call(this,$,se||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Ke.colors=[],Ke.addTransparent=!1,Ke.colorBoxes=[],Ke.colors=ie,Ke.currentColor=de,Ke.setCurrentColor=Ke.setCurrentColor.bind(Ke),Ke.getColorBox=Ke.getColorBox.bind(Ke),Ke}return ye(z,ae),z.prototype.getUi=function(){var $=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.whiteSpace="nowrap",this.colors.forEach(function(de){var se=$.getColorBox(de);ie.appendChild(se),$.colorBoxes.push(se)}),ie},z.prototype.getColorBox=function($){var ie=this,de=this.uiStyleSettings.toolbarHeight/4,se=this.uiStyleSettings.toolbarHeight-de,Ke=document.createElement("div");Ke.style.display="inline-block",Ke.style.boxSizing="content-box",Ke.style.width=se-2+"px",Ke.style.height=se-2+"px",Ke.style.padding="1px",Ke.style.marginRight="2px",Ke.style.marginBottom="2px",Ke.style.borderWidth="2px",Ke.style.borderStyle="solid",Ke.style.borderRadius=(se+2)/2+"px",Ke.style.borderColor=$===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ke.addEventListener("click",function(){ie.setCurrentColor($,Ke)});var Rt=document.createElement("div");return Rt.style.display="inline-block",Rt.style.width=se-2+"px",Rt.style.height=se-2+"px",Rt.style.backgroundColor=$,Rt.style.borderRadius=se/2+"px",$==="transparent"&&(Rt.style.fill=this.uiStyleSettings.toolboxAccentColor,Rt.innerHTML=`<svg viewBox="0 0 24 24">
|
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
|
</svg>`),Ke.appendChild(Rt),Ke},z.prototype.setCurrentColor=function($,ie){var de=this;this.currentColor=$,this.colorBoxes.forEach(function(se){se.style.borderColor=se===ie?de.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged($)},z}(Z),ge=function(){function ae(z,$,ie){this._state="new",this._isSelected=!1,this._container=z,this._overlayContainer=$,this.globalSettings=ie,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ae.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ae.prototype.ownsTarget=function(z){return!1},Object.defineProperty(ae.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ae.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ae.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ae.prototype.pointerDown=function(z,$){},ae.prototype.dblClick=function(z,$){},ae.prototype.manipulate=function(z){},ae.prototype.pointerUp=function(z){this.stateChanged()},ae.prototype.dispose=function(){},ae.prototype.addMarkerVisualToContainer=function(z){this.container.childNodes.length>0?this.container.insertBefore(z,this.container.childNodes[0]):this.container.appendChild(z)},ae.prototype.getState=function(){return{typeName:ae.typeName,state:this.state,notes:this.notes}},ae.prototype.restoreState=function(z){this._state=z.state,this.notes=z.notes},ae.prototype.scale=function(z,$){},ae.prototype.colorChanged=function(z){this.onColorChanged&&this.onColorChanged(z),this.stateChanged()},ae.prototype.fillColorChanged=function(z){this.onFillColorChanged&&this.onFillColorChanged(z),this.stateChanged()},ae.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var z=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),z.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(z)&&this.onStateChanged(this)}},ae.typeName="MarkerBase",ae}(),Te=function(){function ae(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ae.prototype.findGripByVisual=function(z){return this.topLeft.ownsTarget(z)?this.topLeft:this.topCenter.ownsTarget(z)?this.topCenter:this.topRight.ownsTarget(z)?this.topRight:this.centerLeft.ownsTarget(z)?this.centerLeft:this.centerRight.ownsTarget(z)?this.centerRight:this.bottomLeft.ownsTarget(z)?this.bottomLeft:this.bottomCenter.ownsTarget(z)?this.bottomCenter:this.bottomRight.ownsTarget(z)?this.bottomRight:void 0},ae}(),Je=function(){function ae(){this.GRIP_SIZE=10,this.visual=le.createGroup(),this.visual.appendChild(le.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(le.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ae.prototype.ownsTarget=function(z){return z===this.visual||z===this.visual.childNodes[0]||z===this.visual.childNodes[1]},ae}(),rt=function(){function ae(){}return ae.toITransformMatrix=function(z){return{a:z.a,b:z.b,c:z.c,d:z.d,e:z.e,f:z.f}},ae.toSVGMatrix=function(z,$){return z.a=$.a,z.b=$.b,z.c=$.c,z.d=$.d,z.e=$.e,z.f=$.f,z},ae}(),nt=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.left=0,se.top=0,se.width=0,se.height=0,se.defaultSize={x:50,y:20},se.offsetX=0,se.offsetY=0,se.rotationAngle=0,se.CB_DISTANCE=10,se._suppressMarkerCreateEvent=!1,se.container.transform.baseVal.appendItem(le.createTransform()),se.setupControlBox(),se}return ye(z,ae),Object.defineProperty(z.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"visual",{get:function(){return this._visual},set:function($){this._visual=$;var ie=le.createTransform();this._visual.transform.baseVal.appendItem(ie)},enumerable:!1,configurable:!0}),z.prototype.ownsTarget=function($){return!!ae.prototype.ownsTarget.call(this,$)||!!(this.controlGrips.findGripByVisual($)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget($))},z.prototype.pointerDown=function($,ie){ae.prototype.pointerDown.call(this,$,ie),this.state==="new"&&(this.left=$.x,this.top=$.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var de=this.unrotatePoint($);if(this.manipulationStartX=de.x,this.manipulationStartY=de.y,this.offsetX=de.x-this.left,this.offsetY=de.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ie),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ie)){this.activeGrip=this.rotatorGrip;var se=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=se.x-this.width/2,this.top=se.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ke=this.container.transform.baseVal.getItem(0);Ke.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ke,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},z.prototype.pointerUp=function($){var ie=this.state;ae.prototype.pointerUp.call(this,$),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate($),this._state="select",ie==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},z.prototype.moveVisual=function($){this.visual.style.transform="translate("+$.x+"px, "+$.y+"px)"},z.prototype.manipulate=function($){var ie=this.unrotatePoint($);this.state==="creating"?this.resize($):this.state==="move"?(this.left=this.manipulationStartLeft+(ie.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ie.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ie):this.state==="rotate"&&this.rotate($)},z.prototype.resize=function($){var ie=this.manipulationStartLeft,de=this.manipulationStartWidth,se=this.manipulationStartTop,Ke=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ie=this.manipulationStartLeft+$.x-this.manipulationStartX,de=this.manipulationStartWidth+this.manipulationStartLeft-ie;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:de=this.manipulationStartWidth+$.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:se=this.manipulationStartTop+$.y-this.manipulationStartY,Ke=this.manipulationStartHeight+this.manipulationStartTop-se;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ke=this.manipulationStartHeight+$.y-this.manipulationStartY}de>=0?(this.left=ie,this.width=de):(this.left=ie+de,this.width=-de),Ke>=0?(this.top=se,this.height=Ke):(this.top=se+Ke,this.height=-Ke),this.setSize()},z.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},z.prototype.rotate=function($){if(Math.abs($.x-this.centerX)>.1){var ie=Math.sign($.x-this.centerX);this.rotationAngle=180*Math.atan(($.y-this.centerY)/($.x-this.centerX))/Math.PI+90*ie,this.applyRotation()}},z.prototype.applyRotation=function(){var $=this.container.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem($,0)},z.prototype.rotatePoint=function($){if(this.rotationAngle===0)return $;var ie=this.container.getCTM(),de=le.createPoint($.x,$.y);return{x:(de=de.matrixTransform(ie)).x,y:de.y}},z.prototype.unrotatePoint=function($){if(this.rotationAngle===0)return $;var ie=this.container.getCTM();ie=ie.inverse();var de=le.createPoint($.x,$.y);return{x:(de=de.matrixTransform(ie)).x,y:de.y}},z.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},z.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},z.prototype.setupControlBox=function(){this.controlBox=le.createGroup();var $=le.createTransform();$.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem($),this.container.appendChild(this.controlBox),this.controlRect=le.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=le.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Te,this.addControlGrips(),this.controlBox.style.display="none"},z.prototype.adjustControlBox=function(){var $=this.controlBox.transform.baseVal.getItem(0);$.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem($,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},z.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},z.prototype.createGrip=function(){var $=new Je;return $.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild($.visual),$},z.prototype.positionGrips=function(){var $=this.controlGrips.topLeft.GRIP_SIZE,ie=-$/2,de=ie,se=(this.width+this.CB_DISTANCE)/2-$/2,Ke=(this.height+this.CB_DISTANCE)/2-$/2,Rt=this.height+this.CB_DISTANCE-$/2,Vt=this.width+this.CB_DISTANCE-$/2;this.positionGrip(this.controlGrips.topLeft.visual,ie,de),this.positionGrip(this.controlGrips.topCenter.visual,se,de),this.positionGrip(this.controlGrips.topRight.visual,Vt,de),this.positionGrip(this.controlGrips.centerLeft.visual,ie,Ke),this.positionGrip(this.controlGrips.centerRight.visual,Vt,Ke),this.positionGrip(this.controlGrips.bottomLeft.visual,ie,Rt),this.positionGrip(this.controlGrips.bottomCenter.visual,se,Rt),this.positionGrip(this.controlGrips.bottomRight.visual,Vt,Rt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,se,de-3*this.CB_DISTANCE)},z.prototype.positionGrip=function($,ie,de){var se=$.transform.baseVal.getItem(0);se.setTranslate(ie,de),$.transform.baseVal.replaceItem(se,0)},z.prototype.hideControlBox=function(){this.controlBox.style.display="none"},z.prototype.showControlBox=function(){this.controlBox.style.display=""},z.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:rt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:rt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ae.prototype.getState.call(this))},z.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$);var ie=$;this.left=ie.left,this.top=ie.top,this.width=ie.width,this.height=ie.height,this.rotationAngle=ie.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(rt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ie.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(rt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ie.containerTransformMatrix))},z.prototype.scale=function($,ie){ae.prototype.scale.call(this,$,ie);var de=this.rotatePoint({x:this.left,y:this.top}),se=this.unrotatePoint({x:de.x*$,y:de.y*ie});this.left=se.x,this.top=se.y,this.width=this.width*$,this.height=this.height*ie,this.adjustControlBox()},z}(ge),at=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.fillColor="transparent",se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.opacity=1,se.setStrokeColor=se.setStrokeColor.bind(se),se.setFillColor=se.setFillColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.createVisual=se.createVisual.bind(se),se}return ye(z,ae),z.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.visual)},z.prototype.createVisual=function(){this.visual=le.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},z.prototype.pointerDown=function($,ie){ae.prototype.pointerDown.call(this,$,ie),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},z.prototype.manipulate=function($){ae.prototype.manipulate.call(this,$)},z.prototype.resize=function($){ae.prototype.resize.call(this,$),this.setSize()},z.prototype.setSize=function(){ae.prototype.setSize.call(this),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},z.prototype.pointerUp=function($){ae.prototype.pointerUp.call(this,$),this.setSize()},z.prototype.setStrokeColor=function($){this.strokeColor=$,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged($),this.stateChanged()},z.prototype.setFillColor=function($){this.fillColor=$,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},z.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},z.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.visual&&le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},z.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ae.prototype.getState.call(this))},z.prototype.restoreState=function($){var ie=$;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),ae.prototype.restoreState.call(this,$),this.setSize()},z.prototype.scale=function($,ie){ae.prototype.scale.call(this,$,ie),this.setSize()},z.title="Rectangle marker",z}(nt),ct=function(ae){function z($,ie,de,se){var Ke=ae.call(this,$,se||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ke.widths=[],Ke.widthBoxes=[],Ke.widths=ie,Ke.currentWidth=de,Ke.setCurrentWidth=Ke.setCurrentWidth.bind(Ke),Ke}return ye(z,ae),z.prototype.getUi=function(){var $=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.widths.forEach(function(de){var se=document.createElement("div");se.style.display="flex",se.style.flexGrow="2",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.borderColor=de===$.currentWidth?$.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){$.setCurrentWidth(de,se)}),ie.appendChild(se);var Ke=document.createElement("div");Ke.innerText=de.toString(),Ke.style.marginRight="5px",se.appendChild(Ke);var Rt=document.createElement("div");Rt.style.minHeight="20px",Rt.style.flexGrow="2",Rt.style.display="flex",Rt.style.alignItems="center";var Vt=document.createElement("hr");Vt.style.minWidth="20px",Vt.style.border="0px",Vt.style.borderTop=de+"px solid "+$.uiStyleSettings.toolboxColor,Vt.style.flexGrow="2",Rt.appendChild(Vt),se.appendChild(Rt),$.widthBoxes.push(se)}),ie},z.prototype.setCurrentWidth=function($,ie){var de=this;this.currentWidth=$,this.widthBoxes.forEach(function(se){se.style.borderColor=se===ie?de.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},z}(Z),ht=function(ae){function z($,ie,de,se){var Ke=ae.call(this,$,se||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Ke.styles=[],Ke.styleBoxes=[],Ke.styles=ie,Ke.currentStyle=de,Ke.setCurrentStyle=Ke.setCurrentStyle.bind(Ke),Ke}return ye(z,ae),z.prototype.getUi=function(){var $=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.styles.forEach(function(de){var se=document.createElement("div");se.style.display="flex",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.overflow="hidden",se.style.maxWidth=100/$.styles.length-5+"%",se.style.borderColor=de===$.currentStyle?$.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){$.setCurrentStyle(de,se)}),ie.appendChild(se);var Ke=document.createElement("div");Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.overflow="hidden";var Rt=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+$.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(de!==""?'stroke-dasharray="'+de+'"':"")+` />
|
|
|
</svg>`;Ke.innerHTML=Rt,se.appendChild(Ke),$.styleBoxes.push(se)}),ie},z.prototype.setCurrentStyle=function($,ie){var de=this;this.currentStyle=$,this.styleBoxes.forEach(function(se){se.style.borderColor=se===ie?de.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},z}(Z),He=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.strokeColor=de.defaultColor,se.strokeWidth=de.defaultStrokeWidth,se.strokeDasharray=de.defaultStrokeDasharray,se.strokePanel=new be("Line color",de.defaultColorSet,de.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new ct("Line width",de.defaultStrokeWidths,de.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new ht("Line style",de.defaultStrokeDasharrays,de.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return ye(z,ae),Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=ae.prototype.getState.call(this);return $.typeName=z.typeName,$},z.typeName="FrameMarker",z.title="Frame marker",z.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',z}(at),Re=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},tt=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.x1=0,se.y1=0,se.x2=0,se.y2=0,se.defaultLength=50,se.manipulationStartX=0,se.manipulationStartY=0,se.manipulationStartX1=0,se.manipulationStartY1=0,se.manipulationStartX2=0,se.manipulationStartY2=0,se.setupControlBox(),se}return ye(z,ae),z.prototype.ownsTarget=function($){return!!ae.prototype.ownsTarget.call(this,$)||!(!this.grip1.ownsTarget($)&&!this.grip2.ownsTarget($))},z.prototype.pointerDown=function($,ie){ae.prototype.pointerDown.call(this,$,ie),this.manipulationStartX=$.x,this.manipulationStartY=$.y,this.state==="new"&&(this.x1=$.x,this.y1=$.y,this.x2=$.x,this.y2=$.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(ie)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ie)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},z.prototype.pointerUp=function($){var ie=this.state;ae.prototype.pointerUp.call(this,$),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate($),this._state="select",ie==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},z.prototype.adjustVisual=function(){},z.prototype.manipulate=function($){this.state==="creating"?this.resize($):this.state==="move"?(this.x1=this.manipulationStartX1+$.x-this.manipulationStartX,this.y1=this.manipulationStartY1+$.y-this.manipulationStartY,this.x2=this.manipulationStartX2+$.x-this.manipulationStartX,this.y2=this.manipulationStartY2+$.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize($)},z.prototype.resize=function($){switch(this.activeGrip){case this.grip1:this.x1=$.x,this.y1=$.y;break;case this.grip2:case void 0:this.x2=$.x,this.y2=$.y}this.adjustVisual(),this.adjustControlBox()},z.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},z.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},z.prototype.setupControlBox=function(){this.controlBox=le.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},z.prototype.adjustControlBox=function(){this.positionGrips()},z.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},z.prototype.createGrip=function(){var $=new Je;return $.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild($.visual),$},z.prototype.positionGrips=function(){var $=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-$/2,this.y1-$/2),this.positionGrip(this.grip2.visual,this.x2-$/2,this.y2-$/2)},z.prototype.positionGrip=function($,ie,de){var se=$.transform.baseVal.getItem(0);se.setTranslate(ie,de),$.transform.baseVal.replaceItem(se,0)},z.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ae.prototype.getState.call(this))},z.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$);var ie=$;this.x1=ie.x1,this.y1=ie.y1,this.x2=ie.x2,this.y2=ie.y2},z.prototype.scale=function($,ie){ae.prototype.scale.call(this,$,ie),this.x1=this.x1*$,this.y1=this.y1*ie,this.x2=this.x2*$,this.y2=this.y2*ie,this.adjustVisual(),this.adjustControlBox()},z}(ge),ft=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.setStrokeColor=se.setStrokeColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.strokeColor=de.defaultColor,se.strokeWidth=de.defaultStrokeWidth,se.strokeDasharray=de.defaultStrokeDasharray,se.strokePanel=new be("Line color",de.defaultColorSet,de.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new ct("Line width",de.defaultStrokeWidths,de.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new ht("Line style",de.defaultStrokeDasharrays,de.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return ye(z,ae),z.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorLine&&$!==this.visibleLine)},z.prototype.createVisual=function(){this.visual=le.createGroup(),this.selectorLine=le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},z.prototype.pointerDown=function($,ie){ae.prototype.pointerDown.call(this,$,ie),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},z.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),le.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},z.prototype.setStrokeColor=function($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},z.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},z.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.adjustVisual(),this.stateChanged()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ae.prototype.getState.call(this));return $.typeName=z.typeName,$},z.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$);var ie=$;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.createVisual(),this.adjustVisual()},z.typeName="LineMarker",z.title="Line marker",z.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',z}(tt),Qe=function(ae){function z($,ie,de,se){var Ke=ae.call(this,$,se||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Ke.fonts=[],Ke.fontBoxes=[],Ke.fonts=ie,Ke.currentFont=de,Ke.setCurrentFont=Ke.setCurrentFont.bind(Ke),Ke}return ye(z,ae),z.prototype.getUi=function(){var $=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.flexGrow="2",this.fonts.forEach(function(de){var se=document.createElement("div");se.style.display="inline-block",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.overflow="hidden",se.style.maxWidth=100/$.fonts.length-5+"%",se.style.borderColor=de===$.currentFont?$.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){$.setCurrentFont(de,se)}),ie.appendChild(se);var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.fontFamily=de,Ke.style.overflow="hidden";var Rt=document.createElement("div");Rt.style.whiteSpace="nowrap",Rt.style.overflow="hidden",Rt.style.textOverflow="ellipsis",Rt.innerHTML="The quick brown fox jumps over the lazy dog",Ke.appendChild(Rt),se.appendChild(Ke),$.fontBoxes.push(se)}),ie},z.prototype.setCurrentFont=function($,ie){var de=this;this.currentFont=$,this.fontBoxes.forEach(function(se){se.style.borderColor=se===ie?de.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},z}(Z),lt=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.color="transparent",se.padding=5,se.DEFAULT_TEXT="your text here",se.text=se.DEFAULT_TEXT,se.isMoved=!1,se.color=de.defaultColor,se.fontFamily=de.defaultFontFamily,se.defaultSize={x:100,y:30},se.setColor=se.setColor.bind(se),se.setFont=se.setFont.bind(se),se.renderText=se.renderText.bind(se),se.sizeText=se.sizeText.bind(se),se.textEditDivClicked=se.textEditDivClicked.bind(se),se.showTextEditor=se.showTextEditor.bind(se),se.setSize=se.setSize.bind(se),se.positionTextEditor=se.positionTextEditor.bind(se),se.colorPanel=new be("Color",de.defaultColorSet,de.defaultColor),se.colorPanel.onColorChanged=se.setColor,se.fontFamilyPanel=new Qe("Font",de.defaultFontFamilies,de.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se}return ye(z,ae),z.prototype.ownsTarget=function($){if(ae.prototype.ownsTarget.call(this,$)||$===this.visual||$===this.textElement||$===this.bgRectangle)return!0;var ie=!1;return this.textElement.childNodes.forEach(function(de){de===$&&(ie=!0)}),ie},z.prototype.createVisual=function(){this.visual=le.createGroup(),this.bgRectangle=le.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=le.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},z.prototype.pointerDown=function($,ie){ae.prototype.pointerDown.call(this,$,ie),this.isMoved=!1,this.pointerDownPoint=$,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},z.prototype.renderText=function(){var $=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(ie){$.textElement.appendChild(le.createTSpan(ie.trim()===""?" ":ie.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},z.prototype.getTextScale=function(){var $=this.textElement.getBBox(),ie=1;if($.width>0&&$.height>0){var de=(1*this.width-this.width*this.padding*2/100)/$.width,se=(1*this.height-this.height*this.padding*2/100)/$.height;ie=Math.min(de,se)}return ie},z.prototype.getTextPosition=function($){var ie=this.textElement.getBBox(),de=0,se=0;return ie.width>0&&ie.height>0&&(de=(this.width-ie.width*$)/2,se=this.height/2-ie.height*$/2),{x:de,y:se}},z.prototype.sizeText=function(){var $=this.textElement.getBBox(),ie=this.getTextScale(),de=this.getTextPosition(ie);de.y-=$.y*ie,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+de.x+"px, "+de.y+"px) scale("+ie+", "+ie+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(de.x,de.y),this.textElement.transform.baseVal.getItem(1).setScale(ie,ie))},z.prototype.manipulate=function($){ae.prototype.manipulate.call(this,$),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs($.x-this.pointerDownPoint.x)>5||Math.abs($.y-this.pointerDownPoint.y)>5)},z.prototype.resize=function($){ae.prototype.resize.call(this,$),this.isMoved=!0,this.setSize(),this.sizeText()},z.prototype.setSize=function(){ae.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},z.prototype.pointerUp=function($){var ie=this.state;ie==="creating"&&(this._suppressMarkerCreateEvent=!0),ae.prototype.pointerUp.call(this,$),this.setSize(),(ie==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},z.prototype.showTextEditor=function(){var $=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(ie){ie.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ie=Number.parseFloat($.textEditor.style.fontSize);$.textEditor.clientWidth>=Number.parseInt($.textEditor.style.maxWidth)&&ie>.9;)ie-=.1,$.textEditor.style.fontSize=Math.max(ie,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ie){if(ie.clipboardData){var de=ie.clipboardData.getData("text"),se=window.getSelection();if(!se.rangeCount)return!1;se.deleteFromDocument(),se.getRangeAt(0).insertNode(document.createTextNode(de)),ie.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){$.textEditDivClicked($.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},z.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var $=this.getTextScale(),ie=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),de=this.textElement.getBBox(),se={x:de.width*$,y:de.height*$};ie.x-=se.x/2,ie.y-=se.y/2,this.textEditor.style.top=ie.y+"px",this.textEditor.style.left=ie.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ie.x+"px",this.textEditor.style.fontSize=Math.max(16*$,12)+"px",this.textElement.style.display="none"}},z.prototype.textEditDivClicked=function($){this.text=$.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},z.prototype.select=function(){ae.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},z.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ae.prototype.deselect.call(this)},z.prototype.dblClick=function($,ie){ae.prototype.dblClick.call(this,$,ie),this.showTextEditor()},z.prototype.setColor=function($){this.textElement&&le.setAttributes(this.textElement,[["fill",$]]),this.color=$,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged($)},z.prototype.setFont=function($){this.textElement&&le.setAttributes(this.textElement,[["font-family",$]]),this.fontFamily=$,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},z.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},z.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ae.prototype.getState.call(this));return $.typeName=z.typeName,$},z.prototype.restoreState=function($){var ie=$;this.color=ie.color,this.fontFamily=ie.fontFamily,this.padding=ie.padding,this.text=ie.text,this.createVisual(),ae.prototype.restoreState.call(this,$),this.setSize()},z.prototype.scale=function($,ie){ae.prototype.scale.call(this,$,ie),this.setSize(),this.sizeText(),this.positionTextEditor()},z.typeName="TextMarker",z.title="Text marker",z.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',z}(nt),Ue=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.color="transparent",se.lineWidth=3,se.drawing=!1,se.pixelRatio=1,se.color=de.defaultColor,se.lineWidth=de.defaultStrokeWidth,se.pixelRatio=de.freehandPixelRatio,se.setColor=se.setColor.bind(se),se.addCanvas=se.addCanvas.bind(se),se.finishCreation=se.finishCreation.bind(se),se.setLineWidth=se.setLineWidth.bind(se),se.colorPanel=new be("Color",de.defaultColorSet,de.defaultColor),se.colorPanel.onColorChanged=se.setColor,se.lineWidthPanel=new ct("Line width",de.defaultStrokeWidths,de.defaultStrokeWidth),se.lineWidthPanel.onWidthChanged=se.setLineWidth,se}return ye(z,ae),z.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.drawingImage)},z.prototype.createVisual=function(){this.visual=le.createGroup(),this.drawingImage=le.createImage(),this.visual.appendChild(this.drawingImage);var $=le.createTransform();this.visual.transform.baseVal.appendItem($),this.addMarkerVisualToContainer(this.visual)},z.prototype.pointerDown=function($,ie){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo($.x,$.y),this.drawing=!0):ae.prototype.pointerDown.call(this,$,ie)},z.prototype.manipulate=function($){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo($.x,$.y),this.canvasContext.stroke()):ae.prototype.manipulate.call(this,$)},z.prototype.resize=function($){ae.prototype.resize.call(this,$),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},z.prototype.pointerUp=function($){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ae.prototype.pointerUp.call(this,$)},z.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},z.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.select.call(this)},z.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.deselect.call(this)},z.prototype.finishCreation=function(){for(var $=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ie=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],de=ie[0],se=ie[1],Ke=ie[2],Rt=ie[3],Vt=!1,Er=0;Er<this.canvasElement.height;Er++)for(var Lt=0;Lt<this.canvasElement.width;Lt++)$.data[Er*this.canvasElement.width*4+4*Lt+3]>0&&(Vt=!0,Er<se&&(se=Er),Lt<de&&(de=Lt),Er>Rt&&(Rt=Er),Lt>Ke&&(Ke=Lt));if(Vt){this.left=de/this.pixelRatio,this.top=se/this.pixelRatio,this.width=(Ke-de)/this.pixelRatio,this.height=(Rt-se)/this.pixelRatio;var zr=document.createElement("canvas");zr.width=Ke-de,zr.height=Rt-se,zr.getContext("2d").putImageData(this.canvasContext.getImageData(de,se,Ke-de,Rt-se),0,0),this.drawingImgUrl=zr.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},z.prototype.setDrawingImage=function(){le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},z.prototype.setColor=function($){this.color=$,this.colorChanged($)},z.prototype.setLineWidth=function($){this.lineWidth=$},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=Object.assign({drawingImgUrl:this.drawingImgUrl},ae.prototype.getState.call(this));return $.typeName=z.typeName,$},z.prototype.restoreState=function($){this.createVisual(),ae.prototype.restoreState.call(this,$),this.drawingImgUrl=$.drawingImgUrl,this.setDrawingImage()},z.prototype.scale=function($,ie){ae.prototype.scale.call(this,$,ie),this.setDrawingImage()},z.typeName="FreehandMarker",z.title="Freehand marker",z.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',z}(nt),Le=function(ae){function z($,ie,de){var se=ae.call(this,$,de||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return se.typeBoxes=[],se.currentType=ie,se.setCurrentType=se.setCurrentType.bind(se),se}return ye(z,ae),z.prototype.getUi=function(){var $=this,ie=document.createElement("div");ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2";for(var de=function(Rt){var Vt="both";switch(Rt){case 0:Vt="both";break;case 1:Vt="start";break;case 2:Vt="end";break;case 3:Vt="none"}var Er=document.createElement("div");if(Er.style.display="flex",Er.style.flexGrow="2",Er.style.alignItems="center",Er.style.justifyContent="space-between",Er.style.padding="5px",Er.style.borderWidth="2px",Er.style.borderStyle="solid",Er.style.borderColor=Vt===se.currentType?se.uiStyleSettings.toolboxAccentColor:"transparent",Er.addEventListener("click",function(){$.setCurrentType(Vt,Er)}),ie.appendChild(Er),Vt==="both"||Vt==="start"){var Lt=document.createElement("div");Lt.style.display="flex",Lt.style.alignItems="center",Lt.style.minHeight="20px",Lt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,5 10,0 10,10" fill="`+(se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Lt.style.marginLeft="5px",Er.appendChild(Lt)}var zr=document.createElement("div");zr.style.display="flex",zr.style.alignItems="center",zr.style.minHeight="20px",zr.style.flexGrow="2";var Br=document.createElement("hr");if(Br.style.minWidth="20px",Br.style.border="0px",Br.style.borderTop="3px solid "+(se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxColor:"#eeeeee"),Br.style.flexGrow="2",zr.appendChild(Br),Er.appendChild(zr),Vt==="both"||Vt==="end"){var En=document.createElement("div");En.style.display="flex",En.style.alignItems="center",En.style.minHeight="20px",En.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,0 10,5 0,10" fill="`+(se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,En.style.marginRight="5px",Er.appendChild(En)}se.typeBoxes.push(Er)},se=this,Ke=0;Ke<4;Ke++)de(Ke);return ie},z.prototype.setCurrentType=function($,ie){var de=this;this.currentType=$,this.typeBoxes.forEach(function(se){se.style.borderColor=se===ie?de.uiStyleSettings!==void 0?de.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},z}(Z),Ie=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.arrowType="end",se.arrowBaseHeight=10,se.arrowBaseWidth=10,se.getArrowPoints=se.getArrowPoints.bind(se),se.setArrowType=se.setArrowType.bind(se),se.arrowTypePanel=new Le("Arrow type","end"),se.arrowTypePanel.onArrowTypeChanged=se.setArrowType,se}return ye(z,ae),z.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.arrow1&&$!==this.arrow2)},z.prototype.getArrowPoints=function($,ie){var de=this.arrowBaseWidth+2*this.strokeWidth,se=this.arrowBaseHeight+2*this.strokeWidth;return $-de/2+","+(ie+se/2)+" "+$+","+(ie-se/2)+" "+($+de/2)+","+(ie+se/2)},z.prototype.createTips=function(){this.arrow1=le.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=le.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow2)},z.prototype.pointerDown=function($,ie){ae.prototype.pointerDown.call(this,$,ie),this.state==="creating"&&this.createTips()},z.prototype.adjustVisual=function(){if(ae.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",le.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),le.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var $=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ie=this.arrow1.transform.baseVal.getItem(0);ie.setRotate($,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ie,0);var de=this.arrow2.transform.baseVal.getItem(0);de.setRotate($+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(de,0)}},z.prototype.setArrowType=function($){this.arrowType=$,this.adjustVisual(),this.stateChanged()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=Object.assign({arrowType:this.arrowType},ae.prototype.getState.call(this));return $.typeName=z.typeName,$},z.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$);var ie=$;this.arrowType=ie.arrowType,this.createTips(),this.adjustVisual()},z.typeName="ArrowMarker",z.title="Arrow marker",z.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',z}(ft),Ce=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.fillColor=de.defaultFillColor,se.strokeWidth=0,se.fillPanel=new be("Color",de.defaultColorSet,de.defaultFillColor),se.fillPanel.onColorChanged=se.setFillColor,se}return ye(z,ae),Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=ae.prototype.getState.call(this);return $.typeName=z.typeName,$},z.typeName="CoverMarker",z.title="Cover marker",z.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',z}(at),Se=function(ae){function z($,ie,de,se){var Ke=ae.call(this,$,se||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Ke.opacities=[],Ke.opacityBoxes=[],Ke.opacities=ie,Ke.currentOpacity=de,Ke.setCurrentOpacity=Ke.setCurrentOpacity.bind(Ke),Ke}return ye(z,ae),z.prototype.getUi=function(){var $=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",ie.style.justifyContent="space-between",this.opacities.forEach(function(de){var se=document.createElement("div");se.style.display="flex",se.style.alignItems="center",se.style.justifyContent="center",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.borderColor=de===$.currentOpacity?$.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){$.setCurrentOpacity(de,se)}),ie.appendChild(se);var Ke=document.createElement("div");Ke.innerText=100*de+"%",se.appendChild(Ke),$.opacityBoxes.push(se)}),ie},z.prototype.setCurrentOpacity=function($,ie){var de=this;this.currentOpacity=$,this.opacityBoxes.forEach(function(se){se.style.borderColor=se===ie?de.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},z}(Z),ke=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.setOpacity=se.setOpacity.bind(se),se.fillColor=de.defaultHighlightColor,se.strokeWidth=0,se.opacity=de.defaultHighlightOpacity,se.fillPanel=new be("Color",de.defaultColorSet,se.fillColor),se.fillPanel.onColorChanged=se.setFillColor,se.opacityPanel=new Se("Opacity",de.defaultOpacitySteps,se.opacity),se.opacityPanel.onOpacityChanged=se.setOpacity,se}return ye(z,ae),z.prototype.setOpacity=function($){this.opacity=$,this.visual&&le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=ae.prototype.getState.call(this);return $.typeName=z.typeName,$},z.typeName="HighlightMarker",z.title="Highlight marker",z.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',z}(Ce),Ne='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',et=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.bgColor="transparent",se.tipPosition={x:0,y:0},se.tipBase1Position={x:0,y:0},se.tipBase2Position={x:0,y:0},se.tipMoving=!1,se.color=de.defaultStrokeColor,se.bgColor=de.defaultFillColor,se.fontFamily=de.defaultFontFamily,se.defaultSize={x:100,y:30},se.setBgColor=se.setBgColor.bind(se),se.getTipPoints=se.getTipPoints.bind(se),se.positionTip=se.positionTip.bind(se),se.setTipPoints=se.setTipPoints.bind(se),se.colorPanel=new be("Text color",de.defaultColorSet,se.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),se.colorPanel.onColorChanged=se.setColor,se.bgColorPanel=new be("Fill color",de.defaultColorSet,se.bgColor,Ne),se.bgColorPanel.onColorChanged=se.setBgColor,se.fontFamilyPanel=new Qe("Font",de.defaultFontFamilies,de.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se.tipGrip=new Je,se.tipGrip.visual.transform.baseVal.appendItem(le.createTransform()),se.controlBox.appendChild(se.tipGrip.visual),se}return ye(z,ae),z.prototype.ownsTarget=function($){return ae.prototype.ownsTarget.call(this,$)||this.tipGrip.ownsTarget($)||this.tip===$},z.prototype.createTip=function(){le.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=le.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},z.prototype.pointerDown=function($,ie){this.state==="new"&&ae.prototype.pointerDown.call(this,$,ie),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ie)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ae.prototype.pointerDown.call(this,$,ie)},z.prototype.pointerUp=function($){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ae.prototype.pointerUp.call(this,$);else{var ie=this.state==="creating";ae.prototype.pointerUp.call(this,$),this.setTipPoints(ie),this.positionTip()}},z.prototype.manipulate=function($){if(this.tipMoving){var ie=this.unrotatePoint($);this.tipPosition={x:ie.x-this.manipulationStartLeft,y:ie.y-this.manipulationStartTop},this.positionTip()}else ae.prototype.manipulate.call(this,$)},z.prototype.setBgColor=function($){this.bgRectangle&&this.tip&&(le.setAttributes(this.bgRectangle,[["fill",$]]),le.setAttributes(this.tip,[["fill",$]])),this.bgColor=$,this.fillColorChanged($)},z.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},z.prototype.setTipPoints=function($){$===void 0&&($=!1);var ie=Math.min(this.height/2,15),de=this.height/5;$&&(this.tipPosition={x:ie+de/2,y:this.height+20});var se=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?se<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(de=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:0},this.tipBase2Position={x:ie+de,y:0}):(this.tipBase1Position={x:0,y:ie},this.tipBase2Position={x:0,y:ie+de}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?se<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(de=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-de,y:0},this.tipBase2Position={x:this.width-ie,y:0}):(this.tipBase1Position={x:this.width,y:ie},this.tipBase2Position={x:this.width,y:ie+de}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?se<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(de=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-de,y:this.height},this.tipBase2Position={x:this.width-ie,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ie-de},this.tipBase2Position={x:this.width,y:this.height-ie}):se<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(de=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:this.height},this.tipBase2Position={x:ie+de,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ie},this.tipBase2Position={x:0,y:this.height-ie-de})},z.prototype.resize=function($){ae.prototype.resize.call(this,$),this.positionTip()},z.prototype.positionTip=function(){le.setAttributes(this.tip,[["points",this.getTipPoints()]]);var $=this.tipGrip.visual.transform.baseVal.getItem(0);$.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem($,0)},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),z.prototype.select=function(){this.positionTip(),ae.prototype.select.call(this)},z.prototype.getState=function(){var $=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ae.prototype.getState.call(this));return $.typeName=z.typeName,$},z.prototype.restoreState=function($){var ie=$;this.bgColor=ie.bgColor,this.tipPosition=ie.tipPosition,ae.prototype.restoreState.call(this,$),this.createTip(),this.setTipPoints()},z.prototype.scale=function($,ie){ae.prototype.scale.call(this,$,ie),this.tipPosition={x:this.tipPosition.x*$,y:this.tipPosition.y*ie},this.positionTip()},z.typeName="CalloutMarker",z.title="Callout marker",z.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',z}(lt),$e=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.fillColor="transparent",se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.opacity=1,se.strokeColor=de.defaultColor,se.strokeWidth=de.defaultStrokeWidth,se.strokeDasharray=de.defaultStrokeDasharray,se.fillColor=de.defaultFillColor,se.setStrokeColor=se.setStrokeColor.bind(se),se.setFillColor=se.setFillColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.setOpacity=se.setOpacity.bind(se),se.createVisual=se.createVisual.bind(se),se.strokePanel=new be("Line color",ue(de.defaultColorSet,["transparent"]),de.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.fillPanel=new be("Fill color",ue(de.defaultColorSet,["transparent"]),se.fillColor,Ne),se.fillPanel.onColorChanged=se.setFillColor,se.strokeWidthPanel=new ct("Line width",de.defaultStrokeWidths,de.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new ht("Line style",de.defaultStrokeDasharrays,de.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se.opacityPanel=new Se("Opacity",de.defaultOpacitySteps,se.opacity),se.opacityPanel.onOpacityChanged=se.setOpacity,se}return ye(z,ae),z.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.visual)},z.prototype.createVisual=function(){this.visual=le.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},z.prototype.pointerDown=function($,ie){ae.prototype.pointerDown.call(this,$,ie),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},z.prototype.manipulate=function($){ae.prototype.manipulate.call(this,$)},z.prototype.resize=function($){ae.prototype.resize.call(this,$),this.setSize()},z.prototype.setSize=function(){ae.prototype.setSize.call(this),le.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},z.prototype.pointerUp=function($){ae.prototype.pointerUp.call(this,$),this.setSize()},z.prototype.setStrokeColor=function($){this.strokeColor=$,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged($),this.stateChanged()},z.prototype.setFillColor=function($){this.fillColor=$,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged($),this.stateChanged()},z.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},z.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.visual&&le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},z.prototype.setOpacity=function($){this.opacity=$,this.visual&&le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ae.prototype.getState.call(this));return $.typeName=z.typeName,$},z.prototype.restoreState=function($){var ie=$;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),ae.prototype.restoreState.call(this,$),this.setSize()},z.prototype.scale=function($,ie){ae.prototype.scale.call(this,$,ie),this.setSize()},z.typeName="EllipseMarker",z.title="Ellipse marker",z.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',z}(nt),bt=function(ae){function z($,ie,de){return ae.call(this,$,ie,de)||this}return ye(z,ae),Object.defineProperty(z.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),z.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.tip1&&$!==this.tip2)},z.prototype.createTips=function(){this.tip1=le.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.tip1),this.tip2=le.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.tip2)},z.prototype.pointerDown=function($,ie){ae.prototype.pointerDown.call(this,$,ie),this.state==="creating"&&this.createTips()},z.prototype.adjustVisual=function(){if(ae.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(le.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var $=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ie=this.tip1.transform.baseVal.getItem(0);ie.setRotate($,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ie,0);var de=this.tip2.transform.baseVal.getItem(0);de.setRotate($+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(de,0)}},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=ae.prototype.getState.call(this);return $.typeName=z.typeName,$},z.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$),this.createTips(),this.adjustVisual()},z.typeName="MeasurementMarker",z.title="Measurement marker",z.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',z}(ft),gt=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.strokePanel.colors=de.defaultColorSet,se.fillColor="transparent",se}return ye(z,ae),Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=ae.prototype.getState.call(this);return $.typeName=z.typeName,$},z.typeName="EllipseFrameMarker",z.title="Ellipse frame marker",z.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',z}($e),Ut=function(){function ae(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ae.prototype.addUndoStep=function(z){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(z)||(this.undoStack.push(z),JSON.stringify(this.lastRedoStep)!==JSON.stringify(z)&&this.redoStack.splice(0,this.redoStack.length))},ae.prototype.replaceLastUndoStep=function(z){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=z)},ae.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ae.prototype.undo=function(){if(this.undoStack.length>1){var z=this.undoStack.pop();return z!==void 0&&this.redoStack.push(z),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ae.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ae}(),Nt=function(ae){function z($,ie,de){var se=ae.call(this,$,ie,de)||this;return se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.curveX=0,se.curveY=0,se.manipulationStartCurveX=0,se.manipulationStartCurveY=0,se.setStrokeColor=se.setStrokeColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.positionGrips=se.positionGrips.bind(se),se.addControlGrips=se.addControlGrips.bind(se),se.adjustVisual=se.adjustVisual.bind(se),se.setupControlBox=se.setupControlBox.bind(se),se.resize=se.resize.bind(se),se.strokeColor=de.defaultColor,se.strokeWidth=de.defaultStrokeWidth,se.strokeDasharray=de.defaultStrokeDasharray,se.strokePanel=new be("Line color",de.defaultColorSet,de.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new ct("Line width",de.defaultStrokeWidths,de.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new ht("Line style",de.defaultStrokeDasharrays,de.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return ye(z,ae),z.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorCurve&&$!==this.visibleCurve&&!this.curveGrip.ownsTarget($))},z.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},z.prototype.createVisual=function(){this.visual=le.createGroup(),this.selectorCurve=le.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=le.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},z.prototype.pointerDown=function($,ie){ae.prototype.pointerDown.call(this,$,ie),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=$.x,this.curveY=$.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ie)&&(this.activeGrip=this.curveGrip,this._state="resize")},z.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),le.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},z.prototype.setupControlBox=function(){ae.prototype.setupControlBox.call(this),this.curveControlLine1=le.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=le.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},z.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ae.prototype.addControlGrips.call(this)},z.prototype.positionGrips=function(){ae.prototype.positionGrips.call(this);var $=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-$/2,this.curveY-$/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},z.prototype.manipulate=function($){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+$.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+$.y-this.manipulationStartY),ae.prototype.manipulate.call(this,$)},z.prototype.resize=function($){this.activeGrip===this.curveGrip&&(this.curveX=$.x,this.curveY=$.y),ae.prototype.resize.call(this,$),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},z.prototype.setStrokeColor=function($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},z.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},z.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.adjustVisual()},z.prototype.scale=function($,ie){this.curveX=this.curveX*$,this.curveY=this.curveY*ie,ae.prototype.scale.call(this,$,ie)},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ae.prototype.getState.call(this));return $.typeName=z.typeName,$},z.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$);var ie=$;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.curveX=ie.curveX,this.curveY=ie.curveY,this.createVisual(),this.adjustVisual()},z.typeName="CurveMarker",z.title="Curve marker",z.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',z}(tt),hr=function(){function ae(z,$){$===void 0&&($=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=z,this.cancelable=$}return Object.defineProperty(ae.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ae.prototype.preventDefault=function(){this._defaultPrevented=!0},ae}(),mr=function(ae){function z($,ie,de){var se=ae.call(this,$,!1)||this;return se.dataUrl=ie,se.state=de,se}return ye(z,ae),z}(hr),St=function(ae){function z($,ie,de){de===void 0&&(de=!1);var se=ae.call(this,$,de)||this;return se.marker=ie,se}return ye(z,ae),z}(hr),Yr=function(){function ae(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return ae.prototype.addEventListener=function(z,$){this[z].push($)},ae.prototype.removeEventListener=function(z,$){var ie=this[z].indexOf($);ie>-1&&this[z].splice(ie,1)},ae}(),Jr=function(){function ae(z){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Re,this._isOpen=!1,this.undoRedoManager=new Ut,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Yr,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ae.instanceCounter++,this.styles=new te(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=z,this.targetRoot=document.body,this.width=z.clientWidth,this.height=z.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(ae.prototype,"ALL_MARKER_TYPES",{get:function(){return[He,Ue,Ie,lt,gt,$e,ke,et,bt,Ce,ft,Nt]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[He,Ue,Ie,lt,$e,ke,et]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"BASIC_MARKER_TYPES",{get:function(){return[He,Ue,Ie,lt,ke]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(z){var $=this;this._availableMarkerTypes.splice(0),z.forEach(function(ie){if(typeof ie=="string"){var de=$.ALL_MARKER_TYPES.find(function(se){return se.typeName===ie});de!==void 0&&$._availableMarkerTypes.push(de)}else $._availableMarkerTypes.push(ie)})},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(z){this._zoomLevel=z,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ae.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),re.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ae.prototype.show=function(){var z=this;this.styles.styleSheetRoot===void 0&&ee.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ee.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function($){return $(new hr(z))})},ae.prototype.render=function(){return Oe(this,void 0,void 0,function(){var z;return xe(this,function($){switch($.label){case 0:return this.setCurrentMarker(),(z=new pe).naturalSize=this.renderAtNaturalSize,z.imageType=this.renderImageType,z.imageQuality=this.renderImageQuality,z.markersOnly=this.renderMarkersOnly,z.width=this.renderWidth,z.height=this.renderHeight,[4,z.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return $.sent(),[4,z.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,$.sent()]}})})},ae.prototype.close=function(z){var $=this;if(z===void 0&&(z=!1),this.isOpen){var ie=!1;z||this.eventListeners.beforeclose.forEach(function(de){var se=new hr($,!0);de(se),se.defaultPrevented&&(ie=!0)}),ie||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(de){return de(new hr($))}),this.detachEvents(),this._isOpen=!1)}},ae.prototype.addMarkersToToolbar=function(){for(var z,$=[],ie=0;ie<arguments.length;ie++)$[ie]=arguments[ie];(z=this._availableMarkerTypes).push.apply(z,$)},ae.prototype.addRenderEventListener=function(z){this.addEventListener("render",function($){z($.dataUrl,$.state)})},ae.prototype.removeRenderEventListener=function(z){},ae.prototype.addCloseEventListener=function(z){this.addEventListener("close",function(){z()})},ae.prototype.removeCloseEventListener=function(z){},ae.prototype.setupResizeObserver=function(){var z=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){z.resize(z.target.clientWidth,z.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return z.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ae.prototype.onPopupTargetResize=function(){var z=1*this.target.clientWidth/this.target.clientHeight,$=this.editorCanvas.clientWidth/z>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*z:this.editorCanvas.clientWidth,ie=$<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/z;this.resize($,ie)},ae.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ae.prototype.resize=function(z,$){this._isResizing=!0;var ie=z/this.imageWidth,de=$/this.imageHeight;this.imageWidth=Math.round(z),this.imageHeight=Math.round($),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(ie,de),this._isResizing=!1},ae.prototype.scaleMarkers=function(z,$){var ie,de=this;this._currentMarker&&this._currentMarker instanceof lt?this._currentMarker.scale(z,$):(ie=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(se){se!==de._currentMarker&&se.scale(z,$)}),ie!==void 0&&this.setCurrentMarker(ie)},ae.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},ae.prototype.setTopLeft=function(){var z=this.editingTarget.getBoundingClientRect(),$=this.editorCanvas.getBoundingClientRect();this.left=z.left-$.left,this.top=z.top-$.top},ae.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},ae.prototype.addDefs=function(){for(var z,$=[],ie=0;ie<arguments.length;ie++)$[ie]=arguments[ie];this.defs=le.createDefs(),this.addDefsToImage(),(z=this.defs).append.apply(z,$)},ae.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ae.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},ae.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ae.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ae.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},ae.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ae.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},ae.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var z=document.createElement("a");z.href="https://markerjs.com/",z.target="_blank",z.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',z.title="Powered by marker.js",z.style.display="grid",z.style.alignItems="center",z.style.justifyItems="center",z.style.padding="3px",z.style.width="20px",z.style.height="20px",this.logoUI.appendChild(z),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ae.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},ae.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},ae.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ae.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var z=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=z+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Q(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new V(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ae.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ae.prototype.removeMarker=function(z){this.markerImage.removeChild(z.container),this.markers.indexOf(z)>-1&&this.markers.splice(this.markers.indexOf(z),1),z.dispose()},ae.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},ae.prototype.toolbarButtonClicked=function(z,$){if(z==="marker"&&$!==void 0)this.createNewMarker($);else if(z==="action")switch($){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},ae.prototype.deleteSelectedMarker=function(){var z=this;if(this._currentMarker!==void 0){var $=!1;if(this.eventListeners.markerbeforedelete.forEach(function(de){var se=new St(z,z._currentMarker,!0);de(se),se.defaultPrevented&&($=!0)}),!$){var ie=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(de){return de(new St(z,ie))})}}},ae.prototype.clear=function(){var z=this,$=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ke){var Rt=new St(z,void 0,!0);Ke(Rt),Rt.defaultPrevented&&($=!0)}),!$)){this.setCurrentMarker();for(var ie=function(Ke){var Rt=de.markers[Ke];de.setCurrentMarker(de.markers[Ke]),de._currentMarker.dispose(),de.markerImage.removeChild(de._currentMarker.container),de.markers.splice(de.markers.indexOf(de._currentMarker),1),de.eventListeners.markerdelete.forEach(function(Vt){return Vt(new St(z,Rt))})},de=this,se=this.markers.length-1;se>=0;se--)ie(se);this.addUndoStep()}},Object.defineProperty(ae.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ae.prototype.showNotesEditor=function(){var z;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(z=this._currentMarker.notes)!==null&&z!==void 0?z:"",this.overlayContainer.appendChild(this.notesArea))},ae.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},ae.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ae.prototype.addUndoStep=function(){var z=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var $=this.getState(),ie=this.undoRedoManager.getLastUndoStep();if(!ie||ie.width===$.width&&ie.height===$.height){var de=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep($),de<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(se){return se(new hr(z))})}else this.undoRedoManager.replaceLastUndoStep($),this.eventListeners.statechange.forEach(function(se){return se(new hr(z))})}},ae.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ae.prototype.undoStep=function(){var z=this,$=this.undoRedoManager.undo();$!==void 0&&(this.restoreState($),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ie){return ie(new hr(z))}))},ae.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ae.prototype.redoStep=function(){var z=this,$=this.undoRedoManager.redo();$!==void 0&&(this.restoreState($),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ie){return ie(new hr(z))}))},ae.prototype.stepZoom=function(){var z=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=z<this.zoomSteps.length-1?this.zoomSteps[z+1]:this.zoomSteps[0]},ae.prototype.panTo=function(z){this.contentDiv.scrollBy({left:this.prevPanPoint.x-z.x,top:this.prevPanPoint.y-z.y}),this.prevPanPoint=z},ae.prototype.startRenderAndClose=function(){return Oe(this,void 0,void 0,function(){var z,$,ie=this;return xe(this,function(de){switch(de.label){case 0:return[4,this.render()];case 1:return z=de.sent(),$=this.getState(),this.eventListeners.render.forEach(function(se){return se(new mr(ie,z,$))}),this.close(!0),[2]}})})},ae.prototype.getState=function(z){z===!0&&this.setCurrentMarker();var $={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(ie){return $.markers.push(ie.getState())}),$},ae.prototype.restoreState=function(z){var $=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);z.markers.forEach(function(ie){var de=$._availableMarkerTypes.find(function(Ke){return Ke.typeName===ie.typeName});if(de!==void 0){var se=$.addNewMarker(de);se.restoreState(ie),$.markers.push(se)}}),z.width&&z.height&&(z.width!==this.imageWidth||z.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/z.width,this.imageHeight/z.height),this.eventListeners.restorestate.forEach(function(ie){return ie(new hr($))})},ae.prototype.addNewMarker=function(z){var $=le.createGroup();return this.markerImage.appendChild($),new z($,this.overlayContainer,this.settings)},ae.prototype.createNewMarker=function(z){var $,ie=this;($=typeof z=="string"?this._availableMarkerTypes.find(function(de){return de.typeName===z}):z)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker($),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton($.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(de){return de(new St(ie,ie._currentMarker))}))},ae.prototype.markerCreated=function(z){var $=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(z),this.setCurrentMarker(z),z instanceof Ue&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ue):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(ie){return ie(new St($,$._currentMarker))})},ae.prototype.colorChanged=function(z){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=z,this.settings.defaultStrokeColor=z)},ae.prototype.fillColorChanged=function(z){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=z)},ae.prototype.markerStateChanged=function(z){var $=this;this.eventListeners.markerchange.forEach(function(ie){return ie(new St($,z))})},ae.prototype.setCurrentMarker=function(z){var $=this;this._currentMarker!==z&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(ie){return ie(new St($,$._currentMarker))})),this._currentMarker=z,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(ie){return ie(new St($,$._currentMarker))}))},ae.prototype.onPointerDown=function(z){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||z.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var $=this.markers.find(function(ie){return ie.ownsTarget(z.target)});$!==void 0?(this.setCurrentMarker($),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(z.clientX,z.clientY),z.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:z.clientX,y:z.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(z.clientX,z.clientY))},ae.prototype.onDblClick=function(z){if(this._isFocused||this.focus(),this.mode==="select"){var $=this.markers.find(function(ie){return ie.ownsTarget(z.target)});$!==void 0&&$!==this._currentMarker&&this.setCurrentMarker($),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(z.clientX,z.clientY),z.target):this.setCurrentMarker()}},ae.prototype.onPointerMove=function(z){this.touchPoints!==1&&z.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||z.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(z.clientX,z.clientY)):this.zoomLevel>1&&this.panTo({x:z.clientX,y:z.clientY}))},ae.prototype.onPointerUp=function(z){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(z.clientX,z.clientY)),this.isDragging=!1,this.addUndoStep()},ae.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ae.prototype.onKeyUp=function(z){this._currentMarker===void 0||this.notesArea!==void 0||z.key!=="Delete"&&z.key!=="Backspace"||this.deleteSelectedMarker()},ae.prototype.clientToLocalCoordinates=function(z,$){var ie=this.markerImage.getBoundingClientRect();return{x:(z-ie.left)/this.zoomLevel,y:($-ie.top)/this.zoomLevel}},ae.prototype.onWindowResize=function(){this.positionUI()},ae.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var z=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=z+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},ae.prototype.addLicenseKey=function(z){re.addKey(z)},ae.prototype.addEventListener=function(z,$){this.eventListeners.addEventListener(z,$)},ae.prototype.removeEventListener=function(z,$){this.eventListeners.removeEventListener(z,$)},ae.prototype.renderState=function(z){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(z),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ae.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ae.prototype.focus=function(){var z=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function($){return $(new hr(z))}))},ae.prototype.blur=function(){var z=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function($){return $(new hr(z))}))},ae.instanceCounter=0,ae}();/* **********************************
|
|
|
cropro version 1.2.0
|
|
|
@license SEE LICENSE IN LICENSE
|
|
|
|
|
|
copyright Alan Mendelevich
|
|
|
see README and LICENSE for details
|
|
|
********************************** *//*! *****************************************************************************
|
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
purpose with or without fee is hereby granted.
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
|
***************************************************************************** */var Hr=function(ae,z){return(Hr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,ie){$.__proto__=ie}||function($,ie){for(var de in ie)Object.prototype.hasOwnProperty.call(ie,de)&&($[de]=ie[de])})(ae,z)};function un(ae,z){if(typeof z!="function"&&z!==null)throw new TypeError("Class extends value "+String(z)+" is not a constructor or null");function $(){this.constructor=ae}Hr(ae,z),ae.prototype=z===null?Object.create(z):($.prototype=z.prototype,new $)}function Ar(ae,z,$,ie){return new($||($=Promise))(function(de,se){function Ke(Er){try{Vt(ie.next(Er))}catch(Lt){se(Lt)}}function Rt(Er){try{Vt(ie.throw(Er))}catch(Lt){se(Lt)}}function Vt(Er){var Lt;Er.done?de(Er.value):(Lt=Er.value,Lt instanceof $?Lt:new $(function(zr){zr(Lt)})).then(Ke,Rt)}Vt((ie=ie.apply(ae,z||[])).next())})}function vn(ae,z){var $,ie,de,se,Ke={label:0,sent:function(){if(1&de[0])throw de[1];return de[1]},trys:[],ops:[]};return se={next:Rt(0),throw:Rt(1),return:Rt(2)},typeof Symbol=="function"&&(se[Symbol.iterator]=function(){return this}),se;function Rt(Vt){return function(Er){return function(Lt){if($)throw new TypeError("Generator is already executing.");for(;Ke;)try{if($=1,ie&&(de=2&Lt[0]?ie.return:Lt[0]?ie.throw||((de=ie.return)&&de.call(ie),0):ie.next)&&!(de=de.call(ie,Lt[1])).done)return de;switch(ie=0,de&&(Lt=[2&Lt[0],de.value]),Lt[0]){case 0:case 1:de=Lt;break;case 4:return Ke.label++,{value:Lt[1],done:!1};case 5:Ke.label++,ie=Lt[1],Lt=[0];continue;case 7:Lt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(de=Ke.trys,(de=de.length>0&&de[de.length-1])||Lt[0]!==6&&Lt[0]!==2)){Ke=0;continue}if(Lt[0]===3&&(!de||Lt[1]>de[0]&&Lt[1]<de[3])){Ke.label=Lt[1];break}if(Lt[0]===6&&Ke.label<de[1]){Ke.label=de[1],de=Lt;break}if(de&&Ke.label<de[2]){Ke.label=de[2],Ke.ops.push(Lt);break}de[2]&&Ke.ops.pop(),Ke.trys.pop();continue}Lt=z.call(ae,Ke)}catch(zr){Lt=[6,zr],ie=0}finally{$=de=0}if(5&Lt[0])throw Lt[1];return{value:Lt[0]?Lt[1]:void 0,done:!0}}([Vt,Er])}}}var mn=function(){function ae(){}return ae.addKey=function(z){ae.key=z},Object.defineProperty(ae,"isLicensed",{get:function(){return!!ae.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ae.key)},enumerable:!1,configurable:!0}),ae}(),Kt=function(){function ae(){}return ae.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ae.setAttributes=function(z,$){for(var ie=0,de=$;ie<de.length;ie++){var se=de[ie],Ke=se[0],Rt=se[1];z.setAttribute(Ke,Rt)}},ae.createRect=function(z,$,ie){var de=document.createElementNS("http://www.w3.org/2000/svg","rect");return de.setAttribute("width",z.toString()),de.setAttribute("height",$.toString()),ie&&ae.setAttributes(de,ie),de},ae.createLine=function(z,$,ie,de,se){var Ke=document.createElementNS("http://www.w3.org/2000/svg","line");return Ke.setAttribute("x1",z.toString()),Ke.setAttribute("y1",$.toString()),Ke.setAttribute("x2",ie.toString()),Ke.setAttribute("y2",de.toString()),se&&ae.setAttributes(Ke,se),Ke},ae.createPolygon=function(z,$){var ie=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ie.setAttribute("points",z),$&&ae.setAttributes(ie,$),ie},ae.createCircle=function(z,$){var ie=document.createElementNS("http://www.w3.org/2000/svg","circle");return ie.setAttribute("cx",(z/2).toString()),ie.setAttribute("cy",(z/2).toString()),ie.setAttribute("r",z.toString()),$&&ae.setAttributes(ie,$),ie},ae.createEllipse=function(z,$,ie){var de=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return de.setAttribute("cx",(z/2).toString()),de.setAttribute("cy",($/2).toString()),de.setAttribute("rx",(z/2).toString()),de.setAttribute("ry",($/2).toString()),ie&&ae.setAttributes(de,ie),de},ae.createGroup=function(z){var $=document.createElementNS("http://www.w3.org/2000/svg","g");return z&&ae.setAttributes($,z),$},ae.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ae.createMarker=function(z,$,ie,de,se,Ke,Rt){var Vt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ae.setAttributes(Vt,[["id",z],["orient",$],["markerWidth",ie.toString()],["markerHeight",de.toString()],["refX",se.toString()],["refY",Ke.toString()]]),Vt.appendChild(Rt),Vt},ae.createText=function(z){var $=document.createElementNS("http://www.w3.org/2000/svg","text");return $.setAttribute("x","0"),$.setAttribute("y","0"),z&&ae.setAttributes($,z),$},ae.createTSpan=function(z,$){var ie=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ie.textContent=z,$&&ae.setAttributes(ie,$),ie},ae.createImage=function(z){var $=document.createElementNS("http://www.w3.org/2000/svg","image");return z&&ae.setAttributes($,z),$},ae.createPoint=function(z,$){var ie=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ie.x=z,ie.y=$,ie},ae.createPath=function(z,$){var ie=document.createElementNS("http://www.w3.org/2000/svg","path");return ie.setAttribute("d",z),$&&ae.setAttributes(ie,$),ie},ae.createElement=function(z,$){var ie=document.createElementNS("http://www.w3.org/2000/svg",z);return $&&ae.setAttributes(ie,$),ie},ae.getHollowRectanglePath=function(z,$,ie,de,se,Ke,Rt,Vt){return"M"+z+","+$+"V"+($+de)+"H"+(z+ie)+"V"+$+"H"+se+"V"+Ke+"H"+(se+Rt)+"V"+(Ke+Vt)+"H"+se+"V"+$+"Z"},ae}(),or=function(){function ae(z){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+z+"_"}return Object.defineProperty(ae.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),ae.prototype.addClass=function(z){return this.styleSheet===void 0&&this.addStyleSheet(),z.name=""+this.classNamePrefix+z.localName,this.classes.push(z),this.styleSheet.sheet.insertRule("."+z.name+" {"+z.style+"}",this.styleSheet.sheet.cssRules.length),z},ae.prototype.addRule=function(z){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(z),this.styleSheet.sheet.insertRule(z.selector+" {"+z.style+"}",this.styleSheet.sheet.cssRules.length)},ae.prototype.addStyleSheet=function(){var z;this.styleSheet=document.createElement("style"),((z=this.styleSheetRoot)!==null&&z!==void 0?z:document.head).appendChild(this.styleSheet),this.addRule(new Xt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Xt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new Xt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new gr("_fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new gr("_fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},ae.prototype.removeStyleSheet=function(){var z;this.styleSheet&&(((z=this.styleSheetRoot)!==null&&z!==void 0?z:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ae}(),Xt=function(ae,z){this.selector=ae,this.style=z},gr=function(ae,z){this.localName=ae,this.style=z},Xr=function(){function ae(){this.blocks=[],this.display=""}return ae.prototype.addButtonBlock=function(z){z.className=this.blockClassName,z.buttonClassName=this.buttonClassName,z.buttonColorsClassName=this.buttonColorsClassName,z.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(z)},ae.prototype.addElementBlock=function(z){z.className===void 0&&(z.className=this.blockClassName),this.blocks.push(z)},ae.prototype.getUI=function(){var z=document.createElement("div");return z.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,z.style.display=this.display,this.blocks.forEach(function($){return z.appendChild($.getUI())}),z},ae}(),kn=function(){function ae(){}return ae.prototype.getUI=function(){var z=document.createElement("div");if(z.className=this.className,this.minWidth!==void 0&&(z.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":z.style.justifyContent="flex-start";break;case"center":z.style.justifyContent="center";break;case"end":z.style.justifyContent="flex-end"}return z.style.whiteSpace="nowrap",z},ae}(),Ln=function(ae){function z(){var $=ae!==null&&ae.apply(this,arguments)||this;return $.buttons=[],$}return un(z,ae),z.prototype.addButton=function($){$.className=this.buttonClassName,$.colorsClassName=this.buttonColorsClassName,$.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push($)},z.prototype.getUI=function(){var $=ae.prototype.getUI.call(this);return this.buttons.forEach(function(ie){return $.appendChild(ie.getUI())}),$},z}(kn),tn=function(){function ae(z,$){this._isActive=!1,this._isHidden=!1,this._icon=z,this.title=$,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(ae.prototype,"icon",{get:function(){return this._icon},set:function(z){this._icon=z,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isActive",{get:function(){return this._isActive},set:function(z){this._isActive=z,this.adjustClassName()},enumerable:!1,configurable:!0}),ae.prototype.getUI=function(){var z=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return z.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},ae.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},ae.prototype.hide=function(){this._isHidden=!0},ae}(),ur=function(ae){function z(){var $=ae!==null&&ae.apply(this,arguments)||this;return $.elements=[],$}return un(z,ae),z.prototype.addElement=function($){this.elements.push($)},z.prototype.getUI=function(){var $=ae.prototype.getUI.call(this);return this.elements.forEach(function(ie){return $.appendChild(ie)}),$},z}(kn),Xn=function(){function ae(z,$){this.horizontal=z,this.vertical=$}return Object.defineProperty(ae.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),ae.prototype.getVerticalLength=function(z){return z/this.ratio},ae.prototype.getHorizontalLength=function(z){return z*this.ratio},ae}(),hi=function(){function ae(){}return ae.getIcon=function(z,$){if(z>0&&$>0){var ie=new Xn(z,$),de=ie.ratio>=1?20:ie.getHorizontalLength(20),se=ie.ratio<1?20:ie.getVerticalLength(20),Ke=document.createElementNS("http://www.w3.org/2000/svg","svg");Ke.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ke.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ke);var Rt=Kt.createDefs();Ke.appendChild(Rt);var Vt=Kt.createElement("clipPath",[["id","text-bg-clip"]]);Rt.appendChild(Vt);var Er=Kt.createPath(Kt.getHollowRectanglePath((24-de)/2,(24-se)/2,de,se,(24-de)/2+2,(24-se)/2+2,de-4,se-4));Ke.appendChild(Er);var Lt=Kt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Lt.appendChild(Kt.createTSpan(z+":"+$)),Ke.appendChild(Lt);var zr=Lt.getBBox();Kt.setAttributes(Lt,[["x",((24-zr.width)/2).toString()],["y",((24-zr.height)/2-zr.y).toString()]]);var Br=Kt.createPath(Kt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(zr.width))/2,(24-Math.ceil(zr.height))/2,Math.ceil(zr.width),Math.ceil(zr.height)));return Vt.appendChild(Br),Kt.setAttributes(Er,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ke),Ke.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},ae}(),$n=function(ae){function z($,ie,de){var se=ae.call(this,$,ie)||this;return se.isDropdownOpen=!1,se.onClick=se.dropdownButtonClicked,se.dropdownButtons=de,se}return un(z,ae),z.prototype.setupDropdown=function(){var $=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ie){ie.className=$.className,ie.colorsClassName=$.colorsClassName,$.dropdownBlock.appendChild(ie.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},z.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},z.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},z.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},z.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},z.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},z}(tn),Zr=function(){function ae(z,$){this.GRIP_SIZE=10,this.color=z,this.fillColor=$,this.visual=Kt.createGroup(),this.visual.appendChild(Kt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Kt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ae.prototype.ownsTarget=function(z){return z===this.visual||z===this.visual.childNodes[0]||z===this.visual.childNodes[1]},ae.prototype.setCenter=function(z,$){this.visual.childNodes.forEach(function(ie){return Kt.setAttributes(ie,[["cx",z.toString()],["cy",$.toString()]])})},ae}(),Bn=function(){function ae(z,$,ie,de){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=z,this.canvasHeight=$,this.margin=ie,this.container=de,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(ae.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(z){this._aspectRatio=z,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(z){this._isGridVisible=z,this.gridContainer&&Kt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(z){this._zoomFactor=z,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),ae.prototype.open=function(){var z=this;this.cropShadeElement=Kt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Kt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var $=0;$<this.numberOfGridLines;$++)this.horizontalGridLines.push(Kt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Kt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(ie){return z.gridContainer.appendChild(ie)}),this.verticalGridLines.forEach(function(ie){return z.gridContainer.appendChild(ie)}),this.cropRectElement=Kt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Zr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Zr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Zr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Zr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},ae.prototype.setCropRectangle=function(z){this.cropRect=z;var $=Object.assign({},this.cropRect);this.zoomFactor!==1&&($.width=this.cropRect.width*this.zoomFactor,$.height=this.cropRect.height*this.zoomFactor,$.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-$.width/2,$.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-$.height/2),Kt.setAttributes(this.cropRectElement,[["x",$.x.toString()],["y",$.y.toString()],["width",$.width.toString()],["height",$.height.toString()]]);var ie=$.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(se,Ke){var Rt=$.y+ie*(Ke+1);Kt.setAttributes(se,[["x1",""+$.x],["y1",""+Rt],["x2",""+($.x+$.width)],["y2",""+Rt]])});var de=$.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(se,Ke){var Rt=$.x+de*(Ke+1);Kt.setAttributes(se,[["x1",""+Rt],["y1",""+$.y],["x2",""+Rt],["y2",""+($.y+$.height)]])}),Kt.setAttributes(this.cropShadeElement,[["d",Kt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,$.x,$.y,$.width,$.height)]]),this.topLeftGrip.setCenter($.x,$.y),this.topRightGrip.setCenter($.x+$.width,$.y),this.bottomLeftGrip.setCenter($.x,$.y+$.height),this.bottomRightGrip.setCenter($.x+$.width,$.y+$.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},ae.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},ae.prototype.clientToLocalCoordinates=function(z,$){var ie=this.container.getBoundingClientRect();return{x:z-ie.left+this.margin,y:$-ie.top+this.margin}},ae.prototype.onPointerDown=function(z){this.container.setPointerCapture(z.pointerId),this.previousPoint=this.clientToLocalCoordinates(z.clientX,z.clientY),this.cropRectElement===z.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(z.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(z.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(z.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(z.target)&&(this.activeGrip=this.bottomRightGrip)},ae.prototype.onPointerMove=function(z){if(this.isMoving)this.move(this.clientToLocalCoordinates(z.clientX,z.clientY));else if(this.activeGrip){var $=this.clientToLocalCoordinates(z.clientX,z.clientY);this.resize($)}z.preventDefault()},ae.prototype.onPointerUp=function(z){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(z.pointerId)},ae.prototype.move=function(z){var $=z.x-this.previousPoint.x,ie=z.y-this.previousPoint.y;this.zoomFactor!==1&&($=-$/this.zoomFactor,ie=-ie/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+$),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ie),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=z},ae.prototype.resize=function(z){var $=Object.assign({},this.cropRect),ie=z.x-this.previousPoint.x,de=z.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:$.x+ie<this.margin&&(ie=this.margin-$.x),$.x+=ie,$.width=this.cropRect.x+this.cropRect.width-$.x;break;case this.bottomRightGrip:case this.topRightGrip:$.width+ie>this.canvasWidth*this.zoomFactor&&(ie=this.canvasWidth*this.zoomFactor-$.width),$.width+=ie}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?($.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ie),$.height=this.aspectRatio.getVerticalLength($.width)):($.y+=de,$.height=this.cropRect.y+this.cropRect.height-$.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?$.height=this.aspectRatio.getVerticalLength($.width):$.height+=de}$.width<10&&($.x=this.cropRect.x,$.width=10),$.height<10&&($.y=this.cropRect.y,$.height=10),this.previousPoint=z,$.x>=this.margin&&$.y>=this.margin&&$.x-this.margin+$.width<=this.canvasWidth&&$.y-this.margin+$.height<=this.canvasHeight&&(this.cropRect=$,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},ae.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var z=this.cropRect.x+this.cropRect.width/2,$=this.cropRect.y+this.cropRect.height/2,ie=this.aspectRatio.getHorizontalLength(this.cropRect.height),de=this.aspectRatio.getVerticalLength(this.cropRect.width);ie/this.canvasWidth<de/this.canvasHeight?this.cropRect.width=ie:this.cropRect.height=de,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=z-this.cropRect.width/2,this.cropRect.y=$-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},ae.prototype.getRescaledRect=function(z,$,ie,de,se,Ke){var Rt=ie/z,Vt=de/$;return{x:(se.x-Ke)*Rt+Ke,y:(se.y-Ke)*Vt+Ke,width:se.width*Rt,height:se.height*Vt}},ae.prototype.scaleCanvas=function(z,$){var ie=this.getRescaledRect(this.canvasWidth,this.canvasHeight,z,$,this.cropRect,this.margin);this.canvasWidth=z,this.canvasHeight=$,this.onCropChange&&this.onCropChange(ie),this.setCropRectangle(ie)},ae}(),si=function(){function ae(z){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=z,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(ae.prototype,"angle",{get:function(){return this._angle},set:function(z){this._angle=z,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),ae.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},ae.prototype.onPointerDown=function(z){this.controlContainer.setPointerCapture(z.pointerId),this.isDragging=!0,this.previousPoint={x:z.clientX,y:z.clientY}},ae.prototype.onPointerMove=function(z){this.isDragging&&(this.onAngleChange&&this.onAngleChange((z.clientX-this.previousPoint.x)/5),this.previousPoint.x=z.clientX)},ae.prototype.onPointerUp=function(z){this.isDragging&&this.onAngleChange&&this.onAngleChange((z.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(z.pointerId)},ae.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var z=this.angleLabelText.getBBox();Kt.setAttributes(this.angleLabelElement,[["x",((this.width-z.width)/2).toString()],["y",(this.height/2).toString()]])}},ae.prototype.positionScaleShape=function(){if(this.scaleShape){var z=this.scaleShape.transform.baseVal.getItem(0);z.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(z,0)}},ae.prototype.getVisual=function(){var z=document.createElementNS("http://www.w3.org/2000/svg","svg");z.setAttribute("xmlns","http://www.w3.org/2000/svg"),z.setAttribute("width",this.width+"px"),z.setAttribute("height",this.height+"px"),z.setAttribute("viewBox","0 0 "+this.width+" "+this.height),z.style.flexShrink="0",document.body.appendChild(z);for(var $="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ie=1;ie<=this.width/5+10;ie++){var de=ie%5==0?this.height/3:this.height/6;$+="h4v"+-de+"h1v"+de}$+="v1H0Z",this.scaleShape=Kt.createPath($);var se=Kt.createTransform();this.scaleShape.transform.baseVal.appendItem(se),z.appendChild(this.scaleShape),this.angleLabelElement=Kt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Kt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ke=Kt.createTSpan("");return Ke.innerHTML="°",this.angleLabelElement.appendChild(Ke),z.appendChild(this.angleLabelElement),document.body.removeChild(z),z},ae}(),li=function(){function ae(){this.naturalSize=!1,this.imageType="image/png"}return ae.prototype.rasterize=function(z,$,ie,de,se,Ke,Rt){var Vt=this;return new Promise(function(Er){var Lt=document.createElement("canvas");Lt.width=z.width.baseVal.value-2*de,Lt.height=z.height.baseVal.value-2*de;var zr=1,Br=1;Vt.naturalSize===!0?(zr=$.naturalWidth/(z.width.baseVal.value-2*de)/Ke,Br=$.naturalHeight/(z.height.baseVal.value-2*de)/Rt,Lt.width=$.naturalWidth/Ke,Lt.height=$.naturalHeight/Rt):Vt.width!==void 0&&Vt.height!==void 0&&(zr=Vt.width/ie.width,Br=Vt.height/ie.height,Lt.width*=zr,Lt.height*=Br);var En=Lt.getContext("2d");En.translate(Lt.width/2,Lt.height/2),En.rotate(se*Math.PI/180),En.scale(Ke,Rt),En.translate(-Lt.width/2,-Lt.height/2),En.drawImage($,0,0,Lt.width,Lt.height);var ui=document.createElement("canvas");ui.width=ie.width*zr,ui.height=ie.height*Br,ui.getContext("2d").putImageData(En.getImageData((ie.x-de)*zr,(ie.y-de)*Br,ie.width*zr,ie.height*Br),0,0),Er(ui.toDataURL(Vt.imageType,Vt.imageQuality))})},ae}(),wt=function(){function ae(z){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=ae.instanceCounter++,this.styles=new or(this.instanceNo),this.target=z,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(ae.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(z){this._zoomToCropEnabled=z,z?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(z){this._isGridVisible=z,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"gridLines",{get:function(){return this._gridLines},set:function(z){this._gridLines=z,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(z){this._rotationAngle=z,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"aspectRatio",{get:function(){var z;return(z=this._aspectRatio)!==null&&z!==void 0?z:this.aspectRatios[0]},set:function(z){this._aspectRatio=z},enumerable:!1,configurable:!0}),ae.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},ae.prototype.show=function(){this.showUI(),this.open()},ae.prototype.close=function(z){z===void 0&&(z=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),z||this.closeEventListeners.forEach(function($){return $()}),this._isOpen=!1)},ae.prototype.addRenderEventListener=function(z){this.renderEventListeners.push(z)},ae.prototype.removeRenderEventListener=function(z){this.renderEventListeners.indexOf(z)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(z),1)},ae.prototype.addCloseEventListener=function(z){this.closeEventListeners.push(z)},ae.prototype.removeCloseEventListener=function(z){this.closeEventListeners.indexOf(z)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(z),1)},ae.prototype.setupResizeObserver=function(){var z=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){z.resize(z.target.clientWidth,z.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},ae.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var z=1*this.target.clientWidth/this.target.clientHeight,$=this.contentDiv.clientWidth/z>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*z:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ie=$+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/z;this.resize($,ie)}},ae.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ae.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",Kt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},ae.prototype.resize=function(z,$){this.imageWidth=Math.round(z),this.imageHeight=Math.round($),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},ae.prototype.setEditingTarget=function(){var z=document.createElement("canvas");z.width=this.target.naturalWidth,z.height=this.target.naturalHeight,z.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var $=z.toDataURL();Kt.setAttributes(this.editingTarget,[["href",$]]),this.setEditingTargetSize()},ae.prototype.setTopLeft=function(){var z=this.target.getBoundingClientRect(),$=this.editorCanvas.getBoundingClientRect();this.left=z.left-$.left-this.CANVAS_MARGIN,this.top=z.top-$.top-this.CANVAS_MARGIN},ae.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=Kt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Kt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Kt.createGroup(),this.editingTargetRotationScaleContainer=Kt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var z=Kt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(z);var $=Kt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem($),this.editingTargetContainer=Kt.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},ae.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},ae.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=Kt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Bn(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},ae.prototype.zoomToCrop=function(){if(this.cropRect){var z=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,$=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=z+"px "+$+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-z+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-$+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},ae.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},ae.prototype.cropRectChanged=function(z){this.cropRect=z,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},ae.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},ae.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},ae.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ae.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var z=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,$=this.target.offsetTop>z+this.CANVAS_MARGIN?this.target.offsetTop-(z+this.CANVAS_MARGIN):0;this.coverDiv.style.top=$+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},ae.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},ae.prototype.addTopToolbar=function(){var z=this;this.topToolbar=new Xr,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var $=new Ln;$.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock($);var ie=[];this.aspectRatios.forEach(function(Br){var En=new tn(hi.getIcon(Br.horizontal,Br.vertical),Br.horizontal===0&&Br.vertical===0?"FREE":Br.horizontal+":"+Br.vertical);En.onClick=function(){return z.ratioButtonClicked(Br)},ie.push(En)}),this.aspectRatioButton=new $n(hi.getIcon(0,0),"Aspect ratio",ie),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,$.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var de=new tn('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");de.isActive=this.isGridVisible,de.onClick=function(){z.isGridVisible=!z.isGridVisible,de.isActive=z.isGridVisible},$.addButton(de);var se=new tn('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(se.isActive=this.zoomToCropEnabled,se.onClick=function(){z.zoomToCropEnabled=!z.zoomToCropEnabled,se.isActive=z.zoomToCropEnabled},$.addButton(se),!mn.isLicensed){var Ke=new ur;this.topToolbar.addElementBlock(Ke);var Rt=document.createElement("div");Rt.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Vt=document.createElement("a");Vt.style.color="currentColor",Vt.href="https://markerjs.com/products/cropro",Vt.target="_blank",Vt.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',Rt.appendChild(Vt),Ke.addElement(Rt)}var Er=new Ln;Er.minWidth=3*this.toolbarHeight+"px",Er.contentAlign="end",this.topToolbar.addButtonBlock(Er);var Lt=new tn('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");Lt.onClick=this.startRenderAndClose,Er.addButton(Lt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Lt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var zr=new tn('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");zr.onClick=this.close,Er.addButton(zr),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(zr.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},ae.prototype.addBottomToolbar=function(){var z=this;this.bottomToolbar=new Xr,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var $=new Ln;$.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock($);var ie=new tn('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");ie.onClick=this.rotateLeftButtonClicked,$.addButton(ie);var de=new tn('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");de.onClick=this.rotateRightButtonClicked,$.addButton(de);var se=new ur;se.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(se),this.straightener=new si("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(Er){z.rotateBy(Er),z.straightener.angle=z.rotationAngle},se.addElement(this.straightener.getUI());var Ke=new Ln;Ke.minWidth=2*this.toolbarHeight+"px",Ke.contentAlign="end",this.bottomToolbar.addButtonBlock(Ke);var Rt=new tn('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");Rt.onClick=this.flipHorizontallyButtonClicked,Ke.addButton(Rt);var Vt=new tn('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");Vt.onClick=this.flipVerticallyButtonClicked,Ke.addButton(Vt)},ae.prototype.ratioButtonClicked=function(z){this.aspectRatio=z,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},ae.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=hi.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},ae.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Xn(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},ae.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ae.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},ae.prototype.restoreState=function(z){if(z){var $=this.cropLayer.getRescaledRect(z.width,z.height,this.imageWidth,this.imageHeight,z.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle($),this.cropRectChanged($),this.flippedHorizontally=z.flippedHorizontally,this.flippedVertically=z.flippedVertically,this.applyFlip(),this.rotationAngle=z.rotationAngle,this.applyRotation()}},ae.prototype.clientToLocalCoordinates=function(z,$){var ie=this.cropImage.getBoundingClientRect();return{x:z-ie.left,y:$-ie.top}},ae.prototype.onWindowResize=function(){this.positionUI()},ae.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var z=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=z+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},ae.prototype.rotateLeftButtonClicked=function(){var z=this.rotationAngle-90;this.rotationAngle%90!=0&&(z+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(z)},ae.prototype.rotateRightButtonClicked=function(){var z=this.rotationAngle+90;this.rotationAngle%90!=0&&(z-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(z)},ae.prototype.rotateTo=function(z){z=(z=z>180?z-360:z)<=-180?z+360:z,this.rotationAngle=z,this.applyRotation()},ae.prototype.rotateBy=function(z){this.rotateTo((this.rotationAngle+z)%360)},ae.prototype.applyRotation=function(){var z=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var $=this.editingTargetRotationContainer.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem($,0);var ie=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ie.width,this.imageHeight/ie.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=z},ae.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},ae.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},ae.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},ae.prototype.startRenderAndClose=function(){return Ar(this,void 0,void 0,function(){var z,$;return vn(this,function(ie){switch(ie.label){case 0:return[4,this.render()];case 1:return z=ie.sent(),$=this.getState(),this.renderEventListeners.forEach(function(de){return de(z,$)}),this.close(!0),[2]}})})},ae.prototype.render=function(){return Ar(this,void 0,void 0,function(){var z;return vn(this,function($){switch($.label){case 0:return(z=new li).naturalSize=this.renderAtNaturalSize,z.imageType=this.renderImageType,z.imageQuality=this.renderImageQuality,z.width=this.renderWidth,z.height=this.renderHeight,this.unzoomFromCrop(),Kt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,z.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return $.sent(),[4,z.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,$.sent()]}})})},ae.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new gr("toolbar",`
|
|
|
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
overflow: hidden;
|
|
|
line-height: 0px;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new gr("toolbar_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new gr("toolbar-block",`
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
box-sizing: content-box;
|
|
|
`));var z=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new gr("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.toolbarHeight-2*z)+`px;
|
|
|
height: `+(this.toolbarHeight-2*z)+`px;
|
|
|
padding: `+z+`px;
|
|
|
cursor: default;
|
|
|
user-select: none;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new gr("toolbar_button_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new gr("toolbar_active_button",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
|
`)),this.styles.addRule(new Xt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new Xt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new gr("toolbar_dropdown",`
|
|
|
position: absolute;
|
|
|
max-width: `+4*this.toolbarHeight+`px;
|
|
|
z-index: 20;
|
|
|
white-space: normal;
|
|
|
box-sizing: content-box;
|
|
|
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
|
|
|
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
|
|
|
line-height: 0px;
|
|
|
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new gr("toolbar_dropdown_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new gr("toolbar_straightener_block",`
|
|
|
display: flex;
|
|
|
overflow: hidden;
|
|
|
justify-content: center;
|
|
|
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
|
|
|
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new gr("toolbar_straightener",`
|
|
|
display: flex;
|
|
|
overflow: hidden;
|
|
|
justify-content: center;
|
|
|
height: `+(this.toolbarHeight-2*z)+`px;
|
|
|
padding: `+z+`px;
|
|
|
cursor: default;
|
|
|
user-select: none;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new gr("toolbar_straightener_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`))},ae.instanceCounter=0,ae}(),$t=D("8hTe"),en=D.n($t),Cn=/<pre[^>]*>/g;function _n(ae){var z=document.createElement("div");return z.innerHTML=ae,z.childNodes.length===0?"":z.childNodes[0].nodeValue}var On=Y.a=function(ae){var z=ae.value,$=z===void 0?"":z,ie=ae.edit,de=ie===void 0?!1:ie,se=ae.className,Ke=ae.showTextOnly,Rt=ae.showLines,Vt=ae.replaces,Er=ae.zoomImg,Lt=ae.hasMask,zr=ae.style,Br=zr===void 0?{}:zr,En=ae.stylesPrev,ui=En===void 0?{}:En,Ei=String($),In=Object(l.useRef)(),Li=Object(l.useRef)(),qi=Object(l.useState)(""),ni=Object(S.a)(qi,2),Ti=ni[0],xi=ni[1],Fi=Object(l.useState)("office"),Ci=Object(S.a)(Fi,2),Gi=Ci[0],Mi=Ci[1],oa=function(){var mt=new wt(Li.current);mt.displayMode="popup",mt.addRenderEventListener(function(){var Ct=Object(v.a)(d.a.mark(function It(Pt){var Ht;return d.a.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return In.current.style.display="none",dt.next=3,Object(Ae.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Pt}});case 3:Ht=dt.sent,Ht!=null&&Ht.id&&Vt(Li.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(Ht==null?void 0:Ht.id,"?type=").concat(Ht.content_type));case 5:case"end":return dt.stop()}},It)}));return function(It){return Ct.apply(this,arguments)}}()),mt.show()},sa=function(){var mt=new Jr(Li.current);mt.settings.displayMode="popup",mt.addEventListener("render",function(){var Ct=Object(v.a)(d.a.mark(function It(Pt){var Ht;return d.a.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:if(In.current.style.display="none",!Li.current){dt.next=6;break}return dt.next=4,Object(Ae.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Pt.dataUrl}});case 4:Ht=dt.sent,Ht!=null&&Ht.id&&Vt(Li.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(Ht==null?void 0:Ht.id,"?type=").concat(Ht.content_type));case 6:case"end":return dt.stop()}},It)}));return function(It){return Ct.apply(this,arguments)}}()),mt.show(),window.markerArea=mt},Ii=Object(l.useMemo)(function(){try{var it=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,mt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ct=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Ei=Ei.replace(it,"("+ne.a.API_SERVER+"/api/attachments/").replace(mt,'"'+ne.a.API_SERVER+"/api/attachments/").replace(Ct,'"'+ne.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,`
|
|
|
`),Ei=Ei.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
|
|
|
`)}catch(Wt){}var It=K(Ei),Pt=M();if(Ei.match(/\[TOC\]/)&&(It=It.replace("<p>[TOC]</p>",k()),w()),It=It.replace(/(__special_katext_id_\d+__)/g,function(Wt,dt){var At=Pt[dt],Dt=At.type,yr=At.expression;return Object(fe.renderToString)(_n(yr)||"",{displayMode:Dt==="block",throwOnError:!1,output:"html"})}),It=It.replace(/▁/g,"\u2581\u2581\u2581"),I(),Ke){var Ht=document.createElement("div");return Ht.innerHTML=It,Ht.innerText}return setTimeout(function(){return ta()},500),It},[Ei]),qn=Object(l.useRef)();E.WebkitLineClamp=Rt,Rt&&(Br=Object(p.a)(Object(p.a)({},Br),E));function Vi(it){var mt=it.target;if(mt.tagName.toUpperCase()==="IMG"){if(Er){var Ct=mt.getAttribute("src");xi(Ct),Mi("image")}}else if(mt.tagName.toUpperCase()==="A"){var It=mt.getAttribute("href");if(It.indexOf("office")>-1)it.preventDefault(),xi(It),Mi("office");else if(It.indexOf("application/pdf")>-1)it.preventDefault(),xi(It),Mi("pdf");else if(It.indexOf("type=text")>-1)it.preventDefault(),xi(It),Mi("html");else if(It.startsWith("#")){it.preventDefault();var Pt=document.getElementById(It.replace("#",""));Pt&&Pt.scrollIntoView(!0)}}}var ta=function(){var mt,Ct=(mt=qn.current)===null||mt===void 0?void 0:mt.querySelectorAll("video");Ct==null||Ct.forEach(function(It){if(It.oncontextmenu=function(){return!1},It.src.indexOf(".m3u8")>-1&&!It.canPlayType("application/vnd.apple.mpegurl")){if(X.a.isSupported()){var Pt=new X.a;Pt.loadSource(It.src),Pt.attachMedia(It)}}})};Object(l.useEffect)(function(){if(qn.current&&Ii&&(Ii.match(Cn)&&window.PR.prettyPrint()),qn.current)return qn.current.addEventListener("click",Vi),function(){qn.current.removeEventListener("click",Vi),I(),w()}},[Ii,qn.current,Vi]);var Tt=function(mt){if(!de)return;mt.target.nodeName==="IMG"?(In.current.style.display="flex",In.current.style.width=mt.target.clientWidth+"px",In.current.style.height=mt.target.clientHeight+"px",In.current.style.top=mt.target.offsetTop+"px",In.current.style.left=mt.target.offsetLeft+"px",Li.current.src=mt.target.getAttribute("src")):In.current.style.display="none"};return n.a.createElement("div",{style:{position:"relative"}},n.a.createElement("div",{ref:qn,style:Object(p.a)({},Br),className:"".concat(se||""," markdown-body ").concat(en.a.mdBody),onMouseOver:Tt,dangerouslySetInnerHTML:{__html:Ii}}),n.a.createElement("div",{ref:In,className:en.a.button},n.a.createElement(g.a,null,n.a.createElement(P.a,{onClick:function(){return oa()}},"\u88C1\u526A"),n.a.createElement(P.a,{onClick:function(){return sa()}},"\u7F16\u8F91"))),n.a.createElement("img",{ref:Li,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),n.a.createElement(me.a,{close:!0,data:Ti,hasMask:Lt,type:Ti!=null&&Ti.length?Gi:"",style:Object(p.a)({},ui),onClose:function(){return xi("")}}))}},"9OqN":function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){return L.mode.CTR=function(){var g=L.lib.BlockCipherMode.extend(),T=g.Encryptor=g.extend({processBlock:function(P,p){var v=this._cipher,S=v.blockSize,b=this._iv,d=this._counter;b&&(d=this._counter=b.slice(0),this._iv=void 0);var l=d.slice(0);v.encryptBlock(l,0),d[S-1]=d[S-1]+1|0;for(var n=0;n<S;n++)P[p+n]^=l[n]}});return g.Decryptor=T,g}(),L.mode.CTR})},"9VGf":function(j,Y,D){"use strict";D.d(Y,"a",function(){return T});var L=D("q1tI"),g=D.n(L);function T(P,p){var v=Object(L.useRef)();Object(L.useEffect)(function(){v.current=P}),Object(L.useEffect)(function(){function S(){v.current()}if(p!==null){var b=setInterval(S,p);return function(){return clearInterval(b)}}},[p])}},ALsQ:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){return L.mode.CFB=function(){var g=L.lib.BlockCipherMode.extend();g.Encryptor=g.extend({processBlock:function(P,p){var v=this._cipher,S=v.blockSize;T.call(this,P,p,S,v),this._prevBlock=P.slice(p,p+S)}}),g.Decryptor=g.extend({processBlock:function(P,p){var v=this._cipher,S=v.blockSize,b=P.slice(p,p+S);T.call(this,P,p,S,v),this._prevBlock=b}});function T(P,p,v,S){var b,d=this._iv;d?(b=d.slice(0),this._iv=void 0):b=this._prevBlock,S.encryptBlock(b,0);for(var l=0;l<v;l++)P[p+l]^=b[l]}return g}(),L.mode.CFB})},BJfS:function(j,Y){var D=function(L){return L.replace(/[A-Z]/g,function(g){return"-"+g.toLowerCase()}).toLowerCase()};j.exports=D},BU3w:function(j,Y,D){"use strict";D.d(Y,"a",function(){return v});var L=D("MNnm"),g="rc-util-key";function T(S){if(S.attachTo)return S.attachTo;var b=document.querySelector("head");return b||document.body}function P(S){var b,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(L.a)())return null;var l=document.createElement("style");if((b=d.csp)===null||b===void 0?void 0:b.nonce){var n;l.nonce=(n=d.csp)===null||n===void 0?void 0:n.nonce}l.innerHTML=S;var c=T(d),u=c.firstChild;return d.prepend&&c.prepend?c.prepend(l):d.prepend&&u?c.insertBefore(l,u):c.appendChild(l),l}var p=new Map;function v(S,b){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=T(d);if(!p.has(l)){var n=P("",d),c=n.parentNode;p.set(l,c),c.removeChild(n)}var u=Array.from(p.get(l).children).find(function(r){return r.tagName==="STYLE"&&r[g]===b});if(u){var o,h;if(((o=d.csp)===null||o===void 0?void 0:o.nonce)&&u.nonce!==((h=d.csp)===null||h===void 0?void 0:h.nonce)){var m;u.nonce=(m=d.csp)===null||m===void 0?void 0:m.nonce}return u.innerHTML!==S&&(u.innerHTML=S),u}var s=P(S,d);return s[g]=b,s}},Bd2K:function(j,Y,D){(function(L){L(D("VrN/"),D("osHv"))})(function(L){L.defineOption("autoCloseTags",!1,function(d,l,n){if(n!=L.Init&&n&&d.removeKeyMap("autoCloseTags"),!l)return;var c={name:"autoCloseTags"};(typeof l!="object"||l.whenClosing!==!1)&&(c["'/'"]=function(u){return v(u)}),(typeof l!="object"||l.whenOpening!==!1)&&(c["'>'"]=function(u){return P(u)}),d.addKeyMap(c)});var g=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],T=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function P(d){if(d.getOption("disableInput"))return L.Pass;for(var l=d.listSelections(),n=[],c=d.getOption("autoCloseTags"),u=0;u<l.length;u++){if(!l[u].empty())return L.Pass;var o=l[u].head,h=d.getTokenAt(o),m=L.innerMode(d.getMode(),h.state),s=m.state,r=m.mode.xmlCurrentTag&&m.mode.xmlCurrentTag(s),a=r&&r.name;if(!a)return L.Pass;var t=m.mode.configuration=="html",w=typeof c=="object"&&c.dontCloseTags||t&&g,E=typeof c=="object"&&c.indentTags||t&&T;h.end>o.ch&&(a=a.slice(0,a.length-h.end+o.ch));var f=a.toLowerCase();if(!a||h.type=="string"&&(h.end!=o.ch||!/[\"\']/.test(h.string.charAt(h.string.length-1))||h.string.length==1)||h.type=="tag"&&r.close||h.string.indexOf("/")==o.ch-h.start-1||w&&S(w,f)>-1||b(d,m.mode.xmlCurrentContext&&m.mode.xmlCurrentContext(s)||[],a,o,!0))return L.Pass;var k=typeof c=="object"&&c.emptyTags;if(k&&S(k,a)>-1){n[u]={text:"/>",newPos:L.Pos(o.line,o.ch+2)};continue}var O=E&&S(E,f)>-1;n[u]={indent:O,text:">"+(O?`
|
|
|
|
|
|
`:"")+"</"+a+">",newPos:O?L.Pos(o.line+1,0):L.Pos(o.line,o.ch+1)}}for(var C=typeof c=="object"&&c.dontIndentOnAutoClose,u=l.length-1;u>=0;u--){var x=n[u];d.replaceRange(x.text,l[u].head,l[u].anchor,"+insert");var y=d.listSelections().slice(0);y[u]={head:x.newPos,anchor:x.newPos},d.setSelections(y),!C&&x.indent&&(d.indentLine(x.newPos.line,null,!0),d.indentLine(x.newPos.line+1,null,!0))}}function p(d,l){for(var n=d.listSelections(),c=[],u=l?"/":"</",o=d.getOption("autoCloseTags"),h=typeof o=="object"&&o.dontIndentOnSlash,m=0;m<n.length;m++){if(!n[m].empty())return L.Pass;var s=n[m].head,r=d.getTokenAt(s),a=L.innerMode(d.getMode(),r.state),t=a.state;if(l&&(r.type=="string"||r.string.charAt(0)!="<"||r.start!=s.ch-1))return L.Pass;var w,E=a.mode.name!="xml"&&d.getMode().name=="htmlmixed";if(E&&a.mode.name=="javascript")w=u+"script";else if(E&&a.mode.name=="css")w=u+"style";else{var f=a.mode.xmlCurrentContext&&a.mode.xmlCurrentContext(t);if(!f||f.length&&b(d,f,f[f.length-1],s))return L.Pass;w=u+f[f.length-1]}d.getLine(s.line).charAt(r.end)!=">"&&(w+=">"),c[m]=w}if(d.replaceSelections(c),n=d.listSelections(),!h)for(var m=0;m<n.length;m++)(m==n.length-1||n[m].head.line<n[m+1].head.line)&&d.indentLine(n[m].head.line)}function v(d){return d.getOption("disableInput")?L.Pass:p(d,!0)}L.commands.closeTag=function(d){return p(d)};function S(d,l){if(d.indexOf)return d.indexOf(l);for(var n=0,c=d.length;n<c;++n)if(d[n]==l)return n;return-1}function b(d,l,n,c,u){if(!L.scanForClosingTag)return!1;var o=Math.min(d.lastLine()+1,c.line+500),h=L.scanForClosingTag(d,c,null,o);if(!h||h.tag!=n)return!1;for(var m=u?1:0,s=l.length-1;s>=0&&l[s]==n;s--)++m;c=h.to;for(var s=1;s<m;s++){var r=L.scanForClosingTag(d,c,null,o);if(!r||r.tag!=n)return!1;c=r.to}return!0}})},BjJ7:function(j,Y,D){"use strict";D.d(Y,"d",function(){return g}),D.d(Y,"c",function(){return T}),D.d(Y,"e",function(){return P}),D.d(Y,"b",function(){return p}),D.d(Y,"a",function(){return S});var L=D("m3rI");function g(b){var d=!0;if(b.length>0){for(var l=0;l<b.length;l++)if(b[l].compile_success==0||!b[l].compile_success){d=!1;break}}else d=!1;return d}function T(b){for(var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",l=[],n=0;n<b.length;n++){var c=b[n],u=d?"".concat(d,"/").concat(c.name):"".concat(c.name);l.push({title:c.name,isLeaf:!(c.type==="tree"),key:u})}return l}function P(b,d,l){for(var n=0;n<b.length;n++){var c=b[n];if(c.key===d){c.children=l;break}c.children&&P(c.children,d,l)}return b}function p(b,d,l){var n;return function(){var c=this,u=arguments,o=function(){n=null,l||b.apply(c,u)},h=l&&!n;clearTimeout(n),n=setTimeout(o,d),h&&b.apply(c,u)}}var v=!0,S=L.a.API_SERVER},"C+DQ":function(j,Y,D){},"C/vA":function(j,Y,D){"use strict";D.d(Y,"a",function(){return L});function L(g){var T=this,P=!1,p;return function(){return P||(P=!0,p=g.apply(T,arguments)),p}}},"Cg/j":function(j,Y,D){"use strict";D.d(Y,"b",function(){return L}),D.d(Y,"a",function(){return g}),D.d(Y,"c",function(){return P}),D.d(Y,"d",function(){return p});var L;(function(v){v.serviceIds=new Map,v.DI_TARGET="$di$target",v.DI_DEPENDENCIES="$di$dependencies";function S(b){return b[v.DI_DEPENDENCIES]||[]}v.getServiceDependencies=S})(L||(L={}));var g=P("instantiationService");function T(v,S,b,d){S[L.DI_TARGET]===S?S[L.DI_DEPENDENCIES].push({id:v,index:b,optional:d}):(S[L.DI_DEPENDENCIES]=[{id:v,index:b,optional:d}],S[L.DI_TARGET]=S)}function P(v){if(L.serviceIds.has(v))return L.serviceIds.get(v);var S=function(b,d,l){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");T(S,b,l,!1)};return S.toString=function(){return v},L.serviceIds.set(v,S),S}function p(v){return function(S,b,d){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");T(v,S,d,!0)}}},Dgm7:function(j,Y,D){j.exports=D.p+"static/auth.ea067b42.png"},DlQD:function(j,Y,D){(function(L,g){j.exports=g()})(this,function(){"use strict";function L(Ue,Le){for(var Ie=0;Ie<Le.length;Ie++){var Ce=Le[Ie];Ce.enumerable=Ce.enumerable||!1,Ce.configurable=!0,"value"in Ce&&(Ce.writable=!0),Object.defineProperty(Ue,Ce.key,Ce)}}function g(Ue,Le,Ie){return Le&&L(Ue.prototype,Le),Ie&&L(Ue,Ie),Ue}function T(Ue,Le){if(!Ue)return;if(typeof Ue=="string")return P(Ue,Le);var Ie=Object.prototype.toString.call(Ue).slice(8,-1);if(Ie==="Object"&&Ue.constructor&&(Ie=Ue.constructor.name),Ie==="Map"||Ie==="Set")return Array.from(Ue);if(Ie==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ie))return P(Ue,Le)}function P(Ue,Le){(Le==null||Le>Ue.length)&&(Le=Ue.length);for(var Ie=0,Ce=new Array(Le);Ie<Le;Ie++)Ce[Ie]=Ue[Ie];return Ce}function p(Ue,Le){var Ie;if(typeof Symbol=="undefined"||Ue[Symbol.iterator]==null){if(Array.isArray(Ue)||(Ie=T(Ue))||Le&&Ue&&typeof Ue.length=="number"){Ie&&(Ue=Ie);var Ce=0;return function(){return Ce>=Ue.length?{done:!0}:{done:!1,value:Ue[Ce++]}}}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 Ie=Ue[Symbol.iterator](),Ie.next.bind(Ie)}function v(Ue,Le){return Le={exports:{}},Ue(Le,Le.exports),Le.exports}var S=v(function(Ue){function Le(){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 Ie(Ce){Ue.exports.defaults=Ce}Ue.exports={defaults:Le(),getDefaults:Le,changeDefaults:Ie}}),b=S.defaults,d=S.getDefaults,l=S.changeDefaults,n=/[&<>"']/,c=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,h={"&":"&","<":"<",">":">",'"':""","'":"'"},m=function(Le){return h[Le]};function s(Ue,Le){if(Le){if(n.test(Ue))return Ue.replace(c,m)}else if(u.test(Ue))return Ue.replace(o,m);return Ue}var r=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function a(Ue){return Ue.replace(r,function(Le,Ie){return Ie=Ie.toLowerCase(),Ie==="colon"?":":Ie.charAt(0)==="#"?Ie.charAt(1)==="x"?String.fromCharCode(parseInt(Ie.substring(2),16)):String.fromCharCode(+Ie.substring(1)):""})}var t=/(^|[^\[])\^/g;function w(Ue,Le){Ue=Ue.source||Ue,Le=Le||"";var Ie={replace:function(Se,ke){return ke=ke.source||ke,ke=ke.replace(t,"$1"),Ue=Ue.replace(Se,ke),Ie},getRegex:function(){return new RegExp(Ue,Le)}};return Ie}var E=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function k(Ue,Le,Ie){if(Ue){var Ce;try{Ce=decodeURIComponent(a(Ie)).replace(E,"").toLowerCase()}catch(Se){return null}if(Ce.indexOf("javascript:")===0||Ce.indexOf("vbscript:")===0||Ce.indexOf("data:")===0)return null}Le&&!f.test(Ie)&&(Ie=_(Le,Ie));try{Ie=encodeURI(Ie).replace(/%25/g,"%")}catch(Se){return null}return Ie}var O={},C=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function _(Ue,Le){O[" "+Ue]||(C.test(Ue)?O[" "+Ue]=Ue+"/":O[" "+Ue]=G(Ue,"/",!0)),Ue=O[" "+Ue];var Ie=Ue.indexOf(":")===-1;return Le.substring(0,2)==="//"?Ie?Le:Ue.replace(x,"$1")+Le:Le.charAt(0)==="/"?Ie?Le:Ue.replace(y,"$1")+Le:Ue+Le}var M={exec:function(){}};function I(Ue){for(var Le=1,Ie,Ce;Le<arguments.length;Le++){Ie=arguments[Le];for(Ce in Ie)Object.prototype.hasOwnProperty.call(Ie,Ce)&&(Ue[Ce]=Ie[Ce])}return Ue}function N(Ue,Le){var Ie=Ue.replace(/\|/g,function(ke,Ne,et){for(var $e=!1,bt=Ne;--bt>=0&&et[bt]==="\\";)$e=!$e;return $e?"|":" |"}),Ce=Ie.split(/ \|/),Se=0;if(Ce.length>Le)Ce.splice(Le);else for(;Ce.length<Le;)Ce.push("");for(;Se<Ce.length;Se++)Ce[Se]=Ce[Se].trim().replace(/\\\|/g,"|");return Ce}function G(Ue,Le,Ie){var Ce=Ue.length;if(Ce===0)return"";for(var Se=0;Se<Ce;){var ke=Ue.charAt(Ce-Se-1);if(ke===Le&&!Ie)Se++;else if(ke!==Le&&Ie)Se++;else break}return Ue.substr(0,Ce-Se)}function H(Ue,Le){if(Ue.indexOf(Le[1])===-1)return-1;for(var Ie=Ue.length,Ce=0,Se=0;Se<Ie;Se++)if(Ue[Se]==="\\")Se++;else if(Ue[Se]===Le[0])Ce++;else if(Ue[Se]===Le[1]&&(Ce--,Ce<0))return Se;return-1}function B(Ue){Ue&&Ue.sanitize&&!Ue.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var K={escape:s,unescape:a,edit:w,cleanUrl:k,resolveUrl:_,noopTest:M,merge:I,splitCells:N,rtrim:G,findClosingBracket:H,checkSanitizeDeprecation:B},U=S.defaults,W=K.rtrim,X=K.splitCells,ne=K.escape,fe=K.findClosingBracket;function me(Ue,Le,Ie){var Ce=Le.href,Se=Le.title?ne(Le.title):null,ke=Ue[1].replace(/\\([\[\]])/g,"$1");return Ue[0].charAt(0)!=="!"?{type:"link",raw:Ie,href:Ce,title:Se,text:ke}:{type:"image",raw:Ie,href:Ce,title:Se,text:ne(ke)}}function Ae(Ue,Le){var Ie=Ue.match(/^(\s+)(?:```)/);if(Ie===null)return Le;var Ce=Ie[1];return Le.split(`
|
|
|
`).map(function(Se){var ke=Se.match(/^\s+/);if(ke===null)return Se;var Ne=ke[0];return Ne.length>=Ce.length?Se.slice(Ce.length):Se}).join(`
|
|
|
`)}var De=function(){function Ue(Ie){this.options=Ie||U}var Le=Ue.prototype;return Le.space=function(Ce){var Se=this.rules.block.newline.exec(Ce);if(Se)return Se[0].length>1?{type:"space",raw:Se[0]}:{raw:`
|
|
|
`}},Le.code=function(Ce,Se){var ke=this.rules.block.code.exec(Ce);if(ke){var Ne=Se[Se.length-1];if(Ne&&Ne.type==="paragraph")return{raw:ke[0],text:ke[0].trimRight()};var et=ke[0].replace(/^ {4}/gm,"");return{type:"code",raw:ke[0],codeBlockStyle:"indented",text:this.options.pedantic?et:W(et,`
|
|
|
`)}}},Le.fences=function(Ce){var Se=this.rules.block.fences.exec(Ce);if(Se){var ke=Se[0],Ne=Ae(ke,Se[3]||"");return{type:"code",raw:ke,lang:Se[2]?Se[2].trim():Se[2],text:Ne}}},Le.heading=function(Ce){var Se=this.rules.block.heading.exec(Ce);if(Se)return{type:"heading",raw:Se[0],depth:Se[1].length,text:Se[2]}},Le.nptable=function(Ce){var Se=this.rules.block.nptable.exec(Ce);if(Se){var ke={type:"table",header:X(Se[1].replace(/^ *| *\| *$/g,"")),align:Se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Se[3]?Se[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:Se[0]};if(ke.header.length===ke.align.length){var Ne=ke.align.length,et;for(et=0;et<Ne;et++)/^ *-+: *$/.test(ke.align[et])?ke.align[et]="right":/^ *:-+: *$/.test(ke.align[et])?ke.align[et]="center":/^ *:-+ *$/.test(ke.align[et])?ke.align[et]="left":ke.align[et]=null;for(Ne=ke.cells.length,et=0;et<Ne;et++)ke.cells[et]=X(ke.cells[et],ke.header.length);return ke}}},Le.hr=function(Ce){var Se=this.rules.block.hr.exec(Ce);if(Se)return{type:"hr",raw:Se[0]}},Le.blockquote=function(Ce){var Se=this.rules.block.blockquote.exec(Ce);if(Se){var ke=Se[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Se[0],text:ke}}},Le.list=function(Ce){var Se=this.rules.block.list.exec(Ce);if(Se){for(var ke=Se[0],Ne=Se[2],et=Ne.length>1,$e=Ne[Ne.length-1]===")",bt={type:"list",raw:ke,ordered:et,start:et?+Ne.slice(0,-1):"",loose:!1,items:[]},gt=Se[0].match(this.rules.block.item),Ut=!1,Nt,hr,mr,St,Yr,Jr,Hr,un=gt.length,Ar=0;Ar<un;Ar++)Nt=gt[Ar],ke=Nt,hr=Nt.length,Nt=Nt.replace(/^ *([*+-]|\d+[.)]) */,""),~Nt.indexOf(`
|
|
|
`)&&(hr-=Nt.length,Nt=this.options.pedantic?Nt.replace(/^ {1,4}/gm,""):Nt.replace(new RegExp("^ {1,"+hr+"}","gm"),"")),Ar!==un-1&&(mr=this.rules.block.bullet.exec(gt[Ar+1])[0],(et?mr.length===1||!$e&&mr[mr.length-1]===")":mr.length>1||this.options.smartLists&&mr!==Ne)&&(St=gt.slice(Ar+1).join(`
|
|
|
`),bt.raw=bt.raw.substring(0,bt.raw.length-St.length),Ar=un-1)),Yr=Ut||/\n\n(?!\s*$)/.test(Nt),Ar!==un-1&&(Ut=Nt.charAt(Nt.length-1)===`
|
|
|
`,Yr||(Yr=Ut)),Yr&&(bt.loose=!0),Jr=/^\[[ xX]\] /.test(Nt),Hr=void 0,Jr&&(Hr=Nt[1]!==" ",Nt=Nt.replace(/^\[[ xX]\] +/,"")),bt.items.push({type:"list_item",raw:ke,task:Jr,checked:Hr,loose:Yr,text:Nt});return bt}},Le.html=function(Ce){var Se=this.rules.block.html.exec(Ce);if(Se)return{type:this.options.sanitize?"paragraph":"html",raw:Se[0],pre:!this.options.sanitizer&&(Se[1]==="pre"||Se[1]==="script"||Se[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Se[0]):ne(Se[0]):Se[0]}},Le.def=function(Ce){var Se=this.rules.block.def.exec(Ce);if(Se){Se[3]&&(Se[3]=Se[3].substring(1,Se[3].length-1));var ke=Se[1].toLowerCase().replace(/\s+/g," ");return{tag:ke,raw:Se[0],href:Se[2],title:Se[3]}}},Le.table=function(Ce){var Se=this.rules.block.table.exec(Ce);if(Se){var ke={type:"table",header:X(Se[1].replace(/^ *| *\| *$/g,"")),align:Se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Se[3]?Se[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(ke.header.length===ke.align.length){ke.raw=Se[0];var Ne=ke.align.length,et;for(et=0;et<Ne;et++)/^ *-+: *$/.test(ke.align[et])?ke.align[et]="right":/^ *:-+: *$/.test(ke.align[et])?ke.align[et]="center":/^ *:-+ *$/.test(ke.align[et])?ke.align[et]="left":ke.align[et]=null;for(Ne=ke.cells.length,et=0;et<Ne;et++)ke.cells[et]=X(ke.cells[et].replace(/^ *\| *| *\| *$/g,""),ke.header.length);return ke}}},Le.lheading=function(Ce){var Se=this.rules.block.lheading.exec(Ce);if(Se)return{type:"heading",raw:Se[0],depth:Se[2].charAt(0)==="="?1:2,text:Se[1]}},Le.paragraph=function(Ce){var Se=this.rules.block.paragraph.exec(Ce);if(Se)return{type:"paragraph",raw:Se[0],text:Se[1].charAt(Se[1].length-1)===`
|
|
|
`?Se[1].slice(0,-1):Se[1]}},Le.text=function(Ce,Se){var ke=this.rules.block.text.exec(Ce);if(ke){var Ne=Se[Se.length-1];return Ne&&Ne.type==="text"?{raw:ke[0],text:ke[0]}:{type:"text",raw:ke[0],text:ke[0]}}},Le.escape=function(Ce){var Se=this.rules.inline.escape.exec(Ce);if(Se)return{type:"escape",raw:Se[0],text:ne(Se[1])}},Le.tag=function(Ce,Se,ke){var Ne=this.rules.inline.tag.exec(Ce);if(Ne)return!Se&&/^<a /i.test(Ne[0])?Se=!0:Se&&/^<\/a>/i.test(Ne[0])&&(Se=!1),!ke&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ne[0])?ke=!0:ke&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ne[0])&&(ke=!1),{type:this.options.sanitize?"text":"html",raw:Ne[0],inLink:Se,inRawBlock:ke,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ne[0]):ne(Ne[0]):Ne[0]}},Le.link=function(Ce){var Se=this.rules.inline.link.exec(Ce);if(Se){var ke=fe(Se[2],"()");if(ke>-1){var Ne=Se[0].indexOf("!")===0?5:4,et=Ne+Se[1].length+ke;Se[2]=Se[2].substring(0,ke),Se[0]=Se[0].substring(0,et).trim(),Se[3]=""}var $e=Se[2],bt="";if(this.options.pedantic){var gt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec($e);gt?($e=gt[1],bt=gt[3]):bt=""}else bt=Se[3]?Se[3].slice(1,-1):"";$e=$e.trim().replace(/^<([\s\S]*)>$/,"$1");var Ut=me(Se,{href:$e&&$e.replace(this.rules.inline._escapes,"$1"),title:bt&&bt.replace(this.rules.inline._escapes,"$1")},Se[0]);return Ut}},Le.reflink=function(Ce,Se){var ke;if((ke=this.rules.inline.reflink.exec(Ce))||(ke=this.rules.inline.nolink.exec(Ce))){var Ne=(ke[2]||ke[1]).replace(/\s+/g," ");if(Ne=Se[Ne.toLowerCase()],!Ne||!Ne.href){var et=ke[0].charAt(0);return{type:"text",raw:et,text:et}}var $e=me(ke,Ne,ke[0]);return $e}},Le.strong=function(Ce,Se,ke){ke===void 0&&(ke="");var Ne=this.rules.inline.strong.start.exec(Ce);if(Ne&&(!Ne[1]||Ne[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Se=Se.slice(-1*Ce.length);var et=Ne[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;et.lastIndex=0;for(var $e;(Ne=et.exec(Se))!=null;)if($e=this.rules.inline.strong.middle.exec(Se.slice(0,Ne.index+3)),$e)return{type:"strong",raw:Ce.slice(0,$e[0].length),text:Ce.slice(2,$e[0].length-2)}}},Le.em=function(Ce,Se,ke){ke===void 0&&(ke="");var Ne=this.rules.inline.em.start.exec(Ce);if(Ne&&(!Ne[1]||Ne[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Se=Se.slice(-1*Ce.length);var et=Ne[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;et.lastIndex=0;for(var $e;(Ne=et.exec(Se))!=null;)if($e=this.rules.inline.em.middle.exec(Se.slice(0,Ne.index+2)),$e)return{type:"em",raw:Ce.slice(0,$e[0].length),text:Ce.slice(1,$e[0].length-1)}}},Le.codespan=function(Ce){var Se=this.rules.inline.code.exec(Ce);if(Se){var ke=Se[2].replace(/\n/g," "),Ne=/[^ ]/.test(ke),et=ke.startsWith(" ")&&ke.endsWith(" ");return Ne&&et&&(ke=ke.substring(1,ke.length-1)),ke=ne(ke,!0),{type:"codespan",raw:Se[0],text:ke}}},Le.br=function(Ce){var Se=this.rules.inline.br.exec(Ce);if(Se)return{type:"br",raw:Se[0]}},Le.del=function(Ce){var Se=this.rules.inline.del.exec(Ce);if(Se)return{type:"del",raw:Se[0],text:Se[1]}},Le.autolink=function(Ce,Se){var ke=this.rules.inline.autolink.exec(Ce);if(ke){var Ne,et;return ke[2]==="@"?(Ne=ne(this.options.mangle?Se(ke[1]):ke[1]),et="mailto:"+Ne):(Ne=ne(ke[1]),et=Ne),{type:"link",raw:ke[0],text:Ne,href:et,tokens:[{type:"text",raw:Ne,text:Ne}]}}},Le.url=function(Ce,Se){var ke;if(ke=this.rules.inline.url.exec(Ce)){var Ne,et;if(ke[2]==="@")Ne=ne(this.options.mangle?Se(ke[0]):ke[0]),et="mailto:"+Ne;else{var $e;do $e=ke[0],ke[0]=this.rules.inline._backpedal.exec(ke[0])[0];while($e!==ke[0]);Ne=ne(ke[0]),ke[1]==="www."?et="http://"+Ne:et=Ne}return{type:"link",raw:ke[0],text:Ne,href:et,tokens:[{type:"text",raw:Ne,text:Ne}]}}},Le.inlineText=function(Ce,Se,ke){var Ne=this.rules.inline.text.exec(Ce);if(Ne){var et;return Se?et=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ne[0]):ne(Ne[0]):Ne[0]:et=ne(this.options.smartypants?ke(Ne[0]):Ne[0]),{type:"text",raw:Ne[0],text:et}}},Ue}(),ye=K.noopTest,Oe=K.edit,xe=K.merge,ue={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ye,table:ye,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ue._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ue._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ue.def=Oe(ue.def).replace("label",ue._label).replace("title",ue._title).getRegex(),ue.bullet=/(?:[*+-]|\d{1,9}[.)])/,ue.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ue.item=Oe(ue.item,"gm").replace(/bull/g,ue.bullet).getRegex(),ue.list=Oe(ue.list).replace(/bull/g,ue.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ue.def.source+")").getRegex(),ue._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ue._comment=/<!--(?!-?>)[\s\S]*?-->/,ue.html=Oe(ue.html,"i").replace("comment",ue._comment).replace("tag",ue._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ue.paragraph=Oe(ue._paragraph).replace("hr",ue.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ue._tag).getRegex(),ue.blockquote=Oe(ue.blockquote).replace("paragraph",ue.paragraph).getRegex(),ue.normal=xe({},ue),ue.gfm=xe({},ue.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),ue.gfm.nptable=Oe(ue.gfm.nptable).replace("hr",ue.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ue._tag).getRegex(),ue.gfm.table=Oe(ue.gfm.table).replace("hr",ue.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ue._tag).getRegex(),ue.pedantic=xe({},ue.normal,{html:Oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ue._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:ye,paragraph:Oe(ue.normal._paragraph).replace("hr",ue.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",ue.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var le={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ye,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ye,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};le._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",le.punctuation=Oe(le.punctuation).replace(/punctuation/g,le._punctuation).getRegex(),le._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",le._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",le.em.start=Oe(le.em.start).replace(/punctuation/g,le._punctuation).getRegex(),le.em.middle=Oe(le.em.middle).replace(/punctuation/g,le._punctuation).replace(/overlapSkip/g,le._overlapSkip).getRegex(),le.em.endAst=Oe(le.em.endAst,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.em.endUnd=Oe(le.em.endUnd,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.strong.start=Oe(le.strong.start).replace(/punctuation/g,le._punctuation).getRegex(),le.strong.middle=Oe(le.strong.middle).replace(/punctuation/g,le._punctuation).replace(/blockSkip/g,le._blockSkip).getRegex(),le.strong.endAst=Oe(le.strong.endAst,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.strong.endUnd=Oe(le.strong.endUnd,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.blockSkip=Oe(le._blockSkip,"g").getRegex(),le.overlapSkip=Oe(le._overlapSkip,"g").getRegex(),le._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,le._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,le._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,le.autolink=Oe(le.autolink).replace("scheme",le._scheme).replace("email",le._email).getRegex(),le._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,le.tag=Oe(le.tag).replace("comment",ue._comment).replace("attribute",le._attribute).getRegex(),le._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,le._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,le._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,le.link=Oe(le.link).replace("label",le._label).replace("href",le._href).replace("title",le._title).getRegex(),le.reflink=Oe(le.reflink).replace("label",le._label).getRegex(),le.reflinkSearch=Oe(le.reflinkSearch,"g").replace("reflink",le.reflink).replace("nolink",le.nolink).getRegex(),le.normal=xe({},le),le.pedantic=xe({},le.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Oe(/^!?\[(label)\]\((.*?)\)/).replace("label",le._label).getRegex(),reflink:Oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",le._label).getRegex()}),le.gfm=xe({},le.normal,{escape:Oe(le.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),le.gfm.url=Oe(le.gfm.url,"i").replace("email",le.gfm._extended_email).getRegex(),le.breaks=xe({},le.gfm,{br:Oe(le.br).replace("{2,}","*").getRegex(),text:Oe(le.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var re={block:ue,inline:le},pe=S.defaults,ee=re.block,te=re.inline;function ce(Ue){return Ue.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function q(Ue){var Le="",Ie,Ce,Se=Ue.length;for(Ie=0;Ie<Se;Ie++)Ce=Ue.charCodeAt(Ie),Math.random()>.5&&(Ce="x"+Ce.toString(16)),Le+="&#"+Ce+";";return Le}var Q=function(){function Ue(Ie){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ie||pe,this.options.tokenizer=this.options.tokenizer||new De,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Ce={block:ee.normal,inline:te.normal};this.options.pedantic?(Ce.block=ee.pedantic,Ce.inline=te.pedantic):this.options.gfm&&(Ce.block=ee.gfm,this.options.breaks?Ce.inline=te.breaks:Ce.inline=te.gfm),this.tokenizer.rules=Ce}Ue.lex=function(Ce,Se){var ke=new Ue(Se);return ke.lex(Ce)};var Le=Ue.prototype;return Le.lex=function(Ce){return Ce=Ce.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(Ce,this.tokens,!0),this.inline(this.tokens),this.tokens},Le.blockTokens=function(Ce,Se,ke){Se===void 0&&(Se=[]),ke===void 0&&(ke=!0),Ce=Ce.replace(/^ +$/gm,"");for(var Ne,et,$e,bt;Ce;){if(Ne=this.tokenizer.space(Ce)){Ce=Ce.substring(Ne.raw.length),Ne.type&&Se.push(Ne);continue}if(Ne=this.tokenizer.code(Ce,Se)){Ce=Ce.substring(Ne.raw.length),Ne.type?Se.push(Ne):(bt=Se[Se.length-1],bt.raw+=`
|
|
|
`+Ne.raw,bt.text+=`
|
|
|
`+Ne.text);continue}if(Ne=this.tokenizer.fences(Ce)){Ce=Ce.substring(Ne.raw.length),Se.push(Ne);continue}if(Ne=this.tokenizer.heading(Ce)){Ce=Ce.substring(Ne.raw.length),Se.push(Ne);continue}if(Ne=this.tokenizer.nptable(Ce)){Ce=Ce.substring(Ne.raw.length),Se.push(Ne);continue}if(Ne=this.tokenizer.hr(Ce)){Ce=Ce.substring(Ne.raw.length),Se.push(Ne);continue}if(Ne=this.tokenizer.blockquote(Ce)){Ce=Ce.substring(Ne.raw.length),Ne.tokens=this.blockTokens(Ne.text,[],ke),Se.push(Ne);continue}if(Ne=this.tokenizer.list(Ce)){for(Ce=Ce.substring(Ne.raw.length),$e=Ne.items.length,et=0;et<$e;et++)Ne.items[et].tokens=this.blockTokens(Ne.items[et].text,[],!1);Se.push(Ne);continue}if(Ne=this.tokenizer.html(Ce)){Ce=Ce.substring(Ne.raw.length),Se.push(Ne);continue}if(ke&&(Ne=this.tokenizer.def(Ce))){Ce=Ce.substring(Ne.raw.length),this.tokens.links[Ne.tag]||(this.tokens.links[Ne.tag]={href:Ne.href,title:Ne.title});continue}if(Ne=this.tokenizer.table(Ce)){Ce=Ce.substring(Ne.raw.length),Se.push(Ne);continue}if(Ne=this.tokenizer.lheading(Ce)){Ce=Ce.substring(Ne.raw.length),Se.push(Ne);continue}if(ke&&(Ne=this.tokenizer.paragraph(Ce))){Ce=Ce.substring(Ne.raw.length),Se.push(Ne);continue}if(Ne=this.tokenizer.text(Ce,Se)){Ce=Ce.substring(Ne.raw.length),Ne.type?Se.push(Ne):(bt=Se[Se.length-1],bt.raw+=`
|
|
|
`+Ne.raw,bt.text+=`
|
|
|
`+Ne.text);continue}if(Ce){var gt="Infinite loop on byte: "+Ce.charCodeAt(0);if(this.options.silent){console.error(gt);break}else throw new Error(gt)}}return Se},Le.inline=function(Ce){var Se,ke,Ne,et,$e,bt,gt=Ce.length;for(Se=0;Se<gt;Se++){bt=Ce[Se];switch(bt.type){case"paragraph":case"text":case"heading":{bt.tokens=[],this.inlineTokens(bt.text,bt.tokens);break}case"table":{for(bt.tokens={header:[],cells:[]},et=bt.header.length,ke=0;ke<et;ke++)bt.tokens.header[ke]=[],this.inlineTokens(bt.header[ke],bt.tokens.header[ke]);for(et=bt.cells.length,ke=0;ke<et;ke++)for($e=bt.cells[ke],bt.tokens.cells[ke]=[],Ne=0;Ne<$e.length;Ne++)bt.tokens.cells[ke][Ne]=[],this.inlineTokens($e[Ne],bt.tokens.cells[ke][Ne]);break}case"blockquote":{this.inline(bt.tokens);break}case"list":{for(et=bt.items.length,ke=0;ke<et;ke++)this.inline(bt.items[ke].tokens);break}}}return Ce},Le.inlineTokens=function(Ce,Se,ke,Ne,et){Se===void 0&&(Se=[]),ke===void 0&&(ke=!1),Ne===void 0&&(Ne=!1),et===void 0&&(et="");var $e,bt=Ce,gt;if(this.tokens.links){var Ut=Object.keys(this.tokens.links);if(Ut.length>0)for(;(gt=this.tokenizer.rules.inline.reflinkSearch.exec(bt))!=null;)Ut.includes(gt[0].slice(gt[0].lastIndexOf("[")+1,-1))&&(bt=bt.slice(0,gt.index)+"["+"a".repeat(gt[0].length-2)+"]"+bt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(gt=this.tokenizer.rules.inline.blockSkip.exec(bt))!=null;)bt=bt.slice(0,gt.index)+"["+"a".repeat(gt[0].length-2)+"]"+bt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;Ce;){if($e=this.tokenizer.escape(Ce)){Ce=Ce.substring($e.raw.length),Se.push($e);continue}if($e=this.tokenizer.tag(Ce,ke,Ne)){Ce=Ce.substring($e.raw.length),ke=$e.inLink,Ne=$e.inRawBlock,Se.push($e);continue}if($e=this.tokenizer.link(Ce)){Ce=Ce.substring($e.raw.length),$e.type==="link"&&($e.tokens=this.inlineTokens($e.text,[],!0,Ne)),Se.push($e);continue}if($e=this.tokenizer.reflink(Ce,this.tokens.links)){Ce=Ce.substring($e.raw.length),$e.type==="link"&&($e.tokens=this.inlineTokens($e.text,[],!0,Ne)),Se.push($e);continue}if($e=this.tokenizer.strong(Ce,bt,et)){Ce=Ce.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],ke,Ne),Se.push($e);continue}if($e=this.tokenizer.em(Ce,bt,et)){Ce=Ce.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],ke,Ne),Se.push($e);continue}if($e=this.tokenizer.codespan(Ce)){Ce=Ce.substring($e.raw.length),Se.push($e);continue}if($e=this.tokenizer.br(Ce)){Ce=Ce.substring($e.raw.length),Se.push($e);continue}if($e=this.tokenizer.del(Ce)){Ce=Ce.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],ke,Ne),Se.push($e);continue}if($e=this.tokenizer.autolink(Ce,q)){Ce=Ce.substring($e.raw.length),Se.push($e);continue}if(!ke&&($e=this.tokenizer.url(Ce,q))){Ce=Ce.substring($e.raw.length),Se.push($e);continue}if($e=this.tokenizer.inlineText(Ce,Ne,ce)){Ce=Ce.substring($e.raw.length),et=$e.raw.slice(-1),Se.push($e);continue}if(Ce){var Nt="Infinite loop on byte: "+Ce.charCodeAt(0);if(this.options.silent){console.error(Nt);break}else throw new Error(Nt)}}return Se},g(Ue,null,[{key:"rules",get:function(){return{block:ee,inline:te}}}]),Ue}(),V=S.defaults,Z=K.cleanUrl,be=K.escape,ge=function(){function Ue(Ie){this.options=Ie||V}var Le=Ue.prototype;return Le.code=function(Ce,Se,ke){var Ne=(Se||"").match(/\S*/)[0];if(this.options.highlight){var et=this.options.highlight(Ce,Ne);et!=null&&et!==Ce&&(ke=!0,Ce=et)}return Ne?'<pre><code class="'+this.options.langPrefix+be(Ne,!0)+'">'+(ke?Ce:be(Ce,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(ke?Ce:be(Ce,!0))+`</code></pre>
|
|
|
`},Le.blockquote=function(Ce){return`<blockquote>
|
|
|
`+Ce+`</blockquote>
|
|
|
`},Le.html=function(Ce){return Ce},Le.heading=function(Ce,Se,ke,Ne){return this.options.headerIds?"<h"+Se+' id="'+this.options.headerPrefix+Ne.slug(ke)+'">'+Ce+"</h"+Se+`>
|
|
|
`:"<h"+Se+">"+Ce+"</h"+Se+`>
|
|
|
`},Le.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},Le.list=function(Ce,Se,ke){var Ne=Se?"ol":"ul",et=Se&&ke!==1?' start="'+ke+'"':"";return"<"+Ne+et+`>
|
|
|
`+Ce+"</"+Ne+`>
|
|
|
`},Le.listitem=function(Ce){return"<li>"+Ce+`</li>
|
|
|
`},Le.checkbox=function(Ce){return"<input "+(Ce?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Le.paragraph=function(Ce){return"<p>"+Ce+`</p>
|
|
|
`},Le.table=function(Ce,Se){return Se&&(Se="<tbody>"+Se+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+Ce+`</thead>
|
|
|
`+Se+`</table>
|
|
|
`},Le.tablerow=function(Ce){return`<tr>
|
|
|
`+Ce+`</tr>
|
|
|
`},Le.tablecell=function(Ce,Se){var ke=Se.header?"th":"td",Ne=Se.align?"<"+ke+' align="'+Se.align+'">':"<"+ke+">";return Ne+Ce+"</"+ke+`>
|
|
|
`},Le.strong=function(Ce){return"<strong>"+Ce+"</strong>"},Le.em=function(Ce){return"<em>"+Ce+"</em>"},Le.codespan=function(Ce){return"<code>"+Ce+"</code>"},Le.br=function(){return this.options.xhtml?"<br/>":"<br>"},Le.del=function(Ce){return"<del>"+Ce+"</del>"},Le.link=function(Ce,Se,ke){if(Ce=Z(this.options.sanitize,this.options.baseUrl,Ce),Ce===null)return ke;var Ne='<a href="'+be(Ce)+'"';return Se&&(Ne+=' title="'+Se+'"'),Ne+=">"+ke+"</a>",Ne},Le.image=function(Ce,Se,ke){if(Ce=Z(this.options.sanitize,this.options.baseUrl,Ce),Ce===null)return ke;var Ne='<img src="'+Ce+'" alt="'+ke+'"';return Se&&(Ne+=' title="'+Se+'"'),Ne+=this.options.xhtml?"/>":">",Ne},Le.text=function(Ce){return Ce},Ue}(),Te=function(){function Ue(){}var Le=Ue.prototype;return Le.strong=function(Ce){return Ce},Le.em=function(Ce){return Ce},Le.codespan=function(Ce){return Ce},Le.del=function(Ce){return Ce},Le.html=function(Ce){return Ce},Le.text=function(Ce){return Ce},Le.link=function(Ce,Se,ke){return""+ke},Le.image=function(Ce,Se,ke){return""+ke},Le.br=function(){return""},Ue}(),Je=function(){function Ue(){this.seen={}}var Le=Ue.prototype;return Le.slug=function(Ce){var Se=Ce.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Se)){var ke=Se;do this.seen[ke]++,Se=ke+"-"+this.seen[ke];while(this.seen.hasOwnProperty(Se))}return this.seen[Se]=0,Se},Ue}(),rt=S.defaults,nt=K.unescape,at=function(){function Ue(Ie){this.options=Ie||rt,this.options.renderer=this.options.renderer||new ge,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Te,this.slugger=new Je}Ue.parse=function(Ce,Se){var ke=new Ue(Se);return ke.parse(Ce)};var Le=Ue.prototype;return Le.parse=function(Ce,Se){Se===void 0&&(Se=!0);var ke="",Ne,et,$e,bt,gt,Ut,Nt,hr,mr,St,Yr,Jr,Hr,un,Ar,vn,mn,Kt,or=Ce.length;for(Ne=0;Ne<or;Ne++){St=Ce[Ne];switch(St.type){case"space":continue;case"hr":{ke+=this.renderer.hr();continue}case"heading":{ke+=this.renderer.heading(this.parseInline(St.tokens),St.depth,nt(this.parseInline(St.tokens,this.textRenderer)),this.slugger);continue}case"code":{ke+=this.renderer.code(St.text,St.lang,St.escaped);continue}case"table":{for(hr="",Nt="",bt=St.header.length,et=0;et<bt;et++)Nt+=this.renderer.tablecell(this.parseInline(St.tokens.header[et]),{header:!0,align:St.align[et]});for(hr+=this.renderer.tablerow(Nt),mr="",bt=St.cells.length,et=0;et<bt;et++){for(Ut=St.tokens.cells[et],Nt="",gt=Ut.length,$e=0;$e<gt;$e++)Nt+=this.renderer.tablecell(this.parseInline(Ut[$e]),{header:!1,align:St.align[$e]});mr+=this.renderer.tablerow(Nt)}ke+=this.renderer.table(hr,mr);continue}case"blockquote":{mr=this.parse(St.tokens),ke+=this.renderer.blockquote(mr);continue}case"list":{for(Yr=St.ordered,Jr=St.start,Hr=St.loose,bt=St.items.length,mr="",et=0;et<bt;et++)Ar=St.items[et],vn=Ar.checked,mn=Ar.task,un="",Ar.task&&(Kt=this.renderer.checkbox(vn),Hr?Ar.tokens.length>0&&Ar.tokens[0].type==="text"?(Ar.tokens[0].text=Kt+" "+Ar.tokens[0].text,Ar.tokens[0].tokens&&Ar.tokens[0].tokens.length>0&&Ar.tokens[0].tokens[0].type==="text"&&(Ar.tokens[0].tokens[0].text=Kt+" "+Ar.tokens[0].tokens[0].text)):Ar.tokens.unshift({type:"text",text:Kt}):un+=Kt),un+=this.parse(Ar.tokens,Hr),mr+=this.renderer.listitem(un,mn,vn);ke+=this.renderer.list(mr,Yr,Jr);continue}case"html":{ke+=this.renderer.html(St.text);continue}case"paragraph":{ke+=this.renderer.paragraph(this.parseInline(St.tokens));continue}case"text":{for(mr=St.tokens?this.parseInline(St.tokens):St.text;Ne+1<or&&Ce[Ne+1].type==="text";)St=Ce[++Ne],mr+=`
|
|
|
`+(St.tokens?this.parseInline(St.tokens):St.text);ke+=Se?this.renderer.paragraph(mr):mr;continue}default:{var Xt='Token with "'+St.type+'" type was not found.';if(this.options.silent){console.error(Xt);return}else throw new Error(Xt)}}}return ke},Le.parseInline=function(Ce,Se){Se=Se||this.renderer;var ke="",Ne,et,$e=Ce.length;for(Ne=0;Ne<$e;Ne++){et=Ce[Ne];switch(et.type){case"escape":{ke+=Se.text(et.text);break}case"html":{ke+=Se.html(et.text);break}case"link":{ke+=Se.link(et.href,et.title,this.parseInline(et.tokens,Se));break}case"image":{ke+=Se.image(et.href,et.title,et.text);break}case"strong":{ke+=Se.strong(this.parseInline(et.tokens,Se));break}case"em":{ke+=Se.em(this.parseInline(et.tokens,Se));break}case"codespan":{ke+=Se.codespan(et.text);break}case"br":{ke+=Se.br();break}case"del":{ke+=Se.del(this.parseInline(et.tokens,Se));break}case"text":{ke+=Se.text(et.text);break}default:{var bt='Token with "'+et.type+'" type was not found.';if(this.options.silent){console.error(bt);return}else throw new Error(bt)}}}return ke},Ue}(),ct=K.merge,ht=K.checkSanitizeDeprecation,He=K.escape,Re=S.getDefaults,tt=S.changeDefaults,ft=S.defaults;function Qe(Ue,Le,Ie){if(typeof Ue=="undefined"||Ue===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ue!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ue)+", string expected");if(typeof Le=="function"&&(Ie=Le,Le=null),Le=ct({},Qe.defaults,Le||{}),ht(Le),Ie){var Ce=Le.highlight,Se;try{Se=Q.lex(Ue,Le)}catch($e){return Ie($e)}var ke=function(bt){var gt;if(!bt)try{gt=at.parse(Se,Le)}catch(Ut){bt=Ut}return Le.highlight=Ce,bt?Ie(bt):Ie(null,gt)};if(!Ce||Ce.length<3)return ke();if(delete Le.highlight,!Se.length)return ke();var Ne=0;Qe.walkTokens(Se,function($e){$e.type==="code"&&(Ne++,setTimeout(function(){Ce($e.text,$e.lang,function(bt,gt){if(bt)return ke(bt);gt!=null&>!==$e.text&&($e.text=gt,$e.escaped=!0),Ne--,Ne===0&&ke()})},0))}),Ne===0&&ke();return}try{var et=Q.lex(Ue,Le);return Le.walkTokens&&Qe.walkTokens(et,Le.walkTokens),at.parse(et,Le)}catch($e){if($e.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Le.silent)return"<p>An error occurred:</p><pre>"+He($e.message+"",!0)+"</pre>";throw $e}}Qe.options=Qe.setOptions=function(Ue){return ct(Qe.defaults,Ue),tt(Qe.defaults),Qe},Qe.getDefaults=Re,Qe.defaults=ft,Qe.use=function(Ue){var Le=ct({},Ue);if(Ue.renderer&&function(){var Ce=Qe.defaults.renderer||new ge,Se=function(et){var $e=Ce[et];Ce[et]=function(){for(var bt=arguments.length,gt=new Array(bt),Ut=0;Ut<bt;Ut++)gt[Ut]=arguments[Ut];var Nt=Ue.renderer[et].apply(Ce,gt);return Nt===!1&&(Nt=$e.apply(Ce,gt)),Nt}};for(var ke in Ue.renderer)Se(ke);Le.renderer=Ce}(),Ue.tokenizer&&function(){var Ce=Qe.defaults.tokenizer||new De,Se=function(et){var $e=Ce[et];Ce[et]=function(){for(var bt=arguments.length,gt=new Array(bt),Ut=0;Ut<bt;Ut++)gt[Ut]=arguments[Ut];var Nt=Ue.tokenizer[et].apply(Ce,gt);return Nt===!1&&(Nt=$e.apply(Ce,gt)),Nt}};for(var ke in Ue.tokenizer)Se(ke);Le.tokenizer=Ce}(),Ue.walkTokens){var Ie=Qe.defaults.walkTokens;Le.walkTokens=function(Ce){Ue.walkTokens(Ce),Ie&&Ie(Ce)}}Qe.setOptions(Le)},Qe.walkTokens=function(Ue,Le){for(var Ie=p(Ue),Ce;!(Ce=Ie()).done;){var Se=Ce.value;Le(Se);switch(Se.type){case"table":{for(var ke=p(Se.tokens.header),Ne;!(Ne=ke()).done;){var et=Ne.value;Qe.walkTokens(et,Le)}for(var $e=p(Se.tokens.cells),bt;!(bt=$e()).done;)for(var gt=bt.value,Ut=p(gt),Nt;!(Nt=Ut()).done;){var hr=Nt.value;Qe.walkTokens(hr,Le)}break}case"list":{Qe.walkTokens(Se.items,Le);break}default:Se.tokens&&Qe.walkTokens(Se.tokens,Le)}}},Qe.Parser=at,Qe.parser=at.parse,Qe.Renderer=ge,Qe.TextRenderer=Te,Qe.Lexer=Q,Qe.lexer=Q.lex,Qe.Tokenizer=De,Qe.Slugger=Je,Qe.parse=Qe;var lt=Qe;return lt})},E4JC:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.StreamCipher,p=g.algo,v=[],S=[],b=[],d=p.Rabbit=P.extend({_doReset:function(){for(var n=this._key.words,c=this.cfg.iv,u=0;u<4;u++)n[u]=(n[u]<<8|n[u]>>>24)&16711935|(n[u]<<24|n[u]>>>8)&4278255360;var o=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],h=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var u=0;u<4;u++)l.call(this);for(var u=0;u<8;u++)h[u]^=o[u+4&7];if(c){var m=c.words,s=m[0],r=m[1],a=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,t=(r<<8|r>>>24)&16711935|(r<<24|r>>>8)&4278255360,w=a>>>16|t&4294901760,E=t<<16|a&65535;h[0]^=a,h[1]^=w,h[2]^=t,h[3]^=E,h[4]^=a,h[5]^=w,h[6]^=t,h[7]^=E;for(var u=0;u<4;u++)l.call(this)}},_doProcessBlock:function(n,c){var u=this._X;l.call(this),v[0]=u[0]^u[5]>>>16^u[3]<<16,v[1]=u[2]^u[7]>>>16^u[5]<<16,v[2]=u[4]^u[1]>>>16^u[7]<<16,v[3]=u[6]^u[3]>>>16^u[1]<<16;for(var o=0;o<4;o++)v[o]=(v[o]<<8|v[o]>>>24)&16711935|(v[o]<<24|v[o]>>>8)&4278255360,n[c+o]^=v[o]},blockSize:128/32,ivSize:64/32});function l(){for(var n=this._X,c=this._C,u=0;u<8;u++)S[u]=c[u];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0<S[0]>>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0<S[1]>>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0<S[2]>>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0<S[3]>>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0<S[4]>>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0<S[5]>>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0<S[6]>>>0?1:0)|0,this._b=c[7]>>>0<S[7]>>>0?1:0;for(var u=0;u<8;u++){var o=n[u]+c[u],h=o&65535,m=o>>>16,s=((h*h>>>17)+h*m>>>15)+m*m,r=((o&4294901760)*o|0)+((o&65535)*o|0);b[u]=s^r}n[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0,n[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0,n[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0,n[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0,n[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0,n[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0,n[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0,n[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}g.Rabbit=P._createHelper(d)}(),L.Rabbit})},ELLl:function(j,Y,D){(function(L){L(D("VrN/"))})(function(L){var g={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},T=L.Pos;L.defineOption("autoCloseBrackets",!1,function(h,m,s){s&&s!=L.Init&&(h.removeKeyMap(p),h.state.closeBrackets=null),m&&(v(P(m,"pairs")),h.state.closeBrackets=m,h.addKeyMap(p))});function P(h,m){return m=="pairs"&&typeof h=="string"?h:typeof h=="object"&&h[m]!=null?h[m]:g[m]}var p={Backspace:d,Enter:l};function v(h){for(var m=0;m<h.length;m++){var s=h.charAt(m),r="'"+s+"'";p[r]||(p[r]=S(s))}}v(g.pairs+"`");function S(h){return function(m){return c(m,h)}}function b(h){var m=h.state.closeBrackets;if(!m||m.override)return m;var s=h.getModeAt(h.getCursor());return s.closeBrackets||m}function d(h){var m=b(h);if(!m||h.getOption("disableInput"))return L.Pass;for(var s=P(m,"pairs"),r=h.listSelections(),a=0;a<r.length;a++){if(!r[a].empty())return L.Pass;var t=u(h,r[a].head);if(!t||s.indexOf(t)%2!=0)return L.Pass}for(var a=r.length-1;a>=0;a--){var w=r[a].head;h.replaceRange("",T(w.line,w.ch-1),T(w.line,w.ch+1),"+delete")}}function l(h){var m=b(h),s=m&&P(m,"explode");if(!s||h.getOption("disableInput"))return L.Pass;for(var r=h.listSelections(),a=0;a<r.length;a++){if(!r[a].empty())return L.Pass;var t=u(h,r[a].head);if(!t||s.indexOf(t)%2!=0)return L.Pass}h.operation(function(){var w=h.lineSeparator()||`
|
|
|
`;h.replaceSelection(w+w,null),h.execCommand("goCharLeft"),r=h.listSelections();for(var E=0;E<r.length;E++){var f=r[E].head.line;h.indentLine(f,null,!0),h.indentLine(f+1,null,!0)}})}function n(h){var m=L.cmpPos(h.anchor,h.head)>0;return{anchor:new T(h.anchor.line,h.anchor.ch+(m?-1:1)),head:new T(h.head.line,h.head.ch+(m?1:-1))}}function c(h,m){var s=b(h);if(!s||h.getOption("disableInput"))return L.Pass;var r=P(s,"pairs"),a=r.indexOf(m);if(a==-1)return L.Pass;for(var t=P(s,"closeBefore"),w=P(s,"triples"),E=r.charAt(a+1)==m,f=h.listSelections(),k=a%2==0,O,C=0;C<f.length;C++){var x=f[C],y=x.head,_,M=h.getRange(y,T(y.line,y.ch+1));if(k&&!x.empty())_="surround";else if((E||!k)&&M==m)E&&o(h,y)?_="both":w.indexOf(m)>=0&&h.getRange(y,T(y.line,y.ch+3))==m+m+m?_="skipThree":_="skip";else if(E&&y.ch>1&&w.indexOf(m)>=0&&h.getRange(T(y.line,y.ch-2),y)==m+m){if(y.ch>2&&/\bstring/.test(h.getTokenTypeAt(T(y.line,y.ch-2))))return L.Pass;_="addFour"}else if(E){var I=y.ch==0?" ":h.getRange(T(y.line,y.ch-1),y);if(!L.isWordChar(M)&&I!=m&&!L.isWordChar(I))_="both";else return L.Pass}else if(k&&(M.length===0||/\s/.test(M)||t.indexOf(M)>-1))_="both";else return L.Pass;if(!O)O=_;else if(O!=_)return L.Pass}var N=a%2?r.charAt(a-1):m,G=a%2?m:r.charAt(a+1);h.operation(function(){if(O=="skip")h.execCommand("goCharRight");else if(O=="skipThree")for(var H=0;H<3;H++)h.execCommand("goCharRight");else if(O=="surround"){for(var B=h.getSelections(),H=0;H<B.length;H++)B[H]=N+B[H]+G;h.replaceSelections(B,"around"),B=h.listSelections().slice();for(var H=0;H<B.length;H++)B[H]=n(B[H]);h.setSelections(B)}else O=="both"?(h.replaceSelection(N+G,null),h.triggerElectric(N+G),h.execCommand("goCharLeft")):O=="addFour"&&(h.replaceSelection(N+N+N+N,"before"),h.execCommand("goCharRight"))})}function u(h,m){var s=h.getRange(T(m.line,m.ch-1),T(m.line,m.ch+1));return s.length==2?s:null}function o(h,m){var s=h.getTokenAt(T(m.line,m.ch+1));return/\bstring/.test(s.type)&&s.start==m.ch&&(m.ch==0||!/\bstring/.test(h.getTokenTypeAt(m)))}})},ELcG:function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){/** @preserve
|
|
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
|
|
|
|
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
|
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
*/return function(g){var T=L,P=T.lib,p=P.WordArray,v=P.Hasher,S=T.algo,b=p.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),d=p.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=p.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),n=p.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),c=p.create([0,1518500249,1859775393,2400959708,2840853838]),u=p.create([1352829926,1548603684,1836072691,2053994217,0]),o=S.RIPEMD160=v.extend({_doReset:function(){this._hash=p.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(w,E){for(var f=0;f<16;f++){var k=E+f,O=w[k];w[k]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}var C=this._hash.words,x=c.words,y=u.words,_=b.words,M=d.words,I=l.words,N=n.words,G,H,B,K,U,W,X,ne,fe,me;W=G=C[0],X=H=C[1],ne=B=C[2],fe=K=C[3],me=U=C[4];for(var Ae,f=0;f<80;f+=1)Ae=G+w[E+_[f]]|0,f<16?Ae+=h(H,B,K)+x[0]:f<32?Ae+=m(H,B,K)+x[1]:f<48?Ae+=s(H,B,K)+x[2]:f<64?Ae+=r(H,B,K)+x[3]:Ae+=a(H,B,K)+x[4],Ae=Ae|0,Ae=t(Ae,I[f]),Ae=Ae+U|0,G=U,U=K,K=t(B,10),B=H,H=Ae,Ae=W+w[E+M[f]]|0,f<16?Ae+=a(X,ne,fe)+y[0]:f<32?Ae+=r(X,ne,fe)+y[1]:f<48?Ae+=s(X,ne,fe)+y[2]:f<64?Ae+=m(X,ne,fe)+y[3]:Ae+=h(X,ne,fe)+y[4],Ae=Ae|0,Ae=t(Ae,N[f]),Ae=Ae+me|0,W=me,me=fe,fe=t(ne,10),ne=X,X=Ae;Ae=C[1]+B+fe|0,C[1]=C[2]+K+me|0,C[2]=C[3]+U+W|0,C[3]=C[4]+G+X|0,C[4]=C[0]+H+ne|0,C[0]=Ae},_doFinalize:function(){var w=this._data,E=w.words,f=this._nDataBytes*8,k=w.sigBytes*8;E[k>>>5]|=128<<24-k%32,E[(k+64>>>9<<4)+14]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,w.sigBytes=(E.length+1)*4,this._process();for(var O=this._hash,C=O.words,x=0;x<5;x++){var y=C[x];C[x]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}return O},clone:function(){var w=v.clone.call(this);return w._hash=this._hash.clone(),w}});function h(w,E,f){return w^E^f}function m(w,E,f){return w&E|~w&f}function s(w,E,f){return(w|~E)^f}function r(w,E,f){return w&f|E&~f}function a(w,E,f){return w^(E|~f)}function t(w,E){return w<<E|w>>>32-E}T.RIPEMD160=v._createHelper(o),T.HmacRIPEMD160=v._createHmacHelper(o)}(Math),L.RIPEMD160})},ETIr:function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.WordArray,p=g.enc,v=p.Base64={stringify:function(b){var d=b.words,l=b.sigBytes,n=this._map;b.clamp();for(var c=[],u=0;u<l;u+=3)for(var o=d[u>>>2]>>>24-u%4*8&255,h=d[u+1>>>2]>>>24-(u+1)%4*8&255,m=d[u+2>>>2]>>>24-(u+2)%4*8&255,s=o<<16|h<<8|m,r=0;r<4&&u+r*.75<l;r++)c.push(n.charAt(s>>>6*(3-r)&63));var a=n.charAt(64);if(a)for(;c.length%4;)c.push(a);return c.join("")},parse:function(b){var d=b.length,l=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var c=0;c<l.length;c++)n[l.charCodeAt(c)]=c}var u=l.charAt(64);if(u){var o=b.indexOf(u);o!==-1&&(d=o)}return S(b,d,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function S(b,d,l){for(var n=[],c=0,u=0;u<d;u++)if(u%4){var o=l[b.charCodeAt(u-1)]<<u%4*2,h=l[b.charCodeAt(u)]>>>6-u%4*2,m=o|h;n[c>>>2]|=m<<24-c%4*8,c++}return P.create(n,c)}}(),L.enc.Base64})},"F+F2":function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){return function(){if(typeof ArrayBuffer!="function")return;var g=L,T=g.lib,P=T.WordArray,p=P.init,v=P.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,d=[],l=0;l<b;l++)d[l>>>2]|=S[l]<<24-l%4*8;p.call(this,d,b)}else p.apply(this,arguments)};v.prototype=P}(),L.lib.WordArray})},GRO8:function(j,Y,D){"use strict";D.r(Y);var L=D("k1fw"),g=D("2qtc"),T=D("kLXV"),P=D("lUTK"),p=D("BvKs"),v=D("+L6B"),S=D("2/Rp"),b=D("T2oS"),d=D("W9HT"),l=D("sPJy"),n=D("bE4q"),c=D("miYZ"),u=D("tsqr"),o=D("9og8"),h=D("tJVT"),m=D("PpiC"),s=D("WmNS"),r=D.n(s),a=D("q1tI"),t=D.n(a),w=D("Ty5D"),E=D("55Ip"),f=D("9kvl"),k=D("KeDT"),O=D.n(k),C=D("zrhs"),x=D("DZo9"),y=D("8z0m"),_=D("LtfV"),M=D("KhGG"),I=y.a.Dragger,N=function(it){var mt=it.user,Ct=it.dispatch,It=it.classroomList,Pt=it.shixunsDetail,Ht=it.getResults,Wt=Object(w.i)(),dt=Object(a.useState)(),At=Object(h.a)(dt,2),Dt=At[0],yr=At[1],tr=Object(a.useState)([]),qt=Object(h.a)(tr,2),Gt=qt[0],nr=qt[1],cr=Object(a.useState)(!1),st=Object(h.a)(cr,2),Lr=st[0],Fr=st[1],Cr={onRemove:function(){nr([])},beforeUpload:function(Et){if(console.log(Et),(Et==null?void 0:Et.size)>1024*1024*500)return u.b.info("\u6587\u4EF6\u8D85\u8FC7500M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var _t=[];return _t.push(Et),nr([].concat(_t)),!1},fileList:Gt};return t.a.createElement(T.a,{title:"\u63D0\u4EA4\u6587\u4EF6",visible:Pt.actionTabs.key==="md-tab",confirmLoading:Lr,onOk:Object(o.a)(r.a.mark(function rr(){var Et,_t,xt;return r.a.wrap(function(pr){for(;;)switch(pr.prev=pr.next){case 0:if(!((Gt==null?void 0:Gt.length)<=0)){pr.next=3;break}return u.b.info("\u8BF7\u5148\u9009\u62E9\u6587\u4EF6"),pr.abrupt("return");case 3:return Fr(!0),pr.next=6,Object(M.c)(Gt[0],{login:(Et=mt.userInfo)===null||Et===void 0?void 0:Et.login,container_type:"Competition",container_id:Pt.actionTabs.params.id,stage_type:Pt.actionTabs.params.value,file_name:(_t=Gt[0])===null||_t===void 0?void 0:_t.name});case 6:xt=pr.sent,(xt==null?void 0:xt.status)===0?(u.b.info("\u63D0\u4EA4\u6210\u529F"),Ct({type:"shixunsDetail/setActionTabs",payload:{key:""}}),Fr(!1),nr([]),Ht(Pt.actionTabs.params.value)):(Fr(!1),u.b.info("\u63D0\u4EA4\u5931\u8D25"));case 8:case"end":return pr.stop()}},rr)})),onCancel:function(){nr([]),Ct({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},t.a.createElement(I,Cr,t.a.createElement("p",{className:"ant-upload-drag-icon"},t.a.createElement(_.a,null)),t.a.createElement("p",{className:"ant-upload-hint"},"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20")))},G=Object(f.a)(function(Tt){var it=Tt.user,mt=Tt.classroomList,Ct=Tt.shixunsDetail;return{user:it,classroomList:mt,shixunsDetail:Ct}})(N),H=D("14J3"),B=D("BMrR"),K=D("5NDa"),U=D("5rEg"),W=D("9Bee"),X=D("m3rI"),ne=D("ErOA"),fe=D("NLgs"),me=D("fV52"),Ae=D("3I+P"),De=D("OaEy"),ye=D("2fM7"),Oe=D("5bA4"),xe=D("UESt"),ue=ye.a.Option;function le(Tt){var it=Tt.rewarddata,mt=Tt.getlistdatas,Ct=Tt.is_signed,It=Tt.dispatch,Pt=Tt.userlist,Ht=Object(a.useRef)(null),Wt=Object(a.useState)(!1),dt=Object(h.a)(Wt,2),At=dt[0],Dt=dt[1],yr=Object(a.useState)(void 0),tr=Object(h.a)(yr,2),qt=tr[0],Gt=tr[1],nr=Object(a.useState)(""),cr=Object(h.a)(nr,2),st=cr[0],Lr=cr[1],Fr=Object(a.useState)(void 0),Cr=Object(h.a)(Fr,2),rr=Cr[0],Et=Cr[1],_t=Object(a.useState)(void 0),xt=Object(h.a)(_t,2),Jt=xt[0],pr=xt[1],dr=Object(a.useState)(void 0),fr=Object(h.a)(dr,2),Dr=fr[0],an=fr[1];function qe(xr){return sr.apply(this,arguments)}function sr(){return sr=Object(o.a)(r.a.mark(function xr(br){var Pr;return r.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:if(!br.user_received){Zt.next=3;break}return window.open(br.click_info),Zt.abrupt("return");case 3:if(Object(fe.f)(It)){Zt.next=5;break}return Zt.abrupt("return");case 5:if(!(Ct===!1)){Zt.next=8;break}return u.b.info("\u60A8\u5C1A\u672A\u62A5\u540D\u53C2\u8D5B\uFF0C\u8BF7\u62A5\u540D\u53C2\u8D5B\u540E\u9886\u53D6"),Zt.abrupt("return");case 8:if(!(br.click_event==="Pop")){Zt.next=14;break}return Lr(br.id),Dt(!0),Zt.abrupt("return");case 14:Gt(void 0);case 15:return Zt.next=17,It({type:"competitions/Reward",payload:{competition_module_setting_id:br.id}});case 17:Pr=Zt.sent,Pr&&Pr.status===0&&(mt(),br.click_event==="Link"?(u.b.info("\u9886\u53D6\u6210\u529F"),window.open(br.click_info)):u.b.info(br.click_info));case 19:case"end":return Zt.stop()}},xr)})),sr.apply(this,arguments)}function Nr(){return rn.apply(this,arguments)}function rn(){return rn=Object(o.a)(r.a.mark(function xr(){var br;return r.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(!(Pt&&!Pt.real_name)){Ft.next=4;break}if(rr){Ft.next=4;break}return u.b.info("\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 4:if(!(Pt&&!Pt.email)){Ft.next=8;break}if(Jt){Ft.next=8;break}return u.b.info("\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 8:if(!(Pt&&!Pt.phone)){Ft.next=12;break}if(Dr){Ft.next=12;break}return u.b.info("\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 12:if(qt){Ft.next=15;break}return u.b.info("\u8BF7\u9009\u62E9\u4F60\u7684\u5E74\u7EA7"),Ft.abrupt("return");case 15:return Ft.next=17,It({type:"competitions/Reward",payload:{competition_module_setting_id:st,className:qt,name:rr,mail:Jt,phone:Dr}});case 17:br=Ft.sent,br&&br.status===0&&(Dt(!1),mt(),u.b.info("HCIA\u8BA4\u8BC1\u8003\u8BD5\u4EE3\u91D1\u52B5\u5C06\u7531Educoder\u5E73\u53F0\u7EDF\u4E00\u53D1\u653E\uFF0C\u8BF7\u53CA\u65F6\u5173\u6CE8\u90AE\u7BB1\u6216\u7AD9\u5185\u77ED\u4FE1\u67E5\u6536"));case 19:case"end":return Ft.stop()}},xr)})),rn.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement(T.a,{visible:At,title:"\u5B8C\u5584\u4FE1\u606F",onCancel:function(){return Dt(!1)},onOk:function(){Nr()}},t.a.createElement("p",null,"\u60A8\u7684\u59D3\u540D\uFF1A",t.a.createElement(U.a,{className:Pt&&Pt.real_name?"":O.a.bkfff,style:{width:"300px",marginLeft:"14px",background:Pt&&Pt.phone?"":"#ffffff!important"},value:Pt&&Pt.real_name||rr,disabled:Pt&&Pt.real_name||!1,onChange:function(br){return Et(br.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u90AE\u7BB1\uFF1A",t.a.createElement(U.a,{className:Pt&&Pt.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:Pt&&Pt.phone?"":"#ffffff!important"},value:Pt&&Pt.email||Jt,disabled:Pt&&Pt.email||!1,onChange:function(br){return pr(br.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u624B\u673A\u53F7\uFF1A",t.a.createElement(U.a,{style:{width:"300px"},className:Pt&&Pt.phone?"":"bkfff",value:Pt&&Pt.phone||Dr,disabled:Pt&&Pt.phone||!1,onChange:function(br){return an(br.target.value)}})),"\u60A8\u7684\u5E74\u7EA7\uFF1A",t.a.createElement(ye.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(br){Gt(br)}},t.a.createElement(ue,{value:"\u5927\u4E00"},"\u5927\u4E00"),t.a.createElement(ue,{value:"\u5927\u4E8C"},"\u5927\u4E8C"),t.a.createElement(ue,{value:"\u5927\u4E09"},"\u5927\u4E09"),t.a.createElement(ue,{value:"\u5927\u56DB"},"\u5927\u56DB"),t.a.createElement(ue,{value:"\u5927\u4E94"},"\u5927\u4E94"),t.a.createElement(ue,{value:"\u7855\u4E00"},"\u7855\u4E00"),t.a.createElement(ue,{value:"\u7855\u4E8C"},"\u7855\u4E8C"),t.a.createElement(ue,{value:"\u7855\u4E09"},"\u7855\u4E09"),t.a.createElement(ue,{value:"\u535A\u4E00"},"\u535A\u4E00"),t.a.createElement(ue,{value:"\u535A\u4E8C"},"\u535A\u4E8C"),t.a.createElement(ue,{value:"\u535A\u4E09"},"\u535A\u4E09"),t.a.createElement(ue,{value:"\u535A\u56DB"},"\u535A\u56DB"),t.a.createElement(ue,{value:"\u535A\u4E94"},"\u535A\u4E94")),t.a.createElement("p",{style:{marginTop:"1em"}},"\u63D0\u9192\uFF1A\u5982\u65E0\u534E\u4E3A\u4E91\u8D26\u53F7\uFF0C\u8BF7\u5C3D\u5FEB\u6CE8\u518C\u534E\u4E3A\u4E91\uFF01")),it&&it.length>3?t.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},t.a.createElement("span",{className:O.a.spanprev,onClick:function(){Ht.current.prev()}},t.a.createElement(Oe.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),t.a.createElement(Ae.a,{ref:Ht,className:O.a.divwidth,slidesToShow:3,slidesToScroll:1},it&&it.map(function(xr,br){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:X.a.IMG_SERVER+"/".concat(xr.image_url)}),xr.user_received===!1||xr.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return qe(xr)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})),t.a.createElement("span",{className:O.a.spannext,onClick:function(){Ht.current.next()}},t.a.createElement(xe.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):t.a.createElement("div",{className:O.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},it&&it.map(function(xr,br){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:X.a.IMG_SERVER+"/".concat(xr.image_url)}),xr.user_received===!1||xr.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return qe(xr)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})))}var re=le,pe=function(it,mt){var Ct=it.StaffDetail,It=it.HeaderDetail,Pt=it.ItemData,Ht=it.setIssee,Wt=it.ModelType,dt=it.dispatch,At=it.userinfo,Dt=it.Editable,yr=Object(a.useState)(!1),tr=Object(h.a)(yr,2),qt=tr[0],Gt=tr[1],nr=Object(a.useState)([]),cr=Object(h.a)(nr,2),st=cr[0],Lr=cr[1],Fr=Object(a.useState)(""),Cr=Object(h.a)(Fr,2),rr=Cr[0],Et=Cr[1],_t=Object(a.useState)(""),xt=Object(h.a)(_t,2),Jt=xt[0],pr=xt[1],dr=Object(a.useState)(!1),fr=Object(h.a)(dr,2),Dr=fr[0],an=fr[1],qe=Object(w.i)(),sr=qe.identifier,Nr=Object(a.useRef)(null),rn=Object(a.useRef)(null);Nr.current=Ct==null?void 0:Ct.enrolled,Object(a.useEffect)(function(){var Ft;return(Ft=rn.current)===null||Ft===void 0||Ft.addEventListener("click",xr),function(){var Zt;(Zt=rn.current)===null||Zt===void 0||Zt.removeEventListener("click",xr)}},[]);var xr=function(Zt){var wr;if((Zt==null||((wr=Zt.target)===null||wr===void 0)?void 0:wr.id)==="modal-upload"){if(!Object(fe.e)(dt))return;if(!Nr.current){T.a.info({title:"\u63D0\u793A",centered:!0,okText:"\u6211\u77E5\u9053\u4E86",content:"\u8BF7\u5148\u62A5\u540D\uFF0C\u518D\u63D0\u4EA4\u4F5C\u54C1"});return}Gt(!0)}};Object(a.useEffect)(function(){if(It!=null&&It.upload_file){var Ft,Zt,wr;Lr([{name:It==null||((Ft=It.upload_file)===null||Ft===void 0)?void 0:Ft.title,status:"done",uid:"123456789"}]),pr(It==null?void 0:It.upload_file_url),Et(It==null||((Zt=It.upload_file)===null||Zt===void 0||((wr=Zt.url)===null||wr===void 0))?void 0:wr.split("/")[3])}},[It==null?void 0:It.upload_file]);var br={name:"file",multiple:!1,withCredentials:!0,action:X.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:st,onChange:function(Zt){var wr=Zt.file.status,er=[Object(L.a)({},Zt.file)];if(Lr(er),Zt.file.status==="uploading"&&an(!0),wr==="done"){var vt,yt;Et((vt=er[0])===null||vt===void 0||((yt=vt.response)===null||yt===void 0)?void 0:yt.id),an(!1)}wr==="error"&&(Lr([]),an(!1))},beforeUpload:function(Zt){var wr=Zt.size/1024/1024<1e3;return wr?Promise.resolve():(u.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E1000MB"),Promise.reject())}},Pr=function(){Gt(!0)};return Object(a.useImperativeHandle)(mt,function(){return{handleVisible:Pr}}),t.a.createElement("div",{ref:rn},Wt==="reward"?t.a.createElement(re,{userlist:At,dispatch:dt,rewarddata:Pt.reward_setting,is_signed:Pt.is_signed}):null,t.a.createElement("div",{style:{textAlign:"right"}},((At==null?void 0:At.admin)||(At==null?void 0:At.business)||Dt)&&t.a.createElement(S.a,{onClick:function(){return Ht(!1)}},"\u7F16\u8F91")),t.a.createElement(W.a,{value:Pt.md_content}),Pt&&Pt.attachments&&Pt.attachments.map(function(Ft,Zt){return t.a.createElement("div",null,t.a.createElement("a",{href:(X.a===null||X.a===void 0?void 0:X.a.API_SERVER)+Ft.url,target:"_self",download:Ft.title},t.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),t.a.createElement("span",{style:{color:"#000000"}},Ft.title),t.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},Ft.filesize)))}),t.a.createElement(T.a,{centered:!0,title:"\u4E0A\u4F20\u4F5C\u54C1",visible:qt,okText:"\u63D0\u4EA4\u4F5C\u54C1",cancelText:"\u53D6\u6D88",confirmLoading:Dr,onCancel:function(){return Gt(!1)},onOk:Object(o.a)(r.a.mark(function Ft(){var Zt;return r.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(!(!rr&&!Jt)){er.next=3;break}return Gt(!1),er.abrupt("return");case 3:return an(!0),er.next=6,Object(ne.a)("/api/competitions/".concat(sr,"/upload_file.json"),{method:"post",body:{attachment_id:rr,upload_file_url:Jt}});case 6:Zt=er.sent,Zt.status===0&&(Gt(!1),an(!1));case 8:case"end":return er.stop()}},Ft)}))},t.a.createElement("div",null,t.a.createElement(B.a,{align:"middle",className:"mb20"},t.a.createElement("span",null,"\u4F5C\u54C1\u94FE\u63A5\uFF1A"),t.a.createElement(U.a,{style:{width:416},value:Jt,onChange:function(Zt){var wr;return pr((wr=Zt.target)===null||wr===void 0?void 0:wr.value)}})),t.a.createElement(B.a,{align:"top"},t.a.createElement("span",{style:{lineHeight:"28px"}},"\u4F5C\u54C1\u6587\u4EF6\uFF1A"),t.a.createElement(y.a,br,t.a.createElement(S.a,{type:"primary",className:"mb10"},"\u4E0A\u4F20\u4F5C\u54C1"))))))},ee=Object(a.forwardRef)(pe),te=D("Ot1p"),ce=D("hJwl");function q(Tt){var it=Tt.ItemData,mt=Tt.setIssee,Ct=Tt.MenuItem,It=Tt.dispatch,Pt=Tt.identifier,Ht=Tt.ModelType,Wt=Tt.userinfo,dt=Tt.getrightdatas,At=Object(a.useState)([]),Dt=Object(h.a)(At,2),yr=Dt[0],tr=Dt[1],qt=Object(a.useState)(it.md_content),Gt=Object(h.a)(qt,2),nr=Gt[0],cr=Gt[1];Object(a.useEffect)(function(){var Et,_t=[];it==null||((Et=it.attachments)===null||Et===void 0)||Et.map(function(xt){var Jt={uid:xt.id,name:xt.title,response:{id:xt.id}};_t.push(Jt)}),tr(_t)},[it==null?void 0:it.attachments]);function st(){var Et,_t=[];return it==null||((Et=it.attachments)===null||Et===void 0)||Et.map(function(xt){var Jt={uid:xt==null?void 0:xt.id,name:xt.title,response:{id:xt.id}};_t.push(Jt)}),_t}var Lr={name:"file",multiple:!0,withCredentials:!0,action:X.a.API_SERVER+"/api/attachments.json",defaultFileList:st(),onRemove:function(_t){Object(ce.t)({id:_t.uid})},onChange:function(_t){var xt=_t.file.status;xt!=="uploading",xt==="removed"&&tr(_t.fileList),xt==="done"?(tr(_t.fileList),u.b.success("".concat(_t.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))):xt==="error"&&u.b.error("".concat(_t.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(_t){var xt=_t.size/1024/1024<150;return xt||u.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),xt}};console.log(Lr);function Fr(){return Cr.apply(this,arguments)}function Cr(){return Cr=Object(o.a)(r.a.mark(function Et(){var _t;return r.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return Jt.next=2,It({type:"competitions/updateMdContent",payload:{attachment_ids:rr(yr),competition_module_id:it.id,md_content_id:it.md_id,content:nr,identifier:Pt}});case 2:_t=Jt.sent,_t&&(u.b.info("\u63D0\u4EA4\u6210\u529F"),mt(!0),dt(Ct));case 4:case"end":return Jt.stop()}},Et)})),Cr.apply(this,arguments)}function rr(Et){var _t=[];return Et&&Et.map(function(xt){_t.push(xt.response.id)}),_t}return t.a.createElement("div",null,Ht==="reward"?t.a.createElement(re,{userlist:Wt,dispatch:It,rewarddata:it.reward_setting,is_signed:it.is_signed}):null,t.a.createElement(te.a,{defaultValue:nr,onChange:function(_t){return cr(_t)}}),t.a.createElement(y.a,Lr,t.a.createElement(S.a,{className:"uploadBtn"},"\u4E0A\u4F20\u9644\u4EF6"),"(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(S.a,{style:{width:"90px"},type:"primary",onClick:function(){return Fr()}},"\u63D0\u4EA4"),t.a.createElement(S.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return mt(!0)}},"\u53D6\u6D88")))}var Q=q,V=D("g9YV"),Z=D("wCAj"),be=D("Znn+"),ge=D("ZTPi");function Te(){return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement("img",{src:X.a.IMG_SERVER+"/images/educoder/competitions/trophy.png"}),t.a.createElement("p",null,"\u8981\u6293\u4F4F\u4E00\u5207\u673A\u4F1A\uFF0C\u5411\u6240\u6709\u4EBA\u8BC1\u660E\u81EA\u5DF1\uFF0C\u8BC1\u660E\u4F60\u80FD\u591F\u8FCE\u63A5\u8363\u8000")))}var Je=Te,rt=D("5Dmo"),nt=D("3S7+"),at=D("jCWc"),ct=D("kPKH"),ht=D("IzEo"),He=D("bx4M");function Re(Tt){var it=Tt.oneItem,mt=Tt.towItem,Ct=Tt.threeItem;return t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement(B.a,{gutter:16,style:{justifyContent:"center"}},t.a.createElement(ct.a,{span:6,style:{marginTop:"30px",marginRight:"20px"}},t.a.createElement(He.a,{title:t.a.createElement("div",{className:O.a.towtop},t.a.createElement("img",{style:{marginTop:"20px"},src:X.a.IMG_SERVER+"/images/educoder/huangguan-two.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(E.a,{to:"/users/".concat(mt==null?void 0:mt.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:X.a.IMG_SERVER+"/images/".concat(mt==null?void 0:mt.user_image)}),(mt==null?void 0:mt.competition_prize)&&t.a.createElement("p",{className:O.a.prize},mt==null?void 0:mt.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},mt==null?void 0:mt.record_user_name)))),className:O.a.towdiv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},mt==null?void 0:mt.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},mt==null?void 0:mt.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(mt==null?void 0:mt.extra_score)+parseFloat(mt==null?void 0:mt.score),"\u5206"))),t.a.createElement(ct.a,{span:6},t.a.createElement(He.a,{title:t.a.createElement("div",{className:O.a.onetop},t.a.createElement("img",{style:{marginTop:"20px"},src:X.a.IMG_SERVER+"/images/educoder/huangguan.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(E.a,{to:"/users/".concat(it==null?void 0:it.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:X.a.IMG_SERVER+"/images/".concat(it==null?void 0:it.user_image)}),(it==null?void 0:it.competition_prize)&&t.a.createElement("p",{className:O.a.prize},it==null?void 0:it.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},it==null?void 0:it.record_user_name)))),className:O.a.onediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},it==null?void 0:it.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},it==null?void 0:it.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(it==null?void 0:it.extra_score)+parseFloat(it==null?void 0:it.score),"\u5206"))),t.a.createElement(ct.a,{span:6,style:{marginTop:"40px",marginLeft:"20px"}},t.a.createElement(He.a,{title:t.a.createElement("div",{className:O.a.threetop},t.a.createElement("img",{style:{marginTop:"20px"},src:X.a.IMG_SERVER+"/images/educoder/huangguan-three.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(E.a,{to:"/users/".concat(Ct==null?void 0:Ct.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:X.a.IMG_SERVER+"/images/".concat(Ct==null?void 0:Ct.user_image)}),(Ct==null?void 0:Ct.competition_prize)&&t.a.createElement("p",{className:O.a.prize},Ct==null?void 0:Ct.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},Ct==null?void 0:Ct.record_user_name)))),className:O.a.threediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},Ct==null?void 0:Ct.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},Ct==null?void 0:Ct.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(Ct==null?void 0:Ct.extra_score)+parseFloat(Ct==null?void 0:Ct.score),"\u5206")))))}var tt=Re;function ft(Tt){var it,mt,Ct,It,Pt,Ht,Wt,dt,At,Dt,yr,tr,qt,Gt,nr,cr,st,Lr,Fr,Cr,rr,Et,_t,xt,Jt,pr,dr,fr,Dr,an,qe=Tt.ItemData;return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement(tt,{oneItem:qe==null?void 0:qe.teams[0],towItem:qe==null?void 0:qe.teams[1],threeItem:qe==null?void 0:qe.teams[2]}),(qe==null||((it=qe.user_ranks)===null||it===void 0)?void 0:it.length)>0&&t.a.createElement("div",{className:O.a.myTeam},(qe==null||((mt=qe.user_ranks)===null||mt===void 0||((Ct=mt[0])===null||Ct===void 0))?void 0:Ct.success)===!1?t.a.createElement("span",{style:{marginRight:"70px",padding:"10px"}},t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u664B\u7EA7\uFF1A",t.a.createElement("span",{style:{color:(qe==null||((It=qe.user_ranks)===null||It===void 0||((Pt=It[0])===null||Pt===void 0))?void 0:Pt.success)===!1?"red":"green"}},(qe==null||((Ht=qe.user_ranks)===null||Ht===void 0||((Wt=Ht[0])===null||Wt===void 0))?void 0:Wt.success)===!1?"\u5426":qe!=null&&(dt=qe.user_ranks)!==null&&dt!==void 0&&(At=dt[0])!==null&&At!==void 0&&At.success?"\u662F":"")),(qe==null||((Dt=qe.user_ranks)===null||Dt===void 0||((yr=Dt[0])===null||yr===void 0))?void 0:yr.awards)&&t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u83B7\u5956\uFF1A",t.a.createElement("span",null,(qe==null||((tr=qe.user_ranks)===null||tr===void 0||((qt=tr[0])===null||qt===void 0))?void 0:qt.awards)==="percent_20"?"\u4E8C\u7B49\u5956":(qe==null||((Gt=qe.user_ranks)===null||Gt===void 0||((nr=Gt[0])===null||nr===void 0))?void 0:nr.awards)==="percent_30"?"\u4E09\u7B49\u5956":"\u6CA1\u6709\u83B7\u5F97\u5956\u9879"))):t.a.createElement("span",{style:{marginRight:"70px"}},"\u6211\u7684\u6392\u540D\uFF1A",qe==null||((cr=qe.user_ranks)===null||cr===void 0||((st=cr[0])===null||st===void 0))?void 0:st.rank),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6218\u961F\u540D"},qe==null||((Lr=qe.user_ranks)===null||Lr===void 0||((Fr=Lr[0])===null||Fr===void 0))?void 0:Fr.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u65F6\u95F4"},qe==null||((Cr=qe.user_ranks)===null||Cr===void 0||((rr=Cr[0])===null||rr===void 0))?void 0:rr.cost_time)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(nt.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},qe==null||((Et=qe.user_ranks)===null||Et===void 0||((_t=Et[0])===null||_t===void 0))?void 0:_t.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},qe==null||((xt=qe.user_ranks)===null||xt===void 0||((Jt=xt[0])===null||Jt===void 0))?void 0:Jt.score)),t.a.createElement("span",null,t.a.createElement(nt.a,{title:"\u603B\u5206"},parseFloat(qe==null||((pr=qe.user_ranks)===null||pr===void 0||((dr=pr[0])===null||dr===void 0))?void 0:dr.extra_score)+parseFloat(qe==null||((fr=qe.user_ranks)===null||fr===void 0||((Dr=fr[0])===null||Dr===void 0))?void 0:Dr.score)||0))),qe==null||((an=qe.teams)===null||an===void 0)?void 0:an.map(function(sr,Nr){return t.a.createElement("div",{className:O.a.bottomItem},t.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},Nr+1),t.a.createElement(E.a,{to:"/users/".concat(sr==null?void 0:sr.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},t.a.createElement("img",{className:O.a.imgradius,src:X.a.IMG_SERVER+"/images/".concat(sr==null?void 0:sr.user_image)}),(sr==null?void 0:sr.competition_prize)&&t.a.createElement("span",{className:O.a.spanrightradius},sr==null?void 0:sr.competition_prize)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6218\u961F\u540D"},sr==null?void 0:sr.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u5355\u4F4D/\u5B66\u6821\u540D"},sr.school_name)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(nt.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},sr.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},sr.score)),t.a.createElement("span",{style:{color:"#0152d9"}},t.a.createElement(nt.a,{title:"\u603B\u5206"},parseFloat(sr.extra_score)+parseFloat(sr.score))))}))}var Qe=ft,lt=ge.a.TabPane;function Ue(Tt){var it,mt,Ct,It,Pt,Ht,Wt=Tt.ChartRules,dt=Tt.ItemData,At=Tt.getCharts,Dt=Tt.Selectkey,yr=Tt.getChartRules,tr=Tt.userinfo,qt=Tt.Editable,Gt=Tt.HeaderDetail,nr=Object(a.useState)(!1),cr=Object(h.a)(nr,2),st=cr[0],Lr=cr[1],Fr=Object(a.useState)(""),Cr=Object(h.a)(Fr,2),rr=Cr[0],Et=Cr[1],_t=Object(a.useState)(!0),xt=Object(h.a)(_t,2),Jt=xt[0],pr=xt[1],dr=Object(a.useState)(),fr=Object(h.a)(dr,2),Dr=fr[0],an=fr[1],qe=Object(a.useState)(),sr=Object(h.a)(qe,2),Nr=sr[0],rn=sr[1],xr=Object(w.i)(),br=xr.identifier;Object(a.useEffect)(function(){if(Jt){var wr,er=Wt==null||((wr=Wt.stages)===null||wr===void 0)?void 0:wr[0];if(an(er),er!=null&&er.id){var vt,yt,zt;((Gt==null?void 0:Gt.task)==="mAP"||(Gt==null?void 0:Gt.task)==="dog")&&At(er==null?void 0:er.id),Et(((vt=Wt.rule_contents)===null||vt===void 0||((yt=vt.filter(function(fn){return parseInt(fn.competition_stage_id)===parseInt(er==null?void 0:er.id)}))===null||yt===void 0||((zt=yt[0])===null||zt===void 0))?void 0:zt.content)||"")}else{var Mt,Mr,cn;(Gt==null?void 0:Gt.task)==="mAP"||(Gt==null?void 0:Gt.task)==="dog",Et(((Mt=Wt.rule_contents)===null||Mt===void 0||((Mr=Mt.filter(function(fn){return parseInt(fn.competition_stage_id)===0}))===null||Mr===void 0||((cn=Mr[0])===null||cn===void 0))?void 0:cn.content)||"")}}},[Wt]);function Pr(){return Ft.apply(this,arguments)}function Ft(){return Ft=Object(o.a)(r.a.mark(function wr(){var er,vt,yt,zt,Mt,Mr,cn,fn,kr;return r.a.wrap(function(Ur){for(;;)switch(Ur.prev=Ur.next){case 0:if(rr){Ur.next=3;break}return u.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Ur.abrupt("return");case 3:if(pr(!1),er=Dr==null?void 0:Dr.id,!er){Ur.next=12;break}return Ur.next=8,Object(ne.a)("/api/competitions/".concat(br,"/update_md_content.json"),{method:"post",body:{competition_module_id:Dt,content:rr,md_content_id:(vt=Wt.rule_contents)===null||vt===void 0||((yt=vt.filter(function(gn){return parseInt(gn.competition_stage_id)===parseInt(er)}))===null||yt===void 0||((zt=yt[0])===null||zt===void 0))?void 0:zt.id,stage_id:Dr==null?void 0:Dr.id}});case 8:Mt=Ur.sent,Mt.status===0&&(u.b.info("\u66F4\u65B0\u6210\u529F"),Lr(!1),yr()),Ur.next=16;break;case 12:return Ur.next=14,Object(ne.a)("/api/competitions/".concat(br,"/update_md_content.json"),{method:"post",body:{competition_module_id:Dt,content:rr,md_content_id:(Mr=Wt.rule_contents)===null||Mr===void 0||((cn=Mr.filter(function(gn){return parseInt(gn.competition_stage_id)===0}))===null||cn===void 0||((fn=cn[0])===null||fn===void 0))?void 0:fn.id,stage_id:Dr==null?void 0:Dr.id}});case 14:kr=Ur.sent,kr.status===0&&(u.b.info("\u66F4\u65B0\u6210\u529F"),Lr(!1),yr());case 16:case"end":return Ur.stop()}},wr)})),Ft.apply(this,arguments)}var Zt=[{title:"\u6392\u540D",dataIndex:"name",align:"center",key:"name",render:function(er,vt,yt){return t.a.createElement("span",null,yt+1)}},{title:"\u5934\u50CF",dataIndex:"user_image",align:"center",key:"user_image",render:function(er){return t.a.createElement("img",{className:O.a.imgradius,src:X.a.IMG_SERVER+"/images/".concat(er)})}},{title:"\u6218\u961F\u540D\u79F0",dataIndex:"team_name",key:"team_name",render:function(er){return t.a.createElement("span",{title:er},er&&(er==null?void 0:er.length)>=15?(er==null?void 0:er.substr(0,15))+"...":er||"--")}},{title:"\u5355\u4F4D",dataIndex:"school_name",key:"school_name",align:"center",render:function(er){return t.a.createElement("span",null,er||"--")}},{title:(Gt==null?void 0:Gt.task)==="mAP"?"mAP\u6307\u6807":(Gt==null?void 0:Gt.task)==="Jittor-3"?"\u603B\u5206":"top1\u6307\u6807",dataIndex:"score",key:"score",render:function(er){return t.a.createElement("span",null,er||"--")}}];return t.a.createElement("div",null,(Wt==null||((it=Wt.stages)===null||it===void 0)?void 0:it.length)>0?null:t.a.createElement(Je,null),(Wt==null||((mt=Wt.stages)===null||mt===void 0)?void 0:mt.length)>0&&t.a.createElement(ge.a,{animated:!0,tabBarExtraContent:((tr==null?void 0:tr.admin)||(tr==null?void 0:tr.business)||qt)&&t.a.createElement(S.a,{onClick:function(){Lr(!0)}},"\u7F16\u8F91"),onChange:function(er){var vt,yt,zt,Mt,Mr;Lr(!1);var cn=Wt==null||((vt=Wt.stages)===null||vt===void 0)?void 0:vt.filter(function(kr){return parseInt(er)===parseInt(kr==null?void 0:kr.id)})[0];an(cn);var fn=cn==null||((yt=cn.children)===null||yt===void 0)?void 0:yt[0];rn(fn),Et(((zt=Wt.rule_contents)===null||zt===void 0||((Mt=zt.filter(function(kr){return parseInt(kr.competition_stage_id)===parseInt(cn==null?void 0:cn.id)}))===null||Mt===void 0||((Mr=Mt[0])===null||Mr===void 0))?void 0:Mr.content)||""),At((fn==null?void 0:fn.id)||er)}},Wt&&Wt.stages.map(function(wr,er){return t.a.createElement(lt,{tab:wr.name,key:wr.id===null?0:wr.id},st===!1&&Wt&&Wt.rule_contents.map(function(vt,yt){if(wr.id===vt.competition_stage_id)return t.a.createElement(W.a,{key:yt,value:vt.content===void 0||vt.content===null?"":vt.content});if(wr.id===null&&vt.competition_stage_id===0)return t.a.createElement(W.a,{key:yt,value:vt.content===void 0||vt.content===null?"":vt.content})}))})),(Dr==null||((Ct=Dr.children)===null||Ct===void 0)?void 0:Ct.length)>0&&t.a.createElement(ge.a,{activeKey:(Nr==null?void 0:Nr.id)+"",onChange:function(er){var vt,yt=Dr==null||((vt=Dr.children)===null||vt===void 0)?void 0:vt.filter(function(zt){return parseInt(er)===parseInt(zt==null?void 0:zt.id)})[0];rn(yt),At(er)}},Dr==null||((It=Dr.children)===null||It===void 0)?void 0:It.map(function(wr,er){return t.a.createElement(lt,{tab:wr.name,key:wr.id===null?0:wr.id})})),st&&t.a.createElement("div",null,t.a.createElement(te.a,{defaultValue:rr,onChange:function(er){Et(er)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(S.a,{style:{width:"90px"},type:"primary",onClick:function(){return Pr()}},"\u63D0\u4EA4"),t.a.createElement(S.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return Lr(!1)}},"\u53D6\u6D88"))),(dt==null||((Pt=dt.teams)===null||Pt===void 0)?void 0:Pt.length)>0&&((Gt==null?void 0:Gt.task)==="mAP"||(Gt==null?void 0:Gt.task)==="dog"||(Gt==null?void 0:Gt.task)==="Jittor-3")?t.a.createElement(Z.a,{dataSource:dt==null?void 0:dt.teams,columns:Zt,pagination:!1}):(dt==null||((Ht=dt.teams)===null||Ht===void 0)?void 0:Ht.length)>0&&t.a.createElement(Qe,{ItemData:dt}))}var Le=Ue,Ie=D("/zsF"),Ce=D("PArb");function Se(Tt){var it,mt,Ct,It,Pt,Ht,Wt,dt=Tt.Prize,At=Object(w.i)(),Dt=Object(a.useState)([{type:1,name:"\u56E2\u4F53\u5956\u8BC1\u4E66"},{type:2,name:"\u4E2A\u4EBA\u5956\u8BC1\u4E66"},{type:3,name:"\u4F18\u79C0\u6307\u5BFC\u6559\u5E08\u8BC1\u4E66"}]),yr=Object(h.a)(Dt,2),tr=yr[0],qt=yr[1],Gt=function(){var nr=Object(o.a)(r.a.mark(function cr(st){var Lr;return r.a.wrap(function(Cr){for(;;)switch(Cr.prev=Cr.next){case 0:return Cr.next=2,Object(ce.u)({type:st.type,id:At.identifier});case 2:Lr=Cr.sent,(Lr==null?void 0:Lr.status)===0&&(location.href="/competitions/exports?id=".concat(At.identifier,"&type=").concat(st.type));case 4:case"end":return Cr.stop()}},cr)}));return function(st){return nr.apply(this,arguments)}}();return t.a.createElement("div",null,t.a.createElement("p",{className:O.a.downloadpdf},"\u6E29\u99A8\u63D0\u793A\uFF1A\u586B\u5199\u7684\u4E2A\u4EBA\u4FE1\u606F\u7ECF\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u4E2A\u4EBA\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\uFF1B\u56E2\u961F\u961F\u5458\u4FE1\u606F\u5168\u90E8\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u56E2\u961F\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\u3002"),t.a.createElement("p",{style:{marginTop:"30px",fontSize:"16px",color:"#000"}},"\u8BC1\u4E66\u60C5\u51B5"),(dt==null||((it=dt.personal_certifications)===null||it===void 0)?void 0:it.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:X.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:X.a.API_SERVER+"".concat(dt==null||((mt=dt.personal_certifications[0])===null||mt===void 0)?void 0:mt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210"),t.a.createElement("span",{style:{marginLeft:"20px"}},"\u539F\u56E0\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u7EC4\u59D4\u4F1A\u672A\u5B8C\u6210\u8BC1\u4E66\u5BA1\u6279\uFF0C\u8BF7\u7A0D\u540E")),(dt==null||((Ct=dt.team_certifications)===null||Ct===void 0)?void 0:Ct.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:X.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:X.a.API_SERVER+"".concat(dt==null||((It=dt.team_certifications[0])===null||It===void 0)?void 0:It.url)},"\u7ACB\u5373\u4E0B\u8F7D")):t.a.createElement("p",null,t.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210")),t.a.createElement(Ce.a,null),(dt==null||((Pt=dt.teams)===null||Pt===void 0)?void 0:Pt.length)>0?t.a.createElement("div",null,t.a.createElement("p",null,(dt==null?void 0:dt.teams)&&(dt==null||((Ht=dt.teams[0])===null||Ht===void 0)?void 0:Ht.name),"\u6218\u961F\u4FE1\u606F\u586B\u62A5\u6982\u51B5"),t.a.createElement("p",{style:{display:"flex",height:"50px",background:"#f5f5f5",alignItems:"center",justifyContent:"space-around"}},t.a.createElement("span",{style:{width:"5%"}},"\u89D2\u8272"),t.a.createElement("span",{style:{width:"5%"}},"\u59D3\u540D"),t.a.createElement("span",{style:{width:"10%"}},"\u5B9E\u540D\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},"\u804C\u4E1A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},"\u624B\u673A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},"\u90AE\u7BB1\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},"\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7\u4FE1\u606F\uFF08\u961F\u957F\u586B\u5199\uFF09")),(dt==null?void 0:dt.teams)&&(dt==null||((Wt=dt.teams[0])===null||Wt===void 0)?void 0:Wt.team_members.map(function(nr,cr){var st,Lr,Fr,Cr,rr,Et;return t.a.createElement("p",{className:O.a.teamItem},t.a.createElement("span",{style:{width:"5%"}},nr==null?void 0:nr.role),t.a.createElement("span",{style:{width:"5%"}},nr==null?void 0:nr.name),t.a.createElement("span",{style:{width:"10%"}},(nr==null?void 0:nr.real_name_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(nr==null?void 0:nr.real_name_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},(nr==null?void 0:nr.professional_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(nr==null?void 0:nr.professional_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},nr!=null&&nr.phone_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},nr!=null&&nr.email_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),(nr==null?void 0:nr.role)==="\u961F\u957F"?t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(dt==null?void 0:dt.teams)&&(dt==null||((st=dt.teams[0])===null||st===void 0||((Lr=st.bank_account)===null||Lr===void 0))?void 0:Lr.bank),(dt==null?void 0:dt.teams)&&(dt==null||((Fr=dt.teams[0])===null||Fr===void 0||((Cr=Fr.bank_account)===null||Cr===void 0))?void 0:Cr.second_bank),(dt==null?void 0:dt.teams)&&(dt==null||((rr=dt.teams[0])===null||rr===void 0||((Et=rr.bank_account)===null||Et===void 0))?void 0:Et.card_no)):t.a.createElement("span",{style:{width:"50%"}}))}))):null,t.a.createElement(B.a,{gutter:[20,20]},tr.map(function(nr,cr){return t.a.createElement(ct.a,{key:cr},t.a.createElement(S.a,{type:"primary",onClick:function(){return Gt(nr)}},nr.name))})))}var ke=Se,Ne=D("0Owb"),et=D("7Kak"),$e=D("9yH6"),bt=D("y8nQ"),gt=D("Vl3Y"),Ut=D("1vsH"),Nt=D("Dgm7"),hr=D.n(Nt),mr=D("NnUe"),St=D.n(mr),Yr=y.a.Dragger,Jr=10,Hr=function(it){var mt=it.user,Ct=it.account,It=it.globalSetting,Pt=it.loading,Ht=it.dispatch,Wt=Object(m.a)(it,["user","account","globalSetting","loading","dispatch"]),dt=gt.a.useForm(),At=Object(h.a)(dt,1),Dt=At[0],yr=Object(a.useState)({}),tr=Object(h.a)(yr,2),qt=tr[0],Gt=tr[1],nr=Object(a.useState)(!0),cr=Object(h.a)(nr,2),st=cr[0],Lr=cr[1],Fr=Object(a.useState)(),Cr=Object(h.a)(Fr,2),rr=Cr[0],Et=Cr[1],_t=Object(a.useState)(),xt=Object(h.a)(_t,2),Jt=xt[0],pr=xt[1],dr=Object(a.useState)(),fr=Object(h.a)(dr,2),Dr=fr[0],an=fr[1],qe=Object(a.useState)(),sr=Object(h.a)(qe,2),Nr=sr[0],rn=sr[1];Object(a.useEffect)(function(){if(!Ct.basicInfo)return;var er=Ct.basicInfo,vt={name:er.show_realname?er.name:Object(Ut.E)(er.name),gender:er.gender};Et(er.name),Lr(er.show_realname),Dt.setFieldsValue(vt),Gt(vt)},[Ct.basicInfo]);var xr=function(vt){if(vt.file.status==="uploading"){rn(!0);return}if(vt.file.status==="done"){var yt;console.log(vt.file,vt.file.response),an((yt=vt.file.response)===null||yt===void 0?void 0:yt.id),Object(Ut.B)(vt.file.originFileObj,function(zt){pr(zt),rn(!1)})}},br=function(vt){Gt(Object(L.a)({},Dt.getFieldsValue())),"name"in vt&&Et(vt.name)},Pr=function(){var vt=!st;Lr(vt);var yt=vt?rr:Object(Ut.E)(rr);Dt.setFieldsValue({name:yt})},Ft=function(){var er=Object(o.a)(r.a.mark(function vt(yt){var zt,Mt,Mr,cn,fn,kr,on,Ur;return r.a.wrap(function(Vr){for(;;)switch(Vr.prev=Vr.next){case 0:if(Mr=yt||{},cn=Mr.name,fn=Mr.gender,kr=Mr.idNumber,Jt){Vr.next=4;break}return u.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),Vr.abrupt("return");case 4:return Vr.next=6,Ht({type:"account/applyRealNameAuth",payload:{id:((zt=Ct.basicInfo)===null||zt===void 0?void 0:zt.id)||((Mt=mt.userInfo)===null||Mt===void 0?void 0:Mt.login),name:cn,gender:fn,id_number:kr,show_realname:st,attachment_ids:[Dr]}});case 6:on=Vr.sent,Zt(),on&&(u.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),Ht({type:"account/getBasicInfo",payload:{login:(Ur=mt.userInfo)===null||Ur===void 0?void 0:Ur.login}}));case 9:case"end":return Vr.stop()}},vt)}));return function(yt){return er.apply(this,arguments)}}(),Zt=function(){Ht({type:"account/setActionTabs",payload:{}})},wr={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(X.a.API_SERVER,"/api/attachments.json"),className:St.a.uploader,onChange:xr,beforeUpload:function(vt){var yt=vt.type==="image/jpeg"||vt.type==="image/png"||vt.type==="image/jpg"||vt.type==="image/bmp";return yt||u.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),yt}};return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Ct.actionTabs.key==="Account-RealNameAuth",title:"\u4FEE\u6539\u5B9E\u540D\u4FE1\u606F",width:"600px",footer:null},t.a.createElement(d.a,{spinning:!!Nr},t.a.createElement(gt.a,{className:St.a.formWrap,form:Dt,layout:"horizontal",onValuesChange:br,onFinish:Ft},t.a.createElement(gt.a.Item,{label:"\u59D3\u540D",name:"name",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Jr,"\u4E2A\u5B57\u7B26")},{validator:Ut.H}],extra:t.a.createElement("span",null,st?"\uFF08\u663E\u793A\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u60A8\u7684\u771F\u5B9E\u59D3\u540D\uFF09":"\uFF08\u9690\u85CF\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u4F60\u7684\u6635\u79F0\uFF09")},t.a.createElement(U.a,{disabled:!st,placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Jr,"\u4E2A\u5B57\u7B26"),maxLength:Jr,addonAfter:t.a.createElement("i",{className:"iconfont ".concat(st?"icon-xianshi":"icon-yincang"," font18 ").concat(St.a.color0152d9),onClick:Pr})})),t.a.createElement(gt.a.Item,{label:"\u6027\u522B\uFF1A",name:"gender",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6027\u522B"}]},t.a.createElement($e.a.Group,null,t.a.createElement($e.a,{value:0},"\u7537"),t.a.createElement($e.a,{value:1},"\u5973"))),t.a.createElement(gt.a.Item,{label:"\u8BC1\u4EF6\u53F7\uFF1A",labelCol:{span:3},name:"idNumber",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"}]},t.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"})),t.a.createElement(gt.a.Item,{label:"\u8EAB\u4EFD\u8BC1\u4E0A\u4F20",labelCol:{span:3}},t.a.createElement("div",{className:St.a.flexRow},t.a.createElement("div",{className:"".concat(St.a.flexColumn," ").concat(St.a.example)},t.a.createElement("span",{className:St.a.exampleImg},t.a.createElement("img",{src:hr.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(St.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:St.a.flexColumn},t.a.createElement(Yr,Object(Ne.a)({},wr,{accept:".png,.jpg,.bmp,.jpeg"}),Jt?t.a.createElement("img",{src:Jt,className:St.a.uploadImg}):t.a.createElement("div",{className:St.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(St.a.uploadTipIcon)})),t.a.createElement("p",{className:St.a.uploadTip},t.a.createElement("a",{className:St.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:St.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:St.a.footerWrap},t.a.createElement(gt.a.Item,null,t.a.createElement(S.a,{className:"mr5",size:"large",onClick:Zt},"\u53D6\u6D88"),t.a.createElement(S.a,{size:"large",type:"primary",htmlType:"submit",loading:Pt["account/applyRealNameAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:St.a.note},t.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),t.a.createElement("p",null,"1.\u4F60\u9700\u8981\u51C6\u5907\u6709\u6548\u7684\u8EAB\u4EFD\u8BC1\u6B63\u9762\uFF08\u4EBA\u50CF\u9762\uFF09\u7684\u8BC1\u4EF6\u7167\u7167\u7247\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u7247\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),t.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u8BA4\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),t.a.createElement("p",null,"3.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B"),t.a.createElement("p",null,"4.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),t.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),t.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u8BC1\u4EF6\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u5B9E\u540D\u8BA4\u8BC1\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3EduCoder\u8D26\u53F7\u3002"),t.a.createElement("p",null,"7.\u63D0\u4EA4\u5B9E\u540D\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))))},un=Object(f.a)(function(Tt){var it=Tt.user,mt=Tt.account,Ct=Tt.loading,It=Tt.globalSetting;return{user:it,account:mt,globalSetting:It,loading:Ct.effects}})(Hr),Ar=D("O3gP"),vn=D("lrIw"),mn=D("KXlV"),Kt=D.n(mn),or=D("Sjjz"),Xt=D.n(or),gr=U.a.TextArea,Xr=function(it){var mt=it.account,Ct=it.globalSetting,It=it.loading,Pt=it.dispatch,Ht=it.schoolName,Wt=it.departmentName,dt=it.visible,At=it.onClose,Dt=At===void 0?function(){}:At,yr=it.onSuccess,tr=yr===void 0?function(){}:yr,qt=Object(m.a)(it,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),Gt=gt.a.useForm(),nr=Object(h.a)(Gt,1),cr=nr[0],st=Object(a.useRef)();Object(a.useEffect)(function(){st.current=qt.schoolId},[qt.schoolId]),Object(a.useEffect)(function(){cr.setFieldsValue({department:Wt})},[Wt]);var Lr=function(){var Fr=Object(o.a)(r.a.mark(function Cr(rr){var Et,_t,xt,Jt;return r.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return Et=rr||{},_t=Et.department,xt=Et.remarks,dr.next=3,Pt({type:"account/appplyDepartment",payload:{school_id:st.current,name:_t,remarks:xt}});case 3:Jt=dr.sent,Dt(),Jt&&(u.b.success("\u65B0\u589E\u9662\u7CFB/\u90E8\u95E8\u6210\u529F\uFF01"),tr(_t));case 6:case"end":return dr.stop()}},Cr)}));return function(rr){return Fr.apply(this,arguments)}}();return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:dt,title:"\u7533\u8BF7\u6DFB\u52A0\u5B50\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(gt.a,{className:Xt.a.formWrap,form:cr,labelCol:{span:4},wrapperCol:{span:20},onFinish:Lr},t.a.createElement(gt.a.Item,{label:"\u5355\u4F4D\u540D\u79F0\uFF1A"},Ht),t.a.createElement(gt.a.Item,{label:"\u90E8\u95E8\u540D\u79F0\uFF1A",name:"department",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"}]},t.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"})),t.a.createElement(gt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(gr,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:Xt.a.footerWrap},t.a.createElement(gt.a.Item,null,t.a.createElement(S.a,{className:"mr5",size:"large",onClick:function(){Dt()}},"\u53D6\u6D88"),t.a.createElement(S.a,{size:"large",type:"primary",htmlType:"submit",loading:It["account/appplyDepartment"]},"\u4FDD\u5B58")))))},kn=Object(f.a)(function(Tt){var it=Tt.account,mt=Tt.loading,Ct=Tt.globalSetting;return{account:it,globalSetting:Ct,loading:mt.effects}})(Xr),Ln=D("6UJt"),tn=D("DFOY"),ur=D("jO45"),Xn=D("jN4g"),hi=D("gJ3r"),$n=D("jwmR"),Zr=D.n($n),Bn=function(it,mt){return mt.some(function(Ct){return Ct.label.toLowerCase().indexOf(it.toLowerCase())>-1})},si=U.a.TextArea,li=function(it){var mt=it.account,Ct=it.globalSetting,It=it.loading,Pt=it.dispatch,Ht=it.schoolName,Wt=it.visible,dt=it.onClose,At=dt===void 0?function(){}:dt,Dt=it.onSuccess,yr=Dt===void 0?function(){}:Dt,tr=Object(m.a)(it,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),qt=gt.a.useForm(),Gt=Object(h.a)(qt,1),nr=Gt[0];Object(a.useEffect)(function(){nr.setFieldsValue({name:Ht})},[Ht]);var cr=function(){var st=Object(o.a)(r.a.mark(function Lr(Fr){var Cr,rr,Et,_t,xt,Jt,pr;return r.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return Cr=Fr||{},rr=Cr.name,Et=Cr.city,_t=Et===void 0?[]:Et,xt=Cr.address,Jt=Cr.remarks,fr.next=3,Pt({type:"account/appplySchool",payload:{name:rr,province:_t[0],city:_t[1],address:xt,remarks:Jt}});case 3:pr=fr.sent,At(),pr&&(u.b.success("\u65B0\u589E\u5B66\u6821/\u5355\u4F4D\u6210\u529F\uFF01"),yr(rr));case 6:case"end":return fr.stop()}},Lr)}));return function(Fr){return st.apply(this,arguments)}}();return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Wt,title:"\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(gt.a,{className:Zr.a.formWrap,form:nr,labelCol:{span:4},wrapperCol:{span:20},onFinish:cr},t.a.createElement(gt.a.Item,{label:"\u5355\u4F4D\u5168\u79F0\uFF1A",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"}]},t.a.createElement(U.a,{placeholder:"\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"})),t.a.createElement("div",{className:"".concat(Zr.a.flexRow," ").concat(Zr.a.example)},t.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),t.a.createElement("div",{className:Zr.a.flexColumn},t.a.createElement("div",null,t.a.createElement(ur.a,{style:{color:"rgb(82, 196, 26)"}}),t.a.createElement("span",{className:"font14 ml5"},"\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784")),t.a.createElement("div",null,t.a.createElement(Xn.a,{style:{color:"red"}}),t.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625")))),t.a.createElement(gt.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},t.a.createElement(tn.a,{allowClear:!0,size:"large",options:hi.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:Bn}})),t.a.createElement(gt.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},t.a.createElement(U.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),t.a.createElement(gt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(si,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:Zr.a.footerWrap},t.a.createElement(gt.a.Item,null,t.a.createElement(S.a,{className:"mr5",size:"large",onClick:function(){At()}},"\u53D6\u6D88"),t.a.createElement(S.a,{size:"large",type:"primary",htmlType:"submit",loading:It["account/appplySchool"]},"\u4FDD\u5B58")))))},wt=Object(f.a)(function(Tt){var it=Tt.account,mt=Tt.loading,Ct=Tt.globalSetting;return{account:it,globalSetting:Ct,loading:mt.effects}})(li),$t=ye.a.Option,en=y.a.Dragger,Cn=function(it){var mt,Ct,It=it.user,Pt=it.account,Ht=it.globalSetting,Wt=it.loading,dt=it.dispatch,At=it.Scoid,Dt=Object(m.a)(it,["user","account","globalSetting","loading","dispatch","Scoid"]),yr=gt.a.useForm(),tr=Object(h.a)(yr,1),qt=tr[0],Gt=Object(a.useState)({}),nr=Object(h.a)(Gt,2),cr=nr[0],st=nr[1],Lr=Object(a.useState)([]),Fr=Object(h.a)(Lr,2),Cr=Fr[0],rr=Fr[1],Et=Object(a.useState)([]),_t=Object(h.a)(Et,2),xt=_t[0],Jt=_t[1],pr=Object(a.useState)([]),dr=Object(h.a)(pr,2),fr=dr[0],Dr=dr[1],an=Object(a.useState)([]),qe=Object(h.a)(an,2),sr=qe[0],Nr=qe[1],rn=Object(a.useState)(),xr=Object(h.a)(rn,2),br=xr[0],Pr=xr[1],Ft=Object(a.useState)(),Zt=Object(h.a)(Ft,2),wr=Zt[0],er=Zt[1],vt=Object(a.useState)(),yt=Object(h.a)(vt,2),zt=yt[0],Mt=yt[1],Mr=Object(a.useState)(),cn=Object(h.a)(Mr,2),fn=cn[0],kr=cn[1],on=Object(a.useState)(),Ur=Object(h.a)(on,2),gn=Ur[0],Vr=Ur[1];Object(a.useEffect)(function(){yn()},[]),Object(a.useEffect)(function(){Object(o.a)(r.a.mark(function Ve(){var We;return r.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:if(At){pt.next=2;break}return pt.abrupt("return");case 2:return pt.next=4,ei(At);case 4:We=pt.sent,Dr(We==null?void 0:We.departments);case 6:case"end":return pt.stop()}},Ve)}))()},[At]);var yn=function(){var Ve=Object(o.a)(r.a.mark(function We(){var Ze;return r.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,dt({type:"account/getSchoolOption"});case 2:Ze=kt.sent,rr(Ze==null?void 0:Ze.schools);case 4:case"end":return kt.stop()}},We)}));return function(){return Ve.apply(this,arguments)}}(),ei=function(We){return dt({type:"account/getDepartmentOption",payload:{id:We}})};Object(a.useEffect)(function(){if(!Pt.basicInfo)return;var Ve=Pt.basicInfo,We={identity:Ve.identity,school:Ve.school_name,department:Ve.department_name,studentNo:Ve.student_id,jobTitle:Ve.identity=="teacher"?Ve.technical_title:"\u6559\u6388",manager:Ve.identity=="professional"?Ve.technical_title:"\u4F01\u4E1A\u7BA1\u7406\u8005"};qt.setFieldsValue(We),st(We)},[Pt.basicInfo]);var Me=function(){kr(!0)},Ge=function(){if(!Cr.find(function(We){return We.name===cr.school})){u.b.info("\u8BF7\u5148\u9009\u62E9\u6B63\u786E\u7684\u5355\u4F4D\u6216\u8005\u5B66\u6821\uFF01");return}Vr(!0)},Ye=function(We){if(st(Object(L.a)({},qt.getFieldsValue())),"school"in We){Jt(Cr.filter(function(pt){return pt.name.includes(We.school)}));var Ze=(Cr.find(function(pt){return pt.name===We.school})||{}).id;Ze?Fe(We.school):(qt.setFieldsValue({department:""}),st(Object(L.a)(Object(L.a)({},cr),{school:We.school,department:""})))}},Fe=function(){var Ve=Object(o.a)(r.a.mark(function We(Ze,pt){var kt,jt,Yt,Ir,Qr,$r;return r.a.wrap(function(Kr){for(;;)switch(Kr.prev=Kr.next){case 0:return Ir=(kt=Cr.find(function(sn){return sn.name===Ze}))===null||kt===void 0?void 0:kt.id,Kr.next=3,ei(Ir);case 3:if(Kr.t0=Kr.sent,Kr.t0){Kr.next=6;break}Kr.t0={};case 6:Qr=Kr.t0,Dr(Qr==null?void 0:Qr.departments),$r=pt||(Qr==null||((jt=Qr.departments)===null||jt===void 0||((Yt=jt[0])===null||Yt===void 0))?void 0:Yt.name),qt.setFieldsValue({department:$r}),st(Object(L.a)(Object(L.a)({},cr),{school:Ze,department:$r}));case 11:case"end":return Kr.stop()}},We)}));return function(Ze,pt){return Ve.apply(this,arguments)}}(),Ee=function(){var Ve=Object(o.a)(r.a.mark(function We(Ze){return r.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,yn();case 2:qt.setFieldsValue({school:Ze,department:""}),st(Object(L.a)(Object(L.a)({},cr),{school:Ze,department:""}));case 4:case"end":return kt.stop()}},We)}));return function(Ze){return Ve.apply(this,arguments)}}(),Pe=function(We){if(We.file.status==="uploading"){Mt(!0);return}if(We.file.status==="done"){var Ze;console.log(We.file,We.file.response),er((Ze=We.file.response)===null||Ze===void 0?void 0:Ze.id),Object(Ut.B)(We.file.originFileObj,function(pt){Pr(pt),Mt(!1)})}},_e=function(){var Ve=Object(o.a)(r.a.mark(function We(Ze){var pt,kt,jt,Yt,Ir,Qr,$r,nn,Kr,sn,ln,xn,hn,jn,pn,jr;return r.a.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:if(Ir=Ze||{},Qr=Ir.school,$r=Ir.department,nn=Ir.identity,Kr=Ir.studentNo,sn=Ir.jobTitle,ln=Ir.manager,br){dn.next=4;break}return u.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),dn.abrupt("return");case 4:return xn=(pt=Cr.find(function(bn){return bn.name===Qr}))===null||pt===void 0?void 0:pt.id,hn=(kt=fr.find(function(bn){return bn.name===$r}))===null||kt===void 0?void 0:kt.id,nn==="student"?jn=Kr:nn==="teacher"?jn=sn:jn=ln,dn.next=9,dt({type:"account/applyProfessionalAuth",payload:{id:((jt=Pt.basicInfo)===null||jt===void 0?void 0:jt.id)||((Yt=It.userInfo)===null||Yt===void 0?void 0:Yt.login),school_id:xn,department_id:hn,identity:nn,extra:jn,attachment_ids:[wr]}});case 9:pn=dn.sent,je(),pn&&(u.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),dt({type:"account/getBasicInfo",payload:{login:(jr=It.userInfo)===null||jr===void 0?void 0:jr.login}}));case 12:case"end":return dn.stop()}},We)}));return function(Ze){return Ve.apply(this,arguments)}}(),je=function(){dt({type:"account/setActionTabs",payload:{}})},ze={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(X.a.API_SERVER,"/api/attachments.json"),className:St.a.uploader,onChange:Pe,beforeUpload:function(We){var Ze=We.type==="image/jpeg"||We.type==="image/png"||We.type==="image/jpg"||We.type==="image/bmp";return Ze||u.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),Ze}};return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:St.a.modal,visible:Pt.actionTabs.key==="Account-ProfessionalAuth",title:t.a.createElement("div",null,t.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(St.a.colorBlue)}),"\u804C\u4E1A\u8BA4\u8BC1"),width:"660px",footer:null},t.a.createElement(d.a,{spinning:!!zt},t.a.createElement(gt.a,{className:St.a.formWrap,form:qt,layout:"horizontal",onValuesChange:Ye,onFinish:_e},t.a.createElement(B.a,{gutter:[10,0]},t.a.createElement(ct.a,{flex:"300px"},t.a.createElement(gt.a.Item,{label:"\u804C\u4E1A",name:"identity",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u4E1A"}]},t.a.createElement(ye.a,null,t.a.createElement($t,{value:"teacher"},"\u6559\u5E08"),t.a.createElement($t,{value:"student"},"\u5B66\u751F"),t.a.createElement($t,{value:"professional"},"\u4E13\u4E1A\u4EBA\u58EB")))),cr.identity==="student"&&t.a.createElement(ct.a,{flex:"200px"},t.a.createElement(gt.a.Item,{initialValue:cr.studentNo,name:"studentNo",rules:[{required:!0,message:"\u8BF7\u5148\u8F93\u5165\u5B66\u53F7"}]},t.a.createElement(U.a,{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5B66\u53F7"}))),cr.identity==="teacher"&&t.a.createElement(ct.a,{flex:"200px"},t.a.createElement(gt.a.Item,{initialValue:cr.jobTitle,name:"jobTitle",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(ye.a,null,t.a.createElement($t,{value:"\u6559\u6388"},"\u6559\u6388"),t.a.createElement($t,{value:"\u526F\u6559\u6388"},"\u526F\u6559\u6388"),t.a.createElement($t,{value:"\u8BB2\u5E08"},"\u8BB2\u5E08"),t.a.createElement($t,{value:"\u52A9\u6559"},"\u52A9\u6559")))),cr.identity==="professional"&&t.a.createElement(ct.a,{flex:"200px"},t.a.createElement(gt.a.Item,{initialValue:cr.manager,name:"manager",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(ye.a,null,t.a.createElement($t,{value:"\u4F01\u4E1A\u7BA1\u7406\u8005"},"\u4F01\u4E1A\u7BA1\u7406\u8005"),t.a.createElement($t,{value:"\u90E8\u95E8\u7BA1\u7406\u8005"},"\u90E8\u95E8\u7BA1\u7406\u8005"),t.a.createElement($t,{value:"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"},"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"),t.a.createElement($t,{value:"\u5DE5\u7A0B\u5E08"},"\u5DE5\u7A0B\u5E08"),t.a.createElement($t,{value:"\u52A9\u7406\u5DE5\u7A0B\u5E08"},"\u52A9\u7406\u5DE5\u7A0B\u5E08"))))),t.a.createElement(gt.a.Item,{label:"\u5B66\u6821/\u5355\u4F4D",name:"school",extra:cr.school&&!(Cr!=null&&Cr.find(function(Ve){return Ve.name===cr.school}))&&t.a.createElement("div",{className:St.a.schoolHintWrap},t.a.createElement("span",{className:St.a.colorCDCDCD},"\u672A\u627E\u5230\u5305\u542B\u201C",cr.school,"\u201D\u7684\u9AD8\u6821\uFF0C"),t.a.createElement("span",{className:"".concat(St.a.color0152d9," current"),onClick:Me},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u5B66\u6821/\u5355\u4F4D"}]},t.a.createElement(vn.a,{showSearch:!0,options:xt==null?void 0:xt.map(function(Ve){return{value:Ve.name}})})),t.a.createElement(gt.a.Item,{label:"\u9662\u7CFB/\u90E8\u95E8",name:"department",extra:cr.department&&!(fr!=null&&fr.find(function(Ve){return Ve.name===cr.department}))&&t.a.createElement("div",{className:St.a.schoolHintWrap},t.a.createElement("span",{className:St.a.colorCDCDCD},cr.department?"\u672A\u627E\u5230\u5305\u542B\u201C".concat(cr.department,"\u201D\u7684\u9AD8\u6821\uFF0C"):"\u672A\u627E\u5230\u9662\u7CFB\uFF0C"),t.a.createElement("span",{className:"".concat(St.a.color0152d9," current"),onClick:Ge},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u9662\u7CFB/\u90E8\u95E8"}]},t.a.createElement(vn.a,{showSearch:!0,onChange:function(We){return Nr(fr.filter(function(Ze){return Ze.name.includes(We)}))},options:sr==null?void 0:sr.map(function(Ve){return{value:Ve.name}})})),t.a.createElement(gt.a.Item,{label:"\u804C\u4E1A\u8BC1\u4E0A\u4F20"},t.a.createElement("div",{className:St.a.flexRow},t.a.createElement("div",{className:"".concat(St.a.flexColumn," ").concat(St.a.example)},t.a.createElement("span",{className:St.a.exampleImg},t.a.createElement("img",{src:Kt.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(St.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:St.a.flexColumn},t.a.createElement(en,Object(Ne.a)({},ze,{accept:".png,.jpg,.bmp,.jpeg"}),br?t.a.createElement("img",{src:br,className:St.a.uploadImg}):t.a.createElement("div",{className:St.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(St.a.uploadTipIcon)})),t.a.createElement("p",{className:St.a.uploadTip},t.a.createElement("a",{className:St.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:St.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:St.a.footerWrap},t.a.createElement(gt.a.Item,null,t.a.createElement(S.a,{className:"mr5",size:"large",onClick:je},"\u53D6\u6D88"),t.a.createElement(S.a,{size:"large",type:"primary",htmlType:"submit",loading:Wt["account/applyProfessionalAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:St.a.note},t.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),t.a.createElement("p",null,"1.\u6839\u636E\u804C\u4E1A\u4E0A\u4F20\u76F8\u5E94\u7684\u8BC1\u4EF6\u7167\uFF1A\u6559\u5E08\uFF08\u6559\u5E08\u8BC1\uFF09\uFF0C\u4E13\u4E1A\u4EBA\u58EB\uFF08\u5458\u5DE5\u8BC1\uFF09\u3001\u5B66\u751F\uFF08\u5B66\u751F\u8BC1\uFF09\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u5185\u5BB9\u5B8C\u6574\u5E76\u4E14\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),t.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u804C\u4E1A\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),t.a.createElement("p",null,"3.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B\u804C\u4E1A\u53D8\u66F4\u8BF7\u9009\u62E9\u91CD\u65B0\u8BA4\u8BC1\uFF1B"),t.a.createElement("p",null,"4.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),t.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),t.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u5B66\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u804C\u4E1A\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3",!(Ht!=null&&(mt=Ht.setting)!==null&&mt!==void 0&&mt.is_local)&&"EduCoder","\u8D26\u53F7\u3002"),t.a.createElement("p",null,"7.\u975E\u8001\u5E08\u8EAB\u4EFD\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u804C\u4E1A\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))),t.a.createElement(wt,{visible:fn,onClose:function(){return kr(!1)},schoolName:cr.school,onSuccess:Ee}),t.a.createElement(kn,{visible:gn,onClose:function(){return Vr(!1)},schoolId:(Ct=Cr.find(function(Ve){return Ve.name===cr.school}))===null||Ct===void 0?void 0:Ct.id,schoolName:cr.school,departmentName:cr.department,onSuccess:function(We){return Fe(cr.school,We)}}))},_n=Object(f.a)(function(Tt){var it=Tt.user,mt=Tt.account,Ct=Tt.loading,It=Tt.globalSetting;return{user:it,account:mt,globalSetting:It,loading:Ct.effects}})(Cn),On=D("aCH8"),ae=D.n(On);function z(Tt){var it=Tt.type,mt=Tt.dispatch,Ct=Tt.userid,It=Tt.isshow,Pt=Tt.setPhoneshow,Ht=Tt.setEmailshow,Wt="79e33abd4b6588941ab7622aed1e67e8",dt=Object(a.useState)(""),At=Object(h.a)(dt,2),Dt=At[0],yr=At[1],tr=Object(a.useState)("\u83B7\u53D6\u9A8C\u8BC1\u7801"),qt=Object(h.a)(tr,2),Gt=qt[0],nr=qt[1],cr=Object(a.useState)(60),st=Object(h.a)(cr,2),Lr=st[0],Fr=st[1],Cr=Object(a.useState)(!1),rr=Object(h.a)(Cr,2),Et=rr[0],_t=rr[1],xt=Object(a.useState)(""),Jt=Object(h.a)(xt,2),pr=Jt[0],dr=Jt[1];function fr(){return Dr.apply(this,arguments)}function Dr(){return Dr=Object(o.a)(r.a.mark(function xr(){var br;return r.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(Dt){Ft.next=3;break}return it===3?u.b.info("\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A"):u.b.info("\u90AE\u7BB1\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 3:return Ft.next=5,mt({type:"competitions/getVerification",payload:{type:it,login:Dt,smscode:ae()(Wt+Dt)}});case 5:br=Ft.sent,br.status===1&&(u.b.info("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F"),an(),_t(!0));case 7:case"end":return Ft.stop()}},xr)})),Dr.apply(this,arguments)}function an(){Fr(60);var xr=setInterval(function(){--Lr,Lr>-1?Fr(Lr):(clearInterval(xr),_t(!1))},1e3)}function qe(){return sr.apply(this,arguments)}function sr(){return sr=Object(o.a)(r.a.mark(function xr(){var br;return r.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ft.next=2,mt({type:"competitions/PhoneBind",payload:{userid:Ct,code:pr,phone:Dt}});case 2:br=Ft.sent,br.status===0&&(u.b.info("\u7ED1\u5B9A\u6210\u529F"),Pt("none"));case 4:case"end":return Ft.stop()}},xr)})),sr.apply(this,arguments)}function Nr(){return rn.apply(this,arguments)}function rn(){return rn=Object(o.a)(r.a.mark(function xr(){var br;return r.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ft.next=2,mt({type:"competitions/EmailBind",payload:{userid:Ct,code:pr,email:Dt}});case 2:br=Ft.sent,br.status===0&&(u.b.info("\u7ED1\u5B9A\u6210\u529F"),Ht("none"));case 4:case"end":return Ft.stop()}},xr)})),rn.apply(this,arguments)}return t.a.createElement("div",{style:{display:It}},t.a.createElement("p",null,t.a.createElement(U.a,{value:Dt,onChange:function(br){return yr(br.target.value)},placeholder:it===3?"\u8BF7\u8F93\u5165\u624B\u673A\u53F7":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740",style:{width:"370px"}})),t.a.createElement("span",null,t.a.createElement(U.a,{value:pr,onChange:function(br){return dr(br.target.value)},placeholder:it===3?"\u8BF7\u8F93\u5165\u624B\u673A\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801",style:{width:"250px"}}))," ",t.a.createElement(S.a,{disabled:Et,onClick:function(){return fr()},type:"primary",style:{marginLeft:"20px",width:"100px"}},Et?"\u91CD\u65B0\u53D1\u9001".concat(Lr,"s"):Gt),t.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},t.a.createElement(S.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){if(!pr){u.b.info("\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}it===3?qe():Nr()}},"\u786E\u8BA4"),t.a.createElement(S.a,{style:{marginLeft:"20px"},onClick:function(){it===3?Pt("none"):Ht("none")}},"\u53D6\u6D88")))}var $=z;function ie(Tt){var it=Tt.dispatch,mt=Tt.userid,Ct={wrapperCol:{offset:3,span:21}},It=gt.a.useForm(),Pt=Object(h.a)(It,1),Ht=Pt[0],Wt=Object(w.i)(),dt=Wt.identifier;return t.a.createElement("div",{style:{width:"500px"}},t.a.createElement(gt.a,{form:Ht,name:"basic"},t.a.createElement(gt.a.Item,Object(Ne.a)({},Ct,{label:t.a.createElement("div",{style:{width:"30px"}},"\u5F00\u6237\u884C"),name:"bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5F00\u6237\u884C"}]}),t.a.createElement(U.a,null)),t.a.createElement(gt.a.Item,Object(Ne.a)({},Ct,{label:t.a.createElement("div",{style:{width:"30px"}},"\u652F\u884C"),name:"second_bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u652F\u884C"}]}),t.a.createElement(U.a,null)),t.a.createElement(gt.a.Item,Object(Ne.a)({},Ct,{label:t.a.createElement("div",{style:{width:"30px"}},"\u8D26\u53F7"),name:"card_no",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7"}]}),t.a.createElement(U.a,null)),t.a.createElement(gt.a.Item,null,t.a.createElement(S.a,{type:"primary",htmlType:"submit",onClick:Object(o.a)(r.a.mark(function At(){return r.a.wrap(function(yr){for(;;)switch(yr.prev=yr.next){case 0:Ht.validateFields().then(function(){var tr=Object(o.a)(r.a.mark(function qt(Gt){var nr;return r.a.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:return st.next=2,it({type:"competitions/setleader",payload:Object(L.a)({identifier:dt,user_id:mt},Gt)});case 2:nr=st.sent,nr.status===0&&u.b.info("\u63D0\u4EA4\u6210\u529F");case 4:case"end":return st.stop()}},qt)}));return function(qt){return tr.apply(this,arguments)}}());case 1:case"end":return yr.stop()}},At)}))},"\u63D0\u4EA4"))))}var de=ie,se={teacher:"\u6559\u5E08",student:"\u5B66\u751F",professional:"\u4E13\u4E1A\u4EBA\u58EB"};function Ke(Tt){var it,mt,Ct,It,Pt,Ht,Wt,dt,At=Tt.Prize,Dt=Tt.Accounts,yr=Tt.dispatch,tr=Tt.userid,qt=Object(a.useState)("none"),Gt=Object(h.a)(qt,2),nr=Gt[0],cr=Gt[1],st=Object(a.useState)("none"),Lr=Object(h.a)(st,2),Fr=Lr[0],Cr=Lr[1];function rr(_t){return Et.apply(this,arguments)}function Et(){return Et=Object(o.a)(r.a.mark(function _t(xt){var Jt;return r.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:if(!(xt==="1")){dr.next=6;break}return dr.next=3,yr({type:"competitions/Authentication"});case 3:Jt=dr.sent,dr.next=9;break;case 6:return dr.next=8,yr({type:"competitions/Professional"});case 8:Jt=dr.sent;case 9:Jt.status===0&&u.b.info("\u64A4\u9500\u6210\u529F");case 10:case"end":return dr.stop()}},_t)})),Et.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u5B9E\u540D\u4FE1\u606F"),(Dt==null?void 0:Dt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(Dt==null?void 0:Dt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){yr({type:"account/setActionTabs",payload:{key:"Account-RealNameAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",null,"\u59D3\u540D\uFF1A",t.a.createElement("span",null,Dt==null?void 0:Dt.name),(Dt==null?void 0:Dt.authentication)==="uncertified"?null:(Dt==null?void 0:Dt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(S.a,{type:"primary",onClick:function(){return rr("1")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):t.a.createElement("span",{style:{color:"#6ec76e"}},t.a.createElement("span",{className:"iconfont icon-wancheng font-14 ml20"})," \u5DF2\u8BA4\u8BC1")),t.a.createElement("p",null,"\u6027\u522B\uFF1A",t.a.createElement("span",null,(Dt==null?void 0:Dt.gender)===0?"\u7537":"\u5973"))),t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u804C\u4E1A\u4FE1\u606F"),(Dt==null?void 0:Dt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(Dt==null?void 0:Dt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){yr({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",null,"\u804C\u4E1A\uFF1A",t.a.createElement("span",null,Dt&&Dt.identity&&se[Dt.identity]),(Dt==null?void 0:Dt.authentication)==="uncertified"?null:(Dt==null?void 0:Dt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(S.a,{type:"primary",onClick:function(){return rr("2")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):t.a.createElement("span",{style:{color:"#6ec76e"}},t.a.createElement("span",{className:"iconfont icon-wancheng font-12 ml20"}),t.a.createElement("span",null,"\u5DF2\u8BA4\u8BC1"),t.a.createElement(S.a,{type:"primary",onClick:function(){yr({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})},ghost:!0,style:{marginLeft:"20px"}},"\u91CD\u65B0\u8BA4\u8BC1"))),t.a.createElement("p",null,"\u5B66\u53F7\uFF1A",t.a.createElement("span",null,(Dt==null?void 0:Dt.student_id)||"--")),t.a.createElement("p",null,"\u5B66\u6821\uFF1A",t.a.createElement("span",null,(Dt==null?void 0:Dt.school_name)||"--")),t.a.createElement("p",null,"\u9662\u7CFB\uFF1A",t.a.createElement("span",null,(Dt==null?void 0:Dt.department_name)||"--"))),t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u8054\u7CFB\u65B9\u5F0F")),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u624B\u673A\u53F7\uFF1A"),t.a.createElement("span",{style:{width:"150px"}},(Dt==null?void 0:Dt.phone)||"--"),nr==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){cr("block")}},"\u66F4\u6362"):null),t.a.createElement($,{type:3,dispatch:yr,userid:Dt==null?void 0:Dt.id,isshow:nr,setPhoneshow:cr,setEmailshow:Cr}),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"Email\uFF1A"),t.a.createElement("span",{style:{width:"150px"}},(Dt==null?void 0:Dt.mail)||"--"),Fr==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){Cr("block")}},"\u66F4\u6362"):null),t.a.createElement($,{type:4,dispatch:yr,userid:Dt==null?void 0:Dt.id,isshow:Fr,setEmailshow:Cr,setPhoneshow:cr})),At!=null&&At.leader&&At!==null&&At!==void 0&&At.teams&&At!==null&&At!==void 0&&(it=At.teams[0])!==null&&it!==void 0&&(mt=it.bank_account)!==null&&mt!==void 0&&mt.bank?t.a.createElement("p",null,t.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),t.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")):t.a.createElement("div",null,t.a.createElement("p",null,t.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),t.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")),t.a.createElement(de,{dispatch:yr,userid:tr})),At!=null&&At.leader?t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u5F00\u6237\u884C\uFF1A"),t.a.createElement("span",null,(At==null?void 0:At.teams)&&(At==null||((Ct=At.teams[0])===null||Ct===void 0||((It=Ct.bank_account)===null||It===void 0))?void 0:It.bank)||"--")),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u652F\u884C\uFF1A"),t.a.createElement("span",null,(At==null?void 0:At.teams)&&(At==null||((Pt=At.teams[0])===null||Pt===void 0||((Ht=Pt.bank_account)===null||Ht===void 0))?void 0:Ht.second_bank)||"--")),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u8D26\u53F7\uFF1A"),t.a.createElement("span",null,(At==null?void 0:At.teams)&&(At==null||((Wt=At.teams[0])===null||Wt===void 0||((dt=Wt.bank_account)===null||dt===void 0))?void 0:dt.card_no)||"--"))):null,t.a.createElement(_n,{Scoid:Dt==null?void 0:Dt.school_id}),t.a.createElement(un,null))}var Rt=Ke,Vt=ge.a.TabPane;function Er(Tt){var it=Tt.Prize,mt=Tt.Accounts,Ct=Tt.getAccounts,It=Tt.dispatch,Pt=Tt.userid;return t.a.createElement("div",{className:"fr"},t.a.createElement("div",{className:"mb100 "},t.a.createElement(ge.a,{defaultActiveKey:"1",onChange:function(Wt){Wt==="2"&&Ct()}},t.a.createElement(Vt,{tab:"\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D",key:"1"},t.a.createElement(ke,{Prize:it})),t.a.createElement(Vt,{tab:"\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F",key:"2"},t.a.createElement(Rt,{userid:Pt,dispatch:It,Prize:it,Accounts:mt})))))}var Lt=Er,zr=D("xKgJ"),Br=D("wd/R"),En=D.n(Br),ui=ge.a.TabPane;function Ei(Tt){var it,mt,Ct,It,Pt,Ht,Wt=Tt.ChartRules,dt=Tt.ItemData,At=Tt.getCharts,Dt=Tt.Selectkey,yr=Tt.HeaderDetail,tr=Tt.getChartRules,qt=Tt.userinfo,Gt=Tt.Editable,nr=Tt.dispatch,cr=Tt.StaffDetail,st=Object(a.useState)(!1),Lr=Object(h.a)(st,2),Fr=Lr[0],Cr=Lr[1],rr=Object(a.useState)(""),Et=Object(h.a)(rr,2),_t=Et[0],xt=Et[1],Jt=Object(a.useState)(!0),pr=Object(h.a)(Jt,2),dr=pr[0],fr=pr[1],Dr=Object(a.useState)(),an=Object(h.a)(Dr,2),qe=an[0],sr=an[1],Nr=Object(a.useState)(),rn=Object(h.a)(Nr,2),xr=rn[0],br=rn[1],Pr=Object(w.i)(),Ft=Pr.identifier;Object(a.useEffect)(function(){if(dr){var vt,yt,zt,Mt,Mr=Wt==null||((vt=Wt.stages)===null||vt===void 0)?void 0:vt[0];sr(Mr);var cn=Wt==null||((yt=Wt.stages)===null||yt===void 0||((zt=yt[0])===null||zt===void 0||((Mt=zt.children)===null||Mt===void 0)))?void 0:Mt[0];if(br(cn),Mr!=null&&Mr.id){var fn,kr,on;At(Mr==null?void 0:Mr.id),xt(((fn=Wt.rule_contents)===null||fn===void 0||((kr=fn.filter(function(yn){return parseInt(yn.competition_stage_id)===parseInt(Mr==null?void 0:Mr.id)}))===null||kr===void 0||((on=kr[0])===null||on===void 0))?void 0:on.content)||"")}else{var Ur,gn,Vr;At(0),xt(((Ur=Wt.rule_contents)===null||Ur===void 0||((gn=Ur.filter(function(yn){return parseInt(yn.competition_stage_id)===0}))===null||gn===void 0||((Vr=gn[0])===null||Vr===void 0))?void 0:Vr.content)||"")}}},[Wt]);function Zt(){return wr.apply(this,arguments)}function wr(){return wr=Object(o.a)(r.a.mark(function vt(){var yt,zt,Mt,Mr,cn,fn,kr,on,Ur;return r.a.wrap(function(Vr){for(;;)switch(Vr.prev=Vr.next){case 0:if(_t){Vr.next=3;break}return u.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Vr.abrupt("return");case 3:if(fr(!1),yt=qe==null?void 0:qe.id,!yt){Vr.next=12;break}return Vr.next=8,Object(ne.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:Dt,content:_t,md_content_id:(zt=Wt.rule_contents)===null||zt===void 0||((Mt=zt.filter(function(yn){return parseInt(yn.competition_stage_id)===parseInt(yt)}))===null||Mt===void 0||((Mr=Mt[0])===null||Mr===void 0))?void 0:Mr.id,stage_id:qe==null?void 0:qe.id}});case 8:cn=Vr.sent,cn.status===0&&(u.b.info("\u66F4\u65B0\u6210\u529F"),Cr(!1),tr()),Vr.next=16;break;case 12:return Vr.next=14,Object(ne.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:Dt,content:_t,md_content_id:(fn=Wt.rule_contents)===null||fn===void 0||((kr=fn.filter(function(yn){return parseInt(yn.competition_stage_id)===0}))===null||kr===void 0||((on=kr[0])===null||on===void 0))?void 0:on.id,stage_id:qe==null?void 0:qe.id}});case 14:Ur=Vr.sent,Ur.status===0&&(u.b.info("\u66F4\u65B0\u6210\u529F"),Cr(!1),tr());case 16:case"end":return Vr.stop()}},vt)})),wr.apply(this,arguments)}var er=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(yt,zt,Mt){return t.a.createElement("span",null,yt)}},{title:"\u9644\u4EF6",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(yt){return t.a.createElement(nt.a,{title:yt},t.a.createElement("span",{title:yt},yt&&(yt==null?void 0:yt.length)>=10?(yt==null?void 0:yt.substr(0,10))+"...":yt||"--"))}},{title:"\u63D0\u4EA4\u4EBA",dataIndex:"user_name",key:"user_name",width:100,render:function(yt){return t.a.createElement("span",{title:yt},yt&&(yt==null?void 0:yt.length)>=6?(yt==null?void 0:yt.substr(0,6))+"...":yt||"--")}},{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center"},{title:"\u72B6\u6001",dataIndex:"status",key:"status",width:50,render:function(yt){return t.a.createElement("span",null,yt===1?"\u8BA1\u7B97\u4E2D":yt===2?"\u5B8C\u6210":yt===0?"\u5F85\u8BA1\u7B97":yt===3&&"\u9519\u8BEF")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68071",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(yt){return t.a.createElement("span",null,yt||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68072",dataIndex:"data_other",key:"data_other",align:"left",render:function(yt){return(yt==null?void 0:yt.length)>0?yt==null?void 0:yt.map(function(zt,Mt){return t.a.createElement("span",null,zt==null?void 0:zt.name,"\uFF1A",zt==null?void 0:zt.value," ",t.a.createElement("br",null))}):t.a.createElement("span",null,"--")}},(qe==null?void 0:qe.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(yt){return t.a.createElement("span",null,yt||"--")}},(qe==null?void 0:qe.display_four_indicators)&&{title:"\u7F8E\u5B66\u8BC4\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(yt){var zt;return t.a.createElement("span",null,(yt==null||((zt=yt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="score"}))===null||zt===void 0)?void 0:zt.value)||"--")}},(qe==null?void 0:qe.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(yt){var zt;return t.a.createElement("span",null,(yt==null||((zt=yt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="fid"}))===null||zt===void 0)?void 0:zt.value)||"--")}},(qe==null?void 0:qe.display_four_indicators)&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(yt){var zt;return t.a.createElement("span",null,(yt==null||((zt=yt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="total_score"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Car",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(yt){return t.a.createElement("span",null,yt||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Coffee",dataIndex:"data_other",key:"data_other",align:"center",render:function(yt){var zt;return t.a.createElement("span",null,(yt==null||((zt=yt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Coffee"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Easyship",dataIndex:"data_other",key:"data_other",align:"center",render:function(yt){var zt;return t.a.createElement("span",null,(yt==null||((zt=yt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Easyship"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scar",dataIndex:"data_other",key:"data_other",align:"center",render:function(yt){var zt;return t.a.createElement("span",null,(yt==null||((zt=yt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Scar"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scarf",dataIndex:"data_other",key:"data_other",align:"center",render:function(yt){var zt;return t.a.createElement("span",null,(yt==null||((zt=yt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Scarf"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"center",render:function(yt){var zt;return t.a.createElement("span",null,(yt==null||((zt=yt.find(function(Mt){return(Mt==null?void 0:Mt.name)==="Total"}))===null||zt===void 0)?void 0:zt.value)||"--")}},{title:"\u64CD\u4F5C",dataIndex:"result_url",width:50,key:"result_url",render:function(yt){return t.a.createElement("a",{href:yt,target:"_blank",download:"\u9644\u4EF6"},"\u4E0B\u8F7D")}}].filter(function(vt){return!!vt});return t.a.createElement("div",null,(Wt==null||((it=Wt.stages)===null||it===void 0)?void 0:it.length)>0?null:t.a.createElement(Je,null),(Wt==null||((mt=Wt.stages)===null||mt===void 0)?void 0:mt.length)>0&&t.a.createElement(ge.a,{animated:!0,tabBarExtraContent:qt!=null&&qt.admin||qt!=null&&qt.business||Gt?t.a.createElement(S.a,{onClick:function(){Cr(!0)}},"\u7F16\u8F91"):cr.enrolled&&(qe==null?void 0:qe.start_time)&&(qe==null?void 0:qe.end_time)&&t.a.createElement("span",null,"\u63D0\u4EA4\u65F6\u95F4\uFF1A",En()(qe==null?void 0:qe.start_time).format("YYYY-MM-DD HH:mm:ss"),"\u81F3",En()(qe==null?void 0:qe.end_time).format("YYYY-MM-DD HH:mm:ss"),t.a.createElement(S.a,{style:{marginLeft:"20px"},disabled:En()(qe==null?void 0:qe.start_time).unix()>En()(En()().format("YYYY-MM-DD HH:mm:s")).unix()||En()(En()().format("YYYY-MM-DD HH:mm:s")).unix()>En()(qe==null?void 0:qe.end_time).unix(),onClick:function(){nr({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(xr==null?void 0:xr.id)||(qe==null?void 0:qe.id),id:yr==null?void 0:yr.id}}})}},"\u63D0\u4EA4\u7ED3\u679C")),onChange:function(yt){var zt,Mt,Mr,cn,fn;Cr(!1);var kr=Wt==null||((zt=Wt.stages)===null||zt===void 0)?void 0:zt.filter(function(Ur){return parseInt(yt)===parseInt(Ur==null?void 0:Ur.id)})[0],on=kr==null||((Mt=kr.children)===null||Mt===void 0)?void 0:Mt[0];br(on),sr(kr),xt(((Mr=Wt.rule_contents)===null||Mr===void 0||((cn=Mr.filter(function(Ur){return parseInt(Ur.competition_stage_id)===parseInt(kr==null?void 0:kr.id)}))===null||cn===void 0||((fn=cn[0])===null||fn===void 0))?void 0:fn.content)||""),At((on==null?void 0:on.id)||yt)}},Wt&&Wt.stages.map(function(vt,yt){return t.a.createElement(ui,{tab:vt.name,key:vt.id===null?0:vt.id},Fr===!1&&Wt&&Wt.rule_contents.map(function(zt,Mt){if(vt.id===zt.competition_stage_id)return t.a.createElement(W.a,{key:Mt,value:zt.content===void 0||zt.content===null?"":zt.content});if(vt.id===null&&zt.competition_stage_id===0)return t.a.createElement(W.a,{key:Mt,value:zt.content===void 0||zt.content===null?"":zt.content})}))})),(qe==null||((Ct=qe.children)===null||Ct===void 0)?void 0:Ct.length)>0&&t.a.createElement(ge.a,{activeKey:(xr==null?void 0:xr.id)+"",onChange:function(yt){var zt,Mt=qe==null||((zt=qe.children)===null||zt===void 0)?void 0:zt.filter(function(Mr){return parseInt(yt)===parseInt(Mr==null?void 0:Mr.id)})[0];br(Mt),At(yt)}},qe==null||((It=qe.children)===null||It===void 0)?void 0:It.map(function(vt,yt){return t.a.createElement(ui,{tab:vt.name,key:vt.id===null?0:vt.id})})),Fr&&t.a.createElement("div",null,t.a.createElement(te.a,{defaultValue:_t,onChange:function(yt){xt(yt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(S.a,{style:{width:"90px"},type:"primary",onClick:function(){return Zt()}},"\u63D0\u4EA4"),t.a.createElement(S.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return Cr(!1)}},"\u53D6\u6D88"))),((Pt=yr.competition_modules.filter(function(vt){return vt.id===Dt}))===null||Pt===void 0||((Ht=Pt[0])===null||Ht===void 0)?void 0:Ht.show_leaderboard)&&t.a.createElement(Z.a,{dataSource:dt==null?void 0:dt.results,columns:er}))}var In=Ei,Li=D("DjyN"),qi=D("NUBc"),ni=ge.a.TabPane;function Ti(Tt){var it,mt,Ct,It,Pt,Ht,Wt=Tt.loading,dt=Tt.ChartRules,At=Tt.ItemData,Dt=Tt.getCharts,yr=Tt.Selectkey,tr=Tt.HeaderDetail,qt=Tt.getChartRules,Gt=Tt.userinfo,nr=Tt.Editable,cr=Tt.dispatch,st=Tt.StaffDetail,Lr=Object(a.useState)(!1),Fr=Object(h.a)(Lr,2),Cr=Fr[0],rr=Fr[1],Et=Object(a.useState)(""),_t=Object(h.a)(Et,2),xt=_t[0],Jt=_t[1],pr=Object(a.useState)(!0),dr=Object(h.a)(pr,2),fr=dr[0],Dr=dr[1],an=Object(a.useState)(),qe=Object(h.a)(an,2),sr=qe[0],Nr=qe[1],rn=Object(a.useState)(),xr=Object(h.a)(rn,2),br=xr[0],Pr=xr[1],Ft=Object(w.i)(),Zt=Ft.identifier,wr=Object(a.useState)({page:1,limit:10,sort:"desc"}),er=Object(h.a)(wr,2),vt=er[0],yt=er[1];Object(a.useEffect)(function(){var Mt;fr&&dt!==null&&dt!==void 0&&(Mt=dt.stages)!==null&&Mt!==void 0&&Mt[0]&&zt()},[dt==null||((it=dt.stages)===null||it===void 0)?void 0:it[0]]);var zt=function(){var Mt=Object(o.a)(r.a.mark(function Mr(){var cn,fn,kr,on,Ur,gn;return r.a.wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:return Ur=dt==null||((cn=dt.stages)===null||cn===void 0)?void 0:cn[0],Nr(Ur),gn=dt==null||((fn=dt.stages)===null||fn===void 0||((kr=fn[0])===null||kr===void 0||((on=kr.children)===null||on===void 0)))?void 0:on[0],Pr(gn),vt.id=(gn==null?void 0:gn.id)||(Ur==null?void 0:Ur.id),yt(Object(L.a)({},vt)),yn.next=7,Dt(Object(L.a)(Object(L.a)({},vt),{},{stage_id:vt.id}));case 7:case"end":return yn.stop()}},Mr)}));return function(){return Mt.apply(this,arguments)}}();return t.a.createElement("div",null,(dt==null||((mt=dt.stages)===null||mt===void 0)?void 0:mt.length)>0?null:t.a.createElement(Je,null),(dt==null||((Ct=dt.stages)===null||Ct===void 0)?void 0:Ct.length)>0&&t.a.createElement(ge.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var Mt=Object(o.a)(r.a.mark(function Mr(cn){var fn,kr,on,Ur,gn,Vr,yn;return r.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:return rr(!1),Vr=dt==null||((fn=dt.stages)===null||fn===void 0)?void 0:fn.filter(function(Ge){return parseInt(cn)===parseInt(Ge==null?void 0:Ge.id)})[0],yn=Vr==null||((kr=Vr.children)===null||kr===void 0)?void 0:kr[0],Pr(yn),Nr(Vr),Jt(((on=dt.rule_contents)===null||on===void 0||((Ur=on.filter(function(Ge){return parseInt(Ge.competition_stage_id)===parseInt(Vr==null?void 0:Vr.id)}))===null||Ur===void 0||((gn=Ur[0])===null||gn===void 0))?void 0:gn.content)||""),vt.page=1,vt.limit=10,vt.id=(yn==null?void 0:yn.id)||cn,yt(Object(L.a)({},vt)),Me.next=9,Dt(Object(L.a)({},vt));case 9:case"end":return Me.stop()}},Mr)}));return function(Mr){return Mt.apply(this,arguments)}}()},dt&&dt.stages.map(function(Mt,Mr){return t.a.createElement(ni,{tab:Mt.name,key:Mt.id===null?0:Mt.id})})),(sr==null||((It=sr.children)===null||It===void 0)?void 0:It.length)>0&&t.a.createElement(ge.a,{activeKey:(br==null?void 0:br.id)+"",onChange:function(){var Mt=Object(o.a)(r.a.mark(function Mr(cn){var fn,kr;return r.a.wrap(function(Ur){for(;;)switch(Ur.prev=Ur.next){case 0:return kr=sr==null||((fn=sr.children)===null||fn===void 0)?void 0:fn.filter(function(gn){return parseInt(cn)===parseInt(gn==null?void 0:gn.id)})[0],Pr(kr),vt.page=1,vt.limit=10,vt.id=cn,yt(Object(L.a)({},vt)),Ur.next=5,Dt(Object(L.a)({},vt));case 5:case"end":return Ur.stop()}},Mr)}));return function(Mr){return Mt.apply(this,arguments)}}()},sr==null||((Pt=sr.children)===null||Pt===void 0)?void 0:Pt.map(function(Mt,Mr){return t.a.createElement(ni,{tab:Mt.name,key:Mt.id===null?0:Mt.id})})),t.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),t.a.createElement("div",{style:{padding:"20px 30px"}},t.a.createElement("span",{style:{cursor:"pointer",marginRight:20},onClick:function(){vt.page=1,vt.sort=vt.sort==="desc"?"asc":"desc",yt(Object(L.a)({},vt)),Dt(Object(L.a)({},vt))}},"\u6309\u63D0\u4EA4\u65F6\u95F4",vt.sort==="asc"?"\u6B63":"\u5012","\u5E8F\u6392\u5E8F ",t.a.createElement("i",{className:"iconfont font14 ".concat(vt.sort==="asc"?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",t.a.createElement(U.a.Search,{onSearch:function(Mr){vt.page=1,vt.search=Mr,yt(Object(L.a)({},vt)),Dt(Object(L.a)({},vt))},style:{width:"82%"},placeholder:"\u8F93\u5165\u4EBA\u5458/\u6218\u961F\u540D\u79F0\u8FDB\u884C\u641C\u7D22"}),t.a.createElement(d.a,{spinning:Wt},At==null||((Ht=At.results)===null||Ht===void 0)?void 0:Ht.map(function(Mt,Mr){return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:Mr===0?14:30}},t.a.createElement("div",{style:{height:60,padding:10,display:"flex",alignItems:"center"}},t.a.createElement("img",{src:X.a.IMG_SERVER+"/images/"+(Mt==null?void 0:Mt.image_url),style:{width:40,height:40,borderRadius:"50%"}}),t.a.createElement("div",{style:{marginLeft:10}},t.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},Mt==null?void 0:Mt.user_name),t.a.createElement("span",{style:{color:"#999999",fontWeight:400,fontSize:"14px",marginLeft:60}},"\u6240\u5C5E\u6218\u961F",t.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(Mt==null?void 0:Mt.team_name)||"- -")),t.a.createElement("span",{style:{color:"#333333",fontWeight:400,fontSize:"14px",marginLeft:40}},"\u5B66\u6821 ",t.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(Mt==null?void 0:Mt.school_name)||"- -")))),t.a.createElement("div",{style:{background:"#EEF2F8",height:40,borderRadius:"0px 0px 2px 2px",paddingLeft:60,paddingRight:40,display:"flex",alignItems:"center",justifyContent:"space-between"}},t.a.createElement("div",null,t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u63D0\u4EA4\u65F6\u95F4\uFF1A",Mt==null?void 0:Mt.created_at),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"\u6D88\u8017\u5185\u5B58\uFF1A",(Mt==null?void 0:Mt.ts_mem)||"- -","MB"),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u4EE3\u7801\u6267\u884C\u65F6\u95F4\uFF1A",(Mt==null?void 0:Mt.ts_time)||"- -","\u79D2")),t.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(Mt==null?void 0:Mt.game_identifier),target:"_blank"},t.a.createElement("i",{className:"iconfont icon-chakandaima",style:{marginRight:4}}),t.a.createElement("span",{style:{lineHeight:"14px"}},"\u67E5\u770B\u4EE3\u7801"))))})),t.a.createElement(qi.a,{total:At==null?void 0:At.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:vt.page,onChange:function(Mr,cn){vt.page=Mr,yt(Object(L.a)({},vt)),Dt(Object(L.a)({},vt))}})))}var xi=Ti,Fi=function(it){var mt=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],Ct=["","\u5341","\u767E","\u5343","\u4E07"];it=parseInt(it);var It=function(dt){for(var At=dt.toString().split("").reverse(),Dt="",yr=0;yr<At.length;yr++)Dt=(yr==0&&At[yr]==0||yr>0&&At[yr]==0&&At[yr-1]==0?"":mt[At[yr]]+(At[yr]==0?Ct[0]:Ct[yr]))+Dt;return Dt},Pt=Math.floor(it/1e4),Ht=it%1e4;return Ht.toString().length<4&&(Ht="0"+Ht),Pt?It(Pt)+"\u4E07"+It(Ht):It(it)};function Ci(Tt){var it,mt=Tt.item,Ct=Tt.index,It=Tt.StaffDetail,Pt=Object(a.useState)(!0),Ht=Object(h.a)(Pt,2),Wt=Ht[0],dt=Ht[1],At=Object(a.useState)(!0),Dt=Object(h.a)(At,2),yr=Dt[0],tr=Dt[1],qt=Object(a.useRef)();return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",borderRadius:"2px",marginTop:20}},t.a.createElement("div",{style:{padding:10,display:"flex",position:"relative"}},t.a.createElement("img",{src:X.a.IMG_SERVER+"/"+(mt==null?void 0:mt.pic),style:{width:220,height:130,borderRadius:"4px"}}),t.a.createElement("div",{style:{marginLeft:20,width:"75%"}},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},"\u4EFB\u52A1",Fi(Ct+1),"\uFF1A",t.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},mt==null?void 0:mt.name)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u5173\u5361",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},mt==null?void 0:mt.challenges_count)," ")),t.a.createElement("div",{ref:qt},t.a.createElement(W.a,{style:{maxHeight:Wt&&100},value:mt==null?void 0:mt.description})),t.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){dt(!Wt)}},Wt?"\u9605\u8BFB\u5168\u6587 ":"\u6536\u8D77\u5168\u6587 ",t.a.createElement("i",{className:"iconfont font14 ".concat(Wt?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),t.a.createElement("div",{style:{marginTop:14,maxHeight:yr&&58,overflow:"hidden"}},mt==null||((it=mt.challenges)===null||it===void 0)?void 0:it.map(function(Gt,nr){return t.a.createElement("div",{style:{marginTop:nr===0?0:12}},t.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),t.a.createElement("span",{style:{marginLeft:10}},"\u7B2C",nr+1,"\u5173",Gt==null?void 0:Gt.name))})),t.a.createElement("div",{style:{position:"absolute",bottom:14,right:10,color:"#145DFF",cursor:"pointer"}},t.a.createElement("span",{onClick:function(){tr(!yr)}},yr?"\u5C55\u5F00":"\u6536\u8D77"," ",t.a.createElement("i",{className:"iconfont font14 ".concat(yr?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(It==null?void 0:It.enrolled)&&t.a.createElement(S.a,{onClick:function(){window.open("/shixuns/".concat(mt==null?void 0:mt.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"\u5F00\u542F\u6311\u6218")))))}var Gi=Ci,Mi=ge.a.TabPane;function oa(Tt){var it,mt,Ct,It,Pt,Ht,Wt=Tt.loading,dt=Tt.ChartRules,At=Tt.ItemData,Dt=Tt.getCharts,yr=Tt.Selectkey,tr=Tt.HeaderDetail,qt=Tt.getChartRules,Gt=Tt.userinfo,nr=Tt.Editable,cr=Tt.dispatch,st=Tt.StaffDetail,Lr=Object(a.useState)(!1),Fr=Object(h.a)(Lr,2),Cr=Fr[0],rr=Fr[1],Et=Object(a.useState)(""),_t=Object(h.a)(Et,2),xt=_t[0],Jt=_t[1],pr=Object(a.useState)(!0),dr=Object(h.a)(pr,2),fr=dr[0],Dr=dr[1],an=Object(a.useState)(),qe=Object(h.a)(an,2),sr=qe[0],Nr=qe[1],rn=Object(a.useState)(),xr=Object(h.a)(rn,2),br=xr[0],Pr=xr[1],Ft=Object(w.i)(),Zt=Ft.identifier,wr=Object(a.useState)({page:1,limit:10}),er=Object(h.a)(wr,2),vt=er[0],yt=er[1],zt=Object(a.useState)(),Mt=Object(h.a)(zt,2),Mr=Mt[0],cn=Mt[1];Object(a.useEffect)(function(){var kr;fr&&dt!==null&&dt!==void 0&&(kr=dt.stages)!==null&&kr!==void 0&&kr[0]&&fn()},[dt==null||((it=dt.stages)===null||it===void 0)?void 0:it[0]]);var fn=function(){var kr=Object(o.a)(r.a.mark(function on(){var Ur,gn,Vr,yn,ei,Me;return r.a.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return ei=dt==null||((Ur=dt.stages)===null||Ur===void 0)?void 0:Ur[0],Nr(ei),Me=dt==null||((gn=dt.stages)===null||gn===void 0||((Vr=gn[0])===null||Vr===void 0||((yn=Vr.children)===null||yn===void 0)))?void 0:yn[0],Pr(Me),vt.id=(Me==null?void 0:Me.id)||(ei==null?void 0:ei.id),yt(Object(L.a)({},vt)),Ye.next=7,Dt(Object(L.a)(Object(L.a)({},vt),{},{stage_id:vt.id}));case 7:case"end":return Ye.stop()}},on)}));return function(){return kr.apply(this,arguments)}}();return t.a.createElement("div",null,(dt==null||((mt=dt.stages)===null||mt===void 0)?void 0:mt.length)>0?null:t.a.createElement(Je,null),(dt==null||((Ct=dt.stages)===null||Ct===void 0)?void 0:Ct.length)>0&&t.a.createElement(ge.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var kr=Object(o.a)(r.a.mark(function on(Ur){var gn,Vr,yn,ei,Me,Ge,Ye;return r.a.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return rr(!1),Ge=dt==null||((gn=dt.stages)===null||gn===void 0)?void 0:gn.filter(function(Pe){return parseInt(Ur)===parseInt(Pe==null?void 0:Pe.id)})[0],Ye=Ge==null||((Vr=Ge.children)===null||Vr===void 0)?void 0:Vr[0],Pr(Ye),Nr(Ge),Jt(((yn=dt.rule_contents)===null||yn===void 0||((ei=yn.filter(function(Pe){return parseInt(Pe.competition_stage_id)===parseInt(Ge==null?void 0:Ge.id)}))===null||ei===void 0||((Me=ei[0])===null||Me===void 0))?void 0:Me.content)||""),vt.page=1,vt.limit=10,vt.id=(Ye==null?void 0:Ye.id)||Ur,yt(Object(L.a)({},vt)),Ee.next=9,Dt(Object(L.a)({},vt));case 9:case"end":return Ee.stop()}},on)}));return function(on){return kr.apply(this,arguments)}}()},dt&&dt.stages.map(function(kr,on){return t.a.createElement(Mi,{tab:kr.name,key:kr.id===null?0:kr.id})})),(sr==null||((It=sr.children)===null||It===void 0)?void 0:It.length)>0&&t.a.createElement(ge.a,{activeKey:(br==null?void 0:br.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var kr=Object(o.a)(r.a.mark(function on(Ur){var gn,Vr;return r.a.wrap(function(ei){for(;;)switch(ei.prev=ei.next){case 0:return Vr=sr==null||((gn=sr.children)===null||gn===void 0)?void 0:gn.filter(function(Me){return parseInt(Ur)===parseInt(Me==null?void 0:Me.id)})[0],Pr(Vr),vt.page=1,vt.limit=10,vt.id=Ur,yt(Object(L.a)({},vt)),ei.next=5,Dt(Object(L.a)({},vt));case 5:case"end":return ei.stop()}},on)}));return function(on){return kr.apply(this,arguments)}}()},sr==null||((Pt=sr.children)===null||Pt===void 0)?void 0:Pt.map(function(kr,on){return t.a.createElement(Mi,{tab:kr.name,key:kr.id===null?0:kr.id})})),t.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),t.a.createElement("div",{style:{padding:"20px 30px"}},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.a.createElement("span",{style:{color:"#9096A3"}},"\u4F5C\u54C1\u63D0\u4EA4\u65F6\u95F4",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},At==null?void 0:At.start_time,"~",At==null?void 0:At.end_time)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u6210\u7EE9\u6765\u6E90",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},(At==null?void 0:At.score_source)===0?"\u7ECF\u9A8C\u503C":"\u9884\u6D4B\u51C6\u786E\u7387")," ")),t.a.createElement(d.a,{spinning:Wt},At==null||((Ht=At.results)===null||Ht===void 0)?void 0:Ht.map(function(kr,on){return t.a.createElement(Gi,{StaffDetail:st,item:kr,index:on})})),t.a.createElement(qi.a,{total:At==null?void 0:At.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:vt.page,onChange:function(on,Ur){vt.page=on,yt(Object(L.a)({},vt)),Dt(Object(L.a)({},vt))}})))}var sa=oa,Ii=D("UfjD"),qn=D("qHvr"),Vi=function(it){var mt,Ct,It,Pt,Ht,Wt,dt,At,Dt=it.globalSetting,yr=it.loading,tr=it.dispatch,qt=it.user,Gt=Object(m.a)(it,["globalSetting","loading","dispatch","user"]),nr=Object(a.useState)({avatar_url:""}),cr=Object(h.a)(nr,2),st=cr[0],Lr=cr[1],Fr=Object(a.useState)([]),Cr=Object(h.a)(Fr,2),rr=Cr[0],Et=Cr[1],_t=Object(w.i)(),xt=_t.identifier,Jt=Object(a.useState)([]),pr=Object(h.a)(Jt,2),dr=pr[0],fr=pr[1],Dr=Object(a.useState)(!0),an=Object(h.a)(Dr,2),qe=an[0],sr=an[1],Nr=Object(a.useState)([]),rn=Object(h.a)(Nr,2),xr=rn[0],br=rn[1],Pr=Object(a.useState)([]),Ft=Object(h.a)(Pr,2),Zt=Ft[0],wr=Ft[1],er=Object(a.useState)(!1),vt=Object(h.a)(er,2),yt=vt[0],zt=vt[1],Mt=Object(a.useState)(!1),Mr=Object(h.a)(Mt,2),cn=Mr[0],fn=Mr[1],kr=Object(a.useState)(!1),on=Object(h.a)(kr,2),Ur=on[0],gn=on[1],Vr=Object(a.useState)([]),yn=Object(h.a)(Vr,2),ei=yn[0],Me=yn[1],Ge=Object(a.useState)([]),Ye=Object(h.a)(Ge,2),Fe=Ye[0],Ee=Ye[1],Pe=Object(a.useState)([]),_e=Object(h.a)(Pe,2),je=_e[0],ze=_e[1],Ve=Object(a.useState)(!1),We=Object(h.a)(Ve,2),Ze=We[0],pt=We[1],kt=Object(a.useState)([]),jt=Object(h.a)(kt,2),Yt=jt[0],Ir=jt[1],Qr=Object(a.useState)(),$r=Object(h.a)(Qr,2),nn=$r[0],Kr=$r[1],sn=Object(a.useState)(!0),ln=Object(h.a)(sn,2),xn=ln[0],hn=ln[1],jn=Object(a.useState)(!1),pn=Object(h.a)(jn,2),jr=pn[0],Wr=pn[1],dn=Object(a.useState)(!1),bn=Object(h.a)(dn,2),Tr=bn[0],Sn=bn[1],Yn=Object(a.useState)(!1),Rn=Object(h.a)(Yn,2),Wn=Rn[0],Dn=Rn[1],ti=Object(a.useState)(!1),ci=Object(h.a)(ti,2),Jn=ci[0],gi=ci[1],Xi=Object(a.useState)(!1),Oi=Object(h.a)(Xi,2),di=Oi[0],Hn=Oi[1],zn=Object(a.useState)(!0),Qn=Object(h.a)(zn,2),Vn=Qn[0],ii=Qn[1],Di=Object(w.h)(),ra=Object(a.useRef)(null);Object(a.useEffect)(function(){xt&&Mn(),Object(Ut.T)("\u7ADE\u8D5B")},[xt]);function Mn(){return Ui.apply(this,arguments)}function Ui(){return Ui=Object(o.a)(r.a.mark(function Sr(){var Or;return r.a.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:return Tn.t0=Et,Tn.next=3,tr({type:"competitions/getStaff",payload:{identifier:xt}});case 3:return Tn.t1=Tn.sent,(0,Tn.t0)(Tn.t1),Tn.next=7,tr({type:"competitions/getHeader",payload:{identifier:xt}});case 7:Or=Tn.sent,Lr(Or),Object(Ut.T)((Or==null?void 0:Or.name)||"\u7ADE\u8D5B");case 10:case"end":return Tn.stop()}},Sr)})),Ui.apply(this,arguments)}Object(a.useEffect)(function(){var Sr;Kr(parseInt(Di==null||((Sr=Di.query)===null||Sr===void 0)?void 0:Sr.type)===1)},[Di]),Object(a.useEffect)(function(){var Sr;if((st==null||((Sr=st.competition_modules)===null||Sr===void 0)?void 0:Sr.length)>0){var Or,lr;if((Di==null||((Or=Di.query)===null||Or===void 0)?void 0:Or.active)==="\u8D5B\u9898\u53D1\u5E03"){var Tn,vr=st==null||((Tn=st.competition_modules)===null||Tn===void 0)?void 0:Tn.find(function(pa){return pa.name==="\u8D5B\u9898\u53D1\u5E03"});if(vr){Bi(vr);return}}Bi(st==null||((lr=st.competition_modules)===null||lr===void 0)?void 0:lr[0])}},[st]);function Bi(Sr){return Fn.apply(this,arguments)}function Fn(){return Fn=Object(o.a)(r.a.mark(function Sr(Or){var lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:if(ze(Or.id),je=Or.id,br(Or),!(Or.module_type==="entrance")){vr.next=9;break}return vr.next=6,tr({type:"competitions/getItem",payload:{url:Or.module_url,module_type:"entrance"}});case 6:lr=vr.sent,vr.next=12;break;case 9:return vr.next=11,tr({type:"competitions/getItem",payload:{url:Or.module_url}});case 11:lr=vr.sent;case 12:zt(!1),gn(!1),pt(!1),fr(lr),Wr(!1),Sn(!1),wr(Or.module_type),Or.module_type==="chart"?(zt(!0),sr(!1),Ba()):Or.module_type==="certificate"?(gn(!0),zt(!1),sr(!1),ba()):Or.module_type==="md_tab"?(pt(!0),sr(!1),localStorage.setItem("issee","2"),zt(!1),gn(!1),ca()):Or.module_type==="md_shixun"?(Wr(!0),sr(!1),ca()):Or.module_type==="entrance"?(Sn(!0),sr(!1),ca()):(sr(!0),localStorage.setItem("issee","1"));case 20:case"end":return vr.stop()}},Sr)})),Fn.apply(this,arguments)}function Pn(Sr,Or,lr){return ai.apply(this,arguments)}function ai(){return ai=Object(o.a)(r.a.mark(function Sr(Or,lr,Tn){var vr,pa;return r.a.wrap(function(Kn){for(;;)switch(Kn.prev=Kn.next){case 0:if(Or.stopPropagation(),Object(fe.e)(tr)){Kn.next=3;break}return Kn.abrupt("return");case 3:if(!(st!=null&&st.is_authentication&&!(qt!=null&&(vr=qt.userInfo)!==null&&vr!==void 0&&vr.authentication))){Kn.next=6;break}return tr({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),Kn.abrupt("return");case 6:if(!(st!=null&&st.enroll_url)){Kn.next=9;break}return Object(Ut.O)(st==null?void 0:st.enroll_url),Kn.abrupt("return");case 9:if(!(Tn==="ismodel")){Kn.next=23;break}if(!(lr.member_of_course===!0)){Kn.next=14;break}Object(Ut.O)("/classrooms/".concat(lr.course_id)),Kn.next=21;break;case 14:if(lr.invite_code){Kn.next=17;break}return u.b.info("\u672C\u7ADE\u8D5B\u53EA\u9762\u5411\u90E8\u5206\u5B66\u6821/\u5355\u4F4D\u5F00\u653E\uFF0C\u4F60\u6682\u65F6\u6CA1\u6709\u53C2\u8D5B\u8D44\u683C"),Kn.abrupt("return");case 17:return Kn.next=19,tr({type:"competitions/addApplytojoincourse",payload:{invite_code:lr.invite_code,student:1}});case 19:pa=Kn.sent,pa.status===0&&Object(Ut.O)("/classrooms/".concat(lr.course_id));case 21:Kn.next=27;break;case 23:if(!(rr.enrolled===!0)){Kn.next=26;break}return Object(Ut.O)(Tn),Kn.abrupt("return");case 26:Dn(!0);case 27:case"end":return Kn.stop()}},Sr)})),ai.apply(this,arguments)}function Ba(){return wa.apply(this,arguments)}function wa(){return wa=Object(o.a)(r.a.mark(function Sr(){return r.a.wrap(function(lr){for(;;)switch(lr.prev=lr.next){case 0:return lr.t0=fn,lr.next=3,tr({type:"competitions/ChartRules",payload:{identifier:xt}});case 3:return lr.t1=lr.sent,lr.next=6,(0,lr.t0)(lr.t1);case 6:case"end":return lr.stop()}},Sr)})),wa.apply(this,arguments)}function la(Sr){return ua.apply(this,arguments)}function ua(){return ua=Object(o.a)(r.a.mark(function Sr(Or){var lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,tr({type:"competitions/Charts",payload:{identifier:xt,stage_id:Or}});case 2:lr=vr.sent,fr(lr);case 4:case"end":return vr.stop()}},Sr)})),ua.apply(this,arguments)}function ka(Sr){return _a.apply(this,arguments)}function _a(){return _a=Object(o.a)(r.a.mark(function Sr(Or){var lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return hn(!0),vr.next=3,tr({type:"competitions/Results",payload:Object(L.a)({identifier:xt,stage_id:Or==null?void 0:Or.id},Or)});case 3:lr=vr.sent,fr(lr),hn(!1);case 6:case"end":return vr.stop()}},Sr)})),_a.apply(this,arguments)}function La(Sr){return Wa.apply(this,arguments)}function Wa(){return Wa=Object(o.a)(r.a.mark(function Sr(Or){var lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return hn(!0),vr.next=3,tr({type:"competitions/Results",payload:Object(L.a)({identifier:xt,stage_id:Or==null?void 0:Or.id,module_type:"entrance"},Or)});case 3:lr=vr.sent,fr(lr),hn(!1);case 6:case"end":return vr.stop()}},Sr)})),Wa.apply(this,arguments)}function Xa(Sr){return Ma.apply(this,arguments)}function Ma(){return Ma=Object(o.a)(r.a.mark(function Sr(Or){var lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,tr({type:"competitions/Results",payload:{identifier:xt,stage_id:Or}});case 2:if(lr=vr.sent,!(localStorage.getItem("issee")==="1")){vr.next=5;break}return vr.abrupt("return");case 5:fr(lr);case 6:case"end":return vr.stop()}},Sr)})),Ma.apply(this,arguments)}function ca(){return Sa.apply(this,arguments)}function Sa(){return Sa=Object(o.a)(r.a.mark(function Sr(){return r.a.wrap(function(lr){for(;;)switch(lr.prev=lr.next){case 0:return lr.t0=Ir,lr.next=3,tr({type:"competitions/TabResults",payload:{identifier:xt,competition_module_id:je}});case 3:lr.t1=lr.sent,(0,lr.t0)(lr.t1);case 5:case"end":return lr.stop()}},Sr)})),Sa.apply(this,arguments)}function ba(){return da.apply(this,arguments)}function da(){return da=Object(o.a)(r.a.mark(function Sr(){var Or,lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,tr({type:"competitions/Prize",payload:{identifier:xt,user_id:qt==null||((Or=qt.userInfo)===null||Or===void 0)?void 0:Or.user_id}});case 2:lr=vr.sent,Me(lr);case 4:case"end":return vr.stop()}},Sr)})),da.apply(this,arguments)}function co(){return Ea.apply(this,arguments)}function Ea(){return Ea=Object(o.a)(r.a.mark(function Sr(){var Or,lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,tr({type:"competitions/Accounts",payload:{id:qt==null||((Or=qt.userInfo)===null||Or===void 0)?void 0:Or.user_id}});case 2:lr=vr.sent,Ee(lr);case 4:case"end":return vr.stop()}},Sr)})),Ea.apply(this,arguments)}function Ta(Sr){return fa.apply(this,arguments)}function fa(){return fa=Object(o.a)(r.a.mark(function Sr(Or){var lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:if(Vn){vr.next=2;break}return vr.abrupt("return");case 2:if(ii(!1),!ha()){vr.next=5;break}return vr.abrupt("return");case 5:return vr.next=7,tr({type:"competitions/AddTeam",payload:{identifier:xt,name:Or}});case 7:lr=vr.sent,lr&&lr.status===0?(u.b.info("\u521B\u5EFA\u6218\u961F\u6210\u529F"),Mn(),gi(!1)):ii(!0);case 9:case"end":return vr.stop()}},Sr)})),fa.apply(this,arguments)}function ha(){var Sr,Or;if(qt!=null&&(Sr=qt.userInfo)!==null&&Sr!==void 0&&Sr.is_teacher){var lr;if(rr!=null&&(lr=rr.teacher_staff)!==null&&lr!==void 0&&lr.mutiple_limited&&(rr!=null&&rr.enrolled))return u.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),ii(!0),!0}else{var Tn;if(rr!=null&&(Tn=rr.member_staff)!==null&&Tn!==void 0&&Tn.mutiple_limited&&(rr!=null&&rr.enrolled))return u.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),ii(!0),!0}if(rr!=null&&rr.enroll_ended)return u.b.info("\u62A5\u540D\u5DF2\u622A\u6B62\uFF0C\u65E0\u9700\u62A5\u540D"),ii(!0),!0;if(qt!=null&&(Or=qt.userInfo)!==null&&Or!==void 0&&Or.is_teacher){if(!rr.teacher_staff)return u.b.info("\u5DF2\u7981\u6B62\u8001\u5E08\u62A5\u540D"),ii(!0),!0}else if(!(rr!=null&&rr.member_staff))return u.b.info("\u5DF2\u7981\u6B62\u5B66\u751F\u62A5\u540D"),ii(!0),!0}function $i(Sr){return na.apply(this,arguments)}function na(){return na=Object(o.a)(r.a.mark(function Sr(Or){var lr;return r.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:if(Vn){vr.next=2;break}return vr.abrupt("return");case 2:if(!ha()){vr.next=4;break}return vr.abrupt("return");case 4:return ii(!1),vr.next=7,tr({type:"competitions/JoinTeam",payload:{identifier:xt,invite_code:Or}});case 7:lr=vr.sent,lr&&lr.status===0?(u.b.info("\u52A0\u5165\u6218\u961F\u6210\u529F"),Hn(!1),ii(!0),Mn()):ii(!0);case 9:case"end":return vr.stop()}},Sr)})),na.apply(this,arguments)}return t.a.createElement("div",{className:"edu-container minH500"},t.a.createElement(n.a,{className:"mt10",separator:">"},t.a.createElement(n.a.Item,null,t.a.createElement(E.a,{to:"/competitions/index"},"\u5728\u7EBF\u7ADE\u8D5B")),t.a.createElement(n.a.Item,null,st.name,st.sub_title?"-"+st.sub_title:null)),t.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},t.a.createElement(d.a,{spinning:yr.effects["competitions/getHeader"]},t.a.createElement("div",{style:{height:"355px",width:"800px"}},(st==null?void 0:st.avatar_url)&&(st==null?void 0:st.avatar_url)!==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:X.a.IMG_SERVER+"/"+(st==null?void 0:st.avatar_url)}),!(st!=null&&st.avatar_url)&&(st==null?void 0:st.avatar_url)==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:X.a.IMG_SERVER+"/images/educoder/competitions/mainbanner.jpg"}))),t.a.createElement("div",{style:{marginLeft:"20px",width:"400px"}},t.a.createElement("p",{className:"".concat(O.a.titlesize)},st.name,st.sub_title?"-"+st.sub_title:null),t.a.createElement("p",{style:{display:"flex",justifyContent:"space-between",marginRight:18}},t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u5956\u91D1"),st!=null&&st.bonus?t.a.createElement("span",{style:{fontSize:"24px"}},"\xA5",parseInt(st&&st.bonus).toLocaleString()):t.a.createElement("span",{style:{fontSize:"24px"}},"\u6682\u65E0")),t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u6D4F\u89C8"),t.a.createElement("span",{style:{fontSize:"24px"}},parseInt(st&&st.visits_count).toLocaleString())),t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u62A5\u540D"),t.a.createElement("span",{style:{fontSize:"24px"}},parseInt(st&&st.member_count).toLocaleString()))),t.a.createElement("p",{className:O.a.timesize,style:{marginTop:30}},t.a.createElement("span",{style:{color:"#9b9b9b",marginTop:"30px"}},"\u7ADE\u8D5B\u65F6\u95F4\uFF1A"),st.start_time,"~",st.end_time),t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u62A5\u540D\u622A\u6B62\uFF1A"),st.enroll_end_time),st.competition_status==="ended"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u5DF2\u7ED3\u675F"):null,st.competition_status==="nearly_published"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u672A\u53D1\u5E03"):null,st.competition_status==="progressing"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u8FDB\u884C\u4E2D"):null,t.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},(st==null?void 0:st.mode)<=2&&rr.enrolled&&t.a.createElement(S.a,{onClick:function(Or){if((st==null?void 0:st.mode)===1){var lr;Bi((lr=st.competition_modules)===null||lr===void 0?void 0:lr.find(function(Tn){return Tn.module_type==="entrance"}))}else Pn(Or,st,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:(st==null?void 0:st.mode)===2||(st==null?void 0:st.mode)===1&&((mt=st.competition_modules)===null||mt===void 0||((Ct=mt.filter(function(Sr){return Sr.module_type==="entrance"}))===null||Ct===void 0)?void 0:Ct.length)>0?"":"none"},className:O.a.buttonsize},(st==null?void 0:st.mode)===1&&"\u8D5B\u9898\u5165\u53E3",(st==null?void 0:st.mode)===2&&"\u8FDB\u5165\u8BFE\u5802"),st.competition_status==="ended"?t.a.createElement(S.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u5DF2\u7ED3\u675F"):null,st.competition_status==="nearly_published"?t.a.createElement(S.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u672A\u53D1\u5E03"):null,st.competition_status!=="nearly_published"&&st.enroll_end&&st.competition_status!=="ended"?t.a.createElement(S.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u62A5\u540D\u622A\u6B62"):null,st.competition_status==="progressing"&&st.enroll_end!=!0?t.a.createElement(S.a,{type:"primary",disabled:rr.enrolled&&!st.need_attachment,className:O.a.buttonsize,onClick:function(Or){if(rr.enrolled&&st.need_attachment){var lr;(lr=ra.current)===null||lr===void 0||lr.handleVisible();return}Pn(Or,st,st.mode===2?"ismodel":st.personal?"personal":"/competitions/index/".concat(st.identifier,"/enroll"))}},rr.enrolled?st.need_attachment?"\u4E0A\u4F20\u4F5C\u54C1":"\u5DF2\u62A5\u540D":st!=null&&st.enroll_url?"\u524D\u5F80\u5927\u8D5B\u5B98\u7F51\u62A5\u540D":"\u7ACB\u5373\u62A5\u540D"):null),qt.userInfo.real_name!="\u6E38\u5BA2"&&!(st!=null&&st.enroll_url)&&t.a.createElement("span",{onClick:function(Or){return Pn(Or,st,st.mode===2?"ismodel":st.personal?"personal":"/competitions/index/".concat(st.identifier,"/enroll"))},className:O.a.myteam},Object(zr.u)()?"\u53C2\u8D5B\u6218\u961F>>":"\u6211\u7684\u6218\u961F>>"))),t.a.createElement("div",{className:O.a.bootmdetail},t.a.createElement("div",{className:O.a.flex1},t.a.createElement(p.a,{selectedKeys:["".concat(je)]},st&&st.competition_modules&&st.competition_modules.map(function(Sr,Or){if(Sr.module_type!="enroll")return t.a.createElement(p.a.Item,{className:O.a.menuItem,onClick:function(){if(Sr!=null&&Sr.is_authentication){if(!Object(fe.e)(tr))return;u.b.info("\u52A0\u5165\u6218\u961F\u624D\u80FD\u67E5\u770B");return}Bi(Sr)},key:Sr.id},Sr.name)}))),t.a.createElement("div",{className:O.a.flex6,style:{padding:(jr||Tr)&&0}},Ur?t.a.createElement(Lt,{dispatch:tr,userid:qt==null||((It=qt.userInfo)===null||It===void 0)?void 0:It.user_id,Prize:ei,Accounts:Fe,getAccounts:co}):null,yt?t.a.createElement(Le,{HeaderDetail:st,userinfo:qt.userInfo,Editable:st==null||((Pt=st.permission)===null||Pt===void 0)?void 0:Pt.editable,getCharts:la,getChartRules:Ba,Selectkey:je,ChartRules:cn,ItemData:dr}):null,qe?t.a.createElement(ee,{ref:ra,StaffDetail:rr,HeaderDetail:st,userinfo:qt.userInfo,Editable:st==null||((Ht=st.permission)===null||Ht===void 0)?void 0:Ht.editable,ItemData:dr,setIssee:sr,ModelType:Zt,dispatch:tr}):null,!qe&&!jr&&!Tr&&!yt&&!Ur&&!Ze?t.a.createElement(Q,{userinfo:qt.userInfo,ModelType:Zt,getrightdatas:Bi,dispatch:tr,MenuItem:xr,setIssee:sr,identifier:xt,ItemData:dr}):null,Ze&&t.a.createElement(In,{dispatch:tr,StaffDetail:rr,userinfo:qt.userInfo,HeaderDetail:st,Editable:st==null||((Wt=st.permission)===null||Wt===void 0)?void 0:Wt.editable,getCharts:Xa,getChartRules:ca,Selectkey:je,ChartRules:Yt,ItemData:dr}),jr&&t.a.createElement(xi,{loading:xn,dispatch:tr,StaffDetail:rr,userinfo:qt.userInfo,HeaderDetail:st,Editable:st==null||((dt=st.permission)===null||dt===void 0)?void 0:dt.editable,getCharts:ka,getChartRules:ca,Selectkey:je,ChartRules:Yt,ItemData:dr}),Tr&&t.a.createElement(sa,{loading:xn,dispatch:tr,StaffDetail:rr,userinfo:qt.userInfo,HeaderDetail:st,Editable:st==null||((At=st.permission)===null||At===void 0)?void 0:At.editable,getCharts:La,getChartRules:ca,Selectkey:je,ChartRules:Yt,ItemData:dr}))),t.a.createElement(C.a,null),t.a.createElement(G,{getResults:Xa}),t.a.createElement(T.a,{visible:nn,footer:null,width:720,title:"\u63D0\u793A",centered:!0,onCancel:function(){return Kr(!1)}},t.a.createElement("div",{className:O.a.modal},t.a.createElement("div",null,"\u534E\u4E3A\u6A21\u578B\u738B\u8005\u6311\u6218\u8D5B\u9EC4\u91D1\u8D5B\u6B63\u5F0F\u5F00\u542F\u5566"),t.a.createElement("div",null,"\u672C\u8D5B\u6BB5\u603B\u5956\u91D1\u9AD8\u8FBE",t.a.createElement("span",{style:{color:"#FF8C29"}},"300,000"),"\u5143"),t.a.createElement("div",null,"1\u3001\u7B26\u5408\u8D5B\u9898\u8981\u6C42\u7684\u961F\u4F0D\uFF08\u517125\u652F\uFF09\u53EF\u83B7\u5F97\u5956\u91D1\uFF1A12000RMB/\u961F \uFF1B"),t.a.createElement("div",null,"2\u3001\u53C2\u4E0E\u83B7\u5F97\u201C\u8363\u8000\u6BBF\u5802\u201D\u699C\u4E3B\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1\uFF1B"),t.a.createElement("div",null,"3\u3001\u5404\u8D5B\u9898\u7CBE\u5EA6\u6700\u9AD8\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1+\u8363\u8A89\u8BC1\u4E66\uFF1B"),t.a.createElement("div",null,"\u5FC3\u52A8\u5427\uFF0C\u90A3\u5C31\u5FEB\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u62A5\u540D\u53C2\u8D5B"),t.a.createElement(S.a,{type:"primary",onClick:function(){return Object(Ut.O)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"\u524D\u5F80\u62A5\u540D\u53C2\u8D5B"))),t.a.createElement(T.a,{title:"\u9009\u62E9\u53C2\u8D5B\u65B9\u5F0F",visible:Wn,onCancel:function(){Dn(!1)},footer:!1},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},t.a.createElement(S.a,{type:"primary",style:{height:40},onClick:function(){Hn(!0),Dn(!1)}},"\u52A0\u5165\u6218\u961F\u53C2\u8D5B"),t.a.createElement(S.a,{style:{height:40},onClick:function(){gi(!0),Dn(!1)}},"\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B"))),di?t.a.createElement(Ii.a,{isjoin:di,setJoin:Hn,JoinTeams:$i}):null,Jn?t.a.createElement(qn.a,{isAddmodle:Jn,setIsAdd:gi,createTeam:Ta}):null)},ta=Y.default=Object(f.a)(function(Tt){var it=Tt.loading,mt=Tt.globalSetting,Ct=Tt.user;return{globalSetting:mt,loading:it,user:Ct}})(Vi)},GRuw:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("lPiR"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.WordArray,p=g.algo,v=p.SHA256,S=p.SHA224=v.extend({_doReset:function(){this._hash=new P.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var b=v._doFinalize.call(this);return b.sigBytes-=4,b}});g.SHA224=v._createHelper(S),g.HmacSHA224=v._createHmacHelper(S)}(),L.SHA224})},GfqC:function(j,Y,D){"use strict";var L=D("q1tI"),g=D.n(L),T=D("TSYQ"),P=D.n(T);function p(K,U){var W="cannot "+K.method+" "+K.action+" "+U.status+"'",X=new Error(W);return X.status=U.status,X.method=K.method,X.url=K.action,X}function v(K){var U=K.responseText||K.response;if(!U)return U;try{return JSON.parse(U)}catch(W){return U}}function S(K){var U=new XMLHttpRequest;K.onProgress&&U.upload&&(U.upload.onprogress=function(fe){fe.total>0&&(fe.percent=fe.loaded/fe.total*100),K.onProgress(fe)});var W=new FormData;K.data&&Object.keys(K.data).forEach(function(ne){var fe=K.data[ne];if(Array.isArray(fe)){fe.forEach(function(me){W.append(ne+"[]",me)});return}W.append(ne,K.data[ne])}),K.file instanceof Blob?W.append(K.filename,K.file,K.file.name):W.append(K.filename,K.file),U.onerror=function(fe){K.onError(fe)},U.onload=function(){return U.status<200||U.status>=300?K.onError(p(K,U),v(U)):K.onSuccess(v(U),U)},U.open(K.method,K.action,!0),K.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var X=K.headers||{};return X["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(X).forEach(function(ne){X[ne]!==null&&U.setRequestHeader(ne,X[ne])}),U.send(W),{abort:function(){U.abort()}}}var b=+new Date,d=0;function l(){return"rc-upload-"+b+"-"+ ++d}function n(K,U){return K.indexOf(U,K.length-U.length)!==-1}var c=function(K,U){if(K&&U){var W=Array.isArray(U)?U:U.split(","),X=K.name||"",ne=K.type||"",fe=ne.replace(/\/.*$/,"");return W.some(function(me){var Ae=me.trim();return Ae.charAt(0)==="."?n(X.toLowerCase(),Ae.toLowerCase()):/\/\*$/.test(Ae)?fe===Ae.replace(/\/.*$/,""):ne===Ae})}return!0};function u(K,U){var W=K.createReader(),X=[];function ne(){W.readEntries(function(fe){var me=Array.prototype.slice.apply(fe);X=X.concat(me);var Ae=!me.length;Ae?U(X):ne()})}ne()}var o=function(U,W,X){var ne=function fe(me,Ae){Ae=Ae||"",me.isFile?me.file(function(De){X(De)&&(me.fullPath&&!De.webkitRelativePath&&(Object.defineProperties(De,{webkitRelativePath:{writable:!0}}),De.webkitRelativePath=me.fullPath.replace(/^\//,""),Object.defineProperties(De,{webkitRelativePath:{writable:!1}})),W([De]))}):me.isDirectory&&u(me,function(De){De.forEach(function(ye){fe(ye,""+Ae+me.name+"/")})})};U.forEach(function(fe){ne(fe.webkitGetAsEntry())})},h=o,m=Object.assign||function(K){for(var U=1;U<arguments.length;U++){var W=arguments[U];for(var X in W)Object.prototype.hasOwnProperty.call(W,X)&&(K[X]=W[X])}return K},s=function(){function K(U,W){var X=[],ne=!0,fe=!1,me=void 0;try{for(var Ae=U[Symbol.iterator](),De;!(ne=(De=Ae.next()).done)&&!(X.push(De.value),W&&X.length===W);ne=!0);}catch(ye){fe=!0,me=ye}finally{try{!ne&&Ae.return&&Ae.return()}finally{if(fe)throw me}}return X}return function(U,W){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return K(U,W);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function K(U,W){for(var X=0;X<W.length;X++){var ne=W[X];ne.enumerable=ne.enumerable||!1,ne.configurable=!0,"value"in ne&&(ne.writable=!0),Object.defineProperty(U,ne.key,ne)}}return function(U,W,X){return W&&K(U.prototype,W),X&&K(U,X),U}}();function a(K,U,W){return U in K?Object.defineProperty(K,U,{value:W,enumerable:!0,configurable:!0,writable:!0}):K[U]=W,K}function t(K,U){var W={};for(var X in K){if(U.indexOf(X)>=0)continue;if(!Object.prototype.hasOwnProperty.call(K,X))continue;W[X]=K[X]}return W}function w(K,U){if(!(K instanceof U))throw new TypeError("Cannot call a class as a function")}function E(K,U){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:K}function f(K,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);K.prototype=Object.create(U&&U.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(K,U):K.__proto__=U)}var k=function(U){return Object.keys(U).reduce(function(W,X){return(X.substr(0,5)==="data-"||X.substr(0,5)==="aria-"||X==="role")&&(W[X]=U[X]),W},{})},O=function(K){f(U,K);function U(){var W,X,ne,fe;w(this,U);for(var me=arguments.length,Ae=Array(me),De=0;De<me;De++)Ae[De]=arguments[De];return fe=(X=(ne=E(this,(W=U.__proto__||Object.getPrototypeOf(U)).call.apply(W,[this].concat(Ae))),ne),ne.state={uid:l()},ne.reqs={},ne.onChange=function(ye){var Oe=ye.target.files;ne.uploadFiles(Oe),ne.reset()},ne.onClick=function(ye){var Oe=ne.fileInput;if(!Oe)return;var xe=ne.props,ue=xe.children,le=xe.onClick;ue&&ue.type==="button"&&(Oe.parentNode.focus(),Oe.parentNode.querySelector("button").blur()),Oe.click(),le&&le(ye)},ne.onKeyDown=function(ye){ye.key==="Enter"&&ne.onClick()},ne.onFileDrop=function(ye){var Oe=ne.props.multiple;if(ye.preventDefault(),ye.type==="dragover")return;if(ne.props.directory)h(Array.prototype.slice.call(ye.dataTransfer.items),ne.uploadFiles,function(ue){return c(ue,ne.props.accept)});else{var xe=Array.prototype.slice.call(ye.dataTransfer.files).filter(function(ue){return c(ue,ne.props.accept)});Oe===!1&&(xe=xe.slice(0,1)),ne.uploadFiles(xe)}},ne.uploadFiles=function(ye){var Oe=Array.prototype.slice.call(ye);Oe.map(function(xe){return xe.uid=l(),xe}).forEach(function(xe){ne.upload(xe,Oe)})},ne.saveFileInput=function(ye){ne.fileInput=ye},X),E(ne,fe)}return r(U,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(X,ne){var fe=this,me=this.props;if(!me.beforeUpload)return setTimeout(function(){return fe.post(X)},0);var Ae=me.beforeUpload(X,ne);Ae&&Ae.then?Ae.then(function(De){var ye=Object.prototype.toString.call(De);return ye==="[object File]"||ye==="[object Blob]"?fe.post(De):fe.post(X)}).catch(function(De){console.log(De)}):Ae!==!1&&setTimeout(function(){return fe.post(X)},0);return}},{key:"post",value:function(X){var ne=this;if(!this._isMounted)return;var fe=this.props,me=fe.onStart,Ae=fe.onProgress,De=fe.transformFile,ye=De===void 0?function(Oe){return Oe}:De;new Promise(function(Oe){var xe=fe.action;return typeof xe=="function"&&(xe=xe(X)),Oe(xe)}).then(function(Oe){var xe=X.uid,ue=fe.customRequest||S,le=Promise.resolve(ye(X)).then(function(re){var pe=fe.data;return typeof pe=="function"&&(pe=pe(re)),Promise.all([re,pe])}).catch(function(re){console.error(re)});le.then(function(re){var pe=s(re,2),ee=pe[0],te=pe[1],ce={action:Oe,filename:fe.name,data:te,file:ee,headers:fe.headers,withCredentials:fe.withCredentials,method:fe.method||"post",onProgress:Ae?function(q){Ae(q,X)}:null,onSuccess:function(Q,V){delete ne.reqs[xe],fe.onSuccess(Q,X,V)},onError:function(Q,V){delete ne.reqs[xe],fe.onError(Q,V,X)}};me(X),ne.reqs[xe]=ue(ce)})})}},{key:"reset",value:function(){this.setState({uid:l()})}},{key:"abort",value:function(X){var ne=this.reqs;if(X){var fe=X;X&&X.uid&&(fe=X.uid),ne[fe]&&ne[fe].abort&&ne[fe].abort(),delete ne[fe]}else Object.keys(ne).forEach(function(me){ne[me]&&ne[me].abort&&ne[me].abort(),delete ne[me]})}},{key:"render",value:function(){var X,ne=this.props,fe=ne.component,me=ne.prefixCls,Ae=ne.className,De=ne.disabled,ye=ne.id,Oe=ne.style,xe=ne.multiple,ue=ne.accept,le=ne.children,re=ne.directory,pe=ne.openFileDialogOnClick,ee=ne.onMouseEnter,te=ne.onMouseLeave,ce=t(ne,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),q=P()((X={},a(X,me,!0),a(X,me+"-disabled",De),a(X,Ae,Ae),X)),Q=De?{}:{onClick:pe?this.onClick:function(){},onKeyDown:pe?this.onKeyDown:function(){},onMouseEnter:ee,onMouseLeave:te,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return g.a.createElement(fe,m({},Q,{className:q,role:"button",style:Oe}),g.a.createElement("input",m({},k(ce),{id:ye,type:"file",ref:this.saveFileInput,onClick:function(Z){return Z.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:ue,directory:re?"directory":null,webkitdirectory:re?"webkitdirectory":null,multiple:xe,onChange:this.onChange})),le)}}]),U}(L.Component),C=O,x=Object.assign||function(K){for(var U=1;U<arguments.length;U++){var W=arguments[U];for(var X in W)Object.prototype.hasOwnProperty.call(W,X)&&(K[X]=W[X])}return K},y=function(){function K(U,W){for(var X=0;X<W.length;X++){var ne=W[X];ne.enumerable=ne.enumerable||!1,ne.configurable=!0,"value"in ne&&(ne.writable=!0),Object.defineProperty(U,ne.key,ne)}}return function(U,W,X){return W&&K(U.prototype,W),X&&K(U,X),U}}();function _(K,U){if(!(K instanceof U))throw new TypeError("Cannot call a class as a function")}function M(K,U){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:K}function I(K,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);K.prototype=Object.create(U&&U.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(K,U):K.__proto__=U)}function N(){}var G=function(K){I(U,K);function U(){var W,X,ne,fe;_(this,U);for(var me=arguments.length,Ae=Array(me),De=0;De<me;De++)Ae[De]=arguments[De];return fe=(X=(ne=M(this,(W=U.__proto__||Object.getPrototypeOf(U)).call.apply(W,[this].concat(Ae))),ne),ne.saveUploader=function(ye){ne.uploader=ye},X),M(ne,fe)}return y(U,[{key:"abort",value:function(X){this.uploader.abort(X)}},{key:"render",value:function(){return g.a.createElement(C,x({},this.props,{ref:this.saveUploader}))}}]),U}(L.Component);G.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:N,onError:N,onSuccess:N,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var H=G,B=Y.a=H},HmJG:function(j,Y,D){},IBYe:function(j,Y,D){"use strict";function L(g){return null}Y.a=L},Ib8C:function(j,Y,D){(function(L){(function(g,T){j.exports=Y=T()})(this,function(){var g=g||function(T,P){var p;if(typeof window!="undefined"&&window.crypto&&(p=window.crypto),typeof self!="undefined"&&self.crypto&&(p=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(p=globalThis.crypto),!p&&typeof window!="undefined"&&window.msCrypto&&(p=window.msCrypto),!p&&typeof L!="undefined"&&L.crypto&&(p=L.crypto),!p&&!0)try{p=D(4)}catch(a){}var v=function(){if(p){if(typeof p.getRandomValues=="function")try{return p.getRandomValues(new Uint32Array(1))[0]}catch(a){}if(typeof p.randomBytes=="function")try{return p.randomBytes(4).readInt32LE()}catch(a){}}throw new Error("Native crypto module could not be used to get secure random number.")},S=Object.create||function(){function a(){}return function(t){var w;return a.prototype=t,w=new a,a.prototype=null,w}}(),b={},d=b.lib={},l=d.Base=function(){return{extend:function(a){var t=S(this);return a&&t.mixIn(a),(!t.hasOwnProperty("init")||this.init===t.init)&&(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var t in a)a.hasOwnProperty(t)&&(this[t]=a[t]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),n=d.WordArray=l.extend({init:function(a,t){a=this.words=a||[],t!=P?this.sigBytes=t:this.sigBytes=a.length*4},toString:function(a){return(a||u).stringify(this)},concat:function(a){var t=this.words,w=a.words,E=this.sigBytes,f=a.sigBytes;if(this.clamp(),E%4)for(var k=0;k<f;k++){var O=w[k>>>2]>>>24-k%4*8&255;t[E+k>>>2]|=O<<24-(E+k)%4*8}else for(var C=0;C<f;C+=4)t[E+C>>>2]=w[C>>>2];return this.sigBytes+=f,this},clamp:function(){var a=this.words,t=this.sigBytes;a[t>>>2]&=4294967295<<32-t%4*8,a.length=T.ceil(t/4)},clone:function(){var a=l.clone.call(this);return a.words=this.words.slice(0),a},random:function(a){for(var t=[],w=0;w<a;w+=4)t.push(v());return new n.init(t,a)}}),c=b.enc={},u=c.Hex={stringify:function(a){for(var t=a.words,w=a.sigBytes,E=[],f=0;f<w;f++){var k=t[f>>>2]>>>24-f%4*8&255;E.push((k>>>4).toString(16)),E.push((k&15).toString(16))}return E.join("")},parse:function(a){for(var t=a.length,w=[],E=0;E<t;E+=2)w[E>>>3]|=parseInt(a.substr(E,2),16)<<24-E%8*4;return new n.init(w,t/2)}},o=c.Latin1={stringify:function(a){for(var t=a.words,w=a.sigBytes,E=[],f=0;f<w;f++){var k=t[f>>>2]>>>24-f%4*8&255;E.push(String.fromCharCode(k))}return E.join("")},parse:function(a){for(var t=a.length,w=[],E=0;E<t;E++)w[E>>>2]|=(a.charCodeAt(E)&255)<<24-E%4*8;return new n.init(w,t)}},h=c.Utf8={stringify:function(a){try{return decodeURIComponent(escape(o.stringify(a)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(a){return o.parse(unescape(encodeURIComponent(a)))}},m=d.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new n.init,this._nDataBytes=0},_append:function(a){typeof a=="string"&&(a=h.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(a){var t,w=this._data,E=w.words,f=w.sigBytes,k=this.blockSize,O=k*4,C=f/O;a?C=T.ceil(C):C=T.max((C|0)-this._minBufferSize,0);var x=C*k,y=T.min(x*4,f);if(x){for(var _=0;_<x;_+=k)this._doProcessBlock(E,_);t=E.splice(0,x),w.sigBytes-=y}return new n.init(t,y)},clone:function(){var a=l.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0}),s=d.Hasher=m.extend({cfg:l.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){a&&this._append(a);var t=this._doFinalize();return t},blockSize:512/32,_createHelper:function(a){return function(t,w){return new a.init(w).finalize(t)}},_createHmacHelper:function(a){return function(t,w){return new r.HMAC.init(a,w).finalize(t)}}}),r=b.algo={};return b}(Math);return g})}).call(this,D("IyRk"))},JYp7:function(j,Y,D){"use strict";D.d(Y,"c",function(){return g}),D.d(Y,"d",function(){return T}),D.d(Y,"f",function(){return p}),D.d(Y,"a",function(){return v}),D.d(Y,"b",function(){return S}),D.d(Y,"e",function(){return b});var L=function(){var d=function(l,n){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var o in u)u.hasOwnProperty(o)&&(c[o]=u[o])},d(l,n)};return function(l,n){d(l,n);function c(){this.constructor=l}l.prototype=n===null?Object.create(n):(c.prototype=n.prototype,new c)}}(),g={done:!0,value:void 0},T;(function(d){var l={next:function(){return g}};function n(){return l}d.empty=n;function c(E){var f=!1;return{next:function(){return f?g:(f=!0,{done:!1,value:E})}}}d.single=c;function u(E,f,k){return f===void 0&&(f=0),k===void 0&&(k=E.length),{next:function(){return f>=k?g:{done:!1,value:E[f++]}}}}d.fromArray=u;function o(E){return{next:function(){var f=E.next();return f.done?g:{done:!1,value:f.value}}}}d.fromNativeIterator=o;function h(E){return E?Array.isArray(E)?d.fromArray(E):E:d.empty()}d.from=h;function m(E,f){return{next:function(){var k=E.next();return k.done?g:{done:!1,value:f(k.value)}}}}d.map=m;function s(E,f){return{next:function(){for(;;){var k=E.next();if(k.done)return g;if(f(k.value))return{done:!1,value:k.value}}}}}d.filter=s;function r(E,f){for(var k=E.next();!k.done;k=E.next())f(k.value)}d.forEach=r;function a(E,f){f===void 0&&(f=Number.POSITIVE_INFINITY);var k=[];if(f===0)return k;for(var O=0,C=E.next();!C.done&&!(k.push(C.value),++O>=f);C=E.next());return k}d.collect=a;function t(){for(var E=[],f=0;f<arguments.length;f++)E[f]=arguments[f];var k=0;return{next:function(){if(k>=E.length)return g;var O=E[k],C=O.next();return C.done?(k++,this.next()):C}}}d.concat=t;function w(E){return new P(E)}d.chain=w})(T||(T={}));var P=function(){function d(l){this.it=l}return d.prototype.next=function(){return this.it.next()},d}();function p(d){return Array.isArray(d)?T.fromArray(d):d||T.empty()}var v=function(){function d(l,n,c,u){n===void 0&&(n=0),c===void 0&&(c=l.length),u===void 0&&(u=n-1),this.items=l,this.start=n,this.end=c,this.index=u}return d.prototype.first=function(){return this.index=this.start,this.current()},d.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},d.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},d}(),S=function(d){L(l,d);function l(n,c,u,o){return c===void 0&&(c=0),u===void 0&&(u=n.length),o===void 0&&(o=c-1),d.call(this,n,c,u,o)||this}return l.prototype.current=function(){return d.prototype.current.call(this)},l.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},l.prototype.first=function(){return this.index=this.start,this.current()},l.prototype.last=function(){return this.index=this.end-1,this.current()},l.prototype.parent=function(){return null},l}(v),b=function(){function d(l,n){this.iterator=l,this.fn=n}return d.prototype.next=function(){return this.fn(this.iterator.next())},d}()},K3mO:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("3y9D"),D("WYAk"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.Base,p=T.WordArray,v=g.algo,S=v.MD5,b=v.EvpKDF=P.extend({cfg:P.extend({keySize:128/32,hasher:S,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,l){for(var n,c=this.cfg,u=c.hasher.create(),o=p.create(),h=o.words,m=c.keySize,s=c.iterations;h.length<m;){n&&u.update(n),n=u.update(d).finalize(l),u.reset();for(var r=1;r<s;r++)n=u.finalize(n),u.reset();o.concat(n)}return o.sigBytes=m*4,o}});g.EvpKDF=function(d,l,n){return b.create(n).compute(d,l)}}(),L.EvpKDF})},KXlV:function(j,Y,D){j.exports=D.p+"static/job.65c6034f.png"},KeDT:function(j,Y,D){j.exports={flex_box_center:"flex_box_center___3otMp",flex_space_between:"flex_space_between___2nig-",flex_box_vertical_center:"flex_box_vertical_center___3opWF",flex_box_center_end:"flex_box_center_end___1u2JP",flex_box_column:"flex_box_column___1RMsI",wrp:"wrp___-Shy4",bg:"bg___3aDMI",commonimg:"commonimg___15xnD",titlesize:"titlesize___2x92E",timesize:"timesize___3GFem",flex1:"flex1___1D3Li",buttonsize:"buttonsize___3oghG",myteam:"myteam___v6SIK",bootmdetail:"bootmdetail___3hk9v",flex6:"flex6___2iMiQ",menuItem:"menuItem___20c2q",spanprev:"spanprev___1dQoJ",spannext:"spannext___3fFnS",divwidth:"divwidth___1Dk29",receiveclick:"receiveclick___3mYYR",receivealready:"receivealready___20cCL",bkfff:"bkfff___WkCDR","ant-input":"ant-input___Zl9Xd",onediv:"onediv___2hHLH",onetop:"onetop___73xTC",towdiv:"towdiv___nqi1b",towtop:"towtop___pPhtO",threediv:"threediv___2G0u0",threetop:"threetop___2DsrB",imgradius:"imgradius___2WlXC",prize:"prize___1al1u",spanrightradius:"spanrightradius___3VHYc",bottomItem:"bottomItem___1NfPd",myTeam:"myTeam___2A-RJ",downloadpdf:"downloadpdf___1BQ_n",teamItem:"teamItem___220Fc",dash:"dash___3pxuh",modal:"modal___27esx"}},KhGG:function(j,Y,D){"use strict";D.d(Y,"a",function(){return f}),D.d(Y,"c",function(){return O});var L=D("0Owb"),g=D("miYZ"),T=D("tsqr"),P=D("oBTY"),p=D("tJVT"),v=D("PpiC"),S=D("k1fw"),b=D("9og8"),d=D("DZo9"),l=D("8z0m"),n=D("WmNS"),c=D.n(n),u=D("q1tI"),o=D.n(u),h=D("ErOA"),m=D("NFKh"),s=D.n(m),r=D("7Cbv"),a=D("9kvl"),t=D("mxV5"),w=D.n(t),E=l.a.Dragger,f=function(y){var _="bf3c199c2470cb477d907b1e0917c17b",M="5183666c72eec9e4",I=s.a.enc.Utf8.parse(_),N=s.a.enc.Utf8.parse(M),G=s.a.AES.decrypt(y,I,{iv:N,mode:s.a.mode.CBC});return G.toString(s.a.enc.Utf8)},k,O=function(){var x=Object(b.a)(c.a.mark(function y(_,M,I){var N,G,H,B,K,U,W,X,ne;return c.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return M.file_name=_.name,me.next=3,Object(h.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return W=me.sent,console.log("decrypt(res.data):",f(W.data)),W.data=JSON.parse(f(W.data)),X=Object(r.a)(),ne=new w.a({endpoint:W==null||((N=W.data)===null||N===void 0)?void 0:N.end_point,region:W==null||((G=W.data)===null||G===void 0)?void 0:G.region,accessKeyId:W==null||((H=W.data)===null||H===void 0)?void 0:H.access_key_id,accessKeySecret:W==null||((B=W.data)===null||B===void 0)?void 0:B.access_key_secret,bucket:W==null||((K=W.data)===null||K===void 0)?void 0:K.bucket,stsToken:W==null||((U=W.data)===null||U===void 0)?void 0:U.security_token}),me.abrupt("return",new Promise(function(Ae,De){var ye;ne.multipartUpload("".concat(X),new Blob([_],{type:_.type}),Object(S.a)(Object(S.a)({timeout:200*1e3,partSize:102400},I),{},{callback:{url:W==null||((ye=W.data)===null||ye===void 0)?void 0:ye.callback_url,host:W==null?void 0:W.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(h.e)(M)}})).then(function(Oe){var xe;_.response=(xe=Oe.data)===null||xe===void 0?void 0:xe.data,Ae(Oe==null?void 0:Oe.data)}).catch(function(Oe){De(Oe),console.log("err:",Oe)})}));case 9:case"end":return me.stop()}},y)}));return function(_,M,I){return x.apply(this,arguments)}}(),C=function(y){var _=y.user,M=y.cancelUpload,I=Object(v.a)(y,["user","cancelUpload"]),N=Object(u.useState)([]),G=Object(p.a)(N,2),H=G[0],B=G[1],K=Object(u.useState)(),U=Object(p.a)(K,2),W=U[0],X=U[1],ne={onRemove:function(Ae){B(Object(P.a)(H.filter(function(De){return De.name!==Ae.name}))),I.onChange(H.filter(function(De){return De.name!==Ae.name}))},disabled:I.disabled,multiple:!0,fileList:H==null?void 0:H.map(function(me){return me.file}),customRequest:function(){},beforeUpload:function(){var me=Object(b.a)(c.a.mark(function De(ye){var Oe;return c.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(Oe=I.maxSize||1024*1024*1024*1,!H.filter(function(le){return le.name===ye.name}).length){ue.next=4;break}return T.b.info("".concat(ye.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),ue.abrupt("return");case 4:if(!((ye==null?void 0:ye.size)>Oe)){ue.next=7;break}return T.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(Oe/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ue.abrupt("return",!1);case 7:return H.push({name:ye.name,file:ye}),B(Object(P.a)(H)),I.onChange(H),ue.abrupt("return",!1);case 11:case"end":return ue.stop()}},De)}));function Ae(De){return me.apply(this,arguments)}return Ae}()},fe=function(){var me=Object(b.a)(c.a.mark(function Ae(De,ye){var Oe,xe,ue,le,re,pe,ee,te,ce;return c.a.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return ye.file_name=De.name,ee=De.name,Q.next=4,Object(h.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(te=Q.sent,te.data=JSON.parse(f(te.data)),!((te==null?void 0:te.status)!==0)){Q.next=12;break}return H[H.findIndex(function(V){return V.name===ee})].status="error",H[H.findIndex(function(V){return V.name===ee})].file.status="error",I.onChange(H),T.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),Q.abrupt("return");case 12:return W=new w.a({endpoint:te==null||((Oe=te.data)===null||Oe===void 0)?void 0:Oe.end_point,region:te==null||((xe=te.data)===null||xe===void 0)?void 0:xe.region,accessKeyId:te==null||((ue=te.data)===null||ue===void 0)?void 0:ue.access_key_id,accessKeySecret:te==null||((le=te.data)===null||le===void 0)?void 0:le.access_key_secret,bucket:te==null||((re=te.data)===null||re===void 0)?void 0:re.bucket,stsToken:te==null||((pe=te.data)===null||pe===void 0)?void 0:pe.security_token}),console.log(De,"file"),X(W),ce=Object(r.a)(),Q.abrupt("return",new Promise(function(V,Z){try{var be;W.multipartUpload("".concat(I.identifier,"/").concat(ce).concat(ee.indexOf(".")>-1?"."+ee.split(".").pop():""),new Blob([De.file],{type:De.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Te,Je,rt){try{console.log("\u8FDB\u5EA6",Te,Je,rt);var nt=H.findIndex(function(at){return at.name===ee});H[nt].file.percent=Te*100,H[nt].tempCheckpoint=Je,B(Object(P.a)(H))}catch(at){}},checkpoint:H[H.findIndex(function(ge){return ge.name===ee})].tempCheckpoint,callback:{customValue:{id:ee+""},url:te==null||((be=te.data)===null||be===void 0)?void 0:be.callback_url,host:te==null?void 0:te.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(h.e)(ye)}}).then(function(ge){var Te,Je=H.findIndex(function(ht){return ht.name===ee}),rt="done";if(((Te=ge.data)===null||Te===void 0?void 0:Te.status)===0){var nt;De.response=(nt=ge.data)===null||nt===void 0?void 0:nt.data;var at=H.findIndex(function(ht){return ht.name===ee});H[at].status="done",H[at].file.status="done"}else{var ct;T.b.warn((ct=ge.data)===null||ct===void 0?void 0:ct.message),rt="error"}H[Je].status=rt,H[Je].file.status=rt,I.onChange(H),V(ge==null?void 0:ge.data)}).catch(function(ge){H[H.findIndex(function(Te){return Te.name===ee})].status="error",H[H.findIndex(function(Te){return Te.name===ee})].file.status="error",T.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),B(Object(P.a)(H)),I.onChange(H),Z(ge),console.log("err:",ge)})}catch(ge){}}));case 17:case"end":return Q.stop()}},Ae)}));return function(De,ye){return me.apply(this,arguments)}}();return Object(u.useEffect)(function(){H.every(function(me){return me==="done"||me==="error"})&&I.onComplete(H)},[H]),Object(u.useEffect)(function(){if(M){var me;(me=W)===null||me===void 0||me.cancel()}},[M]),Object(u.useEffect)(function(){I.uploading&&H.map(function(){var me=Object(b.a)(c.a.mark(function Ae(De){var ye,Oe;return c.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(!((!De.status||De.status==="error")&&!M)){ue.next=6;break}return De.status="uploading",De.file.status="uploading",ue.next=5,fe(De,{login:_==null||((ye=_.userInfo)===null||ye===void 0)?void 0:ye.login,container_type:I.container_type,container_id:I.container_id,description:I.description});case 5:Oe=ue.sent;case 6:case"end":return ue.stop()}},Ae)}));return function(Ae){return me.apply(this,arguments)}}())},[I.uploading]),o.a.createElement(E,Object(L.a)({},ne,{height:I.height,className:I.className}),o.a.createElement("p",{className:"ant-upload-hint"},I.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};Y.b=Object(a.a)(function(x){var y=x.loading,_=x.globalSetting,M=x.user;return{globalSetting:_,loading:y.models.competitions,user:M}})(C)},KmYQ:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){return L.pad.ZeroPadding={pad:function(g,T){var P=T*4;g.clamp(),g.sigBytes+=P-(g.sigBytes%P||P)},unpad:function(g){for(var T=g.words,P=g.sigBytes-1,P=g.sigBytes-1;P>=0;P--)if(T[P>>>2]>>>24-P%4*8&255){g.sigBytes=P+1;break}}},L.pad.ZeroPadding})},LdHM:function(j,Y,D){"use strict";D.d(Y,"b",function(){return t}),D.d(Y,"a",function(){return E});var L=D("1OyB"),g=D("vuIU"),T=D("Ji7U"),P=D("LK+K"),p=D("q1tI"),v=D("rePB"),S=D("Ff2n"),b=D("ODXe"),d=D("4IlW"),l=D("bX4T"),n=D("YrtM"),c=D("TSYQ"),u=D.n(c),o=D("+nKL"),h=D("8OUc"),m=function(X,ne){var fe=X.prefixCls,me=X.id,Ae=X.flattenOptions,De=X.childrenAsData,ye=X.values,Oe=X.searchValue,xe=X.multiple,ue=X.defaultActiveFirstOption,le=X.height,re=X.itemHeight,pe=X.notFoundContent,ee=X.open,te=X.menuItemSelectedIcon,ce=X.virtual,q=X.onSelect,Q=X.onToggleOpen,V=X.onActiveValue,Z=X.onScroll,be=X.onMouseEnter,ge="".concat(fe,"-item"),Te=Object(n.a)(function(){return Ae},[ee,Ae],function(lt,Ue){return Ue[0]&<[1]!==Ue[1]}),Je=p.useRef(null),rt=function(Ue){Ue.preventDefault()},nt=function(Ue){Je.current&&Je.current.scrollTo({index:Ue})},at=function(Ue){for(var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ie=Te.length,Ce=0;Ce<Ie;Ce+=1){var Se=(Ue+Ce*Le+Ie)%Ie,ke=Te[Se],Ne=ke.group,et=ke.data;if(!Ne&&!et.disabled)return Se}return-1},ct=p.useState(function(){return at(0)}),ht=Object(b.a)(ct,2),He=ht[0],Re=ht[1],tt=function(Ue){Re(Ue);var Le=Te[Ue];if(!Le){V(null,-1);return}V(Le.data.value,Ue)};p.useEffect(function(){tt(ue!==!1?at(0):-1)},[Te.length,Oe]),p.useEffect(function(){var lt=setTimeout(function(){if(!xe&&ee&&ye.size===1){var Ue=Array.from(ye)[0],Le=Te.findIndex(function(Ie){var Ce=Ie.data;return Ce.value===Ue});tt(Le),nt(Le)}});return function(){return clearTimeout(lt)}},[ee]);var ft=function(Ue){Ue!==void 0&&q(Ue,{selected:!ye.has(Ue)}),xe||Q(!1)};if(p.useImperativeHandle(ne,function(){return{onKeyDown:function(Ue){var Le=Ue.which;switch(Le){case d.a.UP:case d.a.DOWN:{var Ie=0;if(Le===d.a.UP?Ie=-1:Le===d.a.DOWN&&(Ie=1),Ie!==0){var Ce=at(He+Ie,Ie);nt(Ce),tt(Ce)}break}case d.a.ENTER:{var Se=Te[He];Se&&!Se.data.disabled?ft(Se.data.value):ft(void 0),ee&&Ue.preventDefault();break}case d.a.ESC:Q(!1)}},onKeyUp:function(){},scrollTo:function(Ue){nt(Ue)}}}),Te.length===0)return p.createElement("div",{role:"listbox",id:"".concat(me,"_list"),className:"".concat(ge,"-empty"),onMouseDown:rt},pe);function Qe(lt){var Ue=Te[lt];if(!Ue)return null;var Le=Ue.data||{},Ie=Le.value,Ce=Le.label,Se=Le.children,ke=Object(l.a)(Le,!0),Ne=De?Se:Ce;return Ue?p.createElement("div",Object.assign({"aria-label":typeof Ne=="string"?Ne:null},ke,{key:lt,role:"option",id:"".concat(me,"_list_").concat(lt),"aria-selected":ye.has(Ie)}),Ie):null}return p.createElement(p.Fragment,null,p.createElement("div",{role:"listbox",id:"".concat(me,"_list"),style:{height:0,width:0,overflow:"hidden"}},Qe(He-1),Qe(He),Qe(He+1)),p.createElement(o.a,{itemKey:"key",ref:Je,data:Te,height:le,itemHeight:re,fullHeight:!1,onMouseDown:rt,onScroll:Z,virtual:ce,onMouseEnter:be},function(lt,Ue){var Le,Ie=lt.group,Ce=lt.groupOption,Se=lt.data,ke=Se.label,Ne=Se.key;if(Ie)return p.createElement("div",{className:u()(ge,"".concat(ge,"-group"))},ke!==void 0?ke:Ne);var et=Se.disabled,$e=Se.value,bt=Se.title,gt=Se.children,Ut=Se.style,Nt=Se.className,hr=Object(S.a)(Se,["disabled","value","title","children","style","className"]),mr=ye.has($e),St="".concat(ge,"-option"),Yr=u()(ge,St,Nt,(Le={},Object(v.a)(Le,"".concat(St,"-grouped"),Ce),Object(v.a)(Le,"".concat(St,"-active"),He===Ue&&!et),Object(v.a)(Le,"".concat(St,"-disabled"),et),Object(v.a)(Le,"".concat(St,"-selected"),mr),Le)),Jr=De?gt:ke,Hr=!te||typeof te=="function"||mr;return p.createElement("div",Object.assign({},hr,{"aria-selected":mr,className:Yr,title:bt,onMouseMove:function(){if(He===Ue||et)return;tt(Ue)},onClick:function(){et||ft($e)},style:Ut}),p.createElement("div",{className:"".concat(St,"-content")},Jr||$e),p.isValidElement(te)||mr,Hr&&p.createElement(h.a,{className:"".concat(ge,"-option-state"),customizeIcon:te,customizeIconProps:{isSelected:mr}},mr?"\u2713":null))}))},s=p.forwardRef(m);s.displayName="OptionList";var r=s,a=function(){return null};a.isSelectOption=!0;var t=a,w=function(){return null};w.isSelectOptGroup=!0;var E=w,f=D("VTBJ"),k=D("Zm9Q");function O(W){var X=W.key,ne=W.props,fe=ne.children,me=ne.value,Ae=Object(S.a)(ne,["children","value"]);return Object(f.a)({key:X,value:me!==void 0?me:X,children:fe},Ae)}function C(W){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(k.a)(W).map(function(ne,fe){if(!p.isValidElement(ne)||!ne.type)return null;var me=ne.type.isSelectOptGroup,Ae=ne.key,De=ne.props,ye=De.children,Oe=Object(S.a)(De,["children"]);return X||!me?O(ne):Object(f.a)(Object(f.a)({key:"__RC_SELECT_GRP__".concat(Ae===null?fe:Ae,"__"),label:Ae},Oe),{},{options:C(ye)})}).filter(function(ne){return ne})}var x=D("2Qr1"),y=D("qNPg"),_=D("U8pU"),M=D("Kwbf"),I=D("WKfj");function N(W){var X=W.mode,ne=W.options,fe=W.children,me=W.backfill,Ae=W.allowClear,De=W.placeholder,ye=W.getInputElement,Oe=W.showSearch,xe=W.onSearch,ue=W.defaultOpen,le=W.autoFocus,re=W.labelInValue,pe=W.value,ee=W.inputValue,te=W.optionLabelProp,ce=X==="multiple"||X==="tags",q=Oe!==void 0?Oe:ce||X==="combobox",Q=ne||C(fe);if(Object(M.a)(X!=="tags"||Q.every(function(ge){return!ge.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),X==="tags"||X==="combobox"){var V=Q.some(function(ge){return ge.options?ge.options.some(function(Te){return typeof("value"in Te?Te.value:Te.key)=="number"}):typeof("value"in ge?ge.value:ge.key)=="number"});Object(M.a)(!V,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(M.a)(X!=="combobox"||!te,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(M.a)(X==="combobox"||!me,"`backfill` only works with `combobox` mode."),Object(M.a)(X==="combobox"||!ye,"`getInputElement` only work with `combobox` mode."),Object(M.b)(X!=="combobox"||!ye||!Ae||!De,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),xe&&!q&&X!=="combobox"&&X!=="tags"&&Object(M.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(M.b)(!ue||le,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),pe!=null){var Z=Object(I.d)(pe);Object(M.a)(!re||Z.every(function(ge){return Object(_.a)(ge)==="object"&&("key"in ge||"value"in ge)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(M.a)(!ce||Array.isArray(pe),"`value` should be array when `mode` is `multiple` or `tags`")}if(fe){var be=null;Object(k.a)(fe).some(function(ge){if(!p.isValidElement(ge)||!ge.type)return!1;var Te=ge.type;if(Te.isSelectOption)return!1;if(Te.isSelectOptGroup){var Je=Object(k.a)(ge.props.children).every(function(rt){return!p.isValidElement(rt)||!ge.type||rt.type.isSelectOption?!0:(be=rt.type,!1)});return!Je}return be=Te,!0}),be&&Object(M.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(be.displayName||be.name||be,"`.")),Object(M.a)(ee===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var G=N,H=Object(y.a)({prefixCls:"rc-select",components:{optionList:r},convertChildrenToData:C,flattenOptions:x.d,getLabeledValue:x.e,filterOptions:x.b,isValueDisabled:x.g,findValueOption:x.c,warningProps:G,fillOptionsWithMissingValue:x.a}),B=function(W){Object(T.a)(ne,W);var X=Object(P.a)(ne);function ne(){var fe;return Object(L.a)(this,ne),fe=X.apply(this,arguments),fe.selectRef=p.createRef(),fe.focus=function(){fe.selectRef.current.focus()},fe.blur=function(){fe.selectRef.current.blur()},fe}return Object(g.a)(ne,[{key:"render",value:function(){return p.createElement(H,Object.assign({ref:this.selectRef},this.props))}}]),ne}(p.Component);B.Option=t,B.OptGroup=E;var K=B,U=Y.c=K},M8RZ:function(j,Y,D){"use strict";D.d(Y,"a",function(){return d});var L=D("fWQN"),g=D("mtLc"),T=D("yKVA"),P=D("879j"),p=D("q1tI"),v=D.n(p),S=D("i8i4"),b=D.n(S),d=function(l){Object(T.a)(c,l);var n=Object(P.a)(c);function c(u){var o;Object(L.a)(this,c),o=n.call(this,u);var h=window.document;return o.node=h.createElement("div"),h.body.appendChild(o.node),o}return Object(g.a)(c,[{key:"render",value:function(){var o=this.props.children;return Object(S.createPortal)(o,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),c}(v.a.Component)},MI8n:function(j,Y,D){"use strict";D.d(Y,"b",function(){return v}),D.d(Y,"a",function(){return d}),D.d(Y,"e",function(){return l}),D.d(Y,"d",function(){return n}),D.d(Y,"c",function(){return c}),D.d(Y,"f",function(){return u});var L=D("/cxE"),g=D("C/vA"),T=D("pmY6"),P=D("24hK"),p=function(){var o=function(h,m){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,r){s.__proto__=r}||function(s,r){for(var a in r)r.hasOwnProperty(a)&&(s[a]=r[a])},o(h,m)};return function(h,m){o(h,m);function s(){this.constructor=h}h.prototype=m===null?Object.create(m):(s.prototype=m.prototype,new s)}}(),v;(function(o){o.None=function(){return T.a.None};function h(G){return function(H,B,K){B===void 0&&(B=null);var U=!1,W;return W=G(function(X){return U?void 0:(W?W.dispose():U=!0,H.call(B,X))},null,K),U&&W.dispose(),W}}o.once=h;function m(G,H){return E(function(B,K,U){return K===void 0&&(K=null),G(function(W){return B.call(K,H(W))},null,U)})}o.map=m;function s(G,H){return E(function(B,K,U){return K===void 0&&(K=null),G(function(W){H(W),B.call(K,W)},null,U)})}o.forEach=s;function r(G,H){return E(function(B,K,U){return K===void 0&&(K=null),G(function(W){return H(W)&&B.call(K,W)},null,U)})}o.filter=r;function a(G){return G}o.signal=a;function t(){for(var G=[],H=0;H<arguments.length;H++)G[H]=arguments[H];return function(B,K,U){return K===void 0&&(K=null),T.e.apply(void 0,G.map(function(W){return W(function(X){return B.call(K,X)},null,U)}))}}o.any=t;function w(G,H,B){var K=B;return m(G,function(U){return K=H(K,U),K})}o.reduce=w;function E(G){var H,B=new d({onFirstListenerAdd:function(){H=G(B.fire,B)},onLastListenerRemove:function(){H.dispose()}});return B.event}o.snapshot=E;function f(G,H,B,K,U){B===void 0&&(B=100),K===void 0&&(K=!1);var W,X=void 0,ne=void 0,fe=0,me=new d({leakWarningThreshold:U,onFirstListenerAdd:function(){W=G(function(Ae){fe++,X=H(X,Ae),K&&!ne&&(me.fire(X),X=void 0),clearTimeout(ne),ne=setTimeout(function(){var De=X;X=void 0,ne=void 0,(!K||fe>1)&&me.fire(De),fe=0},B)})},onLastListenerRemove:function(){W.dispose()}});return me.event}o.debounce=f;function k(G){var H=new Date().getTime();return m(h(G),function(B){return new Date().getTime()-H})}o.stopwatch=k;function O(G){var H=!0,B;return r(G,function(K){var U=H||K!==B;return H=!1,B=K,U})}o.latch=O;function C(G,H,B){H===void 0&&(H=!1),B===void 0&&(B=[]);var K=B.slice(),U=G(function(ne){K?K.push(ne):X.fire(ne)}),W=function(){K&&K.forEach(function(ne){return X.fire(ne)}),K=null},X=new d({onFirstListenerAdd:function(){U||(U=G(function(ne){return X.fire(ne)}))},onFirstListenerDidAdd:function(){K&&(H?setTimeout(W):W())},onLastListenerRemove:function(){U&&U.dispose(),U=null}});return X.event}o.buffer=C;var x=function(){function G(H){this.event=H}return G.prototype.map=function(H){return new G(m(this.event,H))},G.prototype.forEach=function(H){return new G(s(this.event,H))},G.prototype.filter=function(H){return new G(r(this.event,H))},G.prototype.reduce=function(H,B){return new G(w(this.event,H,B))},G.prototype.latch=function(){return new G(O(this.event))},G.prototype.debounce=function(H,B,K,U){return B===void 0&&(B=100),K===void 0&&(K=!1),new G(f(this.event,H,B,K,U))},G.prototype.on=function(H,B,K){return this.event(H,B,K)},G.prototype.once=function(H,B,K){return h(this.event)(H,B,K)},G}();function y(G){return new x(G)}o.chain=y;function _(G,H,B){B===void 0&&(B=function(ne){return ne});var K=function(){for(var ne=[],fe=0;fe<arguments.length;fe++)ne[fe]=arguments[fe];return X.fire(B.apply(void 0,ne))},U=function(){return G.on(H,K)},W=function(){return G.removeListener(H,K)},X=new d({onFirstListenerAdd:U,onLastListenerRemove:W});return X.event}o.fromNodeEventEmitter=_;function M(G,H,B){B===void 0&&(B=function(ne){return ne});var K=function(){for(var ne=[],fe=0;fe<arguments.length;fe++)ne[fe]=arguments[fe];return X.fire(B.apply(void 0,ne))},U=function(){return G.addEventListener(H,K)},W=function(){return G.removeEventListener(H,K)},X=new d({onFirstListenerAdd:U,onLastListenerRemove:W});return X.event}o.fromDOMEventEmitter=M;function I(G){var H=new d,B=!1;return G.then(void 0,function(){return null}).then(function(){B?H.fire(void 0):setTimeout(function(){return H.fire(void 0)},0)}),B=!0,H.event}o.fromPromise=I;function N(G){return new Promise(function(H){return h(G)(H)})}o.toPromise=N})(v||(v={}));var S=-1,b=function(){function o(h,m){m===void 0&&(m=Math.random().toString(18).slice(2,5)),this.customThreshold=h,this.name=m,this._warnCountdown=0}return o.prototype.dispose=function(){this._stacks&&this._stacks.clear()},o.prototype.check=function(h){var m=this,s=S;if(typeof this.customThreshold=="number"&&(s=this.customThreshold),s<=0||h<s)return;this._stacks||(this._stacks=new Map);var r=new Error().stack.split(`
|
|
|
`).slice(3).join(`
|
|
|
`),a=this._stacks.get(r)||0;if(this._stacks.set(r,a+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;var t,w=0;this._stacks.forEach(function(E,f){(!t||w<E)&&(t=f,w=E)}),console.warn("["+this.name+"] potential listener LEAK detected, having "+h+" listeners already. MOST frequent listener ("+w+"):"),console.warn(t)}return function(){var E=m._stacks.get(r)||0;m._stacks.set(r,E-1)}},o}(),d=function(){function o(h){this._disposed=!1,this._options=h,this._leakageMon=S>0?new b(this._options&&this._options.leakWarningThreshold):void 0}return Object.defineProperty(o.prototype,"event",{get:function(){var h=this;return this._event||(this._event=function(m,s,r){h._listeners||(h._listeners=new P.a);var a=h._listeners.isEmpty();a&&h._options&&h._options.onFirstListenerAdd&&h._options.onFirstListenerAdd(h);var t=h._listeners.push(s?[m,s]:m);a&&h._options&&h._options.onFirstListenerDidAdd&&h._options.onFirstListenerDidAdd(h),h._options&&h._options.onListenerDidAdd&&h._options.onListenerDidAdd(h,m,s);var w;h._leakageMon&&(w=h._leakageMon.check(h._listeners.size));var E;return E={dispose:function(){if(w&&w(),E.dispose=o._noop,!h._disposed&&(t(),h._options&&h._options.onLastListenerRemove)){var f=h._listeners&&!h._listeners.isEmpty();f||h._options.onLastListenerRemove(h)}}},r instanceof T.b?r.add(E):Array.isArray(r)&&r.push(E),E}),this._event},enumerable:!0,configurable:!0}),o.prototype.fire=function(h){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new P.a);for(var m=this._listeners.iterator(),s=m.next();!s.done;s=m.next())this._deliveryQueue.push([s.value,h]);for(;this._deliveryQueue.size>0;){var r=this._deliveryQueue.shift(),a=r[0],t=r[1];try{typeof a=="function"?a.call(void 0,t):a[0].call(a[1],t)}catch(w){Object(L.e)(w)}}}},o.prototype.dispose=function(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0},o._noop=function(){},o}(),l=function(o){p(h,o);function h(m){var s=o.call(this,m)||this;return s._isPaused=0,s._eventQueue=new P.a,s._mergeFn=m&&m.merge,s}return h.prototype.pause=function(){this._isPaused++},h.prototype.resume=function(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){var m=this._eventQueue.toArray();this._eventQueue.clear(),o.prototype.fire.call(this,this._mergeFn(m))}else for(;!this._isPaused&&this._eventQueue.size!==0;)o.prototype.fire.call(this,this._eventQueue.shift())},h.prototype.fire=function(m){this._listeners&&(this._isPaused!==0?this._eventQueue.push(m):o.prototype.fire.call(this,m))},h}(d),n=function(){function o(){var h=this;this.hasListeners=!1,this.events=[],this.emitter=new d({onFirstListenerAdd:function(){return h.onFirstListenerAdd()},onLastListenerRemove:function(){return h.onLastListenerRemove()}})}return Object.defineProperty(o.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),o.prototype.add=function(h){var m=this,s={event:h,listener:null};this.events.push(s),this.hasListeners&&this.hook(s);var r=function(){m.hasListeners&&m.unhook(s);var a=m.events.indexOf(s);m.events.splice(a,1)};return Object(T.h)(Object(g.a)(r))},o.prototype.onFirstListenerAdd=function(){var h=this;this.hasListeners=!0,this.events.forEach(function(m){return h.hook(m)})},o.prototype.onLastListenerRemove=function(){var h=this;this.hasListeners=!1,this.events.forEach(function(m){return h.unhook(m)})},o.prototype.hook=function(h){var m=this;h.listener=h.event(function(s){return m.emitter.fire(s)})},o.prototype.unhook=function(h){h.listener&&h.listener.dispose(),h.listener=null},o.prototype.dispose=function(){this.emitter.dispose()},o}(),c=function(){function o(){this.buffers=[]}return o.prototype.wrapEvent=function(h){var m=this;return function(s,r,a){return h(function(t){var w=m.buffers[m.buffers.length-1];w?w.push(function(){return s.call(r,t)}):s.call(r,t)},void 0,a)}},o.prototype.bufferEvents=function(h){var m=[];this.buffers.push(m);var s=h();return this.buffers.pop(),m.forEach(function(r){return r()}),s},o}(),u=function(){function o(){var h=this;this.listening=!1,this.inputEvent=v.None,this.inputEventListener=T.a.None,this.emitter=new d({onFirstListenerDidAdd:function(){h.listening=!0,h.inputEventListener=h.inputEvent(h.emitter.fire,h.emitter)},onLastListenerRemove:function(){h.listening=!1,h.inputEventListener.dispose()}}),this.event=this.emitter.event}return Object.defineProperty(o.prototype,"input",{set:function(h){this.inputEvent=h,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=h(this.emitter.fire,this.emitter))},enumerable:!0,configurable:!0}),o.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose()},o}()},MlIO:function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){return function(g){var T=L,P=T.lib,p=P.Base,v=P.WordArray,S=T.x64={},b=S.Word=p.extend({init:function(l,n){this.high=l,this.low=n}}),d=S.WordArray=p.extend({init:function(l,n){l=this.words=l||[],n!=g?this.sigBytes=n:this.sigBytes=l.length*8},toX32:function(){for(var l=this.words,n=l.length,c=[],u=0;u<n;u++){var o=l[u];c.push(o.high),c.push(o.low)}return v.create(c,this.sigBytes)},clone:function(){for(var l=p.clone.call(this),n=l.words=this.words.slice(0),c=n.length,u=0;u<c;u++)n[u]=n[u].clone();return l}})}(),L})},N0LK:function(j,Y,D){"use strict";D.d(Y,"x",function(){return L}),D.d(Y,"F",function(){return g}),D.d(Y,"r",function(){return P}),D.d(Y,"o",function(){return p}),D.d(Y,"p",function(){return v}),D.d(Y,"Q",function(){return S}),D.d(Y,"K",function(){return d}),D.d(Y,"k",function(){return l}),D.d(Y,"N",function(){return n}),D.d(Y,"m",function(){return c}),D.d(Y,"l",function(){return u}),D.d(Y,"I",function(){return o}),D.d(Y,"H",function(){return h}),D.d(Y,"q",function(){return m}),D.d(Y,"t",function(){return s}),D.d(Y,"D",function(){return r}),D.d(Y,"e",function(){return a}),D.d(Y,"f",function(){return t}),D.d(Y,"B",function(){return w}),D.d(Y,"C",function(){return E}),D.d(Y,"n",function(){return k}),D.d(Y,"O",function(){return C}),D.d(Y,"c",function(){return x}),D.d(Y,"d",function(){return y}),D.d(Y,"z",function(){return _}),D.d(Y,"A",function(){return M}),D.d(Y,"u",function(){return I}),D.d(Y,"E",function(){return G}),D.d(Y,"G",function(){return H}),D.d(Y,"i",function(){return K}),D.d(Y,"g",function(){return W}),D.d(Y,"v",function(){return ne}),D.d(Y,"h",function(){return fe}),D.d(Y,"y",function(){return me}),D.d(Y,"w",function(){return Ae}),D.d(Y,"a",function(){return De}),D.d(Y,"P",function(){return ye}),D.d(Y,"L",function(){return Oe}),D.d(Y,"J",function(){return xe}),D.d(Y,"j",function(){return ue}),D.d(Y,"M",function(){return le}),D.d(Y,"s",function(){return re}),D.d(Y,"b",function(){return pe});function L(ce){return!ce||typeof ce!="string"?!0:ce.trim().length===0}function g(ce,q,Q){Q===void 0&&(Q="0");for(var V=""+ce,Z=[V],be=V.length;be<q;be++)Z.push(Q);return Z.reverse().join("")}var T=/{(\d+)}/g;function P(ce){for(var q=[],Q=1;Q<arguments.length;Q++)q[Q-1]=arguments[Q];return q.length===0?ce:ce.replace(T,function(V,Z){var be=parseInt(Z,10);return isNaN(be)||be<0||be>=q.length?V:q[be]})}function p(ce){return ce.replace(/[<>&]/g,function(q){switch(q){case"<":return"<";case">":return">";case"&":return"&";default:return q}})}function v(ce){return ce.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function S(ce,q){q===void 0&&(q=" ");var Q=b(ce,q);return d(Q,q)}function b(ce,q){if(!ce||!q)return ce;var Q=q.length;if(Q===0||ce.length===0)return ce;for(var V=0;ce.indexOf(q,V)===V;)V=V+Q;return ce.substring(V)}function d(ce,q){if(!ce||!q)return ce;var Q=q.length,V=ce.length;if(Q===0||V===0)return ce;for(var Z=V,be=-1;!(be=ce.lastIndexOf(q,Z-1),be===-1||be+Q!==Z);){if(be===0)return"";Z=be}return ce.substring(0,Z)}function l(ce){return ce.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function n(ce,q){if(ce.length<q.length)return!1;if(ce===q)return!0;for(var Q=0;Q<q.length;Q++)if(ce[Q]!==q[Q])return!1;return!0}function c(ce,q){var Q=ce.length-q.length;return Q>0?ce.indexOf(q,Q)===Q:Q===0?ce===q:!1}function u(ce,q,Q){if(Q===void 0&&(Q={}),!ce)throw new Error("Cannot create regex from empty string");q||(ce=v(ce)),Q.wholeWord&&(/\B/.test(ce.charAt(0))||(ce="\\b"+ce),/\B/.test(ce.charAt(ce.length-1))||(ce=ce+"\\b"));var V="";return Q.global&&(V+="g"),Q.matchCase||(V+="i"),Q.multiline&&(V+="m"),Q.unicode&&(V+="u"),new RegExp(ce,V)}function o(ce){if(ce.source==="^"||ce.source==="^$"||ce.source==="$"||ce.source==="^\\s*$")return!1;var q=ce.exec("");return!!(q&&ce.lastIndex===0)}function h(ce){return(ce.global?"g":"")+(ce.ignoreCase?"i":"")+(ce.multiline?"m":"")+(ce.unicode?"u":"")}function m(ce){for(var q=0,Q=ce.length;q<Q;q++){var V=ce.charCodeAt(q);if(V!==32&&V!==9)return q}return-1}function s(ce,q,Q){q===void 0&&(q=0),Q===void 0&&(Q=ce.length);for(var V=q;V<Q;V++){var Z=ce.charCodeAt(V);if(Z!==32&&Z!==9)return ce.substring(q,V)}return ce.substring(q,Q)}function r(ce,q){q===void 0&&(q=ce.length-1);for(var Q=q;Q>=0;Q--){var V=ce.charCodeAt(Q);if(V!==32&&V!==9)return Q}return-1}function a(ce,q){return ce<q?-1:ce>q?1:0}function t(ce,q){for(var Q=Math.min(ce.length,q.length),V=0;V<Q;V++){var Z=ce.charCodeAt(V),be=q.charCodeAt(V);if(Z===be)continue;E(Z)&&(Z+=32),E(be)&&(be+=32);var ge=Z-be;if(ge===0)continue;return w(Z)&&w(be)?ge:a(ce.toLowerCase(),q.toLowerCase())}return ce.length<q.length?-1:ce.length>q.length?1:0}function w(ce){return ce>=97&&ce<=122}function E(ce){return ce>=65&&ce<=90}function f(ce){return w(ce)||E(ce)}function k(ce,q){return ce.length===q.length&&O(ce,q)}function O(ce,q,Q){Q===void 0&&(Q=ce.length);for(var V=0;V<Q;V++){var Z=ce.charCodeAt(V),be=q.charCodeAt(V);if(Z===be)continue;if(f(Z)&&f(be)){var ge=Math.abs(Z-be);if(ge!==0&&ge!==32)return!1}else if(String.fromCharCode(Z).toLowerCase()!==String.fromCharCode(be).toLowerCase())return!1}return!0}function C(ce,q){var Q=q.length;return q.length>ce.length?!1:O(ce,q,Q)}function x(ce,q){var Q,V=Math.min(ce.length,q.length);for(Q=0;Q<V;Q++)if(ce.charCodeAt(Q)!==q.charCodeAt(Q))return Q;return V}function y(ce,q){var Q,V=Math.min(ce.length,q.length),Z=ce.length-1,be=q.length-1;for(Q=0;Q<V;Q++)if(ce.charCodeAt(Z-Q)!==q.charCodeAt(be-Q))return Q;return V}function _(ce){return 55296<=ce&&ce<=56319}function M(ce){return 56320<=ce&&ce<=57343}function I(ce,q,Q){var V=ce.charCodeAt(Q);if(_(V)&&Q+1<q){var Z=ce.charCodeAt(Q+1);if(M(Z))return(V-55296<<10)+(Z-56320)+65536}return V}function N(ce,q){var Q=ce.charCodeAt(q-1);if(M(Q)&&q>1){var V=ce.charCodeAt(q-2);if(_(V))return(V-55296<<10)+(Q-56320)+65536}return Q}function G(ce,q){var Q=ee.getInstance(),V=q,Z=ce.length,be=I(ce,Z,q);q+=be>=65536?2:1;for(var ge=Q.getGraphemeBreakType(be);q<Z;){var Te=I(ce,Z,q),Je=Q.getGraphemeBreakType(Te);if(pe(ge,Je))break;q+=Te>=65536?2:1,ge=Je}return q-V}function H(ce,q){var Q=ee.getInstance(),V=q,Z=N(ce,q);q-=Z>=65536?2:1;for(var be=Q.getGraphemeBreakType(Z);q>0;){var ge=N(ce,q),Te=Q.getGraphemeBreakType(ge);if(pe(Te,be))break;q-=ge>=65536?2:1,be=Te}return V-q}var B=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function K(ce){return B.test(ce)}var U=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/;function W(ce){return U.test(ce)}var X=/^[\t\n\r\x20-\x7E]*$/;function ne(ce){return X.test(ce)}function fe(ce){for(var q=0,Q=ce.length;q<Q;q++)if(me(ce.charCodeAt(q)))return!0;return!1}function me(ce){return ce=+ce,ce>=11904&&ce<=55215||ce>=63744&&ce<=64255||ce>=65281&&ce<=65374}function Ae(ce){return ce>=127462&&ce<=127487||ce>=9728&&ce<=10175||ce>=127744&&ce<=128591||ce>=128640&&ce<=128764||ce>=128992&&ce<=129003||ce>=129280&&ce<=129535||ce>=129648&&ce<=129651||ce>=129656&&ce<=129666||ce>=129680&&ce<=129685}var De=String.fromCharCode(65279);function ye(ce){return!!(ce&&ce.length>0&&ce.charCodeAt(0)===65279)}function Oe(ce){return btoa(encodeURIComponent(ce))}function xe(ce,q){for(var Q="",V=0;V<q;V++)Q+=ce;return Q}function ue(ce,q){return q===void 0&&(q=!1),ce?(q&&(ce=ce.replace(/\\./g,"")),ce.toLowerCase()!==ce):!1}function le(ce){var q=90-65+1;return ce=ce%(2*q),ce<q?String.fromCharCode(97+ce):String.fromCharCode(65+ce-q)}function re(ce){var q=ee.getInstance();return q.getGraphemeBreakType(ce)}function pe(ce,q){return ce===0?q!==5&&q!==7:ce===2&&q===3?!1:ce===4||ce===2||ce===3||(q===4||q===2||q===3)?!0:ce===8&&(q===8||q===9||q===11||q===12)||((ce===11||ce===9)&&(q===9||q===10)||((ce===12||ce===10)&&q===10||(q===5||q===13||(q===7||(ce===1||ce===13&&q===14)))))?!1:!(ce===6&&q===6)}var ee=function(){function ce(){this._data=te()}return ce.getInstance=function(){return ce._INSTANCE||(ce._INSTANCE=new ce),ce._INSTANCE},ce.prototype.getGraphemeBreakType=function(q){if(q<32)return q===10?3:q===13?2:4;if(q<127)return 0;for(var Q=this._data,V=Q.length/3,Z=1;Z<=V;)if(q<Q[3*Z])Z=2*Z;else if(q>Q[3*Z+1])Z=2*Z+1;else return Q[3*Z+2];return 0},ce._INSTANCE=null,ce}();function te(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}},NFKh:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("MlIO"),D("F+F2"),D("qM6L"),D("ETIr"),D("wbyO"),D("cv67"),D("3y9D"),D("lPiR"),D("GRuw"),D("1uat"),D("uGsb"),D("5hvy"),D("ELcG"),D("WYAk"),D("e7zE"),D("K3mO"),D("OLod"),D("ALsQ"),D("9OqN"),D("qu8F"),D("S6kV"),D("gb/T"),D("qBft"),D("oRuE"),D("jO9C"),D("KmYQ"),D("uGxW"),D("bQjk"),D("wZgz"),D("pA7S"),D("w7YG"),D("E4JC"),D("PVpz"))})(this,function(L){return L})},NLgs:function(j,Y,D){"use strict";D.d(Y,"e",function(){return w}),D.d(Y,"f",function(){return E}),D.d(Y,"d",function(){return k}),D.d(Y,"c",function(){return O}),D.d(Y,"a",function(){return C}),D.d(Y,"b",function(){return x});var L=D("miYZ"),g=D("tsqr"),T=D("9og8"),P=D("2qtc"),p=D("kLXV"),v=D("WmNS"),S=D.n(v),b=D("q1tI"),d=D.n(b),l=D("9kvl"),n=D("xKgJ"),c=D("1vsH"),u=D("RCxd"),o=D("mOS8"),h=D.n(o),m=D("1ZF9"),s=D.n(m),r=D("WdTA"),a=D.n(r),t=D("m3rI"),w=function(_){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(E(_)&&f(M))},E=function(_){return Object(n.p)()?!0:(_({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},f=function(){var _,M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,I=Object(l.c)()._store.getState(),N=I.user;return(_=N.userInfo)!==null&&_!==void 0&&_.profile_completed?!0:(p.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:M?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){l.d.push("/account/profile/edit")}}),!1)},k=function(){var _,M=Object(l.c)()._store.getState(),I=M.user;return(_=I.userInfo)!==null&&_!==void 0&&_.professional_certification?!0:(p.a.confirm({title:"\u63D0\u793A",centered:!0,content:d.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(c.O)("/account/certification")}}),!1)},O=function(){return Object(n.a)()?!0:(p.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:d.a.createElement("div",{className:"tc",style:{marginLeft:-38}},d.a.createElement("p",null,"\u60A8\u53EF\u4EE5\u626B\u7801\u52A0\u7FA4@\u7FA4\u7BA1\u7406\u5458\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650\u54E6\uFF01"),d.a.createElement("img",{src:Object(n.t)()?a.a:"".concat(t.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},C=function(_,M){return _?!0:(p.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:d.a.createElement("div",null,d.a.createElement("p",null,M||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),d.a.createElement("div",{style:{marginLeft:"110px"}},d.a.createElement("img",{src:s.a,width:200}),d.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(c.O)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},x=function(_){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",I=Object(l.c)()._store.getState(),N=I.shixunsDetail.detail;return(N==null?void 0:N.public)===2||(N==null?void 0:N.public)===1||(N==null?void 0:N.shixun_status)===3?(p.a.info({centered:!0,icon:d.a.createElement(u.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:d.a.createElement("div",{className:"tc",style:{marginLeft:-38}},d.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},d.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(N==null?void 0:N.public)===2?"\u5DF2\u516C\u5F00":(N==null?void 0:N.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",M,"\u3002"),d.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),d.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:h.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(N==null?void 0:N.shixun_status)===2?(p.a.confirm({centered:!0,icon:d.a.createElement(u.a,null),title:"\u63D0\u793A",content:d.a.createElement("div",null,d.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",M,"\u3002"),d.a.createElement("br",null),d.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){p.a.confirm({width:440,centered:!0,icon:d.a.createElement(u.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var H=Object(T.a)(S.a.mark(function K(){var U;return S.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.next=2,_({type:"shixunsDetail/cancelRelease",payload:{id:N==null?void 0:N.identifier}});case 2:U=X.sent,U.status!==401&&(g.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),_({type:"shixunsDetail/getShixunsDetail",payload:{id:N==null?void 0:N.identifier}}),_({type:"practiceSetting/getCommonData",payload:{id:N==null?void 0:N.identifier}}));case 4:case"end":return X.stop()}},K)}));function B(){return H.apply(this,arguments)}return B}()})}}),!0):!1}},NnUe:function(j,Y,D){j.exports={modal:"modal___sZeHv",colorBlue:"colorBlue___3FmfG",formWrap:"formWrap___3YEqH",flexRow:"flexRow___37Sa0",flexColumn:"flexColumn___1ykGy",example:"example___7mYRk",exampleImg:"exampleImg___UGH9Y",colorOrange:"colorOrange___1IJLa",uploader:"uploader___3f2Sm",uploadImg:"uploadImg___3WCoA",imageTip:"imageTip___FhklW",uploadTipIcon:"uploadTipIcon___2YZJx",uploadTip:"uploadTip___1eikX",color05101a:"color05101a___1Nuwt",viewLargerImg:"viewLargerImg___Ek8jW",footerWrap:"footerWrap___F9F0q",note:"note___1U6xc",schoolHintWrap:"schoolHintWrap___31S22",colorCDCDCD:"colorCDCDCD___1KqvR",color0152d9:"color0152d9___1YXxu"}},NvD2:function(j,Y,D){"use strict";D.d(Y,"a",function(){return v});var L=D("Kwbf");function g(S,b){var d=new Set;return S.forEach(function(l){b.has(l)||d.add(l)}),d}function T(S){var b=S||{},d=b.disabled,l=b.disableCheckbox,n=b.checkable;return!!(d||l)||n===!1}function P(S,b,d,l){for(var n=new Set(S),c=new Set,u=0;u<=d;u+=1){var o=b.get(u)||new Set;o.forEach(function(r){var a=r.key,t=r.node,w=r.children,E=w===void 0?[]:w;n.has(a)&&!l(t)&&E.filter(function(f){return!l(f.node)}).forEach(function(f){n.add(f.key)})})}for(var h=new Set,m=d;m>=0;m-=1){var s=b.get(m)||new Set;s.forEach(function(r){var a=r.parent,t=r.node;if(l(t)||!r.parent||h.has(r.parent.key))return;if(l(r.parent.node)){h.add(a.key);return}var w=!0,E=!1;(a.children||[]).filter(function(f){return!l(f.node)}).forEach(function(f){var k=f.key,O=n.has(k);w&&!O&&(w=!1),!E&&(O||c.has(k))&&(E=!0)}),w&&n.add(a.key),E&&c.add(a.key),h.add(a.key)})}return{checkedKeys:Array.from(n),halfCheckedKeys:Array.from(g(c,n))}}function p(S,b,d,l,n){for(var c=new Set(S),u=new Set(b),o=0;o<=l;o+=1){var h=d.get(o)||new Set;h.forEach(function(a){var t=a.key,w=a.node,E=a.children,f=E===void 0?[]:E;!c.has(t)&&!u.has(t)&&!n(w)&&f.filter(function(k){return!n(k.node)}).forEach(function(k){c.delete(k.key)})})}u=new Set;for(var m=new Set,s=l;s>=0;s-=1){var r=d.get(s)||new Set;r.forEach(function(a){var t=a.parent,w=a.node;if(n(w)||!a.parent||m.has(a.parent.key))return;if(n(a.parent.node)){m.add(t.key);return}var E=!0,f=!1;(t.children||[]).filter(function(k){return!n(k.node)}).forEach(function(k){var O=k.key,C=c.has(O);E&&!C&&(E=!1),!f&&(C||u.has(O))&&(f=!0)}),E||c.delete(t.key),f&&u.add(t.key),m.add(t.key)})}return{checkedKeys:Array.from(c),halfCheckedKeys:Array.from(g(u,c))}}function v(S,b,d,l){var n=[],c;l?c=l:c=T;var u=new Set(S.filter(function(s){var r=!!d[s];return r||n.push(s),r})),o=new Map,h=0;Object.keys(d).forEach(function(s){var r=d[s],a=r.level,t=o.get(a);t||(t=new Set,o.set(a,t)),t.add(r),h=Math.max(h,a)}),Object(L.a)(!n.length,"Tree missing follow keys: ".concat(n.slice(0,100).map(function(s){return"'".concat(s,"'")}).join(", ")));var m;return b===!0?m=P(u,o,h,c):m=p(u,b.halfCheckedKeys,o,h,c),m}},OLod:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("K3mO"))})(this,function(L){L.lib.Cipher||function(g){var T=L,P=T.lib,p=P.Base,v=P.WordArray,S=P.BufferedBlockAlgorithm,b=T.enc,d=b.Utf8,l=b.Base64,n=T.algo,c=n.EvpKDF,u=P.Cipher=S.extend({cfg:p.extend(),createEncryptor:function(y,_){return this.create(this._ENC_XFORM_MODE,y,_)},createDecryptor:function(y,_){return this.create(this._DEC_XFORM_MODE,y,_)},init:function(y,_,M){this.cfg=this.cfg.extend(M),this._xformMode=y,this._key=_,this.reset()},reset:function(){S.reset.call(this),this._doReset()},process:function(y){return this._append(y),this._process()},finalize:function(y){y&&this._append(y);var _=this._doFinalize();return _},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function y(_){return typeof _=="string"?x:k}return function(_){return{encrypt:function(M,I,N){return y(I).encrypt(_,M,I,N)},decrypt:function(M,I,N){return y(I).decrypt(_,M,I,N)}}}}()}),o=P.StreamCipher=u.extend({_doFinalize:function(){var y=this._process(!0);return y},blockSize:1}),h=T.mode={},m=P.BlockCipherMode=p.extend({createEncryptor:function(y,_){return this.Encryptor.create(y,_)},createDecryptor:function(y,_){return this.Decryptor.create(y,_)},init:function(y,_){this._cipher=y,this._iv=_}}),s=h.CBC=function(){var y=m.extend();y.Encryptor=y.extend({processBlock:function(M,I){var N=this._cipher,G=N.blockSize;_.call(this,M,I,G),N.encryptBlock(M,I),this._prevBlock=M.slice(I,I+G)}}),y.Decryptor=y.extend({processBlock:function(M,I){var N=this._cipher,G=N.blockSize,H=M.slice(I,I+G);N.decryptBlock(M,I),_.call(this,M,I,G),this._prevBlock=H}});function _(M,I,N){var G,H=this._iv;H?(G=H,this._iv=g):G=this._prevBlock;for(var B=0;B<N;B++)M[I+B]^=G[B]}return y}(),r=T.pad={},a=r.Pkcs7={pad:function(y,_){for(var M=_*4,I=M-y.sigBytes%M,N=I<<24|I<<16|I<<8|I,G=[],H=0;H<I;H+=4)G.push(N);var B=v.create(G,I);y.concat(B)},unpad:function(y){var _=y.words[y.sigBytes-1>>>2]&255;y.sigBytes-=_}},t=P.BlockCipher=u.extend({cfg:u.cfg.extend({mode:s,padding:a}),reset:function(){var y;u.reset.call(this);var _=this.cfg,M=_.iv,I=_.mode;this._xformMode==this._ENC_XFORM_MODE?y=I.createEncryptor:(y=I.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==y?this._mode.init(this,M&&M.words):(this._mode=y.call(I,this,M&&M.words),this._mode.__creator=y)},_doProcessBlock:function(y,_){this._mode.processBlock(y,_)},_doFinalize:function(){var y,_=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(_.pad(this._data,this.blockSize),y=this._process(!0)):(y=this._process(!0),_.unpad(y)),y},blockSize:128/32}),w=P.CipherParams=p.extend({init:function(y){this.mixIn(y)},toString:function(y){return(y||this.formatter).stringify(this)}}),E=T.format={},f=E.OpenSSL={stringify:function(y){var _,M=y.ciphertext,I=y.salt;return I?_=v.create([1398893684,1701076831]).concat(I).concat(M):_=M,_.toString(l)},parse:function(y){var _,M=l.parse(y),I=M.words;return I[0]==1398893684&&I[1]==1701076831&&(_=v.create(I.slice(2,4)),I.splice(0,4),M.sigBytes-=16),w.create({ciphertext:M,salt:_})}},k=P.SerializableCipher=p.extend({cfg:p.extend({format:f}),encrypt:function(y,_,M,I){I=this.cfg.extend(I);var N=y.createEncryptor(M,I),G=N.finalize(_),H=N.cfg;return w.create({ciphertext:G,key:M,iv:H.iv,algorithm:y,mode:H.mode,padding:H.padding,blockSize:y.blockSize,formatter:I.format})},decrypt:function(y,_,M,I){I=this.cfg.extend(I),_=this._parse(_,I.format);var N=y.createDecryptor(M,I).finalize(_.ciphertext);return N},_parse:function(y,_){return typeof y=="string"?_.parse(y,this):y}}),O=T.kdf={},C=O.OpenSSL={execute:function(y,_,M,I){I||(I=v.random(64/8));var N=c.create({keySize:_+M}).compute(y,I),G=v.create(N.words.slice(_),M*4);return N.sigBytes=_*4,w.create({key:N,iv:G,salt:I})}},x=P.PasswordBasedCipher=k.extend({cfg:k.cfg.extend({kdf:C}),encrypt:function(y,_,M,I){I=this.cfg.extend(I);var N=I.kdf.execute(M,y.keySize,y.ivSize);I.iv=N.iv;var G=k.encrypt.call(this,y,_,N.key,I);return G.mixIn(N),G},decrypt:function(y,_,M,I){I=this.cfg.extend(I),_=this._parse(_,I.format);var N=I.kdf.execute(M,y.keySize,y.ivSize,_.salt);I.iv=N.iv;var G=k.decrypt.call(this,y,_,N.key,I);return G}})}()})},OZM5:function(j,Y,D){"use strict";D.d(Y,"b",function(){return l}),D.d(Y,"a",function(){return n}),D.d(Y,"k",function(){return c}),D.d(Y,"h",function(){return u}),D.d(Y,"i",function(){return o}),D.d(Y,"g",function(){return h}),D.d(Y,"c",function(){return m}),D.d(Y,"d",function(){return s}),D.d(Y,"j",function(){return t}),D.d(Y,"e",function(){return w}),D.d(Y,"f",function(){return E});var L=D("KQm4"),g=D("U8pU"),T=D("Ff2n"),P=D("q1tI"),p=D.n(P),v=D("Kwbf"),S=D("WaYH"),b=.25,d=2;function l(f,k){var O=f.slice(),C=O.indexOf(k);return C>=0&&O.splice(C,1),O}function n(f,k){var O=f.slice();return O.indexOf(k)===-1&&O.push(k),O}function c(f){return f.split("-")}function u(f,k){return"".concat(f,"-").concat(k)}function o(f){return f&&f.type&&f.type.isTreeNode}function h(f,k){var O=[f],C=k[f];function x(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];y.forEach(function(_){var M=_.key,I=_.children;O.push(M),x(I)})}return x(C.children),O}function m(f,k){var O=f.clientY,C=k.selectHandle.getBoundingClientRect(),x=C.top,y=C.bottom,_=C.height,M=Math.max(_*b,d);return O<=x+M?-1:O>=y-M?1:0}function s(f,k){if(!f)return;var O=k.multiple;return O?f.slice():f.length?[f[0]]:f}var r=function(k){return k};function a(f,k){if(!f)return[];var O=k||{},C=O.processProps,x=C===void 0?r:C,y=Array.isArray(f)?f:[f];return y.map(function(_){var M=_.children,I=Object(T.a)(_,["children"]),N=a(M,k);return p.a.createElement(S.a,Object.assign({},x(I)),N)})}function t(f){if(!f)return null;var k;if(Array.isArray(f))k={checkedKeys:f,halfCheckedKeys:void 0};else if(Object(g.a)(f)==="object")k={checkedKeys:f.checked||void 0,halfCheckedKeys:f.halfChecked||void 0};else return Object(v.a)(!1,"`checkedKeys` is not an array or an object"),null;return k}function w(f,k){var O=new Set;function C(x){if(O.has(x))return;var y=k[x];if(!y)return;O.add(x);var _=y.parent,M=y.node;if(M.disabled)return;_&&C(_.key)}return(f||[]).forEach(function(x){C(x)}),Object(L.a)(O)}function E(f){var k={};return Object.keys(f).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(k[O]=f[O])}),k}},Ot1p:function(j,Y,D){"use strict";var L=D("2qtc"),g=D("kLXV"),T=D("rAM+"),P=D("miYZ"),p=D("tsqr"),v=D("9og8"),S=D("tJVT"),b=D("jrin"),d=D("WmNS"),l=D.n(d),n=D("q1tI"),c=D.n(n),u=D("VrN/"),o=D.n(u),h=D("bdgK"),m=D("p77/"),s=D("Bd2K"),r=D("ELLl"),a=D("19Vz"),t=D("lZu9"),w=D("+NIl"),E=D("kSUc"),f=D("9Bee"),k=function($e){var bt=$e.value,gt=bt===void 0?"":bt,Ut=$e.className,Nt=$e.showTextOnly,hr=$e.showLines,mr=$e.style,St=mr===void 0?{}:mr,Yr=Object(n.useMemo)(function(){return""},[gt]);return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{dangerouslySetInnerHTML:{__html:Yr}}))},O=D("0Owb"),C=D("dejd"),x=D("C+DQ"),y=D("1vsH"),_=D("m3rI"),M=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function I($e){var bt=$e.onActionCallback,gt=$e.title,Ut=$e.icon,Nt=$e.actionName,hr=$e.className,mr=hr===void 0?"":hr,St=$e.children;function Yr(){bt(Nt)}return c.a.createElement("a",{title:gt,className:mr,onClick:Yr},c.a.createElement("i",{className:"md-iconfont ".concat(Ut)}),St)}var N=function($e){var bt=$e.watch,gt=$e.showNullButton,Ut=$e.onActionCallback,Nt=$e.fullScreen,hr=$e.insertTemp,mr=$e.hidetoolBar,St=$e.uuid,Yr=$e.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(y.D)("_educoder_session_login"),"&_educoder_session=").concat(Object(y.D)("_educoder_session"),"&key=").concat(St,"&api=").concat(encodeURIComponent(_.a.PROXY_SERVER)));var Jr=[].concat(M,[{title:"".concat(bt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(bt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return c.a.createElement("ul",{className:"markdown-toolbar-container"},!mr&&Jr.map(function(Hr,un){return c.a.createElement("li",{key:un},Hr.actionName?c.a.createElement(I,Object(O.a)({},Hr,{onActionCallback:Ut})):c.a.createElement("span",{className:"v-line"}))}),gt?c.a.createElement("li",null,c.a.createElement(I,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ut},c.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,hr&&c.a.createElement("li",null,c.a.createElement(I,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(hr),onActionCallback:Ut},c.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),c.a.createElement("li",{className:"btn-full-screen"},c.a.createElement(I,{icon:"".concat(Nt?"icon-shrink":"icon-enlarge"),title:Nt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ut})))},G=D("M8RZ"),H=D("+L6B"),B=D("2/Rp"),K=D("y8nQ"),U=D("Vl3Y"),W=D("5NDa"),X=D("5rEg"),ne={labelCol:{span:4},wrapperCol:{span:20}},fe=function($e){var bt=$e.callback,gt=$e.onCancel;function Ut(Nt){bt(Nt)}return c.a.createElement(U.a,Object(O.a)({},ne,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ut}),c.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},c.a.createElement(X.a,null)),c.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},c.a.createElement(X.a,null)),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(B.a,{type:"ghost",onClick:gt},"\u53D6\u6D88")))},me=D("7ahc"),Ae=D("k1fw"),De=D("HmJG"),ye=D("BjJ7"),Oe=U.a.useForm,xe={width:280,marginRight:10},ue={labelCol:{span:5},wrapperCol:{span:19}},le=function($e){var bt=$e.callback,gt=$e.onCancel,Ut=Oe(),Nt=Object(S.a)(Ut,1),hr=Nt[0],mr=Object(n.useRef)();function St(Hr){bt(Object(Ae.a)(Object(Ae.a)({},Hr),{},{name:mr.current}))}function Yr(Hr,un){hr.setFieldsValue({src:"/api/attachments/".concat(Hr.id,"?type=").concat(Hr.content_type),type:un.type})}function Jr(Hr){var un=Hr.target.files[0];mr.current=un.name,pe(un,Yr)}return c.a.createElement(U.a,Object(O.a)({form:hr},ue,{className:"upload-image-panel",onFinish:St}),c.a.createElement(U.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},c.a.createElement("div",{className:"flex-container"},c.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},c.a.createElement(X.a,{style:xe})),c.a.createElement(re,{onFileChange:Jr}))),c.a.createElement(U.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},c.a.createElement(X.a,{style:{width:264}})),c.a.createElement(U.a.Item,{style:{textAlign:"right"}},c.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(B.a,{type:"ghost",onClick:gt},"\u53D6\u6D88")))};function re($e){var bt=$e.onFileChange;return c.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",c.a.createElement("input",{type:"file",onChange:bt}))}function pe($e,bt){if(!$e)throw new String("\u6CA1\u6709\u6587\u4EF6");var gt=new FormData;gt.append("editormd-image-file",$e),gt.append("file_param_name","editormd-image-file"),gt.append("byxhr","true");var Ut=new window.XMLHttpRequest;Ut.withCredentials=!0,Ut.addEventListener("load",function(Nt){bt(JSON.parse(Nt.target.responseText),$e)},!1),Ut.addEventListener("error",function(Nt){console.error(Nt)},!1),Ut.open("POST","".concat(ye.a,"/api/attachments.json")),Ut.send(gt)}var ee=D("giR+"),te=D("fyUT"),ce=D("7Kak"),q=D("9yH6"),Q=q.a.Group,V={margin:"0 8px"},Z=function($e){var bt=$e.callback,gt=$e.onCancel;function Ut(Nt){bt(Nt)}return c.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ut},c.a.createElement("div",{className:"flex-container"},c.a.createElement("span",{style:V},"\u5355\u5143\u683C\u6570\uFF1A"),c.a.createElement("span",{style:V},"\u884C\u6570"),c.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},c.a.createElement(te.a,null)),c.a.createElement("span",{style:V},"\u5217\u6570"),c.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},c.a.createElement(te.a,null))),c.a.createElement("div",{className:"flex-container",style:{marginTop:12}},c.a.createElement("span",{style:V},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),c.a.createElement(U.a.Item,{name:"align"},c.a.createElement(Q,null,c.a.createElement(q.a,{value:"default"},c.a.createElement("i",{className:"fa fa-align-justify"})),c.a.createElement(q.a,{value:"left"},c.a.createElement("i",{className:"fa fa-align-left"})),c.a.createElement(q.a,{value:"center"},c.a.createElement("i",{className:"fa fa-align-center"})),c.a.createElement(q.a,{value:"right"},c.a.createElement("i",{className:"fa fa-align-right"}))))),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(B.a,{type:"ghost",onClick:gt},"\u53D6\u6D88")))},be=D("ErOA"),ge=D("7Cbv"),Te="link",Je="upload-image",rt="code-block",nt="add-table",at="------------",ct={default:at,left:":".concat(at),center:":".concat(at,":"),right:"".concat(at,":")},ht=D("9VGf"),He,Re;function tt(){}var ft=0,Qe=1e4,lt="\u2581",Ue=`
|
|
|
**\u6A21\u677F\u6807\u9898**
|
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function Le($e){return/^\d+$/.test($e)?"".concat($e,"px"):$e}var Ie=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ce=Ie?"Cmd":"Ctrl",Se=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],ke=(He={},Object(b.a)(He,Ce+"-B","bold"),Object(b.a)(He,Ce+"-I","italic"),He),Ne=(Re={},Object(b.a)(Re,Te,"\u6DFB\u52A0\u94FE\u63A5"),Object(b.a)(Re,rt,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(b.a)(Re,Je,"\u6DFB\u52A0\u6587\u4EF6"),Object(b.a)(Re,nt,"\u6DFB\u52A0\u8868\u683C"),Re),et=Y.a=function($e){var bt=$e.defaultValue,gt=bt===void 0?"":bt,Ut=$e.onChange,Nt=$e.width,hr=Nt===void 0?"100%":Nt,mr=$e.height,St=mr===void 0?400:mr,Yr=$e.miniToolbar,Jr=Yr===void 0?!1:Yr,Hr=$e.isFocus,un=Hr===void 0?!1:Hr,Ar=$e.watch,vn=$e.insertTemp,mn=$e.mode,Kt=mn===void 0?"markdown":mn,or=$e.id,Xt=or===void 0?"markdown-editor-id":or,gr=$e.showResizeBar,Xr=gr===void 0?!1:gr,kn=$e.noStorage,Ln=kn===void 0?!1:kn,tn=$e.showNullButton,ur=tn===void 0?!1:tn,Xn=$e.hidetoolBar,hi=Xn===void 0?!1:Xn,$n=$e.fullScreen,Zr=$n===void 0?!1:$n,Bn=$e.onBlur,si=$e.onCMBeforeChange,li=$e.onFullScreen,wt=$e.className,$t=wt===void 0?"":wt,en=$e.disablePaste,Cn=en===void 0?!1:en,_n=$e.placeholder,On=_n===void 0?"":_n,ae=$e.values,z=ae===void 0?"":ae,$=Object(n.useState)(null),ie=Object(S.a)($,2),de=ie[0],se=ie[1],Ke=Object(n.useState)(gt),Rt=Object(S.a)(Ke,2),Vt=Rt[0],Er=Rt[1],Lt=Object(n.useState)(Ar),zr=Object(S.a)(Lt,2),Br=zr[0],En=zr[1],ui=Object(n.useState)(Zr),Ei=Object(S.a)(ui,2),In=Ei[0],Li=Ei[1],qi=Object(n.useState)(""),ni=Object(S.a)(qi,2),Ti=ni[0],xi=ni[1],Fi=Object(n.useState)(0),Ci=Object(S.a)(Fi,2),Gi=Ci[0],Mi=Ci[1],oa=Object(n.useState)(St),sa=Object(S.a)(oa,2),Ii=sa[0],qn=sa[1],Vi=Object(n.useState)(!1),ta=Object(S.a)(Vi,2),Tt=ta[0],it=ta[1],mt=Object(n.useRef)(Object(ge.a)()),Ct=Object(n.useRef)(!1),It=Object(n.useRef)(),Pt=Object(n.useRef)(),Ht=Object(n.useRef)(),Wt=Object(n.useRef)(),dt=Object(n.useRef)(),At=function(){var Et=Object(v.a)(l.a.mark(function _t(){var xt,Jt;return l.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,Object(be.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:mt.current}});case 2:Jt=dr.sent,Jt!=null&&(xt=Jt.attachments)!==null&&xt!==void 0&&xt.length&&(console.log("cm:",de,Pt),Jt.attachments.map(function(fr){fr.content_type.indexOf("image")>-1?de.replaceSelection(".concat(fr.content_type,")")):fr.content_type.indexOf("video")>-1?de.replaceSelection('<video width="100%" controls src="'.concat(_.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):fr.content_type.indexOf("pdf")>-1?de.replaceSelection('<a href="'.concat(_.a.API_SERVER,"/api/attachments/").concat(fr.id,"?type=").concat(fr.content_type,'&disposition=inline" target="_blank">').concat(fr.name,"</a>")):de.replaceSelection("[".concat(fr.name,"](").concat(_.a.API_SERVER,"/api/attachments/").concat(fr.id,"?type=").concat(fr.content_type,")"))}));case 4:case"end":return dr.stop()}},_t)}));return function(){return Et.apply(this,arguments)}}();Object(n.useEffect)(function(){Er(z),de==null||de.setValue(z)},[z]),Object(n.useEffect)(function(){li==null||li(In)},[In]),Object(n.useEffect)(function(){if(Pt.current){var Et=o.a.fromTextArea(Pt.current,{mode:Kt,lineNumbers:!Jr,lineWrapping:!0,value:gt,autoCloseTags:!0,autoCloseBrackets:!0});un&&Et.focus();function _t(xt,Jt){if(Cn){Jt.preventDefault();return}var pr=Jt.clipboardData;if(pr){var dr=pr.types.toString(),fr=pr.items;if(dr==="Files"||pr.types.indexOf("Files")>-1){if(Jt.preventDefault(),Kt=="stex")return;try{var Dr,an=fr[1];((Dr=fr[0])===null||Dr===void 0?void 0:Dr.kind)==="file"&&(an=fr[0]);var qe=an.getAsFile(),sr=qe.name.split(".").pop();pe(qe,function(Nr){if(Nr.id){var rn,xr,br;(qe==null||((rn=qe.type)===null||rn===void 0)?void 0:rn.indexOf("image"))>-1?Et.replaceSelection(".concat(Nr.content_type,")")):(qe==null||((xr=qe.type)===null||xr===void 0)?void 0:xr.indexOf("video"))>-1?Et.replaceSelection('<video width="100%" controls src="'.concat(_.a.API_SERVER,"/api/attachments/").concat(Nr.id,'"></video>')):(qe==null||((br=qe.type)===null||br===void 0)?void 0:br.indexOf("pdf"))>-1?Et.replaceSelection('<a href="'.concat(_.a.API_SERVER,"/api/attachments/").concat(Nr.id,"?type=").concat(qe.type,'&disposition=inline" target="_blank">').concat(qe.name,"</a>")):Se.includes(sr)?Et.replaceSelection('<a href="'.concat(_.a.API_SERVER,"/api/attachments/").concat(Nr.id,'?type=office&disposition=inline" target="_blank">').concat(qe.name,"</a>")):Et.replaceSelection("[".concat(qe.name,"](").concat(_.a.API_SERVER,"/api/attachments/").concat(Nr.id,"?type=").concat(Nr.content_type,")"))}else(Nr==null?void 0:Nr.status)===401&&(document.location.href="/user/login")})}catch(Nr){p.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Et.on("paste",_t),Et.on("dragleave",function(xt,Jt){Ht.current.classList.remove("mouse-hover-md")}),Et.on("dragover",function(xt,Jt){Ht.current.classList.add("mouse-hover-md")}),Et.on("drop",function(xt,Jt){Ht.current.classList.add("mouse-hover-md");var pr;if(pr=Jt.dataTransfer.files,pr.length>0){Jt.preventDefault(),Jt.stopPropagation();for(var dr=function(an){var qe=pr[an],sr=qe.name.split(".").pop();pe(qe,function(Nr){if(Nr.id){var rn,xr,br;(qe==null||((rn=qe.type)===null||rn===void 0)?void 0:rn.indexOf("image"))>-1?Et.replaceSelection(".concat(Nr.content_type,")")):(qe==null||((xr=qe.type)===null||xr===void 0)?void 0:xr.indexOf("video"))>-1?Et.replaceSelection('<video width="100%" controls src="'.concat(_.a.API_SERVER,"/api/attachments/").concat(Nr.id,'"></video>')):(qe==null||((br=qe.type)===null||br===void 0)?void 0:br.indexOf("pdf"))>-1?Et.replaceSelection('<a href="'.concat(_.a.API_SERVER,"/api/attachments/").concat(Nr.id,"?type=").concat(qe.type,'&disposition=inline" target="_blank">').concat(qe.name,"</a>")):Se.includes(sr)?Et.replaceSelection('<a href="'.concat(_.a.API_SERVER,"/api/attachments/").concat(Nr.id,'?type=office&disposition=inline" target="_blank">').concat(qe.name,"</a>")):Et.replaceSelection("[".concat(qe.name,"](").concat(_.a.API_SERVER,"/api/attachments/").concat(Nr.id,"?type=").concat(Nr.content_type,")"))}else(Nr==null?void 0:Nr.status)===401&&(document.location.href="/user/login")})},fr=0;fr<pr.length;fr++)dr(fr)}}),se(Et),function(){Et.off("paste",_t)}}},[]);var Dt=Object(n.useCallback)(function(){if(Ht.current)try{}catch(Et){console.log(Et,"---- to set md editor body height")}},[Ii,Ht,In]);Object(n.useEffect)(function(){function Et(){var xt=new h.default(function(Jt){var pr=Object(T.a)(Jt),dr;try{for(pr.s();!(dr=pr.n()).done;){var fr=dr.value;(fr.target.offsetHeight>0||fr.target.offsetWidth>0)&&(Dt(),de.setSize("100%","100%"),de.refresh())}}catch(Dr){pr.e(Dr)}finally{pr.f()}});return xt.observe(Pt.current.parentElement),xt}if(de){var _t=Et();return function(){_t.unobserve(Pt.current.parentElement)}}},[de,Dt]),Object(n.useEffect)(function(){if(de){for(var Et=[],_t=function(){var fr=Jt[xt];pr=Object(S.a)(fr,2);var Dr=pr[0],an=pr[1],qe=Object(b.a)({},Dr,function(){yr(an)});Et.push(qe),de.addKeyMap(qe)},xt=0,Jt=Object.entries(ke);xt<Jt.length;xt++){var pr;_t()}return It.current=setInterval(function(){Ct.current&&At()},4e3),function(){clearInterval(It.current);var dr=Object(T.a)(Et),fr;try{for(dr.s();!(fr=dr.n()).done;){var Dr=fr.value;de.removeKeyMap(Dr)}}catch(an){dr.e(an)}finally{dr.f()}}}},[de]),Object(n.useEffect)(function(){Zr!==In&&Li(Zr)},[Zr]),Object(ht.a)(function(){if(!Ln&&Gi>0){var Et=new Date().getTime(),_t=window.sessionStorage.getItem(Xt);Et>=Gi+Qe&&(!_t||_t!==Vt)&&(window.sessionStorage.setItem(Xt,Vt),it(!0))}},Qe),Object(n.useEffect)(function(){En(Ar)},[de,Ar]),Object(n.useEffect)(function(){de&&(un&&de.focus())},[de,un]),Object(n.useEffect)(function(){if(Br&&de){var Et=de.getScrollerElement();function _t(xt){var Jt=xt.target;if(dt.current){var pr=Jt.scrollTop/Jt.scrollHeight;dt.current.scrollTop=dt.current.scrollHeight*pr}}return Et.addEventListener("scroll",_t),function(){Et.removeEventListener("scroll",_t)}}},[de,Br]),Object(n.useEffect)(function(){if(de&&si){function Et(_t,xt){si(_t,xt)}return de.on("beforeChange",Et),function(){de.off("beforeChange",Et)}}},[de,si]),Object(n.useEffect)(function(){if(de&&Bn){function Et(){Bn(de.getValue())}return de.on("blur",Et),function(){de.off("blur",Et)}}},[de,Bn]),Object(n.useEffect)(function(){if(de){function Et(_t){var xt=_t.getValue();Er(xt),Mi(new Date().getTime()),_t.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ut&&Ut(xt)}return de.on("change",Et),function(){de.off("change",Et)}}},[de,Ut]),Object(n.useEffect)(function(){de&&(gt==null?(de.setValue(""),Er("")):gt!==de.getValue()&&(de.setValue(gt),Er(gt),de.setCursor(de.lineCount(),0)))},[de,gt]);var yr=Object(n.useCallback)(function(Et){var _t=de.getCursor(),xt=de.getSelection(),Jt=xt.split(`
|
|
|
`);switch(Et){case"bold":return de.replaceSelection("**"+xt+"**"),xt===""&&de.setCursor(_t.line,_t.ch+2),de.focus();case"italic":return de.replaceSelection("*"+xt+"*"),xt===""&&de.setCursor(_t.line,_t.ch+1),de.focus();case"code":return de.replaceSelection("`"+xt+"`"),xt===""&&de.setCursor(_t.line,_t.ch+1),de.focus();case"inline-latex":return de.replaceSelection("`$$"+xt+"$$`"),xt===""&&de.setCursor(_t.line,_t.ch+3),de.focus();case"latex":return de.replaceSelection("```latex\n"+xt+"\n```"),de.setCursor(_t.line+1,xt.length+1),de.focus();case"line-break":return de.replaceSelection(`<br/>
|
|
|
`),de.focus();case"list-ul":return xt===""?de.replaceSelection("- "+xt):de.replaceSelection(Jt.map(function(pr){return pr===""?"":"- ".concat(pr)}).join(`
|
|
|
`)),de.focus();case"list-ol":return xt===""?de.replaceSelection("1. "+xt):de.replaceSelection(Jt.map(function(pr,dr){return pr===""?"":"".concat(dr+1,". ").concat(pr)}).join(`
|
|
|
`)),de.focus();case"add-null-ch":return xt===""&&de.setCursor(_t.line,_t.ch+1),de.replaceSelection(lt),de.focus();case"inster-template-1":return xt===""&&de.setCursor(_t.line,_t.ch),de.replaceSelection(Ue),de.focus();case"eraser":return de.setValue(""),de.focus();case"trigger-watch":return En(!Br),de.focus();case"trigger-full-screen":return Li(!In),de.focus();case Te:xi(Te);return;case rt:xi(rt);return;case Je:xi(Je);return;case nt:xi(nt);return;default:throw new Error}},[de,Br,In]),tr=Object(n.useCallback)(function(Et){xi("");switch(Ti){case Te:var _t=Et.title,xt=Et.link;return de.replaceSelection("[".concat(_t,"](").concat(xt,")")),de.focus();case rt:var Jt=Et.language,pr=Et.content;return de.replaceSelection(["```"+Jt,pr,"```"].join(`
|
|
|
`)),de.focus();case Je:var dr=Et.src,fr=Et.alt,Dr=Et.name;return dr.indexOf("type=image")>-1?de.replaceSelection(".concat(dr,' "').concat(fr||"",'" )')):dr.indexOf("type=application/pdf")>-1?de.replaceSelection('<a href="'.concat(dr,'&disposition=inline" target="_blank">').concat(Dr,"</a>")):de.replaceSelection('<a href="'.concat(dr,'" target="_blank">').concat(Dr,"</a>")),de.focus();case nt:for(var an=Et.row,qe=Et.col,sr=Et.align,Nr=`
|
|
|
`,rn=0;rn<an;rn++){for(var xr=[],br=[],Pr=0;Pr<qe;Pr++)rn===1&&br.push(ct[sr]),xr.push(" ");rn===1&&(Nr+="| ".concat(br.join(" | "),` |
|
|
|
`)),Nr+="| ".concat(xr.join(qe===1?"":" | "),` |
|
|
|
`)}return de.replaceSelection(Nr+`
|
|
|
`),de.focus();default:throw new Error}},[de,Ti]),qt=Object(n.useMemo)(function(){switch(Ti){case Te:return c.a.createElement(fe,{callback:tr,onCancel:Gt});case rt:return c.a.createElement(me.b,{callback:tr,onCancel:Gt});case Je:return c.a.createElement(le,{callback:tr,onCancel:Gt});case nt:return c.a.createElement(Z,{callback:tr,onCancel:Gt});default:return null}},[Ti]);function Gt(){xi("")}Object(n.useEffect)(function(){if(Wt.current){var Et=Wt.current,_t=!1,xt=0;function Jt(fr){_t=!0,xt=fr.pageY}function pr(){_t=!1}function dr(fr){if(_t){var Dr=fr.pageY-xt;Dr<0&&(Dr=0),Dr>300&&(Dr=300);var an=St+Dr+"px";qn(an)}}return Et.addEventListener("mousedown",Jt),document.addEventListener("mousemove",dr),document.addEventListener("mouseup",pr),function(){Et.removeEventListener("mousedown",Jt),document.removeEventListener("mousemove",dr),document.removeEventListener("mouseup",pr)}}},[de,Wt]),Object(n.useEffect)(function(){qn(St)},[St]);var nr=Le(hr),cr=Le(Ii),st={width:nr,height:cr},Lr=Object(n.useMemo)(function(){if(Gi){var Et=new Date(Gi),_t=Et.getHours(),xt=Et.getMinutes(),Jt=Et.getSeconds();return _t=_t<10?"0"+_t:_t,xt=xt<10?"0"+xt:xt,Jt=Jt<10?"0"+Jt:Jt,"".concat(_t,":").concat(xt,":").concat(Jt)}return 0},[Gi]);function Fr(){window.sessionStorage.removeItem(Xt),it(!1),Mi(0)}function Cr(){it(!1),Mi(0),de.setValue(window.sessionStorage.getItem(Xt))}function rr(Et,_t){var xt=de.getValue();xt=xt.replace(Et,_t),Er(xt),de==null||de.setValue(xt)}return c.a.createElement(n.Fragment,null,c.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ht},c.a.createElement("div",{className:"markdown-editor-container ".concat($t," ").concat(Br?"on-preview":""," ").concat(Jr?"mini":""," ").concat(In?"full-screen":""),style:st},c.a.createElement(N,{insertTemp:vn,watch:Br,fullScreen:In,showNullButton:ur,onActionCallback:yr,hidetoolBar:hi,uuid:mt.current,setOpenPhones:function(){Ct.current=!0}}),c.a.createElement("div",{className:"markdown-editor-body"},c.a.createElement("div",{className:"codemirror-container"},c.a.createElement("textarea",{ref:Pt,placeholder:On})),Br?c.a.createElement("div",{ref:dt,className:"preview-container"},Kt==="stex"&&c.a.createElement(k,{value:Vt}),Kt!=="stex"&&c.a.createElement(f.a,{edit:!0,value:Vt,replaces:rr})):null))),Xr?c.a.createElement("a",{ref:Wt,className:"editor-resize"}):null,c.a.createElement(G.a,null,Ne[Ti]?c.a.createElement(g.a,{centered:!0,title:Ne[Ti],visible:!0,onCancel:Gt,footer:null},qt):null))}},PVpz:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.StreamCipher,p=g.algo,v=[],S=[],b=[],d=p.RabbitLegacy=P.extend({_doReset:function(){var n=this._key.words,c=this.cfg.iv,u=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],o=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var h=0;h<4;h++)l.call(this);for(var h=0;h<8;h++)o[h]^=u[h+4&7];if(c){var m=c.words,s=m[0],r=m[1],a=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,t=(r<<8|r>>>24)&16711935|(r<<24|r>>>8)&4278255360,w=a>>>16|t&4294901760,E=t<<16|a&65535;o[0]^=a,o[1]^=w,o[2]^=t,o[3]^=E,o[4]^=a,o[5]^=w,o[6]^=t,o[7]^=E;for(var h=0;h<4;h++)l.call(this)}},_doProcessBlock:function(n,c){var u=this._X;l.call(this),v[0]=u[0]^u[5]>>>16^u[3]<<16,v[1]=u[2]^u[7]>>>16^u[5]<<16,v[2]=u[4]^u[1]>>>16^u[7]<<16,v[3]=u[6]^u[3]>>>16^u[1]<<16;for(var o=0;o<4;o++)v[o]=(v[o]<<8|v[o]>>>24)&16711935|(v[o]<<24|v[o]>>>8)&4278255360,n[c+o]^=v[o]},blockSize:128/32,ivSize:64/32});function l(){for(var n=this._X,c=this._C,u=0;u<8;u++)S[u]=c[u];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0<S[0]>>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0<S[1]>>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0<S[2]>>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0<S[3]>>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0<S[4]>>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0<S[5]>>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0<S[6]>>>0?1:0)|0,this._b=c[7]>>>0<S[7]>>>0?1:0;for(var u=0;u<8;u++){var o=n[u]+c[u],h=o&65535,m=o>>>16,s=((h*h>>>17)+h*m>>>15)+m*m,r=((o&4294901760)*o|0)+((o&65535)*o|0);b[u]=s^r}n[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0,n[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0,n[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0,n[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0,n[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0,n[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0,n[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0,n[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}g.RabbitLegacy=P._createHelper(d)}(),L.RabbitLegacy})},QDVR:function(j,Y,D){"use strict";D.d(Y,"e",function(){return g}),D.d(Y,"d",function(){return T}),D.d(Y,"c",function(){return S}),D.d(Y,"b",function(){return b}),D.d(Y,"a",function(){return l});var L=function(){var n=function(c,u){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,h){o.__proto__=h}||function(o,h){for(var m in h)h.hasOwnProperty(m)&&(o[m]=h[m])},n(c,u)};return function(c,u){n(c,u);function o(){this.constructor=c}c.prototype=u===null?Object.create(u):(o.prototype=u.prototype,new o)}}();function g(n){var c=[];return n.forEach(function(u){return c.push(u)}),c}function T(n){var c=[];return n.forEach(function(u,o){return c.push(o)}),c}var P=function(){function n(){this._value="",this._pos=0}return n.prototype.reset=function(c){return this._value=c,this._pos=0,this},n.prototype.next=function(){return this._pos+=1,this},n.prototype.hasNext=function(){return this._pos<this._value.length-1},n.prototype.cmp=function(c){var u=c.charCodeAt(0),o=this._value.charCodeAt(this._pos);return u-o},n.prototype.value=function(){return this._value[this._pos]},n}(),p=function(){function n(c){c===void 0&&(c=!0),this._splitOnBackslash=c}return n.prototype.reset=function(c){return this._value=c.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()},n.prototype.hasNext=function(){return this._to<this._value.length},n.prototype.next=function(){this._from=this._to;for(var c=!0;this._to<this._value.length;this._to++){var u=this._value.charCodeAt(this._to);if(u===47||this._splitOnBackslash&&u===92)if(c)this._from++;else break;else c=!1}return this},n.prototype.cmp=function(c){for(var u=0,o=c.length,h=this._from;u<o&&h<this._to;){var m=c.charCodeAt(u)-this._value.charCodeAt(h);if(m!==0)return m;u+=1,h+=1}return o===this._to-this._from?0:u<o?-1:1},n.prototype.value=function(){return this._value.substring(this._from,this._to)},n}(),v=function(){function n(){}return n}(),S=function(){function n(c){this._iter=c}return n.forPaths=function(){return new n(new p)},n.forStrings=function(){return new n(new P)},n.prototype.clear=function(){this._root=void 0},n.prototype.set=function(c,u){var o=this._iter.reset(c),h;for(this._root||(this._root=new v,this._root.segment=o.value()),h=this._root;;){var m=o.cmp(h.segment);if(m>0)h.left||(h.left=new v,h.left.segment=o.value()),h=h.left;else if(m<0)h.right||(h.right=new v,h.right.segment=o.value()),h=h.right;else if(o.hasNext())o.next(),h.mid||(h.mid=new v,h.mid.segment=o.value()),h=h.mid;else break}var s=h.value;return h.value=u,h.key=c,s},n.prototype.get=function(c){for(var u=this._iter.reset(c),o=this._root;o;){var h=u.cmp(o.segment);if(h>0)o=o.left;else if(h<0)o=o.right;else if(u.hasNext())u.next(),o=o.mid;else break}return o?o.value:void 0},n.prototype.findSubstr=function(c){for(var u=this._iter.reset(c),o=this._root,h=void 0;o;){var m=u.cmp(o.segment);if(m>0)o=o.left;else if(m<0)o=o.right;else if(u.hasNext())u.next(),h=o.value||h,o=o.mid;else break}return o&&o.value||h},n.prototype.forEach=function(c){this._forEach(this._root,c)},n.prototype._forEach=function(c,u){c&&(this._forEach(c.left,u),c.value&&u(c.value,c.key),this._forEach(c.mid,u),this._forEach(c.right,u))},n}(),b=function(){function n(){this.map=new Map,this.ignoreCase=!1}return n.prototype.set=function(c,u){this.map.set(this.toKey(c),u)},n.prototype.get=function(c){return this.map.get(this.toKey(c))},n.prototype.toKey=function(c){var u=c.toString();return this.ignoreCase&&(u=u.toLowerCase()),u},n}(),d=function(){function n(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return n.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),n.prototype.get=function(c,u){u===void 0&&(u=0);var o=this._map.get(c);return o?(u!==0&&this.touch(o,u),o.value):void 0},n.prototype.set=function(c,u,o){o===void 0&&(o=0);var h=this._map.get(c);if(h)h.value=u,o!==0&&this.touch(h,o);else{h={key:c,value:u,next:void 0,previous:void 0};switch(o){case 0:this.addItemLast(h);break;case 1:this.addItemFirst(h);break;case 2:this.addItemLast(h);break;default:this.addItemLast(h);break}this._map.set(c,h),this._size++}},n.prototype.delete=function(c){return!!this.remove(c)},n.prototype.remove=function(c){var u=this._map.get(c);return u?(this._map.delete(c),this.removeItem(u),this._size--,u.value):void 0},n.prototype.forEach=function(c,u){for(var o=this._head;o;)u?c.bind(u)(o.value,o.key,this):c(o.value,o.key,this),o=o.next},n.prototype.trimOld=function(c){if(c>=this.size)return;if(c===0){this.clear();return}for(var u=this._head,o=this.size;u&&o>c;)this._map.delete(u.key),u=u.next,o--;this._head=u,this._size=o,u&&(u.previous=void 0)},n.prototype.addItemFirst=function(c){if(!this._head&&!this._tail)this._tail=c;else if(this._head)c.next=this._head,this._head.previous=c;else throw new Error("Invalid list");this._head=c},n.prototype.addItemLast=function(c){if(!this._head&&!this._tail)this._head=c;else if(this._tail)c.previous=this._tail,this._tail.next=c;else throw new Error("Invalid list");this._tail=c},n.prototype.removeItem=function(c){if(c===this._head&&c===this._tail)this._head=void 0,this._tail=void 0;else if(c===this._head){if(!c.next)throw new Error("Invalid list");c.next.previous=void 0,this._head=c.next}else if(c===this._tail){if(!c.previous)throw new Error("Invalid list");c.previous.next=void 0,this._tail=c.previous}else{var u=c.next,o=c.previous;if(!u||!o)throw new Error("Invalid list");u.previous=o,o.next=u}c.next=void 0,c.previous=void 0},n.prototype.touch=function(c,u){if(!this._head||!this._tail)throw new Error("Invalid list");if(u!==1&&u!==2)return;if(u===1){if(c===this._head)return;var o=c.next,h=c.previous;c===this._tail?(h.next=void 0,this._tail=h):(o.previous=h,h.next=o),c.previous=void 0,c.next=this._head,this._head.previous=c,this._head=c}else if(u===2){if(c===this._tail)return;var o=c.next,h=c.previous;c===this._head?(o.previous=void 0,this._head=o):(o.previous=h,h.next=o),c.next=void 0,c.previous=this._tail,this._tail.next=c,this._tail=c}},n.prototype.toJSON=function(){var c=[];return this.forEach(function(u,o){c.push([o,u])}),c},n}(),l=function(n){L(c,n);function c(u,o){o===void 0&&(o=1);var h=n.call(this)||this;return h._limit=u,h._ratio=Math.min(Math.max(0,o),1),h}return c.prototype.get=function(u){return n.prototype.get.call(this,u,2)},c.prototype.peek=function(u){return n.prototype.get.call(this,u,0)},c.prototype.set=function(u,o){n.prototype.set.call(this,u,o,2),this.checkTrim()},c.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},c}(d)},RxwV:function(j,Y,D){"use strict";var L=D("q1tI"),g=D("uciX"),T=D("2W6z"),P=D.n(T),p=D("4IlW"),v=D("uK0f"),S=D.n(v);function b(Oe,xe){if(Oe===xe)return!0;if(!Oe||!xe)return!1;var ue=Oe.length;if(xe.length!==ue)return!1;for(var le=0;le<ue;le++)if(Oe[le]!==xe[le])return!1;return!0}function d(Oe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(ue){return typeof ue}:d=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},d(Oe)}function l(Oe,xe){if(!(Oe instanceof xe))throw new TypeError("Cannot call a class as a function")}function n(Oe,xe){for(var ue=0;ue<xe.length;ue++){var le=xe[ue];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(Oe,le.key,le)}}function c(Oe,xe,ue){return xe&&n(Oe.prototype,xe),ue&&n(Oe,ue),Oe}function u(Oe,xe){if(typeof xe!="function"&&xe!==null)throw new TypeError("Super expression must either be null or a function");Oe.prototype=Object.create(xe&&xe.prototype,{constructor:{value:Oe,writable:!0,configurable:!0}}),xe&&o(Oe,xe)}function o(Oe,xe){return o=Object.setPrototypeOf||function(le,re){return le.__proto__=re,le},o(Oe,xe)}function h(Oe){var xe=r();return function(){var ue=a(Oe),le;if(xe){var re=a(this).constructor;le=Reflect.construct(ue,arguments,re)}else le=ue.apply(this,arguments);return m(this,le)}}function m(Oe,xe){return xe&&(d(xe)==="object"||typeof xe=="function")?xe:s(Oe)}function s(Oe){if(Oe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Oe}function r(){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(Oe){return!1}}function a(Oe){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(ue){return ue.__proto__||Object.getPrototypeOf(ue)},a(Oe)}var t=function(){var Oe=function(xe){u(le,xe);var ue=h(le);function le(){var re;return l(this,le),re=ue.apply(this,arguments),re.menuItems={},re.saveMenuItem=function(pe){return function(ee){re.menuItems[pe]=ee}},re}return c(le,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(pe){!pe.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(pe){var ee=this.props,te=ee.fieldNames,ce=ee.defaultFieldNames;return te[pe]||ce[pe]}},{key:"getOption",value:function(pe,ee){var te=this.props,ce=te.prefixCls,q=te.expandTrigger,Q=te.expandIcon,V=te.loadingIcon,Z=this.props.onSelect.bind(this,pe,ee),be=this.props.onItemDoubleClick.bind(this,pe,ee),ge={onClick:Z,onDoubleClick:be},Te="".concat(ce,"-menu-item"),Je=null,rt=pe[this.getFieldName("children")]&&pe[this.getFieldName("children")].length>0;(rt||pe.isLeaf===!1)&&(Te+=" ".concat(ce,"-menu-item-expand"),pe.loading||(Je=L.createElement("span",{className:"".concat(ce,"-menu-item-expand-icon")},Q))),q==="hover"&&(rt||pe.isLeaf===!1)&&(ge={onMouseEnter:this.delayOnSelect.bind(this,Z),onMouseLeave:this.delayOnSelect.bind(this),onClick:Z}),this.isActiveOption(pe,ee)&&(Te+=" ".concat(ce,"-menu-item-active"),ge.ref=this.saveMenuItem(ee)),pe.disabled&&(Te+=" ".concat(ce,"-menu-item-disabled"));var nt=null;pe.loading&&(Te+=" ".concat(ce,"-menu-item-loading"),nt=V||null);var at="";return"title"in pe?at=pe.title:typeof pe[this.getFieldName("label")]=="string"&&(at=pe[this.getFieldName("label")]),L.createElement("li",Object.assign({key:pe[this.getFieldName("value")],className:Te,title:at},ge,{role:"menuitem",onMouseDown:function(ht){return ht.preventDefault()}}),pe[this.getFieldName("label")],Je,nt)}},{key:"getActiveOptions",value:function(pe){var ee=this,te=this.props.options,ce=pe||this.props.activeValue;return S()(te,function(q,Q){return q[ee.getFieldName("value")]===ce[Q]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var pe=this,ee=this.props.options,te=this.getActiveOptions().map(function(ce){return ce[pe.getFieldName("children")]}).filter(function(ce){return!!ce});return te.unshift(ee),te}},{key:"delayOnSelect",value:function(pe){for(var ee=this,te=arguments.length,ce=new Array(te>1?te-1:0),q=1;q<te;q++)ce[q-1]=arguments[q];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof pe=="function"&&(this.delayTimer=window.setTimeout(function(){pe(ce),ee.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var pe=this.getShowOptions().length,ee=0;ee<pe;ee++){var te=this.menuItems[ee];te&&te.parentElement&&(te.parentElement.scrollTop=te.offsetTop)}}},{key:"isActiveOption",value:function(pe,ee){var te=this.props.activeValue,ce=te===void 0?[]:te;return ce[ee]===pe[this.getFieldName("value")]}},{key:"render",value:function(){var pe=this,ee=this.props,te=ee.prefixCls,ce=ee.dropdownMenuColumnStyle;return L.createElement("div",null,this.getShowOptions().map(function(q,Q){return L.createElement("ul",{className:"".concat(te,"-menu"),key:Q,style:ce},q.map(function(V){return pe.getOption(V,Q)}))}))}}]),le}(L.Component);return Oe.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},Oe}(),w=t,E={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}}},f=E;function k(Oe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(ue){return typeof ue}:k=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},k(Oe)}function O(Oe,xe){if(Oe==null)return{};var ue=C(Oe,xe),le,re;if(Object.getOwnPropertySymbols){var pe=Object.getOwnPropertySymbols(Oe);for(re=0;re<pe.length;re++){if(le=pe[re],xe.indexOf(le)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(Oe,le))continue;ue[le]=Oe[le]}}return ue}function C(Oe,xe){if(Oe==null)return{};var ue={},le=Object.keys(Oe),re,pe;for(pe=0;pe<le.length;pe++){if(re=le[pe],xe.indexOf(re)>=0)continue;ue[re]=Oe[re]}return ue}function x(Oe){return I(Oe)||M(Oe)||_(Oe)||y()}function y(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _(Oe,xe){if(!Oe)return;if(typeof Oe=="string")return N(Oe,xe);var ue=Object.prototype.toString.call(Oe).slice(8,-1);if(ue==="Object"&&Oe.constructor&&(ue=Oe.constructor.name),ue==="Map"||ue==="Set")return Array.from(Oe);if(ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue))return N(Oe,xe)}function M(Oe){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(Oe))return Array.from(Oe)}function I(Oe){if(Array.isArray(Oe))return N(Oe)}function N(Oe,xe){(xe==null||xe>Oe.length)&&(xe=Oe.length);for(var ue=0,le=new Array(xe);ue<xe;ue++)le[ue]=Oe[ue];return le}function G(Oe,xe){if(!(Oe instanceof xe))throw new TypeError("Cannot call a class as a function")}function H(Oe,xe){for(var ue=0;ue<xe.length;ue++){var le=xe[ue];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(Oe,le.key,le)}}function B(Oe,xe,ue){return xe&&H(Oe.prototype,xe),ue&&H(Oe,ue),Oe}function K(Oe,xe){if(typeof xe!="function"&&xe!==null)throw new TypeError("Super expression must either be null or a function");Oe.prototype=Object.create(xe&&xe.prototype,{constructor:{value:Oe,writable:!0,configurable:!0}}),xe&&U(Oe,xe)}function U(Oe,xe){return U=Object.setPrototypeOf||function(le,re){return le.__proto__=re,le},U(Oe,xe)}function W(Oe){var xe=fe();return function(){var ue=me(Oe),le;if(xe){var re=me(this).constructor;le=Reflect.construct(ue,arguments,re)}else le=ue.apply(this,arguments);return X(this,le)}}function X(Oe,xe){return xe&&(k(xe)==="object"||typeof xe=="function")?xe:ne(Oe)}function ne(Oe){if(Oe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Oe}function fe(){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(Oe){return!1}}function me(Oe){return me=Object.setPrototypeOf?Object.getPrototypeOf:function(ue){return ue.__proto__||Object.getPrototypeOf(ue)},me(Oe)}var Ae=function(){var Oe=function(xe){K(le,xe);var ue=W(le);function le(re){var pe;G(this,le),pe=ue.call(this,re),pe.setPopupVisible=function(te){var ce=pe.state.value;"popupVisible"in pe.props||pe.setState({popupVisible:te}),te&&!pe.state.popupVisible&&pe.setState({activeValue:ce}),pe.props.onPopupVisibleChange(te)},pe.handleChange=function(te,ce,q){var Q=ce.visible;(q.type!=="keydown"||q.keyCode===p.a.ENTER)&&(pe.props.onChange(te.map(function(V){return V[pe.getFieldName("value")]}),te),pe.setPopupVisible(Q))},pe.handlePopupVisibleChange=function(te){pe.setPopupVisible(te)},pe.handleMenuSelect=function(te,ce,q){var Q=pe.trigger.getRootDomNode();Q&&Q.focus&&Q.focus();var V=pe.props,Z=V.changeOnSelect,be=V.loadData,ge=V.expandTrigger;if(!te||te.disabled)return;var Te=pe.state.activeValue;Te=Te.slice(0,ce+1),Te[ce]=te[pe.getFieldName("value")];var Je=pe.getActiveOptions(Te);if(te.isLeaf===!1&&!te[pe.getFieldName("children")]&&be){Z&&pe.handleChange(Je,{visible:!0},q),pe.setState({activeValue:Te}),be(Je);return}var rt={};!te[pe.getFieldName("children")]||!te[pe.getFieldName("children")].length?(pe.handleChange(Je,{visible:!1},q),rt.value=Te):Z&&(q.type==="click"||q.type==="keydown")&&(ge==="hover"?pe.handleChange(Je,{visible:!1},q):pe.handleChange(Je,{visible:!0},q),rt.value=Te),rt.activeValue=Te,("value"in pe.props||q.type==="keydown"&&q.keyCode!==p.a.ENTER)&&delete rt.value,pe.setState(rt)},pe.handleItemDoubleClick=function(){var te=pe.props.changeOnSelect;te&&pe.setPopupVisible(!1)},pe.handleKeyDown=function(te){var ce=pe.props.children;if(ce&&ce.props.onKeyDown){ce.props.onKeyDown(te);return}var q=x(pe.state.activeValue),Q=q.length-1<0?0:q.length-1,V=pe.getCurrentLevelOptions(),Z=V.map(function(Je){return Je[pe.getFieldName("value")]}).indexOf(q[Q]);if(te.keyCode!==p.a.DOWN&&te.keyCode!==p.a.UP&&te.keyCode!==p.a.LEFT&&te.keyCode!==p.a.RIGHT&&te.keyCode!==p.a.ENTER&&te.keyCode!==p.a.SPACE&&te.keyCode!==p.a.BACKSPACE&&te.keyCode!==p.a.ESC&&te.keyCode!==p.a.TAB)return;if(!pe.state.popupVisible&&te.keyCode!==p.a.BACKSPACE&&te.keyCode!==p.a.LEFT&&te.keyCode!==p.a.RIGHT&&te.keyCode!==p.a.ESC&&te.keyCode!==p.a.TAB){pe.setPopupVisible(!0);return}if(te.keyCode===p.a.DOWN||te.keyCode===p.a.UP){te.preventDefault();var be=Z;be!==-1?te.keyCode===p.a.DOWN?(be+=1,be=be>=V.length?0:be):(be-=1,be=be<0?V.length-1:be):be=0,q[Q]=V[be][pe.getFieldName("value")]}else if(te.keyCode===p.a.LEFT||te.keyCode===p.a.BACKSPACE)te.preventDefault(),q.splice(q.length-1,1);else if(te.keyCode===p.a.RIGHT)te.preventDefault(),V[Z]&&V[Z][pe.getFieldName("children")]&&q.push(V[Z][pe.getFieldName("children")][0][pe.getFieldName("value")]);else if(te.keyCode===p.a.ESC||te.keyCode===p.a.TAB){pe.setPopupVisible(!1);return}(!q||q.length===0)&&pe.setPopupVisible(!1);var ge=pe.getActiveOptions(q),Te=ge[ge.length-1];pe.handleMenuSelect(Te,ge.length-1,te),pe.props.onKeyDown&&pe.props.onKeyDown(te)},pe.saveTrigger=function(te){pe.trigger=te};var ee=[];return"value"in re?ee=re.value||[]:"defaultValue"in re&&(ee=re.defaultValue||[]),P()(!("filedNames"in re),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),pe.state={popupVisible:re.popupVisible,activeValue:ee,value:ee,prevProps:re},pe.defaultFieldNames={label:"label",value:"value",children:"children"},pe}return B(le,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(pe){var ee=this.defaultFieldNames,te=this.props,ce=te.fieldNames,q=te.filedNames;return"filedNames"in this.props?q[pe]||ee[pe]:ce[pe]||ee[pe]}},{key:"getFieldNames",value:function(){var pe=this.props,ee=pe.fieldNames,te=pe.filedNames;return"filedNames"in this.props?te:ee}},{key:"getCurrentLevelOptions",value:function(){var pe=this,ee=this.props.options,te=ee===void 0?[]:ee,ce=this.state.activeValue,q=ce===void 0?[]:ce,Q=S()(te,function(V,Z){return V[pe.getFieldName("value")]===q[Z]},{childrenKeyName:this.getFieldName("children")});return Q[Q.length-2]?Q[Q.length-2][this.getFieldName("children")]:x(te).filter(function(V){return!V.disabled})}},{key:"getActiveOptions",value:function(pe){var ee=this;return S()(this.props.options||[],function(te,ce){return te[ee.getFieldName("value")]===pe[ce]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var pe=this.props,ee=pe.prefixCls,te=pe.transitionName,ce=pe.popupClassName,q=pe.options,Q=q===void 0?[]:q,V=pe.disabled,Z=pe.builtinPlacements,be=pe.popupPlacement,ge=pe.children,Te=pe.dropdownRender,Je=O(pe,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),rt=L.createElement("div",null),nt="";Q&&Q.length>0?rt=L.createElement(w,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):nt=" ".concat(ee,"-menus-empty");var at=rt;return Te&&(at=Te(rt)),L.createElement(g.a,Object.assign({ref:this.saveTrigger},Je,{popupPlacement:be,builtinPlacements:Z,popupTransitionName:te,action:V?[]:["click"],popupVisible:V?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(ee,"-menus"),popupClassName:ce+nt,popup:at}),L.cloneElement(ge,{onKeyDown:this.handleKeyDown,tabIndex:V?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(pe,ee){var te=ee.prevProps,ce=te===void 0?{}:te,q={prevProps:pe};return"value"in pe&&!b(ce.value,pe.value)&&(q.value=pe.value||[],"loadData"in pe||(q.activeValue=pe.value||[])),"popupVisible"in pe&&(q.popupVisible=pe.popupVisible),q}}]),le}(L.Component);return Oe.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:f,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},Oe}(),De=Ae,ye=Y.a=De},S6kV:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){return L.mode.OFB=function(){var g=L.lib.BlockCipherMode.extend(),T=g.Encryptor=g.extend({processBlock:function(P,p){var v=this._cipher,S=v.blockSize,b=this._iv,d=this._keystream;b&&(d=this._keystream=b.slice(0),this._iv=void 0),v.encryptBlock(d,0);for(var l=0;l<S;l++)P[p+l]^=d[l]}});return g.Decryptor=T,g}(),L.mode.OFB})},"SA+Z":function(j,Y,D){var L=D("wTVA"),g=D("EbDI"),T=D("ZhPi"),P=D("wkBT");function p(v){return L(v)||g(v)||T(v)||P()}j.exports=p,j.exports.__esModule=!0,j.exports.default=j.exports},SJMd:function(j,Y){/**
|
|
|
* @license
|
|
|
* Copyright (C) 2006 Google Inc.
|
|
|
*
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
* You may obtain a copy of the License at
|
|
|
*
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
*
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
* See the License for the specific language governing permissions and
|
|
|
* limitations under the License.
|
|
|
*/var D,L,g,T=!1,P,p;window.PR_SHOULD_USE_CONTINUATION=!0;var v,S;(function(){var b=window,d=["break,continue,do,else,for,if,return,while"],l=[d,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],n=[l,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],c=[n,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],u=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],o=[n,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],h="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",m=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",r=[d,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],a=[d,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],t=[d,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],w=[c,o,u,m,s,r,a,t],E=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,f="str",k="kwd",O="com",C="typ",x="lit",y="pun",_="pln",M="tag",I="dec",N="src",G="atn",H="atv",B="nocode",K="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(q){for(var Q=0,V=!1,Z=!1,be=0,ge=q.length;be<ge;++be){var Te=q[be];if(Te.ignoreCase)Z=!0;else if(/[a-z]/i.test(Te.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){V=!0,Z=!1;break}}var Je={b:8,t:9,n:10,v:11,f:12,r:13};function rt(He){var Re=He.charCodeAt(0);if(Re!==92)return Re;var tt=He.charAt(1);return Re=Je[tt],Re||("0"<=tt&&tt<="7"?parseInt(He.substring(1),8):tt==="u"||tt==="x"?parseInt(He.substring(2),16):He.charCodeAt(1))}function nt(He){if(He<32)return(He<16?"\\x0":"\\x")+He.toString(16);var Re=String.fromCharCode(He);return Re==="\\"||Re==="-"||Re==="]"||Re==="^"?"\\"+Re:Re}function at(He){var Re=He.substring(1,He.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),tt=[],ft=Re[0]==="^",Qe=["["];ft&&Qe.push("^");for(var lt=ft?1:0,Ue=Re.length;lt<Ue;++lt){var Le=Re[lt];if(/\\[bdsw]/i.test(Le))Qe.push(Le);else{var Ie=rt(Le),Ce;lt+2<Ue&&Re[lt+1]==="-"?(Ce=rt(Re[lt+2]),lt+=2):Ce=Ie,tt.push([Ie,Ce]),Ce<65||Ie>122||(Ce<65||Ie>90||tt.push([Math.max(65,Ie)|32,Math.min(Ce,90)|32]),Ce<97||Ie>122||tt.push([Math.max(97,Ie)&~32,Math.min(Ce,122)&~32]))}}tt.sort(function(et,$e){return et[0]-$e[0]||$e[1]-et[1]});for(var Se=[],ke=[],lt=0;lt<tt.length;++lt){var Ne=tt[lt];Ne[0]<=ke[1]+1?ke[1]=Math.max(ke[1],Ne[1]):Se.push(ke=Ne)}for(var lt=0;lt<Se.length;++lt){var Ne=Se[lt];Qe.push(nt(Ne[0])),Ne[1]>Ne[0]&&(Ne[1]+1>Ne[0]&&Qe.push("-"),Qe.push(nt(Ne[1])))}return Qe.push("]"),Qe.join("")}function ct(He){for(var Re=He.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),tt=Re.length,ft=[],Qe=0,lt=0;Qe<tt;++Qe){var Ue=Re[Qe];if(Ue==="(")++lt;else if(Ue.charAt(0)==="\\"){var Le=+Ue.substring(1);Le&&(Le<=lt?ft[Le]=-1:Re[Qe]=nt(Le))}}for(var Qe=1;Qe<ft.length;++Qe)ft[Qe]===-1&&(ft[Qe]=++Q);for(var Qe=0,lt=0;Qe<tt;++Qe){var Ue=Re[Qe];if(Ue==="(")++lt,ft[lt]||(Re[Qe]="(?:");else if(Ue.charAt(0)==="\\"){var Le=+Ue.substring(1);Le&&Le<=lt&&(Re[Qe]="\\"+ft[Le])}}for(var Qe=0;Qe<tt;++Qe)Re[Qe]==="^"&&Re[Qe+1]!=="^"&&(Re[Qe]="");if(He.ignoreCase&&V)for(var Qe=0;Qe<tt;++Qe){var Ue=Re[Qe],Ie=Ue.charAt(0);Ue.length>=2&&Ie==="["?Re[Qe]=at(Ue):Ie!=="\\"&&(Re[Qe]=Ue.replace(/[a-zA-Z]/g,function(ke){var Ne=ke.charCodeAt(0);return"["+String.fromCharCode(Ne&~32,Ne|32)+"]"}))}return Re.join("")}for(var ht=[],be=0,ge=q.length;be<ge;++be){var Te=q[be];if(Te.global||Te.multiline)throw new Error(""+Te);ht.push("(?:"+ct(Te)+")")}return new RegExp(ht.join("|"),Z?"gi":"g")}function W(q,Q){var V=/(?:^|\s)nocode(?:\s|$)/,Z=[],be=0,ge=[],Te=0;function Je(rt){var nt=rt.nodeType;if(nt==1){if(V.test(rt.className))return;for(var at=rt.firstChild;at;at=at.nextSibling)Je(at);var ct=rt.nodeName.toLowerCase();(ct==="br"||ct==="li")&&(Z[Te]=`
|
|
|
`,ge[Te<<1]=be++,ge[Te++<<1|1]=rt)}else if(nt==3||nt==4){var ht=rt.nodeValue;ht.length&&(Q?ht=ht.replace(/\r\n?/g,`
|
|
|
`):ht=ht.replace(/[ \t\r\n]+/g," "),Z[Te]=ht,ge[Te<<1]=be,be+=ht.length,ge[Te++<<1|1]=rt)}}return Je(q),{sourceCode:Z.join("").replace(/\n$/,""),spans:ge}}function X(q,Q,V,Z,be){if(!V)return;var ge={sourceNode:q,pre:1,langExtension:null,numberLines:null,sourceCode:V,spans:null,basePos:Q,decorations:null};Z(ge),be.push.apply(be,ge.decorations)}var ne=/\S/;function fe(q){for(var Q=void 0,V=q.firstChild;V;V=V.nextSibling){var Z=V.nodeType;Q=Z===1?Q?q:V:Z===3&&ne.test(V.nodeValue)?q:Q}return Q===q?void 0:Q}function me(q,Q){var V={},Z;(function(){for(var Te=q.concat(Q),Je=[],rt={},nt=0,at=Te.length;nt<at;++nt){var ct=Te[nt],ht=ct[3];if(ht)for(var He=ht.length;--He>=0;)V[ht.charAt(He)]=ct;var Re=ct[1],tt=""+Re;rt.hasOwnProperty(tt)||(Je.push(Re),rt[tt]=null)}Je.push(/[\0-\uffff]/),Z=U(Je)})();var be=Q.length,ge=function(Te){for(var Je=Te.sourceCode,rt=Te.basePos,nt=Te.sourceNode,at=[rt,_],ct=0,ht=Je.match(Z)||[],He={},Re=0,tt=ht.length;Re<tt;++Re){var ft=ht[Re],Qe=He[ft],lt=void 0,Ue;if(typeof Qe=="string")Ue=!1;else{var Le=V[ft.charAt(0)];if(Le)lt=ft.match(Le[1]),Qe=Le[0];else{for(var Ie=0;Ie<be;++Ie)if(Le=Q[Ie],lt=ft.match(Le[1]),lt){Qe=Le[0];break}lt||(Qe=_)}Ue=Qe.length>=5&&Qe.substring(0,5)==="lang-",Ue&&!(lt&&typeof lt[1]=="string")&&(Ue=!1,Qe=N),Ue||(He[ft]=Qe)}var Ce=ct;if(ct+=ft.length,!Ue)at.push(rt+Ce,Qe);else{var Se=lt[1],ke=ft.indexOf(Se),Ne=ke+Se.length;lt[2]&&(Ne=ft.length-lt[2].length,ke=Ne-Se.length);var et=Qe.substring(5);X(nt,rt+Ce,ft.substring(0,ke),ge,at),X(nt,rt+Ce+ke,Se,le(et,Se),at),X(nt,rt+Ce+Ne,ft.substring(Ne),ge,at)}}Te.decorations=at};return ge}function Ae(q){var Q=[],V=[];q.tripleQuotedStrings?Q.push([f,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):q.multiLineStrings?Q.push([f,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Q.push([f,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),q.verbatimStrings&&V.push([f,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Z=q.hashComments;Z&&(q.cStyleComments?(Z>1?Q.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Q.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),V.push([f,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Q.push([O,/^#[^\r\n]*/,null,"#"])),q.cStyleComments&&(V.push([O,/^\/\/[^\r\n]*/,null]),V.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var be=q.regexLiterals;if(be){var ge=be>1?"":`
|
|
|
\r`,Te=ge?".":"[\\S\\s]",Je="/(?=[^/*"+ge+"])(?:[^/\\x5B\\x5C"+ge+"]|\\x5C"+Te+"|\\x5B(?:[^\\x5C\\x5D"+ge+"]|\\x5C"+Te+")*(?:\\x5D|$))+/";V.push(["lang-regex",RegExp("^"+K+"("+Je+")")])}var rt=q.types;rt&&V.push([C,rt]);var nt=(""+q.keywords).replace(/^ | $/g,"");nt.length&&V.push([k,new RegExp("^(?:"+nt.replace(/[\s,]+/g,"|")+")\\b"),null]),Q.push([_,/^\s+/,null,` \r
|
|
|
\xA0`]);var at="^.[^\\s\\w.$@'\"`/\\\\]*";return q.regexLiterals&&(at+="(?!s*/)"),V.push([x,/^@[a-z_$][a-z_$@0-9]*/i,null],[C,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[_,/^[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"],[_,/^\\[\s\S]?/,null],[y,new RegExp(at),null]),me(Q,V)}var De=Ae({keywords:w,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ye(q,Q,V){for(var Z=/(?:^|\s)nocode(?:\s|$)/,be=/\r\n?|\n/,ge=q.ownerDocument,Te=ge.createElement("li");q.firstChild;)Te.appendChild(q.firstChild);var Je=[Te];function rt(Re){var tt=Re.nodeType;if(tt==1&&!Z.test(Re.className))if(Re.nodeName==="br")nt(Re),Re.parentNode&&Re.parentNode.removeChild(Re);else for(var ft=Re.firstChild;ft;ft=ft.nextSibling)rt(ft);else if((tt==3||tt==4)&&V){var Qe=Re.nodeValue,lt=Qe.match(be);if(lt){var Ue=Qe.substring(0,lt.index);Re.nodeValue=Ue;var Le=Qe.substring(lt.index+lt[0].length);if(Le){var Ie=Re.parentNode;Ie.insertBefore(ge.createTextNode(Le),Re.nextSibling)}nt(Re),Ue||Re.parentNode.removeChild(Re)}}}function nt(Re){for(;!Re.nextSibling;)if(Re=Re.parentNode,!Re)return;function tt(lt,Ue){var Le=Ue?lt.cloneNode(!1):lt,Ie=lt.parentNode;if(Ie){var Ce=tt(Ie,1),Se=lt.nextSibling;Ce.appendChild(Le);for(var ke=Se;ke;ke=Se)Se=ke.nextSibling,Ce.appendChild(ke)}return Le}for(var ft=tt(Re.nextSibling,0),Qe;(Qe=ft.parentNode)&&Qe.nodeType===1;)ft=Qe;Je.push(ft)}for(var at=0;at<Je.length;++at)rt(Je[at]);Q===(Q|0)&&Je[0].setAttribute("value",Q);var ct=ge.createElement("ol");ct.className="linenums";for(var ht=Math.max(0,Q-1|0)||0,at=0,He=Je.length;at<He;++at)Te=Je[at],Te.className="L"+(at+ht)%10,Te.firstChild||Te.appendChild(ge.createTextNode("\xA0")),ct.appendChild(Te);q.appendChild(ct)}function Oe(q){var Q=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Q=Q&&+Q[1]<=8;var V=/\n/g,Z=q.sourceCode,be=Z.length,ge=0,Te=q.spans,Je=Te.length,rt=0,nt=q.decorations,at=nt.length,ct=0;nt[at]=be;var ht,He;for(He=ht=0;He<at;)nt[He]!==nt[He+2]?(nt[ht++]=nt[He++],nt[ht++]=nt[He++]):He+=2;for(at=ht,He=ht=0;He<at;){for(var Re=nt[He],tt=nt[He+1],ft=He+2;ft+2<=at&&nt[ft+1]===tt;)ft+=2;nt[ht++]=Re,nt[ht++]=tt,He=ft}at=nt.length=ht;var Qe=q.sourceNode,lt="";Qe&&(lt=Qe.style.display,Qe.style.display="none");try{for(var Ue=null;rt<Je;){var Le=Te[rt],Ie=Te[rt+2]||be,Ce=nt[ct+2]||be,ft=Math.min(Ie,Ce),Se=Te[rt+1],ke;if(Se.nodeType!==1&&(ke=Z.substring(ge,ft))){Q&&(ke=ke.replace(V,"\r")),Se.nodeValue=ke;var Ne=Se.ownerDocument,et=Ne.createElement("span");et.className=nt[ct+1];var $e=Se.parentNode;$e.replaceChild(et,Se),et.appendChild(Se),ge<Ie&&(Te[rt+1]=Se=Ne.createTextNode(Z.substring(ft,Ie)),$e.insertBefore(Se,et.nextSibling))}ge=ft,ge>=Ie&&(rt+=2),ge>=Ce&&(ct+=2)}}finally{Qe&&(Qe.style.display=lt)}}var xe={};function ue(q,Q){for(var V=Q.length;--V>=0;){var Z=Q[V];xe.hasOwnProperty(Z)?b.console&&console.warn("cannot override language handler %s",Z):xe[Z]=q}}function le(q,Q){return q&&xe.hasOwnProperty(q)||(q=/^\s*</.test(Q)?"default-markup":"default-code"),xe[q]}ue(De,["default-code"]),ue(me([],[[_,/^[^<?]+/],[I,/^<!\w[^>]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[y,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),ue(me([[_,/^[\s]+/,null,` \r
|
|
|
`],[H,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[M,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[G,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[y,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),ue(me([],[[H,/^[\s\S]+/]]),["uq.val"]),ue(Ae({keywords:c,hashComments:!0,cStyleComments:!0,types:E}),["c","cc","cpp","cxx","cyc","m"]),ue(Ae({keywords:"null,true,false"}),["json"]),ue(Ae({keywords:o,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:E}),["cs"]),ue(Ae({keywords:u,cStyleComments:!0}),["java"]),ue(Ae({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ue(Ae({keywords:r,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ue(Ae({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ue(Ae({keywords:a,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ue(Ae({keywords:m,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ue(Ae({keywords:h,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ue(me([],[[f,/^[\s\S]+/]]),["regex"]);function re(q){var Q=q.langExtension;try{var V=W(q.sourceNode,q.pre),Z=V.sourceCode;q.sourceCode=Z,q.spans=V.spans,q.basePos=0,le(Q,Z)(q),Oe(q)}catch(be){b.console&&console.log(be&&be.stack||be)}}function pe(q,Q,V){var Z=V||!1,be=Q||null,ge=document.createElement("div");ge.innerHTML="<pre>"+q+"</pre>",ge=ge.firstChild,Z&&ye(ge,Z,!0);var Te={langExtension:be,numberLines:Z,sourceNode:ge,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return re(Te),ge.innerHTML}function ee(q,Q){var V=Q||document.body,Z=V.ownerDocument||document;function be(Le){return V.getElementsByTagName(Le)}for(var ge=[be("pre"),be("code"),be("xmp")],Te=[],Je=0;Je<ge.length;++Je)for(var rt=0,nt=ge[Je].length;rt<nt;++rt)Te.push(ge[Je][rt]);ge=null;var at=Date;at.now||(at={now:function(){return+new Date}});var ct=0,ht=/\blang(?:uage)?-([\w.]+)(?!\S)/,He=/\bprettyprint\b/,Re=/\bprettyprinted\b/,tt=/pre|xmp/i,ft=/^code$/i,Qe=/^(?:pre|code|xmp)$/i,lt={};function Ue(){for(var Le=b.PR_SHOULD_USE_CONTINUATION?at.now()+250:Infinity;ct<Te.length&&at.now()<Le;ct++){for(var Ie=Te[ct],Ce=lt,Se=Ie;Se=Se.previousSibling;){var ke=Se.nodeType,Ne=(ke===7||ke===8)&&Se.nodeValue;if(Ne?!/^\??prettify\b/.test(Ne):ke!==3||/\S/.test(Se.nodeValue))break;if(Ne){Ce={},Ne.replace(/\b(\w+)=([\w:.%+-]+)/g,function(un,Ar,vn){Ce[Ar]=vn});break}}var et=Ie.className;if((Ce!==lt||He.test(et))&&!Re.test(et)){for(var $e=!1,bt=Ie.parentNode;bt;bt=bt.parentNode){var gt=bt.tagName;if(Qe.test(gt)&&bt.className&&He.test(bt.className)){$e=!0;break}}if(!$e){Ie.className+=" prettyprinted";var Ut=Ce.lang;if(!Ut){Ut=et.match(ht);var Nt;!Ut&&(Nt=fe(Ie))&&ft.test(Nt.tagName)&&(Ut=Nt.className.match(ht)),Ut&&(Ut=Ut[1])}var hr;if(tt.test(Ie.tagName))hr=1;else{var mr=Ie.currentStyle,St=Z.defaultView,Yr=mr?mr.whiteSpace:St&&St.getComputedStyle?St.getComputedStyle(Ie,null).getPropertyValue("white-space"):0;hr=Yr&&Yr.substring(0,3)==="pre"}var Jr=Ce.linenums;(Jr=Jr==="true"||+Jr)||(Jr=et.match(/\blinenums\b(?::(\d+))?/),Jr=Jr?Jr[1]&&Jr[1].length?+Jr[1]:!0:!1),Jr&&ye(Ie,Jr,hr);var Hr={langExtension:Ut,sourceNode:Ie,numberLines:Jr,pre:hr,sourceCode:null,basePos:null,spans:null,decorations:null};re(Hr)}}}ct<Te.length?b.setTimeout(Ue,250):typeof q=="function"&&q()}Ue()}var te=b.PR={createSimpleLexer:me,registerLangHandler:ue,sourceDecorator:Ae,PR_ATTRIB_NAME:G,PR_ATTRIB_VALUE:H,PR_COMMENT:O,PR_DECLARATION:I,PR_KEYWORD:k,PR_LITERAL:x,PR_NOCODE:B,PR_PLAIN:_,PR_PUNCTUATION:y,PR_SOURCE:N,PR_STRING:f,PR_TAG:M,PR_TYPE:C,prettyPrintOne:T?b.prettyPrintOne=pe:v=pe,prettyPrint:S=T?b.prettyPrint=ee:S=ee},ce=b.define;typeof ce=="function"&&ce.amd&&ce("google-code-prettify",[],function(){return te})})()},Sjjz:function(j,Y,D){j.exports={flexRow:"flexRow___1u_bL",flexColumn:"flexColumn___1kaUk",formWrap:"formWrap___31wys",example:"example___Cqoob",footerWrap:"footerWrap___2syNI"}},T8No:function(j,Y,D){"use strict";D.d(Y,"a",function(){return P}),D.d(Y,"b",function(){return u}),D.d(Y,"d",function(){return o}),D.d(Y,"c",function(){return h}),D.d(Y,"e",function(){return m});var L=D("N0LK"),g=D("Cg/j"),T=function(){var s=function(r,a){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,w){t.__proto__=w}||function(t,w){for(var E in w)w.hasOwnProperty(E)&&(t[E]=w[E])},s(r,a)};return function(r,a){s(r,a);function t(){this.constructor=r}r.prototype=a===null?Object.create(a):(t.prototype=a.prototype,new t)}}(),P=function(){function s(){}return s.has=function(r){return v.create(r)},s.equals=function(r,a){return S.create(r,a)},s.regex=function(r,a){return l.create(r,a)},s.not=function(r){return d.create(r)},s.and=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return c.create(r)},s.or=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return u.create(r)},s.deserialize=function(r,a){return a===void 0&&(a=!1),r?this._deserializeOrExpression(r,a):void 0},s._deserializeOrExpression=function(r,a){var t=this,w=r.split("||");return u.create(w.map(function(E){return t._deserializeAndExpression(E,a)}))},s._deserializeAndExpression=function(r,a){var t=this,w=r.split("&&");return c.create(w.map(function(E){return t._deserializeOne(E,a)}))},s._deserializeOne=function(r,a){if(r=r.trim(),r.indexOf("!=")>=0){var t=r.split("!=");return b.create(t[0].trim(),this._deserializeValue(t[1],a))}if(r.indexOf("==")>=0){var t=r.split("==");return S.create(t[0].trim(),this._deserializeValue(t[1],a))}if(r.indexOf("=~")>=0){var t=r.split("=~");return l.create(t[0].trim(),this._deserializeRegexValue(t[1],a))}return/^\!\s*/.test(r)?d.create(r.substr(1).trim()):v.create(r)},s._deserializeValue=function(r,a){if(r=r.trim(),r==="true")return!0;if(r==="false")return!1;var t=/^'([^']*)'$/.exec(r);return t?t[1].trim():r},s._deserializeRegexValue=function(r,a){if(Object(L.x)(r)){if(a)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}var t=r.indexOf("/"),w=r.lastIndexOf("/");if(t===w||t<0){if(a)throw new Error("bad regexp-value '"+r+"', missing /-enclosure");return console.warn("bad regexp-value '"+r+"', missing /-enclosure"),null}var E=r.slice(t+1,w),f=r[w+1]==="i"?"i":"";try{return new RegExp(E,f)}catch(k){if(a)throw new Error("bad regexp-value '"+r+"', parse error: "+k);return console.warn("bad regexp-value '"+r+"', parse error: "+k),null}},s}();function p(s,r){var a=s.getType(),t=r.getType();if(a!==t)return a-t;switch(a){case 1:return s.cmp(r);case 2:return s.cmp(r);case 3:return s.cmp(r);case 4:return s.cmp(r);case 6:return s.cmp(r);case 7:return s.cmp(r);case 5:return s.cmp(r);default:throw new Error("Unknown ContextKeyExpr!")}}var v=function(){function s(r){this.key=r}return s.create=function(r){return new s(r)},s.prototype.getType=function(){return 1},s.prototype.cmp=function(r){return this.key<r.key?-1:this.key>r.key?1:0},s.prototype.equals=function(r){return r instanceof s?this.key===r.key:!1},s.prototype.evaluate=function(r){return!!r.getValue(this.key)},s.prototype.keys=function(){return[this.key]},s.prototype.negate=function(){return d.create(this.key)},s}(),S=function(){function s(r,a){this.key=r,this.value=a}return s.create=function(r,a){return typeof a=="boolean"?a?v.create(r):d.create(r):new s(r,a)},s.prototype.getType=function(){return 3},s.prototype.cmp=function(r){return this.key<r.key?-1:this.key>r.key?1:this.value<r.value?-1:this.value>r.value?1:0},s.prototype.equals=function(r){return r instanceof s?this.key===r.key&&this.value===r.value:!1},s.prototype.evaluate=function(r){return r.getValue(this.key)==this.value},s.prototype.keys=function(){return[this.key]},s.prototype.negate=function(){return b.create(this.key,this.value)},s}(),b=function(){function s(r,a){this.key=r,this.value=a}return s.create=function(r,a){return typeof a=="boolean"?a?d.create(r):v.create(r):new s(r,a)},s.prototype.getType=function(){return 4},s.prototype.cmp=function(r){return this.key<r.key?-1:this.key>r.key?1:this.value<r.value?-1:this.value>r.value?1:0},s.prototype.equals=function(r){return r instanceof s?this.key===r.key&&this.value===r.value:!1},s.prototype.evaluate=function(r){return r.getValue(this.key)!=this.value},s.prototype.keys=function(){return[this.key]},s.prototype.negate=function(){return S.create(this.key,this.value)},s}(),d=function(){function s(r){this.key=r}return s.create=function(r){return new s(r)},s.prototype.getType=function(){return 2},s.prototype.cmp=function(r){return this.key<r.key?-1:this.key>r.key?1:0},s.prototype.equals=function(r){return r instanceof s?this.key===r.key:!1},s.prototype.evaluate=function(r){return!r.getValue(this.key)},s.prototype.keys=function(){return[this.key]},s.prototype.negate=function(){return v.create(this.key)},s}(),l=function(){function s(r,a){this.key=r,this.regexp=a}return s.create=function(r,a){return new s(r,a)},s.prototype.getType=function(){return 6},s.prototype.cmp=function(r){if(this.key<r.key)return-1;if(this.key>r.key)return 1;var a=this.regexp?this.regexp.source:"",t=r.regexp?r.regexp.source:"";return a<t?-1:a>t?1:0},s.prototype.equals=function(r){if(r instanceof s){var a=this.regexp?this.regexp.source:"",t=r.regexp?r.regexp.source:"";return this.key===r.key&&a===t}return!1},s.prototype.evaluate=function(r){var a=r.getValue(this.key);return this.regexp?this.regexp.test(a):!1},s.prototype.keys=function(){return[this.key]},s.prototype.negate=function(){return n.create(this)},s}(),n=function(){function s(r){this._actual=r}return s.create=function(r){return new s(r)},s.prototype.getType=function(){return 7},s.prototype.cmp=function(r){return this._actual.cmp(r._actual)},s.prototype.equals=function(r){return r instanceof s?this._actual.equals(r._actual):!1},s.prototype.evaluate=function(r){return!this._actual.evaluate(r)},s.prototype.keys=function(){return this._actual.keys()},s.prototype.negate=function(){return this._actual},s}(),c=function(){function s(r){this.expr=r}return s.create=function(r){var a=s._normalizeArr(r);return a.length===0?void 0:a.length===1?a[0]:new s(a)},s.prototype.getType=function(){return 5},s.prototype.cmp=function(r){if(this.expr.length<r.expr.length)return-1;if(this.expr.length>r.expr.length)return 1;for(var a=0,t=this.expr.length;a<t;a++){var w=p(this.expr[a],r.expr[a]);if(w!==0)return w}return 0},s.prototype.equals=function(r){if(r instanceof s){if(this.expr.length!==r.expr.length)return!1;for(var a=0,t=this.expr.length;a<t;a++)if(!this.expr[a].equals(r.expr[a]))return!1;return!0}return!1},s.prototype.evaluate=function(r){for(var a=0,t=this.expr.length;a<t;a++)if(!this.expr[a].evaluate(r))return!1;return!0},s._normalizeArr=function(r){var a=[];if(r){for(var t=0,w=r.length;t<w;t++){var E=r[t];if(!E)continue;if(E instanceof s){a=a.concat(E.expr);continue}if(E instanceof u)throw new Error('It is not allowed to have an or expression here due to lack of parens! For example "a && (b||c)" is not supported, use "(a&&b) || (a&&c)" instead.');a.push(E)}a.sort(p)}return a},s.prototype.keys=function(){for(var r=[],a=0,t=this.expr;a<t.length;a++){var w=t[a];r.push.apply(r,w.keys())}return r},s.prototype.negate=function(){for(var r=[],a=0,t=this.expr;a<t.length;a++){var w=t[a];r.push(w.negate())}return u.create(r)},s}(),u=function(){function s(r){this.expr=r}return s.create=function(r){var a=s._normalizeArr(r);return a.length===0?void 0:a.length===1?a[0]:new s(a)},s.prototype.getType=function(){return 8},s.prototype.equals=function(r){if(r instanceof s){if(this.expr.length!==r.expr.length)return!1;for(var a=0,t=this.expr.length;a<t;a++)if(!this.expr[a].equals(r.expr[a]))return!1;return!0}return!1},s.prototype.evaluate=function(r){for(var a=0,t=this.expr.length;a<t;a++)if(this.expr[a].evaluate(r))return!0;return!1},s._normalizeArr=function(r){var a=[];if(r){for(var t=0,w=r.length;t<w;t++){var E=r[t];if(!E)continue;if(E instanceof s){a=a.concat(E.expr);continue}a.push(E)}a.sort(p)}return a},s.prototype.keys=function(){for(var r=[],a=0,t=this.expr;a<t.length;a++){var w=t[a];r.push.apply(r,w.keys())}return r},s.prototype.negate=function(){for(var r=[],a=0,t=this.expr;a<t.length;a++){var w=t[a];r.push(w.negate())}for(var E=function(N){return N instanceof s?N.expr:[N]};r.length>1;){for(var f=r.shift(),k=r.shift(),O=[],C=0,x=E(f);C<x.length;C++)for(var y=x[C],_=0,M=E(k);_<M.length;_++){var I=M[_];O.push(P.and(y,I))}r.unshift(P.or.apply(P,O))}return r[0]},s}(),o=function(s){T(r,s);function r(a,t){var w=s.call(this,a)||this;return w._defaultValue=t,w}return r.prototype.bindTo=function(a){return a.createKey(this.key,this._defaultValue)},r.prototype.getValue=function(a){return a.getContextKeyValue(this.key)},r.prototype.toNegated=function(){return P.not(this.key)},r}(v),h=Object(g.c)("contextKeyService"),m="setContext"},UfjD:function(j,Y,D){"use strict";var L=D("2qtc"),g=D("kLXV"),T=D("5NDa"),P=D("5rEg"),p=D("miYZ"),v=D("tsqr"),S=D("tJVT"),b=D("q1tI"),d=D.n(b),l=D("4i/N");function n(c){var u=c.isjoin,o=c.setJoin,h=c.JoinTeams,m=Object(b.useState)(""),s=Object(S.a)(m,2),r=s[0],a=s[1];return d.a.createElement(g.a,{centered:!0,title:d.a.createElement("div",{style:{alignItems:"center",display:"flex"}},d.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u52A0\u5165\u6218\u961F"),d.a.createElement(l.a,{onClick:function(){return o(!1)},style:{cursor:"porint"}})),visible:u,closable:!1,destroyOnClose:!0,onOk:function(){if(!r){v.b.info("\u9080\u8BF7\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}h(r)},onCancel:function(){return o(!1)}},d.a.createElement("div",null,d.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px",display:"flex",alignItems:"center"}},d.a.createElement("span",{style:{flex:"none"}},"\u9080\u8BF7\u7801\uFF1A")," ",d.a.createElement(P.a,{placeholder:"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801",value:r,maxLength:60,addonAfter:String(r&&r.length||0)+"/60",onChange:function(w){return a(w.target.value)}}))))}Y.a=n},"VrN/":function(j,Y,D){(function(L,g){j.exports=g()})(this,function(){"use strict";var L=navigator.userAgent,g=navigator.platform,T=/gecko\/\d/i.test(L),P=/MSIE \d/.test(L),p=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(L),v=/Edge\/(\d+)/.exec(L),S=P||p||v,b=S&&(P?document.documentMode||6:+(v||p)[1]),d=!v&&/WebKit\//.test(L),l=d&&/Qt\/\d+\.\d+/.test(L),n=!v&&/Chrome\//.test(L),c=/Opera\//.test(L),u=/Apple Computer/.test(navigator.vendor),o=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(L),h=/PhantomJS/.test(L),m=!v&&/AppleWebKit/.test(L)&&/Mobile\/\w+/.test(L),s=/Android/.test(L),r=m||s||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(L),a=m||/Mac/.test(g),t=/\bCrOS\b/.test(L),w=/win/i.test(g),E=c&&L.match(/Version\/(\d*\.\d*)/);E&&(E=Number(E[1])),E&&E>=15&&(c=!1,d=!0);var f=a&&(l||c&&(E==null||E<12.11)),k=T||S&&b>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var C=function(e,i){var R=e.className,A=O(i).exec(R);if(A){var F=R.slice(A.index+A[0].length);e.className=R.slice(0,A.index)+(F?A[1]+F:"")}};function x(e){for(var i=e.childNodes.length;i>0;--i)e.removeChild(e.firstChild);return e}function y(e,i){return x(e).appendChild(i)}function _(e,i,R,A){var F=document.createElement(e);if(R&&(F.className=R),A&&(F.style.cssText=A),typeof i=="string")F.appendChild(document.createTextNode(i));else if(i)for(var J=0;J<i.length;++J)F.appendChild(i[J]);return F}function M(e,i,R,A){var F=_(e,i,R,A);return F.setAttribute("role","presentation"),F}var I;document.createRange?I=function(e,i,R,A){var F=document.createRange();return F.setEnd(A||e,R),F.setStart(e,i),F}:I=function(e,i,R){var A=document.body.createTextRange();try{A.moveToElementText(e.parentNode)}catch(F){return A}return A.collapse(!0),A.moveEnd("character",R),A.moveStart("character",i),A};function N(e,i){if(i.nodeType==3&&(i=i.parentNode),e.contains)return e.contains(i);do if(i.nodeType==11&&(i=i.host),i==e)return!0;while(i=i.parentNode)}function G(){var e;try{e=document.activeElement}catch(i){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function H(e,i){var R=e.className;O(i).test(R)||(e.className+=(R?" ":"")+i)}function B(e,i){for(var R=e.split(" "),A=0;A<R.length;A++)R[A]&&!O(R[A]).test(i)&&(i+=" "+R[A]);return i}var K=function(e){e.select()};m?K=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:S&&(K=function(e){try{e.select()}catch(i){}});function U(e){var i=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,i)}}function W(e,i,R){i||(i={});for(var A in e)e.hasOwnProperty(A)&&(R!==!1||!i.hasOwnProperty(A))&&(i[A]=e[A]);return i}function X(e,i,R,A,F){i==null&&(i=e.search(/[^\s\u00a0]/),i==-1&&(i=e.length));for(var J=A||0,oe=F||0;;){var he=e.indexOf(" ",J);if(he<0||he>=i)return oe+(i-J);oe+=he-J,oe+=R-oe%R,J=he+1}}var ne=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};ne.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ne.prototype.set=function(e,i){this.f=i;var R=+new Date+e;(!this.id||R<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=R)};function fe(e,i){for(var R=0;R<e.length;++R)if(e[R]==i)return R;return-1}var me=50,Ae={toString:function(){return"CodeMirror.Pass"}},De={scroll:!1},ye={origin:"*mouse"},Oe={origin:"+move"};function xe(e,i,R){for(var A=0,F=0;;){var J=e.indexOf(" ",A);J==-1&&(J=e.length);var oe=J-A;if(J==e.length||F+oe>=i)return A+Math.min(oe,i-F);if(F+=J-A,F+=R-F%R,A=J+1,F>=i)return A}}var ue=[""];function le(e){for(;ue.length<=e;)ue.push(re(ue)+" ");return ue[e]}function re(e){return e[e.length-1]}function pe(e,i){for(var R=[],A=0;A<e.length;A++)R[A]=i(e[A],A);return R}function ee(e,i,R){for(var A=0,F=R(i);A<e.length&&R(e[A])<=F;)A++;e.splice(A,0,i)}function te(){}function ce(e,i){var R;return Object.create?R=Object.create(e):(te.prototype=e,R=new te),i&&W(i,R),R}var q=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Q(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||q.test(e))}function V(e,i){return i?i.source.indexOf("\\w")>-1&&Q(e)?!0:i.test(e):Q(e)}function Z(e){for(var i in e)if(e.hasOwnProperty(i)&&e[i])return!1;return!0}var be=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ge(e){return e.charCodeAt(0)>=768&&be.test(e)}function Te(e,i,R){for(;(R<0?i>0:i<e.length)&&ge(e.charAt(i));)i+=R;return i}function Je(e,i,R){for(var A=i>R?-1:1;;){if(i==R)return i;var F=(i+R)/2,J=A<0?Math.ceil(F):Math.floor(F);if(J==i)return e(J)?i:R;e(J)?R=J:i=J+A}}function rt(e,i,R,A){if(!e)return A(i,R,"ltr",0);for(var F=!1,J=0;J<e.length;++J){var oe=e[J];(oe.from<R&&oe.to>i||i==R&&oe.to==i)&&(A(Math.max(oe.from,i),Math.min(oe.to,R),oe.level==1?"rtl":"ltr",J),F=!0)}F||A(i,R,"ltr")}var nt=null;function at(e,i,R){var A;nt=null;for(var F=0;F<e.length;++F){var J=e[F];if(J.from<i&&J.to>i)return F;J.to==i&&(J.from!=J.to&&R=="before"?A=F:nt=F),J.from==i&&(J.from!=J.to&&R!="before"?A=F:nt=F)}return A!=null?A:nt}var ct=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function R(we){return we<=247?e.charAt(we):1424<=we&&we<=1524?"R":1536<=we&&we<=1785?i.charAt(we-1536):1774<=we&&we<=2220?"r":8192<=we&&we<=8203?"w":we==8204?"b":"L"}var A=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,F=/[stwN]/,J=/[LRr]/,oe=/[Lb1n]/,he=/[1n]/;function ve(we,Be,Xe){this.level=we,this.from=Be,this.to=Xe}return function(we,Be){var Xe=Be=="ltr"?"L":"R";if(we.length==0||Be=="ltr"&&!A.test(we))return!1;for(var ut=we.length,ot=[],Ot=0;Ot<ut;++Ot)ot.push(R(we.charCodeAt(Ot)));for(var Bt=0,Qt=Xe;Bt<ut;++Bt){var ir=ot[Bt];ir=="m"?ot[Bt]=Qt:Qt=ir}for(var _r=0,ar=Xe;_r<ut;++_r){var Rr=ot[_r];Rr=="1"&&ar=="r"?ot[_r]="n":J.test(Rr)&&(ar=Rr,Rr=="r"&&(ot[_r]="R"))}for(var qr=1,Gr=ot[0];qr<ut-1;++qr){var wn=ot[qr];wn=="+"&&Gr=="1"&&ot[qr+1]=="1"?ot[qr]="1":wn==","&&Gr==ot[qr+1]&&(Gr=="1"||Gr=="n")&&(ot[qr]=Gr),Gr=wn}for(var Zn=0;Zn<ut;++Zn){var Ai=ot[Zn];if(Ai==",")ot[Zn]="N";else if(Ai=="%"){var oi=void 0;for(oi=Zn+1;oi<ut&&ot[oi]=="%";++oi);for(var ea=Zn&&ot[Zn-1]=="!"||oi<ut&&ot[oi]=="1"?"1":"N",Ji=Zn;Ji<oi;++Ji)ot[Ji]=ea;Zn=oi-1}}for(var yi=0,Qi=Xe;yi<ut;++yi){var ki=ot[yi];Qi=="L"&&ki=="1"?ot[yi]="L":J.test(ki)&&(Qi=ki)}for(var Si=0;Si<ut;++Si)if(F.test(ot[Si])){var bi=void 0;for(bi=Si+1;bi<ut&&F.test(ot[bi]);++bi);for(var fi=(Si?ot[Si-1]:Xe)=="L",Zi=(bi<ut?ot[bi]:Xe)=="L",lo=fi==Zi?fi?"L":"R":Xe,Ua=Si;Ua<bi;++Ua)ot[Ua]=lo;Si=bi-1}for(var ji=[],Ca,Ri=0;Ri<ut;)if(oe.test(ot[Ri])){var ps=Ri;for(++Ri;Ri<ut&&oe.test(ot[Ri]);++Ri);ji.push(new ve(0,ps,Ri))}else{var Pa=Ri,Ga=ji.length,Va=Be=="rtl"?1:0;for(++Ri;Ri<ut&&ot[Ri]!="L";++Ri);for(var Ki=Pa;Ki<Ri;)if(he.test(ot[Ki])){Pa<Ki&&(ji.splice(Ga,0,new ve(1,Pa,Ki)),Ga+=Va);var uo=Ki;for(++Ki;Ki<Ri&&he.test(ot[Ki]);++Ki);ji.splice(Ga,0,new ve(2,uo,Ki)),Ga+=Va,Pa=Ki}else++Ki;Pa<Ri&&ji.splice(Ga,0,new ve(1,Pa,Ri))}return Be=="ltr"&&(ji[0].level==1&&(Ca=we.match(/^\s+/))&&(ji[0].from=Ca[0].length,ji.unshift(new ve(0,0,Ca[0].length))),re(ji).level==1&&(Ca=we.match(/\s+$/))&&(re(ji).to-=Ca[0].length,ji.push(new ve(0,ut-Ca[0].length,ut)))),Be=="rtl"?ji.reverse():ji}}();function ht(e,i){var R=e.order;return R==null&&(R=e.order=ct(e.text,i)),R}var He=[],Re=function(e,i,R){if(e.addEventListener)e.addEventListener(i,R,!1);else if(e.attachEvent)e.attachEvent("on"+i,R);else{var A=e._handlers||(e._handlers={});A[i]=(A[i]||He).concat(R)}};function tt(e,i){return e._handlers&&e._handlers[i]||He}function ft(e,i,R){if(e.removeEventListener)e.removeEventListener(i,R,!1);else if(e.detachEvent)e.detachEvent("on"+i,R);else{var A=e._handlers,F=A&&A[i];if(F){var J=fe(F,R);J>-1&&(A[i]=F.slice(0,J).concat(F.slice(J+1)))}}}function Qe(e,i){var R=tt(e,i);if(!R.length)return;for(var A=Array.prototype.slice.call(arguments,2),F=0;F<R.length;++F)R[F].apply(null,A)}function lt(e,i,R){return typeof i=="string"&&(i={type:i,preventDefault:function(){this.defaultPrevented=!0}}),Qe(e,R||i.type,e,i),ke(i)||i.codemirrorIgnore}function Ue(e){var i=e._handlers&&e._handlers.cursorActivity;if(!i)return;for(var R=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),A=0;A<i.length;++A)fe(R,i[A])==-1&&R.push(i[A])}function Le(e,i){return tt(e,i).length>0}function Ie(e){e.prototype.on=function(i,R){Re(this,i,R)},e.prototype.off=function(i,R){ft(this,i,R)}}function Ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Se(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ke(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Ne(e){Ce(e),Se(e)}function et(e){return e.target||e.srcElement}function $e(e){var i=e.which;return i==null&&(e.button&1?i=1:e.button&2?i=3:e.button&4&&(i=2)),a&&e.ctrlKey&&i==1&&(i=3),i}var bt=function(){if(S&&b<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}(),gt;function Ut(e){if(gt==null){var i=_("span","\u200B");y(e,_("span",[i,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(gt=i.offsetWidth<=1&&i.offsetHeight>2&&!(S&&b<8))}var R=gt?_("span","\u200B"):_("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return R.setAttribute("cm-text",""),R}var Nt;function hr(e){if(Nt!=null)return Nt;var i=y(e,document.createTextNode("A\u062EA")),R=I(i,0,1).getBoundingClientRect(),A=I(i,1,2).getBoundingClientRect();return x(e),!R||R.left==R.right?!1:Nt=A.right-R.right<3}var mr=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var i=0,R=[],A=e.length;i<=A;){var F=e.indexOf(`
|
|
|
`,i);F==-1&&(F=e.length);var J=e.slice(i,e.charAt(F-1)=="\r"?F-1:F),oe=J.indexOf("\r");oe!=-1?(R.push(J.slice(0,oe)),i+=oe+1):(R.push(J),i=F+1)}return R}:function(e){return e.split(/\r\n?|\n/)},St=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(i){return!1}}:function(e){var i;try{i=e.ownerDocument.selection.createRange()}catch(R){}return!i||i.parentElement()!=e?!1:i.compareEndPoints("StartToEnd",i)!=0},Yr=function(){var e=_("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Jr=null;function Hr(e){if(Jr!=null)return Jr;var i=y(e,_("span","x")),R=i.getBoundingClientRect(),A=I(i,0,1).getBoundingClientRect();return Jr=Math.abs(R.left-A.left)>1}var un={},Ar={};function vn(e,i){arguments.length>2&&(i.dependencies=Array.prototype.slice.call(arguments,2)),un[e]=i}function mn(e,i){Ar[e]=i}function Kt(e){if(typeof e=="string"&&Ar.hasOwnProperty(e))e=Ar[e];else if(e&&typeof e.name=="string"&&Ar.hasOwnProperty(e.name)){var i=Ar[e.name];typeof i=="string"&&(i={name:i}),e=ce(i,e),e.name=i.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Kt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Kt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function or(e,i){i=Kt(i);var R=un[i.name];if(!R)return or(e,"text/plain");var A=R(e,i);if(Xt.hasOwnProperty(i.name)){var F=Xt[i.name];for(var J in F){if(!F.hasOwnProperty(J))continue;A.hasOwnProperty(J)&&(A["_"+J]=A[J]),A[J]=F[J]}}if(A.name=i.name,i.helperType&&(A.helperType=i.helperType),i.modeProps)for(var oe in i.modeProps)A[oe]=i.modeProps[oe];return A}var Xt={};function gr(e,i){var R=Xt.hasOwnProperty(e)?Xt[e]:Xt[e]={};W(i,R)}function Xr(e,i){if(i===!0)return i;if(e.copyState)return e.copyState(i);var R={};for(var A in i){var F=i[A];F instanceof Array&&(F=F.concat([])),R[A]=F}return R}function kn(e,i){for(var R;e.innerMode&&!(R=e.innerMode(i),!R||R.mode==e);)i=R.state,e=R.mode;return R||{mode:e,state:i}}function Ln(e,i,R){return e.startState?e.startState(i,R):!0}var tn=function(e,i,R){this.pos=this.start=0,this.string=e,this.tabSize=i||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=R};tn.prototype.eol=function(){return this.pos>=this.string.length},tn.prototype.sol=function(){return this.pos==this.lineStart},tn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},tn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},tn.prototype.eat=function(e){var i=this.string.charAt(this.pos),R;if(typeof e=="string"?R=i==e:R=i&&(e.test?e.test(i):e(i)),R)return++this.pos,i},tn.prototype.eatWhile=function(e){for(var i=this.pos;this.eat(e););return this.pos>i},tn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},tn.prototype.skipToEnd=function(){this.pos=this.string.length},tn.prototype.skipTo=function(e){var i=this.string.indexOf(e,this.pos);if(i>-1)return this.pos=i,!0},tn.prototype.backUp=function(e){this.pos-=e},tn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=X(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},tn.prototype.indentation=function(){return X(this.string,null,this.tabSize)-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},tn.prototype.match=function(e,i,R){if(typeof e=="string"){var A=function(oe){return R?oe.toLowerCase():oe},F=this.string.substr(this.pos,e.length);if(A(F)==A(e))return i!==!1&&(this.pos+=e.length),!0}else{var J=this.string.slice(this.pos).match(e);return J&&J.index>0?null:(J&&i!==!1&&(this.pos+=J[0].length),J)}},tn.prototype.current=function(){return this.string.slice(this.start,this.pos)},tn.prototype.hideFirstChars=function(e,i){this.lineStart+=e;try{return i()}finally{this.lineStart-=e}},tn.prototype.lookAhead=function(e){var i=this.lineOracle;return i&&i.lookAhead(e)},tn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ur(e,i){if(i-=e.first,i<0||i>=e.size)throw new Error("There is no line "+(i+e.first)+" in the document.");for(var R=e;!R.lines;)for(var A=0;;++A){var F=R.children[A],J=F.chunkSize();if(i<J){R=F;break}i-=J}return R.lines[i]}function Xn(e,i,R){var A=[],F=i.line;return e.iter(i.line,R.line+1,function(J){var oe=J.text;F==R.line&&(oe=oe.slice(0,R.ch)),F==i.line&&(oe=oe.slice(i.ch)),A.push(oe),++F}),A}function hi(e,i,R){var A=[];return e.iter(i,R,function(F){A.push(F.text)}),A}function $n(e,i){var R=i-e.height;if(R)for(var A=e;A;A=A.parent)A.height+=R}function Zr(e){if(e.parent==null)return null;for(var i=e.parent,R=fe(i.lines,e),A=i.parent;A;i=A,A=A.parent)for(var F=0;!(A.children[F]==i);++F)R+=A.children[F].chunkSize();return R+i.first}function Bn(e,i){var R=e.first;e:do{for(var A=0;A<e.children.length;++A){var F=e.children[A],J=F.height;if(i<J){e=F;continue e}i-=J,R+=F.chunkSize()}return R}while(!e.lines);for(var oe=0;oe<e.lines.length;++oe){var he=e.lines[oe],ve=he.height;if(i<ve)break;i-=ve}return R+oe}function si(e,i){return i>=e.first&&i<e.first+e.size}function li(e,i){return String(e.lineNumberFormatter(i+e.firstLineNumber))}function wt(e,i,R){if(R===void 0&&(R=null),!(this instanceof wt))return new wt(e,i,R);this.line=e,this.ch=i,this.sticky=R}function $t(e,i){return e.line-i.line||e.ch-i.ch}function en(e,i){return e.sticky==i.sticky&&$t(e,i)==0}function Cn(e){return wt(e.line,e.ch)}function _n(e,i){return $t(e,i)<0?i:e}function On(e,i){return $t(e,i)<0?e:i}function ae(e,i){return Math.max(e.first,Math.min(i,e.first+e.size-1))}function z(e,i){if(i.line<e.first)return wt(e.first,0);var R=e.first+e.size-1;return i.line>R?wt(R,ur(e,R).text.length):$(i,ur(e,i.line).text.length)}function $(e,i){var R=e.ch;return R==null||R>i?wt(e.line,i):R<0?wt(e.line,0):e}function ie(e,i){for(var R=[],A=0;A<i.length;A++)R[A]=z(e,i[A]);return R}var de=function(e,i){this.state=e,this.lookAhead=i},se=function(e,i,R,A){this.state=i,this.doc=e,this.line=R,this.maxLookAhead=A||0,this.baseTokens=null,this.baseTokenPos=1};se.prototype.lookAhead=function(e){var i=this.doc.getLine(this.line+e);return i!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),i},se.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var i=this.baseTokens[this.baseTokenPos+1];return{type:i&&i.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},se.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},se.fromSaved=function(e,i,R){return i instanceof de?new se(e,Xr(e.mode,i.state),R,i.lookAhead):new se(e,Xr(e.mode,i),R)},se.prototype.save=function(e){var i=e!==!1?Xr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new de(i,this.maxLookAhead):i};function Ke(e,i,R,A){var F=[e.state.modeGen],J={};Ei(e,i.text,e.doc.mode,R,function(we,Be){return F.push(we,Be)},J,A);for(var oe=R.state,he=function(we){R.baseTokens=F;var Be=e.state.overlays[we],Xe=1,ut=0;R.state=!0,Ei(e,i.text,Be.mode,R,function(ot,Ot){for(var Bt=Xe;ut<ot;){var Qt=F[Xe];Qt>ot&&F.splice(Xe,1,ot,F[Xe+1],Qt),Xe+=2,ut=Math.min(ot,Qt)}if(!Ot)return;if(Be.opaque)F.splice(Bt,Xe-Bt,ot,"overlay "+Ot),Xe=Bt+2;else for(;Bt<Xe;Bt+=2){var ir=F[Bt+1];F[Bt+1]=(ir?ir+" ":"")+"overlay "+Ot}},J),R.state=oe,R.baseTokens=null,R.baseTokenPos=1},ve=0;ve<e.state.overlays.length;++ve)he(ve);return{styles:F,classes:J.bgClass||J.textClass?J:null}}function Rt(e,i,R){if(!i.styles||i.styles[0]!=e.state.modeGen){var A=Vt(e,Zr(i)),F=i.text.length>e.options.maxHighlightLength&&Xr(e.doc.mode,A.state),J=Ke(e,i,A);F&&(A.state=F),i.stateAfter=A.save(!F),i.styles=J.styles,J.classes?i.styleClasses=J.classes:i.styleClasses&&(i.styleClasses=null),R===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return i.styles}function Vt(e,i,R){var A=e.doc,F=e.display;if(!A.mode.startState)return new se(A,!0,i);var J=In(e,i,R),oe=J>A.first&&ur(A,J-1).stateAfter,he=oe?se.fromSaved(A,oe,J):new se(A,Ln(A.mode),J);return A.iter(J,i,function(ve){Er(e,ve.text,he);var we=he.line;ve.stateAfter=we==i-1||we%5==0||we>=F.viewFrom&&we<F.viewTo?he.save():null,he.nextLine()}),R&&(A.modeFrontier=he.line),he}function Er(e,i,R,A){var F=e.doc.mode,J=new tn(i,e.options.tabSize,R);for(J.start=J.pos=A||0,i==""&&Lt(F,R.state);!J.eol();)zr(F,J,R.state),J.start=J.pos}function Lt(e,i){if(e.blankLine)return e.blankLine(i);if(!e.innerMode)return;var R=kn(e,i);if(R.mode.blankLine)return R.mode.blankLine(R.state)}function zr(e,i,R,A){for(var F=0;F<10;F++){A&&(A[0]=kn(e,R).mode);var J=e.token(i,R);if(i.pos>i.start)return J}throw new Error("Mode "+e.name+" failed to advance stream.")}var Br=function(e,i,R){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=i||null,this.state=R};function En(e,i,R,A){var F=e.doc,J=F.mode,oe;i=z(F,i);var he=ur(F,i.line),ve=Vt(e,i.line,R),we=new tn(he.text,e.options.tabSize,ve),Be;for(A&&(Be=[]);(A||we.pos<i.ch)&&!we.eol();)we.start=we.pos,oe=zr(J,we,ve.state),A&&Be.push(new Br(we,oe,Xr(F.mode,ve.state)));return A?Be:new Br(we,oe,ve.state)}function ui(e,i){if(e)for(;;){var R=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!R)break;e=e.slice(0,R.index)+e.slice(R.index+R[0].length);var A=R[1]?"bgClass":"textClass";i[A]==null?i[A]=R[2]:new RegExp("(?:^|\\s)"+R[2]+"(?:$|\\s)").test(i[A])||(i[A]+=" "+R[2])}return e}function Ei(e,i,R,A,F,J,oe){var he=R.flattenSpans;he==null&&(he=e.options.flattenSpans);var ve=0,we=null,Be=new tn(i,e.options.tabSize,A),Xe,ut=e.options.addModeClass&&[null];for(i==""&&ui(Lt(R,A.state),J);!Be.eol();){if(Be.pos>e.options.maxHighlightLength?(he=!1,oe&&Er(e,i,A,Be.pos),Be.pos=i.length,Xe=null):Xe=ui(zr(R,Be,A.state,ut),J),ut){var ot=ut[0].name;ot&&(Xe="m-"+(Xe?ot+" "+Xe:ot))}if(!he||we!=Xe){for(;ve<Be.start;)ve=Math.min(Be.start,ve+5e3),F(ve,we);we=Xe}Be.start=Be.pos}for(;ve<Be.pos;){var Ot=Math.min(Be.pos,ve+5e3);F(Ot,we),ve=Ot}}function In(e,i,R){for(var A,F,J=e.doc,oe=R?-1:i-(e.doc.mode.innerMode?1e3:100),he=i;he>oe;--he){if(he<=J.first)return J.first;var ve=ur(J,he-1),we=ve.stateAfter;if(we&&(!R||he+(we instanceof de?we.lookAhead:0)<=J.modeFrontier))return he;var Be=X(ve.text,null,e.options.tabSize);(F==null||A>Be)&&(F=he-1,A=Be)}return F}function Li(e,i){if(e.modeFrontier=Math.min(e.modeFrontier,i),e.highlightFrontier<i-10)return;for(var R=e.first,A=i-1;A>R;A--){var F=ur(e,A).stateAfter;if(F&&(!(F instanceof de)||A+F.lookAhead<i)){R=A+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,R)}var qi=!1,ni=!1;function Ti(){qi=!0}function xi(){ni=!0}function Fi(e,i,R){this.marker=e,this.from=i,this.to=R}function Ci(e,i){if(e)for(var R=0;R<e.length;++R){var A=e[R];if(A.marker==i)return A}}function Gi(e,i){for(var R,A=0;A<e.length;++A)e[A]!=i&&(R||(R=[])).push(e[A]);return R}function Mi(e,i){e.markedSpans=e.markedSpans?e.markedSpans.concat([i]):[i],i.marker.attachLine(e)}function oa(e,i,R){var A;if(e)for(var F=0;F<e.length;++F){var J=e[F],oe=J.marker,he=J.from==null||(oe.inclusiveLeft?J.from<=i:J.from<i);if(he||J.from==i&&oe.type=="bookmark"&&(!R||!J.marker.insertLeft)){var ve=J.to==null||(oe.inclusiveRight?J.to>=i:J.to>i);(A||(A=[])).push(new Fi(oe,J.from,ve?null:J.to))}}return A}function sa(e,i,R){var A;if(e)for(var F=0;F<e.length;++F){var J=e[F],oe=J.marker,he=J.to==null||(oe.inclusiveRight?J.to>=i:J.to>i);if(he||J.from==i&&oe.type=="bookmark"&&(!R||J.marker.insertLeft)){var ve=J.from==null||(oe.inclusiveLeft?J.from<=i:J.from<i);(A||(A=[])).push(new Fi(oe,ve?null:J.from-i,J.to==null?null:J.to-i))}}return A}function Ii(e,i){if(i.full)return null;var R=si(e,i.from.line)&&ur(e,i.from.line).markedSpans,A=si(e,i.to.line)&&ur(e,i.to.line).markedSpans;if(!R&&!A)return null;var F=i.from.ch,J=i.to.ch,oe=$t(i.from,i.to)==0,he=oa(R,F,oe),ve=sa(A,J,oe),we=i.text.length==1,Be=re(i.text).length+(we?F:0);if(he)for(var Xe=0;Xe<he.length;++Xe){var ut=he[Xe];if(ut.to==null){var ot=Ci(ve,ut.marker);ot?we&&(ut.to=ot.to==null?null:ot.to+Be):ut.to=F}}if(ve)for(var Ot=0;Ot<ve.length;++Ot){var Bt=ve[Ot];if(Bt.to!=null&&(Bt.to+=Be),Bt.from==null){var Qt=Ci(he,Bt.marker);Qt||(Bt.from=Be,we&&(he||(he=[])).push(Bt))}else Bt.from+=Be,we&&(he||(he=[])).push(Bt)}he&&(he=qn(he)),ve&&ve!=he&&(ve=qn(ve));var ir=[he];if(!we){var _r=i.text.length-2,ar;if(_r>0&&he)for(var Rr=0;Rr<he.length;++Rr)he[Rr].to==null&&(ar||(ar=[])).push(new Fi(he[Rr].marker,null,null));for(var qr=0;qr<_r;++qr)ir.push(ar);ir.push(ve)}return ir}function qn(e){for(var i=0;i<e.length;++i){var R=e[i];R.from!=null&&R.from==R.to&&R.marker.clearWhenEmpty!==!1&&e.splice(i--,1)}return e.length?e:null}function Vi(e,i,R){var A=null;if(e.iter(i.line,R.line+1,function(ot){if(ot.markedSpans)for(var Ot=0;Ot<ot.markedSpans.length;++Ot){var Bt=ot.markedSpans[Ot].marker;Bt.readOnly&&(!A||fe(A,Bt)==-1)&&(A||(A=[])).push(Bt)}}),!A)return null;for(var F=[{from:i,to:R}],J=0;J<A.length;++J)for(var oe=A[J],he=oe.find(0),ve=0;ve<F.length;++ve){var we=F[ve];if($t(we.to,he.from)<0||$t(we.from,he.to)>0)continue;var Be=[ve,1],Xe=$t(we.from,he.from),ut=$t(we.to,he.to);(Xe<0||!oe.inclusiveLeft&&!Xe)&&Be.push({from:we.from,to:he.from}),(ut>0||!oe.inclusiveRight&&!ut)&&Be.push({from:he.to,to:we.to}),F.splice.apply(F,Be),ve+=Be.length-3}return F}function ta(e){var i=e.markedSpans;if(!i)return;for(var R=0;R<i.length;++R)i[R].marker.detachLine(e);e.markedSpans=null}function Tt(e,i){if(!i)return;for(var R=0;R<i.length;++R)i[R].marker.attachLine(e);e.markedSpans=i}function it(e){return e.inclusiveLeft?-1:0}function mt(e){return e.inclusiveRight?1:0}function Ct(e,i){var R=e.lines.length-i.lines.length;if(R!=0)return R;var A=e.find(),F=i.find(),J=$t(A.from,F.from)||it(e)-it(i);if(J)return-J;var oe=$t(A.to,F.to)||mt(e)-mt(i);return oe||i.id-e.id}function It(e,i){var R=ni&&e.markedSpans,A;if(R)for(var F=void 0,J=0;J<R.length;++J)F=R[J],F.marker.collapsed&&(i?F.from:F.to)==null&&(!A||Ct(A,F.marker)<0)&&(A=F.marker);return A}function Pt(e){return It(e,!0)}function Ht(e){return It(e,!1)}function Wt(e,i){var R=ni&&e.markedSpans,A;if(R)for(var F=0;F<R.length;++F){var J=R[F];J.marker.collapsed&&(J.from==null||J.from<i)&&(J.to==null||J.to>i)&&(!A||Ct(A,J.marker)<0)&&(A=J.marker)}return A}function dt(e,i,R,A,F){var J=ur(e,i),oe=ni&&J.markedSpans;if(oe)for(var he=0;he<oe.length;++he){var ve=oe[he];if(!ve.marker.collapsed)continue;var we=ve.marker.find(0),Be=$t(we.from,R)||it(ve.marker)-it(F),Xe=$t(we.to,A)||mt(ve.marker)-mt(F);if(Be>=0&&Xe<=0||Be<=0&&Xe>=0)continue;if(Be<=0&&(ve.marker.inclusiveRight&&F.inclusiveLeft?$t(we.to,R)>=0:$t(we.to,R)>0)||Be>=0&&(ve.marker.inclusiveRight&&F.inclusiveLeft?$t(we.from,A)<=0:$t(we.from,A)<0))return!0}}function At(e){for(var i;i=Pt(e);)e=i.find(-1,!0).line;return e}function Dt(e){for(var i;i=Ht(e);)e=i.find(1,!0).line;return e}function yr(e){for(var i,R;i=Ht(e);)e=i.find(1,!0).line,(R||(R=[])).push(e);return R}function tr(e,i){var R=ur(e,i),A=At(R);return R==A?i:Zr(A)}function qt(e,i){if(i>e.lastLine())return i;var R=ur(e,i),A;if(!Gt(e,R))return i;for(;A=Ht(R);)R=A.find(1,!0).line;return Zr(R)+1}function Gt(e,i){var R=ni&&i.markedSpans;if(R)for(var A=void 0,F=0;F<R.length;++F){if(A=R[F],!A.marker.collapsed)continue;if(A.from==null)return!0;if(A.marker.widgetNode)continue;if(A.from==0&&A.marker.inclusiveLeft&&nr(e,i,A))return!0}}function nr(e,i,R){if(R.to==null){var A=R.marker.find(1,!0);return nr(e,A.line,Ci(A.line.markedSpans,R.marker))}if(R.marker.inclusiveRight&&R.to==i.text.length)return!0;for(var F=void 0,J=0;J<i.markedSpans.length;++J)if(F=i.markedSpans[J],F.marker.collapsed&&!F.marker.widgetNode&&F.from==R.to&&(F.to==null||F.to!=R.from)&&(F.marker.inclusiveLeft||R.marker.inclusiveRight)&&nr(e,i,F))return!0}function cr(e){e=At(e);for(var i=0,R=e.parent,A=0;A<R.lines.length;++A){var F=R.lines[A];if(F==e)break;i+=F.height}for(var J=R.parent;J;R=J,J=R.parent)for(var oe=0;oe<J.children.length;++oe){var he=J.children[oe];if(he==R)break;i+=he.height}return i}function st(e){if(e.height==0)return 0;for(var i=e.text.length,R,A=e;R=Pt(A);){var F=R.find(0,!0);A=F.from.line,i+=F.from.ch-F.to.ch}for(A=e;R=Ht(A);){var J=R.find(0,!0);i-=A.text.length-J.from.ch,A=J.to.line,i+=A.text.length-J.to.ch}return i}function Lr(e){var i=e.display,R=e.doc;i.maxLine=ur(R,R.first),i.maxLineLength=st(i.maxLine),i.maxLineChanged=!0,R.iter(function(A){var F=st(A);F>i.maxLineLength&&(i.maxLineLength=F,i.maxLine=A)})}var Fr=function(e,i,R){this.text=e,Tt(this,i),this.height=R?R(this):1};Fr.prototype.lineNo=function(){return Zr(this)},Ie(Fr);function Cr(e,i,R,A){e.text=i,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ta(e),Tt(e,R);var F=A?A(e):1;F!=e.height&&$n(e,F)}function rr(e){e.parent=null,ta(e)}var Et={},_t={};function xt(e,i){if(!e||/^\s*$/.test(e))return null;var R=i.addModeClass?_t:Et;return R[e]||(R[e]=e.replace(/\S+/g,"cm-$&"))}function Jt(e,i){var R=M("span",null,null,d?"padding-right: .1px":null),A={pre:M("pre",[R],"CodeMirror-line"),content:R,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};i.measure={};for(var F=0;F<=(i.rest?i.rest.length:0);F++){var J=F?i.rest[F-1]:i.line,oe=void 0;A.pos=0,A.addToken=dr,hr(e.display.measure)&&(oe=ht(J,e.doc.direction))&&(A.addToken=Dr(A.addToken,oe)),A.map=[];var he=i!=e.display.externalMeasured&&Zr(J);qe(J,A,Rt(e,J,he)),J.styleClasses&&(J.styleClasses.bgClass&&(A.bgClass=B(J.styleClasses.bgClass,A.bgClass||"")),J.styleClasses.textClass&&(A.textClass=B(J.styleClasses.textClass,A.textClass||""))),A.map.length==0&&A.map.push(0,0,A.content.appendChild(Ut(e.display.measure))),F==0?(i.measure.map=A.map,i.measure.cache={}):((i.measure.maps||(i.measure.maps=[])).push(A.map),(i.measure.caches||(i.measure.caches=[])).push({}))}if(d){var ve=A.content.lastChild;(/\bcm-tab\b/.test(ve.className)||ve.querySelector&&ve.querySelector(".cm-tab"))&&(A.content.className="cm-tab-wrap-hack")}return Qe(e,"renderLine",e,i.line,A.pre),A.pre.className&&(A.textClass=B(A.pre.className,A.textClass||"")),A}function pr(e){var i=_("span","\u2022","cm-invalidchar");return i.title="\\u"+e.charCodeAt(0).toString(16),i.setAttribute("aria-label",i.title),i}function dr(e,i,R,A,F,J,oe){if(!i)return;var he=e.splitSpaces?fr(i,e.trailingSpace):i,ve=e.cm.state.specialChars,we=!1,Be;if(!ve.test(i))e.col+=i.length,Be=document.createTextNode(he),e.map.push(e.pos,e.pos+i.length,Be),S&&b<9&&(we=!0),e.pos+=i.length;else{Be=document.createDocumentFragment();for(var Xe=0;;){ve.lastIndex=Xe;var ut=ve.exec(i),ot=ut?ut.index-Xe:i.length-Xe;if(ot){var Ot=document.createTextNode(he.slice(Xe,Xe+ot));S&&b<9?Be.appendChild(_("span",[Ot])):Be.appendChild(Ot),e.map.push(e.pos,e.pos+ot,Ot),e.col+=ot,e.pos+=ot}if(!ut)break;Xe+=ot+1;var Bt=void 0;if(ut[0]==" "){var Qt=e.cm.options.tabSize,ir=Qt-e.col%Qt;Bt=Be.appendChild(_("span",le(ir),"cm-tab")),Bt.setAttribute("role","presentation"),Bt.setAttribute("cm-text"," "),e.col+=ir}else ut[0]=="\r"||ut[0]==`
|
|
|
`?(Bt=Be.appendChild(_("span",ut[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Bt.setAttribute("cm-text",ut[0]),e.col+=1):(Bt=e.cm.options.specialCharPlaceholder(ut[0]),Bt.setAttribute("cm-text",ut[0]),S&&b<9?Be.appendChild(_("span",[Bt])):Be.appendChild(Bt),e.col+=1);e.map.push(e.pos,e.pos+1,Bt),e.pos++}}if(e.trailingSpace=he.charCodeAt(i.length-1)==32,R||A||F||we||J||oe){var _r=R||"";A&&(_r+=A),F&&(_r+=F);var ar=_("span",[Be],_r,J);if(oe)for(var Rr in oe)oe.hasOwnProperty(Rr)&&Rr!="style"&&Rr!="class"&&ar.setAttribute(Rr,oe[Rr]);return e.content.appendChild(ar)}e.content.appendChild(Be)}function fr(e,i){if(e.length>1&&!/ /.test(e))return e;for(var R=i,A="",F=0;F<e.length;F++){var J=e.charAt(F);J==" "&&R&&(F==e.length-1||e.charCodeAt(F+1)==32)&&(J="\xA0"),A+=J,R=J==" "}return A}function Dr(e,i){return function(R,A,F,J,oe,he,ve){F=F?F+" cm-force-border":"cm-force-border";for(var we=R.pos,Be=we+A.length;;){for(var Xe=void 0,ut=0;ut<i.length&&!(Xe=i[ut],Xe.to>we&&Xe.from<=we);ut++);if(Xe.to>=Be)return e(R,A,F,J,oe,he,ve);e(R,A.slice(0,Xe.to-we),F,J,null,he,ve),J=null,A=A.slice(Xe.to-we),we=Xe.to}}}function an(e,i,R,A){var F=!A&&R.widgetNode;F&&e.map.push(e.pos,e.pos+i,F),!A&&e.cm.display.input.needsContentAttribute&&(F||(F=e.content.appendChild(document.createElement("span"))),F.setAttribute("cm-marker",R.id)),F&&(e.cm.display.input.setUneditable(F),e.content.appendChild(F)),e.pos+=i,e.trailingSpace=!1}function qe(e,i,R){var A=e.markedSpans,F=e.text,J=0;if(!A){for(var oe=1;oe<R.length;oe+=2)i.addToken(i,F.slice(J,J=R[oe]),xt(R[oe+1],i.cm.options));return}for(var he=F.length,ve=0,we=1,Be="",Xe,ut,ot=0,Ot,Bt,Qt,ir,_r;;){if(ot==ve){Ot=Bt=Qt=ut="",_r=null,ir=null,ot=Infinity;for(var ar=[],Rr=void 0,qr=0;qr<A.length;++qr){var Gr=A[qr],wn=Gr.marker;if(wn.type=="bookmark"&&Gr.from==ve&&wn.widgetNode)ar.push(wn);else if(Gr.from<=ve&&(Gr.to==null||Gr.to>ve||wn.collapsed&&Gr.to==ve&&Gr.from==ve)){if(Gr.to!=null&&Gr.to!=ve&&ot>Gr.to&&(ot=Gr.to,Bt=""),wn.className&&(Ot+=" "+wn.className),wn.css&&(ut=(ut?ut+";":"")+wn.css),wn.startStyle&&Gr.from==ve&&(Qt+=" "+wn.startStyle),wn.endStyle&&Gr.to==ot&&(Rr||(Rr=[])).push(wn.endStyle,Gr.to),wn.title&&((_r||(_r={})).title=wn.title),wn.attributes)for(var Zn in wn.attributes)(_r||(_r={}))[Zn]=wn.attributes[Zn];wn.collapsed&&(!ir||Ct(ir.marker,wn)<0)&&(ir=Gr)}else Gr.from>ve&&ot>Gr.from&&(ot=Gr.from)}if(Rr)for(var Ai=0;Ai<Rr.length;Ai+=2)Rr[Ai+1]==ot&&(Bt+=" "+Rr[Ai]);if(!ir||ir.from==ve)for(var oi=0;oi<ar.length;++oi)an(i,0,ar[oi]);if(ir&&(ir.from||0)==ve){if(an(i,(ir.to==null?he+1:ir.to)-ve,ir.marker,ir.from==null),ir.to==null)return;ir.to==ve&&(ir=!1)}}if(ve>=he)break;for(var ea=Math.min(he,ot);;){if(Be){var Ji=ve+Be.length;if(!ir){var yi=Ji>ea?Be.slice(0,ea-ve):Be;i.addToken(i,yi,Xe?Xe+Ot:Ot,Qt,ve+yi.length==ot?Bt:"",ut,_r)}if(Ji>=ea){Be=Be.slice(ea-ve),ve=ea;break}ve=Ji,Qt=""}Be=F.slice(J,J=R[we++]),Xe=xt(R[we++],i.cm.options)}}}function sr(e,i,R){this.line=i,this.rest=yr(i),this.size=this.rest?Zr(re(this.rest))-R+1:1,this.node=this.text=null,this.hidden=Gt(e,i)}function Nr(e,i,R){for(var A=[],F,J=i;J<R;J=F){var oe=new sr(e.doc,ur(e.doc,J),J);F=J+oe.size,A.push(oe)}return A}var rn=null;function xr(e){rn?rn.ops.push(e):e.ownsGroup=rn={ops:[e],delayedCallbacks:[]}}function br(e){var i=e.delayedCallbacks,R=0;do{for(;R<i.length;R++)i[R].call(null);for(var A=0;A<e.ops.length;A++){var F=e.ops[A];if(F.cursorActivityHandlers)for(;F.cursorActivityCalled<F.cursorActivityHandlers.length;)F.cursorActivityHandlers[F.cursorActivityCalled++].call(null,F.cm)}}while(R<i.length)}function Pr(e,i){var R=e.ownsGroup;if(!R)return;try{br(R)}finally{rn=null,i(R)}}var Ft=null;function Zt(e,i){var R=tt(e,i);if(!R.length)return;var A=Array.prototype.slice.call(arguments,2),F;rn?F=rn.delayedCallbacks:Ft?F=Ft:(F=Ft=[],setTimeout(wr,0));for(var J=function(he){F.push(function(){return R[he].apply(null,A)})},oe=0;oe<R.length;++oe)J(oe)}function wr(){var e=Ft;Ft=null;for(var i=0;i<e.length;++i)e[i]()}function er(e,i,R,A){for(var F=0;F<i.changes.length;F++){var J=i.changes[F];J=="text"?Mt(e,i):J=="gutter"?cn(e,i,R,A):J=="class"?Mr(e,i):J=="widget"&&fn(e,i,A)}i.changes=null}function vt(e){return e.node==e.text&&(e.node=_("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),S&&b<8&&(e.node.style.zIndex=2)),e.node}function yt(e,i){var R=i.bgClass?i.bgClass+" "+(i.line.bgClass||""):i.line.bgClass;if(R&&(R+=" CodeMirror-linebackground"),i.background)R?i.background.className=R:(i.background.parentNode.removeChild(i.background),i.background=null);else if(R){var A=vt(i);i.background=A.insertBefore(_("div",null,R),A.firstChild),e.display.input.setUneditable(i.background)}}function zt(e,i){var R=e.display.externalMeasured;return R&&R.line==i.line?(e.display.externalMeasured=null,i.measure=R.measure,R.built):Jt(e,i)}function Mt(e,i){var R=i.text.className,A=zt(e,i);i.text==i.node&&(i.node=A.pre),i.text.parentNode.replaceChild(A.pre,i.text),i.text=A.pre,A.bgClass!=i.bgClass||A.textClass!=i.textClass?(i.bgClass=A.bgClass,i.textClass=A.textClass,Mr(e,i)):R&&(i.text.className=R)}function Mr(e,i){yt(e,i),i.line.wrapClass?vt(i).className=i.line.wrapClass:i.node!=i.text&&(i.node.className="");var R=i.textClass?i.textClass+" "+(i.line.textClass||""):i.line.textClass;i.text.className=R||""}function cn(e,i,R,A){if(i.gutter&&(i.node.removeChild(i.gutter),i.gutter=null),i.gutterBackground&&(i.node.removeChild(i.gutterBackground),i.gutterBackground=null),i.line.gutterClass){var F=vt(i);i.gutterBackground=_("div",null,"CodeMirror-gutter-background "+i.line.gutterClass,"left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px; width: "+A.gutterTotalWidth+"px"),e.display.input.setUneditable(i.gutterBackground),F.insertBefore(i.gutterBackground,i.text)}var J=i.line.gutterMarkers;if(e.options.lineNumbers||J){var oe=vt(i),he=i.gutter=_("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px");if(e.display.input.setUneditable(he),oe.insertBefore(he,i.text),i.line.gutterClass&&(he.className+=" "+i.line.gutterClass),e.options.lineNumbers&&(!J||!J["CodeMirror-linenumbers"])&&(i.lineNumber=he.appendChild(_("div",li(e.options,R),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+A.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),J)for(var ve=0;ve<e.display.gutterSpecs.length;++ve){var we=e.display.gutterSpecs[ve].className,Be=J.hasOwnProperty(we)&&J[we];Be&&he.appendChild(_("div",[Be],"CodeMirror-gutter-elt","left: "+A.gutterLeft[we]+"px; width: "+A.gutterWidth[we]+"px"))}}}function fn(e,i,R){i.alignable&&(i.alignable=null);for(var A=O("CodeMirror-linewidget"),F=i.node.firstChild,J=void 0;F;F=J)J=F.nextSibling,A.test(F.className)&&i.node.removeChild(F);on(e,i,R)}function kr(e,i,R,A){var F=zt(e,i);return i.text=i.node=F.pre,F.bgClass&&(i.bgClass=F.bgClass),F.textClass&&(i.textClass=F.textClass),Mr(e,i),cn(e,i,R,A),on(e,i,A),i.node}function on(e,i,R){if(Ur(e,i.line,i,R,!0),i.rest)for(var A=0;A<i.rest.length;A++)Ur(e,i.rest[A],i,R,!1)}function Ur(e,i,R,A,F){if(!i.widgets)return;for(var J=vt(R),oe=0,he=i.widgets;oe<he.length;++oe){var ve=he[oe],we=_("div",[ve.node],"CodeMirror-linewidget"+(ve.className?" "+ve.className:""));ve.handleMouseEvents||we.setAttribute("cm-ignore-events","true"),gn(ve,we,R,A),e.display.input.setUneditable(we),F&&ve.above?J.insertBefore(we,R.gutter||R.text):J.appendChild(we),Zt(ve,"redraw")}}function gn(e,i,R,A){if(e.noHScroll){(R.alignable||(R.alignable=[])).push(i);var F=A.wrapperWidth;i.style.left=A.fixedPos+"px",e.coverGutter||(F-=A.gutterTotalWidth,i.style.paddingLeft=A.gutterTotalWidth+"px"),i.style.width=F+"px"}e.coverGutter&&(i.style.zIndex=5,i.style.position="relative",e.noHScroll||(i.style.marginLeft=-A.gutterTotalWidth+"px"))}function Vr(e){if(e.height!=null)return e.height;var i=e.doc.cm;if(!i)return 0;if(!N(document.body,e.node)){var R="position: relative;";e.coverGutter&&(R+="margin-left: -"+i.display.gutters.offsetWidth+"px;"),e.noHScroll&&(R+="width: "+i.display.wrapper.clientWidth+"px;"),y(i.display.measure,_("div",[e.node],null,R))}return e.height=e.node.parentNode.offsetHeight}function yn(e,i){for(var R=et(i);R!=e.wrapper;R=R.parentNode)if(!R||R.nodeType==1&&R.getAttribute("cm-ignore-events")=="true"||R.parentNode==e.sizer&&R!=e.mover)return!0}function ei(e){return e.lineSpace.offsetTop}function Me(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ge(e){if(e.cachedPaddingH)return e.cachedPaddingH;var i=y(e.measure,_("pre","x","CodeMirror-line-like")),R=window.getComputedStyle?window.getComputedStyle(i):i.currentStyle,A={left:parseInt(R.paddingLeft),right:parseInt(R.paddingRight)};return!isNaN(A.left)&&!isNaN(A.right)&&(e.cachedPaddingH=A),A}function Ye(e){return me-e.display.nativeBarWidth}function Fe(e){return e.display.scroller.clientWidth-Ye(e)-e.display.barWidth}function Ee(e){return e.display.scroller.clientHeight-Ye(e)-e.display.barHeight}function Pe(e,i,R){var A=e.options.lineWrapping,F=A&&Fe(e);if(!i.measure.heights||A&&i.measure.width!=F){var J=i.measure.heights=[];if(A){i.measure.width=F;for(var oe=i.text.firstChild.getClientRects(),he=0;he<oe.length-1;he++){var ve=oe[he],we=oe[he+1];Math.abs(ve.bottom-we.bottom)>2&&J.push((ve.bottom+we.top)/2-R.top)}}J.push(R.bottom-R.top)}}function _e(e,i,R){if(e.line==i)return{map:e.measure.map,cache:e.measure.cache};for(var A=0;A<e.rest.length;A++)if(e.rest[A]==i)return{map:e.measure.maps[A],cache:e.measure.caches[A]};for(var F=0;F<e.rest.length;F++)if(Zr(e.rest[F])>R)return{map:e.measure.maps[F],cache:e.measure.caches[F],before:!0}}function je(e,i){i=At(i);var R=Zr(i),A=e.display.externalMeasured=new sr(e.doc,i,R);A.lineN=R;var F=A.built=Jt(e,A);return A.text=F.pre,y(e.display.lineMeasure,F.pre),A}function ze(e,i,R,A){return Ze(e,We(e,i),R,A)}function Ve(e,i){if(i>=e.display.viewFrom&&i<e.display.viewTo)return e.display.view[Hn(e,i)];var R=e.display.externalMeasured;if(R&&i>=R.lineN&&i<R.lineN+R.size)return R}function We(e,i){var R=Zr(i),A=Ve(e,R);A&&!A.text?A=null:A&&A.changes&&(er(e,A,R,Jn(e)),e.curOp.forceUpdate=!0),A||(A=je(e,i));var F=_e(A,i,R);return{line:i,view:A,rect:null,map:F.map,cache:F.cache,before:F.before,hasHeights:!1}}function Ze(e,i,R,A,F){i.before&&(R=-1);var J=R+(A||""),oe;return i.cache.hasOwnProperty(J)?oe=i.cache[J]:(i.rect||(i.rect=i.view.text.getBoundingClientRect()),i.hasHeights||(Pe(e,i.view,i.rect),i.hasHeights=!0),oe=Yt(e,i,R,A),oe.bogus||(i.cache[J]=oe)),{left:oe.left,right:oe.right,top:F?oe.rtop:oe.top,bottom:F?oe.rbottom:oe.bottom}}var pt={left:0,right:0,top:0,bottom:0};function kt(e,i,R){for(var A,F,J,oe,he,ve,we=0;we<e.length;we+=3)if(he=e[we],ve=e[we+1],i<he?(F=0,J=1,oe="left"):i<ve?(F=i-he,J=F+1):(we==e.length-3||i==ve&&e[we+3]>i)&&(J=ve-he,F=J-1,i>=ve&&(oe="right")),F!=null){if(A=e[we+2],he==ve&&R==(A.insertLeft?"left":"right")&&(oe=R),R=="left"&&F==0)for(;we&&e[we-2]==e[we-3]&&e[we-1].insertLeft;)A=e[(we-=3)+2],oe="left";if(R=="right"&&F==ve-he)for(;we<e.length-3&&e[we+3]==e[we+4]&&!e[we+5].insertLeft;)A=e[(we+=3)+2],oe="right";break}return{node:A,start:F,end:J,collapse:oe,coverStart:he,coverEnd:ve}}function jt(e,i){var R=pt;if(i=="left")for(var A=0;A<e.length&&!((R=e[A]).left!=R.right);A++);else for(var F=e.length-1;F>=0&&!((R=e[F]).left!=R.right);F--);return R}function Yt(e,i,R,A){var F=kt(i.map,R,A),J=F.node,oe=F.start,he=F.end,ve=F.collapse,we;if(J.nodeType==3){for(var Be=0;Be<4;Be++){for(;oe&&ge(i.line.text.charAt(F.coverStart+oe));)--oe;for(;F.coverStart+he<F.coverEnd&&ge(i.line.text.charAt(F.coverStart+he));)++he;if(S&&b<9&&oe==0&&he==F.coverEnd-F.coverStart?we=J.parentNode.getBoundingClientRect():we=jt(I(J,oe,he).getClientRects(),A),we.left||we.right||oe==0)break;he=oe,oe=oe-1,ve="right"}S&&b<11&&(we=Ir(e.display.measure,we))}else{oe>0&&(ve=A="right");var Xe;e.options.lineWrapping&&(Xe=J.getClientRects()).length>1?we=Xe[A=="right"?Xe.length-1:0]:we=J.getBoundingClientRect()}if(S&&b<9&&!oe&&(!we||!we.left&&!we.right)){var ut=J.parentNode.getClientRects()[0];ut?we={left:ut.left,right:ut.left+ci(e.display),top:ut.top,bottom:ut.bottom}:we=pt}for(var ot=we.top-i.rect.top,Ot=we.bottom-i.rect.top,Bt=(ot+Ot)/2,Qt=i.view.measure.heights,ir=0;ir<Qt.length-1&&!(Bt<Qt[ir]);ir++);var _r=ir?Qt[ir-1]:0,ar=Qt[ir],Rr={left:(ve=="right"?we.right:we.left)-i.rect.left,right:(ve=="left"?we.left:we.right)-i.rect.left,top:_r,bottom:ar};return!we.left&&!we.right&&(Rr.bogus=!0),e.options.singleCursorHeightPerLine||(Rr.rtop=ot,Rr.rbottom=Ot),Rr}function Ir(e,i){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Hr(e))return i;var R=screen.logicalXDPI/screen.deviceXDPI,A=screen.logicalYDPI/screen.deviceYDPI;return{left:i.left*R,right:i.right*R,top:i.top*A,bottom:i.bottom*A}}function Qr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var i=0;i<e.rest.length;i++)e.measure.caches[i]={}}function $r(e){e.display.externalMeasure=null,x(e.display.lineMeasure);for(var i=0;i<e.display.view.length;i++)Qr(e.display.view[i])}function nn(e){$r(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Kr(){return n&&s?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function sn(){return n&&s?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ln(e){var i=0;if(e.widgets)for(var R=0;R<e.widgets.length;++R)e.widgets[R].above&&(i+=Vr(e.widgets[R]));return i}function xn(e,i,R,A,F){if(!F){var J=ln(i);R.top+=J,R.bottom+=J}if(A=="line")return R;A||(A="local");var oe=cr(i);if(A=="local"?oe+=ei(e.display):oe-=e.display.viewOffset,A=="page"||A=="window"){var he=e.display.lineSpace.getBoundingClientRect();oe+=he.top+(A=="window"?0:sn());var ve=he.left+(A=="window"?0:Kr());R.left+=ve,R.right+=ve}return R.top+=oe,R.bottom+=oe,R}function hn(e,i,R){if(R=="div")return i;var A=i.left,F=i.top;if(R=="page")A-=Kr(),F-=sn();else if(R=="local"||!R){var J=e.display.sizer.getBoundingClientRect();A+=J.left,F+=J.top}var oe=e.display.lineSpace.getBoundingClientRect();return{left:A-oe.left,top:F-oe.top}}function jn(e,i,R,A,F){return A||(A=ur(e.doc,i.line)),xn(e,A,ze(e,A,i.ch,F),R)}function pn(e,i,R,A,F,J){A=A||ur(e.doc,i.line),F||(F=We(e,A));function oe(Ot,Bt){var Qt=Ze(e,F,Ot,Bt?"right":"left",J);return Bt?Qt.left=Qt.right:Qt.right=Qt.left,xn(e,A,Qt,R)}var he=ht(A,e.doc.direction),ve=i.ch,we=i.sticky;if(ve>=A.text.length?(ve=A.text.length,we="before"):ve<=0&&(ve=0,we="after"),!he)return oe(we=="before"?ve-1:ve,we=="before");function Be(Ot,Bt,Qt){var ir=he[Bt],_r=ir.level==1;return oe(Qt?Ot-1:Ot,_r!=Qt)}var Xe=at(he,ve,we),ut=nt,ot=Be(ve,Xe,we=="before");return ut!=null&&(ot.other=Be(ve,ut,we!="before")),ot}function jr(e,i){var R=0;i=z(e.doc,i),e.options.lineWrapping||(R=ci(e.display)*i.ch);var A=ur(e.doc,i.line),F=cr(A)+ei(e.display);return{left:R,right:R,top:F,bottom:F+A.height}}function Wr(e,i,R,A,F){var J=wt(e,i,R);return J.xRel=F,A&&(J.outside=A),J}function dn(e,i,R){var A=e.doc;if(R+=e.display.viewOffset,R<0)return Wr(A.first,0,null,-1,-1);var F=Bn(A,R),J=A.first+A.size-1;if(F>J)return Wr(A.first+A.size-1,ur(A,J).text.length,null,1,1);i<0&&(i=0);for(var oe=ur(A,F);;){var he=Yn(e,oe,F,i,R),ve=Wt(oe,he.ch+(he.xRel>0||he.outside>0?1:0));if(!ve)return he;var we=ve.find(1);if(we.line==F)return we;oe=ur(A,F=we.line)}}function bn(e,i,R,A){A-=ln(i);var F=i.text.length,J=Je(function(oe){return Ze(e,R,oe-1).bottom<=A},F,0);return F=Je(function(oe){return Ze(e,R,oe).top>A},J,F),{begin:J,end:F}}function Tr(e,i,R,A){R||(R=We(e,i));var F=xn(e,i,Ze(e,R,A),"line").top;return bn(e,i,R,F)}function Sn(e,i,R,A){return e.bottom<=R?!1:e.top>R?!0:(A?e.left:e.right)>i}function Yn(e,i,R,A,F){F-=cr(i);var J=We(e,i),oe=ln(i),he=0,ve=i.text.length,we=!0,Be=ht(i,e.doc.direction);if(Be){var Xe=(e.options.lineWrapping?Wn:Rn)(e,i,R,J,Be,A,F);we=Xe.level!=1,he=we?Xe.from:Xe.to-1,ve=we?Xe.to:Xe.from-1}var ut=null,ot=null,Ot=Je(function(qr){var Gr=Ze(e,J,qr);return Gr.top+=oe,Gr.bottom+=oe,Sn(Gr,A,F,!1)?(Gr.top<=F&&Gr.left<=A&&(ut=qr,ot=Gr),!0):!1},he,ve),Bt,Qt,ir=!1;if(ot){var _r=A-ot.left<ot.right-A,ar=_r==we;Ot=ut+(ar?0:1),Qt=ar?"after":"before",Bt=_r?ot.left:ot.right}else{!we&&(Ot==ve||Ot==he)&&Ot++,Qt=Ot==0?"after":Ot==i.text.length?"before":Ze(e,J,Ot-(we?1:0)).bottom+oe<=F==we?"after":"before";var Rr=pn(e,wt(R,Ot,Qt),"line",i,J);Bt=Rr.left,ir=F<Rr.top?-1:F>=Rr.bottom?1:0}return Ot=Te(i.text,Ot,1),Wr(R,Ot,Qt,ir,A-Bt)}function Rn(e,i,R,A,F,J,oe){var he=Je(function(Xe){var ut=F[Xe],ot=ut.level!=1;return Sn(pn(e,wt(R,ot?ut.to:ut.from,ot?"before":"after"),"line",i,A),J,oe,!0)},0,F.length-1),ve=F[he];if(he>0){var we=ve.level!=1,Be=pn(e,wt(R,we?ve.from:ve.to,we?"after":"before"),"line",i,A);Sn(Be,J,oe,!0)&&Be.top>oe&&(ve=F[he-1])}return ve}function Wn(e,i,R,A,F,J,oe){var he=bn(e,i,A,oe),ve=he.begin,we=he.end;/\s/.test(i.text.charAt(we-1))&&we--;for(var Be=null,Xe=null,ut=0;ut<F.length;ut++){var ot=F[ut];if(ot.from>=we||ot.to<=ve)continue;var Ot=ot.level!=1,Bt=Ze(e,A,Ot?Math.min(we,ot.to)-1:Math.max(ve,ot.from)).right,Qt=Bt<J?J-Bt+1e9:Bt-J;(!Be||Xe>Qt)&&(Be=ot,Xe=Qt)}return Be||(Be=F[F.length-1]),Be.from<ve&&(Be={from:ve,to:Be.to,level:Be.level}),Be.to>we&&(Be={from:Be.from,to:we,level:Be.level}),Be}var Dn;function ti(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Dn==null){Dn=_("pre",null,"CodeMirror-line-like");for(var i=0;i<49;++i)Dn.appendChild(document.createTextNode("x")),Dn.appendChild(_("br"));Dn.appendChild(document.createTextNode("x"))}y(e.measure,Dn);var R=Dn.offsetHeight/50;return R>3&&(e.cachedTextHeight=R),x(e.measure),R||1}function ci(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var i=_("span","xxxxxxxxxx"),R=_("pre",[i],"CodeMirror-line-like");y(e.measure,R);var A=i.getBoundingClientRect(),F=(A.right-A.left)/10;return F>2&&(e.cachedCharWidth=F),F||10}function Jn(e){for(var i=e.display,R={},A={},F=i.gutters.clientLeft,J=i.gutters.firstChild,oe=0;J;J=J.nextSibling,++oe){var he=e.display.gutterSpecs[oe].className;R[he]=J.offsetLeft+J.clientLeft+F,A[he]=J.clientWidth}return{fixedPos:gi(i),gutterTotalWidth:i.gutters.offsetWidth,gutterLeft:R,gutterWidth:A,wrapperWidth:i.wrapper.clientWidth}}function gi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Xi(e){var i=ti(e.display),R=e.options.lineWrapping,A=R&&Math.max(5,e.display.scroller.clientWidth/ci(e.display)-3);return function(F){if(Gt(e.doc,F))return 0;var J=0;if(F.widgets)for(var oe=0;oe<F.widgets.length;oe++)F.widgets[oe].height&&(J+=F.widgets[oe].height);return R?J+(Math.ceil(F.text.length/A)||1)*i:J+i}}function Oi(e){var i=e.doc,R=Xi(e);i.iter(function(A){var F=R(A);F!=A.height&&$n(A,F)})}function di(e,i,R,A){var F=e.display;if(!R&&et(i).getAttribute("cm-not-content")=="true")return null;var J,oe,he=F.lineSpace.getBoundingClientRect();try{J=i.clientX-he.left,oe=i.clientY-he.top}catch(Xe){return null}var ve=dn(e,J,oe),we;if(A&&ve.xRel>0&&(we=ur(e.doc,ve.line).text).length==ve.ch){var Be=X(we,we.length,e.options.tabSize)-we.length;ve=wt(ve.line,Math.max(0,Math.round((J-Ge(e.display).left)/ci(e.display))-Be))}return ve}function Hn(e,i){if(i>=e.display.viewTo)return null;if(i-=e.display.viewFrom,i<0)return null;for(var R=e.display.view,A=0;A<R.length;A++)if(i-=R[A].size,i<0)return A}function zn(e,i,R,A){i==null&&(i=e.doc.first),R==null&&(R=e.doc.first+e.doc.size),A||(A=0);var F=e.display;if(A&&R<F.viewTo&&(F.updateLineNumbers==null||F.updateLineNumbers>i)&&(F.updateLineNumbers=i),e.curOp.viewChanged=!0,i>=F.viewTo)ni&&tr(e.doc,i)<F.viewTo&&Vn(e);else if(R<=F.viewFrom)ni&&qt(e.doc,R+A)>F.viewFrom?Vn(e):(F.viewFrom+=A,F.viewTo+=A);else if(i<=F.viewFrom&&R>=F.viewTo)Vn(e);else if(i<=F.viewFrom){var J=ii(e,R,R+A,1);J?(F.view=F.view.slice(J.index),F.viewFrom=J.lineN,F.viewTo+=A):Vn(e)}else if(R>=F.viewTo){var oe=ii(e,i,i,-1);oe?(F.view=F.view.slice(0,oe.index),F.viewTo=oe.lineN):Vn(e)}else{var he=ii(e,i,i,-1),ve=ii(e,R,R+A,1);he&&ve?(F.view=F.view.slice(0,he.index).concat(Nr(e,he.lineN,ve.lineN)).concat(F.view.slice(ve.index)),F.viewTo+=A):Vn(e)}var we=F.externalMeasured;we&&(R<we.lineN?we.lineN+=A:i<we.lineN+we.size&&(F.externalMeasured=null))}function Qn(e,i,R){e.curOp.viewChanged=!0;var A=e.display,F=e.display.externalMeasured;if(F&&i>=F.lineN&&i<F.lineN+F.size&&(A.externalMeasured=null),i<A.viewFrom||i>=A.viewTo)return;var J=A.view[Hn(e,i)];if(J.node==null)return;var oe=J.changes||(J.changes=[]);fe(oe,R)==-1&&oe.push(R)}function Vn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ii(e,i,R,A){var F=Hn(e,i),J,oe=e.display.view;if(!ni||R==e.doc.first+e.doc.size)return{index:F,lineN:R};for(var he=e.display.viewFrom,ve=0;ve<F;ve++)he+=oe[ve].size;if(he!=i){if(A>0){if(F==oe.length-1)return null;J=he+oe[F].size-i,F++}else J=he-i;i+=J,R+=J}for(;tr(e.doc,R)!=R;){if(F==(A<0?0:oe.length-1))return null;R+=A*oe[F-(A<0?1:0)].size,F+=A}return{index:F,lineN:R}}function Di(e,i,R){var A=e.display,F=A.view;F.length==0||i>=A.viewTo||R<=A.viewFrom?(A.view=Nr(e,i,R),A.viewFrom=i):(A.viewFrom>i?A.view=Nr(e,i,A.viewFrom).concat(A.view):A.viewFrom<i&&(A.view=A.view.slice(Hn(e,i))),A.viewFrom=i,A.viewTo<R?A.view=A.view.concat(Nr(e,A.viewTo,R)):A.viewTo>R&&(A.view=A.view.slice(0,Hn(e,R)))),A.viewTo=R}function ra(e){for(var i=e.display.view,R=0,A=0;A<i.length;A++){var F=i[A];!F.hidden&&(!F.node||F.changes)&&++R}return R}function Mn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ui(e,i){i===void 0&&(i=!0);for(var R=e.doc,A={},F=A.cursors=document.createDocumentFragment(),J=A.selection=document.createDocumentFragment(),oe=0;oe<R.sel.ranges.length;oe++){if(!i&&oe==R.sel.primIndex)continue;var he=R.sel.ranges[oe];if(he.from().line>=e.display.viewTo||he.to().line<e.display.viewFrom)continue;var ve=he.empty();(ve||e.options.showCursorWhenSelecting)&&Bi(e,he.head,F),ve||Pn(e,he,J)}return A}function Bi(e,i,R){var A=pn(e,i,"div",null,null,!e.options.singleCursorHeightPerLine),F=R.appendChild(_("div","\xA0","CodeMirror-cursor"));if(F.style.left=A.left+"px",F.style.top=A.top+"px",F.style.height=Math.max(0,A.bottom-A.top)*e.options.cursorHeight+"px",A.other){var J=R.appendChild(_("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));J.style.display="",J.style.left=A.other.left+"px",J.style.top=A.other.top+"px",J.style.height=(A.other.bottom-A.other.top)*.85+"px"}}function Fn(e,i){return e.top-i.top||e.left-i.left}function Pn(e,i,R){var A=e.display,F=e.doc,J=document.createDocumentFragment(),oe=Ge(e.display),he=oe.left,ve=Math.max(A.sizerWidth,Fe(e)-A.sizer.offsetLeft)-oe.right,we=F.direction=="ltr";function Be(ar,Rr,qr,Gr){Rr<0&&(Rr=0),Rr=Math.round(Rr),Gr=Math.round(Gr),J.appendChild(_("div",null,"CodeMirror-selected","position: absolute; left: "+ar+`px;
|
|
|
top: `+Rr+"px; width: "+(qr==null?ve-ar:qr)+`px;
|
|
|
height: `+(Gr-Rr)+"px"))}function Xe(ar,Rr,qr){var Gr=ur(F,ar),wn=Gr.text.length,Zn,Ai;function oi(yi,Qi){return jn(e,wt(ar,yi),"div",Gr,Qi)}function ea(yi,Qi,ki){var Si=Tr(e,Gr,null,yi),bi=Qi=="ltr"==(ki=="after")?"left":"right",fi=ki=="after"?Si.begin:Si.end-(/\s/.test(Gr.text.charAt(Si.end-1))?2:1);return oi(fi,bi)[bi]}var Ji=ht(Gr,F.direction);return rt(Ji,Rr||0,qr==null?wn:qr,function(yi,Qi,ki,Si){var bi=ki=="ltr",fi=oi(yi,bi?"left":"right"),Zi=oi(Qi-1,bi?"right":"left"),lo=Rr==null&&yi==0,Ua=qr==null&&Qi==wn,ji=Si==0,Ca=!Ji||Si==Ji.length-1;if(Zi.top-fi.top<=3){var Ri=(we?lo:Ua)&&ji,ps=(we?Ua:lo)&&Ca,Pa=Ri?he:(bi?fi:Zi).left,Ga=ps?ve:(bi?Zi:fi).right;Be(Pa,fi.top,Ga-Pa,fi.bottom)}else{var Va,Ki,uo,ms;bi?(Va=we&&lo&&ji?he:fi.left,Ki=we?ve:ea(yi,ki,"before"),uo=we?he:ea(Qi,ki,"after"),ms=we&&Ua&&Ca?ve:Zi.right):(Va=we?ea(yi,ki,"before"):he,Ki=!we&&lo&&ji?ve:fi.right,uo=!we&&Ua&&Ca?he:Zi.left,ms=we?ea(Qi,ki,"after"):ve),Be(Va,fi.top,Ki-Va,fi.bottom),fi.bottom<Zi.top&&Be(he,fi.bottom,null,Zi.top),Be(uo,Zi.top,ms-uo,Zi.bottom)}(!Zn||Fn(fi,Zn)<0)&&(Zn=fi),Fn(Zi,Zn)<0&&(Zn=Zi),(!Ai||Fn(fi,Ai)<0)&&(Ai=fi),Fn(Zi,Ai)<0&&(Ai=Zi)}),{start:Zn,end:Ai}}var ut=i.from(),ot=i.to();if(ut.line==ot.line)Xe(ut.line,ut.ch,ot.ch);else{var Ot=ur(F,ut.line),Bt=ur(F,ot.line),Qt=At(Ot)==At(Bt),ir=Xe(ut.line,ut.ch,Qt?Ot.text.length+1:null).end,_r=Xe(ot.line,Qt?0:null,ot.ch).start;Qt&&(ir.top<_r.top-2?(Be(ir.right,ir.top,null,ir.bottom),Be(he,_r.top,_r.left,_r.bottom)):Be(ir.right,ir.top,_r.left-ir.right,ir.bottom)),ir.bottom<_r.top&&Be(he,ir.bottom,null,_r.top)}R.appendChild(J)}function ai(e){if(!e.state.focused)return;var i=e.display;clearInterval(i.blinker);var R=!0;i.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?i.blinker=setInterval(function(){e.hasFocus()||ua(e),i.cursorDiv.style.visibility=(R=!R)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(i.cursorDiv.style.visibility="hidden")}function Ba(e){e.state.focused||(e.display.input.focus(),la(e))}function wa(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ua(e))},100)}function la(e,i){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Qe(e,"focus",e,i),e.state.focused=!0,H(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),d&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ai(e)}function ua(e,i){if(e.state.delayingBlurEvent)return;e.state.focused&&(Qe(e,"blur",e,i),e.state.focused=!1,C(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ka(e){for(var i=e.display,R=i.lineDiv.offsetTop,A=0;A<i.view.length;A++){var F=i.view[A],J=e.options.lineWrapping,oe=void 0,he=0;if(F.hidden)continue;if(S&&b<8){var ve=F.node.offsetTop+F.node.offsetHeight;oe=ve-R,R=ve}else{var we=F.node.getBoundingClientRect();oe=we.bottom-we.top,!J&&F.text.firstChild&&(he=F.text.firstChild.getBoundingClientRect().right-we.left-1)}var Be=F.line.height-oe;if((Be>.005||Be<-.005)&&($n(F.line,oe),_a(F.line),F.rest))for(var Xe=0;Xe<F.rest.length;Xe++)_a(F.rest[Xe]);if(he>e.display.sizerWidth){var ut=Math.ceil(he/ci(e.display));ut>e.display.maxLineLength&&(e.display.maxLineLength=ut,e.display.maxLine=F.line,e.display.maxLineChanged=!0)}}}function _a(e){if(e.widgets)for(var i=0;i<e.widgets.length;++i){var R=e.widgets[i],A=R.node.parentNode;A&&(R.height=A.offsetHeight)}}function La(e,i,R){var A=R&&R.top!=null?Math.max(0,R.top):e.scroller.scrollTop;A=Math.floor(A-ei(e));var F=R&&R.bottom!=null?R.bottom:A+e.wrapper.clientHeight,J=Bn(i,A),oe=Bn(i,F);if(R&&R.ensure){var he=R.ensure.from.line,ve=R.ensure.to.line;he<J?(J=he,oe=Bn(i,cr(ur(i,he))+e.wrapper.clientHeight)):Math.min(ve,i.lastLine())>=oe&&(J=Bn(i,cr(ur(i,ve))-e.wrapper.clientHeight),oe=ve)}return{from:J,to:Math.max(oe,J+1)}}function Wa(e,i){if(lt(e,"scrollCursorIntoView"))return;var R=e.display,A=R.sizer.getBoundingClientRect(),F=null;if(i.top+A.top<0?F=!0:i.bottom+A.top>(window.innerHeight||document.documentElement.clientHeight)&&(F=!1),F!=null&&!h){var J=_("div","\u200B",null,`position: absolute;
|
|
|
top: `+(i.top-R.viewOffset-ei(e.display))+`px;
|
|
|
height: `+(i.bottom-i.top+Ye(e)+R.barHeight)+`px;
|
|
|
left: `+i.left+"px; width: "+Math.max(2,i.right-i.left)+"px;");e.display.lineSpace.appendChild(J),J.scrollIntoView(F),e.display.lineSpace.removeChild(J)}}function Xa(e,i,R,A){A==null&&(A=0);var F;!e.options.lineWrapping&&i==R&&(i=i.ch?wt(i.line,i.sticky=="before"?i.ch-1:i.ch,"after"):i,R=i.sticky=="before"?wt(i.line,i.ch+1,"before"):i);for(var J=0;J<5;J++){var oe=!1,he=pn(e,i),ve=!R||R==i?he:pn(e,R);F={left:Math.min(he.left,ve.left),top:Math.min(he.top,ve.top)-A,right:Math.max(he.left,ve.left),bottom:Math.max(he.bottom,ve.bottom)+A};var we=ca(e,F),Be=e.doc.scrollTop,Xe=e.doc.scrollLeft;if(we.scrollTop!=null&&(fa(e,we.scrollTop),Math.abs(e.doc.scrollTop-Be)>1&&(oe=!0)),we.scrollLeft!=null&&($i(e,we.scrollLeft),Math.abs(e.doc.scrollLeft-Xe)>1&&(oe=!0)),!oe)break}return F}function Ma(e,i){var R=ca(e,i);R.scrollTop!=null&&fa(e,R.scrollTop),R.scrollLeft!=null&&$i(e,R.scrollLeft)}function ca(e,i){var R=e.display,A=ti(e.display);i.top<0&&(i.top=0);var F=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:R.scroller.scrollTop,J=Ee(e),oe={};i.bottom-i.top>J&&(i.bottom=i.top+J);var he=e.doc.height+Me(R),ve=i.top<A,we=i.bottom>he-A;if(i.top<F)oe.scrollTop=ve?0:i.top;else if(i.bottom>F+J){var Be=Math.min(i.top,(we?he:i.bottom)-J);Be!=F&&(oe.scrollTop=Be)}var Xe=e.options.fixedGutter?0:R.gutters.offsetWidth,ut=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:R.scroller.scrollLeft-Xe,ot=Fe(e)-R.gutters.offsetWidth,Ot=i.right-i.left>ot;return Ot&&(i.right=i.left+ot),i.left<10?oe.scrollLeft=0:i.left<ut?oe.scrollLeft=Math.max(0,i.left+Xe-(Ot?0:10)):i.right>ot+ut-3&&(oe.scrollLeft=i.right+(Ot?0:10)-ot),oe}function Sa(e,i){if(i==null)return;Ea(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+i}function ba(e){Ea(e);var i=e.getCursor();e.curOp.scrollToPos={from:i,to:i,margin:e.options.cursorScrollMargin}}function da(e,i,R){(i!=null||R!=null)&&Ea(e),i!=null&&(e.curOp.scrollLeft=i),R!=null&&(e.curOp.scrollTop=R)}function co(e,i){Ea(e),e.curOp.scrollToPos=i}function Ea(e){var i=e.curOp.scrollToPos;if(i){e.curOp.scrollToPos=null;var R=jr(e,i.from),A=jr(e,i.to);Ta(e,R,A,i.margin)}}function Ta(e,i,R,A){var F=ca(e,{left:Math.min(i.left,R.left),top:Math.min(i.top,R.top)-A,right:Math.max(i.right,R.right),bottom:Math.max(i.bottom,R.bottom)+A});da(e,F.scrollLeft,F.scrollTop)}function fa(e,i){if(Math.abs(e.doc.scrollTop-i)<2)return;T||za(e,{top:i}),ha(e,i,!0),T&&za(e),Ha(e,100)}function ha(e,i,R){if(i=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,i)),e.display.scroller.scrollTop==i&&!R)return;e.doc.scrollTop=i,e.display.scrollbars.setScrollTop(i),e.display.scroller.scrollTop!=i&&(e.display.scroller.scrollTop=i)}function $i(e,i,R,A){if(i=Math.max(0,Math.min(i,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(R?i==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-i)<2)&&!A)return;e.doc.scrollLeft=i,An(e),e.display.scroller.scrollLeft!=i&&(e.display.scroller.scrollLeft=i),e.display.scrollbars.setScrollLeft(i)}function na(e){var i=e.display,R=i.gutters.offsetWidth,A=Math.round(e.doc.height+Me(e.display));return{clientHeight:i.scroller.clientHeight,viewHeight:i.wrapper.clientHeight,scrollWidth:i.scroller.scrollWidth,clientWidth:i.scroller.clientWidth,viewWidth:i.wrapper.clientWidth,barLeft:e.options.fixedGutter?R:0,docHeight:A,scrollHeight:A+Ye(e)+i.barHeight,nativeBarWidth:i.nativeBarWidth,gutterWidth:R}}var Sr=function(e,i,R){this.cm=R;var A=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),F=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");A.tabIndex=F.tabIndex=-1,e(A),e(F),Re(A,"scroll",function(){A.clientHeight&&i(A.scrollTop,"vertical")}),Re(F,"scroll",function(){F.clientWidth&&i(F.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,S&&b<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Sr.prototype.update=function(e){var i=e.scrollWidth>e.clientWidth+1,R=e.scrollHeight>e.clientHeight+1,A=e.nativeBarWidth;if(R){this.vert.style.display="block",this.vert.style.bottom=i?A+"px":"0";var F=e.viewHeight-(i?A:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+F)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(i){this.horiz.style.display="block",this.horiz.style.right=R?A+"px":"0",this.horiz.style.left=e.barLeft+"px";var J=e.viewWidth-e.barLeft-(R?A:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+J)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(A==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:R?A:0,bottom:i?A:0}},Sr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Sr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Sr.prototype.zeroWidthHack=function(){var e=a&&!o?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ne,this.disableVert=new ne},Sr.prototype.enableZeroWidthBar=function(e,i,R){e.style.pointerEvents="auto";function A(){var F=e.getBoundingClientRect(),J=R=="vert"?document.elementFromPoint(F.right-1,(F.top+F.bottom)/2):document.elementFromPoint((F.right+F.left)/2,F.bottom-1);J!=e?e.style.pointerEvents="none":i.set(1e3,A)}i.set(1e3,A)},Sr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Or=function(){};Or.prototype.update=function(){return{bottom:0,right:0}},Or.prototype.setScrollLeft=function(){},Or.prototype.setScrollTop=function(){},Or.prototype.clear=function(){};function lr(e,i){i||(i=na(e));var R=e.display.barWidth,A=e.display.barHeight;Tn(e,i);for(var F=0;F<4&&R!=e.display.barWidth||A!=e.display.barHeight;F++)R!=e.display.barWidth&&e.options.lineWrapping&&ka(e),Tn(e,na(e)),R=e.display.barWidth,A=e.display.barHeight}function Tn(e,i){var R=e.display,A=R.scrollbars.update(i);R.sizer.style.paddingRight=(R.barWidth=A.right)+"px",R.sizer.style.paddingBottom=(R.barHeight=A.bottom)+"px",R.heightForcer.style.borderBottom=A.bottom+"px solid transparent",A.right&&A.bottom?(R.scrollbarFiller.style.display="block",R.scrollbarFiller.style.height=A.bottom+"px",R.scrollbarFiller.style.width=A.right+"px"):R.scrollbarFiller.style.display="",A.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(R.gutterFiller.style.display="block",R.gutterFiller.style.height=A.bottom+"px",R.gutterFiller.style.width=i.gutterWidth+"px"):R.gutterFiller.style.display=""}var vr={native:Sr,null:Or};function pa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&C(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new vr[e.options.scrollbarStyle](function(i){e.display.wrapper.insertBefore(i,e.display.scrollbarFiller),Re(i,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),i.setAttribute("cm-not-content","true")},function(i,R){R=="horizontal"?$i(e,i):fa(e,i)},e),e.display.scrollbars.addClass&&H(e.display.wrapper,e.display.scrollbars.addClass)}var $a=0;function Kn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++$a},xr(e.curOp)}function Oa(e){var i=e.curOp;i&&Pr(i,function(R){for(var A=0;A<R.ops.length;A++)R.ops[A].cm.curOp=null;Do(R)})}function Do(e){for(var i=e.ops,R=0;R<i.length;R++)Jo(i[R]);for(var A=0;A<i.length;A++)Qo(i[A]);for(var F=0;F<i.length;F++)Zo(i[F]);for(var J=0;J<i.length;J++)fo(i[J]);for(var oe=0;oe<i.length;oe++)qo(i[oe])}function Jo(e){var i=e.cm,R=i.display;Po(i),e.updateMaxLine&&Lr(i),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<R.viewFrom||e.scrollToPos.to.line>=R.viewTo)||R.maxLineChanged&&i.options.lineWrapping,e.update=e.mustUpdate&&new ia(i,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&Aa(e.cm,e.update)}function Zo(e){var i=e.cm,R=i.display;e.updatedDisplay&&ka(i),e.barMeasure=na(i),R.maxLineChanged&&!i.options.lineWrapping&&(e.adjustWidthTo=ze(i,R.maxLine,R.maxLine.text.length).left+3,i.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(R.scroller.clientWidth,R.sizer.offsetLeft+e.adjustWidthTo+Ye(i)+i.display.barWidth),e.maxScrollLeft=Math.max(0,R.sizer.offsetLeft+e.adjustWidthTo-Fe(i))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=R.input.prepareSelection())}function fo(e){var i=e.cm;e.adjustWidthTo!=null&&(i.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<i.doc.scrollLeft&&$i(i,Math.min(i.display.scroller.scrollLeft,e.maxScrollLeft),!0),i.display.maxLineChanged=!1);var R=e.focus&&e.focus==G();e.preparedSelection&&i.display.input.showSelection(e.preparedSelection,R),(e.updatedDisplay||e.startHeight!=i.doc.height)&&lr(i,e.barMeasure),e.updatedDisplay&&Un(i,e.barMeasure),e.selectionChanged&&ai(i),i.state.focused&&e.updateInput&&i.display.input.reset(e.typing),R&&Ba(e.cm)}function qo(e){var i=e.cm,R=i.display,A=i.doc;if(e.updatedDisplay&&Ya(i,e.update),R.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(R.wheelStartX=R.wheelStartY=null),e.scrollTop!=null&&ha(i,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&$i(i,e.scrollLeft,!0,!0),e.scrollToPos){var F=Xa(i,z(A,e.scrollToPos.from),z(A,e.scrollToPos.to),e.scrollToPos.margin);Wa(i,F)}var J=e.maybeHiddenMarkers,oe=e.maybeUnhiddenMarkers;if(J)for(var he=0;he<J.length;++he)J[he].lines.length||Qe(J[he],"hide");if(oe)for(var ve=0;ve<oe.length;++ve)oe[ve].lines.length&&Qe(oe[ve],"unhide");R.wrapper.offsetHeight&&(A.scrollTop=i.display.scroller.scrollTop),e.changeObjs&&Qe(i,"changes",i,e.changeObjs),e.update&&e.update.finish()}function Wi(e,i){if(e.curOp)return i();Kn(e);try{return i()}finally{Oa(e)}}function pi(e,i){return function(){if(e.curOp)return i.apply(e,arguments);Kn(e);try{return i.apply(e,arguments)}finally{Oa(e)}}}function Pi(e){return function(){if(this.curOp)return e.apply(this,arguments);Kn(this);try{return e.apply(this,arguments)}finally{Oa(this)}}}function mi(e){return function(){var i=this.cm;if(!i||i.curOp)return e.apply(this,arguments);Kn(i);try{return e.apply(this,arguments)}finally{Oa(i)}}}function Ha(e,i){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(i,U(es,e))}function es(e){var i=e.doc;if(i.highlightFrontier>=e.display.viewTo)return;var R=+new Date+e.options.workTime,A=Vt(e,i.highlightFrontier),F=[];i.iter(A.line,Math.min(i.first+i.size,e.display.viewTo+500),function(J){if(A.line>=e.display.viewFrom){var oe=J.styles,he=J.text.length>e.options.maxHighlightLength?Xr(i.mode,A.state):null,ve=Ke(e,J,A,!0);he&&(A.state=he),J.styles=ve.styles;var we=J.styleClasses,Be=ve.classes;Be?J.styleClasses=Be:we&&(J.styleClasses=null);for(var Xe=!oe||oe.length!=J.styles.length||we!=Be&&(!we||!Be||we.bgClass!=Be.bgClass||we.textClass!=Be.textClass),ut=0;!Xe&&ut<oe.length;++ut)Xe=oe[ut]!=J.styles[ut];Xe&&F.push(A.line),J.stateAfter=A.save(),A.nextLine()}else J.text.length<=e.options.maxHighlightLength&&Er(e,J.text,A),J.stateAfter=A.line%5==0?A.save():null,A.nextLine();if(+new Date>R)return Ha(e,e.options.workDelay),!0}),i.highlightFrontier=A.line,i.modeFrontier=Math.max(i.modeFrontier,A.line),F.length&&Wi(e,function(){for(var J=0;J<F.length;J++)Qn(e,F[J],"text")})}var ia=function(e,i,R){var A=e.display;this.viewport=i,this.visible=La(A,e.doc,i),this.editorIsHidden=!A.wrapper.offsetWidth,this.wrapperHeight=A.wrapper.clientHeight,this.wrapperWidth=A.wrapper.clientWidth,this.oldDisplayWidth=Fe(e),this.force=R,this.dims=Jn(e),this.events=[]};ia.prototype.signal=function(e,i){Le(e,i)&&this.events.push(arguments)},ia.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Qe.apply(null,this.events[e])};function Po(e){var i=e.display;!i.scrollbarsClipped&&i.scroller.offsetWidth&&(i.nativeBarWidth=i.scroller.offsetWidth-i.scroller.clientWidth,i.heightForcer.style.height=Ye(e)+"px",i.sizer.style.marginBottom=-i.nativeBarWidth+"px",i.sizer.style.borderRightWidth=Ye(e)+"px",i.scrollbarsClipped=!0)}function ko(e){if(e.hasFocus())return null;var i=G();if(!i||!N(e.display.lineDiv,i))return null;var R={activeElt:i};if(window.getSelection){var A=window.getSelection();A.anchorNode&&A.extend&&N(e.display.lineDiv,A.anchorNode)&&(R.anchorNode=A.anchorNode,R.anchorOffset=A.anchorOffset,R.focusNode=A.focusNode,R.focusOffset=A.focusOffset)}return R}function Lo(e){if(!e||!e.activeElt||e.activeElt==G())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&N(document.body,e.anchorNode)&&N(document.body,e.focusNode)){var i=window.getSelection(),R=document.createRange();R.setEnd(e.anchorNode,e.anchorOffset),R.collapse(!1),i.removeAllRanges(),i.addRange(R),i.extend(e.focusNode,e.focusOffset)}}function Aa(e,i){var R=e.display,A=e.doc;if(i.editorIsHidden)return Vn(e),!1;if(!i.force&&i.visible.from>=R.viewFrom&&i.visible.to<=R.viewTo&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo)&&R.renderedView==R.view&&ra(e)==0)return!1;wi(e)&&(Vn(e),i.dims=Jn(e));var F=A.first+A.size,J=Math.max(i.visible.from-e.options.viewportMargin,A.first),oe=Math.min(F,i.visible.to+e.options.viewportMargin);R.viewFrom<J&&J-R.viewFrom<20&&(J=Math.max(A.first,R.viewFrom)),R.viewTo>oe&&R.viewTo-oe<20&&(oe=Math.min(F,R.viewTo)),ni&&(J=tr(e.doc,J),oe=qt(e.doc,oe));var he=J!=R.viewFrom||oe!=R.viewTo||R.lastWrapHeight!=i.wrapperHeight||R.lastWrapWidth!=i.wrapperWidth;Di(e,J,oe),R.viewOffset=cr(ur(e.doc,R.viewFrom)),e.display.mover.style.top=R.viewOffset+"px";var ve=ra(e);if(!he&&ve==0&&!i.force&&R.renderedView==R.view&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo))return!1;var we=ko(e);return ve>4&&(R.lineDiv.style.display="none"),Mo(e,R.updateLineNumbers,i.dims),ve>4&&(R.lineDiv.style.display=""),R.renderedView=R.view,Lo(we),x(R.cursorDiv),x(R.selectionDiv),R.gutters.style.height=R.sizer.style.minHeight=0,he&&(R.lastWrapHeight=i.wrapperHeight,R.lastWrapWidth=i.wrapperWidth,Ha(e,400)),R.updateLineNumbers=null,!0}function Ya(e,i){for(var R=i.viewport,A=!0;;A=!1){if(!A||!e.options.lineWrapping||i.oldDisplayWidth==Fe(e)){if(R&&R.top!=null&&(R={top:Math.min(e.doc.height+Me(e.display)-Ee(e),R.top)}),i.visible=La(e.display,e.doc,R),i.visible.from>=e.display.viewFrom&&i.visible.to<=e.display.viewTo)break}else A&&(i.visible=La(e.display,e.doc,R));if(!Aa(e,i))break;ka(e);var F=na(e);Mn(e),lr(e,F),Un(e,F),i.force=!1}i.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(i.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function za(e,i){var R=new ia(e,i);if(Aa(e,R)){ka(e),Ya(e,R);var A=na(e);Mn(e),lr(e,A),Un(e,A),R.finish()}}function Mo(e,i,R){var A=e.display,F=e.options.lineNumbers,J=A.lineDiv,oe=J.firstChild;function he(Ot){var Bt=Ot.nextSibling;return d&&a&&e.display.currentWheelTarget==Ot?Ot.style.display="none":Ot.parentNode.removeChild(Ot),Bt}for(var ve=A.view,we=A.viewFrom,Be=0;Be<ve.length;Be++){var Xe=ve[Be];if(!Xe.hidden)if(!Xe.node||Xe.node.parentNode!=J){var ut=kr(e,Xe,we,R);J.insertBefore(ut,oe)}else{for(;oe!=Xe.node;)oe=he(oe);var ot=F&&i!=null&&i<=we&&Xe.lineNumber;Xe.changes&&(fe(Xe.changes,"gutter")>-1&&(ot=!1),er(e,Xe,we,R)),ot&&(x(Xe.lineNumber),Xe.lineNumber.appendChild(document.createTextNode(li(e.options,we)))),oe=Xe.node.nextSibling}we+=Xe.size}for(;oe;)oe=he(oe)}function Ja(e){var i=e.gutters.offsetWidth;e.sizer.style.marginLeft=i+"px"}function Un(e,i){e.display.sizer.style.minHeight=i.docHeight+"px",e.display.heightForcer.style.top=i.docHeight+"px",e.display.gutters.style.height=i.docHeight+e.display.barHeight+Ye(e)+"px"}function An(e){var i=e.display,R=i.view;if(!i.alignWidgets&&(!i.gutters.firstChild||!e.options.fixedGutter))return;for(var A=gi(i)-i.scroller.scrollLeft+e.doc.scrollLeft,F=i.gutters.offsetWidth,J=A+"px",oe=0;oe<R.length;oe++)if(!R[oe].hidden){e.options.fixedGutter&&(R[oe].gutter&&(R[oe].gutter.style.left=J),R[oe].gutterBackground&&(R[oe].gutterBackground.style.left=J));var he=R[oe].alignable;if(he)for(var ve=0;ve<he.length;ve++)he[ve].style.left=J}e.options.fixedGutter&&(i.gutters.style.left=A+F+"px")}function wi(e){if(!e.options.lineNumbers)return!1;var i=e.doc,R=li(e.options,i.first+i.size-1),A=e.display;if(R.length!=A.lineNumChars){var F=A.measure.appendChild(_("div",[_("div",R)],"CodeMirror-linenumber CodeMirror-gutter-elt")),J=F.firstChild.offsetWidth,oe=F.offsetWidth-J;return A.lineGutter.style.width="",A.lineNumInnerWidth=Math.max(J,A.lineGutter.offsetWidth-oe)+1,A.lineNumWidth=A.lineNumInnerWidth+oe,A.lineNumChars=A.lineNumInnerWidth?R.length:-1,A.lineGutter.style.width=A.lineNumWidth+"px",Ja(e.display),!0}return!1}function Hi(e,i){for(var R=[],A=!1,F=0;F<e.length;F++){var J=e[F],oe=null;if(typeof J!="string"&&(oe=J.style,J=J.className),J=="CodeMirror-linenumbers")if(i)A=!0;else continue;R.push({className:J,style:oe})}return i&&!A&&R.push({className:"CodeMirror-linenumbers",style:null}),R}function Ia(e){var i=e.gutters,R=e.gutterSpecs;x(i),e.lineGutter=null;for(var A=0;A<R.length;++A){var F=R[A],J=F.className,oe=F.style,he=i.appendChild(_("div",null,"CodeMirror-gutter "+J));oe&&(he.style.cssText=oe),J=="CodeMirror-linenumbers"&&(e.lineGutter=he,he.style.width=(e.lineNumWidth||1)+"px")}i.style.display=R.length?"":"none",Ja(e)}function ma(e){Ia(e.display),zn(e),An(e)}function Ka(e,i,R,A){var F=this;this.input=R,F.scrollbarFiller=_("div",null,"CodeMirror-scrollbar-filler"),F.scrollbarFiller.setAttribute("cm-not-content","true"),F.gutterFiller=_("div",null,"CodeMirror-gutter-filler"),F.gutterFiller.setAttribute("cm-not-content","true"),F.lineDiv=M("div",null,"CodeMirror-code"),F.selectionDiv=_("div",null,null,"position: relative; z-index: 1"),F.cursorDiv=_("div",null,"CodeMirror-cursors"),F.measure=_("div",null,"CodeMirror-measure"),F.lineMeasure=_("div",null,"CodeMirror-measure"),F.lineSpace=M("div",[F.measure,F.lineMeasure,F.selectionDiv,F.cursorDiv,F.lineDiv],null,"position: relative; outline: none");var J=M("div",[F.lineSpace],"CodeMirror-lines");F.mover=_("div",[J],null,"position: relative"),F.sizer=_("div",[F.mover],"CodeMirror-sizer"),F.sizerWidth=null,F.heightForcer=_("div",null,null,"position: absolute; height: "+me+"px; width: 1px;"),F.gutters=_("div",null,"CodeMirror-gutters"),F.lineGutter=null,F.scroller=_("div",[F.sizer,F.heightForcer,F.gutters],"CodeMirror-scroll"),F.scroller.setAttribute("tabIndex","-1"),F.wrapper=_("div",[F.scrollbarFiller,F.gutterFiller,F.scroller],"CodeMirror"),S&&b<8&&(F.gutters.style.zIndex=-1,F.scroller.style.paddingRight=0),!d&&!(T&&r)&&(F.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(F.wrapper):e(F.wrapper)),F.viewFrom=F.viewTo=i.first,F.reportedViewFrom=F.reportedViewTo=i.first,F.view=[],F.renderedView=null,F.externalMeasured=null,F.viewOffset=0,F.lastWrapHeight=F.lastWrapWidth=0,F.updateLineNumbers=null,F.nativeBarWidth=F.barHeight=F.barWidth=0,F.scrollbarsClipped=!1,F.lineNumWidth=F.lineNumInnerWidth=F.lineNumChars=null,F.alignWidgets=!1,F.cachedCharWidth=F.cachedTextHeight=F.cachedPaddingH=null,F.maxLine=null,F.maxLineLength=0,F.maxLineChanged=!1,F.wheelDX=F.wheelDY=F.wheelStartX=F.wheelStartY=null,F.shift=!1,F.selForContextMenu=null,F.activeTouch=null,F.gutterSpecs=Hi(A.gutters,A.lineNumbers),Ia(F),R.init(F)}var xa=0,_i=null;S?_i=-.53:T?_i=15:n?_i=-.7:u&&(_i=-1/3);function Qa(e){var i=e.wheelDeltaX,R=e.wheelDeltaY;return i==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(i=e.detail),R==null&&e.detail&&e.axis==e.VERTICAL_AXIS?R=e.detail:R==null&&(R=e.wheelDelta),{x:i,y:R}}function ho(e){var i=Qa(e);return i.x*=_i,i.y*=_i,i}function po(e,i){var R=Qa(i),A=R.x,F=R.y,J=e.display,oe=J.scroller,he=oe.scrollWidth>oe.clientWidth,ve=oe.scrollHeight>oe.clientHeight;if(!(A&&he||F&&ve))return;if(F&&a&&d){e:for(var we=i.target,Be=J.view;we!=oe;we=we.parentNode)for(var Xe=0;Xe<Be.length;Xe++)if(Be[Xe].node==we){e.display.currentWheelTarget=we;break e}}if(A&&!T&&!c&&_i!=null){F&&ve&&fa(e,Math.max(0,oe.scrollTop+F*_i)),$i(e,Math.max(0,oe.scrollLeft+A*_i)),(!F||F&&ve)&&Ce(i),J.wheelStartX=null;return}if(F&&_i!=null){var ut=F*_i,ot=e.doc.scrollTop,Ot=ot+J.wrapper.clientHeight;ut<0?ot=Math.max(0,ot+ut-50):Ot=Math.min(e.doc.height,Ot+ut+50),za(e,{top:ot,bottom:Ot})}xa<20&&(J.wheelStartX==null?(J.wheelStartX=oe.scrollLeft,J.wheelStartY=oe.scrollTop,J.wheelDX=A,J.wheelDY=F,setTimeout(function(){if(J.wheelStartX==null)return;var Bt=oe.scrollLeft-J.wheelStartX,Qt=oe.scrollTop-J.wheelStartY,ir=Qt&&J.wheelDY&&Qt/J.wheelDY||Bt&&J.wheelDX&&Bt/J.wheelDX;if(J.wheelStartX=J.wheelStartY=null,!ir)return;_i=(_i*xa+ir)/(xa+1),++xa},200)):(J.wheelDX+=A,J.wheelDY+=F))}var zi=function(e,i){this.ranges=e,this.primIndex=i};zi.prototype.primary=function(){return this.ranges[this.primIndex]},zi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var i=0;i<this.ranges.length;i++){var R=this.ranges[i],A=e.ranges[i];if(!en(R.anchor,A.anchor)||!en(R.head,A.head))return!1}return!0},zi.prototype.deepCopy=function(){for(var e=[],i=0;i<this.ranges.length;i++)e[i]=new Nn(Cn(this.ranges[i].anchor),Cn(this.ranges[i].head));return new zi(e,this.primIndex)},zi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},zi.prototype.contains=function(e,i){i||(i=e);for(var R=0;R<this.ranges.length;R++){var A=this.ranges[R];if($t(i,A.from())>=0&&$t(e,A.to())<=0)return R}return-1};var Nn=function(e,i){this.anchor=e,this.head=i};Nn.prototype.from=function(){return On(this.anchor,this.head)},Nn.prototype.to=function(){return _n(this.anchor,this.head)},Nn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function aa(e,i,R){var A=e&&e.options.selectionsMayTouch,F=i[R];i.sort(function(ut,ot){return $t(ut.from(),ot.from())}),R=fe(i,F);for(var J=1;J<i.length;J++){var oe=i[J],he=i[J-1],ve=$t(he.to(),oe.from());if(A&&!oe.empty()?ve>0:ve>=0){var we=On(he.from(),oe.from()),Be=_n(he.to(),oe.to()),Xe=he.empty()?oe.from()==oe.head:he.from()==he.head;J<=R&&--R,i.splice(--J,2,new Nn(Xe?Be:we,Xe?we:Be))}}return new zi(i,R)}function va(e,i){return new zi([new Nn(e,i||e)],0)}function ga(e){return e.text?wt(e.from.line+e.text.length-1,re(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function mo(e,i){if($t(e,i.from)<0)return e;if($t(e,i.to)<=0)return ga(i);var R=e.line+i.text.length-(i.to.line-i.from.line)-1,A=e.ch;return e.line==i.to.line&&(A+=ga(i).ch-i.to.ch),wt(R,A)}function Za(e,i){for(var R=[],A=0;A<e.sel.ranges.length;A++){var F=e.sel.ranges[A];R.push(new Nn(mo(F.anchor,i),mo(F.head,i)))}return aa(e.cm,R,e.sel.primIndex)}function Io(e,i,R){return e.line==i.line?wt(R.line,e.ch-i.ch+R.ch):wt(R.line+(e.line-i.line),e.ch)}function No(e,i,R){for(var A=[],F=wt(e.first,0),J=F,oe=0;oe<i.length;oe++){var he=i[oe],ve=Io(he.from,F,J),we=Io(ga(he),F,J);if(F=he.to,J=we,R=="around"){var Be=e.sel.ranges[oe],Xe=$t(Be.head,Be.anchor)<0;A[oe]=new Nn(Xe?we:ve,Xe?ve:we)}else A[oe]=new Nn(ve,ve)}return new zi(A,e.sel.primIndex)}function Ra(e){e.doc.mode=or(e.options,e.doc.modeOption),vo(e)}function vo(e){e.doc.iter(function(i){i.stateAfter&&(i.stateAfter=null),i.styles&&(i.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Ha(e,100),e.state.modeGen++,e.curOp&&zn(e)}function vs(e,i){return i.from.ch==0&&i.to.ch==0&&re(i.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,i,R,A){function F(_r){return R?R[_r]:null}function J(_r,ar,Rr){Cr(_r,ar,Rr,A),Zt(_r,"change",_r,i)}function oe(_r,ar){for(var Rr=[],qr=_r;qr<ar;++qr)Rr.push(new Fr(we[qr],F(qr),A));return Rr}var he=i.from,ve=i.to,we=i.text,Be=ur(e,he.line),Xe=ur(e,ve.line),ut=re(we),ot=F(we.length-1),Ot=ve.line-he.line;if(i.full)e.insert(0,oe(0,we.length)),e.remove(we.length,e.size-we.length);else if(vs(e,i)){var Bt=oe(0,we.length-1);J(Xe,Xe.text,ot),Ot&&e.remove(he.line,Ot),Bt.length&&e.insert(he.line,Bt)}else if(Be==Xe)if(we.length==1)J(Be,Be.text.slice(0,he.ch)+ut+Be.text.slice(ve.ch),ot);else{var Qt=oe(1,we.length-1);Qt.push(new Fr(ut+Be.text.slice(ve.ch),ot,A)),J(Be,Be.text.slice(0,he.ch)+we[0],F(0)),e.insert(he.line+1,Qt)}else if(we.length==1)J(Be,Be.text.slice(0,he.ch)+we[0]+Xe.text.slice(ve.ch),F(0)),e.remove(he.line+1,Ot);else{J(Be,Be.text.slice(0,he.ch)+we[0],F(0)),J(Xe,ut+Xe.text.slice(ve.ch),ot);var ir=oe(1,we.length-1);Ot>1&&e.remove(he.line+1,Ot-1),e.insert(he.line+1,ir)}Zt(e,"change",e,i)}function Na(e,i,R){function A(F,J,oe){if(F.linked)for(var he=0;he<F.linked.length;++he){var ve=F.linked[he];if(ve.doc==J)continue;var we=oe&&ve.sharedHist;if(R&&!we)continue;i(ve.doc,we),A(ve.doc,F,we)}}A(e,null,!0)}function gs(e,i){if(i.cm)throw new Error("This document is already in use.");e.doc=i,i.cm=e,Oi(e),Ra(e),ys(e),e.options.lineWrapping||Lr(e),e.options.mode=i.modeOption,zn(e)}function ys(e){(e.doc.direction=="rtl"?H:C)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Wi(e,function(){ys(e),zn(e)})}function jo(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function rs(e,i){var R={from:Cn(i.from),to:ga(i),text:Xn(e,i.from,i.to)};return xs(e,R,i.from.line,i.to.line+1),Na(e,function(A){return xs(A,R,i.from.line,i.to.line+1)},!0),R}function bs(e){for(;e.length;){var i=re(e);if(i.ranges)e.pop();else break}}function ml(e,i){if(i)return bs(e.done),re(e.done);if(e.done.length&&!re(e.done).ranges)return re(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),re(e.done)}function Es(e,i,R,A){var F=e.history;F.undone.length=0;var J=+new Date,oe,he;if((F.lastOp==A||F.lastOrigin==i.origin&&i.origin&&(i.origin.charAt(0)=="+"&&F.lastModTime>J-(e.cm?e.cm.options.historyEventDelay:500)||i.origin.charAt(0)=="*"))&&(oe=ml(F,F.lastOp==A)))he=re(oe.changes),$t(i.from,i.to)==0&&$t(i.from,he.to)==0?he.to=ga(i):oe.changes.push(rs(e,i));else{var ve=re(F.done);for((!ve||!ve.ranges)&&Fo(e.sel,F.done),oe={changes:[rs(e,i)],generation:F.generation},F.done.push(oe);F.done.length>F.undoDepth;)F.done.shift(),F.done[0].ranges||F.done.shift()}F.done.push(R),F.generation=++F.maxGeneration,F.lastModTime=F.lastSelTime=J,F.lastOp=F.lastSelOp=A,F.lastOrigin=F.lastSelOrigin=i.origin,he||Qe(e,"historyAdded")}function vl(e,i,R,A){var F=i.charAt(0);return F=="*"||F=="+"&&R.ranges.length==A.ranges.length&&R.somethingSelected()==A.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,i,R,A){var F=e.history,J=A&&A.origin;R==F.lastSelOp||J&&F.lastSelOrigin==J&&(F.lastModTime==F.lastSelTime&&F.lastOrigin==J||vl(e,J,re(F.done),i))?F.done[F.done.length-1]=i:Fo(i,F.done),F.lastSelTime=+new Date,F.lastSelOrigin=J,F.lastSelOp=R,A&&A.clearRedo!==!1&&bs(F.undone)}function Fo(e,i){var R=re(i);R&&R.ranges&&R.equals(e)||i.push(e)}function xs(e,i,R,A){var F=i["spans_"+e.id],J=0;e.iter(Math.max(e.first,R),Math.min(e.first+e.size,A),function(oe){oe.markedSpans&&((F||(F=i["spans_"+e.id]={}))[J]=oe.markedSpans),++J})}function yl(e){if(!e)return null;for(var i,R=0;R<e.length;++R)e[R].marker.explicitlyCleared?i||(i=e.slice(0,R)):i&&i.push(e[R]);return i?i.length?i:null:e}function bl(e,i){var R=i["spans_"+e.id];if(!R)return null;for(var A=[],F=0;F<i.text.length;++F)A.push(yl(R[F]));return A}function Cs(e,i){var R=bl(e,i),A=Ii(e,i);if(!R)return A;if(!A)return R;for(var F=0;F<R.length;++F){var J=R[F],oe=A[F];if(J&&oe){e:for(var he=0;he<oe.length;++he){for(var ve=oe[he],we=0;we<J.length;++we)if(J[we].marker==ve.marker)continue e;J.push(ve)}}else oe&&(R[F]=oe)}return R}function qa(e,i,R){for(var A=[],F=0;F<e.length;++F){var J=e[F];if(J.ranges){A.push(R?zi.prototype.deepCopy.call(J):J);continue}var oe=J.changes,he=[];A.push({changes:he});for(var ve=0;ve<oe.length;++ve){var we=oe[ve],Be=void 0;if(he.push({from:we.from,to:we.to,text:we.text}),i)for(var Xe in we)(Be=Xe.match(/^spans_(\d+)$/))&&(fe(i,Number(Be[1]))>-1&&(re(he)[Xe]=we[Xe],delete we[Xe]))}}return A}function ns(e,i,R,A){if(A){var F=e.anchor;if(R){var J=$t(i,F)<0;J!=$t(R,F)<0?(F=i,i=R):J!=$t(i,R)<0&&(i=R)}return new Nn(F,i)}else return new Nn(R||i,i)}function Uo(e,i,R,A,F){F==null&&(F=e.cm&&(e.cm.display.shift||e.extend)),Ni(e,new zi([ns(e.sel.primary(),i,R,F)],0),A)}function ws(e,i,R){for(var A=[],F=e.cm&&(e.cm.display.shift||e.extend),J=0;J<e.sel.ranges.length;J++)A[J]=ns(e.sel.ranges[J],i[J],null,F);var oe=aa(e.cm,A,e.sel.primIndex);Ni(e,oe,R)}function is(e,i,R,A){var F=e.sel.ranges.slice(0);F[i]=R,Ni(e,aa(e.cm,F,e.sel.primIndex),A)}function _s(e,i,R,A){Ni(e,va(i,R),A)}function El(e,i,R){var A={ranges:i.ranges,update:function(F){this.ranges=[];for(var J=0;J<F.length;J++)this.ranges[J]=new Nn(z(e,F[J].anchor),z(e,F[J].head))},origin:R&&R.origin};return Qe(e,"beforeSelectionChange",e,A),e.cm&&Qe(e.cm,"beforeSelectionChange",e.cm,A),A.ranges!=i.ranges?aa(e.cm,A.ranges,A.ranges.length-1):i}function Ss(e,i,R){var A=e.history.done,F=re(A);F&&F.ranges?(A[A.length-1]=i,Bo(e,i,R)):Ni(e,i,R)}function Ni(e,i,R){Bo(e,i,R),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,R)}function Bo(e,i,R){(Le(e,"beforeSelectionChange")||e.cm&&Le(e.cm,"beforeSelectionChange"))&&(i=El(e,i,R));var A=R&&R.bias||($t(i.primary().head,e.sel.primary().head)<0?-1:1);Ts(e,As(e,i,A,!0)),!(R&&R.scroll===!1)&&e.cm&&ba(e.cm)}function Ts(e,i){if(i.equals(e.sel))return;e.sel=i,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ue(e.cm)),Zt(e,"cursorActivity",e)}function Os(e){Ts(e,As(e,e.sel,null,!1))}function As(e,i,R,A){for(var F,J=0;J<i.ranges.length;J++){var oe=i.ranges[J],he=i.ranges.length==e.sel.ranges.length&&e.sel.ranges[J],ve=Wo(e,oe.anchor,he&&he.anchor,R,A),we=Wo(e,oe.head,he&&he.head,R,A);(F||ve!=oe.anchor||we!=oe.head)&&(F||(F=i.ranges.slice(0,J)),F[J]=new Nn(ve,we))}return F?aa(e.cm,F,i.primIndex):i}function eo(e,i,R,A,F){var J=ur(e,i.line);if(J.markedSpans)for(var oe=0;oe<J.markedSpans.length;++oe){var he=J.markedSpans[oe],ve=he.marker,we="selectLeft"in ve?!ve.selectLeft:ve.inclusiveLeft,Be="selectRight"in ve?!ve.selectRight:ve.inclusiveRight;if((he.from==null||(we?he.from<=i.ch:he.from<i.ch))&&(he.to==null||(Be?he.to>=i.ch:he.to>i.ch))){if(F&&(Qe(ve,"beforeCursorEnter"),ve.explicitlyCleared))if(J.markedSpans){--oe;continue}else break;if(!ve.atomic)continue;if(R){var Xe=ve.find(A<0?1:-1),ut=void 0;if((A<0?Be:we)&&(Xe=Rs(e,Xe,-A,Xe&&Xe.line==i.line?J:null)),Xe&&Xe.line==i.line&&(ut=$t(Xe,R))&&(A<0?ut<0:ut>0))return eo(e,Xe,i,A,F)}var ot=ve.find(A<0?-1:1);return(A<0?we:Be)&&(ot=Rs(e,ot,A,ot.line==i.line?J:null)),ot?eo(e,ot,i,A,F):null}}return i}function Wo(e,i,R,A,F){var J=A||1,oe=eo(e,i,R,J,F)||!F&&eo(e,i,R,J,!0)||eo(e,i,R,-J,F)||!F&&eo(e,i,R,-J,!0);return oe||(e.cantEdit=!0,wt(e.first,0))}function Rs(e,i,R,A){return R<0&&i.ch==0?i.line>e.first?z(e,wt(i.line-1)):null:R>0&&i.ch==(A||ur(e,i.line)).text.length?i.line<e.first+e.size-1?wt(i.line+1,0):null:new wt(i.line,i.ch+R)}function Ds(e){e.setSelection(wt(e.firstLine(),0),wt(e.lastLine()),De)}function Ps(e,i,R){var A={canceled:!1,from:i.from,to:i.to,text:i.text,origin:i.origin,cancel:function(){return A.canceled=!0}};return R&&(A.update=function(F,J,oe,he){F&&(A.from=z(e,F)),J&&(A.to=z(e,J)),oe&&(A.text=oe),he!==void 0&&(A.origin=he)}),Qe(e,"beforeChange",e,A),e.cm&&Qe(e.cm,"beforeChange",e.cm,A),A.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:A.from,to:A.to,text:A.text,origin:A.origin}}function to(e,i,R){if(e.cm){if(!e.cm.curOp)return pi(e.cm,to)(e,i,R);if(e.cm.state.suppressEdits)return}if((Le(e,"beforeChange")||e.cm&&Le(e.cm,"beforeChange"))&&(i=Ps(e,i,!0),!i))return;var A=qi&&!R&&Vi(e,i.from,i.to);if(A)for(var F=A.length-1;F>=0;--F)ks(e,{from:A[F].from,to:A[F].to,text:F?[""]:i.text,origin:i.origin});else ks(e,i)}function ks(e,i){if(i.text.length==1&&i.text[0]==""&&$t(i.from,i.to)==0)return;var R=Za(e,i);Es(e,i,R,e.cm?e.cm.curOp.id:NaN),go(e,i,R,Ii(e,i));var A=[];Na(e,function(F,J){!J&&fe(A,F.history)==-1&&(Ns(F.history,i),A.push(F.history)),go(F,i,null,Ii(F,i))})}function Ho(e,i,R){var A=e.cm&&e.cm.state.suppressEdits;if(A&&!R)return;for(var F=e.history,J,oe=e.sel,he=i=="undo"?F.done:F.undone,ve=i=="undo"?F.undone:F.done,we=0;we<he.length&&!(J=he[we],R?J.ranges&&!J.equals(e.sel):!J.ranges);we++);if(we==he.length)return;for(F.lastOrigin=F.lastSelOrigin=null;;)if(J=he.pop(),J.ranges){if(Fo(J,ve),R&&!J.equals(e.sel)){Ni(e,J,{clearRedo:!1});return}oe=J}else if(A){he.push(J);return}else break;var Be=[];Fo(oe,ve),ve.push({changes:Be,generation:F.generation}),F.generation=J.generation||++F.maxGeneration;for(var Xe=Le(e,"beforeChange")||e.cm&&Le(e.cm,"beforeChange"),ut=function(Bt){var Qt=J.changes[Bt];if(Qt.origin=i,Xe&&!Ps(e,Qt,!1))return he.length=0,{};Be.push(rs(e,Qt));var ir=Bt?Za(e,Qt):re(he);go(e,Qt,ir,Cs(e,Qt)),!Bt&&e.cm&&e.cm.scrollIntoView({from:Qt.from,to:ga(Qt)});var _r=[];Na(e,function(ar,Rr){!Rr&&fe(_r,ar.history)==-1&&(Ns(ar.history,Qt),_r.push(ar.history)),go(ar,Qt,null,Cs(ar,Qt))})},ot=J.changes.length-1;ot>=0;--ot){var Ot=ut(ot);if(Ot)return Ot.v}}function Ls(e,i){if(i==0)return;if(e.first+=i,e.sel=new zi(pe(e.sel.ranges,function(F){return new Nn(wt(F.anchor.line+i,F.anchor.ch),wt(F.head.line+i,F.head.ch))}),e.sel.primIndex),e.cm){zn(e.cm,e.first,e.first-i,i);for(var R=e.cm.display,A=R.viewFrom;A<R.viewTo;A++)Qn(e.cm,A,"gutter")}}function go(e,i,R,A){if(e.cm&&!e.cm.curOp)return pi(e.cm,go)(e,i,R,A);if(i.to.line<e.first){Ls(e,i.text.length-1-(i.to.line-i.from.line));return}if(i.from.line>e.lastLine())return;if(i.from.line<e.first){var F=i.text.length-1-(e.first-i.from.line);Ls(e,F),i={from:wt(e.first,0),to:wt(i.to.line+F,i.to.ch),text:[re(i.text)],origin:i.origin}}var J=e.lastLine();i.to.line>J&&(i={from:i.from,to:wt(J,ur(e,J).text.length),text:[i.text[0]],origin:i.origin}),i.removed=Xn(e,i.from,i.to),R||(R=Za(e,i)),e.cm?xl(e.cm,i,A):ts(e,i,A),Bo(e,R,De),e.cantEdit&&Wo(e,wt(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,i,R){var A=e.doc,F=e.display,J=i.from,oe=i.to,he=!1,ve=J.line;e.options.lineWrapping||(ve=Zr(At(ur(A,J.line))),A.iter(ve,oe.line+1,function(ot){if(ot==F.maxLine)return he=!0,!0})),A.sel.contains(i.from,i.to)>-1&&Ue(e),ts(A,i,R,Xi(e)),e.options.lineWrapping||(A.iter(ve,J.line+i.text.length,function(ot){var Ot=st(ot);Ot>F.maxLineLength&&(F.maxLine=ot,F.maxLineLength=Ot,F.maxLineChanged=!0,he=!1)}),he&&(e.curOp.updateMaxLine=!0)),Li(A,J.line),Ha(e,400);var we=i.text.length-(oe.line-J.line)-1;i.full?zn(e):J.line==oe.line&&i.text.length==1&&!vs(e.doc,i)?Qn(e,J.line,"text"):zn(e,J.line,oe.line+1,we);var Be=Le(e,"changes"),Xe=Le(e,"change");if(Xe||Be){var ut={from:J,to:oe,text:i.text,removed:i.removed,origin:i.origin};Xe&&Zt(e,"change",e,ut),Be&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(ut)}e.display.selForContextMenu=null}function ro(e,i,R,A,F){var J;A||(A=R),$t(A,R)<0&&(J=[A,R],R=J[0],A=J[1]),typeof i=="string"&&(i=e.splitLines(i)),to(e,{from:R,to:A,text:i,origin:F})}function Ms(e,i,R,A){R<e.line?e.line+=A:i<e.line&&(e.line=i,e.ch=0)}function Is(e,i,R,A){for(var F=0;F<e.length;++F){var J=e[F],oe=!0;if(J.ranges){J.copied||(J=e[F]=J.deepCopy(),J.copied=!0);for(var he=0;he<J.ranges.length;he++)Ms(J.ranges[he].anchor,i,R,A),Ms(J.ranges[he].head,i,R,A);continue}for(var ve=0;ve<J.changes.length;++ve){var we=J.changes[ve];if(R<we.from.line)we.from=wt(we.from.line+A,we.from.ch),we.to=wt(we.to.line+A,we.to.ch);else if(i<=we.to.line){oe=!1;break}}oe||(e.splice(0,F+1),F=0)}}function Ns(e,i){var R=i.from.line,A=i.to.line,F=i.text.length-(A-R)-1;Is(e.done,R,A,F),Is(e.undone,R,A,F)}function yo(e,i,R,A){var F=i,J=i;return typeof i=="number"?J=ur(e,ae(e,i)):F=Zr(i),F==null?null:(A(J,F)&&e.cm&&Qn(e.cm,F,R),J)}function bo(e){this.lines=e,this.parent=null;for(var i=0,R=0;R<e.length;++R)e[R].parent=this,i+=e[R].height;this.height=i}bo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,i){for(var R=e,A=e+i;R<A;++R){var F=this.lines[R];this.height-=F.height,rr(F),Zt(F,"delete")}this.lines.splice(e,i)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,i,R){this.height+=R,this.lines=this.lines.slice(0,e).concat(i).concat(this.lines.slice(e));for(var A=0;A<i.length;++A)i[A].parent=this},iterN:function(e,i,R){for(var A=e+i;e<A;++e)if(R(this.lines[e]))return!0}};function Eo(e){this.children=e;for(var i=0,R=0,A=0;A<e.length;++A){var F=e[A];i+=F.chunkSize(),R+=F.height,F.parent=this}this.size=i,this.height=R,this.parent=null}Eo.prototype={chunkSize:function(){return this.size},removeInner:function(e,i){this.size-=i;for(var R=0;R<this.children.length;++R){var A=this.children[R],F=A.chunkSize();if(e<F){var J=Math.min(i,F-e),oe=A.height;if(A.removeInner(e,J),this.height-=oe-A.height,F==J&&(this.children.splice(R--,1),A.parent=null),(i-=J)==0)break;e=0}else e-=F}if(this.size-i<25&&(this.children.length>1||!(this.children[0]instanceof bo))){var he=[];this.collapse(he),this.children=[new bo(he)],this.children[0].parent=this}},collapse:function(e){for(var i=0;i<this.children.length;++i)this.children[i].collapse(e)},insertInner:function(e,i,R){this.size+=i.length,this.height+=R;for(var A=0;A<this.children.length;++A){var F=this.children[A],J=F.chunkSize();if(e<=J){if(F.insertInner(e,i,R),F.lines&&F.lines.length>50){for(var oe=F.lines.length%25+25,he=oe;he<F.lines.length;){var ve=new bo(F.lines.slice(he,he+=25));F.height-=ve.height,this.children.splice(++A,0,ve),ve.parent=this}F.lines=F.lines.slice(0,oe),this.maybeSpill()}break}e-=J}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var i=e.children.splice(e.children.length-5,5),R=new Eo(i);if(e.parent){e.size-=R.size,e.height-=R.height;var F=fe(e.parent.children,e);e.parent.children.splice(F+1,0,R)}else{var A=new Eo(e.children);A.parent=e,e.children=[A,R],e=A}R.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,i,R){for(var A=0;A<this.children.length;++A){var F=this.children[A],J=F.chunkSize();if(e<J){var oe=Math.min(i,J-e);if(F.iterN(e,oe,R))return!0;if((i-=oe)==0)break;e=0}else e-=J}}};var xo=function(e,i,R){if(R)for(var A in R)R.hasOwnProperty(A)&&(this[A]=R[A]);this.doc=e,this.node=i};xo.prototype.clear=function(){var e=this.doc.cm,i=this.line.widgets,R=this.line,A=Zr(R);if(A==null||!i)return;for(var F=0;F<i.length;++F)i[F]==this&&i.splice(F--,1);i.length||(R.widgets=null);var J=Vr(this);$n(R,Math.max(0,R.height-J)),e&&(Wi(e,function(){js(e,R,-J),Qn(e,A,"widget")}),Zt(e,"lineWidgetCleared",e,this,A))},xo.prototype.changed=function(){var e=this,i=this.height,R=this.doc.cm,A=this.line;this.height=null;var F=Vr(this)-i;if(!F)return;Gt(this.doc,A)||$n(A,A.height+F),R&&Wi(R,function(){R.curOp.forceUpdate=!0,js(R,A,F),Zt(R,"lineWidgetChanged",R,e,Zr(A))})},Ie(xo);function js(e,i,R){cr(i)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Sa(e,R)}function Cl(e,i,R,A){var F=new xo(e,R,A),J=e.cm;return J&&F.noHScroll&&(J.display.alignWidgets=!0),yo(e,i,"widget",function(oe){var he=oe.widgets||(oe.widgets=[]);if(F.insertAt==null?he.push(F):he.splice(Math.min(he.length-1,Math.max(0,F.insertAt)),0,F),F.line=oe,J&&!Gt(e,oe)){var ve=cr(oe)<e.scrollTop;$n(oe,oe.height+Vr(F)),ve&&Sa(J,F.height),J.curOp.forceUpdate=!0}return!0}),J&&Zt(J,"lineWidgetAdded",J,F,typeof i=="number"?i:Zr(i)),F}var Fs=0,ja=function(e,i){this.lines=[],this.type=i,this.doc=e,this.id=++Fs};ja.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,i=e&&!e.curOp;if(i&&Kn(e),Le(this,"clear")){var R=this.find();R&&Zt(this,"clear",R.from,R.to)}for(var A=null,F=null,J=0;J<this.lines.length;++J){var oe=this.lines[J],he=Ci(oe.markedSpans,this);e&&!this.collapsed?Qn(e,Zr(oe),"text"):e&&(he.to!=null&&(F=Zr(oe)),he.from!=null&&(A=Zr(oe))),oe.markedSpans=Gi(oe.markedSpans,he),he.from==null&&this.collapsed&&!Gt(this.doc,oe)&&e&&$n(oe,ti(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ve=0;ve<this.lines.length;++ve){var we=At(this.lines[ve]),Be=st(we);Be>e.display.maxLineLength&&(e.display.maxLine=we,e.display.maxLineLength=Be,e.display.maxLineChanged=!0)}A!=null&&e&&this.collapsed&&zn(e,A,F+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&Zt(e,"markerCleared",e,this,A,F),i&&Oa(e),this.parent&&this.parent.clear()},ja.prototype.find=function(e,i){e==null&&this.type=="bookmark"&&(e=1);for(var R,A,F=0;F<this.lines.length;++F){var J=this.lines[F],oe=Ci(J.markedSpans,this);if(oe.from!=null&&(R=wt(i?J:Zr(J),oe.from),e==-1))return R;if(oe.to!=null&&(A=wt(i?J:Zr(J),oe.to),e==1))return A}return R&&{from:R,to:A}},ja.prototype.changed=function(){var e=this,i=this.find(-1,!0),R=this,A=this.doc.cm;if(!i||!A)return;Wi(A,function(){var F=i.line,J=Zr(i.line),oe=Ve(A,J);if(oe&&(Qr(oe),A.curOp.selectionChanged=A.curOp.forceUpdate=!0),A.curOp.updateMaxLine=!0,!Gt(R.doc,F)&&R.height!=null){var he=R.height;R.height=null;var ve=Vr(R)-he;ve&&$n(F,F.height+ve)}Zt(A,"markerChanged",A,e)})},ja.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var i=this.doc.cm.curOp;(!i.maybeHiddenMarkers||fe(i.maybeHiddenMarkers,this)==-1)&&(i.maybeUnhiddenMarkers||(i.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ja.prototype.detachLine=function(e){if(this.lines.splice(fe(this.lines,e),1),!this.lines.length&&this.doc.cm){var i=this.doc.cm.curOp;(i.maybeHiddenMarkers||(i.maybeHiddenMarkers=[])).push(this)}},Ie(ja);function no(e,i,R,A,F){if(A&&A.shared)return wl(e,i,R,A,F);if(e.cm&&!e.cm.curOp)return pi(e.cm,no)(e,i,R,A,F);var J=new ja(e,F),oe=$t(i,R);if(A&&W(A,J,!1),oe>0||oe==0&&J.clearWhenEmpty!==!1)return J;if(J.replacedWith&&(J.collapsed=!0,J.widgetNode=M("span",[J.replacedWith],"CodeMirror-widget"),A.handleMouseEvents||J.widgetNode.setAttribute("cm-ignore-events","true"),A.insertLeft&&(J.widgetNode.insertLeft=!0)),J.collapsed){if(dt(e,i.line,i,R,J)||i.line!=R.line&&dt(e,R.line,i,R,J))throw new Error("Inserting collapsed marker partially overlapping an existing one");xi()}J.addToHistory&&Es(e,{from:i,to:R,origin:"markText"},e.sel,NaN);var he=i.line,ve=e.cm,we;if(e.iter(he,R.line+1,function(Xe){ve&&J.collapsed&&!ve.options.lineWrapping&&At(Xe)==ve.display.maxLine&&(we=!0),J.collapsed&&he!=i.line&&$n(Xe,0),Mi(Xe,new Fi(J,he==i.line?i.ch:null,he==R.line?R.ch:null)),++he}),J.collapsed&&e.iter(i.line,R.line+1,function(Xe){Gt(e,Xe)&&$n(Xe,0)}),J.clearOnEnter&&Re(J,"beforeCursorEnter",function(){return J.clear()}),J.readOnly&&(Ti(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),J.collapsed&&(J.id=++Fs,J.atomic=!0),ve){if(we&&(ve.curOp.updateMaxLine=!0),J.collapsed)zn(ve,i.line,R.line+1);else if(J.className||J.startStyle||J.endStyle||J.css||J.attributes||J.title)for(var Be=i.line;Be<=R.line;Be++)Qn(ve,Be,"text");J.atomic&&Os(ve.doc),Zt(ve,"markerAdded",ve,J)}return J}var Co=function(e,i){this.markers=e,this.primary=i;for(var R=0;R<e.length;++R)e[R].parent=this};Co.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Zt(this,"clear")},Co.prototype.find=function(e,i){return this.primary.find(e,i)},Ie(Co);function wl(e,i,R,A,F){A=W(A),A.shared=!1;var J=[no(e,i,R,A,F)],oe=J[0],he=A.widgetNode;return Na(e,function(ve){he&&(A.widgetNode=he.cloneNode(!0)),J.push(no(ve,z(ve,i),z(ve,R),A,F));for(var we=0;we<ve.linked.length;++we)if(ve.linked[we].isParent)return;oe=re(J)}),new Co(J,oe)}function Us(e){return e.findMarks(wt(e.first,0),e.clipPos(wt(e.lastLine())),function(i){return i.parent})}function _l(e,i){for(var R=0;R<i.length;R++){var A=i[R],F=A.find(),J=e.clipPos(F.from),oe=e.clipPos(F.to);if($t(J,oe)){var he=no(e,J,oe,A.primary,A.primary.type);A.markers.push(he),he.parent=A}}}function Sl(e){for(var i=function(A){var F=e[A],J=[F.primary.doc];Na(F.primary.doc,function(ve){return J.push(ve)});for(var oe=0;oe<F.markers.length;oe++){var he=F.markers[oe];fe(J,he.doc)==-1&&(he.parent=null,F.markers.splice(oe--,1))}},R=0;R<e.length;R++)i(R)}var Tl=0,Yi=function(e,i,R,A,F){if(!(this instanceof Yi))return new Yi(e,i,R,A,F);R==null&&(R=0),Eo.call(this,[new bo([new Fr("",null)])]),this.first=R,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=R;var J=wt(R,0);this.sel=va(J),this.history=new jo(null),this.id=++Tl,this.modeOption=i,this.lineSep=A,this.direction=F=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ts(this,{from:J,to:J,text:e}),Ni(this,va(J),De)};Yi.prototype=ce(Eo.prototype,{constructor:Yi,iter:function(e,i,R){R?this.iterN(e-this.first,i-e,R):this.iterN(this.first,this.first+this.size,e)},insert:function(e,i){for(var R=0,A=0;A<i.length;++A)R+=i[A].height;this.insertInner(e-this.first,i,R)},remove:function(e,i){this.removeInner(e-this.first,i)},getValue:function(e){var i=hi(this,this.first,this.first+this.size);return e===!1?i:i.join(e||this.lineSeparator())},setValue:mi(function(e){var i=wt(this.first,0),R=this.first+this.size-1;to(this,{from:i,to:wt(R,ur(this,R).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&da(this.cm,0,0),Ni(this,va(i),De)}),replaceRange:function(e,i,R,A){i=z(this,i),R=R?z(this,R):i,ro(this,e,i,R,A)},getRange:function(e,i,R){var A=Xn(this,z(this,e),z(this,i));return R===!1?A:A.join(R||this.lineSeparator())},getLine:function(e){var i=this.getLineHandle(e);return i&&i.text},getLineHandle:function(e){if(si(this,e))return ur(this,e)},getLineNumber:function(e){return Zr(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=ur(this,e)),At(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return z(this,e)},getCursor:function(e){var i=this.sel.primary(),R;return e==null||e=="head"?R=i.head:e=="anchor"?R=i.anchor:e=="end"||e=="to"||e===!1?R=i.to():R=i.from(),R},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:mi(function(e,i,R){_s(this,z(this,typeof e=="number"?wt(e,i||0):e),null,R)}),setSelection:mi(function(e,i,R){_s(this,z(this,e),z(this,i||e),R)}),extendSelection:mi(function(e,i,R){Uo(this,z(this,e),i&&z(this,i),R)}),extendSelections:mi(function(e,i){ws(this,ie(this,e),i)}),extendSelectionsBy:mi(function(e,i){var R=pe(this.sel.ranges,e);ws(this,ie(this,R),i)}),setSelections:mi(function(e,i,R){if(!e.length)return;for(var A=[],F=0;F<e.length;F++)A[F]=new Nn(z(this,e[F].anchor),z(this,e[F].head));i==null&&(i=Math.min(e.length-1,this.sel.primIndex)),Ni(this,aa(this.cm,A,i),R)}),addSelection:mi(function(e,i,R){var A=this.sel.ranges.slice(0);A.push(new Nn(z(this,e),z(this,i||e))),Ni(this,aa(this.cm,A,A.length-1),R)}),getSelection:function(e){for(var i=this.sel.ranges,R,A=0;A<i.length;A++){var F=Xn(this,i[A].from(),i[A].to());R=R?R.concat(F):F}return e===!1?R:R.join(e||this.lineSeparator())},getSelections:function(e){for(var i=[],R=this.sel.ranges,A=0;A<R.length;A++){var F=Xn(this,R[A].from(),R[A].to());e!==!1&&(F=F.join(e||this.lineSeparator())),i[A]=F}return i},replaceSelection:function(e,i,R){for(var A=[],F=0;F<this.sel.ranges.length;F++)A[F]=e;this.replaceSelections(A,i,R||"+input")},replaceSelections:mi(function(e,i,R){for(var A=[],F=this.sel,J=0;J<F.ranges.length;J++){var oe=F.ranges[J];A[J]={from:oe.from(),to:oe.to(),text:this.splitLines(e[J]),origin:R}}for(var he=i&&i!="end"&&No(this,A,i),ve=A.length-1;ve>=0;ve--)to(this,A[ve]);he?Ss(this,he):this.cm&&ba(this.cm)}),undo:mi(function(){Ho(this,"undo")}),redo:mi(function(){Ho(this,"redo")}),undoSelection:mi(function(){Ho(this,"undo",!0)}),redoSelection:mi(function(){Ho(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,i=0,R=0,A=0;A<e.done.length;A++)e.done[A].ranges||++i;for(var F=0;F<e.undone.length;F++)e.undone[F].ranges||++R;return{undo:i,redo:R}},clearHistory:function(){var e=this;this.history=new jo(this.history.maxGeneration),Na(this,function(i){return i.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:qa(this.history.done),undone:qa(this.history.undone)}},setHistory:function(e){var i=this.history=new jo(this.history.maxGeneration);i.done=qa(e.done.slice(0),null,!0),i.undone=qa(e.undone.slice(0),null,!0)},setGutterMarker:mi(function(e,i,R){return yo(this,e,"gutter",function(A){var F=A.gutterMarkers||(A.gutterMarkers={});return F[i]=R,!R&&Z(F)&&(A.gutterMarkers=null),!0})}),clearGutter:mi(function(e){var i=this;this.iter(function(R){R.gutterMarkers&&R.gutterMarkers[e]&&yo(i,R,"gutter",function(){return R.gutterMarkers[e]=null,Z(R.gutterMarkers)&&(R.gutterMarkers=null),!0})})}),lineInfo:function(e){var i;if(typeof e=="number"){if(!si(this,e))return null;if(i=e,e=ur(this,e),!e)return null}else if(i=Zr(e),i==null)return null;return{line:i,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:mi(function(e,i,R){return yo(this,e,i=="gutter"?"gutter":"class",function(A){var F=i=="text"?"textClass":i=="background"?"bgClass":i=="gutter"?"gutterClass":"wrapClass";if(!A[F])A[F]=R;else{if(O(R).test(A[F]))return!1;A[F]+=" "+R}return!0})}),removeLineClass:mi(function(e,i,R){return yo(this,e,i=="gutter"?"gutter":"class",function(A){var F=i=="text"?"textClass":i=="background"?"bgClass":i=="gutter"?"gutterClass":"wrapClass",J=A[F];if(J)if(R==null)A[F]=null;else{var oe=J.match(O(R));if(!oe)return!1;var he=oe.index+oe[0].length;A[F]=J.slice(0,oe.index)+(!oe.index||he==J.length?"":" ")+J.slice(he)||null}else return!1;return!0})}),addLineWidget:mi(function(e,i,R){return Cl(this,e,i,R)}),removeLineWidget:function(e){e.clear()},markText:function(e,i,R){return no(this,z(this,e),z(this,i),R,R&&R.type||"range")},setBookmark:function(e,i){var R={replacedWith:i&&(i.nodeType==null?i.widget:i),insertLeft:i&&i.insertLeft,clearWhenEmpty:!1,shared:i&&i.shared,handleMouseEvents:i&&i.handleMouseEvents};return e=z(this,e),no(this,e,e,R,"bookmark")},findMarksAt:function(e){e=z(this,e);var i=[],R=ur(this,e.line).markedSpans;if(R)for(var A=0;A<R.length;++A){var F=R[A];(F.from==null||F.from<=e.ch)&&(F.to==null||F.to>=e.ch)&&i.push(F.marker.parent||F.marker)}return i},findMarks:function(e,i,R){e=z(this,e),i=z(this,i);var A=[],F=e.line;return this.iter(e.line,i.line+1,function(J){var oe=J.markedSpans;if(oe)for(var he=0;he<oe.length;he++){var ve=oe[he];!(ve.to!=null&&F==e.line&&e.ch>=ve.to||ve.from==null&&F!=e.line||ve.from!=null&&F==i.line&&ve.from>=i.ch)&&(!R||R(ve.marker))&&A.push(ve.marker.parent||ve.marker)}++F}),A},getAllMarks:function(){var e=[];return this.iter(function(i){var R=i.markedSpans;if(R)for(var A=0;A<R.length;++A)R[A].from!=null&&e.push(R[A].marker)}),e},posFromIndex:function(e){var i,R=this.first,A=this.lineSeparator().length;return this.iter(function(F){var J=F.text.length+A;if(J>e)return i=e,!0;e-=J,++R}),z(this,wt(R,i))},indexFromPos:function(e){e=z(this,e);var i=e.ch;if(e.line<this.first||e.ch<0)return 0;var R=this.lineSeparator().length;return this.iter(this.first,e.line,function(A){i+=A.text.length+R}),i},copy:function(e){var i=new Yi(hi(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return i.scrollTop=this.scrollTop,i.scrollLeft=this.scrollLeft,i.sel=this.sel,i.extend=!1,e&&(i.history.undoDepth=this.history.undoDepth,i.setHistory(this.getHistory())),i},linkedDoc:function(e){e||(e={});var i=this.first,R=this.first+this.size;e.from!=null&&e.from>i&&(i=e.from),e.to!=null&&e.to<R&&(R=e.to);var A=new Yi(hi(this,i,R),e.mode||this.modeOption,i,this.lineSep,this.direction);return e.sharedHist&&(A.history=this.history),(this.linked||(this.linked=[])).push({doc:A,sharedHist:e.sharedHist}),A.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],_l(A,Us(this)),A},unlinkDoc:function(e){if(e instanceof ri&&(e=e.doc),this.linked)for(var i=0;i<this.linked.length;++i){var R=this.linked[i];if(R.doc!=e)continue;this.linked.splice(i,1),e.unlinkDoc(this),Sl(Us(this));break}if(e.history==this.history){var A=[e.id];Na(e,function(F){return A.push(F.id)},!0),e.history=new jo(null),e.history.done=qa(this.history.done,A),e.history.undone=qa(this.history.undone,A)}},iterLinkedDocs:function(e){Na(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):mr(e)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:mi(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(i){return i.order=null}),this.cm&&pl(this.cm)})}),Yi.prototype.eachLine=Yi.prototype.iter;var Bs=0;function Ol(e){var i=this;if(Ws(i),lt(i,e)||yn(i.display,e))return;Ce(e),S&&(Bs=+new Date);var R=di(i,e,!0),A=e.dataTransfer.files;if(!R||i.isReadOnly())return;if(A&&A.length&&window.FileReader&&window.File)for(var F=A.length,J=Array(F),oe=0,he=function(){++oe==F&&pi(i,function(){R=z(i.doc,R);var ot={from:R,to:R,text:i.doc.splitLines(J.filter(function(Ot){return Ot!=null}).join(i.doc.lineSeparator())),origin:"paste"};to(i.doc,ot),Ss(i.doc,va(z(i.doc,R),z(i.doc,ga(ot))))})()},ve=function(ot,Ot){if(i.options.allowDropFileTypes&&fe(i.options.allowDropFileTypes,ot.type)==-1){he();return}var Bt=new FileReader;Bt.onerror=function(){return he()},Bt.onload=function(){var Qt=Bt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Qt)){he();return}J[Ot]=Qt,he()},Bt.readAsText(ot)},we=0;we<A.length;we++)ve(A[we],we);else{if(i.state.draggingText&&i.doc.sel.contains(R)>-1){i.state.draggingText(e),setTimeout(function(){return i.display.input.focus()},20);return}try{var Be=e.dataTransfer.getData("Text");if(Be){var Xe;if(i.state.draggingText&&!i.state.draggingText.copy&&(Xe=i.listSelections()),Bo(i.doc,va(R,R)),Xe)for(var ut=0;ut<Xe.length;++ut)ro(i.doc,"",Xe[ut].anchor,Xe[ut].head,"drag");i.replaceSelection(Be,"around","paste"),i.display.input.focus()}}catch(ot){}}}function Al(e,i){if(S&&(!e.state.draggingText||+new Date-Bs<100)){Ne(i);return}if(lt(e,i)||yn(e.display,i))return;if(i.dataTransfer.setData("Text",e.getSelection()),i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setDragImage&&!u){var R=_("img",null,null,"position: fixed; left: 0; top: 0;");R.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",c&&(R.width=R.height=1,e.display.wrapper.appendChild(R),R._top=R.offsetTop),i.dataTransfer.setDragImage(R,0,0),c&&R.parentNode.removeChild(R)}}function Rl(e,i){var R=di(e,i);if(!R)return;var A=document.createDocumentFragment();Bi(e,R,A),e.display.dragCursor||(e.display.dragCursor=_("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),y(e.display.dragCursor,A)}function Ws(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Hs(e){if(!document.getElementsByClassName)return;for(var i=document.getElementsByClassName("CodeMirror"),R=[],A=0;A<i.length;A++){var F=i[A].CodeMirror;F&&R.push(F)}R.length&&R[0].operation(function(){for(var J=0;J<R.length;J++)e(R[J])})}var zs=!1;function Dl(){if(zs)return;Pl(),zs=!0}function Pl(){var e;Re(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Hs(kl)},100))}),Re(window,"blur",function(){return Hs(ua)})}function kl(e){var i=e.display;i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.scrollbarsClipped=!1,e.setSize()}for(var Fa={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},wo=0;wo<10;wo++)Fa[wo+48]=Fa[wo+96]=String(wo);for(var zo=65;zo<=90;zo++)Fa[zo]=String.fromCharCode(zo);for(var _o=1;_o<=12;_o++)Fa[_o+111]=Fa[_o+63235]="F"+_o;var Da={};Da.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Da.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Da.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Da.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Da.default=a?Da.macDefault:Da.pcDefault;function Ll(e){var i=e.split(/-(?!$)/);e=i[i.length-1];for(var R,A,F,J,oe=0;oe<i.length-1;oe++){var he=i[oe];if(/^(cmd|meta|m)$/i.test(he))J=!0;else if(/^a(lt)?$/i.test(he))R=!0;else if(/^(c|ctrl|control)$/i.test(he))A=!0;else if(/^s(hift)?$/i.test(he))F=!0;else throw new Error("Unrecognized modifier name: "+he)}return R&&(e="Alt-"+e),A&&(e="Ctrl-"+e),J&&(e="Cmd-"+e),F&&(e="Shift-"+e),e}function Ml(e){var i={};for(var R in e)if(e.hasOwnProperty(R)){var A=e[R];if(/^(name|fallthrough|(de|at)tach)$/.test(R))continue;if(A=="..."){delete e[R];continue}for(var F=pe(R.split(" "),Ll),J=0;J<F.length;J++){var oe=void 0,he=void 0;J==F.length-1?(he=F.join(" "),oe=A):(he=F.slice(0,J+1).join(" "),oe="...");var ve=i[he];if(!ve)i[he]=oe;else if(ve!=oe)throw new Error("Inconsistent bindings for "+he)}delete e[R]}for(var we in i)e[we]=i[we];return e}function io(e,i,R,A){i=Ko(i);var F=i.call?i.call(e,A):i[e];if(F===!1)return"nothing";if(F==="...")return"multi";if(F!=null&&R(F))return"handled";if(i.fallthrough){if(Object.prototype.toString.call(i.fallthrough)!="[object Array]")return io(e,i.fallthrough,R,A);for(var J=0;J<i.fallthrough.length;J++){var oe=io(e,i.fallthrough[J],R,A);if(oe)return oe}}}function Ks(e){var i=typeof e=="string"?e:Fa[e.keyCode];return i=="Ctrl"||i=="Alt"||i=="Shift"||i=="Mod"}function Gs(e,i,R){var A=e;return i.altKey&&A!="Alt"&&(e="Alt-"+e),(f?i.metaKey:i.ctrlKey)&&A!="Ctrl"&&(e="Ctrl-"+e),(f?i.ctrlKey:i.metaKey)&&A!="Mod"&&(e="Cmd-"+e),!R&&i.shiftKey&&A!="Shift"&&(e="Shift-"+e),e}function Vs(e,i){if(c&&e.keyCode==34&&e.char)return!1;var R=Fa[e.keyCode];return R==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(R=e.code),Gs(R,e,i))}function Ko(e){return typeof e=="string"?Da[e]:e}function ao(e,i){for(var R=e.doc.sel.ranges,A=[],F=0;F<R.length;F++){for(var J=i(R[F]);A.length&&$t(J.from,re(A).to)<=0;){var oe=A.pop();if($t(oe.from,J.from)<0){J.from=oe.from;break}}A.push(J)}Wi(e,function(){for(var he=A.length-1;he>=0;he--)ro(e.doc,"",A[he].from,A[he].to,"+delete");ba(e)})}function as(e,i,R){var A=Te(e.text,i+R,R);return A<0||A>e.text.length?null:A}function os(e,i,R){var A=as(e,i.ch,R);return A==null?null:new wt(i.line,A,R<0?"after":"before")}function ss(e,i,R,A,F){if(e){i.doc.direction=="rtl"&&(F=-F);var J=ht(R,i.doc.direction);if(J){var oe=F<0?re(J):J[0],he=F<0==(oe.level==1),ve=he?"after":"before",we;if(oe.level>0||i.doc.direction=="rtl"){var Be=We(i,R);we=F<0?R.text.length-1:0;var Xe=Ze(i,Be,we).top;we=Je(function(ut){return Ze(i,Be,ut).top==Xe},F<0==(oe.level==1)?oe.from:oe.to-1,we),ve=="before"&&(we=as(R,we,1))}else we=F<0?oe.to:oe.from;return new wt(A,we,ve)}}return new wt(A,F<0?R.text.length:0,F<0?"before":"after")}function Il(e,i,R,A){var F=ht(i,e.doc.direction);if(!F)return os(i,R,A);R.ch>=i.text.length?(R.ch=i.text.length,R.sticky="before"):R.ch<=0&&(R.ch=0,R.sticky="after");var J=at(F,R.ch,R.sticky),oe=F[J];if(e.doc.direction=="ltr"&&oe.level%2==0&&(A>0?oe.to>R.ch:oe.from<R.ch))return os(i,R,A);var he=function(ir,_r){return as(i,ir instanceof wt?ir.ch:ir,_r)},ve,we=function(ir){return e.options.lineWrapping?(ve=ve||We(e,i),Tr(e,i,ve,ir)):{begin:0,end:i.text.length}},Be=we(R.sticky=="before"?he(R,-1):R.ch);if(e.doc.direction=="rtl"||oe.level==1){var Xe=oe.level==1==A<0,ut=he(R,Xe?1:-1);if(ut!=null&&(Xe?ut<=oe.to&&ut<=Be.end:ut>=oe.from&&ut>=Be.begin)){var ot=Xe?"before":"after";return new wt(R.line,ut,ot)}}var Ot=function(ir,_r,ar){for(var Rr=function(Zn,Ai){return Ai?new wt(R.line,he(Zn,1),"before"):new wt(R.line,Zn,"after")};ir>=0&&ir<F.length;ir+=_r){var qr=F[ir],Gr=_r>0==(qr.level!=1),wn=Gr?ar.begin:he(ar.end,-1);if(qr.from<=wn&&wn<qr.to)return Rr(wn,Gr);if(wn=Gr?qr.from:he(qr.to,-1),ar.begin<=wn&&wn<ar.end)return Rr(wn,Gr)}},Bt=Ot(J+A,A,Be);if(Bt)return Bt;var Qt=A>0?Be.end:he(Be.begin,-1);return Qt!=null&&!(A>0&&Qt==i.text.length)&&(Bt=Ot(A>0?0:F.length-1,A,we(Qt)),Bt)?Bt:null}var So={selectAll:Ds,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),De)},killLine:function(e){return ao(e,function(i){if(i.empty()){var R=ur(e.doc,i.head.line).text.length;return i.head.ch==R&&i.head.line<e.lastLine()?{from:i.head,to:wt(i.head.line+1,0)}:{from:i.head,to:wt(i.head.line,R)}}else return{from:i.from(),to:i.to()}})},deleteLine:function(e){return ao(e,function(i){return{from:wt(i.from().line,0),to:z(e.doc,wt(i.to().line+1,0))}})},delLineLeft:function(e){return ao(e,function(i){return{from:wt(i.from().line,0),to:i.from()}})},delWrappedLineLeft:function(e){return ao(e,function(i){var R=e.charCoords(i.head,"div").top+5,A=e.coordsChar({left:0,top:R},"div");return{from:A,to:i.from()}})},delWrappedLineRight:function(e){return ao(e,function(i){var R=e.charCoords(i.head,"div").top+5,A=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:R},"div");return{from:i.from(),to:A}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(wt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(wt(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(i){return Xs(e,i.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(i){return $s(e,i.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(i){return Nl(e,i.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(i){var R=e.cursorCoords(i.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:R},"div")},Oe)},goLineLeft:function(e){return e.extendSelectionsBy(function(i){var R=e.cursorCoords(i.head,"div").top+5;return e.coordsChar({left:0,top:R},"div")},Oe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(i){var R=e.cursorCoords(i.head,"div").top+5,A=e.coordsChar({left:0,top:R},"div");return A.ch<e.getLine(A.line).search(/\S/)?$s(e,i.head):A},Oe)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var i=[],R=e.listSelections(),A=e.options.tabSize,F=0;F<R.length;F++){var J=R[F].from(),oe=X(e.getLine(J.line),J.ch,A);i.push(le(A-oe%A))}e.replaceSelections(i)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Wi(e,function(){for(var i=e.listSelections(),R=[],A=0;A<i.length;A++){if(!i[A].empty())continue;var F=i[A].head,J=ur(e.doc,F.line).text;if(J){if(F.ch==J.length&&(F=new wt(F.line,F.ch-1)),F.ch>0)F=new wt(F.line,F.ch+1),e.replaceRange(J.charAt(F.ch-1)+J.charAt(F.ch-2),wt(F.line,F.ch-2),F,"+transpose");else if(F.line>e.doc.first){var oe=ur(e.doc,F.line-1).text;oe&&(F=new wt(F.line,1),e.replaceRange(J.charAt(0)+e.doc.lineSeparator()+oe.charAt(oe.length-1),wt(F.line-1,oe.length-1),F,"+transpose"))}}R.push(new Nn(F,F))}e.setSelections(R)})},newlineAndIndent:function(e){return Wi(e,function(){for(var i=e.listSelections(),R=i.length-1;R>=0;R--)e.replaceRange(e.doc.lineSeparator(),i[R].anchor,i[R].head,"+input");i=e.listSelections();for(var A=0;A<i.length;A++)e.indentLine(i[A].from().line,null,!0);ba(e)})},openLine:function(e){return e.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Xs(e,i){var R=ur(e.doc,i),A=At(R);return A!=R&&(i=Zr(A)),ss(!0,e,A,i,1)}function Nl(e,i){var R=ur(e.doc,i),A=Dt(R);return A!=R&&(i=Zr(A)),ss(!0,e,R,i,-1)}function $s(e,i){var R=Xs(e,i.line),A=ur(e.doc,R.line),F=ht(A,e.doc.direction);if(!F||F[0].level==0){var J=Math.max(R.ch,A.text.search(/\S/)),oe=i.line==R.line&&i.ch<=J&&i.ch;return wt(R.line,oe?0:J,R.sticky)}return R}function Go(e,i,R){if(typeof i=="string"&&(i=So[i],!i))return!1;e.display.input.ensurePolled();var A=e.display.shift,F=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),R&&(e.display.shift=!1),F=i(e)!=Ae}finally{e.display.shift=A,e.state.suppressEdits=!1}return F}function jl(e,i,R){for(var A=0;A<e.state.keyMaps.length;A++){var F=io(i,e.state.keyMaps[A],R,e);if(F)return F}return e.options.extraKeys&&io(i,e.options.extraKeys,R,e)||io(i,e.options.keyMap,R,e)}var Fl=new ne;function To(e,i,R,A){var F=e.state.keySeq;if(F){if(Ks(i))return"handled";if(/\'$/.test(i)?e.state.keySeq=null:Fl.set(50,function(){e.state.keySeq==F&&(e.state.keySeq=null,e.display.input.reset())}),Ys(e,F+" "+i,R,A))return!0}return Ys(e,i,R,A)}function Ys(e,i,R,A){var F=jl(e,i,A);return F=="multi"&&(e.state.keySeq=i),F=="handled"&&Zt(e,"keyHandled",e,i,R),(F=="handled"||F=="multi")&&(Ce(R),ai(e)),!!F}function Js(e,i){var R=Vs(i,!0);return R?i.shiftKey&&!e.state.keySeq?To(e,"Shift-"+R,i,function(A){return Go(e,A,!0)})||To(e,R,i,function(A){if(typeof A=="string"?/^go[A-Z]/.test(A):A.motion)return Go(e,A)}):To(e,R,i,function(A){return Go(e,A)}):!1}function Ul(e,i,R){return To(e,"'"+R+"'",i,function(A){return Go(e,A,!0)})}var ls=null;function Qs(e){var i=this;if(e.target&&e.target!=i.display.input.getField())return;if(i.curOp.focus=G(),lt(i,e))return;S&&b<11&&e.keyCode==27&&(e.returnValue=!1);var R=e.keyCode;i.display.shift=R==16||e.shiftKey;var A=Js(i,e);c&&(ls=A?R:null,!A&&R==88&&!Yr&&(a?e.metaKey:e.ctrlKey)&&i.replaceSelection("",null,"cut")),T&&!a&&!A&&R==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),R==18&&!/\bCodeMirror-crosshair\b/.test(i.display.lineDiv.className)&&Bl(i)}function Bl(e){var i=e.display.lineDiv;H(i,"CodeMirror-crosshair");function R(A){(A.keyCode==18||!A.altKey)&&(C(i,"CodeMirror-crosshair"),ft(document,"keyup",R),ft(document,"mouseover",R))}Re(document,"keyup",R),Re(document,"mouseover",R)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),lt(this,e)}function el(e){var i=this;if(e.target&&e.target!=i.display.input.getField())return;if(yn(i.display,e)||lt(i,e)||e.ctrlKey&&!e.altKey||a&&e.metaKey)return;var R=e.keyCode,A=e.charCode;if(c&&R==ls){ls=null,Ce(e);return}if(c&&(!e.which||e.which<10)&&Js(i,e))return;var F=String.fromCharCode(A==null?R:A);if(F=="\b")return;if(Ul(i,e,F))return;i.display.input.onKeyPress(e)}var Wl=400,us=function(e,i,R){this.time=e,this.pos=i,this.button=R};us.prototype.compare=function(e,i,R){return this.time+Wl>e&&$t(i,this.pos)==0&&R==this.button};var Oo,Ao;function Hl(e,i){var R=+new Date;return Ao&&Ao.compare(R,e,i)?(Oo=Ao=null,"triple"):Oo&&Oo.compare(R,e,i)?(Ao=new us(R,e,i),Oo=null,"double"):(Oo=new us(R,e,i),Ao=null,"single")}function tl(e){var i=this,R=i.display;if(lt(i,e)||R.activeTouch&&R.input.supportsTouch())return;if(R.input.ensurePolled(),R.shift=e.shiftKey,yn(R,e)){d||(R.scroller.draggable=!1,setTimeout(function(){return R.scroller.draggable=!0},100));return}if(cs(i,e))return;var A=di(i,e),F=$e(e),J=A?Hl(A,F):"single";if(window.focus(),F==1&&i.state.selectingText&&i.state.selectingText(e),A&&zl(i,F,A,J,e))return;F==1?A?Gl(i,A,J,e):et(e)==R.scroller&&Ce(e):F==2?(A&&Uo(i.doc,A),setTimeout(function(){return R.input.focus()},20)):F==3&&(k?i.display.input.onContextMenu(e):wa(i))}function zl(e,i,R,A,F){var J="Click";return A=="double"?J="Double"+J:A=="triple"&&(J="Triple"+J),J=(i==1?"Left":i==2?"Middle":"Right")+J,To(e,Gs(J,F),F,function(oe){if(typeof oe=="string"&&(oe=So[oe]),!oe)return!1;var he=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),he=oe(e,R)!=Ae}finally{e.state.suppressEdits=!1}return he})}function Kl(e,i,R){var A=e.getOption("configureMouse"),F=A?A(e,i,R):{};if(F.unit==null){var J=t?R.shiftKey&&R.metaKey:R.altKey;F.unit=J?"rectangle":i=="single"?"char":i=="double"?"word":"line"}return(F.extend==null||e.doc.extend)&&(F.extend=e.doc.extend||R.shiftKey),F.addNew==null&&(F.addNew=a?R.metaKey:R.ctrlKey),F.moveOnDrag==null&&(F.moveOnDrag=!(a?R.altKey:R.ctrlKey)),F}function Gl(e,i,R,A){S?setTimeout(U(Ba,e),0):e.curOp.focus=G();var F=Kl(e,R,A),J=e.doc.sel,oe;e.options.dragDrop&&bt&&!e.isReadOnly()&&R=="single"&&(oe=J.contains(i))>-1&&($t((oe=J.ranges[oe]).from(),i)<0||i.xRel>0)&&($t(oe.to(),i)>0||i.xRel<0)?Vl(e,A,i,F):Xl(e,A,i,F)}function Vl(e,i,R,A){var F=e.display,J=!1,oe=pi(e,function(we){d&&(F.scroller.draggable=!1),e.state.draggingText=!1,ft(F.wrapper.ownerDocument,"mouseup",oe),ft(F.wrapper.ownerDocument,"mousemove",he),ft(F.scroller,"dragstart",ve),ft(F.scroller,"drop",oe),J||(Ce(we),A.addNew||Uo(e.doc,R,null,null,A.extend),d&&!u||S&&b==9?setTimeout(function(){F.wrapper.ownerDocument.body.focus({preventScroll:!0}),F.input.focus()},20):F.input.focus())}),he=function(we){J=J||Math.abs(i.clientX-we.clientX)+Math.abs(i.clientY-we.clientY)>=10},ve=function(){return J=!0};d&&(F.scroller.draggable=!0),e.state.draggingText=oe,oe.copy=!A.moveOnDrag,F.scroller.dragDrop&&F.scroller.dragDrop(),Re(F.wrapper.ownerDocument,"mouseup",oe),Re(F.wrapper.ownerDocument,"mousemove",he),Re(F.scroller,"dragstart",ve),Re(F.scroller,"drop",oe),wa(e),setTimeout(function(){return F.input.focus()},20)}function rl(e,i,R){if(R=="char")return new Nn(i,i);if(R=="word")return e.findWordAt(i);if(R=="line")return new Nn(wt(i.line,0),z(e.doc,wt(i.line+1,0)));var A=R(e,i);return new Nn(A.from,A.to)}function Xl(e,i,R,A){var F=e.display,J=e.doc;Ce(i);var oe,he,ve=J.sel,we=ve.ranges;if(A.addNew&&!A.extend?(he=J.sel.contains(R),he>-1?oe=we[he]:oe=new Nn(R,R)):(oe=J.sel.primary(),he=J.sel.primIndex),A.unit=="rectangle")A.addNew||(oe=new Nn(R,R)),R=di(e,i,!0,!0),he=-1;else{var Be=rl(e,R,A.unit);A.extend?oe=ns(oe,Be.anchor,Be.head,A.extend):oe=Be}A.addNew?he==-1?(he=we.length,Ni(J,aa(e,we.concat([oe]),he),{scroll:!1,origin:"*mouse"})):we.length>1&&we[he].empty()&&A.unit=="char"&&!A.extend?(Ni(J,aa(e,we.slice(0,he).concat(we.slice(he+1)),0),{scroll:!1,origin:"*mouse"}),ve=J.sel):is(J,he,oe,ye):(he=0,Ni(J,new zi([oe],0),ye),ve=J.sel);var Xe=R;function ut(ar){if($t(Xe,ar)==0)return;if(Xe=ar,A.unit=="rectangle"){for(var Rr=[],qr=e.options.tabSize,Gr=X(ur(J,R.line).text,R.ch,qr),wn=X(ur(J,ar.line).text,ar.ch,qr),Zn=Math.min(Gr,wn),Ai=Math.max(Gr,wn),oi=Math.min(R.line,ar.line),ea=Math.min(e.lastLine(),Math.max(R.line,ar.line));oi<=ea;oi++){var Ji=ur(J,oi).text,yi=xe(Ji,Zn,qr);Zn==Ai?Rr.push(new Nn(wt(oi,yi),wt(oi,yi))):Ji.length>yi&&Rr.push(new Nn(wt(oi,yi),wt(oi,xe(Ji,Ai,qr))))}Rr.length||Rr.push(new Nn(R,R)),Ni(J,aa(e,ve.ranges.slice(0,he).concat(Rr),he),{origin:"*mouse",scroll:!1}),e.scrollIntoView(ar)}else{var Qi=oe,ki=rl(e,ar,A.unit),Si=Qi.anchor,bi;$t(ki.anchor,Si)>0?(bi=ki.head,Si=On(Qi.from(),ki.anchor)):(bi=ki.anchor,Si=_n(Qi.to(),ki.head));var fi=ve.ranges.slice(0);fi[he]=$l(e,new Nn(z(J,Si),bi)),Ni(J,aa(e,fi,he),ye)}}var ot=F.wrapper.getBoundingClientRect(),Ot=0;function Bt(ar){var Rr=++Ot,qr=di(e,ar,!0,A.unit=="rectangle");if(!qr)return;if($t(qr,Xe)!=0){e.curOp.focus=G(),ut(qr);var Gr=La(F,J);(qr.line>=Gr.to||qr.line<Gr.from)&&setTimeout(pi(e,function(){Ot==Rr&&Bt(ar)}),150)}else{var wn=ar.clientY<ot.top?-20:ar.clientY>ot.bottom?20:0;wn&&setTimeout(pi(e,function(){if(Ot!=Rr)return;F.scroller.scrollTop+=wn,Bt(ar)}),50)}}function Qt(ar){e.state.selectingText=!1,Ot=Infinity,ar&&(Ce(ar),F.input.focus()),ft(F.wrapper.ownerDocument,"mousemove",ir),ft(F.wrapper.ownerDocument,"mouseup",_r),J.history.lastSelOrigin=null}var ir=pi(e,function(ar){ar.buttons===0||!$e(ar)?Qt(ar):Bt(ar)}),_r=pi(e,Qt);e.state.selectingText=_r,Re(F.wrapper.ownerDocument,"mousemove",ir),Re(F.wrapper.ownerDocument,"mouseup",_r)}function $l(e,i){var R=i.anchor,A=i.head,F=ur(e.doc,R.line);if($t(R,A)==0&&R.sticky==A.sticky)return i;var J=ht(F);if(!J)return i;var oe=at(J,R.ch,R.sticky),he=J[oe];if(he.from!=R.ch&&he.to!=R.ch)return i;var ve=oe+(he.from==R.ch==(he.level!=1)?0:1);if(ve==0||ve==J.length)return i;var we;if(A.line!=R.line)we=(A.line-R.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Be=at(J,A.ch,A.sticky),Xe=Be-oe||(A.ch-R.ch)*(he.level==1?-1:1);Be==ve-1||Be==ve?we=Xe<0:we=Xe>0}var ut=J[ve+(we?-1:0)],ot=we==(ut.level==1),Ot=ot?ut.from:ut.to,Bt=ot?"after":"before";return R.ch==Ot&&R.sticky==Bt?i:new Nn(new wt(R.line,Ot,Bt),A)}function nl(e,i,R,A){var F,J;if(i.touches)F=i.touches[0].clientX,J=i.touches[0].clientY;else try{F=i.clientX,J=i.clientY}catch(ut){return!1}if(F>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;A&&Ce(i);var oe=e.display,he=oe.lineDiv.getBoundingClientRect();if(J>he.bottom||!Le(e,R))return ke(i);J-=he.top-oe.viewOffset;for(var ve=0;ve<e.display.gutterSpecs.length;++ve){var we=oe.gutters.childNodes[ve];if(we&&we.getBoundingClientRect().right>=F){var Be=Bn(e.doc,J),Xe=e.display.gutterSpecs[ve];return Qe(e,R,e,Be,Xe.className,i),ke(i)}}}function cs(e,i){return nl(e,i,"gutterClick",!0)}function il(e,i){if(yn(e.display,i)||Yl(e,i))return;if(lt(e,i,"contextmenu"))return;k||e.display.input.onContextMenu(i)}function Yl(e,i){return Le(e,"gutterContextMenu")?nl(e,i,"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-"),nn(e)}var oo={toString:function(){return"CodeMirror.Init"}},ol={},Vo={};function Jl(e){var i=e.optionHandlers;function R(A,F,J,oe){e.defaults[A]=F,J&&(i[A]=oe?function(he,ve,we){we!=oo&&J(he,ve,we)}:J)}e.defineOption=R,e.Init=oo,R("value","",function(A,F){return A.setValue(F)},!0),R("mode",null,function(A,F){A.doc.modeOption=F,Ra(A)},!0),R("indentUnit",2,Ra,!0),R("indentWithTabs",!1),R("smartIndent",!0),R("tabSize",4,function(A){vo(A),nn(A),zn(A)},!0),R("lineSeparator",null,function(A,F){if(A.doc.lineSep=F,!F)return;var J=[],oe=A.doc.first;A.doc.iter(function(ve){for(var we=0;;){var Be=ve.text.indexOf(F,we);if(Be==-1)break;we=Be+F.length,J.push(wt(oe,Be))}oe++});for(var he=J.length-1;he>=0;he--)ro(A.doc,F,J[he],wt(J[he].line,J[he].ch+F.length))}),R("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(A,F,J){A.state.specialChars=new RegExp(F.source+(F.test(" ")?"":"| "),"g"),J!=oo&&A.refresh()}),R("specialCharPlaceholder",pr,function(A){return A.refresh()},!0),R("electricChars",!0),R("inputStyle",r?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),R("spellcheck",!1,function(A,F){return A.getInputField().spellcheck=F},!0),R("autocorrect",!1,function(A,F){return A.getInputField().autocorrect=F},!0),R("autocapitalize",!1,function(A,F){return A.getInputField().autocapitalize=F},!0),R("rtlMoveVisually",!w),R("wholeLineUpdateBefore",!0),R("theme","default",function(A){al(A),ma(A)},!0),R("keyMap","default",function(A,F,J){var oe=Ko(F),he=J!=oo&&Ko(J);he&&he.detach&&he.detach(A,oe),oe.attach&&oe.attach(A,he||null)}),R("extraKeys",null),R("configureMouse",null),R("lineWrapping",!1,Zl,!0),R("gutters",[],function(A,F){A.display.gutterSpecs=Hi(F,A.options.lineNumbers),ma(A)},!0),R("fixedGutter",!0,function(A,F){A.display.gutters.style.left=F?gi(A.display)+"px":"0",A.refresh()},!0),R("coverGutterNextToScrollbar",!1,function(A){return lr(A)},!0),R("scrollbarStyle","native",function(A){pa(A),lr(A),A.display.scrollbars.setScrollTop(A.doc.scrollTop),A.display.scrollbars.setScrollLeft(A.doc.scrollLeft)},!0),R("lineNumbers",!1,function(A,F){A.display.gutterSpecs=Hi(A.options.gutters,F),ma(A)},!0),R("firstLineNumber",1,ma,!0),R("lineNumberFormatter",function(A){return A},ma,!0),R("showCursorWhenSelecting",!1,Mn,!0),R("resetSelectionOnContextMenu",!0),R("lineWiseCopyCut",!0),R("pasteLinesPerSelection",!0),R("selectionsMayTouch",!1),R("readOnly",!1,function(A,F){F=="nocursor"&&(ua(A),A.display.input.blur()),A.display.input.readOnlyChanged(F)}),R("screenReaderLabel",null,function(A,F){F=F===""?null:F,A.display.input.screenReaderLabelChanged(F)}),R("disableInput",!1,function(A,F){F||A.display.input.reset()},!0),R("dragDrop",!0,Ql),R("allowDropFileTypes",null),R("cursorBlinkRate",530),R("cursorScrollMargin",0),R("cursorHeight",1,Mn,!0),R("singleCursorHeightPerLine",!0,Mn,!0),R("workTime",100),R("workDelay",100),R("flattenSpans",!0,vo,!0),R("addModeClass",!1,vo,!0),R("pollInterval",100),R("undoDepth",200,function(A,F){return A.doc.history.undoDepth=F}),R("historyEventDelay",1250),R("viewportMargin",10,function(A){return A.refresh()},!0),R("maxHighlightLength",1e4,vo,!0),R("moveInputWithCursor",!0,function(A,F){F||A.display.input.resetPosition()}),R("tabindex",null,function(A,F){return A.display.input.getField().tabIndex=F||""}),R("autofocus",null),R("direction","ltr",function(A,F){return A.doc.setDirection(F)},!0),R("phrases",null)}function Ql(e,i,R){var A=R&&R!=oo;if(!i!=!A){var F=e.display.dragFunctions,J=i?Re:ft;J(e.display.scroller,"dragstart",F.start),J(e.display.scroller,"dragenter",F.enter),J(e.display.scroller,"dragover",F.over),J(e.display.scroller,"dragleave",F.leave),J(e.display.scroller,"drop",F.drop)}}function Zl(e){e.options.lineWrapping?(H(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(C(e.display.wrapper,"CodeMirror-wrap"),Lr(e)),Oi(e),zn(e),nn(e),setTimeout(function(){return lr(e)},100)}function ri(e,i){var R=this;if(!(this instanceof ri))return new ri(e,i);this.options=i=i?W(i):{},W(ol,i,!1);var A=i.value;typeof A=="string"?A=new Yi(A,i.mode,null,i.lineSeparator,i.direction):i.mode&&(A.modeOption=i.mode),this.doc=A;var F=new ri.inputStyles[i.inputStyle](this),J=this.display=new Ka(e,A,F,i);J.wrapper.CodeMirror=this,al(this),i.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),pa(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ne,keySeq:null,specialChars:null},i.autofocus&&!r&&J.input.focus(),S&&b<11&&setTimeout(function(){return R.display.input.reset(!0)},20),ql(this),Dl(),Kn(this),this.curOp.forceUpdate=!0,gs(this,A),i.autofocus&&!r||this.hasFocus()?setTimeout(function(){R.hasFocus()&&!R.state.focused&&la(R)},20):ua(this);for(var oe in Vo)Vo.hasOwnProperty(oe)&&Vo[oe](this,i[oe],oo);wi(this),i.finishInit&&i.finishInit(this);for(var he=0;he<ds.length;++he)ds[he](this);Oa(this),d&&i.lineWrapping&&getComputedStyle(J.lineDiv).textRendering=="optimizelegibility"&&(J.lineDiv.style.textRendering="auto")}ri.defaults=ol,ri.optionHandlers=Vo;function ql(e){var i=e.display;Re(i.scroller,"mousedown",pi(e,tl)),S&&b<11?Re(i.scroller,"dblclick",pi(e,function(ve){if(lt(e,ve))return;var we=di(e,ve);if(!we||cs(e,ve)||yn(e.display,ve))return;Ce(ve);var Be=e.findWordAt(we);Uo(e.doc,Be.anchor,Be.head)})):Re(i.scroller,"dblclick",function(ve){return lt(e,ve)||Ce(ve)}),Re(i.scroller,"contextmenu",function(ve){return il(e,ve)}),Re(i.input.getField(),"contextmenu",function(ve){i.scroller.contains(ve.target)||il(e,ve)});var R,A={end:0};function F(){i.activeTouch&&(R=setTimeout(function(){return i.activeTouch=null},1e3),A=i.activeTouch,A.end=+new Date)}function J(ve){if(ve.touches.length!=1)return!1;var we=ve.touches[0];return we.radiusX<=1&&we.radiusY<=1}function oe(ve,we){if(we.left==null)return!0;var Be=we.left-ve.left,Xe=we.top-ve.top;return Be*Be+Xe*Xe>20*20}Re(i.scroller,"touchstart",function(ve){if(!lt(e,ve)&&!J(ve)&&!cs(e,ve)){i.input.ensurePolled(),clearTimeout(R);var we=+new Date;i.activeTouch={start:we,moved:!1,prev:we-A.end<=300?A:null},ve.touches.length==1&&(i.activeTouch.left=ve.touches[0].pageX,i.activeTouch.top=ve.touches[0].pageY)}}),Re(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Re(i.scroller,"touchend",function(ve){var we=i.activeTouch;if(we&&!yn(i,ve)&&we.left!=null&&!we.moved&&new Date-we.start<300){var Be=e.coordsChar(i.activeTouch,"page"),Xe;!we.prev||oe(we,we.prev)?Xe=new Nn(Be,Be):!we.prev.prev||oe(we,we.prev.prev)?Xe=e.findWordAt(Be):Xe=new Nn(wt(Be.line,0),z(e.doc,wt(Be.line+1,0))),e.setSelection(Xe.anchor,Xe.head),e.focus(),Ce(ve)}F()}),Re(i.scroller,"touchcancel",F),Re(i.scroller,"scroll",function(){i.scroller.clientHeight&&(fa(e,i.scroller.scrollTop),$i(e,i.scroller.scrollLeft,!0),Qe(e,"scroll",e))}),Re(i.scroller,"mousewheel",function(ve){return po(e,ve)}),Re(i.scroller,"DOMMouseScroll",function(ve){return po(e,ve)}),Re(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(ve){lt(e,ve)||Ne(ve)},over:function(ve){lt(e,ve)||(Rl(e,ve),Ne(ve))},start:function(ve){return Al(e,ve)},drop:pi(e,Ol),leave:function(ve){lt(e,ve)||Ws(e)}};var he=i.input.getField();Re(he,"keyup",function(ve){return Zs.call(e,ve)}),Re(he,"keydown",pi(e,Qs)),Re(he,"keypress",pi(e,el)),Re(he,"focus",function(ve){return la(e,ve)}),Re(he,"blur",function(ve){return ua(e,ve)})}var ds=[];ri.defineInitHook=function(e){return ds.push(e)};function Ro(e,i,R,A){var F=e.doc,J;R==null&&(R="add"),R=="smart"&&(F.mode.indent?J=Vt(e,i).state:R="prev");var oe=e.options.tabSize,he=ur(F,i),ve=X(he.text,null,oe);he.stateAfter&&(he.stateAfter=null);var we=he.text.match(/^\s*/)[0],Be;if(!A&&!/\S/.test(he.text))Be=0,R="not";else if(R=="smart"&&(Be=F.mode.indent(J,he.text.slice(we.length),he.text),Be==Ae||Be>150)){if(!A)return;R="prev"}R=="prev"?i>F.first?Be=X(ur(F,i-1).text,null,oe):Be=0:R=="add"?Be=ve+e.options.indentUnit:R=="subtract"?Be=ve-e.options.indentUnit:typeof R=="number"&&(Be=ve+R),Be=Math.max(0,Be);var Xe="",ut=0;if(e.options.indentWithTabs)for(var ot=Math.floor(Be/oe);ot;--ot)ut+=oe,Xe+=" ";if(ut<Be&&(Xe+=le(Be-ut)),Xe!=we)return ro(F,Xe,wt(i,0),wt(i,we.length),"+input"),he.stateAfter=null,!0;for(var Ot=0;Ot<F.sel.ranges.length;Ot++){var Bt=F.sel.ranges[Ot];if(Bt.head.line==i&&Bt.head.ch<we.length){var Qt=wt(i,we.length);is(F,Ot,new Nn(Qt,Qt));break}}}var ya=null;function Xo(e){ya=e}function fs(e,i,R,A,F){var J=e.doc;e.display.shift=!1,A||(A=J.sel);var oe=+new Date-200,he=F=="paste"||e.state.pasteIncoming>oe,ve=mr(i),we=null;if(he&&A.ranges.length>1)if(ya&&ya.text.join(`
|
|
|
`)==i){if(A.ranges.length%ya.text.length==0){we=[];for(var Be=0;Be<ya.text.length;Be++)we.push(J.splitLines(ya.text[Be]))}}else ve.length==A.ranges.length&&e.options.pasteLinesPerSelection&&(we=pe(ve,function(ir){return[ir]}));for(var Xe=e.curOp.updateInput,ut=A.ranges.length-1;ut>=0;ut--){var ot=A.ranges[ut],Ot=ot.from(),Bt=ot.to();ot.empty()&&(R&&R>0?Ot=wt(Ot.line,Ot.ch-R):e.state.overwrite&&!he?Bt=wt(Bt.line,Math.min(ur(J,Bt.line).text.length,Bt.ch+re(ve).length)):he&&ya&&ya.lineWise&&ya.text.join(`
|
|
|
`)==ve.join(`
|
|
|
`)&&(Ot=Bt=wt(Ot.line,0)));var Qt={from:Ot,to:Bt,text:we?we[ut%we.length]:ve,origin:F||(he?"paste":e.state.cutIncoming>oe?"cut":"+input")};to(e.doc,Qt),Zt(e,"inputRead",e,Qt)}i&&!he&&ll(e,i),ba(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Xe),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,i){var R=e.clipboardData&&e.clipboardData.getData("Text");if(R)return e.preventDefault(),!i.isReadOnly()&&!i.options.disableInput&&Wi(i,function(){return fs(i,R,0,null,"paste")}),!0}function ll(e,i){if(!e.options.electricChars||!e.options.smartIndent)return;for(var R=e.doc.sel,A=R.ranges.length-1;A>=0;A--){var F=R.ranges[A];if(F.head.ch>100||A&&R.ranges[A-1].head.line==F.head.line)continue;var J=e.getModeAt(F.head),oe=!1;if(J.electricChars){for(var he=0;he<J.electricChars.length;he++)if(i.indexOf(J.electricChars.charAt(he))>-1){oe=Ro(e,F.head.line,"smart");break}}else J.electricInput&&(J.electricInput.test(ur(e.doc,F.head.line).text.slice(0,F.head.ch))&&(oe=Ro(e,F.head.line,"smart")));oe&&Zt(e,"electricInput",e,F.head.line)}}function ul(e){for(var i=[],R=[],A=0;A<e.doc.sel.ranges.length;A++){var F=e.doc.sel.ranges[A].head.line,J={anchor:wt(F,0),head:wt(F+1,0)};R.push(J),i.push(e.getRange(J.anchor,J.head))}return{text:i,ranges:R}}function cl(e,i,R,A){e.setAttribute("autocorrect",R?"":"off"),e.setAttribute("autocapitalize",A?"":"off"),e.setAttribute("spellcheck",!!i)}function dl(){var e=_("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),i=_("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return d?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),cl(e),i}function eu(e){var i=e.optionHandlers,R=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(A,F){var J=this.options,oe=J[A];if(J[A]==F&&A!="mode")return;J[A]=F,i.hasOwnProperty(A)&&pi(this,i[A])(this,F,oe),Qe(this,"optionChange",this,A)},getOption:function(A){return this.options[A]},getDoc:function(){return this.doc},addKeyMap:function(A,F){this.state.keyMaps[F?"push":"unshift"](Ko(A))},removeKeyMap:function(A){for(var F=this.state.keyMaps,J=0;J<F.length;++J)if(F[J]==A||F[J].name==A)return F.splice(J,1),!0},addOverlay:Pi(function(A,F){var J=A.token?A:e.getMode(this.options,A);if(J.startState)throw new Error("Overlays may not be stateful.");ee(this.state.overlays,{mode:J,modeSpec:A,opaque:F&&F.opaque,priority:F&&F.priority||0},function(oe){return oe.priority}),this.state.modeGen++,zn(this)}),removeOverlay:Pi(function(A){for(var F=this.state.overlays,J=0;J<F.length;++J){var oe=F[J].modeSpec;if(oe==A||typeof A=="string"&&oe.name==A){F.splice(J,1),this.state.modeGen++,zn(this);return}}}),indentLine:Pi(function(A,F,J){typeof F!="string"&&typeof F!="number"&&(F==null?F=this.options.smartIndent?"smart":"prev":F=F?"add":"subtract"),si(this.doc,A)&&Ro(this,A,F,J)}),indentSelection:Pi(function(A){for(var F=this.doc.sel.ranges,J=-1,oe=0;oe<F.length;oe++){var he=F[oe];if(he.empty())he.head.line>J&&(Ro(this,he.head.line,A,!0),J=he.head.line,oe==this.doc.sel.primIndex&&ba(this));else{var ve=he.from(),we=he.to(),Be=Math.max(J,ve.line);J=Math.min(this.lastLine(),we.line-(we.ch?0:1))+1;for(var Xe=Be;Xe<J;++Xe)Ro(this,Xe,A);var ut=this.doc.sel.ranges;ve.ch==0&&F.length==ut.length&&ut[oe].from().ch>0&&is(this.doc,oe,new Nn(ve,ut[oe].to()),De)}}}),getTokenAt:function(A,F){return En(this,A,F)},getLineTokens:function(A,F){return En(this,wt(A),F,!0)},getTokenTypeAt:function(A){A=z(this.doc,A);var F=Rt(this,ur(this.doc,A.line)),J=0,oe=(F.length-1)/2,he=A.ch,ve;if(he==0)ve=F[2];else for(;;){var we=J+oe>>1;if((we?F[we*2-1]:0)>=he)oe=we;else if(F[we*2+1]<he)J=we+1;else{ve=F[we*2+2];break}}var Be=ve?ve.indexOf("overlay "):-1;return Be<0?ve:Be==0?null:ve.slice(0,Be-1)},getModeAt:function(A){var F=this.doc.mode;return F.innerMode?e.innerMode(F,this.getTokenAt(A).state).mode:F},getHelper:function(A,F){return this.getHelpers(A,F)[0]},getHelpers:function(A,F){var J=[];if(!R.hasOwnProperty(F))return J;var oe=R[F],he=this.getModeAt(A);if(typeof he[F]=="string")oe[he[F]]&&J.push(oe[he[F]]);else if(he[F])for(var ve=0;ve<he[F].length;ve++){var we=oe[he[F][ve]];we&&J.push(we)}else he.helperType&&oe[he.helperType]?J.push(oe[he.helperType]):oe[he.name]&&J.push(oe[he.name]);for(var Be=0;Be<oe._global.length;Be++){var Xe=oe._global[Be];Xe.pred(he,this)&&fe(J,Xe.val)==-1&&J.push(Xe.val)}return J},getStateAfter:function(A,F){var J=this.doc;return A=ae(J,A==null?J.first+J.size-1:A),Vt(this,A+1,F).state},cursorCoords:function(A,F){var J,oe=this.doc.sel.primary();return A==null?J=oe.head:typeof A=="object"?J=z(this.doc,A):J=A?oe.from():oe.to(),pn(this,J,F||"page")},charCoords:function(A,F){return jn(this,z(this.doc,A),F||"page")},coordsChar:function(A,F){return A=hn(this,A,F||"page"),dn(this,A.left,A.top)},lineAtHeight:function(A,F){return A=hn(this,{top:A,left:0},F||"page").top,Bn(this.doc,A+this.display.viewOffset)},heightAtLine:function(A,F,J){var oe=!1,he;if(typeof A=="number"){var ve=this.doc.first+this.doc.size-1;A<this.doc.first?A=this.doc.first:A>ve&&(A=ve,oe=!0),he=ur(this.doc,A)}else he=A;return xn(this,he,{top:0,left:0},F||"page",J||oe).top+(oe?this.doc.height-cr(he):0)},defaultTextHeight:function(){return ti(this.display)},defaultCharWidth:function(){return ci(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(A,F,J,oe,he){var ve=this.display;A=pn(this,z(this.doc,A));var we=A.bottom,Be=A.left;if(F.style.position="absolute",F.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(F),ve.sizer.appendChild(F),oe=="over")we=A.top;else if(oe=="above"||oe=="near"){var Xe=Math.max(ve.wrapper.clientHeight,this.doc.height),ut=Math.max(ve.sizer.clientWidth,ve.lineSpace.clientWidth);(oe=="above"||A.bottom+F.offsetHeight>Xe)&&A.top>F.offsetHeight?we=A.top-F.offsetHeight:A.bottom+F.offsetHeight<=Xe&&(we=A.bottom),Be+F.offsetWidth>ut&&(Be=ut-F.offsetWidth)}F.style.top=we+"px",F.style.left=F.style.right="",he=="right"?(Be=ve.sizer.clientWidth-F.offsetWidth,F.style.right="0px"):(he=="left"?Be=0:he=="middle"&&(Be=(ve.sizer.clientWidth-F.offsetWidth)/2),F.style.left=Be+"px"),J&&Ma(this,{left:Be,top:we,right:Be+F.offsetWidth,bottom:we+F.offsetHeight})},triggerOnKeyDown:Pi(Qs),triggerOnKeyPress:Pi(el),triggerOnKeyUp:Zs,triggerOnMouseDown:Pi(tl),execCommand:function(A){if(So.hasOwnProperty(A))return So[A].call(null,this)},triggerElectric:Pi(function(A){ll(this,A)}),findPosH:function(A,F,J,oe){var he=1;F<0&&(he=-1,F=-F);for(var ve=z(this.doc,A),we=0;we<F&&!(ve=hs(this.doc,ve,he,J,oe),ve.hitSide);++we);return ve},moveH:Pi(function(A,F){var J=this;this.extendSelectionsBy(function(oe){return J.display.shift||J.doc.extend||oe.empty()?hs(J.doc,oe.head,A,F,J.options.rtlMoveVisually):A<0?oe.from():oe.to()},Oe)}),deleteH:Pi(function(A,F){var J=this.doc.sel,oe=this.doc;J.somethingSelected()?oe.replaceSelection("",null,"+delete"):ao(this,function(he){var ve=hs(oe,he.head,A,F,!1);return A<0?{from:ve,to:he.head}:{from:he.head,to:ve}})}),findPosV:function(A,F,J,oe){var he=1,ve=oe;F<0&&(he=-1,F=-F);for(var we=z(this.doc,A),Be=0;Be<F;++Be){var Xe=pn(this,we,"div");if(ve==null?ve=Xe.left:Xe.left=ve,we=fl(this,Xe,he,J),we.hitSide)break}return we},moveV:Pi(function(A,F){var J=this,oe=this.doc,he=[],ve=!this.display.shift&&!oe.extend&&oe.sel.somethingSelected();if(oe.extendSelectionsBy(function(Be){if(ve)return A<0?Be.from():Be.to();var Xe=pn(J,Be.head,"div");Be.goalColumn!=null&&(Xe.left=Be.goalColumn),he.push(Xe.left);var ut=fl(J,Xe,A,F);return F=="page"&&Be==oe.sel.primary()&&Sa(J,jn(J,ut,"div").top-Xe.top),ut},Oe),he.length)for(var we=0;we<oe.sel.ranges.length;we++)oe.sel.ranges[we].goalColumn=he[we]}),findWordAt:function(A){var F=this.doc,J=ur(F,A.line).text,oe=A.ch,he=A.ch;if(J){var ve=this.getHelper(A,"wordChars");(A.sticky=="before"||he==J.length)&&oe?--oe:++he;for(var we=J.charAt(oe),Be=V(we,ve)?function(Xe){return V(Xe,ve)}:/\s/.test(we)?function(Xe){return/\s/.test(Xe)}:function(Xe){return!/\s/.test(Xe)&&!V(Xe)};oe>0&&Be(J.charAt(oe-1));)--oe;for(;he<J.length&&Be(J.charAt(he));)++he}return new Nn(wt(A.line,oe),wt(A.line,he))},toggleOverwrite:function(A){if(A!=null&&A==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?H(this.display.cursorDiv,"CodeMirror-overwrite"):C(this.display.cursorDiv,"CodeMirror-overwrite"),Qe(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==G()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Pi(function(A,F){da(this,A,F)}),getScrollInfo:function(){var A=this.display.scroller;return{left:A.scrollLeft,top:A.scrollTop,height:A.scrollHeight-Ye(this)-this.display.barHeight,width:A.scrollWidth-Ye(this)-this.display.barWidth,clientHeight:Ee(this),clientWidth:Fe(this)}},scrollIntoView:Pi(function(A,F){A==null?(A={from:this.doc.sel.primary().head,to:null},F==null&&(F=this.options.cursorScrollMargin)):typeof A=="number"?A={from:wt(A,0),to:null}:A.from==null&&(A={from:A,to:null}),A.to||(A.to=A.from),A.margin=F||0,A.from.line!=null?co(this,A):Ta(this,A.from,A.to,A.margin)}),setSize:Pi(function(A,F){var J=this,oe=function(ve){return typeof ve=="number"||/^\d+$/.test(String(ve))?ve+"px":ve};A!=null&&(this.display.wrapper.style.width=oe(A)),F!=null&&(this.display.wrapper.style.height=oe(F)),this.options.lineWrapping&&$r(this);var he=this.display.viewFrom;this.doc.iter(he,this.display.viewTo,function(ve){if(ve.widgets){for(var we=0;we<ve.widgets.length;we++)if(ve.widgets[we].noHScroll){Qn(J,he,"widget");break}}++he}),this.curOp.forceUpdate=!0,Qe(this,"refresh",this)}),operation:function(A){return Wi(this,A)},startOperation:function(){return Kn(this)},endOperation:function(){return Oa(this)},refresh:Pi(function(){var A=this.display.cachedTextHeight;zn(this),this.curOp.forceUpdate=!0,nn(this),da(this,this.doc.scrollLeft,this.doc.scrollTop),Ja(this.display),(A==null||Math.abs(A-ti(this.display))>.5||this.options.lineWrapping)&&Oi(this),Qe(this,"refresh",this)}),swapDoc:Pi(function(A){var F=this.doc;return F.cm=null,this.state.selectingText&&this.state.selectingText(),gs(this,A),nn(this),this.display.input.reset(),da(this,A.scrollLeft,A.scrollTop),this.curOp.forceScroll=!0,Zt(this,"swapDoc",this,F),F}),phrase:function(A){var F=this.options.phrases;return F&&Object.prototype.hasOwnProperty.call(F,A)?F[A]:A},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ie(e),e.registerHelper=function(A,F,J){R.hasOwnProperty(A)||(R[A]=e[A]={_global:[]}),R[A][F]=J},e.registerGlobalHelper=function(A,F,J,oe){e.registerHelper(A,F,oe),R[A]._global.push({pred:J,val:oe})}}function hs(e,i,R,A,F){var J=i,oe=R,he=ur(e,i.line),ve=F&&e.direction=="rtl"?-R:R;function we(){var _r=i.line+ve;return _r<e.first||_r>=e.first+e.size?!1:(i=new wt(_r,i.ch,i.sticky),he=ur(e,_r))}function Be(_r){var ar;if(A=="codepoint"){var Rr=he.text.charCodeAt(i.ch+(A>0?0:-1));isNaN(Rr)?ar=null:ar=new wt(i.line,Math.max(0,Math.min(he.text.length,i.ch+R*(Rr>=55296&&Rr<56320?2:1))),-R)}else F?ar=Il(e.cm,he,i,R):ar=os(he,i,R);if(ar==null)if(!_r&&we())i=ss(F,e.cm,he,i.line,ve);else return!1;else i=ar;return!0}if(A=="char"||A=="codepoint")Be();else if(A=="column")Be(!0);else if(A=="word"||A=="group")for(var Xe=null,ut=A=="group",ot=e.cm&&e.cm.getHelper(i,"wordChars"),Ot=!0;!(R<0&&!Be(!Ot));Ot=!1){var Bt=he.text.charAt(i.ch)||`
|
|
|
`,Qt=V(Bt,ot)?"w":ut&&Bt==`
|
|
|
`?"n":!ut||/\s/.test(Bt)?null:"p";if(ut&&!Ot&&!Qt&&(Qt="s"),Xe&&Xe!=Qt){R<0&&(R=1,Be(),i.sticky="after");break}if(Qt&&(Xe=Qt),R>0&&!Be(!Ot))break}var ir=Wo(e,i,J,oe,!0);return en(J,ir)&&(ir.hitSide=!0),ir}function fl(e,i,R,A){var F=e.doc,J=i.left,oe;if(A=="page"){var he=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ve=Math.max(he-.5*ti(e.display),3);oe=(R>0?i.bottom:i.top)+R*ve}else A=="line"&&(oe=R>0?i.bottom+3:i.top-3);for(var we;!(we=dn(e,J,oe),!we.outside);){if(R<0?oe<=0:oe>=F.height){we.hitSide=!0;break}oe+=R*5}return we}var Gn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ne,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Gn.prototype.init=function(e){var i=this,R=this,A=R.cm,F=R.div=e.lineDiv;cl(F,A.options.spellcheck,A.options.autocorrect,A.options.autocapitalize);function J(he){for(var ve=he.target;ve;ve=ve.parentNode){if(ve==F)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ve.className))break}return!1}Re(F,"paste",function(he){if(!J(he)||lt(A,he)||sl(he,A))return;b<=11&&setTimeout(pi(A,function(){return i.updateFromDOM()}),20)}),Re(F,"compositionstart",function(he){i.composing={data:he.data,done:!1}}),Re(F,"compositionupdate",function(he){i.composing||(i.composing={data:he.data,done:!1})}),Re(F,"compositionend",function(he){i.composing&&(he.data!=i.composing.data&&i.readFromDOMSoon(),i.composing.done=!0)}),Re(F,"touchstart",function(){return R.forceCompositionEnd()}),Re(F,"input",function(){i.composing||i.readFromDOMSoon()});function oe(he){if(!J(he)||lt(A,he))return;if(A.somethingSelected())Xo({lineWise:!1,text:A.getSelections()}),he.type=="cut"&&A.replaceSelection("",null,"cut");else if(A.options.lineWiseCopyCut){var ve=ul(A);Xo({lineWise:!0,text:ve.text}),he.type=="cut"&&A.operation(function(){A.setSelections(ve.ranges,0,De),A.replaceSelection("",null,"cut")})}else return;if(he.clipboardData){he.clipboardData.clearData();var we=ya.text.join(`
|
|
|
`);if(he.clipboardData.setData("Text",we),he.clipboardData.getData("Text")==we){he.preventDefault();return}}var Be=dl(),Xe=Be.firstChild;A.display.lineSpace.insertBefore(Be,A.display.lineSpace.firstChild),Xe.value=ya.text.join(`
|
|
|
`);var ut=document.activeElement;K(Xe),setTimeout(function(){A.display.lineSpace.removeChild(Be),ut.focus(),ut==F&&R.showPrimarySelection()},50)}Re(F,"copy",oe),Re(F,"cut",oe)},Gn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Gn.prototype.prepareSelection=function(){var e=Ui(this.cm,!1);return e.focus=document.activeElement==this.div,e},Gn.prototype.showSelection=function(e,i){if(!e||!this.cm.display.view.length)return;(e.focus||i)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Gn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Gn.prototype.showPrimarySelection=function(){var e=this.getSelection(),i=this.cm,R=i.doc.sel.primary(),A=R.from(),F=R.to();if(i.display.viewTo==i.display.viewFrom||A.line>=i.display.viewTo||F.line<i.display.viewFrom){e.removeAllRanges();return}var J=$o(i,e.anchorNode,e.anchorOffset),oe=$o(i,e.focusNode,e.focusOffset);if(J&&!J.bad&&oe&&!oe.bad&&$t(On(J,oe),A)==0&&$t(_n(J,oe),F)==0)return;var he=i.display.view,ve=A.line>=i.display.viewFrom&&hl(i,A)||{node:he[0].measure.map[2],offset:0},we=F.line<i.display.viewTo&&hl(i,F);if(!we){var Be=he[he.length-1].measure,Xe=Be.maps?Be.maps[Be.maps.length-1]:Be.map;we={node:Xe[Xe.length-1],offset:Xe[Xe.length-2]-Xe[Xe.length-3]}}if(!ve||!we){e.removeAllRanges();return}var ut=e.rangeCount&&e.getRangeAt(0),ot;try{ot=I(ve.node,ve.offset,we.offset,we.node)}catch(Ot){}ot&&(!T&&i.state.focused?(e.collapse(ve.node,ve.offset),ot.collapsed||(e.removeAllRanges(),e.addRange(ot))):(e.removeAllRanges(),e.addRange(ot)),ut&&e.anchorNode==null?e.addRange(ut):T&&this.startGracePeriod()),this.rememberSelection()},Gn.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Gn.prototype.showMultipleSelections=function(e){y(this.cm.display.cursorDiv,e.cursors),y(this.cm.display.selectionDiv,e.selection)},Gn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Gn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var i=e.getRangeAt(0).commonAncestorContainer;return N(this.div,i)},Gn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Gn.prototype.blur=function(){this.div.blur()},Gn.prototype.getField=function(){return this.div},Gn.prototype.supportsTouch=function(){return!0},Gn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Wi(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function i(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,i))}this.polling.set(this.cm.options.pollInterval,i)},Gn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Gn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),i=this.cm;if(s&&n&&this.cm.display.gutterSpecs.length&&tu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var R=$o(i,e.anchorNode,e.anchorOffset),A=$o(i,e.focusNode,e.focusOffset);R&&A&&Wi(i,function(){Ni(i.doc,va(R,A),De),(R.bad||A.bad)&&(i.curOp.selectionChanged=!0)})},Gn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,i=e.display,R=e.doc.sel.primary(),A=R.from(),F=R.to();if(A.ch==0&&A.line>e.firstLine()&&(A=wt(A.line-1,ur(e.doc,A.line-1).length)),F.ch==ur(e.doc,F.line).text.length&&F.line<e.lastLine()&&(F=wt(F.line+1,0)),A.line<i.viewFrom||F.line>i.viewTo-1)return!1;var J,oe,he;A.line==i.viewFrom||(J=Hn(e,A.line))==0?(oe=Zr(i.view[0].line),he=i.view[0].node):(oe=Zr(i.view[J].line),he=i.view[J-1].node.nextSibling);var ve=Hn(e,F.line),we,Be;if(ve==i.view.length-1?(we=i.viewTo-1,Be=i.lineDiv.lastChild):(we=Zr(i.view[ve+1].line)-1,Be=i.view[ve+1].node.previousSibling),!he)return!1;for(var Xe=e.doc.splitLines(ru(e,he,Be,oe,we)),ut=Xn(e.doc,wt(oe,0),wt(we,ur(e.doc,we).text.length));Xe.length>1&&ut.length>1;)if(re(Xe)==re(ut))Xe.pop(),ut.pop(),we--;else if(Xe[0]==ut[0])Xe.shift(),ut.shift(),oe++;else break;for(var ot=0,Ot=0,Bt=Xe[0],Qt=ut[0],ir=Math.min(Bt.length,Qt.length);ot<ir&&Bt.charCodeAt(ot)==Qt.charCodeAt(ot);)++ot;for(var _r=re(Xe),ar=re(ut),Rr=Math.min(_r.length-(Xe.length==1?ot:0),ar.length-(ut.length==1?ot:0));Ot<Rr&&_r.charCodeAt(_r.length-Ot-1)==ar.charCodeAt(ar.length-Ot-1);)++Ot;if(Xe.length==1&&ut.length==1&&oe==A.line)for(;ot&&ot>A.ch&&_r.charCodeAt(_r.length-Ot-1)==ar.charCodeAt(ar.length-Ot-1);)ot--,Ot++;Xe[Xe.length-1]=_r.slice(0,_r.length-Ot).replace(/^\u200b+/,""),Xe[0]=Xe[0].slice(ot).replace(/\u200b+$/,"");var qr=wt(oe,ot),Gr=wt(we,ut.length?re(ut).length-Ot:0);if(Xe.length>1||Xe[0]||$t(qr,Gr))return ro(e.doc,Xe,qr,Gr,"+input"),!0},Gn.prototype.ensurePolled=function(){this.forceCompositionEnd()},Gn.prototype.reset=function(){this.forceCompositionEnd()},Gn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Gn.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)},Gn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Wi(this.cm,function(){return zn(e.cm)})},Gn.prototype.setUneditable=function(e){e.contentEditable="false"},Gn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||pi(this.cm,fs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Gn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Gn.prototype.onContextMenu=function(){},Gn.prototype.resetPosition=function(){},Gn.prototype.needsContentAttribute=!0;function hl(e,i){var R=Ve(e,i.line);if(!R||R.hidden)return null;var A=ur(e.doc,i.line),F=_e(R,A,i.line),J=ht(A,e.doc.direction),oe="left";if(J){var he=at(J,i.ch);oe=he%2?"right":"left"}var ve=kt(F.map,i.ch,oe);return ve.offset=ve.collapse=="right"?ve.end:ve.start,ve}function tu(e){for(var i=e;i;i=i.parentNode)if(/CodeMirror-gutter-wrapper/.test(i.className))return!0;return!1}function so(e,i){return i&&(e.bad=!0),e}function ru(e,i,R,A,F){var J="",oe=!1,he=e.doc.lineSeparator(),ve=!1;function we(ot){return function(Ot){return Ot.id==ot}}function Be(){oe&&(J+=he,ve&&(J+=he),oe=ve=!1)}function Xe(ot){ot&&(Be(),J+=ot)}function ut(ot){if(ot.nodeType==1){var Ot=ot.getAttribute("cm-text");if(Ot){Xe(Ot);return}var Bt=ot.getAttribute("cm-marker"),Qt;if(Bt){var ir=e.findMarks(wt(A,0),wt(F+1,0),we(+Bt));ir.length&&(Qt=ir[0].find(0))&&Xe(Xn(e.doc,Qt.from,Qt.to).join(he));return}if(ot.getAttribute("contenteditable")=="false")return;var _r=/^(pre|div|p|li|table|br)$/i.test(ot.nodeName);if(!/^br$/i.test(ot.nodeName)&&ot.textContent.length==0)return;_r&&Be();for(var ar=0;ar<ot.childNodes.length;ar++)ut(ot.childNodes[ar]);/^(pre|p)$/i.test(ot.nodeName)&&(ve=!0),_r&&(oe=!0)}else ot.nodeType==3&&Xe(ot.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(ut(i),i==R);)i=i.nextSibling,ve=!1;return J}function $o(e,i,R){var A;if(i==e.display.lineDiv){if(A=e.display.lineDiv.childNodes[R],!A)return so(e.clipPos(wt(e.display.viewTo-1)),!0);i=null,R=0}else for(A=i;;A=A.parentNode){if(!A||A==e.display.lineDiv)return null;if(A.parentNode&&A.parentNode==e.display.lineDiv)break}for(var F=0;F<e.display.view.length;F++){var J=e.display.view[F];if(J.node==A)return nu(J,i,R)}}function nu(e,i,R){var A=e.text.firstChild,F=!1;if(!i||!N(A,i))return so(wt(Zr(e.line),0),!0);if(i==A&&(F=!0,i=A.childNodes[R],R=0,!i)){var J=e.rest?re(e.rest):e.line;return so(wt(Zr(J),J.text.length),F)}var oe=i.nodeType==3?i:null,he=i;for(!oe&&i.childNodes.length==1&&i.firstChild.nodeType==3&&(oe=i.firstChild,R&&(R=oe.nodeValue.length));he.parentNode!=A;)he=he.parentNode;var ve=e.measure,we=ve.maps;function Be(Qt,ir,_r){for(var ar=-1;ar<(we?we.length:0);ar++)for(var Rr=ar<0?ve.map:we[ar],qr=0;qr<Rr.length;qr+=3){var Gr=Rr[qr+2];if(Gr==Qt||Gr==ir){var wn=Zr(ar<0?e.line:e.rest[ar]),Zn=Rr[qr]+_r;return(_r<0||Gr!=Qt)&&(Zn=Rr[qr+(_r?1:0)]),wt(wn,Zn)}}}var Xe=Be(oe,he,R);if(Xe)return so(Xe,F);for(var ut=he.nextSibling,ot=oe?oe.nodeValue.length-R:0;ut;ut=ut.nextSibling){if(Xe=Be(ut,ut.firstChild,0),Xe)return so(wt(Xe.line,Xe.ch-ot),F);ot+=ut.textContent.length}for(var Ot=he.previousSibling,Bt=R;Ot;Ot=Ot.previousSibling){if(Xe=Be(Ot,Ot.firstChild,-1),Xe)return so(wt(Xe.line,Xe.ch+Bt),F);Bt+=Ot.textContent.length}}var vi=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ne,this.hasSelection=!1,this.composing=null};vi.prototype.init=function(e){var i=this,R=this,A=this.cm;this.createField(e);var F=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(F.style.width="0px"),Re(F,"input",function(){S&&b>=9&&i.hasSelection&&(i.hasSelection=null),R.poll()}),Re(F,"paste",function(oe){if(lt(A,oe)||sl(oe,A))return;A.state.pasteIncoming=+new Date,R.fastPoll()});function J(oe){if(lt(A,oe))return;if(A.somethingSelected())Xo({lineWise:!1,text:A.getSelections()});else if(A.options.lineWiseCopyCut){var he=ul(A);Xo({lineWise:!0,text:he.text}),oe.type=="cut"?A.setSelections(he.ranges,null,De):(R.prevInput="",F.value=he.text.join(`
|
|
|
`),K(F))}else return;oe.type=="cut"&&(A.state.cutIncoming=+new Date)}Re(F,"cut",J),Re(F,"copy",J),Re(e.scroller,"paste",function(oe){if(yn(e,oe)||lt(A,oe))return;if(!F.dispatchEvent){A.state.pasteIncoming=+new Date,R.focus();return}var he=new Event("paste");he.clipboardData=oe.clipboardData,F.dispatchEvent(he)}),Re(e.lineSpace,"selectstart",function(oe){yn(e,oe)||Ce(oe)}),Re(F,"compositionstart",function(){var oe=A.getCursor("from");R.composing&&R.composing.range.clear(),R.composing={start:oe,range:A.markText(oe,A.getCursor("to"),{className:"CodeMirror-composing"})}}),Re(F,"compositionend",function(){R.composing&&(R.poll(),R.composing.range.clear(),R.composing=null)})},vi.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},vi.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},vi.prototype.prepareSelection=function(){var e=this.cm,i=e.display,R=e.doc,A=Ui(e);if(e.options.moveInputWithCursor){var F=pn(e,R.sel.primary().head,"div"),J=i.wrapper.getBoundingClientRect(),oe=i.lineDiv.getBoundingClientRect();A.teTop=Math.max(0,Math.min(i.wrapper.clientHeight-10,F.top+oe.top-J.top)),A.teLeft=Math.max(0,Math.min(i.wrapper.clientWidth-10,F.left+oe.left-J.left))}return A},vi.prototype.showSelection=function(e){var i=this.cm,R=i.display;y(R.cursorDiv,e.cursors),y(R.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},vi.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var i=this.cm;if(i.somethingSelected()){this.prevInput="";var R=i.getSelection();this.textarea.value=R,i.state.focused&&K(this.textarea),S&&b>=9&&(this.hasSelection=R)}else e||(this.prevInput=this.textarea.value="",S&&b>=9&&(this.hasSelection=null))},vi.prototype.getField=function(){return this.textarea},vi.prototype.supportsTouch=function(){return!1},vi.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!r||G()!=this.textarea))try{this.textarea.focus()}catch(e){}},vi.prototype.blur=function(){this.textarea.blur()},vi.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},vi.prototype.receivedFocus=function(){this.slowPoll()},vi.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()})},vi.prototype.fastPoll=function(){var e=!1,i=this;i.pollingFast=!0;function R(){var A=i.poll();!A&&!e?(e=!0,i.polling.set(60,R)):(i.pollingFast=!1,i.slowPoll())}i.polling.set(20,R)},vi.prototype.poll=function(){var e=this,i=this.cm,R=this.textarea,A=this.prevInput;if(this.contextMenuPending||!i.state.focused||St(R)&&!A&&!this.composing||i.isReadOnly()||i.options.disableInput||i.state.keySeq)return!1;var F=R.value;if(F==A&&!i.somethingSelected())return!1;if(S&&b>=9&&this.hasSelection===F||a&&/[\uf700-\uf7ff]/.test(F))return i.display.input.reset(),!1;if(i.doc.sel==i.display.selForContextMenu){var J=F.charCodeAt(0);if(J==8203&&!A&&(A="\u200B"),J==8666)return this.reset(),this.cm.execCommand("undo")}for(var oe=0,he=Math.min(A.length,F.length);oe<he&&A.charCodeAt(oe)==F.charCodeAt(oe);)++oe;return Wi(i,function(){fs(i,F.slice(oe),A.length-oe,null,e.composing?"*compose":null),F.length>1e3||F.indexOf(`
|
|
|
`)>-1?R.value=e.prevInput="":e.prevInput=F,e.composing&&(e.composing.range.clear(),e.composing.range=i.markText(e.composing.start,i.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},vi.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},vi.prototype.onKeyPress=function(){S&&b>=9&&(this.hasSelection=null),this.fastPoll()},vi.prototype.onContextMenu=function(e){var i=this,R=i.cm,A=R.display,F=i.textarea;i.contextMenuPending&&i.contextMenuPending();var J=di(R,e),oe=A.scroller.scrollTop;if(!J||c)return;var he=R.options.resetSelectionOnContextMenu;he&&R.doc.sel.contains(J)==-1&&pi(R,Ni)(R.doc,va(J),De);var ve=F.style.cssText,we=i.wrapper.style.cssText,Be=i.wrapper.offsetParent.getBoundingClientRect();i.wrapper.style.cssText="position: static",F.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(e.clientY-Be.top-5)+"px; left: "+(e.clientX-Be.left-5)+`px;
|
|
|
z-index: 1000; background: `+(S?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Xe;d&&(Xe=window.scrollY),A.input.focus(),d&&window.scrollTo(null,Xe),A.input.reset(),R.somethingSelected()||(F.value=i.prevInput=" "),i.contextMenuPending=ot,A.selForContextMenu=R.doc.sel,clearTimeout(A.detectingSelectAll);function ut(){if(F.selectionStart!=null){var Bt=R.somethingSelected(),Qt="\u200B"+(Bt?F.value:"");F.value="\u21DA",F.value=Qt,i.prevInput=Bt?"":"\u200B",F.selectionStart=1,F.selectionEnd=Qt.length,A.selForContextMenu=R.doc.sel}}function ot(){if(i.contextMenuPending!=ot)return;if(i.contextMenuPending=!1,i.wrapper.style.cssText=we,F.style.cssText=ve,S&&b<9&&A.scrollbars.setScrollTop(A.scroller.scrollTop=oe),F.selectionStart!=null){(!S||S&&b<9)&&ut();var Bt=0,Qt=function(){A.selForContextMenu==R.doc.sel&&F.selectionStart==0&&F.selectionEnd>0&&i.prevInput=="\u200B"?pi(R,Ds)(R):Bt++<10?A.detectingSelectAll=setTimeout(Qt,500):(A.selForContextMenu=null,A.input.reset())};A.detectingSelectAll=setTimeout(Qt,200)}}if(S&&b>=9&&ut(),k){Ne(e);var Ot=function(){ft(window,"mouseup",Ot),setTimeout(ot,20)};Re(window,"mouseup",Ot)}else setTimeout(ot,50)},vi.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},vi.prototype.setUneditable=function(){},vi.prototype.needsContentAttribute=!1;function iu(e,i){if(i=i?W(i):{},i.value=e.value,!i.tabindex&&e.tabIndex&&(i.tabindex=e.tabIndex),!i.placeholder&&e.placeholder&&(i.placeholder=e.placeholder),i.autofocus==null){var R=G();i.autofocus=R==e||e.getAttribute("autofocus")!=null&&R==document.body}function A(){e.value=he.getValue()}var F;if(e.form&&(Re(e.form,"submit",A),!i.leaveSubmitMethodAlone)){var J=e.form;F=J.submit;try{var oe=J.submit=function(){A(),J.submit=F,J.submit(),J.submit=oe}}catch(ve){}}i.finishInit=function(ve){ve.save=A,ve.getTextArea=function(){return e},ve.toTextArea=function(){ve.toTextArea=isNaN,A(),e.parentNode.removeChild(ve.getWrapperElement()),e.style.display="",e.form&&(ft(e.form,"submit",A),!i.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=F))}},e.style.display="none";var he=ri(function(ve){return e.parentNode.insertBefore(ve,e.nextSibling)},i);return he}function au(e){e.off=ft,e.on=Re,e.wheelEventPixels=ho,e.Doc=Yi,e.splitLines=mr,e.countColumn=X,e.findColumn=xe,e.isWordChar=Q,e.Pass=Ae,e.signal=Qe,e.Line=Fr,e.changeEnd=ga,e.scrollbarModel=vr,e.Pos=wt,e.cmpPos=$t,e.modes=un,e.mimeModes=Ar,e.resolveMode=Kt,e.getMode=or,e.modeExtensions=Xt,e.extendMode=gr,e.copyState=Xr,e.startState=Ln,e.innerMode=kn,e.commands=So,e.keyMap=Da,e.keyName=Vs,e.isModifierKey=Ks,e.lookupKey=io,e.normalizeKeyMap=Ml,e.StringStream=tn,e.SharedTextMarker=Co,e.TextMarker=ja,e.LineWidget=xo,e.e_preventDefault=Ce,e.e_stopPropagation=Se,e.e_stop=Ne,e.addClass=H,e.contains=N,e.rmClass=C,e.keyNames=Fa}Jl(ri),eu(ri);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Yo in Yi.prototype)Yi.prototype.hasOwnProperty(Yo)&&fe(ou,Yo)<0&&(ri.prototype[Yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Yi.prototype[Yo]));return Ie(Yi),ri.inputStyles={textarea:vi,contenteditable:Gn},ri.defineMode=function(e){!ri.defaults.mode&&e!="null"&&(ri.defaults.mode=e),vn.apply(this,arguments)},ri.defineMIME=mn,ri.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ri.defineMIME("text/plain","null"),ri.defineExtension=function(e,i){ri.prototype[e]=i},ri.defineDocExtension=function(e,i){Yi.prototype[e]=i},ri.fromTextArea=iu,au(ri),ri.version="5.58.2",ri})},WYAk:function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){(function(){var g=L,T=g.lib,P=T.Base,p=g.enc,v=p.Utf8,S=g.algo,b=S.HMAC=P.extend({init:function(d,l){d=this._hasher=new d.init,typeof l=="string"&&(l=v.parse(l));var n=d.blockSize,c=n*4;l.sigBytes>c&&(l=d.finalize(l)),l.clamp();for(var u=this._oKey=l.clone(),o=this._iKey=l.clone(),h=u.words,m=o.words,s=0;s<n;s++)h[s]^=1549556828,m[s]^=909522486;u.sigBytes=o.sigBytes=c,this.reset()},reset:function(){var d=this._hasher;d.reset(),d.update(this._iKey)},update:function(d){return this._hasher.update(d),this},finalize:function(d){var l=this._hasher,n=l.finalize(d);l.reset();var c=l.finalize(this._oKey.clone().concat(n));return c}})})()})},WaYH:function(j,Y,D){"use strict";var L=D("rePB"),g=D("Ff2n"),T=D("VTBJ"),P=D("1OyB"),p=D("vuIU"),v=D("JX7q"),S=D("Ji7U"),b=D("LK+K"),d=D("q1tI"),l=D("TSYQ"),n=D.n(l),c=D("sboe"),u=D("OZM5"),o=function(k){var O=k.prefixCls,C=k.level,x=k.isStart,y=k.isEnd;if(!C)return null;for(var _="".concat(O,"-indent-unit"),M=[],I=0;I<C;I+=1){var N;M.push(d.createElement("span",{key:I,className:n()(_,(N={},Object(L.a)(N,"".concat(_,"-start"),x[I+1]),Object(L.a)(N,"".concat(_,"-end"),y[I+1]),Object(L.a)(N,"".concat(_,"-end-first-level"),!I&&y[0]),N))}))}return d.createElement("span",{"aria-hidden":"true",className:"".concat(O,"-indent")},M)},h=o,m=D("815F"),s="open",r="close",a="---",t=function(f){Object(S.a)(O,f);var k=Object(b.a)(O);function O(){var C;return Object(P.a)(this,O),C=k.apply(this,arguments),C.state={dragNodeHighlight:!1},C.onSelectorClick=function(x){var y=C.props.context.onNodeClick;y(x,Object(m.b)(C.props)),C.isSelectable()?C.onSelect(x):C.onCheck(x)},C.onSelectorDoubleClick=function(x){var y=C.props.context.onNodeDoubleClick;y(x,Object(m.b)(C.props))},C.onSelect=function(x){if(C.isDisabled())return;var y=C.props.context.onNodeSelect;x.preventDefault(),y(x,Object(m.b)(C.props))},C.onCheck=function(x){if(C.isDisabled())return;var y=C.props,_=y.disableCheckbox,M=y.checked,I=C.props.context.onNodeCheck;if(!C.isCheckable()||_)return;x.preventDefault();var N=!M;I(x,Object(m.b)(C.props),N)},C.onMouseEnter=function(x){var y=C.props.context.onNodeMouseEnter;y(x,Object(m.b)(C.props))},C.onMouseLeave=function(x){var y=C.props.context.onNodeMouseLeave;y(x,Object(m.b)(C.props))},C.onContextMenu=function(x){var y=C.props.context.onNodeContextMenu;y(x,Object(m.b)(C.props))},C.onDragStart=function(x){var y=C.props.context.onNodeDragStart;x.stopPropagation(),C.setState({dragNodeHighlight:!0}),y(x,Object(v.a)(C));try{x.dataTransfer.setData("text/plain","")}catch(_){}},C.onDragEnter=function(x){var y=C.props.context.onNodeDragEnter;x.preventDefault(),x.stopPropagation(),y(x,Object(v.a)(C))},C.onDragOver=function(x){var y=C.props.context.onNodeDragOver;x.preventDefault(),x.stopPropagation(),y(x,Object(v.a)(C))},C.onDragLeave=function(x){var y=C.props.context.onNodeDragLeave;x.stopPropagation(),y(x,Object(v.a)(C))},C.onDragEnd=function(x){var y=C.props.context.onNodeDragEnd;x.stopPropagation(),C.setState({dragNodeHighlight:!1}),y(x,Object(v.a)(C))},C.onDrop=function(x){var y=C.props.context.onNodeDrop;x.preventDefault(),x.stopPropagation(),C.setState({dragNodeHighlight:!1}),y(x,Object(v.a)(C))},C.onExpand=function(x){var y=C.props.context.onNodeExpand;y(x,Object(m.b)(C.props))},C.setSelectHandle=function(x){C.selectHandle=x},C.getNodeState=function(){var x=C.props.expanded;return C.isLeaf()?null:x?s:r},C.hasChildren=function(){var x=C.props.eventKey,y=C.props.context.keyEntities,_=y[x]||{},M=_.children;return!!(M||[]).length},C.isLeaf=function(){var x=C.props,y=x.isLeaf,_=x.loaded,M=C.props.context.loadData,I=C.hasChildren();return y===!1?!1:y||!M&&!I||M&&_&&!I},C.isDisabled=function(){var x=C.props.disabled,y=C.props.context.disabled;return!!(y||x)},C.isCheckable=function(){var x=C.props.checkable,y=C.props.context.checkable;return!y||x===!1?!1:y},C.syncLoadData=function(x){var y=x.expanded,_=x.loading,M=x.loaded,I=C.props.context,N=I.loadData,G=I.onNodeLoad;if(_)return;N&&y&&!C.isLeaf()&&(!C.hasChildren()&&!M&&G(Object(m.b)(C.props)))},C.renderSwitcher=function(){var x=C.props,y=x.expanded,_=x.switcherIcon,M=C.props.context,I=M.prefixCls,N=M.switcherIcon,G=_||N;if(C.isLeaf())return d.createElement("span",{className:n()("".concat(I,"-switcher"),"".concat(I,"-switcher-noop"))},typeof G=="function"?G(Object(T.a)(Object(T.a)({},C.props),{},{isLeaf:!0})):G);var H=n()("".concat(I,"-switcher"),"".concat(I,"-switcher_").concat(y?s:r));return d.createElement("span",{onClick:C.onExpand,className:H},typeof G=="function"?G(Object(T.a)(Object(T.a)({},C.props),{},{isLeaf:!1})):G)},C.renderCheckbox=function(){var x=C.props,y=x.checked,_=x.halfChecked,M=x.disableCheckbox,I=C.props.context.prefixCls,N=C.isDisabled(),G=C.isCheckable();if(!G)return null;var H=typeof G!="boolean"?G:null;return d.createElement("span",{className:n()("".concat(I,"-checkbox"),y&&"".concat(I,"-checkbox-checked"),!y&&_&&"".concat(I,"-checkbox-indeterminate"),(N||M)&&"".concat(I,"-checkbox-disabled")),onClick:C.onCheck},H)},C.renderIcon=function(){var x=C.props.loading,y=C.props.context.prefixCls;return d.createElement("span",{className:n()("".concat(y,"-iconEle"),"".concat(y,"-icon__").concat(C.getNodeState()||"docu"),x&&"".concat(y,"-icon_loading"))})},C.renderSelector=function(){var x=C.state.dragNodeHighlight,y=C.props,_=y.title,M=y.selected,I=y.icon,N=y.loading,G=y.data,H=C.props.context,B=H.prefixCls,K=H.showIcon,U=H.icon,W=H.draggable,X=H.loadData,ne=H.titleRender,fe=C.isDisabled(),me="".concat(B,"-node-content-wrapper"),Ae;if(K){var De=I||U;Ae=De?d.createElement("span",{className:n()("".concat(B,"-iconEle"),"".concat(B,"-icon__customize"))},typeof De=="function"?De(C.props):De):C.renderIcon()}else X&&N&&(Ae=C.renderIcon());var ye;typeof _=="function"?ye=_(G):ne?ye=ne(G):ye=_;var Oe=d.createElement("span",{className:"".concat(B,"-title")},ye);return d.createElement("span",{ref:C.setSelectHandle,title:typeof _=="string"?_:"",className:n()("".concat(me),"".concat(me,"-").concat(C.getNodeState()||"normal"),!fe&&(M||x)&&"".concat(B,"-node-selected"),!fe&&W&&"draggable"),draggable:!fe&&W||void 0,"aria-grabbed":!fe&&W||void 0,onMouseEnter:C.onMouseEnter,onMouseLeave:C.onMouseLeave,onContextMenu:C.onContextMenu,onClick:C.onSelectorClick,onDoubleClick:C.onSelectorDoubleClick,onDragStart:W?C.onDragStart:void 0},Ae,Oe)},C}return Object(p.a)(O,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var x=this.props.selectable,y=this.props.context.selectable;return typeof x=="boolean"?x:y}},{key:"render",value:function(){var x,y=this.props,_=y.eventKey,M=y.className,I=y.style,N=y.dragOver,G=y.dragOverGapTop,H=y.dragOverGapBottom,B=y.isLeaf,K=y.isStart,U=y.isEnd,W=y.expanded,X=y.selected,ne=y.checked,fe=y.halfChecked,me=y.loading,Ae=y.domRef,De=y.active,ye=y.onMouseMove,Oe=Object(g.a)(y,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),xe=this.props.context,ue=xe.prefixCls,le=xe.filterTreeNode,re=xe.draggable,pe=xe.keyEntities,ee=this.isDisabled(),te=Object(u.f)(Oe),ce=pe[_]||{},q=ce.level,Q=U[U.length-1];return d.createElement("div",Object.assign({ref:Ae,className:n()(M,"".concat(ue,"-treenode"),(x={},Object(L.a)(x,"".concat(ue,"-treenode-disabled"),ee),Object(L.a)(x,"".concat(ue,"-treenode-switcher-").concat(W?"open":"close"),!B),Object(L.a)(x,"".concat(ue,"-treenode-checkbox-checked"),ne),Object(L.a)(x,"".concat(ue,"-treenode-checkbox-indeterminate"),fe),Object(L.a)(x,"".concat(ue,"-treenode-selected"),X),Object(L.a)(x,"".concat(ue,"-treenode-loading"),me),Object(L.a)(x,"".concat(ue,"-treenode-active"),De),Object(L.a)(x,"".concat(ue,"-treenode-leaf-last"),Q),Object(L.a)(x,"drag-over",!ee&&N),Object(L.a)(x,"drag-over-gap-top",!ee&&G),Object(L.a)(x,"drag-over-gap-bottom",!ee&&H),Object(L.a)(x,"filter-node",le&&le(Object(m.b)(this.props))),x)),style:I,onDragEnter:re?this.onDragEnter:void 0,onDragOver:re?this.onDragOver:void 0,onDragLeave:re?this.onDragLeave:void 0,onDrop:re?this.onDrop:void 0,onDragEnd:re?this.onDragEnd:void 0,onMouseMove:ye},te),d.createElement(h,{prefixCls:ue,level:q,isStart:K,isEnd:U}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),O}(d.Component),w=function(k){return d.createElement(c.a.Consumer,null,function(O){return d.createElement(t,Object.assign({},k,{context:O}))})};w.displayName="TreeNode",w.defaultProps={title:a},w.isTreeNode=1;var E=Y.a=w},WdTA:function(j,Y,D){j.exports=D.p+"static/studnetqun.598eeb43.png"},Y1PL:function(j,Y,D){"use strict";D.r(Y),D.d(Y,"ResizableTextArea",function(){return fe});var L=D("wx14"),g=D("1OyB"),T=D("vuIU"),P=D("Ji7U"),p=D("LK+K"),v=D("q1tI"),S=D("VTBJ"),b=D("rePB"),d=D("Zm9Q"),l=D("Kwbf"),n=D("c+Xe"),c=D("m+aA"),u=D("bdgK"),o=new Map;function h(De){De.forEach(function(ye){var Oe,xe=ye.target;(Oe=o.get(xe))===null||Oe===void 0||Oe.forEach(function(ue){return ue(xe)})})}var m=new u.default(h),s=null,r=null;function a(De,ye){o.has(De)||(o.set(De,new Set),m.observe(De)),o.get(De).add(ye)}function t(De,ye){o.has(De)&&(o.get(De).delete(ye),o.get(De).size||(m.unobserve(De),o.delete(De)))}var w=function(De){Object(P.a)(Oe,De);var ye=Object(p.a)(Oe);function Oe(){return Object(g.a)(this,Oe),ye.apply(this,arguments)}return Object(T.a)(Oe,[{key:"render",value:function(){return this.props.children}}]),Oe}(v.Component),E=v.createContext(null);function f(De){var ye=De.children,Oe=De.onBatchResize,xe=v.useRef(0),ue=v.useRef([]),le=v.useContext(E),re=v.useCallback(function(pe,ee,te){xe.current+=1;var ce=xe.current;ue.current.push({size:pe,element:ee,data:te}),Promise.resolve().then(function(){ce===xe.current&&(Oe==null||Oe(ue.current),ue.current=[])}),le==null||le(pe,ee,te)},[Oe,le]);return v.createElement(E.Provider,{value:re},ye)}function k(De){var ye=De.children,Oe=De.disabled,xe=v.useRef(null),ue=v.useRef(null),le=v.useContext(E),re=v.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),pe=v.isValidElement(ye)&&Object(n.c)(ye),ee=pe?ye.ref:null,te=v.useMemo(function(){return Object(n.a)(ee,xe)},[ee,xe]),ce=v.useRef(De);ce.current=De;var q=v.useCallback(function(Q){var V=ce.current,Z=V.onResize,be=V.data,ge=Q.getBoundingClientRect(),Te=ge.width,Je=ge.height,rt=Q.offsetWidth,nt=Q.offsetHeight,at=Math.floor(Te),ct=Math.floor(Je);if(re.current.width!==at||re.current.height!==ct||re.current.offsetWidth!==rt||re.current.offsetHeight!==nt){var ht={width:at,height:ct,offsetWidth:rt,offsetHeight:nt};re.current=ht;var He=rt===Math.round(Te)?Te:rt,Re=nt===Math.round(Je)?Je:nt,tt=Object(S.a)(Object(S.a)({},ht),{},{offsetWidth:He,offsetHeight:Re});le==null||le(tt,Q,be),Z&&Promise.resolve().then(function(){Z(tt,Q)})}},[]);return v.useEffect(function(){var Q=Object(c.a)(xe.current)||Object(c.a)(ue.current);return Q&&!Oe&&a(Q,q),function(){return t(Q,q)}},[xe.current,Oe]),v.createElement(w,{ref:ue},pe?v.cloneElement(ye,{ref:te}):ye)}var O="rc-observer-key";function C(De){var ye=De.children,Oe=Object(d.a)(ye);return Oe.map(function(xe,ue){var le=(xe==null?void 0:xe.key)||"".concat(O,"-").concat(ue);return v.createElement(k,Object(L.a)({},De,{key:le}),xe)})}C.Collection=f;var x=C,y=D("bT9E"),_=D("TSYQ"),M=D.n(_),I=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important
|
|
|
`,N=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],G={},H;function B(De){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=De.getAttribute("id")||De.getAttribute("data-reactid")||De.getAttribute("name");if(ye&&G[Oe])return G[Oe];var xe=window.getComputedStyle(De),ue=xe.getPropertyValue("box-sizing")||xe.getPropertyValue("-moz-box-sizing")||xe.getPropertyValue("-webkit-box-sizing"),le=parseFloat(xe.getPropertyValue("padding-bottom"))+parseFloat(xe.getPropertyValue("padding-top")),re=parseFloat(xe.getPropertyValue("border-bottom-width"))+parseFloat(xe.getPropertyValue("border-top-width")),pe=N.map(function(te){return"".concat(te,":").concat(xe.getPropertyValue(te))}).join(";"),ee={sizingStyle:pe,paddingSize:le,borderSize:re,boxSizing:ue};return ye&&Oe&&(G[Oe]=ee),ee}function K(De){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,xe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;H||(H=document.createElement("textarea"),H.setAttribute("tab-index","-1"),H.setAttribute("aria-hidden","true"),document.body.appendChild(H)),De.getAttribute("wrap")?H.setAttribute("wrap",De.getAttribute("wrap")):H.removeAttribute("wrap");var ue=B(De,ye),le=ue.paddingSize,re=ue.borderSize,pe=ue.boxSizing,ee=ue.sizingStyle;H.setAttribute("style","".concat(ee,";").concat(I)),H.value=De.value||De.placeholder||"";var te=Number.MIN_SAFE_INTEGER,ce=Number.MAX_SAFE_INTEGER,q=H.scrollHeight,Q;if(pe==="border-box"?q+=re:pe==="content-box"&&(q-=le),Oe!==null||xe!==null){H.value=" ";var V=H.scrollHeight-le;Oe!==null&&(te=V*Oe,pe==="border-box"&&(te=te+le+re),q=Math.max(te,q)),xe!==null&&(ce=V*xe,pe==="border-box"&&(ce=ce+le+re),Q=q>ce?"":"hidden",q=Math.min(ce,q))}return{height:q,minHeight:te,maxHeight:ce,overflowY:Q,resize:"none"}}var U=D("Gytx"),W=D.n(U),X;(function(De){De[De.NONE=0]="NONE",De[De.RESIZING=1]="RESIZING",De[De.RESIZED=2]="RESIZED"})(X||(X={}));var ne=function(De){Object(P.a)(Oe,De);var ye=Object(p.a)(Oe);function Oe(xe){var ue;return Object(g.a)(this,Oe),ue=ye.call(this,xe),ue.nextFrameActionId=void 0,ue.resizeFrameId=void 0,ue.textArea=void 0,ue.saveTextArea=function(le){ue.textArea=le},ue.handleResize=function(le){var re=ue.state.resizeStatus,pe=ue.props,ee=pe.autoSize,te=pe.onResize;if(re!==X.NONE)return;typeof te=="function"&&te(le),ee&&ue.resizeOnNextFrame()},ue.resizeOnNextFrame=function(){cancelAnimationFrame(ue.nextFrameActionId),ue.nextFrameActionId=requestAnimationFrame(ue.resizeTextarea)},ue.resizeTextarea=function(){var le=ue.props.autoSize;if(!le||!ue.textArea)return;var re=le.minRows,pe=le.maxRows,ee=K(ue.textArea,!1,re,pe);ue.setState({textareaStyles:ee,resizeStatus:X.RESIZING},function(){cancelAnimationFrame(ue.resizeFrameId),ue.resizeFrameId=requestAnimationFrame(function(){ue.setState({resizeStatus:X.RESIZED},function(){ue.resizeFrameId=requestAnimationFrame(function(){ue.setState({resizeStatus:X.NONE}),ue.fixFirefoxAutoScroll()})})})})},ue.renderTextArea=function(){var le=ue.props,re=le.prefixCls,pe=re===void 0?"rc-textarea":re,ee=le.autoSize,te=le.onResize,ce=le.className,q=le.disabled,Q=ue.state,V=Q.textareaStyles,Z=Q.resizeStatus,be=Object(y.a)(ue.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ge=M()(pe,ce,Object(b.a)({},"".concat(pe,"-disabled"),q));"value"in be&&(be.value=be.value||"");var Te=Object(S.a)(Object(S.a)(Object(S.a)({},ue.props.style),V),Z===X.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return v.createElement(x,{onResize:ue.handleResize,disabled:!(ee||te)},v.createElement("textarea",Object(L.a)({},be,{className:ge,style:Te,ref:ue.saveTextArea})))},ue.state={textareaStyles:{},resizeStatus:X.NONE},ue}return Object(T.a)(Oe,[{key:"componentDidUpdate",value:function(ue){(ue.value!==this.props.value||!W()(ue.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var ue=this.textArea.selectionStart,le=this.textArea.selectionEnd;this.textArea.setSelectionRange(ue,le)}}catch(re){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Oe}(v.Component),fe=ne,me=function(De){Object(P.a)(Oe,De);var ye=Object(p.a)(Oe);function Oe(xe){var ue;Object(g.a)(this,Oe),ue=ye.call(this,xe),ue.resizableTextArea=void 0,ue.focus=function(){ue.resizableTextArea.textArea.focus()},ue.saveTextArea=function(re){ue.resizableTextArea=re},ue.handleChange=function(re){var pe=ue.props.onChange;ue.setValue(re.target.value,function(){ue.resizableTextArea.resizeTextarea()}),pe&&pe(re)},ue.handleKeyDown=function(re){var pe=ue.props,ee=pe.onPressEnter,te=pe.onKeyDown;re.keyCode===13&&ee&&ee(re),te&&te(re)};var le=typeof xe.value=="undefined"||xe.value===null?xe.defaultValue:xe.value;return ue.state={value:le},ue}return Object(T.a)(Oe,[{key:"setValue",value:function(ue,le){"value"in this.props||this.setState({value:ue},le)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return v.createElement(fe,Object(L.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ue){return"value"in ue?{value:ue.value}:null}}]),Oe}(v.Component),Ae=Y.default=me},ZW9T:function(j,Y,D){"use strict";D.d(Y,"a",function(){return x});var L=D("k1fw"),g=D("oBTY"),T=D("9og8"),P=D("miYZ"),p=D("tsqr"),v=D("rAM+"),S=D("tJVT"),b=D("PpiC"),d=D("WmNS"),l=D.n(d),n=D("q1tI"),c=D.n(n),u=D("bdgK");function o(y,_,M,I,N){var G=_.getWordUntilPosition(M),H={startLineNumber:M.lineNumber,endLineNumber:M.lineNumber,startColumn:G.startColumn,endColumn:G.endColumn},B=I.map(function(K){return{label:K,kind:y.languages.CompletionItemKind.Keyword,insertText:K,insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:H}});return N.map(function(K){B.push(Object(L.a)(Object(L.a)({},K),{},{range:H}))}),B}var h=function(y){var _={label:"ifelse",kind:y.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet},M=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];y.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(H,B){var K=o(y,H,B,M,[_]);return{suggestions:K}}});var I=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];y.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(H,B){var K=[{label:"print",kind:y.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
|
`),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet}],U=o(y,H,B,I,K);return{suggestions:U}}});var N=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];y.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(H,B){var K=[_,{label:"main",kind:y.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
|
|
|
`),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:y.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
|
|
|
`),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet}],U=o(y,H,B,N,K);return{suggestions:U}}})},m="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",s=D("fjLI"),r=D("LvDl"),a=D("+ua5");function t(y){return/^\d+$/.test(y)?"".concat(y,"px"):y}function w(){}var E=!1,f={"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",Scala:"scale"};function k(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_=y;if(Array.isArray(y)){for(var M=0;M<y.length;M++){var I=f[y[M]];if(I)return I}return _[0]}return f[_]||_}var O=null,C=Y.b=function(y){var _=y.width,M=_===void 0?"100%":_,I=y.height,N=I===void 0?"100%":I,G=y.value,H=y.language,B=H===void 0?"javascript":H,K=y.style,U=K===void 0?{}:K,W=y.options,X=W===void 0?{}:W,ne=y.overrideServices,fe=ne===void 0?{}:ne,me=y.theme,Ae=me===void 0?"vs-dark":me,De=y.onEditBlur,ye=y.onSave,Oe=y.autoHeight,xe=Oe===void 0?!1:Oe,ue=y.forbidCopy,le=ue===void 0?!1:ue,re=y.onChange,pe=re===void 0?w:re,ee=y.editorDidMount,te=ee===void 0?w:ee,ce=y.onFocus,q=ce===void 0?w:ce,Q=y.onBreakPoint,V=Q===void 0?w:Q,Z=y.breakPointValue,be=Z===void 0?[]:Z,ge=y.filename,Te=ge===void 0?"educoder.txt":ge,Je=y.errorLine,rt=y.errorContent,nt=rt===void 0?"":rt,at=y.highlightLine,ct=y.openBreakPoint,ht=ct===void 0?!1:ct,He=Object(b.a)(y,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint"]),Re=Object(n.useRef)(),tt=Object(n.useRef)({}),ft=Object(n.useRef)(),Qe=Object(n.useRef)(),lt=Object(n.useRef)([]),Ue=Object(n.useRef)(!1),Le=Object(n.useRef)(),Ie=Object(n.useState)(!1),Ce=Object(S.a)(Ie,2),Se=Ce[0],ke=Ce[1];function Ne(){var or;return Re.current&&(or=new u.default(function(Xt){var gr=Object(v.a)(Xt),Xr;try{for(gr.s();!(Xr=gr.n()).done;){var kn=Xr.value;(kn.target.offsetHeight>0||kn.target.offsetWidth>0)&&tt.current.instance.layout()}}catch(Ln){gr.e(Ln)}finally{gr.f()}}),or.observe(Re.current)),or}function et(){p.b.warn({content:decodeURIComponent(m),key:"monaco-editor-tip"})}var $e=function(){var Xt=tt.current.instance;if(G!=null&&Xt&&Se){var gr=Xt.getModel();gr&&G!==gr.getValue()&&(E=!0,gr.setValue(G),Xt.layout(),E=!1)}};Object(n.useEffect)(function(){try{var or,Xt=tt.current.instance;Qe.current&&clearTimeout(Qe.current),Qe.current=setTimeout(function(){$e()},500),Xt==null||((or=Xt.updateOptions)===null||or===void 0)||or.call(Xt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(G.split(/\r\n|\r|\n/g).length))+3,5)})}catch(gr){debugger}},[G,Se,tt.current]),Object(n.useEffect)(function(){try{if(Je&&tt.current&&tt.current.instance){var or=tt.current.instance;or.changeViewZones(function(gr){var Xr=document.createElement("div");Xr.style.padding="10px 20px",Xr.style.width="calc(100% - 20px)",Xr.className="my-error-line-wrp",Xr.innerHTML=nt,gr.addZone({afterLineNumber:Je||11,heightInLines:3,domNode:Xr})});var Xt={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}};or.addOverlayWidget(Xt),or.revealPositionInCenter({lineNumber:20,column:1})}}catch(gr){debugger}},[Je,tt.current,Se]),Object(n.useEffect)(function(){var or;if((or=tt.current)!==null&&or!==void 0&&or.instance&&Se&&ht){var Xt=tt.current.instance,gr=Xt.getModel();if(!gr)return;var Xr=function(){var $t=[],en=[],Cn=gr.getAllDecorations(),_n=Object(v.a)(Cn),On;try{for(_n.s();!(On=_n.n()).done;){var ae=On.value;if(ae.options.className==="highlighted-line"){var z;$t.push(ae==null||((z=ae.range)===null||z===void 0)?void 0:z.startLineNumber),en.push(ae==null?void 0:ae.id)}}}catch(ie){_n.e(ie)}finally{_n.f()}gr.deltaDecorations(en,[]);var $=gr.getLineCount();!!at&&at<=$&&(Xt.deltaDecorations([],[{range:new O.Range(at,1,at,gr.getLineMaxColumn(at)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Xt.revealLineInCenter(at))};Xr();var kn=function(){var $t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,en=[],Cn=[],_n=gr.getAllDecorations(),On=Object(v.a)(_n),ae;try{for(On.s();!(ae=On.n()).done;){var z=ae.value;if(z.options.linesDecorationsClassName==="breakpoints"){var $;en.push(z==null||(($=z.range)===null||$===void 0)?void 0:$.startLineNumber),Cn.push(z==null?void 0:z.id)}}}catch(ie){On.e(ie)}finally{On.f()}if($t)return{lines:en,ids:Cn};V(en)},Ln=function(){var wt=Object(T.a)(l.a.mark(function $t(en){var Cn;return l.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return Cn={range:new O.Range(en,1,en,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints"}},On.next=3,gr.deltaDecorations([],[Cn]);case 3:kn();case 4:case"end":return On.stop()}},$t)}));return function(en){return wt.apply(this,arguments)}}(),tn=function(){var wt=Object(T.a)(l.a.mark(function $t(en){var Cn,_n,On,ae,z;return l.a.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:Cn=[],_n=Xt.getLineDecorations(en),On=Object(v.a)(_n);try{for(On.s();!(ae=On.n()).done;)z=ae.value,z.options.linesDecorationsClassName==="breakpoints"&&Cn.push(z.id)}catch(de){On.e(de)}finally{On.f()}return ie.next=6,gr.deltaDecorations(Cn,[]);case 6:kn();case 7:case"end":return ie.stop()}},$t)}));return function(en){return wt.apply(this,arguments)}}(),ur=function($t){var en=Xt.getLineDecorations($t),Cn=Object(v.a)(en),_n;try{for(Cn.s();!(_n=Cn.n()).done;){var On=_n.value;if(On.options.linesDecorationsClassName==="breakpoints")return!0}}catch(ae){Cn.e(ae)}finally{Cn.f()}return!1};if(!Object(r.isEqual)(be,kn(!0).lines)){gr.deltaDecorations(kn(!0).ids,[]);var Xn=be.map(function(wt){return{range:new O.Range(wt,1,wt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints"}}});gr.deltaDecorations([],Xn)}var hi=Xt.onDidChangeModelContent(function(wt){var $t=Xt.getPosition();if($t){var en=$t.lineNumber;gr.getLineContent(en).trim()===""?tn(en):ur(en)&&(tn(en),Ln(en))}}),$n=Xt.onMouseDown(function(wt){var $t,en,Cn;if(wt.target.detail&&($t=wt.target)!==null&&$t!==void 0&&(en=$t.element)!==null&&en!==void 0&&(Cn=en.className)!==null&&Cn!==void 0&&Cn.includes("line-numbers")){var _n=wt.target.position.lineNumber;if(gr.getLineContent(_n).trim()==="")return;ur(_n)?tn(_n):Ln(_n)}}),Zr=function($t){var en={range:new O.Range($t,1,$t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};lt.current=Xt.deltaDecorations(lt.current,[en])},Bn=function(){lt.current=Xt.deltaDecorations(lt.current,[])},si=Xt.onMouseMove(function(wt){var $t,en,Cn;if(Bn(),wt.target.detail&&($t=wt.target)!==null&&$t!==void 0&&(en=$t.element)!==null&&en!==void 0&&(Cn=en.className)!==null&&Cn!==void 0&&Cn.includes("line-numbers")){var _n=wt.target.position.lineNumber;if(gr.getLineContent(_n).trim()==="")return;Zr(_n)}}),li=Xt.onMouseLeave(function(){Bn()});return function(){hi.dispose(),$n.dispose(),si.dispose(),li.dispose()}}},[tt.current,Se,be,at,ht]);function bt(){var or=tt.current.instance;if(or){var Xt=or.getSelection(),gr=tt.current.pastePos||{},Xr=new O.Range(gr.startLineNumber||Xt.endLineNumber,gr.startColumn||Xt.endColumn,gr.endLineNumber||Xt.endLineNumber,gr.endColumn||Xt.endColumn);setTimeout(function(){or.executeEdits("",[{range:Xr,text:""}])},300)}}function gt(or){(window.navigator.platform.match("Mac")?or.metaKey:or.ctrlKey)&&or.keyCode==83&&(or.preventDefault(),ye())}var Ut=function(){if(xe&&tt.current.instance){var Xt=tt.current.instance.getContentHeight();mn(Xt<N?N:Xt)}else mn(N)};function Nt(or){var Xt=document.createEvent("MouseEvents");Xt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),or.dispatchEvent(Xt)}var hr=function(Xt){var gr=Xt.keyCode,Xr=Xt.ctrlKey,kn=Xt.metaKey,Ln=Xt.target,tn=Xt.type;return(tn==="paste"||(gr===67||gr===86)&&(kn||Xr))&&Ln.nodeName==="TEXTAREA"&&(et(),Xt.preventDefault()),!1};function mr(or,Xt){var gr=window.URL||window.webkitURL||window,Xr=new Blob([Xt]),kn=document.createElementNS("http://www.w3.org/1999/xhtml","a");kn.href=gr.createObjectURL(Xr),kn.download=or,Nt(kn)}Object(n.useEffect)(function(){Ut()},[Ut]),Object(n.useEffect)(function(){Re.current&&!Se&&D.e(27).then(D.t.bind(null,"M/lh",7)).then(function(or){try{O=or,tt.current.instance=O.editor.create(Re.current,{value:G,language:k(B),theme:Ae,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},fe);var Xt=tt.current.instance,gr=s.c._menuItems,Xr=Object(g.a)(gr).find(function(Ln){return Ln[0]._debugName=="EditorContext"});if(te(Xt,O),setTimeout(function(){Ut(),tt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){mr(Te||"educoder.txt",Xt.getValue())}}),Xt.getDomNode().addEventListener("input",function(){ft.current.autoFormat&&Xt.getAction("editor.action.formatDocument").run()})},500),tt.current.subscription=Xt.onDidChangeModelContent(function(Ln){debugger;Ue.current?clearTimeout(Le.current):(Ut(),pe(Xt.getValue(),Ln)),Le.current=setTimeout(function(){Ue.current=!1},500)}),window.Monaco||h(O,k(B)),le&&(Re.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",hr),window.removeEventListener("paste",hr),window.addEventListener("keydown",hr),window.addEventListener("paste",hr)),window.Monaco=O,De&&Xt.onDidBlurEditorWidget(function(){De(Xt.getValue())}),q&&Xt.onDidFocusEditorText(function(){q(Xt.getValue())}),le)try{window.addEventListener("paste",bt)}catch(Ln){}var kn=Ne();return ke(!0),function(){var Ln=tt.current.instance;Ln.dispose();var tn=Ln.getModel();tn&&tn.dispose(),tt.current.subscription&&tt.current.subscription.dispose(),le&&window.removeEventListener("paste",bt),kn.unobserve(Re.current)}}catch(Ln){debugger}})},[]),Object(n.useEffect)(function(){var or=tt.current.instance;if(or&&Se)return document.addEventListener("keydown",gt,!1),function(){document.removeEventListener("keydown",gt)}},[ye,Se]),Object(n.useEffect)(function(){var or=tt.current.instance;if(or&&Se){var Xt=k(B);O.editor.setModelLanguage(or.getModel(),Xt)}},[B,Se]),Object(n.useEffect)(function(){var or=tt.current.instance;or&&Se&&O.editor.setTheme(Ae)},[Ae,Se]),Object(n.useEffect)(function(){var or=tt.current.instance;ft.current=X,or&&Se&&(or.updateOptions(Object(L.a)({},X)),setTimeout(function(){or.getModel().updateOptions(Object(L.a)({},X))},200))},[JSON.stringify(X),Se]),Object(n.useEffect)(function(){var or=tt.current.instance;or&&Se&&or.layout()},[M,N,Se]);var St=Object(n.useState)(t(M)),Yr=Object(S.a)(St,2),Jr=Yr[0],Hr=Yr[1],un=Object(n.useState)(t(N)),Ar=Object(S.a)(un,2),vn=Ar[0],mn=Ar[1],Kt=Object(L.a)(Object(L.a)({},U),{},{width:Jr,height:vn});return c.a.createElement("div",{className:"my-monaco-editor",ref:Re,style:Kt})};function x(y){var _=y.width,M=_===void 0?"100%":_,I=y.height,N=I===void 0?"100%":I,G=y.original,H=y.modified,B=y.language,K=y.options,U=K===void 0?{}:K,W=Object(n.useRef)(),X=Object(n.useState)(null),ne=Object(S.a)(X,2),fe=ne[0],me=ne[1];function Ae(xe){var ue;return W.current&&(ue=new u.default(function(le){var re=Object(v.a)(le),pe;try{for(re.s();!(pe=re.n()).done;){var ee=pe.value;(ee.target.offsetHeight>0||ee.target.offsetWidth>0)&&xe.layout()}}catch(te){re.e(te)}finally{re.f()}}),ue.observe(W.current)),ue}Object(n.useEffect)(function(){return W.current&&D.e(27).then(D.t.bind(null,"M/lh",7)).then(function(xe){O=xe;var ue=O.editor.createDiffEditor(W.current,Object(L.a)(Object(L.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},U),{},{wordWrap:!0}));me(ue);var le=Ae(ue);return function(){ue.dispose();var re=ue.getModel();re&&re.dispose(),le.unobserve(W.current)}}),function(){window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}},[]),Object(n.useEffect)(function(){fe&&fe.setModel({original:O.editor.createModel(G,B),modified:O.editor.createModel(H,B)})},[G,H,B,fe]);var De=t(M),ye=t(N),Oe={width:De,height:ye};return c.a.createElement("div",{className:"my-diff-editor",ref:W,style:Oe})}},ZpRC:function(j,Y,D){"use strict";function L(n){return typeof n=="object"&&n!=null&&n.nodeType===1}function g(n,c){return(!c||n!=="hidden")&&n!=="visible"&&n!=="clip"}function T(n,c){if(n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth){var u=getComputedStyle(n,null);return g(u.overflowY,c)||g(u.overflowX,c)||function(o){var h=function(m){if(!m.ownerDocument||!m.ownerDocument.defaultView)return null;try{return m.ownerDocument.defaultView.frameElement}catch(s){return null}}(o);return!!h&&(h.clientHeight<o.scrollHeight||h.clientWidth<o.scrollWidth)}(n)}return!1}function P(n,c,u,o,h,m,s,r){return m<n&&s>c||m>n&&s<c?0:m<=n&&r<=u||s>=c&&r>=u?m-n-o:s>c&&r<u||m<n&&r>u?s-c+h:0}var p=function(n,c){var u=window,o=c.scrollMode,h=c.block,m=c.inline,s=c.boundary,r=c.skipOverflowHiddenElements,a=typeof s=="function"?s:function(V){return V!==s};if(!L(n))throw new TypeError("Invalid target");for(var t=document.scrollingElement||document.documentElement,w=[],E=n;L(E)&&a(E);){if((E=E.parentElement)===t){w.push(E);break}E!=null&&E===document.body&&T(E)&&!T(document.documentElement)||E!=null&&T(E,r)&&w.push(E)}for(var f=u.visualViewport?u.visualViewport.width:innerWidth,k=u.visualViewport?u.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,C=window.scrollY||pageYOffset,x=n.getBoundingClientRect(),y=x.height,_=x.width,M=x.top,I=x.right,N=x.bottom,G=x.left,H=h==="start"||h==="nearest"?M:h==="end"?N:M+y/2,B=m==="center"?G+_/2:m==="end"?I:G,K=[],U=0;U<w.length;U++){var W=w[U],X=W.getBoundingClientRect(),ne=X.height,fe=X.width,me=X.top,Ae=X.right,De=X.bottom,ye=X.left;if(o==="if-needed"&&M>=0&&G>=0&&N<=k&&I<=f&&M>=me&&N<=De&&G>=ye&&I<=Ae)return K;var Oe=getComputedStyle(W),xe=parseInt(Oe.borderLeftWidth,10),ue=parseInt(Oe.borderTopWidth,10),le=parseInt(Oe.borderRightWidth,10),re=parseInt(Oe.borderBottomWidth,10),pe=0,ee=0,te="offsetWidth"in W?W.offsetWidth-W.clientWidth-xe-le:0,ce="offsetHeight"in W?W.offsetHeight-W.clientHeight-ue-re:0;if(t===W)pe=h==="start"?H:h==="end"?H-k:h==="nearest"?P(C,C+k,k,ue,re,C+H,C+H+y,y):H-k/2,ee=m==="start"?B:m==="center"?B-f/2:m==="end"?B-f:P(O,O+f,f,xe,le,O+B,O+B+_,_),pe=Math.max(0,pe+C),ee=Math.max(0,ee+O);else{pe=h==="start"?H-me-ue:h==="end"?H-De+re+ce:h==="nearest"?P(me,De,ne,ue,re+ce,H,H+y,y):H-(me+ne/2)+ce/2,ee=m==="start"?B-ye-xe:m==="center"?B-(ye+fe/2)+te/2:m==="end"?B-Ae+le+te:P(ye,Ae,fe,xe,le+te,B,B+_,_);var q=W.scrollLeft,Q=W.scrollTop;H+=Q-(pe=Math.max(0,Math.min(Q+pe,W.scrollHeight-ne+ce))),B+=q-(ee=Math.max(0,Math.min(q+ee,W.scrollWidth-fe+te)))}K.push({el:W,top:pe,left:ee})}return K};function v(n){return n===Object(n)&&Object.keys(n).length!==0}function S(n,c){c===void 0&&(c="auto");var u="scrollBehavior"in document.body.style;n.forEach(function(o){var h=o.el,m=o.top,s=o.left;h.scroll&&u?h.scroll({top:m,left:s,behavior:c}):(h.scrollTop=m,h.scrollLeft=s)})}function b(n){return n===!1?{block:"end",inline:"nearest"}:v(n)?n:{block:"start",inline:"nearest"}}function d(n,c){var u=!n.ownerDocument.documentElement.contains(n);if(v(c)&&typeof c.behavior=="function")return c.behavior(u?[]:p(n,c));if(u)return;var o=b(c);return S(p(n,o),o.behavior)}var l=Y.a=d},Zss7:function(j,Y,D){var L;(function(g){var T=/^\s+/,P=/\s+$/,p=0,v=g.round,S=g.min,b=g.max,d=g.random;function l(re,pe){if(re=re||"",pe=pe||{},re instanceof l)return re;if(!(this instanceof l))return new l(re,pe);var ee=n(re);this._originalInput=re,this._r=ee.r,this._g=ee.g,this._b=ee.b,this._a=ee.a,this._roundA=v(100*this._a)/100,this._format=pe.format||ee.format,this._gradientType=pe.gradientType,this._r<1&&(this._r=v(this._r)),this._g<1&&(this._g=v(this._g)),this._b<1&&(this._b=v(this._b)),this._ok=ee.ok,this._tc_id=p++}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var re=this.toRgb();return(re.r*299+re.g*587+re.b*114)/1e3},getLuminance:function(){var re=this.toRgb(),pe,ee,te,ce,q,Q;return pe=re.r/255,ee=re.g/255,te=re.b/255,pe<=.03928?ce=pe/12.92:ce=g.pow((pe+.055)/1.055,2.4),ee<=.03928?q=ee/12.92:q=g.pow((ee+.055)/1.055,2.4),te<=.03928?Q=te/12.92:Q=g.pow((te+.055)/1.055,2.4),.2126*ce+.7152*q+.0722*Q},setAlpha:function(re){return this._a=K(re),this._roundA=v(100*this._a)/100,this},toHsv:function(){var re=h(this._r,this._g,this._b);return{h:re.h*360,s:re.s,v:re.v,a:this._a}},toHsvString:function(){var re=h(this._r,this._g,this._b),pe=v(re.h*360),ee=v(re.s*100),te=v(re.v*100);return this._a==1?"hsv("+pe+", "+ee+"%, "+te+"%)":"hsva("+pe+", "+ee+"%, "+te+"%, "+this._roundA+")"},toHsl:function(){var re=u(this._r,this._g,this._b);return{h:re.h*360,s:re.s,l:re.l,a:this._a}},toHslString:function(){var re=u(this._r,this._g,this._b),pe=v(re.h*360),ee=v(re.s*100),te=v(re.l*100);return this._a==1?"hsl("+pe+", "+ee+"%, "+te+"%)":"hsla("+pe+", "+ee+"%, "+te+"%, "+this._roundA+")"},toHex:function(re){return s(this._r,this._g,this._b,re)},toHexString:function(re){return"#"+this.toHex(re)},toHex8:function(re){return r(this._r,this._g,this._b,this._a,re)},toHex8String:function(re){return"#"+this.toHex8(re)},toRgb:function(){return{r:v(this._r),g:v(this._g),b:v(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+v(this._r)+", "+v(this._g)+", "+v(this._b)+")":"rgba("+v(this._r)+", "+v(this._g)+", "+v(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:v(U(this._r,255)*100)+"%",g:v(U(this._g,255)*100)+"%",b:v(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+v(U(this._r,255)*100)+"%, "+v(U(this._g,255)*100)+"%, "+v(U(this._b,255)*100)+"%)":"rgba("+v(U(this._r,255)*100)+"%, "+v(U(this._g,255)*100)+"%, "+v(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:H[s(this._r,this._g,this._b,!0)]||!1},toFilter:function(re){var pe="#"+a(this._r,this._g,this._b,this._a),ee=pe,te=this._gradientType?"GradientType = 1, ":"";if(re){var ce=l(re);ee="#"+a(ce._r,ce._g,ce._b,ce._a)}return"progid:DXImageTransform.Microsoft.gradient("+te+"startColorstr="+pe+",endColorstr="+ee+")"},toString:function(re){var pe=!!re;re=re||this._format;var ee=!1,te=this._a<1&&this._a>=0,ce=!pe&&te&&(re==="hex"||re==="hex6"||re==="hex3"||re==="hex4"||re==="hex8"||re==="name");return ce?re==="name"&&this._a===0?this.toName():this.toRgbString():(re==="rgb"&&(ee=this.toRgbString()),re==="prgb"&&(ee=this.toPercentageRgbString()),(re==="hex"||re==="hex6")&&(ee=this.toHexString()),re==="hex3"&&(ee=this.toHexString(!0)),re==="hex4"&&(ee=this.toHex8String(!0)),re==="hex8"&&(ee=this.toHex8String()),re==="name"&&(ee=this.toName()),re==="hsl"&&(ee=this.toHslString()),re==="hsv"&&(ee=this.toHsvString()),ee||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(re,pe){var ee=re.apply(null,[this].concat([].slice.call(pe)));return this._r=ee._r,this._g=ee._g,this._b=ee._b,this.setAlpha(ee._a),this},lighten:function(){return this._applyModification(f,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(t,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(E,arguments)},spin:function(){return this._applyModification(C,arguments)},_applyCombination:function(re,pe){return re.apply(null,[this].concat([].slice.call(pe)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(N,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(y,arguments)},tetrad:function(){return this._applyCombination(_,arguments)}},l.fromRatio=function(re,pe){if(typeof re=="object"){var ee={};for(var te in re)re.hasOwnProperty(te)&&(te==="a"?ee[te]=re[te]:ee[te]=Ae(re[te]));re=ee}return l(re,pe)};function n(re){var pe={r:0,g:0,b:0},ee=1,te=null,ce=null,q=null,Q=!1,V=!1;return typeof re=="string"&&(re=ue(re)),typeof re=="object"&&(xe(re.r)&&xe(re.g)&&xe(re.b)?(pe=c(re.r,re.g,re.b),Q=!0,V=String(re.r).substr(-1)==="%"?"prgb":"rgb"):xe(re.h)&&xe(re.s)&&xe(re.v)?(te=Ae(re.s),ce=Ae(re.v),pe=m(re.h,te,ce),Q=!0,V="hsv"):xe(re.h)&&xe(re.s)&&xe(re.l)&&(te=Ae(re.s),q=Ae(re.l),pe=o(re.h,te,q),Q=!0,V="hsl"),re.hasOwnProperty("a")&&(ee=re.a)),ee=K(ee),{ok:Q,format:re.format||V,r:S(255,b(pe.r,0)),g:S(255,b(pe.g,0)),b:S(255,b(pe.b,0)),a:ee}}function c(re,pe,ee){return{r:U(re,255)*255,g:U(pe,255)*255,b:U(ee,255)*255}}function u(re,pe,ee){re=U(re,255),pe=U(pe,255),ee=U(ee,255);var te=b(re,pe,ee),ce=S(re,pe,ee),q,Q,V=(te+ce)/2;if(te==ce)q=Q=0;else{var Z=te-ce;Q=V>.5?Z/(2-te-ce):Z/(te+ce);switch(te){case re:q=(pe-ee)/Z+(pe<ee?6:0);break;case pe:q=(ee-re)/Z+2;break;case ee:q=(re-pe)/Z+4;break}q/=6}return{h:q,s:Q,l:V}}function o(re,pe,ee){var te,ce,q;re=U(re,360),pe=U(pe,100),ee=U(ee,100);function Q(be,ge,Te){return Te<0&&(Te+=1),Te>1&&(Te-=1),Te<1/6?be+(ge-be)*6*Te:Te<1/2?ge:Te<2/3?be+(ge-be)*(2/3-Te)*6:be}if(pe===0)te=ce=q=ee;else{var V=ee<.5?ee*(1+pe):ee+pe-ee*pe,Z=2*ee-V;te=Q(Z,V,re+1/3),ce=Q(Z,V,re),q=Q(Z,V,re-1/3)}return{r:te*255,g:ce*255,b:q*255}}function h(re,pe,ee){re=U(re,255),pe=U(pe,255),ee=U(ee,255);var te=b(re,pe,ee),ce=S(re,pe,ee),q,Q,V=te,Z=te-ce;if(Q=te===0?0:Z/te,te==ce)q=0;else{switch(te){case re:q=(pe-ee)/Z+(pe<ee?6:0);break;case pe:q=(ee-re)/Z+2;break;case ee:q=(re-pe)/Z+4;break}q/=6}return{h:q,s:Q,v:V}}function m(re,pe,ee){re=U(re,360)*6,pe=U(pe,100),ee=U(ee,100);var te=g.floor(re),ce=re-te,q=ee*(1-pe),Q=ee*(1-ce*pe),V=ee*(1-(1-ce)*pe),Z=te%6,be=[ee,Q,q,q,V,ee][Z],ge=[V,ee,ee,Q,q,q][Z],Te=[q,q,V,ee,ee,Q][Z];return{r:be*255,g:ge*255,b:Te*255}}function s(re,pe,ee,te){var ce=[me(v(re).toString(16)),me(v(pe).toString(16)),me(v(ee).toString(16))];return te&&ce[0].charAt(0)==ce[0].charAt(1)&&ce[1].charAt(0)==ce[1].charAt(1)&&ce[2].charAt(0)==ce[2].charAt(1)?ce[0].charAt(0)+ce[1].charAt(0)+ce[2].charAt(0):ce.join("")}function r(re,pe,ee,te,ce){var q=[me(v(re).toString(16)),me(v(pe).toString(16)),me(v(ee).toString(16)),me(De(te))];return ce&&q[0].charAt(0)==q[0].charAt(1)&&q[1].charAt(0)==q[1].charAt(1)&&q[2].charAt(0)==q[2].charAt(1)&&q[3].charAt(0)==q[3].charAt(1)?q[0].charAt(0)+q[1].charAt(0)+q[2].charAt(0)+q[3].charAt(0):q.join("")}function a(re,pe,ee,te){var ce=[me(De(te)),me(v(re).toString(16)),me(v(pe).toString(16)),me(v(ee).toString(16))];return ce.join("")}l.equals=function(re,pe){return!re||!pe?!1:l(re).toRgbString()==l(pe).toRgbString()},l.random=function(){return l.fromRatio({r:d(),g:d(),b:d()})};function t(re,pe){pe=pe===0?0:pe||10;var ee=l(re).toHsl();return ee.s-=pe/100,ee.s=W(ee.s),l(ee)}function w(re,pe){pe=pe===0?0:pe||10;var ee=l(re).toHsl();return ee.s+=pe/100,ee.s=W(ee.s),l(ee)}function E(re){return l(re).desaturate(100)}function f(re,pe){pe=pe===0?0:pe||10;var ee=l(re).toHsl();return ee.l+=pe/100,ee.l=W(ee.l),l(ee)}function k(re,pe){pe=pe===0?0:pe||10;var ee=l(re).toRgb();return ee.r=b(0,S(255,ee.r-v(255*-(pe/100)))),ee.g=b(0,S(255,ee.g-v(255*-(pe/100)))),ee.b=b(0,S(255,ee.b-v(255*-(pe/100)))),l(ee)}function O(re,pe){pe=pe===0?0:pe||10;var ee=l(re).toHsl();return ee.l-=pe/100,ee.l=W(ee.l),l(ee)}function C(re,pe){var ee=l(re).toHsl(),te=(ee.h+pe)%360;return ee.h=te<0?360+te:te,l(ee)}function x(re){var pe=l(re).toHsl();return pe.h=(pe.h+180)%360,l(pe)}function y(re){var pe=l(re).toHsl(),ee=pe.h;return[l(re),l({h:(ee+120)%360,s:pe.s,l:pe.l}),l({h:(ee+240)%360,s:pe.s,l:pe.l})]}function _(re){var pe=l(re).toHsl(),ee=pe.h;return[l(re),l({h:(ee+90)%360,s:pe.s,l:pe.l}),l({h:(ee+180)%360,s:pe.s,l:pe.l}),l({h:(ee+270)%360,s:pe.s,l:pe.l})]}function M(re){var pe=l(re).toHsl(),ee=pe.h;return[l(re),l({h:(ee+72)%360,s:pe.s,l:pe.l}),l({h:(ee+216)%360,s:pe.s,l:pe.l})]}function I(re,pe,ee){pe=pe||6,ee=ee||30;var te=l(re).toHsl(),ce=360/ee,q=[l(re)];for(te.h=(te.h-(ce*pe>>1)+720)%360;--pe;)te.h=(te.h+ce)%360,q.push(l(te));return q}function N(re,pe){pe=pe||6;for(var ee=l(re).toHsv(),te=ee.h,ce=ee.s,q=ee.v,Q=[],V=1/pe;pe--;)Q.push(l({h:te,s:ce,v:q})),q=(q+V)%1;return Q}l.mix=function(re,pe,ee){ee=ee===0?0:ee||50;var te=l(re).toRgb(),ce=l(pe).toRgb(),q=ee/100,Q={r:(ce.r-te.r)*q+te.r,g:(ce.g-te.g)*q+te.g,b:(ce.b-te.b)*q+te.b,a:(ce.a-te.a)*q+te.a};return l(Q)},l.readability=function(re,pe){var ee=l(re),te=l(pe);return(g.max(ee.getLuminance(),te.getLuminance())+.05)/(g.min(ee.getLuminance(),te.getLuminance())+.05)},l.isReadable=function(re,pe,ee){var te=l.readability(re,pe),ce,q;q=!1,ce=le(ee);switch(ce.level+ce.size){case"AAsmall":case"AAAlarge":q=te>=4.5;break;case"AAlarge":q=te>=3;break;case"AAAsmall":q=te>=7;break}return q},l.mostReadable=function(re,pe,ee){var te=null,ce=0,q,Q,V,Z;ee=ee||{},Q=ee.includeFallbackColors,V=ee.level,Z=ee.size;for(var be=0;be<pe.length;be++)q=l.readability(re,pe[be]),q>ce&&(ce=q,te=l(pe[be]));return l.isReadable(re,te,{level:V,size:Z})||!Q?te:(ee.includeFallbackColors=!1,l.mostReadable(re,["#fff","#000"],ee))};var G=l.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},H=l.hexNames=B(G);function B(re){var pe={};for(var ee in re)re.hasOwnProperty(ee)&&(pe[re[ee]]=ee);return pe}function K(re){return re=parseFloat(re),(isNaN(re)||re<0||re>1)&&(re=1),re}function U(re,pe){ne(re)&&(re="100%");var ee=fe(re);return re=S(pe,b(0,parseFloat(re))),ee&&(re=parseInt(re*pe,10)/100),g.abs(re-pe)<1e-6?1:re%pe/parseFloat(pe)}function W(re){return S(1,b(0,re))}function X(re){return parseInt(re,16)}function ne(re){return typeof re=="string"&&re.indexOf(".")!=-1&&parseFloat(re)===1}function fe(re){return typeof re=="string"&&re.indexOf("%")!=-1}function me(re){return re.length==1?"0"+re:""+re}function Ae(re){return re<=1&&(re=re*100+"%"),re}function De(re){return g.round(parseFloat(re)*255).toString(16)}function ye(re){return X(re)/255}var Oe=function(){var re="[-\\+]?\\d+%?",pe="[-\\+]?\\d*\\.\\d+%?",ee="(?:"+pe+")|(?:"+re+")",te="[\\s|\\(]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")\\s*\\)?",ce="[\\s|\\(]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")\\s*\\)?";return{CSS_UNIT:new RegExp(ee),rgb:new RegExp("rgb"+te),rgba:new RegExp("rgba"+ce),hsl:new RegExp("hsl"+te),hsla:new RegExp("hsla"+ce),hsv:new RegExp("hsv"+te),hsva:new RegExp("hsva"+ce),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function xe(re){return!!Oe.CSS_UNIT.exec(re)}function ue(re){re=re.replace(T,"").replace(P,"").toLowerCase();var pe=!1;if(G[re])re=G[re],pe=!0;else if(re=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ee;return(ee=Oe.rgb.exec(re))?{r:ee[1],g:ee[2],b:ee[3]}:(ee=Oe.rgba.exec(re))?{r:ee[1],g:ee[2],b:ee[3],a:ee[4]}:(ee=Oe.hsl.exec(re))?{h:ee[1],s:ee[2],l:ee[3]}:(ee=Oe.hsla.exec(re))?{h:ee[1],s:ee[2],l:ee[3],a:ee[4]}:(ee=Oe.hsv.exec(re))?{h:ee[1],s:ee[2],v:ee[3]}:(ee=Oe.hsva.exec(re))?{h:ee[1],s:ee[2],v:ee[3],a:ee[4]}:(ee=Oe.hex8.exec(re))?{r:X(ee[1]),g:X(ee[2]),b:X(ee[3]),a:ye(ee[4]),format:pe?"name":"hex8"}:(ee=Oe.hex6.exec(re))?{r:X(ee[1]),g:X(ee[2]),b:X(ee[3]),format:pe?"name":"hex"}:(ee=Oe.hex4.exec(re))?{r:X(ee[1]+""+ee[1]),g:X(ee[2]+""+ee[2]),b:X(ee[3]+""+ee[3]),a:ye(ee[4]+""+ee[4]),format:pe?"name":"hex8"}:(ee=Oe.hex3.exec(re))?{r:X(ee[1]+""+ee[1]),g:X(ee[2]+""+ee[2]),b:X(ee[3]+""+ee[3]),format:pe?"name":"hex"}:!1}function le(re){var pe,ee;return re=re||{level:"AA",size:"small"},pe=(re.level||"AA").toUpperCase(),ee=(re.size||"small").toLowerCase(),pe!=="AA"&&pe!=="AAA"&&(pe="AA"),ee!=="small"&&ee!=="large"&&(ee="small"),{level:pe,size:ee}}j.exports?j.exports=l:!(L=function(){return l}.call(Y,D,Y,j),L!==void 0&&(j.exports=L))})(Math)},bQjk:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){return function(g){var T=L,P=T.lib,p=P.CipherParams,v=T.enc,S=v.Hex,b=T.format,d=b.Hex={stringify:function(l){return l.ciphertext.toString(S)},parse:function(l){var n=S.parse(l);return p.create({ciphertext:n})}}}(),L.format.Hex})},bT9E:function(j,Y,D){"use strict";D.d(Y,"a",function(){return g});var L=D("VTBJ");function g(T,P){var p=Object(L.a)({},T);return Array.isArray(P)&&P.forEach(function(v){delete p[v]}),p}},biw7:function(j,Y,D){"use strict";var L=D("q1tI"),g=D.n(L),T=L.createContext(null);Y.a=T},c5Ni:function(j,Y,D){},cv67:function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){return function(g){var T=L,P=T.lib,p=P.WordArray,v=P.Hasher,S=T.algo,b=[];(function(){for(var o=0;o<64;o++)b[o]=g.abs(g.sin(o+1))*4294967296|0})();var d=S.MD5=v.extend({_doReset:function(){this._hash=new p.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(o,h){for(var m=0;m<16;m++){var s=h+m,r=o[s];o[s]=(r<<8|r>>>24)&16711935|(r<<24|r>>>8)&4278255360}var a=this._hash.words,t=o[h+0],w=o[h+1],E=o[h+2],f=o[h+3],k=o[h+4],O=o[h+5],C=o[h+6],x=o[h+7],y=o[h+8],_=o[h+9],M=o[h+10],I=o[h+11],N=o[h+12],G=o[h+13],H=o[h+14],B=o[h+15],K=a[0],U=a[1],W=a[2],X=a[3];K=l(K,U,W,X,t,7,b[0]),X=l(X,K,U,W,w,12,b[1]),W=l(W,X,K,U,E,17,b[2]),U=l(U,W,X,K,f,22,b[3]),K=l(K,U,W,X,k,7,b[4]),X=l(X,K,U,W,O,12,b[5]),W=l(W,X,K,U,C,17,b[6]),U=l(U,W,X,K,x,22,b[7]),K=l(K,U,W,X,y,7,b[8]),X=l(X,K,U,W,_,12,b[9]),W=l(W,X,K,U,M,17,b[10]),U=l(U,W,X,K,I,22,b[11]),K=l(K,U,W,X,N,7,b[12]),X=l(X,K,U,W,G,12,b[13]),W=l(W,X,K,U,H,17,b[14]),U=l(U,W,X,K,B,22,b[15]),K=n(K,U,W,X,w,5,b[16]),X=n(X,K,U,W,C,9,b[17]),W=n(W,X,K,U,I,14,b[18]),U=n(U,W,X,K,t,20,b[19]),K=n(K,U,W,X,O,5,b[20]),X=n(X,K,U,W,M,9,b[21]),W=n(W,X,K,U,B,14,b[22]),U=n(U,W,X,K,k,20,b[23]),K=n(K,U,W,X,_,5,b[24]),X=n(X,K,U,W,H,9,b[25]),W=n(W,X,K,U,f,14,b[26]),U=n(U,W,X,K,y,20,b[27]),K=n(K,U,W,X,G,5,b[28]),X=n(X,K,U,W,E,9,b[29]),W=n(W,X,K,U,x,14,b[30]),U=n(U,W,X,K,N,20,b[31]),K=c(K,U,W,X,O,4,b[32]),X=c(X,K,U,W,y,11,b[33]),W=c(W,X,K,U,I,16,b[34]),U=c(U,W,X,K,H,23,b[35]),K=c(K,U,W,X,w,4,b[36]),X=c(X,K,U,W,k,11,b[37]),W=c(W,X,K,U,x,16,b[38]),U=c(U,W,X,K,M,23,b[39]),K=c(K,U,W,X,G,4,b[40]),X=c(X,K,U,W,t,11,b[41]),W=c(W,X,K,U,f,16,b[42]),U=c(U,W,X,K,C,23,b[43]),K=c(K,U,W,X,_,4,b[44]),X=c(X,K,U,W,N,11,b[45]),W=c(W,X,K,U,B,16,b[46]),U=c(U,W,X,K,E,23,b[47]),K=u(K,U,W,X,t,6,b[48]),X=u(X,K,U,W,x,10,b[49]),W=u(W,X,K,U,H,15,b[50]),U=u(U,W,X,K,O,21,b[51]),K=u(K,U,W,X,N,6,b[52]),X=u(X,K,U,W,f,10,b[53]),W=u(W,X,K,U,M,15,b[54]),U=u(U,W,X,K,w,21,b[55]),K=u(K,U,W,X,y,6,b[56]),X=u(X,K,U,W,B,10,b[57]),W=u(W,X,K,U,C,15,b[58]),U=u(U,W,X,K,G,21,b[59]),K=u(K,U,W,X,k,6,b[60]),X=u(X,K,U,W,I,10,b[61]),W=u(W,X,K,U,E,15,b[62]),U=u(U,W,X,K,_,21,b[63]),a[0]=a[0]+K|0,a[1]=a[1]+U|0,a[2]=a[2]+W|0,a[3]=a[3]+X|0},_doFinalize:function(){var o=this._data,h=o.words,m=this._nDataBytes*8,s=o.sigBytes*8;h[s>>>5]|=128<<24-s%32;var r=g.floor(m/4294967296),a=m;h[(s+64>>>9<<4)+15]=(r<<8|r>>>24)&16711935|(r<<24|r>>>8)&4278255360,h[(s+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,o.sigBytes=(h.length+1)*4,this._process();for(var t=this._hash,w=t.words,E=0;E<4;E++){var f=w[E];w[E]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360}return t},clone:function(){var o=v.clone.call(this);return o._hash=this._hash.clone(),o}});function l(o,h,m,s,r,a,t){var w=o+(h&m|~h&s)+r+t;return(w<<a|w>>>32-a)+h}function n(o,h,m,s,r,a,t){var w=o+(h&s|m&~s)+r+t;return(w<<a|w>>>32-a)+h}function c(o,h,m,s,r,a,t){var w=o+(h^m^s)+r+t;return(w<<a|w>>>32-a)+h}function u(o,h,m,s,r,a,t){var w=o+(m^(h|~s))+r+t;return(w<<a|w>>>32-a)+h}T.MD5=v._createHelper(d),T.HmacMD5=v._createHmacHelper(d)}(Math),L.MD5})},dejd:function(j,Y,D){},dmUQ:function(j,Y,D){"use strict";var L=D("Ff2n"),g=D("rePB"),T=D("1OyB"),P=D("vuIU"),p=D("Ji7U"),v=D("md7G"),S=D("foSv"),b=D("q1tI"),d=D.n(b),l=D("TSYQ"),n=D.n(l),c=D("4IlW");function u(y,_){var M=Object.keys(y);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(y);_&&(I=I.filter(function(N){return Object.getOwnPropertyDescriptor(y,N).enumerable})),M.push.apply(M,I)}return M}function o(y){for(var _=1;_<arguments.length;_++){var M=arguments[_]!=null?arguments[_]:{};_%2?u(Object(M),!0).forEach(function(I){Object(g.a)(y,I,M[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(M)):u(Object(M)).forEach(function(I){Object.defineProperty(y,I,Object.getOwnPropertyDescriptor(M,I))})}return y}function h(y){var _=m();return function(){var I=Object(S.a)(y),N;if(_){var G=Object(S.a)(this).constructor;N=Reflect.construct(I,arguments,G)}else N=I.apply(this,arguments);return Object(v.a)(this,N)}}function m(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(y){return!1}}function s(){}function r(y){y.preventDefault()}var a=function(_){return _.replace(/[^\w.-]+/g,"")},t=200,w=600,E=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,f=function(_){return _!=null},k=function(_,M){return M===_||typeof M=="number"&&typeof _=="number"&&isNaN(M)&&isNaN(_)},O=function(y){Object(p.a)(M,y);var _=h(M);function M(I){var N;Object(T.a)(this,M),N=_.call(this,I),N.onKeyDown=function(B){var K=N.props,U=K.onKeyDown,W=K.onPressEnter;if(B.keyCode===c.a.UP){var X=N.getRatio(B);N.up(B,X,null),N.stop()}else if(B.keyCode===c.a.DOWN){var ne=N.getRatio(B);N.down(B,ne,null),N.stop()}else B.keyCode===c.a.ENTER&&W&&W(B);if(N.recordCursorPosition(),N.lastKeyCode=B.keyCode,U){for(var fe=arguments.length,me=new Array(fe>1?fe-1:0),Ae=1;Ae<fe;Ae++)me[Ae-1]=arguments[Ae];U.apply(void 0,[B].concat(me))}},N.onKeyUp=function(B){var K=N.props.onKeyUp;if(N.stop(),N.recordCursorPosition(),K){for(var U=arguments.length,W=new Array(U>1?U-1:0),X=1;X<U;X++)W[X-1]=arguments[X];K.apply(void 0,[B].concat(W))}},N.onChange=function(B){var K=N.props.onChange;N.state.focused&&(N.inputting=!0),N.rawInput=N.props.parser(N.getValueFromEvent(B)),N.setState({inputValue:N.rawInput}),K(N.toNumber(N.rawInput))},N.onMouseUp=function(){var B=N.props.onMouseUp;N.recordCursorPosition(),B&&B.apply(void 0,arguments)},N.onFocus=function(){var B;N.setState({focused:!0}),(B=N.props).onFocus.apply(B,arguments)},N.onBlur=function(){var B=N.props.onBlur;N.inputting=!1,N.setState({focused:!1});var K=N.getCurrentValidValue(N.state.inputValue),U=N.setValue(K,s);if(B){var W=N.input.value,X=N.getInputDisplayValue({focus:!1,value:U});N.input.value=X&&Number(X),B.apply(void 0,arguments),N.input.value=W}},N.getRatio=function(B){var K=1;return B.metaKey||B.ctrlKey?K=.1:B.shiftKey&&(K=10),K},N.getFullNum=function(B){return isNaN(B)?B:/e/i.test(String(B))?Number(B).toFixed(18).replace(/\.?0+$/,""):B},N.getPrecision=function(B){if(f(N.props.precision))return N.props.precision;var K=String(B);if(K.indexOf("e-")>=0)return parseInt(K.slice(K.indexOf("e-")+2),10);var U=0;return K.indexOf(".")>=0&&(U=K.length-K.indexOf(".")-1),U},N.getInputDisplayValue=function(B){var K=B||N.state,U=K.focused,W=K.inputValue,X=K.value,ne;U?ne=W:ne=N.toPrecisionAsStep(X),ne==null&&(ne="");var fe=N.formatWrapper(ne);return f(N.props.decimalSeparator)&&(fe=fe.toString().replace(".",N.props.decimalSeparator)),fe},N.recordCursorPosition=function(){try{N.cursorStart=N.input.selectionStart,N.cursorEnd=N.input.selectionEnd,N.currentValue=N.input.value,N.cursorBefore=N.input.value.substring(0,N.cursorStart),N.cursorAfter=N.input.value.substring(N.cursorEnd)}catch(B){}},N.restoreByAfter=function(B){if(B===void 0)return!1;var K=N.input.value,U=K.lastIndexOf(B);if(U===-1)return!1;var W=N.cursorBefore.length;return N.lastKeyCode===c.a.DELETE&&N.cursorBefore.charAt(W-1)===B[0]?(N.fixCaret(W,W),!0):U+B.length===K.length?(N.fixCaret(U,U),!0):!1},N.partRestoreByAfter=function(B){return B===void 0?!1:Array.prototype.some.call(B,function(K,U){var W=B.substring(U);return N.restoreByAfter(W)})},N.isNotCompleteNumber=function(B){return isNaN(B)||B===""||B===null||B&&B.toString().indexOf(".")===B.toString().length-1},N.stop=function(){N.autoStepTimer&&clearTimeout(N.autoStepTimer)},N.down=function(B,K,U){N.pressingUpOrDown=!0,N.step("down",B,K,U)},N.up=function(B,K,U){N.pressingUpOrDown=!0,N.step("up",B,K,U)},N.saveInput=function(B){N.input=B};var G=I.value;G===void 0&&(G=I.defaultValue),N.state={focused:I.autoFocus};var H=N.getValidValue(N.toNumber(G));return N.state=o(o({},N.state),{},{inputValue:N.toPrecisionAsStep(H),value:H}),N}return Object(P.a)(M,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(N){var G=this.props,H=G.value,B=G.onChange,K=G.max,U=G.min,W=this.state.focused;if(N){if(!k(N.value,H)||!k(N.max,K)||!k(N.min,U)){var X=W?H:this.getValidValue(H),ne;this.pressingUpOrDown?ne=X:this.inputting?ne=this.rawInput:ne=this.toPrecisionAsStep(X),this.setState({value:X,inputValue:ne})}var fe="value"in this.props?H:this.state.value;"max"in this.props&&N.max!==K&&typeof fe=="number"&&fe>K&&B&&B(K),"min"in this.props&&N.min!==U&&typeof fe=="number"&&fe<U&&B&&B(U)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var me=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===c.a.BACKSPACE?me=this.cursorStart-1:this.lastKeyCode===c.a.DELETE&&(me=this.cursorStart):me=this.input.value.length,this.fixCaret(me,me)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case c.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case c.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Ae){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(N){var G=N;return G===""?G="":this.isNotCompleteNumber(parseFloat(G))?G=this.state.value:G=this.getValidValue(G),this.toNumber(G)}},{key:"getValueFromEvent",value:function(N){var G=N.target.value.trim().replace(/。/g,".");return f(this.props.decimalSeparator)&&(G=G.replace(this.props.decimalSeparator,".")),G}},{key:"getValidValue",value:function(N){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,B=parseFloat(N);return isNaN(B)?N:(B<G&&(B=G),B>H&&(B=H),B)}},{key:"setValue",value:function(N,G){var H=this.props.precision,B=this.isNotCompleteNumber(parseFloat(N))?null:parseFloat(N),K=this.state.value,U=K===void 0?null:K,W=this.state.inputValue,X=W===void 0?null:W,ne=typeof B=="number"?B.toFixed(H):"".concat(B),fe=B!==U||ne!=="".concat(X);return"value"in this.props?(X=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:X},G)):this.setState({value:B,inputValue:this.toPrecisionAsStep(N)},G),fe&&this.props.onChange(B),B}},{key:"getMaxPrecision",value:function(N){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,H=this.props,B=H.precision,K=H.step;if(f(B))return B;var U=this.getPrecision(G),W=this.getPrecision(K),X=this.getPrecision(N);return N?Math.max(X,U+W):U+W}},{key:"getPrecisionFactor",value:function(N){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,H=this.getMaxPrecision(N,G);return Math.pow(10,H)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(N){return this.props.formatter?this.props.formatter(N):N}},{key:"toPrecisionAsStep",value:function(N){if(this.isNotCompleteNumber(N)||N==="")return N;var G=Math.abs(this.getMaxPrecision(N));return isNaN(G)?N.toString():Number(N).toFixed(G)}},{key:"toNumber",value:function(N){var G=this.props.precision,H=this.state.focused,B=N&&N.length>16&&H;return this.isNotCompleteNumber(N)||B?N:f(G)?Math.round(N*Math.pow(10,G))/Math.pow(10,G):Number(N)}},{key:"upStep",value:function(N,G){var H=this.props.step,B=this.getPrecisionFactor(N,G),K=Math.abs(this.getMaxPrecision(N,G)),U=((B*N+B*H*G)/B).toFixed(K);return this.toNumber(U)}},{key:"downStep",value:function(N,G){var H=this.props.step,B=this.getPrecisionFactor(N,G),K=Math.abs(this.getMaxPrecision(N,G)),U=((B*N-B*H*G)/B).toFixed(K);return this.toNumber(U)}},{key:"step",value:function(N,G){var H=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,K=arguments.length>3?arguments[3]:void 0;this.stop(),G&&(G.persist(),G.preventDefault());var U=this.props;if(U.disabled)return;var W=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(W))return;var X=this["".concat(N,"Step")](W,B),ne=X>U.max||X<U.min;if(X>U.max?X=U.max:X<U.min&&(X=U.min),this.setValue(X,null),this.setState({focused:!0},function(){H.pressingUpOrDown=!1}),ne)return;this.autoStepTimer=setTimeout(function(){H[N](G,B,!0)},K?t:w)}},{key:"fixCaret",value:function(N,G){if(N===void 0||G===void 0||!this.input||!this.input.value)return;try{var H=this.input.selectionStart,B=this.input.selectionEnd;(N!==H||G!==B)&&this.input.setSelectionRange(N,G)}catch(K){}}},{key:"render",value:function(){var N,G=this.props,H=G.prefixCls,B=G.disabled,K=G.readOnly,U=G.useTouch,W=G.autoComplete,X=G.upHandler,ne=G.downHandler,fe=G.className,me=G.max,Ae=G.min,De=G.style,ye=G.title,Oe=G.onMouseEnter,xe=G.onMouseLeave,ue=G.onMouseOver,le=G.onMouseOut,re=G.required,pe=G.onClick,ee=G.tabIndex,te=G.type,ce=G.placeholder,q=G.id,Q=G.inputMode,V=G.pattern,Z=G.step,be=G.maxLength,ge=G.autoFocus,Te=G.name,Je=G.onPaste,rt=G.onInput,nt=Object(L.a)(G,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),at=this.state,ct=at.value,ht=at.focused,He=n()(H,(N={},Object(g.a)(N,fe,!!fe),Object(g.a)(N,"".concat(H,"-disabled"),B),Object(g.a)(N,"".concat(H,"-focused"),ht),N)),Re={};Object.keys(nt).forEach(function(Ne){(Ne.substr(0,5)==="data-"||Ne.substr(0,5)==="aria-"||Ne==="role")&&(Re[Ne]=nt[Ne])});var tt=!K&&!B,ft=this.getInputDisplayValue(null),Qe=(ct||ct===0)&&(isNaN(ct)||Number(ct)>=me),lt=(ct||ct===0)&&(isNaN(ct)||Number(ct)<=Ae),Ue=Qe||B||K,Le=lt||B||K,Ie=n()("".concat(H,"-handler"),"".concat(H,"-handler-up"),Object(g.a)({},"".concat(H,"-handler-up-disabled"),Ue)),Ce=n()("".concat(H,"-handler"),"".concat(H,"-handler-down"),Object(g.a)({},"".concat(H,"-handler-down-disabled"),Le)),Se=U?{onTouchStart:Ue?s:this.up,onTouchEnd:this.stop}:{onMouseDown:Ue?s:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},ke=U?{onTouchStart:Le?s:this.down,onTouchEnd:this.stop}:{onMouseDown:Le?s:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return d.a.createElement("div",{className:He,style:De,title:ye,onMouseEnter:Oe,onMouseLeave:xe,onMouseOver:ue,onMouseOut:le,onFocus:function(){return null},onBlur:function(){return null}},d.a.createElement("div",{className:"".concat(H,"-handler-wrap")},d.a.createElement("span",Object.assign({unselectable:"on"},Se,{role:"button","aria-label":"Increase Value","aria-disabled":Ue,className:Ie}),X||d.a.createElement("span",{unselectable:"on",className:"".concat(H,"-handler-up-inner"),onClick:r})),d.a.createElement("span",Object.assign({unselectable:"on"},ke,{role:"button","aria-label":"Decrease Value","aria-disabled":Le,className:Ce}),ne||d.a.createElement("span",{unselectable:"on",className:"".concat(H,"-handler-down-inner"),onClick:r}))),d.a.createElement("div",{className:"".concat(H,"-input-wrap")},d.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ae,"aria-valuemax":me,"aria-valuenow":ct,required:re,type:te,placeholder:ce,onPaste:Je,onClick:pe,onMouseUp:this.onMouseUp,className:"".concat(H,"-input"),tabIndex:ee,autoComplete:W,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:tt?this.onKeyDown:s,onKeyUp:tt?this.onKeyUp:s,autoFocus:ge,maxLength:be,readOnly:K,disabled:B,max:me,min:Ae,step:Z,name:Te,title:ye,id:q,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ft),pattern:V,inputMode:Q,onInput:rt},Re))))}}]),M}(d.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:E,min:-E,step:1,style:{},onChange:s,onKeyDown:s,onPressEnter:s,onFocus:s,onBlur:s,parser:a,required:!1,autoComplete:"off"};var C=O,x=Y.a=C},e7zE:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("3y9D"),D("WYAk"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.Base,p=T.WordArray,v=g.algo,S=v.SHA1,b=v.HMAC,d=v.PBKDF2=P.extend({cfg:P.extend({keySize:128/32,hasher:S,iterations:1}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,n){for(var c=this.cfg,u=b.create(c.hasher,l),o=p.create(),h=p.create([1]),m=o.words,s=h.words,r=c.keySize,a=c.iterations;m.length<r;){var t=u.update(n).finalize(h);u.reset();for(var w=t.words,E=w.length,f=t,k=1;k<a;k++){f=u.finalize(f),u.reset();for(var O=f.words,C=0;C<E;C++)w[C]^=O[C]}o.concat(t),s[0]++}return o.sigBytes=r*4,o}});g.PBKDF2=function(l,n,c){return d.create(c).compute(l,n)}}(),L.PBKDF2})},fjLI:function(j,Y,D){"use strict";D.d(Y,"e",function(){return l}),D.d(Y,"a",function(){return n}),D.d(Y,"c",function(){return c}),D.d(Y,"d",function(){return o}),D.d(Y,"b",function(){return h});var L=D("8HAY"),g=D("Cg/j"),T=D("T8No"),P=D("nnTU"),p=D("MI8n"),v=function(){var m=function(s,r){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var w in t)t.hasOwnProperty(w)&&(a[w]=t[w])},m(s,r)};return function(s,r){m(s,r);function a(){this.constructor=s}s.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}(),S=function(m,s,r,a){var t=arguments.length,w=t<3?s:a===null?a=Object.getOwnPropertyDescriptor(s,r):a,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(m,s,r,a);else for(var f=m.length-1;f>=0;f--)(E=m[f])&&(w=(t<3?E(w):t>3?E(s,r,w):E(s,r))||w);return t>3&&w&&Object.defineProperty(s,r,w),w},b=function(m,s){return function(r,a){s(r,a,m)}},d=function(){for(var m=0,s=0,r=arguments.length;s<r;s++)m+=arguments[s].length;for(var a=Array(m),t=0,s=0;s<r;s++)for(var w=arguments[s],E=0,f=w.length;E<f;E++,t++)a[t]=w[E];return a};function l(m){return m.command!==void 0}var n=Object(g.c)("menuService"),c=new(function(){function m(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new p.a,this.onDidChangeMenu=this._onDidChangeMenu.event}return m.prototype.addCommand=function(s){var r=this;return this._commands.set(s.id,s),this._onDidChangeMenu.fire(0),{dispose:function(){r._commands.delete(s.id)&&r._onDidChangeMenu.fire(0)}}},m.prototype.getCommand=function(s){return this._commands.get(s)},m.prototype.getCommands=function(){var s=new Map;return this._commands.forEach(function(r,a){return s.set(a,r)}),s},m.prototype.appendMenuItem=function(s,r){var a=this,t=this._menuItems.get(s);return t?t.push(r):(t=[r],this._menuItems.set(s,t)),this._onDidChangeMenu.fire(s),{dispose:function(){var w=t.indexOf(r);w>=0&&(t.splice(w,1),a._onDidChangeMenu.fire(s))}}},m.prototype.getMenuItems=function(s){var r=(this._menuItems.get(s)||[]).slice(0);return s===0&&this._appendImplicitItems(r),r},m.prototype._appendImplicitItems=function(s){for(var r=new Set,a=s.filter(function(O){return l(O)}),t=0,w=a;t<w.length;t++){var E=w[t],f=E.command,k=E.alt;r.add(f.id),k&&r.add(k.id)}this._commands.forEach(function(O,C){r.has(C)||s.push({command:O})})},m}()),u=function(m){v(s,m);function s(r,a,t){var w=m.call(this,r,a)||this;return w._commandService=t,w}return s.prototype.run=function(){for(var r,a=[],t=0;t<arguments.length;t++)a[t]=arguments[t];return(r=this._commandService).executeCommand.apply(r,d([this.id],a))},s=S([b(2,P.b)],s),s}(L.a),o=function(m){v(s,m);function s(r){var a=this;return typeof r.title=="string"?a=m.call(this,"",r.title,"submenu")||this:a=m.call(this,"",r.title.value,"submenu")||this,a.item=r,a}return s}(L.a),h=function(m){v(s,m);function s(r,a,t,w,E){var f=this;return typeof r.title=="string"?f=m.call(this,r.id,r.title,E)||this:f=m.call(this,r.id,r.title.value,E)||this,f._cssClass=void 0,f._enabled=!r.precondition||w.contextMatchesRules(r.precondition),f._checked=Boolean(r.toggled&&w.contextMatchesRules(r.toggled)),f._options=t||{},f.item=r,f.alt=a?new s(a,void 0,f._options,w,E):void 0,f}return s.prototype.dispose=function(){this.alt&&this.alt.dispose(),m.prototype.dispose.call(this)},s.prototype.run=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var t=[];return this._options.arg&&(t=d(t,[this._options.arg])),this._options.shouldForwardArgs&&(t=d(t,r)),m.prototype.run.apply(this,t)},s=S([b(3,T.c),b(4,P.b)],s),s}(u)},fyJ8:function(j,Y,D){"use strict";var L=D("rePB"),g=D("VTBJ"),T=D("Ff2n"),P=D("U8pU"),p=D("q1tI"),v=D.n(p),S=D("TSYQ"),b=D.n(S),d=D("c+Xe"),l=D("sR1s");function n(m){return m&&Object(P.a)(m)==="object"&&!Array.isArray(m)&&!p.isValidElement(m)}function c(m){return typeof m=="string"?!0:Object(d.c)(m)}function u(m,s){var r,a=m.prefixCls,t=m.className,w=m.record,E=m.index,f=m.dataIndex,k=m.render,O=m.children,C=m.component,x=C===void 0?"td":C,y=m.colSpan,_=m.rowSpan,M=m.fixLeft,I=m.fixRight,N=m.firstFixLeft,G=m.lastFixLeft,H=m.firstFixRight,B=m.lastFixRight,K=m.appendNode,U=m.additionalProps,W=U===void 0?{}:U,X=m.ellipsis,ne=m.align,fe=m.rowType,me=m.isSticky,Ae="".concat(a,"-cell"),De,ye;if(O)ye=O;else{var Oe=Object(l.b)(w,f);if(ye=Oe,k){var xe=k(Oe,w,E);n(xe)?(ye=xe.children,De=xe.props):ye=xe}}Object(P.a)(ye)==="object"&&!Array.isArray(ye)&&!p.isValidElement(ye)&&(ye=null),X&&(G||H)&&(ye=p.createElement("span",{className:"".concat(Ae,"-content")},ye));var ue=De||{},le=ue.colSpan,re=ue.rowSpan,pe=ue.style,ee=ue.className,te=Object(T.a)(ue,["colSpan","rowSpan","style","className"]),ce=le!==void 0?le:y,q=re!==void 0?re:_;if(ce===0||q===0)return null;var Q={},V=typeof M=="number",Z=typeof I=="number";V&&(Q.position="sticky",Q.left=M),Z&&(Q.position="sticky",Q.right=I);var be={};ne&&(be.textAlign=ne);var ge,Te=X===!0?{showTitle:!0}:X;Te&&(Te.showTitle||fe==="header")&&(typeof ye=="string"||typeof ye=="number"?ge=ye.toString():p.isValidElement(ye)&&typeof ye.props.children=="string"&&(ge=ye.props.children));var Je=Object(g.a)(Object(g.a)(Object(g.a)({title:ge},te),W),{},{colSpan:ce&&ce!==1?ce:null,rowSpan:q&&q!==1?q:null,className:b()(Ae,t,(r={},Object(L.a)(r,"".concat(Ae,"-fix-left"),V),Object(L.a)(r,"".concat(Ae,"-fix-left-first"),N),Object(L.a)(r,"".concat(Ae,"-fix-left-last"),G),Object(L.a)(r,"".concat(Ae,"-fix-right"),Z),Object(L.a)(r,"".concat(Ae,"-fix-right-first"),H),Object(L.a)(r,"".concat(Ae,"-fix-right-last"),B),Object(L.a)(r,"".concat(Ae,"-ellipsis"),X),Object(L.a)(r,"".concat(Ae,"-with-append"),K),Object(L.a)(r,"".concat(Ae,"-fix-sticky"),(V||Z)&&me),r),W.className,ee),style:Object(g.a)(Object(g.a)(Object(g.a)(Object(g.a)({},W.style),be),Q),pe),ref:c(x)?s:null});return p.createElement(x,Object.assign({},Je),K,ye)}var o=p.forwardRef(u);o.displayName="Cell";var h=p.memo(o,function(m,s){return s.shouldCellUpdate?!s.shouldCellUpdate(s.record,m.record):!1});Y.a=h},gJ3r:function(j,Y,D){"use strict";D.d(Y,"a",function(){return L});var L=[{value:"\u5317\u4EAC",label:"\u5317\u4EAC",children:[{value:"\u4E1C\u57CE",label:"\u4E1C\u57CE"},{value:"\u897F\u57CE",label:"\u897F\u57CE"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u4E30\u53F0",label:"\u4E30\u53F0"},{value:"\u77F3\u666F\u5C71",label:"\u77F3\u666F\u5C71"},{value:"\u6D77\u6DC0",label:"\u6D77\u6DC0"},{value:"\u95E8\u5934\u6C9F",label:"\u95E8\u5934\u6C9F"},{value:"\u623F\u5C71",label:"\u623F\u5C71"},{value:"\u901A\u5DDE",label:"\u901A\u5DDE"},{value:"\u987A\u4E49",label:"\u987A\u4E49"},{value:"\u660C\u5E73",label:"\u660C\u5E73"},{value:"\u5927\u5174",label:"\u5927\u5174"},{value:"\u5E73\u8C37",label:"\u5E73\u8C37"},{value:"\u6000\u67D4",label:"\u6000\u67D4"},{value:"\u5BC6\u4E91",label:"\u5BC6\u4E91"},{value:"\u5EF6\u5E86",label:"\u5EF6\u5E86"}]},{value:"\u4E0A\u6D77",label:"\u4E0A\u6D77",children:[{value:"\u5D07\u660E",label:"\u5D07\u660E"},{value:"\u9EC4\u6D66",label:"\u9EC4\u6D66"},{value:"\u5362\u6E7E",label:"\u5362\u6E7E"},{value:"\u5F90\u6C47",label:"\u5F90\u6C47"},{value:"\u957F\u5B81",label:"\u957F\u5B81"},{value:"\u9759\u5B89",label:"\u9759\u5B89"},{value:"\u666E\u9640",label:"\u666E\u9640"},{value:"\u95F8\u5317",label:"\u95F8\u5317"},{value:"\u8679\u53E3",label:"\u8679\u53E3"},{value:"\u6768\u6D66",label:"\u6768\u6D66"},{value:"\u95F5\u884C",label:"\u95F5\u884C"},{value:"\u5B9D\u5C71",label:"\u5B9D\u5C71"},{value:"\u5609\u5B9A",label:"\u5609\u5B9A"},{value:"\u6D66\u4E1C",label:"\u6D66\u4E1C"},{value:"\u91D1\u5C71",label:"\u91D1\u5C71"},{value:"\u677E\u6C5F",label:"\u677E\u6C5F"},{value:"\u9752\u6D66",label:"\u9752\u6D66"},{value:"\u5357\u6C47",label:"\u5357\u6C47"},{value:"\u5949\u8D24",label:"\u5949\u8D24"}]},{value:"\u5E7F\u4E1C",label:"\u5E7F\u4E1C",children:[{value:"\u5E7F\u5DDE",label:"\u5E7F\u5DDE"},{value:"\u6DF1\u5733",label:"\u6DF1\u5733"},{value:"\u73E0\u6D77",label:"\u73E0\u6D77"},{value:"\u4E1C\u839E",label:"\u4E1C\u839E"},{value:"\u4E2D\u5C71",label:"\u4E2D\u5C71"},{value:"\u4F5B\u5C71",label:"\u4F5B\u5C71"},{value:"\u60E0\u5DDE",label:"\u60E0\u5DDE"},{value:"\u6CB3\u6E90",label:"\u6CB3\u6E90"},{value:"\u6F6E\u5DDE",label:"\u6F6E\u5DDE"},{value:"\u6C5F\u95E8",label:"\u6C5F\u95E8"},{value:"\u63ED\u9633",label:"\u63ED\u9633"},{value:"\u8302\u540D",label:"\u8302\u540D"},{value:"\u6885\u5DDE",label:"\u6885\u5DDE"},{value:"\u6E05\u8FDC",label:"\u6E05\u8FDC"},{value:"\u6C55\u5934",label:"\u6C55\u5934"},{value:"\u6C55\u5C3E",label:"\u6C55\u5C3E"},{value:"\u97F6\u5173",label:"\u97F6\u5173"},{value:"\u987A\u5FB7",label:"\u987A\u5FB7"},{value:"\u9633\u6C5F",label:"\u9633\u6C5F"},{value:"\u4E91\u6D6E",label:"\u4E91\u6D6E"},{value:"\u6E5B\u6C5F",label:"\u6E5B\u6C5F"},{value:"\u8087\u5E86",label:"\u8087\u5E86"}]},{value:"\u6C5F\u82CF",label:"\u6C5F\u82CF",children:[{value:"\u5357\u4EAC",label:"\u5357\u4EAC"},{value:"\u5E38\u719F",label:"\u5E38\u719F"},{value:"\u5E38\u5DDE",label:"\u5E38\u5DDE"},{value:"\u6D77\u95E8",label:"\u6D77\u95E8"},{value:"\u6DEE\u5B89",label:"\u6DEE\u5B89"},{value:"\u6C5F\u90FD",label:"\u6C5F\u90FD"},{value:"\u6C5F\u9634",label:"\u6C5F\u9634"},{value:"\u6606\u5C71",label:"\u6606\u5C71"},{value:"\u8FDE\u4E91\u6E2F",label:"\u8FDE\u4E91\u6E2F"},{value:"\u5357\u901A",label:"\u5357\u901A"},{value:"\u542F\u4E1C",label:"\u542F\u4E1C"},{value:"\u6CAD\u9633",label:"\u6CAD\u9633"},{value:"\u5BBF\u8FC1",label:"\u5BBF\u8FC1"},{value:"\u82CF\u5DDE",label:"\u82CF\u5DDE"},{value:"\u592A\u4ED3",label:"\u592A\u4ED3"},{value:"\u6CF0\u5DDE",label:"\u6CF0\u5DDE"},{value:"\u540C\u91CC",label:"\u540C\u91CC"},{value:"\u65E0\u9521",label:"\u65E0\u9521"},{value:"\u5F90\u5DDE",label:"\u5F90\u5DDE"},{value:"\u76D0\u57CE",label:"\u76D0\u57CE"},{value:"\u626C\u5DDE",label:"\u626C\u5DDE"},{value:"\u5B9C\u5174",label:"\u5B9C\u5174"},{value:"\u4EEA\u5F81",label:"\u4EEA\u5F81"},{value:"\u5F20\u5BB6\u6E2F",label:"\u5F20\u5BB6\u6E2F"},{value:"\u9547\u6C5F",label:"\u9547\u6C5F"}]},{value:"\u91CD\u5E86",label:"\u91CD\u5E86",children:[{value:"\u4E07\u5DDE",label:"\u4E07\u5DDE"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u6E1D\u4E2D",label:"\u6E1D\u4E2D"},{value:"\u5927\u6E21\u53E3",label:"\u5927\u6E21\u53E3"},{value:"\u6C5F\u5317",label:"\u6C5F\u5317"},{value:"\u6C99\u576A\u575D",label:"\u6C99\u576A\u575D"},{value:"\u4E5D\u9F99\u5761",label:"\u4E5D\u9F99\u5761"},{value:"\u5357\u5CB8",label:"\u5357\u5CB8"},{value:"\u5317\u789A",label:"\u5317\u789A"},{value:"\u4E07\u76DB",label:"\u4E07\u76DB"},{value:"\u53CC\u6322",label:"\u53CC\u6322"},{value:"\u6E1D\u5317",label:"\u6E1D\u5317"},{value:"\u5DF4\u5357",label:"\u5DF4\u5357"},{value:"\u9ED4\u6C5F",label:"\u9ED4\u6C5F"},{value:"\u957F\u5BFF",label:"\u957F\u5BFF"},{value:"\u7DA6\u6C5F",label:"\u7DA6\u6C5F"},{value:"\u6F7C\u5357",label:"\u6F7C\u5357"},{value:"\u94DC\u6881",label:"\u94DC\u6881"},{value:"\u5927\u8DB3",label:"\u5927\u8DB3"},{value:"\u8363\u660C",label:"\u8363\u660C"},{value:"\u58C1\u5C71",label:"\u58C1\u5C71"},{value:"\u6881\u5E73",label:"\u6881\u5E73"},{value:"\u57CE\u53E3",label:"\u57CE\u53E3"},{value:"\u4E30\u90FD",label:"\u4E30\u90FD"},{value:"\u57AB\u6C5F",label:"\u57AB\u6C5F"},{value:"\u6B66\u9686",label:"\u6B66\u9686"},{value:"\u5FE0\u53BF",label:"\u5FE0\u53BF"},{value:"\u5F00\u53BF",label:"\u5F00\u53BF"},{value:"\u4E91\u9633",label:"\u4E91\u9633"},{value:"\u5949\u8282",label:"\u5949\u8282"},{value:"\u5DEB\u5C71",label:"\u5DEB\u5C71"},{value:"\u5DEB\u6EAA",label:"\u5DEB\u6EAA"},{value:"\u77F3\u67F1",label:"\u77F3\u67F1"},{value:"\u79C0\u5C71",label:"\u79C0\u5C71"},{value:"\u9149\u9633",label:"\u9149\u9633"},{value:"\u5F6D\u6C34",label:"\u5F6D\u6C34"},{value:"\u6C5F\u6D25",label:"\u6C5F\u6D25"},{value:"\u5408\u5DDD",label:"\u5408\u5DDD"},{value:"\u6C38\u5DDD",label:"\u6C38\u5DDD"},{value:"\u5357\u5DDD",label:"\u5357\u5DDD"}]},{value:"\u5B89\u5FBD",label:"\u5B89\u5FBD",children:[{value:"\u5408\u80A5",label:"\u5408\u80A5"},{value:"\u5B89\u5E86",label:"\u5B89\u5E86"},{value:"\u868C\u57E0",label:"\u868C\u57E0"},{value:"\u4EB3\u5DDE",label:"\u4EB3\u5DDE"},{value:"\u5DE2\u6E56",label:"\u5DE2\u6E56"},{value:"\u6EC1\u5DDE",label:"\u6EC1\u5DDE"},{value:"\u961C\u9633",label:"\u961C\u9633"},{value:"\u8D35\u6C60",label:"\u8D35\u6C60"},{value:"\u6DEE\u5317",label:"\u6DEE\u5317"},{value:"\u6DEE\u5316",label:"\u6DEE\u5316"},{value:"\u6DEE\u5357",label:"\u6DEE\u5357"},{value:"\u9EC4\u5C71",label:"\u9EC4\u5C71"},{value:"\u4E5D\u534E\u5C71",label:"\u4E5D\u534E\u5C71"},{value:"\u516D\u5B89",label:"\u516D\u5B89"},{value:"\u9A6C\u978D\u5C71",label:"\u9A6C\u978D\u5C71"},{value:"\u5BBF\u5DDE",label:"\u5BBF\u5DDE"},{value:"\u94DC\u9675",label:"\u94DC\u9675"},{value:"\u5C6F\u6EAA",label:"\u5C6F\u6EAA"},{value:"\u829C\u6E56",label:"\u829C\u6E56"},{value:"\u5BA3\u57CE",label:"\u5BA3\u57CE"}]},{value:"\u798F\u5EFA",label:"\u798F\u5EFA",children:[{value:"\u798F\u5DDE",label:"\u798F\u5DDE"},{value:"\u53A6\u95E8",label:"\u53A6\u95E8"},{value:"\u6CC9\u5DDE",label:"\u6CC9\u5DDE"},{value:"\u6F33\u5DDE",label:"\u6F33\u5DDE"},{value:"\u9F99\u5CA9",label:"\u9F99\u5CA9"},{value:"\u5357\u5E73",label:"\u5357\u5E73"},{value:"\u5B81\u5FB7",label:"\u5B81\u5FB7"},{value:"\u8386\u7530",label:"\u8386\u7530"},{value:"\u4E09\u660E",label:"\u4E09\u660E"}]},{value:"\u7518\u8083",label:"\u7518\u8083",children:[{value:"\u5170\u5DDE",label:"\u5170\u5DDE"},{value:"\u5609\u5CEA\u5173",label:"\u5609\u5CEA\u5173"},{value:"\u767D\u94F6",label:"\u767D\u94F6"},{value:"\u5B9A\u897F",label:"\u5B9A\u897F"},{value:"\u6566\u714C",label:"\u6566\u714C"},{value:"\u7518\u5357",label:"\u7518\u5357"},{value:"\u91D1\u660C",label:"\u91D1\u660C"},{value:"\u9152\u6CC9",label:"\u9152\u6CC9"},{value:"\u4E34\u590F",label:"\u4E34\u590F"},{value:"\u5E73\u51C9",label:"\u5E73\u51C9"},{value:"\u5929\u6C34",label:"\u5929\u6C34"},{value:"\u9647\u5357",label:"\u9647\u5357"},{value:"\u6B66\u5A01",label:"\u6B66\u5A01"},{value:"\u897F\u5CF0",label:"\u897F\u5CF0"},{value:"\u5F20\u6396",label:"\u5F20\u6396"}]},{value:"\u5E7F\u897F",label:"\u5E7F\u897F",children:[{value:"\u5357\u5B81",label:"\u5357\u5B81"},{value:"\u6765\u5BBE",label:"\u6765\u5BBE"},{value:"\u767E\u8272",label:"\u767E\u8272"},{value:"\u5317\u6D77",label:"\u5317\u6D77"},{value:"\u6842\u6797",label:"\u6842\u6797"},{value:"\u9632\u57CE\u6E2F",label:"\u9632\u57CE\u6E2F"},{value:"\u8D35\u6E2F",label:"\u8D35\u6E2F"},{value:"\u6CB3\u6C60",label:"\u6CB3\u6C60"},{value:"\u8D3A\u5DDE",label:"\u8D3A\u5DDE"},{value:"\u67F3\u5DDE",label:"\u67F3\u5DDE"},{value:"\u94A6\u5DDE",label:"\u94A6\u5DDE"},{value:"\u68A7\u5DDE",label:"\u68A7\u5DDE"},{value:"\u7389\u6797",label:"\u7389\u6797"}]},{value:"\u8D35\u5DDE",label:"\u8D35\u5DDE",children:[{value:"\u8D35\u9633",label:"\u8D35\u9633"},{value:"\u5B89\u987A",label:"\u5B89\u987A"},{value:"\u6BD5\u8282",label:"\u6BD5\u8282"},{value:"\u90FD\u5300",label:"\u90FD\u5300"},{value:"\u51EF\u91CC",label:"\u51EF\u91CC"},{value:"\u516D\u76D8\u6C34",label:"\u516D\u76D8\u6C34"},{value:"\u94DC\u4EC1",label:"\u94DC\u4EC1"},{value:"\u5174\u4E49",label:"\u5174\u4E49"},{value:"\u7389\u5C4F",label:"\u7389\u5C4F"},{value:"\u9075\u4E49",label:"\u9075\u4E49"}]},{value:"\u6D77\u5357",label:"\u6D77\u5357",children:[{value:"\u6D77\u53E3",label:"\u6D77\u53E3"},{value:"\u510B\u53BF",label:"\u510B\u53BF"},{value:"\u9675\u6C34",label:"\u9675\u6C34"},{value:"\u743C\u6D77",label:"\u743C\u6D77"},{value:"\u4E09\u4E9A",label:"\u4E09\u4E9A"},{value:"\u901A\u4EC0",label:"\u901A\u4EC0"},{value:"\u4E07\u5B81",label:"\u4E07\u5B81"}]},{value:"\u6CB3\u5317",label:"\u6CB3\u5317",children:[{value:"\u77F3\u5BB6\u5E84",label:"\u77F3\u5BB6\u5E84"},{value:"\u4FDD\u5B9A",label:"\u4FDD\u5B9A"},{value:"\u5317\u6234\u6CB3",label:"\u5317\u6234\u6CB3"},{value:"\u6CA7\u5DDE",label:"\u6CA7\u5DDE"},{value:"\u627F\u5FB7",label:"\u627F\u5FB7"},{value:"\u4E30\u6DA6",label:"\u4E30\u6DA6"},{value:"\u90AF\u90F8",label:"\u90AF\u90F8"},{value:"\u8861\u6C34",label:"\u8861\u6C34"},{value:"\u5ECA\u574A",label:"\u5ECA\u574A"},{value:"\u5357\u6234\u6CB3",label:"\u5357\u6234\u6CB3"},{value:"\u79E6\u7687\u5C9B",label:"\u79E6\u7687\u5C9B"},{value:"\u5510\u5C71",label:"\u5510\u5C71"},{value:"\u65B0\u57CE",label:"\u65B0\u57CE"},{value:"\u90A2\u53F0",label:"\u90A2\u53F0"},{value:"\u5F20\u5BB6\u53E3",label:"\u5F20\u5BB6\u53E3"}]},{value:"\u9ED1\u9F99\u6C5F",label:"\u9ED1\u9F99\u6C5F",children:[{value:"\u54C8\u5C14\u6EE8",label:"\u54C8\u5C14\u6EE8"},{value:"\u5317\u5B89",label:"\u5317\u5B89"},{value:"\u5927\u5E86",label:"\u5927\u5E86"},{value:"\u5927\u5174\u5B89\u5CAD",label:"\u5927\u5174\u5B89\u5CAD"},{value:"\u9E64\u5C97",label:"\u9E64\u5C97"},{value:"\u9ED1\u6CB3",label:"\u9ED1\u6CB3"},{value:"\u4F73\u6728\u65AF",label:"\u4F73\u6728\u65AF"},{value:"\u9E21\u897F",label:"\u9E21\u897F"},{value:"\u7261\u4E39\u6C5F",label:"\u7261\u4E39\u6C5F"},{value:"\u9F50\u9F50\u54C8\u5C14",label:"\u9F50\u9F50\u54C8\u5C14"},{value:"\u4E03\u53F0\u6CB3",label:"\u4E03\u53F0\u6CB3"},{value:"\u53CC\u9E2D\u5C71",label:"\u53CC\u9E2D\u5C71"},{value:"\u7EE5\u5316",label:"\u7EE5\u5316"},{value:"\u4F0A\u6625",label:"\u4F0A\u6625"}]},{value:"\u6CB3\u5357",label:"\u6CB3\u5357",children:[{value:"\u90D1\u5DDE",label:"\u90D1\u5DDE"},{value:"\u5B89\u9633",label:"\u5B89\u9633"},{value:"\u9E64\u58C1",label:"\u9E64\u58C1"},{value:"\u6F62\u5DDD",label:"\u6F62\u5DDD"},{value:"\u7126\u4F5C",label:"\u7126\u4F5C"},{value:"\u6D4E\u6E90",label:"\u6D4E\u6E90"},{value:"\u5F00\u5C01",label:"\u5F00\u5C01"},{value:"\u6F2F\u6CB3",label:"\u6F2F\u6CB3"},{value:"\u6D1B\u9633",label:"\u6D1B\u9633"},{value:"\u5357\u9633",label:"\u5357\u9633"},{value:"\u5E73\u9876\u5C71",label:"\u5E73\u9876\u5C71"},{value:"\u6FEE\u9633",label:"\u6FEE\u9633"},{value:"\u4E09\u95E8\u5CE1",label:"\u4E09\u95E8\u5CE1"},{value:"\u5546\u4E18",label:"\u5546\u4E18"},{value:"\u65B0\u4E61",label:"\u65B0\u4E61"},{value:"\u4FE1\u9633",label:"\u4FE1\u9633"},{value:"\u8BB8\u660C",label:"\u8BB8\u660C"},{value:"\u5468\u53E3",label:"\u5468\u53E3"},{value:"\u9A7B\u9A6C\u5E97",label:"\u9A7B\u9A6C\u5E97"}]},{value:"\u9999\u6E2F",label:"\u9999\u6E2F",children:[{value:"\u9999\u6E2F",label:"\u9999\u6E2F"},{value:"\u4E5D\u9F99",label:"\u4E5D\u9F99"},{value:"\u65B0\u754C",label:"\u65B0\u754C"}]},{value:"\u6E56\u5317",label:"\u6E56\u5317",children:[{value:"\u6B66\u6C49",label:"\u6B66\u6C49"},{value:"\u5929\u95E8",label:"\u5929\u95E8"},{value:"\u6069\u65BD",label:"\u6069\u65BD"},{value:"\u9102\u5DDE",label:"\u9102\u5DDE"},{value:"\u9EC4\u5188",label:"\u9EC4\u5188"},{value:"\u9EC4\u77F3",label:"\u9EC4\u77F3"},{value:"\u8346\u95E8",label:"\u8346\u95E8"},{value:"\u8346\u5DDE",label:"\u8346\u5DDE"},{value:"\u6F5C\u6C5F",label:"\u6F5C\u6C5F"},{value:"\u5341\u5830",label:"\u5341\u5830"},{value:"\u968F\u5DDE",label:"\u968F\u5DDE"},{value:"\u6B66\u7A74",label:"\u6B66\u7A74"},{value:"\u4ED9\u6843",label:"\u4ED9\u6843"},{value:"\u54B8\u5B81",label:"\u54B8\u5B81"},{value:"\u8944\u9633",label:"\u8944\u9633"},{value:"\u8944\u6A0A",label:"\u8944\u6A0A"},{value:"\u5B5D\u611F",label:"\u5B5D\u611F"},{value:"\u5B9C\u660C",label:"\u5B9C\u660C"}]},{value:"\u6E56\u5357",label:"\u6E56\u5357",children:[{value:"\u957F\u6C99",label:"\u957F\u6C99"},{value:"\u5E38\u5FB7",label:"\u5E38\u5FB7"},{value:"\u90F4\u5DDE",label:"\u90F4\u5DDE"},{value:"\u8861\u9633",label:"\u8861\u9633"},{value:"\u6000\u5316",label:"\u6000\u5316"},{value:"\u5409\u9996",label:"\u5409\u9996"},{value:"\u5A04\u5E95",label:"\u5A04\u5E95"},{value:"\u90B5\u9633",label:"\u90B5\u9633"},{value:"\u6E58\u6F6D",label:"\u6E58\u6F6D"},{value:"\u76CA\u9633",label:"\u76CA\u9633"},{value:"\u5CB3\u9633",label:"\u5CB3\u9633"},{value:"\u6C38\u5DDE",label:"\u6C38\u5DDE"},{value:"\u5F20\u5BB6\u754C",label:"\u5F20\u5BB6\u754C"},{value:"\u682A\u6D32",label:"\u682A\u6D32"}]},{value:"\u6C5F\u897F",label:"\u6C5F\u897F",children:[{value:"\u5357\u660C",label:"\u5357\u660C"},{value:"\u629A\u5DDE",label:"\u629A\u5DDE"},{value:"\u8D63\u5DDE",label:"\u8D63\u5DDE"},{value:"\u5409\u5B89",label:"\u5409\u5B89"},{value:"\u666F\u5FB7\u9547",label:"\u666F\u5FB7\u9547"},{value:"\u4E95\u5188\u5C71",label:"\u4E95\u5188\u5C71"},{value:"\u4E5D\u6C5F",label:"\u4E5D\u6C5F"},{value:"\u5E90\u5C71",label:"\u5E90\u5C71"},{value:"\u840D\u4E61",label:"\u840D\u4E61"},{value:"\u4E0A\u9976",label:"\u4E0A\u9976"},{value:"\u65B0\u4F59",label:"\u65B0\u4F59"},{value:"\u5B9C\u6625",label:"\u5B9C\u6625"},{value:"\u9E70\u6F6D",label:"\u9E70\u6F6D"}]},{value:"\u5409\u6797",label:"\u5409\u6797",children:[{value:"\u957F\u6625",label:"\u957F\u6625"},{value:"\u5409\u6797",label:"\u5409\u6797"},{value:"\u767D\u57CE",label:"\u767D\u57CE"},{value:"\u767D\u5C71",label:"\u767D\u5C71"},{value:"\u73F2\u6625",label:"\u73F2\u6625"},{value:"\u8FBD\u6E90",label:"\u8FBD\u6E90"},{value:"\u6885\u6CB3",label:"\u6885\u6CB3"},{value:"\u56DB\u5E73",label:"\u56DB\u5E73"},{value:"\u677E\u539F",label:"\u677E\u539F"},{value:"\u901A\u5316",label:"\u901A\u5316"},{value:"\u5EF6\u5409",label:"\u5EF6\u5409"}]},{value:"\u8FBD\u5B81",label:"\u8FBD\u5B81",children:[{value:"\u6C88\u9633",label:"\u6C88\u9633"},{value:"\u978D\u5C71",label:"\u978D\u5C71"},{value:"\u672C\u6EAA",label:"\u672C\u6EAA"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u5927\u8FDE",label:"\u5927\u8FDE"},{value:"\u4E39\u4E1C",label:"\u4E39\u4E1C"},{value:"\u629A\u987A",label:"\u629A\u987A"},{value:"\u961C\u65B0",label:"\u961C\u65B0"},{value:"\u846B\u82A6\u5C9B",label:"\u846B\u82A6\u5C9B"},{value:"\u9526\u5DDE",label:"\u9526\u5DDE"},{value:"\u8FBD\u9633",label:"\u8FBD\u9633"},{value:"\u76D8\u9526",label:"\u76D8\u9526"},{value:"\u94C1\u5CAD",label:"\u94C1\u5CAD"},{value:"\u8425\u53E3",label:"\u8425\u53E3"}]},{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8",children:[{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8"}]},{value:"\u5185\u8499\u53E4",label:"\u5185\u8499\u53E4",children:[{value:"\u547C\u548C\u6D69\u7279",label:"\u547C\u548C\u6D69\u7279"},{value:"\u963F\u62C9\u5584\u76DF",label:"\u963F\u62C9\u5584\u76DF"},{value:"\u5305\u5934",label:"\u5305\u5934"},{value:"\u8D64\u5CF0",label:"\u8D64\u5CF0"},{value:"\u4E1C\u80DC",label:"\u4E1C\u80DC"},{value:"\u6D77\u62C9\u5C14",label:"\u6D77\u62C9\u5C14"},{value:"\u96C6\u5B81",label:"\u96C6\u5B81"},{value:"\u4E34\u6CB3",label:"\u4E34\u6CB3"},{value:"\u901A\u8FBD",label:"\u901A\u8FBD"},{value:"\u4E4C\u6D77",label:"\u4E4C\u6D77"},{value:"\u4E4C\u5170\u6D69\u7279",label:"\u4E4C\u5170\u6D69\u7279"},{value:"\u9521\u6797\u6D69\u7279",label:"\u9521\u6797\u6D69\u7279"}]},{value:"\u5B81\u590F",label:"\u5B81\u590F",children:[{value:"\u94F6\u5DDD",label:"\u94F6\u5DDD"},{value:"\u56FA\u6E90",label:"\u56FA\u6E90"},{value:"\u77F3\u5634\u5C71",label:"\u77F3\u5634\u5C71"},{value:"\u5434\u5FE0",label:"\u5434\u5FE0"}]},{value:"\u9752\u6D77",label:"\u9752\u6D77",children:[{value:"\u897F\u5B81",label:"\u897F\u5B81"},{value:"\u5FB7\u4EE4\u54C8",label:"\u5FB7\u4EE4\u54C8"},{value:"\u683C\u5C14\u6728",label:"\u683C\u5C14\u6728"},{value:"\u5171\u548C",label:"\u5171\u548C"},{value:"\u6D77\u4E1C",label:"\u6D77\u4E1C"},{value:"\u6D77\u664F",label:"\u6D77\u664F"},{value:"\u739B\u6C81",label:"\u739B\u6C81"},{value:"\u540C\u4EC1",label:"\u540C\u4EC1"},{value:"\u7389\u6811",label:"\u7389\u6811"}]},{value:"\u5C71\u4E1C",label:"\u5C71\u4E1C",children:[{value:"\u6D4E\u5357",label:"\u6D4E\u5357"},{value:"\u6EE8\u5DDE",label:"\u6EE8\u5DDE"},{value:"\u5156\u5DDE",label:"\u5156\u5DDE"},{value:"\u5FB7\u5DDE",label:"\u5FB7\u5DDE"},{value:"\u4E1C\u8425",label:"\u4E1C\u8425"},{value:"\u83CF\u6CFD",label:"\u83CF\u6CFD"},{value:"\u6D4E\u5B81",label:"\u6D4E\u5B81"},{value:"\u83B1\u829C",label:"\u83B1\u829C"},{value:"\u804A\u57CE",label:"\u804A\u57CE"},{value:"\u4E34\u6C82",label:"\u4E34\u6C82"},{value:"\u84EC\u83B1",label:"\u84EC\u83B1"},{value:"\u9752\u5C9B",label:"\u9752\u5C9B"},{value:"\u66F2\u961C",label:"\u66F2\u961C"},{value:"\u65E5\u7167",label:"\u65E5\u7167"},{value:"\u6CF0\u5B89",label:"\u6CF0\u5B89"},{value:"\u6F4D\u574A",label:"\u6F4D\u574A"},{value:"\u5A01\u6D77",label:"\u5A01\u6D77"},{value:"\u70DF\u53F0",label:"\u70DF\u53F0"},{value:"\u67A3\u5E84",label:"\u67A3\u5E84"},{value:"\u6DC4\u535A",label:"\u6DC4\u535A"}]},{value:"\u5C71\u897F",label:"\u5C71\u897F",children:[{value:"\u592A\u539F",label:"\u592A\u539F"},{value:"\u5415\u6881",label:"\u5415\u6881"},{value:"\u957F\u6CBB",label:"\u957F\u6CBB"},{value:"\u5927\u540C",label:"\u5927\u540C"},{value:"\u5019\u9A6C",label:"\u5019\u9A6C"},{value:"\u664B\u57CE",label:"\u664B\u57CE"},{value:"\u79BB\u77F3",label:"\u79BB\u77F3"},{value:"\u4E34\u6C7E",label:"\u4E34\u6C7E"},{value:"\u5B81\u6B66",label:"\u5B81\u6B66"},{value:"\u6714\u5DDE",label:"\u6714\u5DDE"},{value:"\u5FFB\u5DDE",label:"\u5FFB\u5DDE"},{value:"\u9633\u6CC9",label:"\u9633\u6CC9"},{value:"\u6986\u6B21",label:"\u6986\u6B21"},{value:"\u664B\u4E2D",label:"\u664B\u4E2D"},{value:"\u8FD0\u57CE",label:"\u8FD0\u57CE"}]},{value:"\u9655\u897F",label:"\u9655\u897F",children:[{value:"\u897F\u5B89",label:"\u897F\u5B89"},{value:"\u5B89\u5EB7",label:"\u5B89\u5EB7"},{value:"\u5B9D\u9E21",label:"\u5B9D\u9E21"},{value:"\u6C49\u4E2D",label:"\u6C49\u4E2D"},{value:"\u6E2D\u5357",label:"\u6E2D\u5357"},{value:"\u5546\u5DDE",label:"\u5546\u5DDE"},{value:"\u7EE5\u5FB7",label:"\u7EE5\u5FB7"},{value:"\u94DC\u5DDD",label:"\u94DC\u5DDD"},{value:"\u54B8\u9633",label:"\u54B8\u9633"},{value:"\u5EF6\u5B89",label:"\u5EF6\u5B89"},{value:"\u6986\u6797",label:"\u6986\u6797"}]},{value:"\u56DB\u5DDD",label:"\u56DB\u5DDD",children:[{value:"\u6210\u90FD",label:"\u6210\u90FD"},{value:"\u5DF4\u4E2D",label:"\u5DF4\u4E2D"},{value:"\u8FBE\u5DDD",label:"\u8FBE\u5DDD"},{value:"\u5FB7\u9633",label:"\u5FB7\u9633"},{value:"\u90FD\u6C5F\u5830",label:"\u90FD\u6C5F\u5830"},{value:"\u5CE8\u7709\u5C71",label:"\u5CE8\u7709\u5C71"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u5E7F\u5B89",label:"\u5E7F\u5B89"},{value:"\u5E7F\u5143",label:"\u5E7F\u5143"},{value:"\u4E5D\u5BE8\u6C9F",label:"\u4E5D\u5BE8\u6C9F"},{value:"\u5EB7\u5B9A",label:"\u5EB7\u5B9A"},{value:"\u4E50\u5C71",label:"\u4E50\u5C71"},{value:"\u6CF8\u5DDE",label:"\u6CF8\u5DDE"},{value:"\u9A6C\u5C14\u5EB7",label:"\u9A6C\u5C14\u5EB7"},{value:"\u7EF5\u9633",label:"\u7EF5\u9633"},{value:"\u7709\u5C71",label:"\u7709\u5C71"},{value:"\u5357\u5145",label:"\u5357\u5145"},{value:"\u5185\u6C5F",label:"\u5185\u6C5F"},{value:"\u6500\u679D\u82B1",label:"\u6500\u679D\u82B1"},{value:"\u9042\u5B81",label:"\u9042\u5B81"},{value:"\u6C76\u5DDD",label:"\u6C76\u5DDD"},{value:"\u897F\u660C",label:"\u897F\u660C"},{value:"\u96C5\u5B89",label:"\u96C5\u5B89"},{value:"\u5B9C\u5BBE",label:"\u5B9C\u5BBE"},{value:"\u81EA\u8D21",label:"\u81EA\u8D21"},{value:"\u8D44\u9633",label:"\u8D44\u9633"}]},{value:"\u53F0\u6E7E",label:"\u53F0\u6E7E",children:[{value:"\u53F0\u5317",label:"\u53F0\u5317"},{value:"\u57FA\u9686",label:"\u57FA\u9686"},{value:"\u53F0\u5357",label:"\u53F0\u5357"},{value:"\u53F0\u4E2D",label:"\u53F0\u4E2D"},{value:"\u9AD8\u96C4",label:"\u9AD8\u96C4"},{value:"\u5C4F\u4E1C",label:"\u5C4F\u4E1C"},{value:"\u5357\u6295",label:"\u5357\u6295"},{value:"\u4E91\u6797",label:"\u4E91\u6797"},{value:"\u65B0\u7AF9",label:"\u65B0\u7AF9"},{value:"\u5F70\u5316",label:"\u5F70\u5316"},{value:"\u82D7\u6817",label:"\u82D7\u6817"},{value:"\u5609\u4E49",label:"\u5609\u4E49"},{value:"\u6843\u56ED",label:"\u6843\u56ED"},{value:"\u5B9C\u5170",label:"\u5B9C\u5170"},{value:"\u53F0\u4E1C",label:"\u53F0\u4E1C"},{value:"\u91D1\u95E8",label:"\u91D1\u95E8"},{value:"\u9A6C\u7956",label:"\u9A6C\u7956"},{value:"\u6F8E\u6E56",label:"\u6F8E\u6E56"}]},{value:"\u5929\u6D25",label:"\u5929\u6D25",children:[{value:"\u5929\u6D25",label:"\u5929\u6D25"},{value:"\u548C\u5E73",label:"\u548C\u5E73"},{value:"\u4E1C\u4E3D",label:"\u4E1C\u4E3D"},{value:"\u6CB3\u4E1C",label:"\u6CB3\u4E1C"},{value:"\u897F\u9752",label:"\u897F\u9752"},{value:"\u6CB3\u897F",label:"\u6CB3\u897F"},{value:"\u6D25\u5357",label:"\u6D25\u5357"},{value:"\u5357\u5F00",label:"\u5357\u5F00"},{value:"\u5317\u8FB0",label:"\u5317\u8FB0"},{value:"\u6CB3\u5317",label:"\u6CB3\u5317"},{value:"\u6B66\u6E05",label:"\u6B66\u6E05"},{value:"\u7EA2\u6322",label:"\u7EA2\u6322"},{value:"\u5858\u6CBD",label:"\u5858\u6CBD"},{value:"\u6C49\u6CBD",label:"\u6C49\u6CBD"},{value:"\u5927\u6E2F",label:"\u5927\u6E2F"},{value:"\u5B81\u6CB3",label:"\u5B81\u6CB3"},{value:"\u9759\u6D77",label:"\u9759\u6D77"},{value:"\u5B9D\u577B",label:"\u5B9D\u577B"},{value:"\u84DF\u53BF",label:"\u84DF\u53BF"}]},{value:"\u65B0\u7586",label:"\u65B0\u7586",children:[{value:"\u4E4C\u9C81\u6728\u9F50",label:"\u4E4C\u9C81\u6728\u9F50"},{value:"\u963F\u514B\u82CF",label:"\u963F\u514B\u82CF"},{value:"\u963F\u52D2\u6CF0",label:"\u963F\u52D2\u6CF0"},{value:"\u963F\u56FE\u4EC0",label:"\u963F\u56FE\u4EC0"},{value:"\u535A\u4E50",label:"\u535A\u4E50"},{value:"\u660C\u5409",label:"\u660C\u5409"},{value:"\u4E1C\u5C71",label:"\u4E1C\u5C71"},{value:"\u54C8\u5BC6",label:"\u54C8\u5BC6"},{value:"\u548C\u7530",label:"\u548C\u7530"},{value:"\u5580\u4EC0",label:"\u5580\u4EC0"},{value:"\u514B\u62C9\u739B\u4F9D",label:"\u514B\u62C9\u739B\u4F9D"},{value:"\u5E93\u8F66",label:"\u5E93\u8F66"},{value:"\u5E93\u5C14\u52D2",label:"\u5E93\u5C14\u52D2"},{value:"\u594E\u5C6F",label:"\u594E\u5C6F"},{value:"\u77F3\u6CB3\u5B50",label:"\u77F3\u6CB3\u5B50"},{value:"\u5854\u57CE",label:"\u5854\u57CE"},{value:"\u5410\u9C81\u756A",label:"\u5410\u9C81\u756A"},{value:"\u4F0A\u5B81",label:"\u4F0A\u5B81"}]},{value:"\u897F\u85CF",label:"\u897F\u85CF",children:[{value:"\u62C9\u8428",label:"\u62C9\u8428"},{value:"\u963F\u91CC",label:"\u963F\u91CC"},{value:"\u660C\u90FD",label:"\u660C\u90FD"},{value:"\u6797\u829D",label:"\u6797\u829D"},{value:"\u90A3\u66F2",label:"\u90A3\u66F2"},{value:"\u65E5\u5580\u5219",label:"\u65E5\u5580\u5219"},{value:"\u5C71\u5357",label:"\u5C71\u5357"}]},{value:"\u4E91\u5357",label:"\u4E91\u5357",children:[{value:"\u6606\u660E",label:"\u6606\u660E"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4FDD\u5C71",label:"\u4FDD\u5C71"},{value:"\u695A\u96C4",label:"\u695A\u96C4"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4E1C\u5DDD",label:"\u4E1C\u5DDD"},{value:"\u4E2A\u65E7",label:"\u4E2A\u65E7"},{value:"\u666F\u6D2A",label:"\u666F\u6D2A"},{value:"\u5F00\u8FDC",label:"\u5F00\u8FDC"},{value:"\u4E34\u6CA7",label:"\u4E34\u6CA7"},{value:"\u4E3D\u6C5F",label:"\u4E3D\u6C5F"},{value:"\u516D\u5E93",label:"\u516D\u5E93"},{value:"\u6F5E\u897F",label:"\u6F5E\u897F"},{value:"\u66F2\u9756",label:"\u66F2\u9756"},{value:"\u601D\u8305",label:"\u601D\u8305"},{value:"\u6587\u5C71",label:"\u6587\u5C71"},{value:"\u897F\u53CC\u7248\u7EB3",label:"\u897F\u53CC\u7248\u7EB3"},{value:"\u7389\u6EAA",label:"\u7389\u6EAA"},{value:"\u4E2D\u7538",label:"\u4E2D\u7538"},{value:"\u662D\u901A",label:"\u662D\u901A"}]},{value:"\u6D59\u6C5F",label:"\u6D59\u6C5F",children:[{value:"\u676D\u5DDE",label:"\u676D\u5DDE"},{value:"\u6E29\u5DDE",label:"\u6E29\u5DDE"},{value:"\u5B89\u5409",label:"\u5B89\u5409"},{value:"\u6148\u6EAA",label:"\u6148\u6EAA"},{value:"\u5B9A\u6D77",label:"\u5B9A\u6D77"},{value:"\u5949\u5316",label:"\u5949\u5316"},{value:"\u6D77\u76D0",label:"\u6D77\u76D0"},{value:"\u9EC4\u5CA9",label:"\u9EC4\u5CA9"},{value:"\u6E56\u5DDE",label:"\u6E56\u5DDE"},{value:"\u5609\u5174",label:"\u5609\u5174"},{value:"\u91D1\u534E",label:"\u91D1\u534E"},{value:"\u4E34\u5B89",label:"\u4E34\u5B89"},{value:"\u4E34\u6D77",label:"\u4E34\u6D77"},{value:"\u4E3D\u6C34",label:"\u4E3D\u6C34"},{value:"\u5B81\u6CE2",label:"\u5B81\u6CE2"},{value:"\u74EF\u6D77",label:"\u74EF\u6D77"},{value:"\u5E73\u6E56",label:"\u5E73\u6E56"},{value:"\u5343\u5C9B\u6E56",label:"\u5343\u5C9B\u6E56"},{value:"\u8862\u5DDE",label:"\u8862\u5DDE"},{value:"\u6C5F\u5C71",label:"\u6C5F\u5C71"},{value:"\u745E\u5B89",label:"\u745E\u5B89"},{value:"\u7ECD\u5174",label:"\u7ECD\u5174"},{value:"\u5D4A\u5DDE",label:"\u5D4A\u5DDE"},{value:"\u53F0\u5DDE",label:"\u53F0\u5DDE"},{value:"\u6E29\u5CAD",label:"\u6E29\u5CAD"},{value:"\u4F59\u59DA",label:"\u4F59\u59DA"},{value:"\u821F\u5C71",label:"\u821F\u5C71"}]},{value:"\u6D77\u5916",label:"\u6D77\u5916",children:[{value:"\u7F8E\u56FD",label:"\u7F8E\u56FD"},{value:"\u65E5\u672C",label:"\u65E5\u672C"},{value:"\u82F1\u56FD",label:"\u82F1\u56FD"},{value:"\u6CD5\u56FD",label:"\u6CD5\u56FD"},{value:"\u5FB7\u56FD",label:"\u5FB7\u56FD"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}]}]},"gb/T":function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){return L.mode.ECB=function(){var g=L.lib.BlockCipherMode.extend();return g.Encryptor=g.extend({processBlock:function(T,P){this._cipher.encryptBlock(T,P)}}),g.Decryptor=g.extend({processBlock:function(T,P){this._cipher.decryptBlock(T,P)}}),g}(),L.mode.ECB})},h78n:function(j,Y,D){"use strict";D.d(Y,"a",function(){return N});var L=D("q1tI"),g=D.n(L),T=D("TSYQ"),P=D.n(T),p={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},v=function(B){var K=B.map(function(){return Object(L.useRef)()}),U=Object(L.useRef)();return Object(L.useEffect)(function(){var W=Date.now(),X=!1;Object.keys(K).forEach(function(ne){var fe=K[ne].current;if(!fe)return;X=!0;var me=fe.style;me.transitionDuration=".3s, .3s, .3s, .06s",U.current&&W-U.current<100&&(me.transitionDuration="0s, 0s")}),X&&(U.current=Date.now())}),[K]};function S(){return S=Object.assign||function(H){for(var B=1;B<arguments.length;B++){var K=arguments[B];for(var U in K)Object.prototype.hasOwnProperty.call(K,U)&&(H[U]=K[U])}return H},S.apply(this,arguments)}function b(H,B){return u(H)||c(H,B)||l(H,B)||d()}function d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l(H,B){if(!H)return;if(typeof H=="string")return n(H,B);var K=Object.prototype.toString.call(H).slice(8,-1);if(K==="Object"&&H.constructor&&(K=H.constructor.name),K==="Map"||K==="Set")return Array.from(H);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return n(H,B)}function n(H,B){(B==null||B>H.length)&&(B=H.length);for(var K=0,U=new Array(B);K<B;K++)U[K]=H[K];return U}function c(H,B){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(H)))return;var K=[],U=!0,W=!1,X=void 0;try{for(var ne=H[Symbol.iterator](),fe;!(U=(fe=ne.next()).done)&&!(K.push(fe.value),B&&K.length===B);U=!0);}catch(me){W=!0,X=me}finally{try{!U&&ne.return!=null&&ne.return()}finally{if(W)throw X}}return K}function u(H){if(Array.isArray(H))return H}function o(H,B){if(H==null)return{};var K=h(H,B),U,W;if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(H);for(W=0;W<X.length;W++){if(U=X[W],B.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(H,U))continue;K[U]=H[U]}}return K}function h(H,B){if(H==null)return{};var K={},U=Object.keys(H),W,X;for(X=0;X<U.length;X++){if(W=U[X],B.indexOf(W)>=0)continue;K[W]=H[W]}return K}var m=function(B){var K=B.className,U=B.percent,W=B.prefixCls,X=B.strokeColor,ne=B.strokeLinecap,fe=B.strokeWidth,me=B.style,Ae=B.trailColor,De=B.trailWidth,ye=B.transition,Oe=o(B,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Oe.gapPosition;var xe=Array.isArray(U)?U:[U],ue=Array.isArray(X)?X:[X],le=v(xe),re=b(le,1),pe=re[0],ee=fe/2,te=100-fe/2,ce="M ".concat(ne==="round"?ee:0,",").concat(ee,`
|
|
|
L `).concat(ne==="round"?te:100,",").concat(ee),q="0 0 100 ".concat(fe),Q=0;return g.a.createElement("svg",S({className:P()("".concat(W,"-line"),K),viewBox:q,preserveAspectRatio:"none",style:me},Oe),g.a.createElement("path",{className:"".concat(W,"-line-trail"),d:ce,strokeLinecap:ne,stroke:Ae,strokeWidth:De||fe,fillOpacity:"0"}),xe.map(function(V,Z){var be={strokeDasharray:"".concat(V,"px, 100px"),strokeDashoffset:"-".concat(Q,"px"),transition:ye||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ge=ue[Z]||ue[ue.length-1];return Q+=V,g.a.createElement("path",{key:Z,className:"".concat(W,"-line-path"),d:ce,strokeLinecap:ne,stroke:ge,strokeWidth:fe,fillOpacity:"0",ref:pe[Z],style:be})}))};m.defaultProps=p;var s=m;function r(){return r=Object.assign||function(H){for(var B=1;B<arguments.length;B++){var K=arguments[B];for(var U in K)Object.prototype.hasOwnProperty.call(K,U)&&(H[U]=K[U])}return H},r.apply(this,arguments)}function a(H,B){return k(H)||f(H,B)||w(H,B)||t()}function t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w(H,B){if(!H)return;if(typeof H=="string")return E(H,B);var K=Object.prototype.toString.call(H).slice(8,-1);if(K==="Object"&&H.constructor&&(K=H.constructor.name),K==="Map"||K==="Set")return Array.from(H);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return E(H,B)}function E(H,B){(B==null||B>H.length)&&(B=H.length);for(var K=0,U=new Array(B);K<B;K++)U[K]=H[K];return U}function f(H,B){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(H)))return;var K=[],U=!0,W=!1,X=void 0;try{for(var ne=H[Symbol.iterator](),fe;!(U=(fe=ne.next()).done)&&!(K.push(fe.value),B&&K.length===B);U=!0);}catch(me){W=!0,X=me}finally{try{!U&&ne.return!=null&&ne.return()}finally{if(W)throw X}}return K}function k(H){if(Array.isArray(H))return H}function O(H,B){if(H==null)return{};var K=C(H,B),U,W;if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(H);for(W=0;W<X.length;W++){if(U=X[W],B.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(H,U))continue;K[U]=H[U]}}return K}function C(H,B){if(H==null)return{};var K={},U=Object.keys(H),W,X;for(X=0;X<U.length;X++){if(W=U[X],B.indexOf(W)>=0)continue;K[W]=H[W]}return K}var x=0;function y(H){return+H.replace("%","")}function _(H){return Array.isArray(H)?H:[H]}function M(H,B,K,U){var W=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,X=arguments.length>5?arguments[5]:void 0,ne=50-U/2,fe=0,me=-ne,Ae=0,De=-2*ne;switch(X){case"left":fe=-ne,me=0,Ae=2*ne,De=0;break;case"right":fe=ne,me=0,Ae=-2*ne,De=0;break;case"bottom":me=ne,De=2*ne;break;default:}var ye="M 50,50 m ".concat(fe,",").concat(me,`
|
|
|
a `).concat(ne,",").concat(ne," 0 1 1 ").concat(Ae,",").concat(-De,`
|
|
|
a `).concat(ne,",").concat(ne," 0 1 1 ").concat(-Ae,",").concat(De),Oe=Math.PI*2*ne,xe={stroke:K,strokeDasharray:"".concat(B/100*(Oe-W),"px ").concat(Oe,"px"),strokeDashoffset:"-".concat(W/2+H/100*(Oe-W),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ye,pathStyle:xe}}var I=function(B){var K=B.prefixCls,U=B.strokeWidth,W=B.trailWidth,X=B.gapDegree,ne=B.gapPosition,fe=B.trailColor,me=B.strokeLinecap,Ae=B.style,De=B.className,ye=B.strokeColor,Oe=B.percent,xe=O(B,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ue=Object(L.useMemo)(function(){return x+=1,x},[]),le=M(0,100,fe,U,X,ne),re=le.pathString,pe=le.pathStyle,ee=_(Oe),te=_(ye),ce=te.find(function(be){return Object.prototype.toString.call(be)==="[object Object]"}),q=v(ee),Q=a(q,1),V=Q[0],Z=function(){var ge=0;return ee.map(function(Te,Je){var rt=te[Je]||te[te.length-1],nt=Object.prototype.toString.call(rt)==="[object Object]"?"url(#".concat(K,"-gradient-").concat(ue,")"):"",at=M(ge,Te,rt,U,X,ne);return ge+=Te,g.a.createElement("path",{key:Je,className:"".concat(K,"-circle-path"),d:at.pathString,stroke:nt,strokeLinecap:me,strokeWidth:U,opacity:Te===0?0:1,fillOpacity:"0",style:at.pathStyle,ref:V[Je]})})};return g.a.createElement("svg",r({className:P()("".concat(K,"-circle"),De),viewBox:"0 0 100 100",style:Ae},xe),ce&&g.a.createElement("defs",null,g.a.createElement("linearGradient",{id:"".concat(K,"-gradient-").concat(ue),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(ce).sort(function(be,ge){return y(be)-y(ge)}).map(function(be,ge){return g.a.createElement("stop",{key:ge,offset:be,stopColor:ce[be]})}))),g.a.createElement("path",{className:"".concat(K,"-circle-trail"),d:re,stroke:fe,strokeLinecap:me,strokeWidth:W||U,fillOpacity:"0",style:pe}),Z().reverse())};I.defaultProps=p;var N=I,G={Line:s,Circle:N}},hW8S:function(j,Y,D){"use strict";D.d(Y,"a",function(){return P}),D.d(Y,"c",function(){return p}),D.d(Y,"b",function(){return v});var L=D("VTBJ"),g=D("Ff2n"),T=D("Kwbf"),P="RC_TABLE_INTERNAL_COL_DEFINE";function p(S){var b=S.expandable,d=Object(g.a)(S,["expandable"]);return"expandable"in S?Object(L.a)(Object(L.a)({},d),b):d}function v(S){return Object.keys(S).reduce(function(b,d){return(d.substr(0,5)==="data-"||d.substr(0,5)==="aria-")&&(b[d]=S[d]),b},{})}},jO9C:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){return L.pad.Iso97971={pad:function(g,T){g.concat(L.lib.WordArray.create([2147483648],1)),L.pad.ZeroPadding.pad(g,T)},unpad:function(g){L.pad.ZeroPadding.unpad(g),g.sigBytes--}},L.pad.Iso97971})},jwmR:function(j,Y,D){j.exports={flexRow:"flexRow___3nMh-",flexColumn:"flexColumn___Xpn5L",formWrap:"formWrap___3t9mN",example:"example___5c8Eu",footerWrap:"footerWrap___20Wal"}},k3GJ:function(j,Y,D){"use strict";D.d(Y,"a",function(){return kr});var L=D("rePB"),g=D("ODXe"),T=D("Ff2n"),P=D("VTBJ"),p=D("q1tI"),v=D("TSYQ"),S=D.n(v),b=D("Zm9Q"),d=D("6cGi"),l=D("KQm4"),n=D("xEkU"),c=D.n(n),u=D("t23M");function o(Me){var Ge=Object(p.useRef)(),Ye=Object(p.useRef)(!1);function Fe(){for(var Ee=arguments.length,Pe=new Array(Ee),_e=0;_e<Ee;_e++)Pe[_e]=arguments[_e];Ye.current||(c.a.cancel(Ge.current),Ge.current=c()(function(){Me.apply(void 0,Pe)}))}return Object(p.useEffect)(function(){return function(){Ye.current=!0,c.a.cancel(Ge.current)}},[]),Fe}function h(Me){var Ge=Object(p.useRef)([]),Ye=Object(p.useState)({}),Fe=Object(g.a)(Ye,2),Ee=Fe[1],Pe=Object(p.useRef)(typeof Me=="function"?Me():Me),_e=o(function(){var ze=Pe.current;Ge.current.forEach(function(Ve){ze=Ve(ze)}),Ge.current=[],Pe.current=ze,Ee({})});function je(ze){Ge.current.push(ze),_e()}return[Pe.current,je]}var m=D("4IlW");function s(Me,Ge){var Ye,Fe=Me.prefixCls,Ee=Me.id,Pe=Me.active,_e=Me.rtl,je=Me.tab,ze=je.key,Ve=je.tab,We=je.disabled,Ze=je.closeIcon,pt=Me.tabBarGutter,kt=Me.tabPosition,jt=Me.closable,Yt=Me.renderWrapper,Ir=Me.removeAriaLabel,Qr=Me.editable,$r=Me.onClick,nn=Me.onRemove,Kr=Me.onFocus,sn="".concat(Fe,"-tab");p.useEffect(function(){return nn},[]);var ln={};kt==="top"||kt==="bottom"?ln[_e?"marginLeft":"marginRight"]=pt:ln.marginBottom=pt;var xn=Qr&&jt!==!1&&!We;function hn(jr){if(We)return;$r(jr)}function jn(jr){jr.preventDefault(),jr.stopPropagation(),Qr.onEdit("remove",{key:ze,event:jr})}var pn=p.createElement("div",{key:ze,ref:Ge,className:S()(sn,(Ye={},Object(L.a)(Ye,"".concat(sn,"-with-remove"),xn),Object(L.a)(Ye,"".concat(sn,"-active"),Pe),Object(L.a)(Ye,"".concat(sn,"-disabled"),We),Ye)),style:ln,onClick:hn},p.createElement("div",{role:"tab","aria-selected":Pe,id:Ee&&"".concat(Ee,"-tab-").concat(ze),className:"".concat(sn,"-btn"),"aria-controls":Ee&&"".concat(Ee,"-panel-").concat(ze),"aria-disabled":We,tabIndex:We?null:0,onClick:function(Wr){Wr.stopPropagation(),hn(Wr)},onKeyDown:function(Wr){[m.a.SPACE,m.a.ENTER].includes(Wr.which)&&(Wr.preventDefault(),hn(Wr))},onFocus:Kr},Ve),xn&&p.createElement("button",{type:"button","aria-label":Ir||"remove",tabIndex:0,className:"".concat(sn,"-remove"),onClick:function(Wr){Wr.stopPropagation(),jn(Wr)}},Ze||Qr.removeIcon||"\xD7"));return Yt&&(pn=Yt(pn)),pn}var r=p.forwardRef(s),a={width:0,height:0,left:0,top:0};function t(Me,Ge,Ye){return Object(p.useMemo)(function(){for(var Fe,Ee=new Map,Pe=Ge.get((Fe=Me[0])===null||Fe===void 0?void 0:Fe.key)||a,_e=Pe.left+Pe.width,je=0;je<Me.length;je+=1){var ze=Me[je].key,Ve=Ge.get(ze);if(!Ve){var We;Ve=Ge.get((We=Me[je-1])===null||We===void 0?void 0:We.key)||a}var Ze=Ee.get(ze)||Object(P.a)({},Ve);Ze.right=_e-Ze.left-Ze.width,Ee.set(ze,Ze)}return Ee},[Me.map(function(Fe){return Fe.key}).join("_"),Ge,Ye])}var w={width:0,height:0,left:0,top:0,right:0};function E(Me,Ge,Ye,Fe,Ee){var Pe=Ee.tabs,_e=Ee.tabPosition,je=Ee.rtl,ze,Ve,We;["top","bottom"].includes(_e)?(ze="width",Ve=je?"right":"left",We=Math.abs(Ge.left)):(ze="height",Ve="top",We=-Ge.top);var Ze=Ge[ze],pt=Ye[ze],kt=Fe[ze],jt=Ze;return pt+kt>Ze&&(jt=Ze-kt),Object(p.useMemo)(function(){if(!Pe.length)return[0,0];for(var Yt=Pe.length,Ir=Yt,Qr=0;Qr<Yt;Qr+=1){var $r=Me.get(Pe[Qr].key)||w;if($r[Ve]+$r[ze]>We+jt){Ir=Qr-1;break}}for(var nn=0,Kr=Yt-1;Kr>=0;Kr-=1){var sn=Me.get(Pe[Kr].key)||w;if(sn[Ve]<We){nn=Kr+1;break}}return[nn,Ir]},[Me,We,jt,_e,Pe.map(function(Yt){return Yt.key}).join("_"),je])}var f=D("wx14"),k=D("1OyB"),O=D("vuIU"),C=D("JX7q"),x=D("Ji7U"),y=D("LK+K"),_=D("I8Z2"),M=D("bT9E"),I=D("2GS6"),N=D("Gytx"),G=D.n(N),H=D("U8pU"),B=/iPhone/i,K=/iPod/i,U=/iPad/i,W=/\bAndroid(?:.+)Mobile\b/i,X=/Android/i,ne=/\bAndroid(?:.+)SD4930UR\b/i,fe=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,me=/Windows Phone/i,Ae=/\bWindows(?:.+)ARM\b/i,De=/BlackBerry/i,ye=/BB10/i,Oe=/Opera Mini/i,xe=/\b(CriOS|Chrome)(?:.+)Mobile/i,ue=/Mobile(?:.+)Firefox\b/i;function le(Me,Ge){return Me.test(Ge)}function re(Me){var Ge=Me||(typeof navigator!="undefined"?navigator.userAgent:""),Ye=(Ge||"").split("[FBAN");if(typeof Ye[1]!="undefined"){var Fe=Ye,Ee=Object(g.a)(Fe,1);Ge=Ee[0]}if(Ye=Ge.split("Twitter"),typeof Ye[1]!="undefined"){var Pe=Ye,_e=Object(g.a)(Pe,1);Ge=_e[0]}var je={apple:{phone:le(B,Ge)&&!le(me,Ge),ipod:le(K,Ge),tablet:!le(B,Ge)&&le(U,Ge)&&!le(me,Ge),device:(le(B,Ge)||le(K,Ge)||le(U,Ge))&&!le(me,Ge)},amazon:{phone:le(ne,Ge),tablet:!le(ne,Ge)&&le(fe,Ge),device:le(ne,Ge)||le(fe,Ge)},android:{phone:!le(me,Ge)&&le(ne,Ge)||!le(me,Ge)&&le(W,Ge),tablet:!le(me,Ge)&&!le(ne,Ge)&&!le(W,Ge)&&(le(fe,Ge)||le(X,Ge)),device:!le(me,Ge)&&(le(ne,Ge)||le(fe,Ge)||le(W,Ge)||le(X,Ge))||le(/\bokhttp\b/i,Ge)},windows:{phone:le(me,Ge),tablet:le(Ae,Ge),device:le(me,Ge)||le(Ae,Ge)},other:{blackberry:le(De,Ge),blackberry10:le(ye,Ge),opera:le(Oe,Ge),firefox:le(ue,Ge),chrome:le(xe,Ge),device:le(De,Ge)||le(ye,Ge)||le(Oe,Ge)||le(ue,Ge)||le(xe,Ge)},any:null,phone:null,tablet:null};return je.any=je.apple.device||je.android.device||je.windows.device||je.other.device,je.phone=je.apple.phone||je.android.phone||je.windows.phone,je.tablet=je.apple.tablet||je.android.tablet||je.windows.tablet,je}var pe=Object(P.a)(Object(P.a)({},re()),{},{isMobile:re}),ee=pe;function te(){}function ce(Me,Ge,Ye){var Fe=Ge||"";return Me.key||"".concat(Fe,"item_").concat(Ye)}function q(Me){return"".concat(Me,"-menu-")}function Q(Me,Ge){var Ye=-1;p.Children.forEach(Me,function(Fe){Ye+=1,Fe&&Fe.type&&Fe.type.isMenuItemGroup?p.Children.forEach(Fe.props.children,function(Ee){Ye+=1,Ge(Ee,Ye)}):Ge(Fe,Ye)})}function V(Me,Ge,Ye){if(!Me||Ye.find)return;p.Children.forEach(Me,function(Fe){if(Fe){var Ee=Fe.type;if(!Ee||!(Ee.isSubMenu||Ee.isMenuItem||Ee.isMenuItemGroup))return;Ge.indexOf(Fe.key)!==-1?Ye.find=!0:Fe.props.children&&V(Fe.props.children,Ge,Ye)}})}var Z=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],be=function(Ge){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=Ge&&typeof Ge.getBoundingClientRect=="function"&&Ge.getBoundingClientRect().width;if(Fe){if(Ye){var Ee=getComputedStyle(Ge),Pe=Ee.marginLeft,_e=Ee.marginRight;Fe+=+Pe.replace("px","")+ +_e.replace("px","")}Fe=+Fe.toFixed(6)}return Fe||0},ge=function(Ge,Ye,Fe){Ge&&Object(H.a)(Ge.style)==="object"&&(Ge.style[Ye]=Fe)},Te=function(){return ee.any},Je=D("bdgK"),rt=D("i8i4"),nt=D.n(rt),at=D("wgJM"),ct=D("l4aY"),ht=D("m+aA"),He=D("c+Xe"),Re=D("zT1h"),tt=D("QC+M");function ft(Me,Ge,Ye){return Ye?Me[0]===Ge[0]:Me[0]===Ge[0]&&Me[1]===Ge[1]}function Qe(Me,Ge,Ye){var Fe=Me[Ge]||{};return Object(P.a)(Object(P.a)({},Fe),Ye)}function lt(Me,Ge,Ye,Fe){for(var Ee=Ye.points,Pe=Object.keys(Me),_e=0;_e<Pe.length;_e+=1){var je=Pe[_e];if(ft(Me[je].points,Ee,Fe))return"".concat(Ge,"-placement-").concat(je)}return""}var Ue=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Me=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Me)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Me==null?void 0:Me.substr(0,4)))},Le=D("MNnm");function Ie(Me,Ge){var Ye={};return Ye[Me.toLowerCase()]=Ge.toLowerCase(),Ye["Webkit".concat(Me)]="webkit".concat(Ge),Ye["Moz".concat(Me)]="moz".concat(Ge),Ye["ms".concat(Me)]="MS".concat(Ge),Ye["O".concat(Me)]="o".concat(Ge.toLowerCase()),Ye}function Ce(Me,Ge){var Ye={animationend:Ie("Animation","AnimationEnd"),transitionend:Ie("Transition","TransitionEnd")};return Me&&("AnimationEvent"in Ge||delete Ye.animationend.animation,"TransitionEvent"in Ge||delete Ye.transitionend.transition),Ye}var Se=Ce(Object(Le.a)(),typeof window!="undefined"?window:{}),ke={};if(Object(Le.a)()){var Ne=document.createElement("div");ke=Ne.style}var et={};function $e(Me){if(et[Me])return et[Me];var Ge=Se[Me];if(Ge)for(var Ye=Object.keys(Ge),Fe=Ye.length,Ee=0;Ee<Fe;Ee+=1){var Pe=Ye[Ee];if(Object.prototype.hasOwnProperty.call(Ge,Pe)&&Pe in ke)return et[Me]=Ge[Pe],et[Me]}return""}var bt=$e("animationend"),gt=$e("transitionend"),Ut=!!(bt&>),Nt=bt||"animationend",hr=gt||"transitionend";function mr(Me,Ge){if(!Me)return null;if(Object(H.a)(Me)==="object"){var Ye=Ge.replace(/-\w/g,function(Fe){return Fe[1].toUpperCase()});return Me[Ye]}return"".concat(Me,"-").concat(Ge)}var St="none",Yr="appear",Jr="enter",Hr="leave",un="none",Ar="prepare",vn="start",mn="active",Kt="end";function or(Me){var Ge=Object(p.useRef)(!1),Ye=Object(p.useState)(Me),Fe=Object(g.a)(Ye,2),Ee=Fe[0],Pe=Fe[1];function _e(je){Ge.current||Pe(je)}return Object(p.useEffect)(function(){return function(){Ge.current=!0}},[]),[Ee,_e]}var Xt=Object(Le.a)()?p.useLayoutEffect:p.useEffect,gr=Xt,Xr=function(){var Me=p.useRef(null);function Ge(){at.a.cancel(Me.current)}function Ye(Fe){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Ge();var Pe=Object(at.a)(function(){Ee<=1?Fe({isCanceled:function(){return Pe!==Me.current}}):Ye(Fe,Ee-1)});Me.current=Pe}return p.useEffect(function(){return function(){Ge()}},[]),[Ye,Ge]},kn=[Ar,vn,mn,Kt],Ln=!1,tn=!0;function ur(Me){return Me===mn||Me===Kt}var Xn=function(Me,Ge){var Ye=p.useState(un),Fe=Object(g.a)(Ye,2),Ee=Fe[0],Pe=Fe[1],_e=Xr(),je=Object(g.a)(_e,2),ze=je[0],Ve=je[1];function We(){Pe(Ar)}return gr(function(){if(Ee!==un&&Ee!==Kt){var Ze=kn.indexOf(Ee),pt=kn[Ze+1],kt=Ge(Ee);kt===Ln?Pe(pt):ze(function(jt){function Yt(){if(jt.isCanceled())return;Pe(pt)}kt===!0?Yt():Promise.resolve(kt).then(Yt)})}},[Me,Ee]),p.useEffect(function(){return function(){Ve()}},[]),[We,Ee]},hi=function(Me){var Ge=Object(p.useRef)(),Ye=Object(p.useRef)(Me);Ye.current=Me;var Fe=p.useCallback(function(_e){Ye.current(_e)},[]);function Ee(_e){_e&&(_e.removeEventListener(hr,Fe),_e.removeEventListener(Nt,Fe))}function Pe(_e){Ge.current&&Ge.current!==_e&&Ee(Ge.current),_e&&_e!==Ge.current&&(_e.addEventListener(hr,Fe),_e.addEventListener(Nt,Fe),Ge.current=_e)}return p.useEffect(function(){return function(){Ee(Ge.current)}},[]),[Pe,Ee]};function $n(Me,Ge,Ye,Fe){var Ee=Fe.motionEnter,Pe=Ee===void 0?!0:Ee,_e=Fe.motionAppear,je=_e===void 0?!0:_e,ze=Fe.motionLeave,Ve=ze===void 0?!0:ze,We=Fe.motionDeadline,Ze=Fe.motionLeaveImmediately,pt=Fe.onAppearPrepare,kt=Fe.onEnterPrepare,jt=Fe.onLeavePrepare,Yt=Fe.onAppearStart,Ir=Fe.onEnterStart,Qr=Fe.onLeaveStart,$r=Fe.onAppearActive,nn=Fe.onEnterActive,Kr=Fe.onLeaveActive,sn=Fe.onAppearEnd,ln=Fe.onEnterEnd,xn=Fe.onLeaveEnd,hn=Fe.onVisibleChanged,jn=or(),pn=Object(g.a)(jn,2),jr=pn[0],Wr=pn[1],dn=or(St),bn=Object(g.a)(dn,2),Tr=bn[0],Sn=bn[1],Yn=or(null),Rn=Object(g.a)(Yn,2),Wn=Rn[0],Dn=Rn[1],ti=Object(p.useRef)(!1),ci=Object(p.useRef)(null),Jn=Object(p.useRef)(!1),gi=Object(p.useRef)(null);function Xi(){var Fn=Ye();return Fn||gi.current}var Oi=Object(p.useRef)(!1);function di(Fn){var Pn=Xi();if(Fn&&!Fn.deadline&&Fn.target!==Pn)return;var ai;Tr===Yr&&Oi.current?ai=sn==null?void 0:sn(Pn,Fn):Tr===Jr&&Oi.current?ai=ln==null?void 0:ln(Pn,Fn):Tr===Hr&&Oi.current&&(ai=xn==null?void 0:xn(Pn,Fn)),ai!==!1&&!Jn.current&&(Sn(St),Dn(null))}var Hn=hi(di),zn=Object(g.a)(Hn,1),Qn=zn[0],Vn=p.useMemo(function(){var Fn,Pn,ai;switch(Tr){case"appear":return Fn={},Object(L.a)(Fn,Ar,pt),Object(L.a)(Fn,vn,Yt),Object(L.a)(Fn,mn,$r),Fn;case"enter":return Pn={},Object(L.a)(Pn,Ar,kt),Object(L.a)(Pn,vn,Ir),Object(L.a)(Pn,mn,nn),Pn;case"leave":return ai={},Object(L.a)(ai,Ar,jt),Object(L.a)(ai,vn,Qr),Object(L.a)(ai,mn,Kr),ai;default:return{}}},[Tr]),ii=Xn(Tr,function(Fn){if(Fn===Ar){var Pn=Vn[Ar];return Pn?Pn(Xi()):Ln}if(Mn in Vn){var ai;Dn(((ai=Vn[Mn])===null||ai===void 0?void 0:ai.call(Vn,Xi(),null))||null)}return Mn===mn&&(Qn(Xi()),We>0&&(clearTimeout(ci.current),ci.current=setTimeout(function(){di({deadline:!0})},We))),tn}),Di=Object(g.a)(ii,2),ra=Di[0],Mn=Di[1],Ui=ur(Mn);Oi.current=Ui,gr(function(){Wr(Ge);var Fn=ti.current;if(ti.current=!0,!Me)return;var Pn;!Fn&&Ge&&je&&(Pn=Yr),Fn&&Ge&&Pe&&(Pn=Jr),(Fn&&!Ge&&Ve||!Fn&&Ze&&!Ge&&Ve)&&(Pn=Hr),Pn&&(Sn(Pn),ra())},[Ge]),Object(p.useEffect)(function(){(Tr===Yr&&!je||Tr===Jr&&!Pe||Tr===Hr&&!Ve)&&Sn(St)},[je,Pe,Ve]),Object(p.useEffect)(function(){return function(){clearTimeout(ci.current),Jn.current=!0}},[]),Object(p.useEffect)(function(){jr!==void 0&&Tr===St&&(hn==null||hn(jr))},[jr,Tr]);var Bi=Wn;return Vn[Ar]&&Mn===vn&&(Bi=Object(P.a)({transition:"none"},Bi)),[Tr,Mn,Bi,jr!=null?jr:Ge]}var Zr=function(Me){Object(x.a)(Ye,Me);var Ge=Object(y.a)(Ye);function Ye(){return Object(k.a)(this,Ye),Ge.apply(this,arguments)}return Object(O.a)(Ye,[{key:"render",value:function(){return this.props.children}}]),Ye}(p.Component),Bn=Zr;function si(Me){var Ge=Me;Object(H.a)(Me)==="object"&&(Ge=Me.transitionSupport);function Ye(Ee){return!!(Ee.motionName&&Ge)}var Fe=p.forwardRef(function(Ee,Pe){var _e=Ee.visible,je=_e===void 0?!0:_e,ze=Ee.removeOnLeave,Ve=ze===void 0?!0:ze,We=Ee.forceRender,Ze=Ee.children,pt=Ee.motionName,kt=Ee.leavedClassName,jt=Ee.eventProps,Yt=Ye(Ee),Ir=Object(p.useRef)(),Qr=Object(p.useRef)();function $r(){try{return Object(ht.a)(Ir.current||Qr.current)}catch(Sn){return null}}var nn=$n(Yt,je,$r,Ee),Kr=Object(g.a)(nn,4),sn=Kr[0],ln=Kr[1],xn=Kr[2],hn=Kr[3],jn=p.useRef(hn);hn&&(jn.current=!0);var pn=Object(p.useRef)(Pe);pn.current=Pe;var jr=p.useCallback(function(Sn){Ir.current=Sn,Object(He.b)(pn.current,Sn)},[]),Wr,dn=Object(P.a)(Object(P.a)({},jt),{},{visible:je});if(!Ze)Wr=null;else if(sn===St||!Ye(Ee))hn?Wr=Ze(Object(P.a)({},dn),jr):!Ve&&jn.current?Wr=Ze(Object(P.a)(Object(P.a)({},dn),{},{className:kt}),jr):We?Wr=Ze(Object(P.a)(Object(P.a)({},dn),{},{style:{display:"none"}}),jr):Wr=null;else{var bn,Tr;ln===Ar?Tr="prepare":ur(ln)?Tr="active":ln===vn&&(Tr="start"),Wr=Ze(Object(P.a)(Object(P.a)({},dn),{},{className:S()(mr(pt,sn),(bn={},Object(L.a)(bn,mr(pt,"".concat(sn,"-").concat(Tr)),Tr),Object(L.a)(bn,pt,typeof pt=="string"),bn)),style:xn}),jr)}return p.createElement(Bn,{ref:Qr},Wr)});return Fe.displayName="CSSMotion",Fe}var li=si(Ut),wt="add",$t="keep",en="remove",Cn="removed";function _n(Me){var Ge;return Me&&Object(H.a)(Me)==="object"&&"key"in Me?Ge=Me:Ge={key:Me},Object(P.a)(Object(P.a)({},Ge),{},{key:String(Ge.key)})}function On(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Me.map(_n)}function ae(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ye=[],Fe=0,Ee=Ge.length,Pe=On(Me),_e=On(Ge);Pe.forEach(function(Ve){for(var We=!1,Ze=Fe;Ze<Ee;Ze+=1){var pt=_e[Ze];if(pt.key===Ve.key){Fe<Ze&&(Ye=Ye.concat(_e.slice(Fe,Ze).map(function(kt){return Object(P.a)(Object(P.a)({},kt),{},{status:wt})})),Fe=Ze),Ye.push(Object(P.a)(Object(P.a)({},pt),{},{status:$t})),Fe+=1,We=!0;break}}We||Ye.push(Object(P.a)(Object(P.a)({},Ve),{},{status:en}))}),Fe<Ee&&(Ye=Ye.concat(_e.slice(Fe).map(function(Ve){return Object(P.a)(Object(P.a)({},Ve),{},{status:wt})})));var je={};Ye.forEach(function(Ve){var We=Ve.key;je[We]=(je[We]||0)+1});var ze=Object.keys(je).filter(function(Ve){return je[Ve]>1});return ze.forEach(function(Ve){Ye=Ye.filter(function(We){var Ze=We.key,pt=We.status;return Ze!==Ve||pt!==en}),Ye.forEach(function(We){We.key===Ve&&(We.status=$t)})}),Ye}var z=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function $(Me){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:li,Ye=function(Fe){Object(x.a)(Pe,Fe);var Ee=Object(y.a)(Pe);function Pe(){var _e;return Object(k.a)(this,Pe),_e=Ee.apply(this,arguments),_e.state={keyEntities:[]},_e.removeKey=function(je){_e.setState(function(ze){var Ve=ze.keyEntities;return{keyEntities:Ve.map(function(We){return We.key!==je?We:Object(P.a)(Object(P.a)({},We),{},{status:Cn})})}})},_e}return Object(O.a)(Pe,[{key:"render",value:function(){var je=this,ze=this.state.keyEntities,Ve=this.props,We=Ve.component,Ze=Ve.children,pt=Ve.onVisibleChanged,kt=Object(T.a)(Ve,["component","children","onVisibleChanged"]),jt=We||p.Fragment,Yt={};return z.forEach(function(Ir){Yt[Ir]=kt[Ir],delete kt[Ir]}),delete kt.keys,p.createElement(jt,kt,ze.map(function(Ir){var Qr=Ir.status,$r=Object(T.a)(Ir,["status"]),nn=Qr===wt||Qr===$t;return p.createElement(Ge,Object(f.a)({},Yt,{key:$r.key,visible:nn,eventProps:$r,onVisibleChanged:function(sn){pt==null||pt(sn,{key:$r.key}),sn||je.removeKey($r.key)}}),Ze)}))}}],[{key:"getDerivedStateFromProps",value:function(je,ze){var Ve=je.keys,We=ze.keyEntities,Ze=On(Ve),pt=ae(We,Ze);return{keyEntities:pt.filter(function(kt){var jt=We.find(function(Yt){var Ir=Yt.key;return kt.key===Ir});return!(jt&&jt.status===Cn&&kt.status===en)})}}}]),Pe}(p.Component);return Ye.defaultProps={component:"div"},Ye}var ie=$(Ut),de=li;function se(Me){var Ge=Me.prefixCls,Ye=Me.motion,Fe=Me.animation,Ee=Me.transitionName;return Ye||(Fe?{motionName:"".concat(Ge,"-").concat(Fe)}:Ee?{motionName:Ee}:null)}function Ke(Me){var Ge=Me.prefixCls,Ye=Me.visible,Fe=Me.zIndex,Ee=Me.mask,Pe=Me.maskMotion,_e=Me.maskAnimation,je=Me.maskTransitionName;if(!Ee)return null;var ze={};return(Pe||je||_e)&&(ze=Object(P.a)({motionAppear:!0},se({motion:Pe,prefixCls:Ge,transitionName:je,animation:_e}))),p.createElement(de,Object(f.a)({},ze,{visible:Ye,removeOnLeave:!0}),function(Ve){var We=Ve.className;return p.createElement("div",{style:{zIndex:Fe},className:S()("".concat(Ge,"-mask"),We)})})}var Rt=D("9mu1"),Vt=D("o0o1"),Er=D.n(Vt),Lt=D("HaE+"),zr=["measure","align",null,"motion"],Br=function(Me,Ge){var Ye=Object(p.useState)(null),Fe=Object(g.a)(Ye,2),Ee=Fe[0],Pe=Fe[1],_e=Object(p.useRef)(),je=Object(p.useRef)(!1);function ze(Ze){je.current||Pe(Ze)}function Ve(){at.a.cancel(_e.current)}function We(Ze){Ve(),_e.current=Object(at.a)(function(){ze(function(pt){switch(Ee){case"align":return"motion";case"motion":return"stable";default:}return pt}),Ze==null||Ze()})}return Object(p.useEffect)(function(){ze("measure")},[Me]),Object(p.useEffect)(function(){switch(Ee){case"measure":Ge();break;default:}Ee&&(_e.current=Object(at.a)(Object(Lt.a)(Er.a.mark(function Ze(){var pt,kt;return Er.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:pt=zr.indexOf(Ee),kt=zr[pt+1],kt&&pt!==-1&&ze(kt);case 3:case"end":return Yt.stop()}},Ze)}))))},[Ee]),Object(p.useEffect)(function(){return function(){je.current=!0,Ve()}},[]),[Ee,We]},En=function(Me){var Ge=p.useState({width:0,height:0}),Ye=Object(g.a)(Ge,2),Fe=Ye[0],Ee=Ye[1];function Pe(je){Ee({width:je.offsetWidth,height:je.offsetHeight})}var _e=p.useMemo(function(){var je={};if(Me){var ze=Fe.width,Ve=Fe.height;Me.indexOf("height")!==-1&&Ve?je.height=Ve:Me.indexOf("minHeight")!==-1&&Ve&&(je.minHeight=Ve),Me.indexOf("width")!==-1&&ze?je.width=ze:Me.indexOf("minWidth")!==-1&&ze&&(je.minWidth=ze)}return je},[Me,Fe]);return[_e,Pe]},ui=p.forwardRef(function(Me,Ge){var Ye=Me.visible,Fe=Me.prefixCls,Ee=Me.className,Pe=Me.style,_e=Me.children,je=Me.zIndex,ze=Me.stretch,Ve=Me.destroyPopupOnHide,We=Me.forceRender,Ze=Me.align,pt=Me.point,kt=Me.getRootDomNode,jt=Me.getClassNameFromAlign,Yt=Me.onAlign,Ir=Me.onMouseEnter,Qr=Me.onMouseLeave,$r=Me.onMouseDown,nn=Me.onTouchStart,Kr=Object(p.useRef)(),sn=Object(p.useRef)(),ln=Object(p.useState)(),xn=Object(g.a)(ln,2),hn=xn[0],jn=xn[1],pn=En(ze),jr=Object(g.a)(pn,2),Wr=jr[0],dn=jr[1];function bn(){ze&&dn(kt())}var Tr=Br(Ye,bn),Sn=Object(g.a)(Tr,2),Yn=Sn[0],Rn=Sn[1],Wn=Object(p.useRef)();function Dn(){return pt||kt}function ti(){var Hn;(Hn=Kr.current)===null||Hn===void 0||Hn.forceAlign()}function ci(Hn,zn){var Qn=jt(zn);hn!==Qn&&jn(Qn),Yn==="align"&&(hn!==Qn?Promise.resolve().then(function(){ti()}):Rn(function(){var Vn;(Vn=Wn.current)===null||Vn===void 0||Vn.call(Wn)}),Yt==null||Yt(Hn,zn))}var Jn=Object(P.a)({},se(Me));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(Hn){var zn=Jn[Hn];Jn[Hn]=function(Qn,Vn){return Rn(),zn==null?void 0:zn(Qn,Vn)}});function gi(){return new Promise(function(Hn){Wn.current=Hn})}p.useEffect(function(){!Jn.motionName&&Yn==="motion"&&Rn()},[Jn.motionName,Yn]),p.useImperativeHandle(Ge,function(){return{forceAlign:ti,getElement:function(){return sn.current}}});var Xi=Object(P.a)(Object(P.a)({},Wr),{},{zIndex:je,opacity:Yn==="motion"||Yn==="stable"||!Ye?void 0:0,pointerEvents:Yn==="stable"?void 0:"none"},Pe),Oi=!0;(Ze==null?void 0:Ze.points)&&(Yn==="align"||Yn==="stable")&&(Oi=!1);var di=_e;return p.Children.count(_e)>1&&(di=p.createElement("div",{className:"".concat(Fe,"-content")},_e)),p.createElement(de,Object(f.a)({visible:Ye,ref:sn,leavedClassName:"".concat(Fe,"-hidden")},Jn,{onAppearPrepare:gi,onEnterPrepare:gi,removeOnLeave:Ve,forceRender:We}),function(Hn,zn){var Qn=Hn.className,Vn=Hn.style,ii=S()(Fe,Ee,hn,Qn);return p.createElement(Rt.a,{target:Dn(),key:"popup",ref:Kr,monitorWindowResize:!0,disabled:Oi,align:Ze,onAlign:ci},p.createElement("div",{ref:zn,className:ii,onMouseEnter:Ir,onMouseLeave:Qr,onMouseDownCapture:$r,onTouchStartCapture:nn,style:Object(P.a)(Object(P.a)({},Vn),Xi)},di))})});ui.displayName="PopupInner";var Ei=ui,In=p.forwardRef(function(Me,Ge){var Ye=Me.prefixCls,Fe=Me.visible,Ee=Me.zIndex,Pe=Me.children,_e=Me.mobile;_e=_e===void 0?{}:_e;var je=_e.popupClassName,ze=_e.popupStyle,Ve=_e.popupMotion,We=Ve===void 0?{}:Ve,Ze=_e.popupRender,pt=p.useRef();p.useImperativeHandle(Ge,function(){return{forceAlign:function(){},getElement:function(){return pt.current}}});var kt=Object(P.a)({zIndex:Ee},ze),jt=Pe;return p.Children.count(Pe)>1&&(jt=p.createElement("div",{className:"".concat(Ye,"-content")},Pe)),Ze&&(jt=Ze(jt)),p.createElement(de,Object(f.a)({visible:Fe,ref:pt,removeOnLeave:!0},We),function(Yt,Ir){var Qr=Yt.className,$r=Yt.style,nn=S()(Ye,je,Qr);return p.createElement("div",{ref:Ir,className:nn,style:Object(P.a)(Object(P.a)({},$r),kt)},jt)})});In.displayName="MobilePopupInner";var Li=In,qi=["visible","mobile"],ni=p.forwardRef(function(Me,Ge){var Ye=Me.visible,Fe=Me.mobile,Ee=Object(T.a)(Me,qi),Pe=Object(p.useState)(Ye),_e=Object(g.a)(Pe,2),je=_e[0],ze=_e[1],Ve=Object(p.useState)(!1),We=Object(g.a)(Ve,2),Ze=We[0],pt=We[1],kt=Object(P.a)(Object(P.a)({},Ee),{},{visible:je});Object(p.useEffect)(function(){ze(Ye),Ye&&Fe&&pt(Ue())},[Ye,Fe]);var jt=Ze?p.createElement(Li,Object(f.a)({},kt,{mobile:Fe,ref:Ge})):p.createElement(Ei,Object(f.a)({},kt,{ref:Ge}));return p.createElement("div",null,p.createElement(Ke,kt),jt)});ni.displayName="Popup";var Ti=ni,xi=p.createContext(null),Fi=xi;function Ci(){}function Gi(){return""}function Mi(Me){return Me?Me.ownerDocument:window.document}var oa=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function sa(Me){var Ge=function(Ye){Object(x.a)(Ee,Ye);var Fe=Object(y.a)(Ee);function Ee(Pe){var _e;Object(k.a)(this,Ee),_e=Fe.call(this,Pe),_e.popupRef=p.createRef(),_e.triggerRef=p.createRef(),_e.attachId=void 0,_e.clickOutsideHandler=void 0,_e.touchOutsideHandler=void 0,_e.contextMenuOutsideHandler1=void 0,_e.contextMenuOutsideHandler2=void 0,_e.mouseDownTimeout=void 0,_e.focusTime=void 0,_e.preClickTime=void 0,_e.preTouchTime=void 0,_e.delayTimer=void 0,_e.hasPopupMouseDown=void 0,_e.onMouseEnter=function(ze){var Ve=_e.props.mouseEnterDelay;_e.fireEvents("onMouseEnter",ze),_e.delaySetPopupVisible(!0,Ve,Ve?null:ze)},_e.onMouseMove=function(ze){_e.fireEvents("onMouseMove",ze),_e.setPoint(ze)},_e.onMouseLeave=function(ze){_e.fireEvents("onMouseLeave",ze),_e.delaySetPopupVisible(!1,_e.props.mouseLeaveDelay)},_e.onPopupMouseEnter=function(){_e.clearDelayTimer()},_e.onPopupMouseLeave=function(ze){var Ve;if(ze.relatedTarget&&!ze.relatedTarget.setTimeout&&Object(ct.a)((Ve=_e.popupRef.current)===null||Ve===void 0?void 0:Ve.getElement(),ze.relatedTarget))return;_e.delaySetPopupVisible(!1,_e.props.mouseLeaveDelay)},_e.onFocus=function(ze){_e.fireEvents("onFocus",ze),_e.clearDelayTimer(),_e.isFocusToShow()&&(_e.focusTime=Date.now(),_e.delaySetPopupVisible(!0,_e.props.focusDelay))},_e.onMouseDown=function(ze){_e.fireEvents("onMouseDown",ze),_e.preClickTime=Date.now()},_e.onTouchStart=function(ze){_e.fireEvents("onTouchStart",ze),_e.preTouchTime=Date.now()},_e.onBlur=function(ze){_e.fireEvents("onBlur",ze),_e.clearDelayTimer(),_e.isBlurToHide()&&_e.delaySetPopupVisible(!1,_e.props.blurDelay)},_e.onContextMenu=function(ze){ze.preventDefault(),_e.fireEvents("onContextMenu",ze),_e.setPopupVisible(!0,ze)},_e.onContextMenuClose=function(){_e.isContextMenuToShow()&&_e.close()},_e.onClick=function(ze){if(_e.fireEvents("onClick",ze),_e.focusTime){var Ve;if(_e.preClickTime&&_e.preTouchTime?Ve=Math.min(_e.preClickTime,_e.preTouchTime):_e.preClickTime?Ve=_e.preClickTime:_e.preTouchTime&&(Ve=_e.preTouchTime),Math.abs(Ve-_e.focusTime)<20)return;_e.focusTime=0}_e.preClickTime=0,_e.preTouchTime=0,_e.isClickToShow()&&(_e.isClickToHide()||_e.isBlurToHide())&&ze&&ze.preventDefault&&ze.preventDefault();var We=!_e.state.popupVisible;(_e.isClickToHide()&&!We||We&&_e.isClickToShow())&&_e.setPopupVisible(!_e.state.popupVisible,ze)},_e.onPopupMouseDown=function(){if(_e.hasPopupMouseDown=!0,clearTimeout(_e.mouseDownTimeout),_e.mouseDownTimeout=window.setTimeout(function(){_e.hasPopupMouseDown=!1},0),_e.context){var ze;(ze=_e.context).onPopupMouseDown.apply(ze,arguments)}},_e.onDocumentClick=function(ze){if(_e.props.mask&&!_e.props.maskClosable)return;var Ve=ze.target,We=_e.getRootDomNode(),Ze=_e.getPopupDomNode();(!Object(ct.a)(We,Ve)||_e.isContextMenuOnly())&&!Object(ct.a)(Ze,Ve)&&!_e.hasPopupMouseDown&&_e.close()},_e.getRootDomNode=function(){var ze=_e.props.getTriggerDOMNode;if(ze)return ze(_e.triggerRef.current);try{var Ve=Object(ht.a)(_e.triggerRef.current);if(Ve)return Ve}catch(We){}return nt.a.findDOMNode(Object(C.a)(_e))},_e.getPopupClassNameFromAlign=function(ze){var Ve=[],We=_e.props,Ze=We.popupPlacement,pt=We.builtinPlacements,kt=We.prefixCls,jt=We.alignPoint,Yt=We.getPopupClassNameFromAlign;return Ze&&pt&&Ve.push(lt(pt,kt,ze,jt)),Yt&&Ve.push(Yt(ze)),Ve.join(" ")},_e.getComponent=function(){var ze=_e.props,Ve=ze.prefixCls,We=ze.destroyPopupOnHide,Ze=ze.popupClassName,pt=ze.onPopupAlign,kt=ze.popupMotion,jt=ze.popupAnimation,Yt=ze.popupTransitionName,Ir=ze.popupStyle,Qr=ze.mask,$r=ze.maskAnimation,nn=ze.maskTransitionName,Kr=ze.maskMotion,sn=ze.zIndex,ln=ze.popup,xn=ze.stretch,hn=ze.alignPoint,jn=ze.mobile,pn=ze.forceRender,jr=_e.state,Wr=jr.popupVisible,dn=jr.point,bn=_e.getPopupAlign(),Tr={};return _e.isMouseEnterToShow()&&(Tr.onMouseEnter=_e.onPopupMouseEnter),_e.isMouseLeaveToHide()&&(Tr.onMouseLeave=_e.onPopupMouseLeave),Tr.onMouseDown=_e.onPopupMouseDown,Tr.onTouchStart=_e.onPopupMouseDown,p.createElement(Ti,Object(f.a)({prefixCls:Ve,destroyPopupOnHide:We,visible:Wr,point:hn&&dn,className:Ze,align:bn,onAlign:pt,animation:jt,getClassNameFromAlign:_e.getPopupClassNameFromAlign},Tr,{stretch:xn,getRootDomNode:_e.getRootDomNode,style:Ir,mask:Qr,zIndex:sn,transitionName:Yt,maskAnimation:$r,maskTransitionName:nn,maskMotion:Kr,ref:_e.popupRef,motion:kt,mobile:jn,forceRender:pn}),typeof ln=="function"?ln():ln)},_e.attachParent=function(ze){at.a.cancel(_e.attachId);var Ve=_e.props,We=Ve.getPopupContainer,Ze=Ve.getDocument,pt=_e.getRootDomNode(),kt;We?(pt||We.length===0)&&(kt=We(pt)):kt=Ze(_e.getRootDomNode()).body,kt?kt.appendChild(ze):_e.attachId=Object(at.a)(function(){_e.attachParent(ze)})},_e.getContainer=function(){var ze=_e.props.getDocument,Ve=ze(_e.getRootDomNode()).createElement("div");return Ve.style.position="absolute",Ve.style.top="0",Ve.style.left="0",Ve.style.width="100%",_e.attachParent(Ve),Ve},_e.setPoint=function(ze){var Ve=_e.props.alignPoint;if(!Ve||!ze)return;_e.setState({point:{pageX:ze.pageX,pageY:ze.pageY}})},_e.handlePortalUpdate=function(){_e.state.prevPopupVisible!==_e.state.popupVisible&&_e.props.afterPopupVisibleChange(_e.state.popupVisible)},_e.triggerContextValue={onPopupMouseDown:_e.onPopupMouseDown};var je;return"popupVisible"in Pe?je=!!Pe.popupVisible:je=!!Pe.defaultPopupVisible,_e.state={prevPopupVisible:je,popupVisible:je},oa.forEach(function(ze){_e["fire".concat(ze)]=function(Ve){_e.fireEvents(ze,Ve)}}),_e}return Object(O.a)(Ee,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var _e=this.props,je=this.state;if(je.popupVisible){var ze;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(ze=_e.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Re.a)(ze,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(ze=ze||_e.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Re.a)(ze,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(ze=ze||_e.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Re.a)(ze,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Re.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),at.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var _e;return((_e=this.popupRef.current)===null||_e===void 0?void 0:_e.getElement())||null}},{key:"getPopupAlign",value:function(){var _e=this.props,je=_e.popupPlacement,ze=_e.popupAlign,Ve=_e.builtinPlacements;return je&&Ve?Qe(Ve,je,ze):ze}},{key:"setPopupVisible",value:function(_e,je){var ze=this.props.alignPoint,Ve=this.state.popupVisible;this.clearDelayTimer(),Ve!==_e&&("popupVisible"in this.props||this.setState({popupVisible:_e,prevPopupVisible:Ve}),this.props.onPopupVisibleChange(_e)),ze&&je&&_e&&this.setPoint(je)}},{key:"delaySetPopupVisible",value:function(_e,je,ze){var Ve=this,We=je*1e3;if(this.clearDelayTimer(),We){var Ze=ze?{pageX:ze.pageX,pageY:ze.pageY}:null;this.delayTimer=window.setTimeout(function(){Ve.setPopupVisible(_e,Ze),Ve.clearDelayTimer()},We)}else this.setPopupVisible(_e,ze)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(_e){var je=this.props.children.props,ze=this.props;return je[_e]&&ze[_e]?this["fire".concat(_e)]:je[_e]||ze[_e]}},{key:"isClickToShow",value:function(){var _e=this.props,je=_e.action,ze=_e.showAction;return je.indexOf("click")!==-1||ze.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var _e=this.props.action;return _e==="contextMenu"||_e.length===1&&_e[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var _e=this.props,je=_e.action,ze=_e.showAction;return je.indexOf("contextMenu")!==-1||ze.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var _e=this.props,je=_e.action,ze=_e.hideAction;return je.indexOf("click")!==-1||ze.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var _e=this.props,je=_e.action,ze=_e.showAction;return je.indexOf("hover")!==-1||ze.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var _e=this.props,je=_e.action,ze=_e.hideAction;return je.indexOf("hover")!==-1||ze.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var _e=this.props,je=_e.action,ze=_e.showAction;return je.indexOf("focus")!==-1||ze.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var _e=this.props,je=_e.action,ze=_e.hideAction;return je.indexOf("focus")!==-1||ze.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var _e;(_e=this.popupRef.current)===null||_e===void 0||_e.forceAlign()}}},{key:"fireEvents",value:function(_e,je){var ze=this.props.children.props[_e];ze&&ze(je);var Ve=this.props[_e];Ve&&Ve(je)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var _e=this.state.popupVisible,je=this.props,ze=je.children,Ve=je.forceRender,We=je.alignPoint,Ze=je.className,pt=je.autoDestroy,kt=p.Children.only(ze),jt={key:"trigger"};this.isContextMenuToShow()?jt.onContextMenu=this.onContextMenu:jt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(jt.onClick=this.onClick,jt.onMouseDown=this.onMouseDown,jt.onTouchStart=this.onTouchStart):(jt.onClick=this.createTwoChains("onClick"),jt.onMouseDown=this.createTwoChains("onMouseDown"),jt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(jt.onMouseEnter=this.onMouseEnter,We&&(jt.onMouseMove=this.onMouseMove)):jt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?jt.onMouseLeave=this.onMouseLeave:jt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(jt.onFocus=this.onFocus,jt.onBlur=this.onBlur):(jt.onFocus=this.createTwoChains("onFocus"),jt.onBlur=this.createTwoChains("onBlur"));var Yt=S()(kt&&kt.props&&kt.props.className,Ze);Yt&&(jt.className=Yt);var Ir=Object(P.a)({},jt);Object(He.c)(kt)&&(Ir.ref=Object(He.a)(this.triggerRef,kt.ref));var Qr=p.cloneElement(kt,Ir),$r;return(_e||this.popupRef.current||Ve)&&($r=p.createElement(Me,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!_e&&pt&&($r=null),p.createElement(Fi.Provider,{value:this.triggerContextValue},Qr,$r)}}],[{key:"getDerivedStateFromProps",value:function(_e,je){var ze=_e.popupVisible,Ve={};return ze!==void 0&&je.popupVisible!==ze&&(Ve.popupVisible=ze,Ve.prevPopupVisible=je.popupVisible),Ve}}]),Ee}(p.Component);return Ge.contextType=Fi,Ge.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Gi,getDocument:Mi,onPopupVisibleChange:Ci,afterPopupVisibleChange:Ci,onPopupAlign:Ci,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Ge}var Ii=sa(tt.a),qn={adjustX:1,adjustY:1},Vi={topLeft:{points:["bl","tl"],overflow:qn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:qn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:qn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:qn,offset:[4,0]}},ta={topLeft:{points:["bl","tl"],overflow:qn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:qn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:qn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:qn,offset:[4,0]}},Tt=Vi,it=0,mt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Ct=function(Ge,Ye,Fe){var Ee=q(Ye),Pe=Ge.getState();Ge.setState({defaultActiveFirst:Object(P.a)(Object(P.a)({},Pe.defaultActiveFirst),{},Object(L.a)({},Ee,Fe))})},It=function(Me){Object(x.a)(Ye,Me);var Ge=Object(y.a)(Ye);function Ye(Fe){var Ee;Object(k.a)(this,Ye),Ee=Ge.call(this,Fe),Ee.onDestroy=function(We){Ee.props.onDestroy(We)},Ee.onKeyDown=function(We){var Ze=We.keyCode,pt=Ee.menuInstance,kt=Ee.props.store,jt=Ee.getVisible();if(Ze===m.a.ENTER)return Ee.onTitleClick(We),Ct(kt,Ee.props.eventKey,!0),!0;if(Ze===m.a.RIGHT)return jt?pt.onKeyDown(We):(Ee.triggerOpenChange(!0),Ct(kt,Ee.props.eventKey,!0)),!0;if(Ze===m.a.LEFT){var Yt;if(jt)Yt=pt.onKeyDown(We);else return;return Yt||(Ee.triggerOpenChange(!1),Yt=!0),Yt}return jt&&(Ze===m.a.UP||Ze===m.a.DOWN)?pt.onKeyDown(We):void 0},Ee.onOpenChange=function(We){Ee.props.onOpenChange(We)},Ee.onPopupVisibleChange=function(We){Ee.triggerOpenChange(We,We?"mouseenter":"mouseleave")},Ee.onMouseEnter=function(We){var Ze=Ee.props,pt=Ze.eventKey,kt=Ze.onMouseEnter,jt=Ze.store;Ct(jt,Ee.props.eventKey,!1),kt({key:pt,domEvent:We})},Ee.onMouseLeave=function(We){var Ze=Ee.props,pt=Ze.parentMenu,kt=Ze.eventKey,jt=Ze.onMouseLeave;pt.subMenuInstance=Object(C.a)(Ee),jt({key:kt,domEvent:We})},Ee.onTitleMouseEnter=function(We){var Ze=Ee.props,pt=Ze.eventKey,kt=Ze.onItemHover,jt=Ze.onTitleMouseEnter;kt({key:pt,hover:!0}),jt({key:pt,domEvent:We})},Ee.onTitleMouseLeave=function(We){var Ze=Ee.props,pt=Ze.parentMenu,kt=Ze.eventKey,jt=Ze.onItemHover,Yt=Ze.onTitleMouseLeave;pt.subMenuInstance=Object(C.a)(Ee),jt({key:kt,hover:!1}),Yt({key:kt,domEvent:We})},Ee.onTitleClick=function(We){var Ze=Object(C.a)(Ee),pt=Ze.props;if(pt.onTitleClick({key:pt.eventKey,domEvent:We}),pt.triggerSubMenuAction==="hover")return;Ee.triggerOpenChange(!Ee.getVisible(),"click"),Ct(pt.store,Ee.props.eventKey,!1)},Ee.onSubMenuClick=function(We){typeof Ee.props.onClick=="function"&&Ee.props.onClick(Ee.addKeyPath(We))},Ee.onSelect=function(We){Ee.props.onSelect(We)},Ee.onDeselect=function(We){Ee.props.onDeselect(We)},Ee.getPrefixCls=function(){return"".concat(Ee.props.rootPrefixCls,"-submenu")},Ee.getActiveClassName=function(){return"".concat(Ee.getPrefixCls(),"-active")},Ee.getDisabledClassName=function(){return"".concat(Ee.getPrefixCls(),"-disabled")},Ee.getSelectedClassName=function(){return"".concat(Ee.getPrefixCls(),"-selected")},Ee.getOpenClassName=function(){return"".concat(Ee.props.rootPrefixCls,"-submenu-open")},Ee.getVisible=function(){return Ee.state.isOpen},Ee.getMode=function(){return Ee.state.mode},Ee.saveMenuInstance=function(We){Ee.menuInstance=We},Ee.addKeyPath=function(We){return Object(P.a)(Object(P.a)({},We),{},{keyPath:(We.keyPath||[]).concat(Ee.props.eventKey)})},Ee.triggerOpenChange=function(We,Ze){var pt=Ee.props.eventKey,kt=function(){Ee.onOpenChange({key:pt,item:Object(C.a)(Ee),trigger:Ze,open:We})};Ze==="mouseenter"?Ee.mouseenterTimeout=setTimeout(function(){kt()},0):kt()},Ee.isChildrenSelected=function(){var We={find:!1};return V(Ee.props.children,Ee.props.selectedKeys,We),We.find},Ee.isInlineMode=function(){return Ee.getMode()==="inline"},Ee.adjustWidth=function(){if(!Ee.subMenuTitle||!Ee.menuInstance)return;var We=rt.findDOMNode(Ee.menuInstance);if(We.offsetWidth>=Ee.subMenuTitle.offsetWidth)return;We.style.minWidth="".concat(Ee.subMenuTitle.offsetWidth,"px")},Ee.saveSubMenuTitle=function(We){Ee.subMenuTitle=We},Ee.getBaseProps=function(){var We=Object(C.a)(Ee),Ze=We.props,pt=Ee.getMode();return{mode:pt==="horizontal"?"vertical":pt,visible:Ee.getVisible(),level:Ze.level+1,inlineIndent:Ze.inlineIndent,focusable:!1,onClick:Ee.onSubMenuClick,onSelect:Ee.onSelect,onDeselect:Ee.onDeselect,onDestroy:Ee.onDestroy,selectedKeys:Ze.selectedKeys,eventKey:"".concat(Ze.eventKey,"-menu-"),openKeys:Ze.openKeys,motion:Ze.motion,onOpenChange:Ee.onOpenChange,subMenuOpenDelay:Ze.subMenuOpenDelay,parentMenu:Object(C.a)(Ee),subMenuCloseDelay:Ze.subMenuCloseDelay,forceSubMenuRender:Ze.forceSubMenuRender,triggerSubMenuAction:Ze.triggerSubMenuAction,builtinPlacements:Ze.builtinPlacements,defaultActiveFirst:Ze.store.getState().defaultActiveFirst[q(Ze.eventKey)],multiple:Ze.multiple,prefixCls:Ze.rootPrefixCls,id:Ee.internalMenuId,manualRef:Ee.saveMenuInstance,itemIcon:Ze.itemIcon,expandIcon:Ze.expandIcon,direction:Ze.direction}},Ee.getMotion=function(We,Ze){var pt=Object(C.a)(Ee),kt=pt.haveRendered,jt=Ee.props,Yt=jt.motion,Ir=jt.rootPrefixCls,Qr=Object(P.a)(Object(P.a)({},Yt),{},{leavedClassName:"".concat(Ir,"-hidden"),removeOnLeave:!1,motionAppear:kt||!Ze||We!=="inline"});return Qr};var Pe=Fe.store,_e=Fe.eventKey,je=Pe.getState(),ze=je.defaultActiveFirst;Ee.isRootMenu=!1;var Ve=!1;return ze&&(Ve=ze[_e]),Ct(Pe,_e,Ve),Ee.state={mode:Fe.mode,isOpen:Fe.isOpen},Ee}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Ee=this,Pe=this.props,_e=Pe.mode,je=Pe.parentMenu,ze=Pe.manualRef,Ve=Pe.isOpen,We=function(){Ee.setState({mode:_e,isOpen:Ve})},Ze=Ve!==this.state.isOpen,pt=_e!==this.state.mode;if((pt||Ze)&&(at.a.cancel(this.updateStateRaf),pt?this.updateStateRaf=Object(at.a)(We):We()),ze&&ze(this),_e!=="horizontal"||!(je==null?void 0:je.isRootMenu)||!Ve)return;this.minWidthTimeout=setTimeout(function(){return Ee.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Ee=this.props,Pe=Ee.onDestroy,_e=Ee.eventKey;Pe&&Pe(_e),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),at.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(Ee,Pe){var _e=this.getBaseProps();return p.createElement(Lr,Object(f.a)({},_e,{id:this.internalMenuId,className:Ee,style:Pe}),this.props.children)}},{key:"renderChildren",value:function(){var Ee=this,Pe=this.getBaseProps(),_e=Pe.mode,je=Pe.visible,ze=Pe.forceSubMenuRender,Ve=Pe.direction,We=this.getMotion(_e,je);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||je||ze,!this.haveOpened)return p.createElement("div",null);var Ze=S()("".concat(Pe.prefixCls,"-sub"),Object(L.a)({},"".concat(Pe.prefixCls,"-rtl"),Ve==="rtl"));return this.isInlineMode()?p.createElement(de,Object(f.a)({visible:Pe.visible,forceRender:ze},We),function(pt){var kt=pt.className,jt=pt.style,Yt=S()(Ze,kt);return Ee.renderPopupMenu(Yt,jt)}):this.renderPopupMenu(Ze)}},{key:"render",value:function(){var Ee,Pe,_e,je=Object(P.a)({},this.props),ze=this.getVisible(),Ve=this.getPrefixCls(),We=this.isInlineMode(),Ze=this.getMode(),pt=S()(Ve,"".concat(Ve,"-").concat(Ze),(Ee={},Object(L.a)(Ee,je.className,!!je.className),Object(L.a)(Ee,this.getOpenClassName(),ze),Object(L.a)(Ee,this.getActiveClassName(),je.active||ze&&!We),Object(L.a)(Ee,this.getDisabledClassName(),je.disabled),Object(L.a)(Ee,this.getSelectedClassName(),this.isChildrenSelected()),Ee));this.internalMenuId||(je.eventKey?this.internalMenuId="".concat(je.eventKey,"$Menu"):(it+=1,this.internalMenuId="$__$".concat(it,"$Menu")));var kt={},jt={},Yt={};je.disabled||(kt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},jt={onClick:this.onTitleClick},Yt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Ir={},Qr=je.direction,$r=Qr==="rtl";We&&($r?Ir.paddingRight=je.inlineIndent*je.level:Ir.paddingLeft=je.inlineIndent*je.level);var nn={};this.getVisible()&&(nn={"aria-owns":this.internalMenuId});var Kr=null;Ze!=="horizontal"&&(Kr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Kr=p.createElement(this.props.expandIcon,Object(P.a)({},this.props))));var sn=p.createElement("div",Object(f.a)({ref:this.saveSubMenuTitle,style:Ir,className:"".concat(Ve,"-title"),role:"button"},Yt,jt,{"aria-expanded":ze},nn,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,Kr||p.createElement("i",{className:"".concat(Ve,"-arrow")})),ln=this.renderChildren(),xn=((Pe=je.parentMenu)===null||Pe===void 0?void 0:Pe.isRootMenu)?je.parentMenu.props.getPopupContainer:function(Dn){return Dn.parentNode},hn=mt[Ze],jn=je.popupOffset?{offset:je.popupOffset}:{},pn=S()((_e={},Object(L.a)(_e,je.popupClassName,je.popupClassName&&!We),Object(L.a)(_e,"".concat(Ve,"-rtl"),$r),_e)),jr=je.disabled,Wr=je.triggerSubMenuAction,dn=je.subMenuOpenDelay,bn=je.forceSubMenuRender,Tr=je.subMenuCloseDelay,Sn=je.builtinPlacements;Z.forEach(function(Dn){return delete je[Dn]}),delete je.onClick;var Yn=$r?Object(P.a)(Object(P.a)({},ta),Sn):Object(P.a)(Object(P.a)({},Vi),Sn);delete je.direction;var Rn=this.getBaseProps(),Wn=We?null:this.getMotion(Rn.mode,Rn.visible);return p.createElement("li",Object(f.a)({},je,kt,{className:pt,role:"menuitem"}),p.createElement(Ii,{prefixCls:Ve,popupClassName:S()("".concat(Ve,"-popup"),pn),getPopupContainer:xn,builtinPlacements:Yn,popupPlacement:hn,popupVisible:We?!1:ze,popupAlign:jn,popup:We?null:ln,action:jr||We?[]:[Wr],mouseEnterDelay:dn,mouseLeaveDelay:Tr,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:bn,popupMotion:Wn},sn),We?ln:null)}}]),Ye}(p.Component);It.defaultProps={onMouseEnter:te,onMouseLeave:te,onTitleMouseEnter:te,onTitleMouseLeave:te,onTitleClick:te,manualRef:te,mode:"vertical",title:""};var Pt=Object(_.b)(function(Me,Ge){var Ye=Me.openKeys,Fe=Me.activeKey,Ee=Me.selectedKeys,Pe=Ge.eventKey,_e=Ge.subMenuKey;return{isOpen:Ye.indexOf(Pe)>-1,active:Fe[_e]===Pe,selectedKeys:Ee}})(It);Pt.isSubMenu=!0;var Ht=Pt,Wt="menuitem-overflowed",dt=.5,At=function(Me){Object(x.a)(Ye,Me);var Ge=Object(y.a)(Ye);function Ye(){var Fe;return Object(k.a)(this,Ye),Fe=Ge.apply(this,arguments),Fe.resizeObserver=null,Fe.mutationObserver=null,Fe.originalTotalWidth=0,Fe.overflowedItems=[],Fe.menuItemSizes=[],Fe.cancelFrameId=null,Fe.state={lastVisibleIndex:void 0},Fe.childRef=p.createRef(),Fe.getMenuItemNodes=function(){var Ee=Fe.props.prefixCls,Pe=Fe.childRef.current;return Pe?[].slice.call(Pe.children).filter(function(_e){return _e.className.split(" ").indexOf("".concat(Ee,"-overflowed-submenu"))<0}):[]},Fe.getOverflowedSubMenuItem=function(Ee,Pe,_e){var je=Fe.props,ze=je.overflowedIndicator,Ve=je.level,We=je.mode,Ze=je.prefixCls,pt=je.theme;if(Ve!==1||We!=="horizontal")return null;var kt=Fe.props.children[0],jt=kt.props,Yt=jt.children,Ir=jt.title,Qr=jt.style,$r=Object(T.a)(jt,["children","title","style"]),nn=Object(P.a)({},Qr),Kr="".concat(Ee,"-overflowed-indicator"),sn="".concat(Ee,"-overflowed-indicator");Pe.length===0&&_e!==!0?nn=Object(P.a)(Object(P.a)({},nn),{},{display:"none"}):_e&&(nn=Object(P.a)(Object(P.a)({},nn),{},{visibility:"hidden",position:"absolute"}),Kr="".concat(Kr,"-placeholder"),sn="".concat(sn,"-placeholder"));var ln=pt?"".concat(Ze,"-").concat(pt):"",xn={};return Z.forEach(function(hn){$r[hn]!==void 0&&(xn[hn]=$r[hn])}),p.createElement(Ht,Object(f.a)({title:ze,className:"".concat(Ze,"-overflowed-submenu"),popupClassName:ln},xn,{key:Kr,eventKey:sn,disabled:!1,style:nn}),Pe)},Fe.setChildrenWidthAndResize=function(){if(Fe.props.mode!=="horizontal")return;var Ee=Fe.childRef.current;if(!Ee)return;var Pe=Ee.children;if(!Pe||Pe.length===0)return;var _e=Ee.children[Pe.length-1];ge(_e,"display","inline-block");var je=Fe.getMenuItemNodes(),ze=je.filter(function(Ve){return Ve.className.split(" ").indexOf(Wt)>=0});ze.forEach(function(Ve){ge(Ve,"display","inline-block")}),Fe.menuItemSizes=je.map(function(Ve){return be(Ve,!0)}),ze.forEach(function(Ve){ge(Ve,"display","none")}),Fe.overflowedIndicatorWidth=be(Ee.children[Ee.children.length-1],!0),Fe.originalTotalWidth=Fe.menuItemSizes.reduce(function(Ve,We){return Ve+We},0),Fe.handleResize(),ge(_e,"display","none")},Fe.handleResize=function(){if(Fe.props.mode!=="horizontal")return;var Ee=Fe.childRef.current;if(!Ee)return;var Pe=be(Ee);Fe.overflowedItems=[];var _e=0,je;Fe.originalTotalWidth>Pe+dt&&(je=-1,Fe.menuItemSizes.forEach(function(ze){_e+=ze,_e+Fe.overflowedIndicatorWidth<=Pe&&(je+=1)})),Fe.setState({lastVisibleIndex:je})},Fe}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){var Ee=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Pe=this.childRef.current;if(!Pe)return;this.resizeObserver=new Je.default(function(_e){_e.forEach(function(){var je=Ee.cancelFrameId;cancelAnimationFrame(je),Ee.cancelFrameId=requestAnimationFrame(Ee.setChildrenWidthAndResize)})}),[].slice.call(Pe.children).concat(Pe).forEach(function(_e){Ee.resizeObserver.observe(_e)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Ee.resizeObserver.disconnect(),[].slice.call(Pe.children).concat(Pe).forEach(function(_e){Ee.resizeObserver.observe(_e)}),Ee.setChildrenWidthAndResize()}),this.mutationObserver.observe(Pe,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(Ee){var Pe=this,_e=this.state.lastVisibleIndex;return(Ee||[]).reduce(function(je,ze,Ve){var We=ze;if(Pe.props.mode==="horizontal"){var Ze=Pe.getOverflowedSubMenuItem(ze.props.eventKey,[]);_e!==void 0&&Pe.props.className.indexOf("".concat(Pe.props.prefixCls,"-root"))!==-1&&(Ve>_e&&(We=p.cloneElement(ze,{style:{display:"none"},eventKey:"".concat(ze.props.eventKey,"-hidden"),className:"".concat(Wt)})),Ve===_e+1&&(Pe.overflowedItems=Ee.slice(_e+1).map(function(kt){return p.cloneElement(kt,{key:kt.props.eventKey,mode:"vertical-left"})}),Ze=Pe.getOverflowedSubMenuItem(ze.props.eventKey,Pe.overflowedItems)));var pt=[].concat(Object(l.a)(je),[Ze,We]);return Ve===Ee.length-1&&pt.push(Pe.getOverflowedSubMenuItem(ze.props.eventKey,[],!0)),pt}return[].concat(Object(l.a)(je),[We])},[])}},{key:"render",value:function(){var Ee=this.props,Pe=Ee.visible,_e=Ee.prefixCls,je=Ee.overflowedIndicator,ze=Ee.mode,Ve=Ee.level,We=Ee.tag,Ze=Ee.children,pt=Ee.theme,kt=Object(T.a)(Ee,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),jt=We;return p.createElement(jt,Object(f.a)({ref:this.childRef},kt),this.renderChildren(Ze))}}]),Ye}(p.Component);At.defaultProps={tag:"div",className:""};var Dt=At;function yr(Me){return Me.length?Me.every(function(Ge){return!!Ge.props.disabled}):!0}function tr(Me,Ge,Ye){var Fe=Me.getState();Me.setState({activeKey:Object(P.a)(Object(P.a)({},Fe.activeKey),{},Object(L.a)({},Ge,Ye))})}function qt(Me){return Me.eventKey||"0-menu-"}function Gt(Me,Ge){var Ye=Ge,Fe=Me.children,Ee=Me.eventKey;if(Ye){var Pe;if(Q(Fe,function(_e,je){_e&&_e.props&&!_e.props.disabled&&Ye===ce(_e,Ee,je)&&(Pe=!0)}),Pe)return Ye}return Ye=null,Me.defaultActiveFirst&&Q(Fe,function(_e,je){!Ye&&_e&&!_e.props.disabled&&(Ye=ce(_e,Ee,je))}),Ye}function nr(Me){if(!Me)return;var Ge=this.instanceArray.indexOf(Me);Ge!==-1?this.instanceArray[Ge]=Me:this.instanceArray.push(Me)}var cr=function(Me){Object(x.a)(Ye,Me);var Ge=Object(y.a)(Ye);function Ye(Fe){var Ee;return Object(k.a)(this,Ye),Ee=Ge.call(this,Fe),Ee.onKeyDown=function(Pe,_e){var je=Pe.keyCode,ze;if(Ee.getFlatInstanceArray().forEach(function(We){We&&We.props.active&&We.onKeyDown&&(ze=We.onKeyDown(Pe))}),ze)return 1;var Ve=null;return(je===m.a.UP||je===m.a.DOWN)&&(Ve=Ee.step(je===m.a.UP?-1:1)),Ve?(Pe.preventDefault(),tr(Ee.props.store,qt(Ee.props),Ve.props.eventKey),typeof _e=="function"&&_e(Ve),1):void 0},Ee.onItemHover=function(Pe){var _e=Pe.key,je=Pe.hover;tr(Ee.props.store,qt(Ee.props),je?_e:null)},Ee.onDeselect=function(Pe){Ee.props.onDeselect(Pe)},Ee.onSelect=function(Pe){Ee.props.onSelect(Pe)},Ee.onClick=function(Pe){Ee.props.onClick(Pe)},Ee.onOpenChange=function(Pe){Ee.props.onOpenChange(Pe)},Ee.onDestroy=function(Pe){Ee.props.onDestroy(Pe)},Ee.getFlatInstanceArray=function(){return Ee.instanceArray},Ee.step=function(Pe){var _e=Ee.getFlatInstanceArray(),je=Ee.props.store.getState().activeKey[qt(Ee.props)],ze=_e.length;if(!ze)return null;Pe<0&&(_e=_e.concat().reverse());var Ve=-1;if(_e.every(function(kt,jt){return kt&&kt.props.eventKey===je?(Ve=jt,!1):!0}),!Ee.props.defaultActiveFirst&&Ve!==-1&&yr(_e.slice(Ve,ze-1)))return;var We=(Ve+1)%ze,Ze=We;do{var pt=_e[Ze];if(!pt||pt.props.disabled)Ze=(Ze+1)%ze;else return pt}while(Ze!==We);return null},Ee.renderCommonMenuItem=function(Pe,_e,je){var ze=Ee.props.store.getState(),Ve=Object(C.a)(Ee),We=Ve.props,Ze=ce(Pe,We.eventKey,_e),pt=Pe.props;if(!pt||typeof Pe.type=="string")return Pe;var kt=Ze===ze.activeKey,jt=Object(P.a)(Object(P.a)({mode:pt.mode||We.mode,level:We.level,inlineIndent:We.inlineIndent,renderMenuItem:Ee.renderMenuItem,rootPrefixCls:We.prefixCls,index:_e,parentMenu:We.parentMenu,manualRef:pt.disabled?void 0:Object(I.a)(Pe.ref,nr.bind(Object(C.a)(Ee))),eventKey:Ze,active:!pt.disabled&&kt,multiple:We.multiple,onClick:function(Ir){(pt.onClick||te)(Ir),Ee.onClick(Ir)},onItemHover:Ee.onItemHover,motion:We.motion,subMenuOpenDelay:We.subMenuOpenDelay,subMenuCloseDelay:We.subMenuCloseDelay,forceSubMenuRender:We.forceSubMenuRender,onOpenChange:Ee.onOpenChange,onDeselect:Ee.onDeselect,onSelect:Ee.onSelect,builtinPlacements:We.builtinPlacements,itemIcon:pt.itemIcon||Ee.props.itemIcon,expandIcon:pt.expandIcon||Ee.props.expandIcon},je),{},{direction:We.direction});return(We.mode==="inline"||Te())&&(jt.triggerSubMenuAction="click"),p.cloneElement(Pe,Object(P.a)(Object(P.a)({},jt),{},{key:Ze||_e}))},Ee.renderMenuItem=function(Pe,_e,je){if(!Pe)return null;var ze=Ee.props.store.getState(),Ve={openKeys:ze.openKeys,selectedKeys:ze.selectedKeys,triggerSubMenuAction:Ee.props.triggerSubMenuAction,subMenuKey:je};return Ee.renderCommonMenuItem(Pe,_e,Ve)},Fe.store.setState({activeKey:Object(P.a)(Object(P.a)({},Fe.store.getState().activeKey),{},Object(L.a)({},Fe.eventKey,Gt(Fe,Fe.activeKey)))}),Ee.instanceArray=[],Ee}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Ee){return this.props.visible||Ee.visible||this.props.className!==Ee.className||!G()(this.props.style,Ee.style)}},{key:"componentDidUpdate",value:function(Ee){var Pe=this.props,_e="activeKey"in Pe?Pe.activeKey:Pe.store.getState().activeKey[qt(Pe)],je=Gt(Pe,_e);if(je!==_e)tr(Pe.store,qt(Pe),je);else if("activeKey"in Ee){var ze=Gt(Ee,Ee.activeKey);je!==ze&&tr(Pe.store,qt(Pe),je)}}},{key:"render",value:function(){var Ee=this,Pe=Object(f.a)({},this.props);this.instanceArray=[];var _e=S()(Pe.prefixCls,Pe.className,"".concat(Pe.prefixCls,"-").concat(Pe.mode)),je={className:_e,role:Pe.role||"menu"};Pe.id&&(je.id=Pe.id),Pe.focusable&&(je.tabIndex=0,je.onKeyDown=this.onKeyDown);var ze=Pe.prefixCls,Ve=Pe.eventKey,We=Pe.visible,Ze=Pe.level,pt=Pe.mode,kt=Pe.overflowedIndicator,jt=Pe.theme;return Z.forEach(function(Yt){return delete Pe[Yt]}),delete Pe.onClick,p.createElement(Dt,Object(f.a)({},Pe,{prefixCls:ze,mode:pt,tag:"ul",level:Ze,theme:jt,visible:We,overflowedIndicator:kt},je),Object(b.a)(Pe.children).map(function(Yt,Ir){return Ee.renderMenuItem(Yt,Ir,Ve||"0-menu-")}))}}]),Ye}(p.Component);cr.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:te};var st=Object(_.b)()(cr),Lr=st,Fr=D("Kwbf");function Cr(Me,Ge,Ye){var Fe=Me.prefixCls,Ee=Me.motion,Pe=Me.defaultMotions,_e=Pe===void 0?{}:Pe,je=Me.openAnimation,ze=Me.openTransitionName,Ve=Ge.switchingModeFromInline;if(Ee)return Ee;if(Object(H.a)(je)==="object"&&je)Object(Fr.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof je=="string")return{motionName:"".concat(Fe,"-open-").concat(je)};if(ze)return{motionName:ze};var We=_e[Ye];return We||(Ve?null:_e.other)}var rr=function(Me){Object(x.a)(Ye,Me);var Ge=Object(y.a)(Ye);function Ye(Fe){var Ee;Object(k.a)(this,Ye),Ee=Ge.call(this,Fe),Ee.onSelect=function(je){var ze=Object(C.a)(Ee),Ve=ze.props;if(Ve.selectable){var We=Ee.store.getState(),Ze=We.selectedKeys,pt=je.key;Ve.multiple?Ze=Ze.concat([pt]):Ze=[pt],"selectedKeys"in Ve||Ee.store.setState({selectedKeys:Ze}),Ve.onSelect(Object(P.a)(Object(P.a)({},je),{},{selectedKeys:Ze}))}},Ee.onClick=function(je){var ze=Ee.getRealMenuMode(),Ve=Object(C.a)(Ee),We=Ve.store,Ze=Ve.props.onOpenChange;ze!=="inline"&&!("openKeys"in Ee.props)&&(We.setState({openKeys:[]}),Ze([])),Ee.props.onClick(je)},Ee.onKeyDown=function(je,ze){Ee.innerMenu.getWrappedInstance().onKeyDown(je,ze)},Ee.onOpenChange=function(je){var ze=Object(C.a)(Ee),Ve=ze.props,We=Ee.store.getState().openKeys.concat(),Ze=!1,pt=function(jt){var Yt=!1;if(jt.open)Yt=We.indexOf(jt.key)===-1,Yt&&We.push(jt.key);else{var Ir=We.indexOf(jt.key);Yt=Ir!==-1,Yt&&We.splice(Ir,1)}Ze=Ze||Yt};Array.isArray(je)?je.forEach(pt):pt(je),Ze&&("openKeys"in Ee.props||Ee.store.setState({openKeys:We}),Ve.onOpenChange(We))},Ee.onDeselect=function(je){var ze=Object(C.a)(Ee),Ve=ze.props;if(Ve.selectable){var We=Ee.store.getState().selectedKeys.concat(),Ze=je.key,pt=We.indexOf(Ze);pt!==-1&&We.splice(pt,1),"selectedKeys"in Ve||Ee.store.setState({selectedKeys:We}),Ve.onDeselect(Object(P.a)(Object(P.a)({},je),{},{selectedKeys:We}))}},Ee.onMouseEnter=function(je){Ee.restoreModeVerticalFromInline();var ze=Ee.props.onMouseEnter;ze&&ze(je)},Ee.onTransitionEnd=function(je){var ze=je.propertyName==="width"&&je.target===je.currentTarget,Ve=je.target.className,We=Object.prototype.toString.call(Ve)==="[object SVGAnimatedString]"?Ve.animVal:Ve,Ze=je.propertyName==="font-size"&&We.indexOf("anticon")>=0;(ze||Ze)&&Ee.restoreModeVerticalFromInline()},Ee.setInnerMenu=function(je){Ee.innerMenu=je},Ee.isRootMenu=!0;var Pe=Fe.defaultSelectedKeys,_e=Fe.defaultOpenKeys;return"selectedKeys"in Fe&&(Pe=Fe.selectedKeys||[]),"openKeys"in Fe&&(_e=Fe.openKeys||[]),Ee.store=Object(_.c)({selectedKeys:Pe,openKeys:_e,activeKey:{"0-menu-":Gt(Fe,Fe.activeKey)}}),Ee.state={switchingModeFromInline:!1,prevProps:Fe,inlineOpenKeys:[],store:Ee.store},Ee}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Ee){var Pe=this.props,_e=Pe.siderCollapsed,je=Pe.inlineCollapsed,ze=Pe.onOpenChange;(!Ee.inlineCollapsed&&je||!Ee.siderCollapsed&&_e)&&ze([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var Ee=this.props.collapsedWidth,Pe=this.store,_e=this.prevOpenKeys,je=this.getInlineCollapsed()&&(Ee===0||Ee==="0"||Ee==="0px");je?(this.prevOpenKeys=Pe.getState().openKeys.concat(),this.store.setState({openKeys:[]})):_e&&(this.store.setState({openKeys:_e}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Ee=this.props.mode,Pe=this.state.switchingModeFromInline,_e=this.getInlineCollapsed();return Pe&&_e?"inline":_e?"vertical":Ee}},{key:"getInlineCollapsed",value:function(){var Ee=this.props,Pe=Ee.inlineCollapsed,_e=Ee.siderCollapsed;return _e!==void 0?_e:Pe}},{key:"restoreModeVerticalFromInline",value:function(){var Ee=this.state.switchingModeFromInline;Ee&&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 Ee=Object(P.a)({},Object(M.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Pe=this.getRealMenuMode();return Ee.className+=" ".concat(Ee.prefixCls,"-root"),Ee.direction==="rtl"&&(Ee.className+=" ".concat(Ee.prefixCls,"-rtl")),Ee=Object(P.a)(Object(P.a)({},Ee),{},{mode:Pe,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Cr(this.props,this.state,Pe)}),delete Ee.openAnimation,delete Ee.openTransitionName,p.createElement(_.a,{store:this.store},p.createElement(Lr,Object(f.a)({},Ee,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(Ee,Pe){var _e=Pe.prevProps,je=Pe.store,ze=je.getState(),Ve={},We={prevProps:Ee};return _e.mode==="inline"&&Ee.mode!=="inline"&&(We.switchingModeFromInline=!0),"openKeys"in Ee?Ve.openKeys=Ee.openKeys||[]:((Ee.inlineCollapsed&&!_e.inlineCollapsed||Ee.siderCollapsed&&!_e.siderCollapsed)&&(We.switchingModeFromInline=!0,We.inlineOpenKeys=ze.openKeys,Ve.openKeys=[]),(!Ee.inlineCollapsed&&_e.inlineCollapsed||!Ee.siderCollapsed&&_e.siderCollapsed)&&(Ve.openKeys=Pe.inlineOpenKeys,We.inlineOpenKeys=[])),Object.keys(Ve).length&&je.setState(Ve),We}}]),Ye}(p.Component);rr.defaultProps={selectable:!0,onClick:te,onSelect:te,onOpenChange:te,onDeselect:te,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:p.createElement("span",null,"\xB7\xB7\xB7")};var Et=rr,_t=function(Me){Object(x.a)(Ye,Me);var Ge=Object(y.a)(Ye);function Ye(){var Fe;return Object(k.a)(this,Ye),Fe=Ge.apply(this,arguments),Fe.onKeyDown=function(Ee){var Pe=Ee.keyCode;return Pe===m.a.ENTER?(Fe.onClick(Ee),!0):void 0},Fe.onMouseLeave=function(Ee){var Pe=Fe.props,_e=Pe.eventKey,je=Pe.onItemHover,ze=Pe.onMouseLeave;je({key:_e,hover:!1}),ze({key:_e,domEvent:Ee})},Fe.onMouseEnter=function(Ee){var Pe=Fe.props,_e=Pe.eventKey,je=Pe.onItemHover,ze=Pe.onMouseEnter;je({key:_e,hover:!0}),ze({key:_e,domEvent:Ee})},Fe.onClick=function(Ee){var Pe=Fe.props,_e=Pe.eventKey,je=Pe.multiple,ze=Pe.onClick,Ve=Pe.onSelect,We=Pe.onDeselect,Ze=Pe.isSelected,pt={key:_e,keyPath:[_e],item:Object(C.a)(Fe),domEvent:Ee};ze(pt),je?Ze?We(pt):Ve(pt):Ze||Ve(pt)},Fe.saveNode=function(Ee){Fe.node=Ee},Fe}return Object(O.a)(Ye,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Ee=this.props;Ee.onDestroy&&Ee.onDestroy(Ee.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 Ee,Pe=Object(P.a)({},this.props),_e=S()(this.getPrefixCls(),Pe.className,(Ee={},Object(L.a)(Ee,this.getActiveClassName(),!Pe.disabled&&Pe.active),Object(L.a)(Ee,this.getSelectedClassName(),Pe.isSelected),Object(L.a)(Ee,this.getDisabledClassName(),Pe.disabled),Ee)),je=Object(P.a)(Object(P.a)({},Pe.attribute),{},{title:typeof Pe.title=="string"?Pe.title:void 0,className:_e,role:Pe.role||"menuitem","aria-disabled":Pe.disabled});Pe.role==="option"?je=Object(P.a)(Object(P.a)({},je),{},{role:"option","aria-selected":Pe.isSelected}):(Pe.role===null||Pe.role==="none")&&(je.role="none");var ze={onClick:Pe.disabled?null:this.onClick,onMouseLeave:Pe.disabled?null:this.onMouseLeave,onMouseEnter:Pe.disabled?null:this.onMouseEnter},Ve=Object(P.a)({},Pe.style);Pe.mode==="inline"&&(Pe.direction==="rtl"?Ve.paddingRight=Pe.inlineIndent*Pe.level:Ve.paddingLeft=Pe.inlineIndent*Pe.level),Z.forEach(function(Ze){return delete Pe[Ze]}),delete Pe.direction;var We=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(We=p.createElement(this.props.itemIcon,this.props)),p.createElement("li",Object(f.a)({},Object(M.a)(Pe,["onClick","onMouseEnter","onMouseLeave","onSelect"]),je,ze,{style:Ve,ref:this.saveNode}),Pe.children,We)}}]),Ye}(p.Component);_t.isMenuItem=!0,_t.defaultProps={onSelect:te,onMouseEnter:te,onMouseLeave:te,manualRef:te};var xt=Object(_.b)(function(Me,Ge){var Ye=Me.activeKey,Fe=Me.selectedKeys,Ee=Ge.eventKey,Pe=Ge.subMenuKey;return{active:Ye[Pe]===Ee,isSelected:Array.isArray(Fe)?Fe.indexOf(Ee)!==-1:Fe===Ee}})(_t),Jt=xt,pr=function(Me){Object(x.a)(Ye,Me);var Ge=Object(y.a)(Ye);function Ye(){var Fe;return Object(k.a)(this,Ye),Fe=Ge.apply(this,arguments),Fe.renderInnerMenuItem=function(Ee){var Pe=Fe.props,_e=Pe.renderMenuItem,je=Pe.index;return _e(Ee,je,Fe.props.subMenuKey)},Fe}return Object(O.a)(Ye,[{key:"render",value:function(){var Ee=Object(f.a)({},this.props),Pe=Ee.className,_e=Pe===void 0?"":Pe,je=Ee.rootPrefixCls,ze="".concat(je,"-item-group-title"),Ve="".concat(je,"-item-group-list"),We=Ee.title,Ze=Ee.children;return Z.forEach(function(pt){return delete Ee[pt]}),delete Ee.direction,p.createElement("li",Object(f.a)({},Ee,{onClick:function(kt){return kt.stopPropagation()},className:"".concat(_e," ").concat(je,"-item-group")}),p.createElement("div",{className:ze,title:typeof We=="string"?We:void 0},We),p.createElement("ul",{className:Ve},p.Children.map(Ze,this.renderInnerMenuItem)))}}]),Ye}(p.Component);pr.isMenuItemGroup=!0,pr.defaultProps={disabled:!0};var dr=pr,fr=function(Ge){var Ye=Ge.className,Fe=Ge.rootPrefixCls,Ee=Ge.style;return p.createElement("li",{className:"".concat(Ye," ").concat(Fe,"-item-divider"),style:Ee})};fr.defaultProps={disabled:!0,className:"",style:{}};var Dr=fr,an=Et,qe=D("eDIo");function sr(Me,Ge){var Ye=Me.prefixCls,Fe=Me.editable,Ee=Me.locale,Pe=Me.style;return!Fe||Fe.showAdd===!1?null:p.createElement("button",{ref:Ge,type:"button",className:"".concat(Ye,"-nav-add"),style:Pe,"aria-label":(Ee==null?void 0:Ee.addAriaLabel)||"Add tab",onClick:function(je){Fe.onEdit("add",{event:je})}},Fe.addIcon||"+")}var Nr=p.forwardRef(sr);function rn(Me,Ge){var Ye=Me.prefixCls,Fe=Me.id,Ee=Me.tabs,Pe=Me.locale,_e=Me.mobile,je=Me.moreIcon,ze=je===void 0?"More":je,Ve=Me.moreTransitionName,We=Me.style,Ze=Me.className,pt=Me.editable,kt=Me.tabBarGutter,jt=Me.rtl,Yt=Me.onTabClick,Ir=Object(p.useState)(!1),Qr=Object(g.a)(Ir,2),$r=Qr[0],nn=Qr[1],Kr=Object(p.useState)(null),sn=Object(g.a)(Kr,2),ln=sn[0],xn=sn[1],hn="".concat(Fe,"-more-popup"),jn="".concat(Ye,"-dropdown"),pn=ln!==null?"".concat(hn,"-").concat(ln):null,jr=Pe==null?void 0:Pe.dropdownAriaLabel,Wr=p.createElement(an,{onClick:function(Wn){var Dn=Wn.key,ti=Wn.domEvent;Yt(Dn,ti),nn(!1)},id:hn,tabIndex:-1,role:"listbox","aria-activedescendant":pn,selectedKeys:[ln],"aria-label":jr!==void 0?jr:"expanded dropdown"},Ee.map(function(Rn){return p.createElement(Jt,{key:Rn.key,id:"".concat(hn,"-").concat(Rn.key),role:"option","aria-controls":Fe&&"".concat(Fe,"-panel-").concat(Rn.key),disabled:Rn.disabled},Rn.tab)}));function dn(Rn){for(var Wn=Ee.filter(function(gi){return!gi.disabled}),Dn=Wn.findIndex(function(gi){return gi.key===ln})||0,ti=Wn.length,ci=0;ci<ti;ci+=1){Dn=(Dn+Rn+ti)%ti;var Jn=Wn[Dn];if(!Jn.disabled){xn(Jn.key);return}}}function bn(Rn){var Wn=Rn.which;if(!$r){[m.a.DOWN,m.a.SPACE,m.a.ENTER].includes(Wn)&&(nn(!0),Rn.preventDefault());return}switch(Wn){case m.a.UP:dn(-1),Rn.preventDefault();break;case m.a.DOWN:dn(1),Rn.preventDefault();break;case m.a.ESC:nn(!1);break;case m.a.SPACE:case m.a.ENTER:ln!==null&&Yt(ln,Rn);break}}Object(p.useEffect)(function(){var Rn=document.getElementById(pn);Rn&&Rn.scrollIntoView&&Rn.scrollIntoView(!1)},[ln]),Object(p.useEffect)(function(){$r||xn(null)},[$r]);var Tr=Object(L.a)({},jt?"marginLeft":"marginRight",kt);Ee.length||(Tr.visibility="hidden",Tr.order=1);var Sn=S()(Object(L.a)({},"".concat(jn,"-rtl"),jt)),Yn=_e?null:p.createElement(qe.a,{prefixCls:jn,overlay:Wr,trigger:["hover"],visible:$r,transitionName:Ve,onVisibleChange:nn,overlayClassName:Sn,mouseEnterDelay:.1,mouseLeaveDelay:.1},p.createElement("button",{type:"button",className:"".concat(Ye,"-nav-more"),style:Tr,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":hn,id:"".concat(Fe,"-more"),"aria-expanded":$r,onKeyDown:bn},ze));return p.createElement("div",{className:S()("".concat(Ye,"-nav-operations"),Ze),style:We,ref:Ge},Yn,p.createElement(Nr,{prefixCls:Ye,locale:Pe,editable:pt}))}var xr=p.forwardRef(rn),br=Object(p.createContext)(null),Pr=.1,Ft=.01,Zt=20,wr=Math.pow(.995,Zt);function er(){var Me=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Me)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Me.substr(0,4)))}function vt(Me,Ge){var Ye=Object(p.useState)(),Fe=Object(g.a)(Ye,2),Ee=Fe[0],Pe=Fe[1],_e=Object(p.useState)(0),je=Object(g.a)(_e,2),ze=je[0],Ve=je[1],We=Object(p.useState)(0),Ze=Object(g.a)(We,2),pt=Ze[0],kt=Ze[1],jt=Object(p.useState)(),Yt=Object(g.a)(jt,2),Ir=Yt[0],Qr=Yt[1],$r=Object(p.useRef)();function nn(jr){var Wr=jr.touches[0],dn=Wr.screenX,bn=Wr.screenY;Pe({x:dn,y:bn}),window.clearInterval($r.current)}function Kr(jr){if(!Ee)return;jr.preventDefault();var Wr=jr.touches[0],dn=Wr.screenX,bn=Wr.screenY;Pe({x:dn,y:bn});var Tr=dn-Ee.x,Sn=bn-Ee.y;Ge(Tr,Sn);var Yn=Date.now();Ve(Yn),kt(Yn-ze),Qr({x:Tr,y:Sn})}function sn(){if(!Ee)return;if(Pe(null),Qr(null),Ir){var jr=Ir.x/pt,Wr=Ir.y/pt,dn=Math.abs(jr),bn=Math.abs(Wr);if(Math.max(dn,bn)<Pr)return;var Tr=jr,Sn=Wr;$r.current=window.setInterval(function(){if(Math.abs(Tr)<Ft&&Math.abs(Sn)<Ft){window.clearInterval($r.current);return}Tr*=wr,Sn*=wr,Ge(Tr*Zt,Sn*Zt)},Zt)}}var ln=Object(p.useRef)(0),xn=Object(p.useRef)(!1),hn=Object(p.useRef)();function jn(jr){var Wr=jr.deltaX,dn=jr.deltaY,bn=0,Tr=Math.abs(Wr),Sn=Math.abs(dn);Tr===Sn?bn=hn.current==="x"?Wr:dn:Tr>Sn?(bn=Wr,hn.current="x"):(bn=dn,hn.current="y");var Yn=Date.now();Yn-ln.current>100&&(xn.current=!1),(Ge(-bn,-bn)||xn.current)&&(jr.preventDefault(),xn.current=!0),ln.current=Yn}var pn=Object(p.useRef)(null);pn.current={onTouchStart:nn,onTouchMove:Kr,onTouchEnd:sn,onWheel:jn},p.useEffect(function(){function jr(Tr){pn.current.onTouchStart(Tr)}function Wr(Tr){pn.current.onTouchMove(Tr)}function dn(Tr){pn.current.onTouchEnd(Tr)}function bn(Tr){pn.current.onWheel(Tr)}return document.addEventListener("touchmove",Wr,{passive:!1}),document.addEventListener("touchend",dn,{passive:!1}),Me.current.addEventListener("touchstart",jr,{passive:!1}),Me.current.addEventListener("wheel",bn),function(){document.removeEventListener("touchmove",Wr),document.removeEventListener("touchend",dn)}},[])}function yt(){var Me=Object(p.useRef)(new Map);function Ge(Fe){return Me.current.has(Fe)||Me.current.set(Fe,p.createRef()),Me.current.get(Fe)}function Ye(Fe){Me.current.delete(Fe)}return[Ge,Ye]}function zt(Me,Ge){var Ye=p.useRef(Me),Fe=p.useState({}),Ee=Object(g.a)(Fe,2),Pe=Ee[1];function _e(je){var ze=typeof je=="function"?je(Ye.current):je;ze!==Ye.current&&Ge(ze,Ye.current),Ye.current=ze,Pe({})}return[Ye.current,_e]}var Mt=function(Ge){var Ye=Ge.position,Fe=Ge.prefixCls,Ee=Ge.extra;if(!Ee)return null;var Pe,_e=Ee;return Ye==="right"&&(Pe=_e.right||!_e.left&&_e||null),Ye==="left"&&(Pe=_e.left||null),Pe?p.createElement("div",{className:"".concat(Fe,"-extra-content")},Pe):null};function Mr(Me,Ge){var Ye,Fe=p.useContext(br),Ee=Fe.prefixCls,Pe=Fe.tabs,_e=Me.className,je=Me.style,ze=Me.id,Ve=Me.animated,We=Me.activeKey,Ze=Me.rtl,pt=Me.extra,kt=Me.editable,jt=Me.locale,Yt=Me.tabPosition,Ir=Me.tabBarGutter,Qr=Me.children,$r=Me.onTabClick,nn=Me.onTabScroll,Kr=Object(p.useRef)(),sn=Object(p.useRef)(),ln=Object(p.useRef)(),xn=Object(p.useRef)(),hn=yt(),jn=Object(g.a)(hn,2),pn=jn[0],jr=jn[1],Wr=Yt==="top"||Yt==="bottom",dn=zt(0,function(Un,An){Wr&&nn&&nn({direction:Un>An?"left":"right"})}),bn=Object(g.a)(dn,2),Tr=bn[0],Sn=bn[1],Yn=zt(0,function(Un,An){!Wr&&nn&&nn({direction:Un>An?"top":"bottom"})}),Rn=Object(g.a)(Yn,2),Wn=Rn[0],Dn=Rn[1],ti=Object(p.useState)(0),ci=Object(g.a)(ti,2),Jn=ci[0],gi=ci[1],Xi=Object(p.useState)(0),Oi=Object(g.a)(Xi,2),di=Oi[0],Hn=Oi[1],zn=Object(p.useState)(0),Qn=Object(g.a)(zn,2),Vn=Qn[0],ii=Qn[1],Di=Object(p.useState)(0),ra=Object(g.a)(Di,2),Mn=ra[0],Ui=ra[1],Bi=Object(p.useState)(null),Fn=Object(g.a)(Bi,2),Pn=Fn[0],ai=Fn[1],Ba=Object(p.useState)(null),wa=Object(g.a)(Ba,2),la=wa[0],ua=wa[1],ka=Object(p.useState)(0),_a=Object(g.a)(ka,2),La=_a[0],Wa=_a[1],Xa=Object(p.useState)(0),Ma=Object(g.a)(Xa,2),ca=Ma[0],Sa=Ma[1],ba=h(new Map),da=Object(g.a)(ba,2),co=da[0],Ea=da[1],Ta=t(Pe,co,Jn),fa="".concat(Ee,"-nav-operations-hidden"),ha=0,$i=0;Wr?Ze?(ha=0,$i=Math.max(0,Jn-Pn)):(ha=Math.min(0,Pn-Jn),$i=0):(ha=Math.min(0,la-di),$i=0);function na(Un){return Un<ha?[ha,!1]:Un>$i?[$i,!1]:[Un,!0]}var Sr=Object(p.useRef)(),Or=Object(p.useState)(),lr=Object(g.a)(Or,2),Tn=lr[0],vr=lr[1];function pa(){vr(Date.now())}function $a(){window.clearTimeout(Sr.current)}vt(Kr,function(Un,An){var wi=!1;function Hi(Ia,ma){Ia(function(Ka){var xa=na(Ka+ma),_i=Object(g.a)(xa,2),Qa=_i[0],ho=_i[1];return wi=ho,Qa})}if(Wr){if(Pn>=Jn)return wi;Hi(Sn,Un)}else{if(la>=di)return wi;Hi(Dn,An)}return $a(),pa(),wi}),Object(p.useEffect)(function(){return $a(),Tn&&(Sr.current=window.setTimeout(function(){vr(0)},100)),$a},[Tn]);function Kn(){var Un=arguments.length>0&&arguments[0]!==void 0?arguments[0]:We,An=Ta.get(Un);if(!An)return;if(Wr){var wi=Tr;Ze?An.right<Tr?wi=An.right:An.right+An.width>Tr+Pn&&(wi=An.right+An.width-Pn):An.left<-Tr?wi=-An.left:An.left+An.width>-Tr+Pn&&(wi=-(An.left+An.width-Pn)),Dn(0),Sn(na(wi)[0])}else{var Hi=Wn;An.top<-Wn?Hi=-An.top:An.top+An.height>-Wn+la&&(Hi=-(An.top+An.height-la)),Sn(0),Dn(na(Hi)[0])}}var Oa=E(Ta,{width:Pn,height:la,left:Tr,top:Wn},{width:Vn,height:Mn},{width:La,height:ca},Object(P.a)(Object(P.a)({},Me),{},{tabs:Pe})),Do=Object(g.a)(Oa,2),Jo=Do[0],Qo=Do[1],Zo=Pe.map(function(Un){var An=Un.key;return p.createElement(r,{id:ze,prefixCls:Ee,key:An,rtl:Ze,tab:Un,closable:Un.closable,editable:kt,active:An===We,tabPosition:Yt,tabBarGutter:Ir,renderWrapper:Qr,removeAriaLabel:jt==null?void 0:jt.removeAriaLabel,ref:pn(An),onClick:function(Hi){$r(An,Hi)},onRemove:function(){jr(An)},onFocus:function(){Kn(An),pa(),Ze||(Kr.current.scrollLeft=0),Kr.current.scrollTop=0}})}),fo=o(function(){var Un,An,wi,Hi,Ia,ma,Ka,xa,_i,Qa=((Un=Kr.current)===null||Un===void 0?void 0:Un.offsetWidth)||0,ho=((An=Kr.current)===null||An===void 0?void 0:An.offsetHeight)||0,po=((wi=xn.current)===null||wi===void 0?void 0:wi.offsetWidth)||0,zi=((Hi=xn.current)===null||Hi===void 0?void 0:Hi.offsetHeight)||0,Nn=((Ia=ln.current)===null||Ia===void 0?void 0:Ia.offsetWidth)||0,aa=((ma=ln.current)===null||ma===void 0?void 0:ma.offsetHeight)||0;ai(Qa),ua(ho),Wa(po),Sa(zi);var va=(((Ka=sn.current)===null||Ka===void 0?void 0:Ka.offsetWidth)||0)-po,ga=(((xa=sn.current)===null||xa===void 0?void 0:xa.offsetHeight)||0)-zi;gi(va),Hn(ga);var mo=(_i=ln.current)===null||_i===void 0?void 0:_i.className.includes(fa);ii(va-(mo?0:Nn)),Ui(ga-(mo?0:aa)),Ea(function(){var Za=new Map;return Pe.forEach(function(Io){var No=Io.key,Ra=pn(No).current;Ra&&Za.set(No,{width:Ra.offsetWidth,height:Ra.offsetHeight,left:Ra.offsetLeft,top:Ra.offsetTop})}),Za})}),qo=Pe.slice(0,Jo),Wi=Pe.slice(Qo+1),pi=[].concat(Object(l.a)(qo),Object(l.a)(Wi)),Pi=Object(p.useState)(),mi=Object(g.a)(Pi,2),Ha=mi[0],es=mi[1],ia=Ta.get(We),Po=Object(p.useRef)();function ko(){c.a.cancel(Po.current)}Object(p.useEffect)(function(){var Un={};return ia&&(Wr?(Ze?Un.right=ia.right:Un.left=ia.left,Un.width=ia.width):(Un.top=ia.top,Un.height=ia.height)),ko(),Po.current=c()(function(){es(Un)}),ko},[ia,Wr,Ze]),Object(p.useEffect)(function(){Kn()},[We,ia,Ta,Wr]),Object(p.useEffect)(function(){fo()},[Ze,Ir,We,Pe.map(function(Un){return Un.key}).join("_")]);var Lo=!!pi.length,Aa="".concat(Ee,"-nav-wrap"),Ya,za,Mo,Ja;return Wr?Ze?(za=Tr>0,Ya=Tr+Pn<Jn):(Ya=Tr<0,za=-Tr+Pn<Jn):(Mo=Wn<0,Ja=-Wn+la<di),p.createElement("div",{ref:Ge,role:"tablist",className:S()("".concat(Ee,"-nav"),_e),style:je,onKeyDown:function(){pa()}},p.createElement(Mt,{position:"left",extra:pt,prefixCls:Ee}),p.createElement(u.a,{onResize:fo},p.createElement("div",{className:S()(Aa,(Ye={},Object(L.a)(Ye,"".concat(Aa,"-ping-left"),Ya),Object(L.a)(Ye,"".concat(Aa,"-ping-right"),za),Object(L.a)(Ye,"".concat(Aa,"-ping-top"),Mo),Object(L.a)(Ye,"".concat(Aa,"-ping-bottom"),Ja),Ye)),ref:Kr},p.createElement(u.a,{onResize:fo},p.createElement("div",{ref:sn,className:"".concat(Ee,"-nav-list"),style:{transform:"translate(".concat(Tr,"px, ").concat(Wn,"px)"),transition:Tn?"none":void 0}},Zo,p.createElement(Nr,{ref:xn,prefixCls:Ee,locale:jt,editable:kt,style:{visibility:Lo?"hidden":null}}),p.createElement("div",{className:S()("".concat(Ee,"-ink-bar"),Object(L.a)({},"".concat(Ee,"-ink-bar-animated"),Ve.inkBar)),style:Ha}))))),p.createElement(xr,Object.assign({},Me,{ref:ln,prefixCls:Ee,tabs:pi,className:!Lo&&fa})),p.createElement(Mt,{position:"right",extra:pt,prefixCls:Ee}))}var cn=p.forwardRef(Mr);function fn(Me){var Ge=Me.id,Ye=Me.activeKey,Fe=Me.animated,Ee=Me.tabPosition,Pe=Me.rtl,_e=Me.destroyInactiveTabPane,je=p.useContext(br),ze=je.prefixCls,Ve=je.tabs,We=Fe.tabPane,Ze=Ve.findIndex(function(pt){return pt.key===Ye});return p.createElement("div",{className:S()("".concat(ze,"-content-holder"))},p.createElement("div",{className:S()("".concat(ze,"-content"),"".concat(ze,"-content-").concat(Ee),Object(L.a)({},"".concat(ze,"-content-animated"),We)),style:Ze&&We?Object(L.a)({},Pe?"marginRight":"marginLeft","-".concat(Ze,"00%")):null},Ve.map(function(pt){return p.cloneElement(pt.node,{key:pt.key,prefixCls:ze,tabKey:pt.key,id:Ge,animated:We,active:pt.key===Ye,destroyInactiveTabPane:_e})})))}function kr(Me){var Ge=Me.prefixCls,Ye=Me.forceRender,Fe=Me.className,Ee=Me.style,Pe=Me.id,_e=Me.active,je=Me.animated,ze=Me.destroyInactiveTabPane,Ve=Me.tabKey,We=Me.children,Ze=p.useState(Ye),pt=Object(g.a)(Ze,2),kt=pt[0],jt=pt[1];p.useEffect(function(){_e?jt(!0):ze&&jt(!1)},[_e,ze]);var Yt={};return _e||(je?(Yt.visibility="hidden",Yt.height=0,Yt.overflowY="hidden"):Yt.display="none"),p.createElement("div",{id:Pe&&"".concat(Pe,"-panel-").concat(Ve),role:"tabpanel",tabIndex:_e?0:-1,"aria-labelledby":Pe&&"".concat(Pe,"-tab-").concat(Ve),"aria-hidden":!_e,style:Object(P.a)(Object(P.a)({},Yt),Ee),className:S()("".concat(Ge,"-tabpane"),_e&&"".concat(Ge,"-tabpane-active"),Fe)},(_e||kt||Ye)&&We)}var on=0;function Ur(Me){return Object(b.a)(Me).map(function(Ge){if(p.isValidElement(Ge)){var Ye=Ge.key!==void 0?String(Ge.key):void 0;return Object(P.a)(Object(P.a)({key:Ye},Ge.props),{},{node:Ge})}return null}).filter(function(Ge){return Ge})}function gn(Me,Ge){var Ye,Fe=Me.id,Ee=Me.prefixCls,Pe=Ee===void 0?"rc-tabs":Ee,_e=Me.className,je=Me.children,ze=Me.direction,Ve=Me.activeKey,We=Me.defaultActiveKey,Ze=Me.editable,pt=Me.animated,kt=Me.tabPosition,jt=kt===void 0?"top":kt,Yt=Me.tabBarGutter,Ir=Me.tabBarStyle,Qr=Me.tabBarExtraContent,$r=Me.locale,nn=Me.moreIcon,Kr=Me.moreTransitionName,sn=Me.destroyInactiveTabPane,ln=Me.renderTabBar,xn=Me.onChange,hn=Me.onTabClick,jn=Me.onTabScroll,pn=Object(T.a)(Me,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),jr=Ur(je),Wr=ze==="rtl",dn;pt===!1?dn={inkBar:!1,tabPane:!1}:dn=Object(P.a)({inkBar:!0,tabPane:!1},pt!==!0?pt:null);var bn=Object(p.useState)(!1),Tr=Object(g.a)(bn,2),Sn=Tr[0],Yn=Tr[1];Object(p.useEffect)(function(){Yn(er())},[]);var Rn=Object(d.a)(function(){var Mn;return(Mn=jr[0])===null||Mn===void 0?void 0:Mn.key},{value:Ve,defaultValue:We}),Wn=Object(g.a)(Rn,2),Dn=Wn[0],ti=Wn[1],ci=Object(p.useState)(function(){return jr.findIndex(function(Mn){return Mn.key===Dn})}),Jn=Object(g.a)(ci,2),gi=Jn[0],Xi=Jn[1];Object(p.useEffect)(function(){var Mn=jr.findIndex(function(Bi){return Bi.key===Dn});if(Mn===-1){var Ui;Mn=Math.max(0,Math.min(gi,jr.length-1)),ti((Ui=jr[Mn])===null||Ui===void 0?void 0:Ui.key)}Xi(Mn)},[jr.map(function(Mn){return Mn.key}).join("_"),Dn,gi]);var Oi=Object(d.a)(null,{value:Fe}),di=Object(g.a)(Oi,2),Hn=di[0],zn=di[1],Qn=jt;Sn&&!["left","right"].includes(jt)&&(Qn="top"),Object(p.useEffect)(function(){Fe||(zn("rc-tabs-".concat(on)),on+=1)},[]);function Vn(Mn,Ui){hn==null||hn(Mn,Ui),ti(Mn),xn==null||xn(Mn)}var ii={id:Hn,activeKey:Dn,animated:dn,tabPosition:Qn,rtl:Wr,mobile:Sn},Di,ra=Object(P.a)(Object(P.a)({},ii),{},{editable:Ze,locale:$r,moreIcon:nn,moreTransitionName:Kr,tabBarGutter:Yt,onTabClick:Vn,onTabScroll:jn,extra:Qr,style:Ir,panes:je});return ln?Di=ln(ra,cn):Di=p.createElement(cn,Object.assign({},ra)),p.createElement(br.Provider,{value:{tabs:jr,prefixCls:Pe}},p.createElement("div",Object.assign({ref:Ge,id:Fe,className:S()(Pe,"".concat(Pe,"-").concat(Qn),(Ye={},Object(L.a)(Ye,"".concat(Pe,"-mobile"),Sn),Object(L.a)(Ye,"".concat(Pe,"-editable"),Ze),Object(L.a)(Ye,"".concat(Pe,"-rtl"),Wr),Ye),_e)},pn),Di,p.createElement(fn,Object.assign({destroyInactiveTabPane:sn},ii,{animated:dn}))))}var Vr=p.forwardRef(gn);Vr.TabPane=kr;var yn=Vr,ei=Y.b=yn},kSUc:function(j,Y,D){},lPiR:function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){return function(g){var T=L,P=T.lib,p=P.WordArray,v=P.Hasher,S=T.algo,b=[],d=[];(function(){function c(m){for(var s=g.sqrt(m),r=2;r<=s;r++)if(!(m%r))return!1;return!0}function u(m){return(m-(m|0))*4294967296|0}for(var o=2,h=0;h<64;)c(o)&&(h<8&&(b[h]=u(g.pow(o,1/2))),d[h]=u(g.pow(o,1/3)),h++),o++})();var l=[],n=S.SHA256=v.extend({_doReset:function(){this._hash=new p.init(b.slice(0))},_doProcessBlock:function(c,u){for(var o=this._hash.words,h=o[0],m=o[1],s=o[2],r=o[3],a=o[4],t=o[5],w=o[6],E=o[7],f=0;f<64;f++){if(f<16)l[f]=c[u+f]|0;else{var k=l[f-15],O=(k<<25|k>>>7)^(k<<14|k>>>18)^k>>>3,C=l[f-2],x=(C<<15|C>>>17)^(C<<13|C>>>19)^C>>>10;l[f]=O+l[f-7]+x+l[f-16]}var y=a&t^~a&w,_=h&m^h&s^m&s,M=(h<<30|h>>>2)^(h<<19|h>>>13)^(h<<10|h>>>22),I=(a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25),N=E+I+y+d[f]+l[f],G=M+_;E=w,w=t,t=a,a=r+N|0,r=s,s=m,m=h,h=N+G|0}o[0]=o[0]+h|0,o[1]=o[1]+m|0,o[2]=o[2]+s|0,o[3]=o[3]+r|0,o[4]=o[4]+a|0,o[5]=o[5]+t|0,o[6]=o[6]+w|0,o[7]=o[7]+E|0},_doFinalize:function(){var c=this._data,u=c.words,o=this._nDataBytes*8,h=c.sigBytes*8;return u[h>>>5]|=128<<24-h%32,u[(h+64>>>9<<4)+14]=g.floor(o/4294967296),u[(h+64>>>9<<4)+15]=o,c.sigBytes=u.length*4,this._process(),this._hash},clone:function(){var c=v.clone.call(this);return c._hash=this._hash.clone(),c}});T.SHA256=v._createHelper(n),T.HmacSHA256=v._createHmacHelper(n)}(Math),L.SHA256})},lZu9:function(j,Y,D){(function(L){L(D("VrN/"),D("1eCo"),D("8EBN"))})(function(L){"use strict";L.defineMode("markdown",function(g,T){var P=L.getMode(g,"text/html"),p=P.name=="null";function v(U){if(L.findModeByName){var W=L.findModeByName(U);W&&(U=W.mime||W.mimes[0])}var X=L.getMode(g,U);return X.name=="null"?null:X}T.highlightFormatting===void 0&&(T.highlightFormatting=!1),T.maxBlockquoteDepth===void 0&&(T.maxBlockquoteDepth=0),T.taskLists===void 0&&(T.taskLists=!1),T.strikethrough===void 0&&(T.strikethrough=!1),T.emoji===void 0&&(T.emoji=!1),T.fencedCodeBlockHighlighting===void 0&&(T.fencedCodeBlockHighlighting=!0),T.fencedCodeBlockDefaultMode===void 0&&(T.fencedCodeBlockDefaultMode="text/plain"),T.xml===void 0&&(T.xml=!0),T.tokenTypeOverrides===void 0&&(T.tokenTypeOverrides={});var 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)&&T.tokenTypeOverrides[b]&&(S[b]=T.tokenTypeOverrides[b]);var d=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,n=/^\[(x| )\](?=\s)/i,c=T.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,u=/^ {0,3}(?:\={1,}|-{2,})\s*$/,o=/^[^#!\[\]*_\\<>` "'(~:]+/,h=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,m=/^\s*\[[^\]]+?\]:.*$/,s=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,r=" ";function a(U,W,X){return W.f=W.inline=X,X(U,W)}function t(U,W,X){return W.f=W.block=X,X(U,W)}function w(U){return!U||!/\S/.test(U.string)}function E(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==k){var W=p;if(!W){var X=L.innerMode(P,U.htmlState);W=X.mode.name=="xml"&&X.state.tagStart===null&&!X.state.context&&X.state.tokenize.isInText}W&&(U.f=y,U.block=f,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function f(U,W){var X=U.column()===W.indentation,ne=w(W.prevLine.stream),fe=W.indentedCode,me=W.prevLine.hr,Ae=W.list!==!1,De=(W.listStack[W.listStack.length-1]||0)+3;W.indentedCode=!1;var ye=W.indentation;if(W.indentationDiff===null&&(W.indentationDiff=W.indentation,Ae)){for(W.list=null;ye<W.listStack[W.listStack.length-1];)W.listStack.pop(),W.listStack.length?W.indentation=W.listStack[W.listStack.length-1]:W.list=!1;W.list!==!1&&(W.indentationDiff=ye-W.listStack[W.listStack.length-1])}var Oe=!ne&&!me&&!W.prevLine.header&&(!Ae||!fe)&&!W.prevLine.fencedCodeEnd,xe=(W.list===!1||me||ne)&&W.indentation<=De&&U.match(d),ue=null;if(W.indentationDiff>=4&&(fe||W.prevLine.fencedCodeEnd||W.prevLine.header||ne))return U.skipToEnd(),W.indentedCode=!0,S.code;if(U.eatSpace())return null;if(X&&W.indentation<=De&&(ue=U.match(c))&&ue[1].length<=6)return W.quote=0,W.header=ue[1].length,W.thisLine.header=!0,T.highlightFormatting&&(W.formatting="header"),W.f=W.inline,C(W);if(W.indentation<=De&&U.eat(">"))return W.quote=X?1:W.quote+1,T.highlightFormatting&&(W.formatting="quote"),U.eatSpace(),C(W);if(!xe&&!W.setext&&X&&W.indentation<=De&&(ue=U.match(l))){var le=ue[1]?"ol":"ul";return W.indentation=ye+U.current().length,W.list=!0,W.quote=0,W.listStack.push(W.indentation),W.em=!1,W.strong=!1,W.code=!1,W.strikethrough=!1,T.taskLists&&U.match(n,!1)&&(W.taskList=!0),W.f=W.inline,T.highlightFormatting&&(W.formatting=["list","list-"+le]),C(W)}else{if(X&&W.indentation<=De&&(ue=U.match(h,!0)))return W.quote=0,W.fencedEndRE=new RegExp(ue[1]+"+ *$"),W.localMode=T.fencedCodeBlockHighlighting&&v(ue[2]||T.fencedCodeBlockDefaultMode),W.localMode&&(W.localState=L.startState(W.localMode)),W.f=W.block=O,T.highlightFormatting&&(W.formatting="code-block"),W.code=-1,C(W);if(W.setext||(!Oe||!Ae)&&!W.quote&&W.list===!1&&!W.code&&!xe&&!m.test(U.string)&&(ue=U.lookAhead(1))&&(ue=ue.match(u)))return W.setext?(W.header=W.setext,W.setext=0,U.skipToEnd(),T.highlightFormatting&&(W.formatting="header")):(W.header=ue[0].charAt(0)=="="?1:2,W.setext=W.header),W.thisLine.header=!0,W.f=W.inline,C(W);if(xe)return U.skipToEnd(),W.hr=!0,W.thisLine.hr=!0,S.hr;if(U.peek()==="[")return a(U,W,G)}return a(U,W,W.inline)}function k(U,W){var X=P.token(U,W.htmlState);if(!p){var ne=L.innerMode(P,W.htmlState);(ne.mode.name=="xml"&&ne.state.tagStart===null&&!ne.state.context&&ne.state.tokenize.isInText||W.md_inside&&U.current().indexOf(">")>-1)&&(W.f=y,W.block=f,W.htmlState=null)}return X}function O(U,W){var X=W.listStack[W.listStack.length-1]||0,ne=W.indentation<X,fe=X+3;if(W.fencedEndRE&&W.indentation<=fe&&(ne||U.match(W.fencedEndRE))){T.highlightFormatting&&(W.formatting="code-block");var me;return ne||(me=C(W)),W.localMode=W.localState=null,W.block=f,W.f=y,W.fencedEndRE=null,W.code=0,W.thisLine.fencedCodeEnd=!0,ne?t(U,W,W.block):me}else return W.localMode?W.localMode.token(U,W.localState):(U.skipToEnd(),S.code)}function C(U){var W=[];if(U.formatting){W.push(S.formatting),typeof U.formatting=="string"&&(U.formatting=[U.formatting]);for(var X=0;X<U.formatting.length;X++)W.push(S.formatting+"-"+U.formatting[X]),U.formatting[X]==="header"&&W.push(S.formatting+"-"+U.formatting[X]+"-"+U.header),U.formatting[X]==="quote"&&(!T.maxBlockquoteDepth||T.maxBlockquoteDepth>=U.quote?W.push(S.formatting+"-"+U.formatting[X]+"-"+U.quote):W.push("error"))}if(U.taskOpen)return W.push("meta"),W.length?W.join(" "):null;if(U.taskClosed)return W.push("property"),W.length?W.join(" "):null;if(U.linkHref?W.push(S.linkHref,"url"):(U.strong&&W.push(S.strong),U.em&&W.push(S.em),U.strikethrough&&W.push(S.strikethrough),U.emoji&&W.push(S.emoji),U.linkText&&W.push(S.linkText),U.code&&W.push(S.code),U.image&&W.push(S.image),U.imageAltText&&W.push(S.imageAltText,"link"),U.imageMarker&&W.push(S.imageMarker)),U.header&&W.push(S.header,S.header+"-"+U.header),U.quote&&(W.push(S.quote),!T.maxBlockquoteDepth||T.maxBlockquoteDepth>=U.quote?W.push(S.quote+"-"+U.quote):W.push(S.quote+"-"+T.maxBlockquoteDepth)),U.list!==!1){var ne=(U.listStack.length-1)%3;ne?ne===1?W.push(S.list2):W.push(S.list3):W.push(S.list1)}return U.trailingSpaceNewLine?W.push("trailing-space-new-line"):U.trailingSpace&&W.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),W.length?W.join(" "):null}function x(U,W){return U.match(o,!0)?C(W):void 0}function y(U,W){var X=W.text(U,W);if(typeof X!="undefined")return X;if(W.list)return W.list=null,C(W);if(W.taskList){var ne=U.match(n,!0)[1]===" ";return ne?W.taskOpen=!0:W.taskClosed=!0,T.highlightFormatting&&(W.formatting="task"),W.taskList=!1,C(W)}if(W.taskOpen=!1,W.taskClosed=!1,W.header&&U.match(/^#+$/,!0))return T.highlightFormatting&&(W.formatting="header"),C(W);var fe=U.next();if(W.linkTitle){W.linkTitle=!1;var me=fe;fe==="("&&(me=")"),me=(me+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ae="^\\s*(?:[^"+me+"\\\\]+|\\\\\\\\|\\\\.)"+me;if(U.match(new RegExp(Ae),!0))return S.linkHref}if(fe==="`"){var De=W.formatting;T.highlightFormatting&&(W.formatting="code"),U.eatWhile("`");var ye=U.current().length;if(W.code==0&&(!W.quote||ye==1))return W.code=ye,C(W);if(ye==W.code){var Oe=C(W);return W.code=0,Oe}else return W.formatting=De,C(W)}else if(W.code)return C(W);if(fe==="\\"&&(U.next(),T.highlightFormatting)){var xe=C(W),ue=S.formatting+"-escape";return xe?xe+" "+ue:ue}if(fe==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return W.imageMarker=!0,W.image=!0,T.highlightFormatting&&(W.formatting="image"),C(W);if(fe==="["&&W.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return W.imageMarker=!1,W.imageAltText=!0,T.highlightFormatting&&(W.formatting="image"),C(W);if(fe==="]"&&W.imageAltText){T.highlightFormatting&&(W.formatting="image");var xe=C(W);return W.imageAltText=!1,W.image=!1,W.inline=W.f=M,xe}if(fe==="["&&!W.image)return W.linkText&&U.match(/^.*?\]/)||(W.linkText=!0,T.highlightFormatting&&(W.formatting="link")),C(W);if(fe==="]"&&W.linkText){T.highlightFormatting&&(W.formatting="link");var xe=C(W);return W.linkText=!1,W.inline=W.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?M:y,xe}if(fe==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){W.f=W.inline=_,T.highlightFormatting&&(W.formatting="link");var xe=C(W);return xe?xe+=" ":xe="",xe+S.linkInline}if(fe==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){W.f=W.inline=_,T.highlightFormatting&&(W.formatting="link");var xe=C(W);return xe?xe+=" ":xe="",xe+S.linkEmail}if(T.xml&&fe==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var le=U.string.indexOf(">",U.pos);if(le!=-1){var re=U.string.substring(U.start,le);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(re)&&(W.md_inside=!0)}return U.backUp(1),W.htmlState=L.startState(P),t(U,W,k)}if(T.xml&&fe==="<"&&U.match(/^\/\w*?>/))return W.md_inside=!1,"tag";if(fe==="*"||fe==="_"){for(var pe=1,ee=U.pos==1?" ":U.string.charAt(U.pos-2);pe<3&&U.eat(fe);)pe++;var te=U.peek()||" ",ce=!/\s/.test(te)&&(!s.test(te)||/\s/.test(ee)||s.test(ee)),q=!/\s/.test(ee)&&(!s.test(ee)||/\s/.test(te)||s.test(te)),Q=null,V=null;if(pe%2&&(!W.em&&ce&&(fe==="*"||!q||s.test(ee))?Q=!0:W.em==fe&&q&&(fe==="*"||!ce||s.test(te))&&(Q=!1)),pe>1&&(!W.strong&&ce&&(fe==="*"||!q||s.test(ee))?V=!0:W.strong==fe&&q&&(fe==="*"||!ce||s.test(te))&&(V=!1)),V!=null||Q!=null){T.highlightFormatting&&(W.formatting=Q==null?"strong":V==null?"em":"strong em"),Q===!0&&(W.em=fe),V===!0&&(W.strong=fe);var Oe=C(W);return Q===!1&&(W.em=!1),V===!1&&(W.strong=!1),Oe}}else if(fe===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return C(W);U.backUp(1)}if(T.strikethrough){if(fe==="~"&&U.eatWhile(fe)){if(W.strikethrough){T.highlightFormatting&&(W.formatting="strikethrough");var Oe=C(W);return W.strikethrough=!1,Oe}else if(U.match(/^[^\s]/,!1))return W.strikethrough=!0,T.highlightFormatting&&(W.formatting="strikethrough"),C(W)}else if(fe===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return C(W);U.backUp(2)}}if(T.emoji&&fe===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){W.emoji=!0,T.highlightFormatting&&(W.formatting="emoji");var Z=C(W);return W.emoji=!1,Z}return fe===" "&&(U.match(/^ +$/,!1)?W.trailingSpace++:W.trailingSpace&&(W.trailingSpaceNewLine=!0)),C(W)}function _(U,W){var X=U.next();if(X===">"){W.f=W.inline=y,T.highlightFormatting&&(W.formatting="link");var ne=C(W);return ne?ne+=" ":ne="",ne+S.linkInline}return U.match(/^[^>]+/,!0),S.linkInline}function M(U,W){if(U.eatSpace())return null;var X=U.next();return X==="("||X==="["?(W.f=W.inline=N(X==="("?")":"]"),T.highlightFormatting&&(W.formatting="link-string"),W.linkHref=!0,C(W)):"error"}var I={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function N(U){return function(W,X){var ne=W.next();if(ne===U){X.f=X.inline=y,T.highlightFormatting&&(X.formatting="link-string");var fe=C(X);return X.linkHref=!1,fe}return W.match(I[U]),X.linkHref=!0,C(X)}}function G(U,W){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(W.f=H,U.next(),T.highlightFormatting&&(W.formatting="link"),W.linkText=!0,C(W)):a(U,W,y)}function H(U,W){if(U.match(/^\]:/,!0)){W.f=W.inline=B,T.highlightFormatting&&(W.formatting="link");var X=C(W);return W.linkText=!1,X}return U.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function B(U,W){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?W.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),W.f=W.inline=y,S.linkHref+" url")}var K={startState:function(){return{f,prevLine:{stream:null},thisLine:{stream:null},block:f,htmlState:null,indentation:0,inline:y,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&&L.copyState(P,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?L.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,W){if(W.formatting=!1,U!=W.thisLine.stream){if(W.header=0,W.hr=!1,U.match(/^\s*$/,!0))return E(W),null;if(W.prevLine=W.thisLine,W.thisLine={stream:U},W.taskList=!1,W.trailingSpace=0,W.trailingSpaceNewLine=!1,!W.localState&&(W.f=W.block,W.f!=k)){var X=U.match(/^\s*/,!0)[0].replace(/\t/g,r).length;if(W.indentation=X,W.indentationDiff=null,X>0)return null}}return W.f(U,W)},innerMode:function(U){return U.block==k?{state:U.htmlState,mode:P}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:K}},indent:function(U,W,X){return U.block==k&&P.indent?P.indent(U.htmlState,W,X):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,W,X):L.Pass},blankLine:E,getType:C,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return K},"xml"),L.defineMIME("text/markdown","markdown"),L.defineMIME("text/x-markdown","markdown")})},mOS8:function(j,Y,D){j.exports=D.p+"static/403Qrcode.6c17b6f4.png"},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(j){if(!0)module.exports=j();else var Y})(function(){var define,module,exports;return function(){function j(Y,D,L){function g(p,v){if(!D[p]){if(!Y[p]){var S=typeof require=="function"&&require;if(!v&&S)return require(p,!0);if(T)return T(p,!0);var b=new Error("Cannot find module '"+p+"'");throw b.code="MODULE_NOT_FOUND",b}var d=D[p]={exports:{}};Y[p][0].call(d.exports,function(l){var n=Y[p][1][l];return g(n||l)},d,d.exports,j,Y,D,L)}return D[p].exports}for(var T=typeof require=="function"&&require,P=0;P<L.length;P++)g(L[P]);return g}return j}()({1:[function(j,Y,D){"use strict";var L=j("./browser/client");L.Buffer=j("buffer").Buffer,L.urllib=j("../shims/xhr"),L.version=j("./browser/version").version,Y.exports=L},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(j,Y,D){(function(L,g){"use strict";var T=j("babel-runtime/core-js/promise"),P=d(T),p=j("babel-runtime/regenerator"),v=d(p),S=j("babel-runtime/core-js/object/assign"),b=d(S);function d(G){return G&&G.__esModule?G:{default:G}}var l=j("debug")("ali-oss"),n=j("copy-to"),c=j("xml2js"),u=j("agentkeepalive"),o=j("merge-descriptors"),h=j("url"),m=j("is-type-of"),s=j("platform"),r=j("utility"),a=j("urllib"),t=j("./version"),w=j("bowser"),E=j("../common/signUtils"),f=j("../common/utils/isIP"),k=f.isIP,O=j("../common/client/initOptions"),C=j("../common/utils/createRequest"),x=C.createRequest,y=new u;function _(){var G=s.name,H=s.version;G&&G.toLowerCase&&G.toLowerCase()==="ie"&&H.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function M(){return location&&location.protocol==="https:"}function I(G,H){if(_(),!(this instanceof I))return new I(G,H);G&&G.inited?this.options=G:this.options=I.initOptions(G),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=a,this.agent=this.options.agent||y),this.ctx=H,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}Y.exports=I,I.initOptions=function(H){H.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var B=(0,b.default)({secure:M(),useFetch:!1},H);return O(B)};var N=I.prototype;N.debug=l,o(N,j("./object")),o(N,j("../common/bucket/getBucketWebsite")),o(N,j("../common/bucket/putBucketWebsite")),o(N,j("../common/bucket/deleteBucketWebsite")),o(N,j("../common/bucket/getBucketLifecycle")),o(N,j("../common/bucket/putBucketLifecycle")),o(N,j("../common/bucket/deleteBucketLifecycle")),o(N,j("../common/bucket/putBucketVersioning")),o(N,j("../common/bucket/getBucketVersioning")),o(N,j("./managed-upload")),o(N,j("../common/multipart")),o(N,j("../common/parallel")),N.signature=function(H){return this.debug("authorization stringToSign: %s",H,"info"),E.computeSignature(this.options.accessKeySecret,H)},N.authorization=function(H,B,K,U){var W=E.buildCanonicalString(H.toUpperCase(),B,{headers:U,parameters:K});return E.authorization(this.options.accessKeyId,this.options.accessKeySecret,W)},N.request=function(H){var B,K,U,W,X,ne;return v.default.async(function(me){for(;;)switch(me.prev=me.next){case 0:return B=x.call(this,H),this.options.useFetch||(B.params.mode="disable-fetch"),K=void 0,U=void 0,W=!!H.stream,me.prev=5,me.next=8,v.default.awrap(this.urllib.request(B.url,B.params));case 8:K=me.sent,this.debug("response %s %s, got %s, headers: %j",H.method,B.url,K.status,K.headers,"info"),me.next=15;break;case 12:me.prev=12,me.t0=me.catch(5),U=me.t0;case 15:if(X=void 0,!(K&&H.successStatuses&&H.successStatuses.indexOf(K.status)===-1)){me.next=28;break}return me.next=19,v.default.awrap(this.requestError(K));case 19:if(X=me.sent,!(X.code==="RequestTimeTooSkewed"&&!W)){me.next=25;break}return this.options.amendTimeSkewed=+new Date(X.serverTime)-new Date,me.next=24,v.default.awrap(this.request(H));case 24:return me.abrupt("return",me.sent);case 25:X.params=H,me.next=32;break;case 28:if(!U){me.next=32;break}return me.next=31,v.default.awrap(this.requestError(U));case 31:X=me.sent;case 32:if(!X){me.next=34;break}throw X;case 34:if(!H.xmlResponse){me.next=39;break}return me.next=37,v.default.awrap(this.parseXML(K.data));case 37:ne=me.sent,K.data=ne;case 39:return me.abrupt("return",K);case 40:case"end":return me.stop()}},null,this,[[5,12]])},N._getResource=function(H){var B="/";return H.bucket&&(B+=H.bucket+"/"),H.object&&(B+=H.object),B},N._isIP=k,N._escape=function(H){return r.encodeURIComponent(H).replace(/%2F/g,"/")},N._getReqUrl=function(H){var B={};n(this.options.endpoint).to(B);var K=this._isIP(B.hostname),U=this.options.cname;H.bucket&&!U&&!K&&(B.host=H.bucket+"."+B.host);var W="/";H.bucket&&K&&(W+=H.bucket+"/"),H.object&&(W+=this._escape(H.object).replace(/\+/g,"%2B")),B.pathname=W;var X={};if(H.query&&o(X,H.query),H.subres){var ne={};m.string(H.subres)?ne[H.subres]="":m.array(H.subres)?H.subres.forEach(function(fe){ne[fe]=""}):ne=H.subres,o(X,ne)}return B.query=X,h.format(B)},N._getUserAgent=function(){var H=g&&g.browser?"js":"nodejs",B="aliyun-sdk-"+H+"/"+t.version,K=s.description;return!K&&g&&(K="Node.js "+g.version.slice(1)+" on "+g.platform+" "+g.arch),this._checkUserAgent(B+" "+K)},N._checkUserAgent=function(H){var B=H.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return B},N.checkBrowserAndVersion=function(H,B){return w.name===H&&w.version.split(".")[0]===B},N.parseXML=function(H){return new P.default(function(B,K){L.isBuffer(H)&&(H=H.toString()),c.parseString(H,{explicitRoot:!1,explicitArray:!1},function(U,W){U?K(U):B(W)})})},N.requestError=function(H){var B,K,U,W;return v.default.async(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(B=null,!(!H.data||!H.data.length)){ne.next=5;break}H.status===-1||H.status===-2?(B=new Error(H.message),B.name=H.name,B.status=H.status,B.code=H.name):(H.status===404?(B=new Error("Object not exists"),B.name="NoSuchKeyError",B.status=404,B.code="NoSuchKey"):H.status===412?(B=new Error("Pre condition failed"),B.name="PreconditionFailedError",B.status=412,B.code="PreconditionFailed"):(B=new Error("Unknow error, status: "+H.status),B.name="UnknowError",B.status=H.status),B.requestId=H.headers["x-oss-request-id"],B.host=""),ne.next=33;break;case 5:return K=String(H.data),this.debug("request response error data: %s",K,"error"),U=void 0,ne.prev=8,ne.next=11,v.default.awrap(this.parseXML(K));case 11:if(ne.t0=ne.sent,ne.t0){ne.next=14;break}ne.t0={};case 14:U=ne.t0,ne.next=24;break;case 17:return ne.prev=17,ne.t1=ne.catch(8),this.debug(K,"error"),ne.t1.message+=`
|
|
|
raw xml: `+K,ne.t1.status=H.status,ne.t1.requestId=H.headers["x-oss-request-id"],ne.abrupt("return",ne.t1);case 24:W=U.Message||"unknow request error, status: "+H.status,U.Condition&&(W+=" (condition: "+U.Condition+")"),B=new Error(W),B.name=U.Code?U.Code+"Error":"UnknowError",B.status=H.status,B.code=U.Code,B.requestId=U.RequestId,B.hostId=U.HostId,B.serverTime=U.ServerTime;case 33:return this.debug("generate error %j",B,"error"),ne.abrupt("return",B);case 35:case"end":return ne.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:j("../../node_modules/is-buffer/index.js")},j("_process"))},{"../../node_modules/is-buffer/index.js":197,"../common/bucket/deleteBucketLifecycle":6,"../common/bucket/deleteBucketWebsite":7,"../common/bucket/getBucketLifecycle":8,"../common/bucket/getBucketVersioning":9,"../common/bucket/getBucketWebsite":10,"../common/bucket/putBucketLifecycle":11,"../common/bucket/putBucketVersioning":12,"../common/bucket/putBucketWebsite":13,"../common/client/initOptions":15,"../common/multipart":18,"../common/parallel":33,"../common/signUtils":34,"../common/utils/createRequest":38,"../common/utils/isIP":45,"./managed-upload":3,"./object":4,"./version":5,_process:208,agentkeepalive:48,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,bowser:70,"copy-to":76,debug:288,"is-type-of":289,"merge-descriptors":200,platform:206,url:238,urllib:291,utility:290,xml2js:249}],3:[function(j,Y,D){(function(L){"use strict";var g=j("babel-runtime/core-js/array/from"),T=b(g),P=j("babel-runtime/core-js/promise"),p=b(P),v=j("babel-runtime/regenerator"),S=b(v);function b(E){return E&&E.__esModule?E:{default:E}}var d=j("is-type-of"),l=j("util"),n=j("path"),c=j("mime"),u=j("copy-to"),o=j("../common/utils/isBlob"),h=o.isBlob,m=j("../common/utils/isFile"),s=m.isFile,r=D;r.multipartUpload=function(f,k,O){var C,x,y,_,M,I,N,G,H;return S.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:if(this.resetCancelFlag(),O=O||{},!(O.checkpoint&&O.checkpoint.uploadId)){K.next=6;break}return K.next=5,S.default.awrap(this._resumeMultipart(O.checkpoint,O));case 5:return K.abrupt("return",K.sent);case 6:return C=100*1024,O.mime||(s(k)?O.mime=c.getType(n.extname(k.name)):h(k)?O.mime=k.type:O.mime=c.getType(n.extname(k))),O.headers=O.headers||{},this._convertMetaToHeaders(O.meta,O.headers),K.next=12,S.default.awrap(this._getFileSize(k));case 12:if(x=K.sent,!(x<C)){K.next=25;break}return y=this._createStream(k,0,x),O.contentLength=x,K.next=18,S.default.awrap(this.putStream(f,y,O));case 18:if(_=K.sent,!(O&&O.progress)){K.next=22;break}return K.next=22,S.default.awrap(O.progress(1));case 22:return M={res:_.res,bucket:this.options.bucket,name:f,etag:_.res.headers.etag},(O.headers&&O.headers["x-oss-callback"]||O.callback)&&(M.data=_.data),K.abrupt("return",M);case 25:if(!(O.partSize&&!(parseInt(O.partSize,10)===O.partSize))){K.next=27;break}throw new Error("partSize must be int number");case 27:if(!(O.partSize&&O.partSize<C)){K.next=29;break}throw new Error("partSize must not be smaller than "+C);case 29:return K.next=31,S.default.awrap(this.initMultipartUpload(f,O));case 31:if(I=K.sent,N=I.uploadId,G=this._getPartSize(x,O.partSize),H={file:k,name:f,fileSize:x,partSize:G,uploadId:N,doneParts:[]},!(O&&O.progress)){K.next=38;break}return K.next=38,S.default.awrap(O.progress(0,H,I.res));case 38:return K.next=40,S.default.awrap(this._resumeMultipart(H,O));case 40:return K.abrupt("return",K.sent);case 41:case"end":return K.stop()}},null,this)},r._resumeMultipart=function(f,k){var O,C,x,y,_,M,I,N,G,H,B,K,U,W,X,ne,fe,me;return S.default.async(function(De){for(;;)switch(De.prev=De.next){case 0:if(O=this,!this.isCancel()){De.next=3;break}throw this._makeCancelEvent();case 3:return C=f.file,x=f.fileSize,y=f.partSize,_=f.uploadId,M=f.doneParts,I=f.name,N=[],M.length>0&&u(M).to(N),G=this._divideParts(x,y),H=G.length,B=!1,K=function(Oe,xe){var ue=this;return new p.default(function(re,pe){var ee,te,ce,q;return S.default.async(function(V){for(;;)switch(V.prev=V.next){case 0:if(V.prev=0,Oe.isCancel()){V.next=18;break}return ee=G[xe-1],te={stream:Oe._createStream(C,ee.start,ee.end),size:ee.end-ee.start},V.next=6,S.default.awrap(Oe._uploadPart(I,_,xe,te));case 6:if(ce=V.sent,!(!Oe.isCancel()&&!B)){V.next=15;break}if(f.doneParts.push({number:xe,etag:ce.res.headers.etag}),!k.progress){V.next=12;break}return V.next=12,S.default.awrap(k.progress(M.length/H,f,ce.res));case 12:re({number:xe,etag:ce.res.headers.etag}),V.next=16;break;case 15:re();case 16:V.next=19;break;case 18:re();case 19:V.next=30;break;case 21:V.prev=21,V.t0=V.catch(0),q=new Error,q.name=V.t0.name,q.message=V.t0.message,q.stack=V.t0.stack,q.partNum=xe,u(V.t0).to(q),pe(q);case 30:case"end":return V.stop()}},null,ue,[[0,21]])})},U=(0,T.default)(new Array(H),function(ye,Oe){return Oe+1}),W=N.map(function(ye){return ye.number}),X=U.filter(function(ye){return W.indexOf(ye)<0}),ne=5,fe=k.parallel||ne,De.next=17,S.default.awrap(this._parallel(X,fe,function(ye){return new p.default(function(Oe,xe){K(O,ye).then(function(ue){ue&&N.push(ue),Oe()}).catch(function(ue){xe(ue)})})}));case 17:if(me=De.sent,B=!0,!this.isCancel()){De.next=22;break}throw K=null,this._makeCancelEvent();case 22:if(!(me&&me.length>0)){De.next=25;break}throw me[0].message="Failed to upload some parts with error: "+me[0].toString()+" part_num: "+me[0].partNum,me[0];case 25:return De.next=27,S.default.awrap(this.completeMultipartUpload(I,_,N,k));case 27:return De.abrupt("return",De.sent);case 28:case"end":return De.stop()}},null,this)},r._getFileSize=function(f){return S.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!d.buffer(f)){O.next=4;break}return O.abrupt("return",f.length);case 4:if(!(h(f)||s(f))){O.next=6;break}return O.abrupt("return",f.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return O.stop()}},null,this)};var a=j("stream"),t=a.Readable;function w(E,f){if(!(this instanceof w))return new w(E,f);t.call(this,f),this.file=E,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}l.inherits(w,t),w.prototype.readFileAndPush=function(f){if(this.fileBuffer)for(var k=!0;k&&this.fileBuffer&&this.start<this.fileBuffer.length;){var O=this.start,C=O+f;C=C>this.fileBuffer.length?this.fileBuffer.length:C,this.start=C,k=this.push(this.fileBuffer.slice(O,C))}},w.prototype._read=function(f){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var k=16*1024;f=f||k;var O=this;this.reader.onload=function(x){O.fileBuffer=L.from(new Uint8Array(x.target.result)),O.file=null,O.readFileAndPush(f)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(f)},r._createStream=function(f,k,O){if(h(f)||s(f))return new w(f.slice(k,O));throw new Error("_createStream requires File/Blob.")},r._getPartSize=function(f,k){var O=10*1e3,C=1024*1024;return k?Math.max(Math.ceil(f/O),k):C},r._divideParts=function(f,k){for(var O=Math.ceil(f/k),C=[],x=0;x<O;x++){var y=k*x,_=Math.min(y+k,f);C.push({start:y,end:_})}return C}}).call(this,j("buffer").Buffer)},{"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/array/from":52,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,buffer:73,"copy-to":76,"is-type-of":289,mime:202,path:205,stream:230,util:243}],4:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/promise"),g=d(L),T=j("babel-runtime/core-js/object/keys"),P=d(T),p=j("babel-runtime/core-js/object/assign"),v=d(p),S=j("babel-runtime/regenerator"),b=d(S);function d(O){return O&&O.__esModule?O:{default:O}}var l=j("utility"),n=j("fs"),c=j("is-type-of"),u=j("url"),o=j("copy-to"),h=j("path"),m=j("mime"),s=j("../common/callback"),r=j("../common/signUtils"),a=j("merge-descriptors"),t=j("../common/utils/isBlob"),w=t.isBlob,E=j("../common/utils/isFile"),f=E.isFile,k=D;k.append=function(C,x,y){var _;return b.default.async(function(I){for(;;)switch(I.prev=I.next){case 0:return y=y||{},y.position===void 0&&(y.position="0"),y.subres={append:"",position:y.position},y.method="POST",I.next=6,b.default.awrap(this.put(C,x,y));case 6:return _=I.sent,_.nextAppendPosition=_.res.headers["x-oss-next-append-position"],I.abrupt("return",_);case 9:case"end":return I.stop()}},null,this)},k.put=function(C,x,y){var _,M,I,N,G,H,B;return b.default.async(function(U){for(;;)switch(U.prev=U.next){case 0:if(_=void 0,y=y||{},C=this._objectName(C),!c.buffer(x)){U.next=7;break}_=x,U.next=33;break;case 7:if(!(w(x)||f(x))){U.next=32;break}return y.mime||(f(x)?y.mime=m.getType(h.extname(x.name)):y.mime=x.type),M=this._createStream(x,0,x.size),U.next=12,b.default.awrap(this._getFileSize(x));case 12:return y.contentLength=U.sent,U.prev=13,U.next=16,b.default.awrap(this.putStream(C,M,y));case 16:return I=U.sent,U.abrupt("return",I);case 20:if(U.prev=20,U.t0=U.catch(13),!(U.t0.code==="RequestTimeTooSkewed")){U.next=29;break}return this.options.amendTimeSkewed=+new Date(U.t0.serverTime)-new Date,U.next=26,b.default.awrap(this.put(C,x,y));case 26:return U.abrupt("return",U.sent);case 29:throw U.t0;case 30:U.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return y.headers=y.headers||{},this._convertMetaToHeaders(y.meta,y.headers),N=y.method||"PUT",G=this._objectRequestParams(N,C,y),s.encodeCallback(G,y),G.mime=y.mime,G.content=_,G.successStatuses=[200],U.next=43,b.default.awrap(this.request(G));case 43:return H=U.sent,B={name:C,url:this._objectUrl(C),res:H.res},G.headers&&G.headers["x-oss-callback"]&&(B.data=JSON.parse(H.data.toString())),U.abrupt("return",B);case 47:case"end":return U.stop()}},null,this,[[13,20]])},k.putStream=function(C,x,y){var _,M,I,N;return b.default.async(function(H){for(;;)switch(H.prev=H.next){case 0:return y=y||{},y.headers=y.headers||{},C=this._objectName(C),y.contentLength?y.headers["Content-Length"]=y.contentLength:y.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(y.meta,y.headers),_=y.method||"PUT",M=this._objectRequestParams(_,C,y),s.encodeCallback(M,y),M.mime=y.mime,M.stream=x,M.successStatuses=[200],H.next=13,b.default.awrap(this.request(M));case 13:return I=H.sent,N={name:C,url:this._objectUrl(C),res:I.res},M.headers&&M.headers["x-oss-callback"]&&(N.data=JSON.parse(I.data.toString())),H.abrupt("return",N);case 17:case"end":return H.stop()}},null,this)},a(k,j("../common/object/copyObject")),a(k,j("../common/object/getObjectTagging")),a(k,j("../common/object/putObjectTagging")),a(k,j("../common/object/deleteObjectTagging")),a(k,j("../common/image")),a(k,j("../common/object/getBucketVersions")),a(k,j("../common/object/getACL")),a(k,j("../common/object/putACL")),a(k,j("../common/object/head")),a(k,j("../common/object/delete")),a(k,j("../common/object/get")),a(k,j("../common/object/putSymlink")),a(k,j("../common/object/getSymlink")),a(k,j("../common/object/deleteMulti")),a(k,j("../common/object/getObjectMeta")),k.putMeta=function(C,x,y){var _;return b.default.async(function(I){for(;;)switch(I.prev=I.next){case 0:return I.next=2,b.default.awrap(this.copy(C,C,{meta:x||{},timeout:y&&y.timeout,ctx:y&&y.ctx}));case 2:return _=I.sent,I.abrupt("return",_);case 4:case"end":return I.stop()}},null,this)},k.list=function(C,x){var y,_,M,I,N;return b.default.async(function(H){for(;;)switch(H.prev=H.next){case 0:return y=this._objectRequestParams("GET","",x),y.query=C,y.xmlResponse=!0,y.successStatuses=[200],H.next=6,b.default.awrap(this.request(y));case 6:return _=H.sent,M=_.data.Contents,I=this,M&&(Array.isArray(M)||(M=[M]),M=M.map(function(B){return{name:B.Key,url:I._objectUrl(B.Key),lastModified:B.LastModified,etag:B.ETag,type:B.Type,size:Number(B.Size),storageClass:B.StorageClass,owner:{id:B.Owner.ID,displayName:B.Owner.DisplayName}}})),N=_.data.CommonPrefixes||null,N&&(Array.isArray(N)||(N=[N]),N=N.map(function(B){return B.Prefix})),H.abrupt("return",{res:_.res,objects:M,prefixes:N,nextMarker:_.data.NextMarker||null,isTruncated:_.data.IsTruncated==="true"});case 13:case"end":return H.stop()}},null,this)},k.restore=function(C,x){var y,_;return b.default.async(function(I){for(;;)switch(I.prev=I.next){case 0:return x=x||{},x.subres=(0,v.default)({restore:""},x.subres),x.versionId&&(x.subres.versionId=x.versionId),y=this._objectRequestParams("POST",C,x),y.successStatuses=[202],I.next=7,b.default.awrap(this.request(y));case 7:return _=I.sent,I.abrupt("return",{res:_.res});case 9:case"end":return I.stop()}},null,this)},k.signatureUrl=function(C,x){x=x||{},C=this._objectName(C),x.method=x.method||"GET";var y=l.timestamp()+(x.expires||1800),_={bucket:this.options.bucket,object:C},M=this._getResource(_);this.options.stsToken&&(x["security-token"]=this.options.stsToken);var I=r._signatureForURL(this.options.accessKeySecret,x,M,y),N=u.parse(this._getReqUrl(_));return N.query={OSSAccessKeyId:this.options.accessKeyId,Expires:y,Signature:I.Signature},o(I.subResource).to(N.query),N.format()},k.getObjectUrl=function(C,x){return x?x[x.length-1]!=="/"&&(x+="/"):x=this.options.endpoint.format(),x+this._escape(this._objectName(C))},k._objectUrl=function(C){return this._getReqUrl({bucket:this.options.bucket,object:C})},k.generateObjectUrl=function(O,C){if(C)C[C.length-1]!=="/"&&(C+="/");else{C=this.options.endpoint.format();var x=u.parse(C),y=this.options.bucket;x.hostname=y+"."+x.hostname,x.host=y+"."+x.host,C=x.format()}return C+this._escape(this._objectName(O))},k._objectRequestParams=function(C,x,y){if(!this.options.bucket)throw new Error("Please create a bucket first");y=y||{},x=this._objectName(x);var _={object:x,bucket:this.options.bucket,method:C,subres:y&&y.subres,timeout:y&&y.timeout,ctx:y&&y.ctx};return y.headers&&(_.headers={},o(y.headers).to(_.headers)),_},k._objectName=function(C){return C.replace(/^\/+/,"")},k._convertMetaToHeaders=function(C,x){if(!C)return;(0,P.default)(C).forEach(function(y){x["x-oss-meta-"+y]=C[y]})},k._deleteFileSafe=function(C){var x=this;return new g.default(function(y){n.exists(C,function(_){_?n.unlink(C,function(M){M&&x.debug("unlink %j error: %s",C,M,"error"),y()}):y()})})}},{"../common/callback":14,"../common/image":16,"../common/object/copyObject":19,"../common/object/delete":20,"../common/object/deleteMulti":21,"../common/object/deleteObjectTagging":22,"../common/object/get":23,"../common/object/getACL":24,"../common/object/getBucketVersions":25,"../common/object/getObjectMeta":26,"../common/object/getObjectTagging":27,"../common/object/getSymlink":28,"../common/object/head":29,"../common/object/putACL":30,"../common/object/putObjectTagging":31,"../common/object/putSymlink":32,"../common/signUtils":34,"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,"copy-to":76,fs:71,"is-type-of":289,"merge-descriptors":200,mime:202,path:205,url:238,utility:290}],5:[function(j,Y,D){"use strict";D.version="6.10.0"},{}],6:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=T(L);function T(S){return S&&S.__esModule?S:{default:S}}var P=j("../utils/checkBucketName"),p=P.checkBucketName,v=D;v.deleteBucketLifecycle=function(b,d){var l,n;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return p(b),l=this._bucketRequestParams("DELETE",b,"lifecycle",d),l.successStatuses=[204],u.next=5,g.default.awrap(this.request(l));case 5:return n=u.sent,u.abrupt("return",{res:n.res});case 7:case"end":return u.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=T(L);function T(S){return S&&S.__esModule?S:{default:S}}var P=j("../utils/checkBucketName"),p=P.checkBucketName,v=D;v.deleteBucketWebsite=function(b,d){var l,n;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return p(b),l=this._bucketRequestParams("DELETE",b,"website",d),l.successStatuses=[204],u.next=5,g.default.awrap(this.request(l));case 5:return n=u.sent,u.abrupt("return",{res:n.res});case 7:case"end":return u.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=T(L);function T(n){return n&&n.__esModule?n:{default:n}}var P=j("../utils/checkBucketName"),p=P.checkBucketName,v=j("../utils/isArray"),S=v.isArray,b=j("../utils/formatObjKey"),d=b.formatObjKey,l=D;l.getBucketLifecycle=function(c,u){var o,h,m;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p(c),o=this._bucketRequestParams("GET",c,"lifecycle",u),o.successStatuses=[200],o.xmlResponse=!0,r.next=6,g.default.awrap(this.request(o));case 6:return h=r.sent,m=h.data.Rule||null,m&&(S(m)||(m=[m]),m=m.map(function(a){return a.ID&&(a.id=a.ID,delete a.ID),a.Tag&&!S(a.Tag)&&(a.Tag=[a.Tag]),d(a,"firstLowerCase")})),r.abrupt("return",{rules:m,res:h.res});case 10:case"end":return r.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=T(L);function T(S){return S&&S.__esModule?S:{default:S}}var P=j("../utils/checkBucketName"),p=P.checkBucketName,v=D;v.getBucketVersioning=function(b,d){var l,n,c;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return p(b),l=this._bucketRequestParams("GET",b,"versioning",d),l.xmlResponse=!0,l.successStatuses=[200],o.next=6,g.default.awrap(this.request(l));case 6:return n=o.sent,c=n.data.Status,o.abrupt("return",{status:n.status,versionStatus:c,res:n.res});case 9:case"end":return o.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=T(L);function T(d){return d&&d.__esModule?d:{default:d}}var P=j("../utils/checkBucketName"),p=P.checkBucketName,v=j("../utils/isObject"),S=v.isObject,b=D;b.getBucketWebsite=function(l,n){var c,u,o;return g.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return p(l),c=this._bucketRequestParams("GET",l,"website",n),c.successStatuses=[200],c.xmlResponse=!0,m.next=6,g.default.awrap(this.request(c));case 6:return u=m.sent,o=[],u.data.RoutingRules&&u.data.RoutingRules.RoutingRule&&(S(u.data.RoutingRules.RoutingRule)?o=[u.data.RoutingRules.RoutingRule]:o=u.data.RoutingRules.RoutingRule),m.abrupt("return",{index:u.data.IndexDocument&&u.data.IndexDocument.Suffix||"",supportSubDir:u.data.IndexDocument&&u.data.IndexDocument.SupportSubDir||"false",type:u.data.IndexDocument&&u.data.IndexDocument.Type,routingRules:o,error:u.data.ErrorDocument&&u.data.ErrorDocument.Key||null,res:u.res});case 10:case"end":return m.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=T(L);function T(f){return f&&f.__esModule?f:{default:f}}var P=j("../utils/checkBucketName"),p=P.checkBucketName,v=j("../utils/isArray"),S=v.isArray,b=j("../utils/deepCopy"),d=b.deepCopy,l=j("../utils/isObject"),n=l.isObject,c=j("../utils/obj2xml"),u=c.obj2xml,o=j("../utils/checkObjectTag"),h=o.checkObjectTag,m=j("../utils/getStrBytesCount"),s=m.getStrBytesCount,r=D;r.putBucketLifecycle=function(k,O,C){var x,y,_,M,I;return g.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:if(p(k),S(O)){G.next=3;break}throw new Error("rules must be Array");case 3:return x=this._bucketRequestParams("PUT",k,"lifecycle",C),y=[],_={LifecycleConfiguration:{Rule:y}},O.forEach(function(H){a(H),E(H),H.id&&(H.ID=H.id,delete H.id),y.push(H)}),M=u(_,{headers:!0,firstUpperCase:!0}),x.content=M,x.mime="xml",x.successStatuses=[200],G.next=13,g.default.awrap(this.request(x));case 13:return I=G.sent,G.abrupt("return",{res:I.res});case 15:case"end":return G.stop()}},null,this)};function a(f){f.days&&(f.expiration={days:f.days}),f.date&&(f.expiration={createdBeforeDate:f.date})}function t(f,k){var O=f.days,C=f.createdBeforeDate;if(!O&&!C)throw new Error(k+" must includes days or createdBeforeDate");if(O&&!/^[1-9][0-9]*$/.test(O))throw new Error("days must be a positive integer");if(C&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(C))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function w(f){if(!S(f)&&!n(f))throw new Error("tag must be Object or Array");f=n(f)?[f]:f;var k={},O=d(f);O.forEach(function(C){k[C.key]=C.value}),h(k)}function E(f){if(f.id&&s(f.id)>255)throw new Error("ID is composed of 255 bytes at most");if(f.prefix===""||f.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(f.status))throw new Error("Status must be Enabled or Disabled");if(f.transition){if(!["IA","Archive"].includes(f.transition.storageClass))throw new Error("StorageClass must be IA or Archive");t(f.transition,"Transition")}if(f.expiration){if(!f.expiration.expiredObjectDeleteMarker)t(f.expiration,"Expiration");else if(f.expiration.days||f.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(f.abortMultipartUpload&&t(f.abortMultipartUpload,"AbortMultipartUpload"),!f.expiration&&!f.abortMultipartUpload&&!f.transition&&!f.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(f.tag){if(f.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");w(f.tag)}}},{"../utils/checkBucketName":35,"../utils/checkObjectTag":36,"../utils/deepCopy":39,"../utils/getStrBytesCount":41,"../utils/isArray":42,"../utils/isObject":46,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],12:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=T(L);function T(d){return d&&d.__esModule?d:{default:d}}var P=j("../utils/checkBucketName"),p=P.checkBucketName,v=j("../utils/obj2xml"),S=v.obj2xml,b=D;b.putBucketVersioning=function(l,n){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u,o,h;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:if(p(l),["Enabled","Suspended"].includes(n)){s.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return u=this._bucketRequestParams("PUT",l,"versioning",c),o={VersioningConfiguration:{Status:n}},u.mime="xml",u.content=S(o,{headers:!0}),s.next=9,g.default.awrap(this.request(u));case 9:return h=s.sent,s.abrupt("return",{res:h.res,status:h.status});case 11:case"end":return s.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=T(L);function T(n){return n&&n.__esModule?n:{default:n}}var P=j("../utils/checkBucketName"),p=P.checkBucketName,v=j("../utils/obj2xml"),S=v.obj2xml,b=j("../utils/isArray"),d=b.isArray,l=D;l.putBucketWebsite=function(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments[2],h,m,s,r,a;return g.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:if(p(c),h=this._bucketRequestParams("PUT",c,"website",o),m={Suffix:u.index||"index.html"},s={IndexDocument:m},r={WebsiteConfiguration:s},u.supportSubDir&&(m.SupportSubDir=u.supportSubDir),u.type&&(m.Type=u.type),u.error&&(s.ErrorDocument={Key:u.error}),!(u.routingRules!==void 0)){w.next=12;break}if(d(u.routingRules)){w.next=11;break}throw new Error("RoutingRules must be Array");case 11:s.RoutingRules={RoutingRule:u.routingRules};case 12:return r=S(r),h.content=r,h.mime="xml",h.successStatuses=[200],w.next=18,g.default.awrap(this.request(h));case 18:return a=w.sent,w.abrupt("return",{res:a.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(j,Y,D){(function(L){"use strict";var g=j("babel-runtime/core-js/object/keys"),T=v(g),P=j("babel-runtime/core-js/json/stringify"),p=v(P);function v(S){return S&&S.__esModule?S:{default:S}}D.encodeCallback=function(b,d){if(b.headers=b.headers||{},!Object.prototype.hasOwnProperty.call(b.headers,"x-oss-callback")&&d.callback){var l={callbackUrl:encodeURI(d.callback.url),callbackBody:d.callback.body};d.callback.host&&(l.callbackHost=d.callback.host),d.callback.contentType&&(l.callbackBodyType=d.callback.contentType);var n=L.from((0,p.default)(l)).toString("base64");if(b.headers["x-oss-callback"]=n,d.callback.customValue){var c={};(0,T.default)(d.callback.customValue).forEach(function(u){c["x:"+u]=d.callback.customValue[u]}),b.headers["x-oss-callback-var"]=L.from((0,p.default)(c)).toString("base64")}}}}).call(this,j("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/assign"),g=T(L);function T(l){return l&&l.__esModule?l:{default:l}}var P=j("humanize-ms"),p=j("url"),v=j("../utils/checkBucketName"),S=v.checkBucketName;function b(l,n){var c=p.parse(l);if(c.protocol||(c=p.parse("http"+(n?"s":"")+"://"+l)),c.protocol!=="http:"&&c.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return c}function d(l,n,c){var u=c?"https://":"http://",o=n?"-internal.aliyuncs.com":".aliyuncs.com",h="vpc100-oss-cn-";return l.substr(0,h.length)===h&&(o=".aliyuncs.com"),p.parse(u+l+o)}Y.exports=function(l){if(!l||!l.accessKeyId||!l.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");l.bucket&&S(l.bucket);var n=(0,g.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},l);if(n.accessKeyId=n.accessKeyId.trim(),n.accessKeySecret=n.accessKeySecret.trim(),n.timeout&&(n.timeout=P(n.timeout)),n.endpoint)n.endpoint=b(n.endpoint,n.secure);else if(n.region)n.endpoint=d(n.region,n.internal,n.secure);else throw new Error("require options.endpoint or options.region");return n.inited=!0,n}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(j,Y,D){"use strict";var L=j("merge-descriptors"),g=D;L(g,j("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=T(L);function T(n){return n&&n.__esModule?n:{default:n}}var P=j("../utils/checkBucketName"),p=P.checkBucketName,v=j("querystring"),S=j("js-base64"),b=S.Base64.encode,d=D;d.processObjectSave=function(c,u,o,h){var m,s,r,a;return g.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:return l(c,"sourceObject"),l(u,"targetObject"),l(o,"process"),u=this._objectName(u),h&&p(h),m=this._objectRequestParams("POST",c,{subres:"x-oss-process"}),s=h?",b_"+b(h):"",u=b(u),r={"x-oss-process":o+"|sys/saveas,o_"+u+s},m.content=v.stringify(r),w.next=12,g.default.awrap(this.request(m));case 12:return a=w.sent,w.abrupt("return",{res:a.res,status:a.res.status});case 14:case"end":return w.stop()}},null,this)};function l(n,c){if(!n)throw new Error(c+" is required");if(typeof n!="string")throw new Error(c+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=T(L);function T(d){return d&&d.__esModule?d:{default:d}}var P=j("copy-to"),p=j("./callback"),v=j("./utils/deepCopy"),S=v.deepCopy,b=D;b.listUploads=function(l,n){var c,u,o,h;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return n=n||{},c={},P(n).to(c),c.subres="uploads",u=this._objectRequestParams("GET","",c),u.query=l,u.xmlResponse=!0,u.successStatuses=[200],s.next=10,g.default.awrap(this.request(u));case 10:return o=s.sent,h=o.data.Upload||[],Array.isArray(h)||(h=[h]),h=h.map(function(r){return{name:r.Key,uploadId:r.UploadId,initiated:r.Initiated}}),s.abrupt("return",{res:o.res,uploads:h,bucket:o.data.Bucket,nextKeyMarker:o.data.NextKeyMarker,nextUploadIdMarker:o.data.NextUploadIdMarker,isTruncated:o.data.IsTruncated==="true"});case 15:case"end":return s.stop()}},null,this)},b.listParts=function(l,n,c,u){var o,h,m;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return u=u||{},o={},P(u).to(o),o.subres={uploadId:n},h=this._objectRequestParams("GET",l,o),h.query=c,h.xmlResponse=!0,h.successStatuses=[200],r.next=10,g.default.awrap(this.request(h));case 10:return m=r.sent,r.abrupt("return",{res:m.res,uploadId:m.data.UploadId,bucket:m.data.Bucket,name:m.data.Key,partNumberMarker:m.data.PartNumberMarker,nextPartNumberMarker:m.data.NextPartNumberMarker,maxParts:m.data.MaxParts,isTruncated:m.data.IsTruncated,parts:m.data.Part||[]});case 12:case"end":return r.stop()}},null,this)},b.abortMultipartUpload=function(l,n,c){var u,o,h;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return this._stop(),c=c||{},u={},P(c).to(u),u.subres={uploadId:n},o=this._objectRequestParams("DELETE",l,u),o.successStatuses=[204],s.next=9,g.default.awrap(this.request(o));case 9:return h=s.sent,s.abrupt("return",{res:h.res});case 11:case"end":return s.stop()}},null,this)},b.initMultipartUpload=function(l,n){var c,u,o;return g.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return n=n||{},c={},P(n).to(c),c.headers=c.headers||{},this._convertMetaToHeaders(n.meta,c.headers),c.subres="uploads",u=this._objectRequestParams("POST",l,c),u.mime=n.mime,u.xmlResponse=!0,u.successStatuses=[200],m.next=12,g.default.awrap(this.request(u));case 12:return o=m.sent,m.abrupt("return",{res:o.res,bucket:o.data.Bucket,name:o.data.Key,uploadId:o.data.UploadId});case 14:case"end":return m.stop()}},null,this)},b.uploadPart=function(l,n,c,u,o,h,m){var s;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return s={stream:this._createStream(u,o,h),size:h-o},a.next=3,g.default.awrap(this._uploadPart(l,n,c,s,m));case 3:return a.abrupt("return",a.sent);case 4:case"end":return a.stop()}},null,this)},b.completeMultipartUpload=function(l,n,c,u){var o,h,m,s,r,a,t,w;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:for(o=c.concat().sort(function(k,O){return k.number-O.number}).filter(function(k,O,C){return!O||k.number!==C[O-1].number}),h=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,m=0;m<o.length;m++)s=o[m],h+=`<Part>
|
|
|
`,h+="<PartNumber>"+s.number+`</PartNumber>
|
|
|
`,h+="<ETag>"+s.etag+`</ETag>
|
|
|
`,h+=`</Part>
|
|
|
`;return h+="</CompleteMultipartUpload>",u=u||{},r={},r=S(u),r.headers&&delete r.headers["x-oss-server-side-encryption"],r.subres={uploadId:n},a=this._objectRequestParams("POST",l,r),p.encodeCallback(a,r),a.mime="xml",a.content=h,a.headers&&a.headers["x-oss-callback"]||(a.xmlResponse=!0),a.successStatuses=[200],f.next=17,g.default.awrap(this.request(a));case 17:return t=f.sent,w={res:t.res,bucket:a.bucket,name:l,etag:t.res.headers.etag},a.headers&&a.headers["x-oss-callback"]&&(w.data=JSON.parse(t.data.toString())),f.abrupt("return",w);case 21:case"end":return f.stop()}},null,this)},b._uploadPart=function(l,n,c,u,o){var h,m,s;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return o=o||{},h={},P(o).to(h),h.headers={"Content-Length":u.size},h.subres={partNumber:c,uploadId:n},m=this._objectRequestParams("PUT",l,h),m.mime=h.mime,m.stream=u.stream,m.successStatuses=[200],a.next=11,g.default.awrap(this.request(m));case 11:if(s=a.sent,s.res.headers.etag){a.next=14;break}throw new Error(`Please set the etag of expose-headers in OSS
|
|
|
https://help.aliyun.com/document_detail/32069.html`);case 14:return u.stream=null,m.stream=null,a.abrupt("return",{name:l,etag:s.res.headers.etag,res:s.res});case 17:case"end":return a.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=S(L),T=j("babel-runtime/core-js/object/keys"),P=S(T),p=j("babel-runtime/helpers/typeof"),v=S(p);function S(n){return n&&n.__esModule?n:{default:n}}var b=j("../utils/checkBucketName"),d=b.checkBucketName,l=D;l.copy=function(c,u,o,h){var m,s,r;return g.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:return(typeof o=="undefined"?"undefined":(0,v.default)(o))==="object"&&(h=o),h=h||{},h.headers=h.headers||{},(0,P.default)(h.headers).forEach(function(w){h.headers["x-oss-copy-source-"+w.toLowerCase()]=h.headers[w]}),h.meta&&(h.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(h.meta,h.headers),u=this._getSourceName(u,o),h.versionId&&(u=u+"?versionId="+h.versionId),h.headers["x-oss-copy-source"]=u,m=this._objectRequestParams("PUT",c,h),m.xmlResponse=!0,m.successStatuses=[200,304],t.next=14,g.default.awrap(this.request(m));case 14:return s=t.sent,r=s.data,r&&(r={etag:r.ETag,lastModified:r.LastModified}),t.abrupt("return",{data:r,res:s.res});case 18:case"end":return t.stop()}},null,this)},l._getSourceName=function(c,u){return typeof u=="string"?c=this._objectName(c):c[0]!=="/"?u=this.options.bucket:(u=c.replace(/\/(.+?)(\/.*)/,"$1"),c=c.replace(/(\/.+?\/)(.*)/,"$2")),d(u),c=encodeURI(c),c="/"+u+"/"+c,c}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(S){return S&&S.__esModule?S:{default:S}}var v=D;v.delete=function(b){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,n;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return d.subres=(0,P.default)({},d.subres),d.versionId&&(d.subres.versionId=d.versionId),l=this._objectRequestParams("DELETE",b,d),l.successStatuses=[204],u.next=6,g.default.awrap(this.request(l));case 6:return n=u.sent,u.abrupt("return",{res:n.res});case 8:case"end":return u.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(l){return l&&l.__esModule?l:{default:l}}var v=j("utility"),S=j("../utils/obj2xml"),b=S.obj2xml,d=D;d.deleteMulti=function(n){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,o,h,m,s,r,a,t,w,E,f,k;return g.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(u=[],!(!n||!n.length)){C.next=3;break}throw new Error("names is required");case 3:for(o=0;o<n.length;o++)h={},typeof n[o]=="string"?h.Key=v.escape(this._objectName(n[o])):(m=n[o],s=m.key,r=m.versionId,h.Key=v.escape(this._objectName(s)),h.VersionId=r),u.push(h);return a={Delete:{Quiet:!!c.quiet,Object:u}},t=b(a,{headers:!0}),c.subres=(0,P.default)({delete:""},c.subres),c.versionId&&(c.subres.versionId=c.versionId),w=this._objectRequestParams("POST","",c),w.mime="xml",w.content=t,w.xmlResponse=!0,w.successStatuses=[200],C.next=15,g.default.awrap(this.request(w));case 15:return E=C.sent,f=E.data,k=f&&f.Deleted||null,k&&(Array.isArray(k)||(k=[k])),C.abrupt("return",{res:E.res,deleted:k||[]});case 20:case"end":return C.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(S){return S&&S.__esModule?S:{default:S}}var v=D;v.deleteObjectTagging=function(b){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,n;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return d.subres=(0,P.default)({tagging:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),b=this._objectName(b),l=this._objectRequestParams("DELETE",b,d),l.successStatuses=[204],u.next=7,g.default.awrap(this.request(l));case 7:return n=u.sent,u.abrupt("return",{status:n.status,res:n.res});case 9:case"end":return u.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(d){return d&&d.__esModule?d:{default:d}}var v=j("fs"),S=j("is-type-of"),b=D;b.get=function(l,n){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u,o,h,m;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return u=null,o=!1,S.writableStream(n)?u=n:S.string(n)?(u=v.createWriteStream(n),o=!0):c=n,c=c||{},c.subres=(0,P.default)({},c.subres),c.versionId&&(c.subres.versionId=c.versionId),c.process&&(c.subres["x-oss-process"]=c.process),h=void 0,r.prev=8,m=this._objectRequestParams("GET",l,c),m.writeStream=u,m.successStatuses=[200,206,304],r.next=14,g.default.awrap(this.request(m));case 14:h=r.sent,o&&u.destroy(),r.next=25;break;case 18:if(r.prev=18,r.t0=r.catch(8),!o){r.next=24;break}return u.destroy(),r.next=24,g.default.awrap(this._deleteFileSafe(n));case 24:throw r.t0;case 25:return r.abrupt("return",{res:h.res,content:h.data});case 26:case"end":return r.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(S){return S&&S.__esModule?S:{default:S}}var v=D;v.getACL=function(b){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,n;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return d.subres=(0,P.default)({acl:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),b=this._objectName(b),l=this._objectRequestParams("GET",b,d),l.successStatuses=[200],l.xmlResponse=!0,u.next=8,g.default.awrap(this.request(l));case 8:return n=u.sent,u.abrupt("return",{acl:n.data.AccessControlList.Grant,owner:{id:n.data.Owner.ID,displayName:n.data.Owner.DisplayName},res:n.res});case 10:case"end":return u.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/keys"),g=S(L),T=j("babel-runtime/regenerator"),P=S(T),p=j("babel-runtime/core-js/object/assign"),v=S(p);function S(m){return m&&m.__esModule?m:{default:m}}var b=D,d=j("../utils/isObject"),l=d.isObject,n=j("../utils/isArray"),c=n.isArray;b.getBucketVersions=u,b.listObjectVersions=u;function u(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,a,t,w,E,f;return P.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!(m.versionIdMarker&&m.keyMarker===void 0)){O.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return s.subres=(0,v.default)({versions:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),r=this._objectRequestParams("GET","",s),r.xmlResponse=!0,r.successStatuses=[200],r.query=h(m),O.next=10,P.default.awrap(this.request(r));case 10:return a=O.sent,t=a.data.Version||[],w=a.data.DeleteMarker||[],E=this,t&&(Array.isArray(t)||(t=[t]),t=t.map(function(C){return{name:C.Key,url:E._objectUrl(C.Key),lastModified:C.LastModified,isLatest:C.IsLatest==="true",versionId:C.VersionId,etag:C.ETag,type:C.Type,size:Number(C.Size),storageClass:C.StorageClass,owner:{id:C.Owner.ID,displayName:C.Owner.DisplayName}}})),w&&(c(w)||(w=[w]),w=w.map(function(C){return{name:C.Key,lastModified:C.LastModified,versionId:C.VersionId,owner:{id:C.Owner.ID,displayName:C.Owner.DisplayName}}})),f=a.data.CommonPrefixes||null,f&&(c(f)||(f=[f]),f=f.map(function(C){return C.Prefix})),O.abrupt("return",{res:a.res,objects:t,deleteMarker:w,prefixes:f,nextMarker:a.data.NextMarker||null,NextVersionIdMarker:a.data.NextVersionIdMarker||null,isTruncated:a.data.IsTruncated==="true"});case 19:case"end":return O.stop()}},null,this)}function o(m){return m.replace(/([A-Z])/g,"-$1").toLowerCase()}function h(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s={};return l(m)&&(0,g.default)(m).forEach(function(r){s[o(r)]=m[r]}),s}},{"../utils/isArray":42,"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],26:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(S){return S&&S.__esModule?S:{default:S}}var v=D;v.getObjectMeta=function(b,d){var l,n;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return d=d||{},b=this._objectName(b),d.subres=(0,P.default)({objectMeta:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),l=this._objectRequestParams("HEAD",b,d),l.successStatuses=[200],u.next=8,g.default.awrap(this.request(l));case 8:return n=u.sent,u.abrupt("return",{status:n.status,res:n.res});case 10:case"end":return u.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(d){return d&&d.__esModule?d:{default:d}}var v=D,S=j("../utils/isObject"),b=S.isObject;v.getObjectTagging=function(l){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,u,o,h,m;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return n.subres=(0,P.default)({tagging:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),l=this._objectName(l),c=this._objectRequestParams("GET",l,n),c.successStatuses=[200],r.next=7,g.default.awrap(this.request(c));case 7:return u=r.sent,r.next=10,g.default.awrap(this.parseXML(u.data));case 10:return o=r.sent,h=o.TagSet.Tag,h=h&&b(h)?[h]:h||[],m={},h.forEach(function(a){m[a.Key]=a.Value}),r.abrupt("return",{status:u.status,res:u.res,tag:m});case 16:case"end":return r.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(S){return S&&S.__esModule?S:{default:S}}var v=D;v.getSymlink=function(b){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,n,c;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return d.subres=(0,P.default)({symlink:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),b=this._objectName(b),l=this._objectRequestParams("GET",b,d),l.successStatuses=[200],o.next=7,g.default.awrap(this.request(l));case 7:return n=o.sent,c=n.res.headers["x-oss-symlink-target"],o.abrupt("return",{targetName:decodeURIComponent(c),res:n.res});case 10:case"end":return o.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=S(L),T=j("babel-runtime/core-js/object/keys"),P=S(T),p=j("babel-runtime/core-js/object/assign"),v=S(p);function S(d){return d&&d.__esModule?d:{default:d}}var b=D;b.head=function(l){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,u,o;return g.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return n.subres=(0,v.default)({},n.subres),n.versionId&&(n.subres.versionId=n.versionId),c=this._objectRequestParams("HEAD",l,n),c.successStatuses=[200,304],m.next=6,g.default.awrap(this.request(c));case 6:return u=m.sent,o={meta:null,res:u.res,status:u.status},u.status===200&&(0,P.default)(u.headers).forEach(function(s){s.indexOf("x-oss-meta-")===0&&(o.meta||(o.meta={}),o.meta[s.substring(11)]=u.headers[s])}),m.abrupt("return",o);case 10:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(S){return S&&S.__esModule?S:{default:S}}var v=D;v.putACL=function(b,d,l){var n,c;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return l=l||{},l.subres=(0,P.default)({acl:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),l.headers=l.headers||{},l.headers["x-oss-object-acl"]=d,b=this._objectName(b),n=this._objectRequestParams("PUT",b,l),n.successStatuses=[200],o.next=10,g.default.awrap(this.request(n));case 10:return c=o.sent,o.abrupt("return",{res:c.res});case 12:case"end":return o.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=S(L),T=j("babel-runtime/core-js/object/keys"),P=S(T),p=j("babel-runtime/core-js/object/assign"),v=S(p);function S(u){return u&&u.__esModule?u:{default:u}}var b=j("../utils/obj2xml"),d=b.obj2xml,l=j("../utils/checkObjectTag"),n=l.checkObjectTag,c=D;c.putObjectTagging=function(o,h){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,r,a;return g.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:return n(h),m.subres=(0,v.default)({tagging:""},m.subres),m.versionId&&(m.subres.versionId=m.versionId),o=this._objectName(o),s=this._objectRequestParams("PUT",o,m),s.successStatuses=[200],h=(0,P.default)(h).map(function(E){return{Key:E,Value:h[E]}}),r={Tagging:{TagSet:{Tag:h}}},s.mime="xml",s.content=d(r),w.next=12,g.default.awrap(this.request(s));case 12:return a=w.sent,w.abrupt("return",{res:a.res,status:a.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(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/object/assign"),P=p(T);function p(S){return S&&S.__esModule?S:{default:S}}var v=D;v.putSymlink=function(b,d,l){var n,c;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return l=l||{},l.headers=l.headers||{},d=this._escape(this._objectName(d)),this._convertMetaToHeaders(l.meta,l.headers),l.headers["x-oss-symlink-target"]=d,l.subres=(0,P.default)({symlink:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),l.storageClass&&(l.headers["x-oss-storage-class"]=l.storageClass),b=this._objectName(b),n=this._objectRequestParams("PUT",b,l),n.successStatuses=[200],o.next=13,g.default.awrap(this.request(n));case 13:return c=o.sent,o.abrupt("return",{res:c.res});case 15:case"end":return o.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(j,Y,D){"use strict";var L=j("babel-runtime/regenerator"),g=p(L),T=j("babel-runtime/core-js/promise"),P=p(T);function p(S){return S&&S.__esModule?S:{default:S}}var v=D;v._parallelNode=function(b,d,l,n){var c,u,o,h,m,s,r,a;return g.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:c=this,u=[],o=[],h=b.length/d,m=b.length%d,s=m===0?h:(b.length-m)/d+1,r=1,a=0;case 8:if(!(a<b.length)){w.next=26;break}if(!c.isCancel()){w.next=11;break}return w.abrupt("break",26);case 11:if(n?o.push(l(c,b[a],n)):o.push(l(c,b[a])),!(o.length===d||r===s&&a===b.length-1)){w.next=23;break}return w.prev=13,r+=1,w.next=17,g.default.awrap(P.default.all(o));case 17:w.next=22;break;case 19:w.prev=19,w.t0=w.catch(13),u.push(w.t0);case 22:o=[];case 23:a++,w.next=8;break;case 26:return w.abrupt("return",u);case 27:case"end":return w.stop()}},null,this,[[13,19]])},v._parallel=function(b,d,l){var n=this;return new P.default(function(c){var u=[];if(d<=0||!b){c(u);return}function o(f){return function(){if(f===null)throw new Error("Callback was already called.");var k=f;f=null;for(var O=arguments.length,C=Array(O),x=0;x<O;x++)C[x]=arguments[x];k.apply(this,C)}}function h(f){var k=-1,O=f.length;return function(){return++k<O&&!n.isCancel()?{value:f[k],key:k}:null}}var m=h(b),s=!1,r=0,a=!1;function t(f,k){r-=1,f?(s=!0,u.push(f),c(u)):k==={}||s&&r<=0?(s=!0,c(u)):a||(n.isCancel()?c(u):E())}function w(f,k){l(f).then(function(O){k(null,O)}).catch(function(O){k(O)})}function E(){for(a=!0;r<d&&!s&&!n.isCancel();){var f=m();if(f===null||u.length>0){s=!0,r<=0&&c(u);return}r+=1,w(f.value,o(t))}a=!1}E()})},v.cancel=function(b){this.options.cancelFlag=!0,b&&this.abortMultipartUpload(b.name,b.uploadId,b.options)},v.isCancel=function(){return this.options.cancelFlag},v.resetCancelFlag=function(){this.options.cancelFlag=!1},v._stop=function(){this.options.cancelFlag=!0},v._makeCancelEvent=function(){var b={status:0,name:"cancel"};return b}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(j,Y,D){(function(L){"use strict";var g=j("babel-runtime/core-js/json/stringify"),T=v(g),P=j("babel-runtime/core-js/object/keys"),p=v(P);function v(d){return d&&d.__esModule?d:{default:d}}var S=j("./../../shims/crypto/crypto.js"),b=j("is-type-of");D.buildCanonicalizedResource=function(l,n){var c=""+l,u="?";if(b.string(n)&&n.trim()!=="")c+=u+n;else if(b.array(n))n.sort(),c+=u+n.join("&");else if(n){var o=function(s,r){return s[0]>r[0]?1:s[0]<r[0]?-1:0},h=function(s){c+=u+s,n[s]&&(c+="="+n[s]),u="&"};(0,p.default)(n).sort(o).forEach(h)}return c},D.buildCanonicalString=function(l,n,c,u){c=c||{};var o=c.headers||{},h="x-oss-",m=[],s={},r=[l.toUpperCase(),o["Content-Md5"]||"",o["Content-Type"]||o["Content-Type".toLowerCase()],u||o["x-oss-date"]];return(0,p.default)(o).forEach(function(a){var t=a.toLowerCase();t.indexOf(h)===0&&(s[t]=String(o[a]).trim())}),(0,p.default)(s).sort().forEach(function(a){m.push(a+":"+s[a])}),r=r.concat(m),r.push(this.buildCanonicalizedResource(n,c.parameters)),r.join(`
|
|
|
`)},D.computeSignature=function(l,n){var c=S.createHmac("sha1",l);return c.update(L.from(n,"utf8")).digest("base64")},D.authorization=function(l,n,c){return"OSS "+l+":"+this.computeSignature(n,c)},D._signatureForURL=function(l){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments[2],u=arguments[3],o={},h=n.subResource,m=h===void 0?{}:h;if(n.process){var s="x-oss-process";m[s]=n.process}if(n.trafficLimit){var r="x-oss-traffic-limit";m[r]=n.trafficLimit}if(n.response&&(0,p.default)(n.response).forEach(function(E){var f="response-"+E.toLowerCase();m[f]=n.response[E]}),(0,p.default)(n).forEach(function(E){var f=E.toLowerCase(),k=n[E];f.indexOf("x-oss-")===0?o[f]=k:(f.indexOf("content-md5")===0||f.indexOf("content-type")===0)&&(o[E]=k)}),Object.prototype.hasOwnProperty.call(n,"security-token")&&(m["security-token"]=n["security-token"]),Object.prototype.hasOwnProperty.call(n,"callback")){var a={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};if(n.callback.host&&(a.callbackHost=n.callback.host),n.callback.contentType&&(a.callbackBodyType=n.callback.contentType),m.callback=L.from((0,T.default)(a)).toString("base64"),n.callback.customValue){var t={};(0,p.default)(n.callback.customValue).forEach(function(E){t["x:"+E]=n.callback.customValue[E]}),m["callback-var"]=L.from((0,T.default)(t)).toString("base64")}}var w=this.buildCanonicalString(n.method,c,{headers:o,parameters:m},u.toString());return{Signature:this.computeSignature(l,w),subResource:m}}}).call(this,j("buffer").Buffer)},{"./../../shims/crypto/crypto.js":284,"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73,"is-type-of":289}],35:[function(j,Y,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.checkBucketName=void 0,D.checkBucketName=function(L,g){var T=g?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!T.test(L))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/entries"),g=T(L);function T(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(D,"__esModule",{value:!0}),D.checkObjectTag=void 0;var P=j("./checkValid"),p=P.checkValid,v=j("./isObject"),S=v.isObject,b=[{validator:function(c){if(typeof c!="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 (/)"}],d={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 l(n){if(!S(n))throw new Error("tag must be Object");var c=(0,g.default)(n);if(c.length>10)throw new Error("maximum of 10 tags for a object");var u=["key","value"];c.forEach(function(o){o.forEach(function(h,m){p(h,d[u[m]])})})}D.checkObjectTag=l},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(j,Y,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.checkValid=void 0;function L(g,T){T.forEach(function(P){if(P.validator)P.validator(g);else if(P.pattern&&!P.pattern.test(g))throw new Error(P.msg)})}D.checkValid=L},{}],38:[function(j,Y,D){(function(L){"use strict";var g=j("babel-runtime/core-js/object/assign"),T=P(g);function P(o){return o&&o.__esModule?o:{default:o}}Object.defineProperty(D,"__esModule",{value:!0}),D.createRequest=void 0;var p=j("./../../../shims/crypto/crypto.js"),v=j("debug")("ali-oss"),S=j("mime"),b=j("dateformat"),d=j("copy-to"),l=j("path");function n(o,h){return o[h]||o[h.toLowerCase()]}function c(o,h){delete o[h],delete o[h.toLowerCase()]}function u(o){var h=new Date;this.options.amendTimeSkewed&&(h=+new Date+this.options.amendTimeSkewed);var m={"x-oss-date":b(h,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(m["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,T.default)(m,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(m["x-oss-security-token"]=this.options.stsToken),d(o.headers).to(m),n(m,"Content-Type")||(o.mime&&o.mime.indexOf("/")>0?m["Content-Type"]=o.mime:m["Content-Type"]=S.getType(o.mime||l.extname(o.object||""))),n(m,"Content-Type")||c(m,"Content-Type"),o.content&&(m["Content-Md5"]=p.createHash("md5").update(L.from(o.content,"utf8")).digest("base64"),m["Content-Length"]||(m["Content-Length"]=o.content.length));var s=this._getResource(o);m.authorization=this.authorization(o.method,s,o.subres,m);var r=this._getReqUrl(o);v("request %s %s, with headers %j, !!stream: %s",o.method,r,m,!!o.stream);var a=o.timeout||this.options.timeout,t={method:o.method,content:o.content,stream:o.stream,headers:m,timeout:a,writeStream:o.writeStream,customResponse:o.customResponse,ctx:o.ctx||this.ctx};return this.agent&&(t.agent=this.agent),this.httpsAgent&&(t.httpsAgent=this.httpsAgent),{url:r,params:t}}D.createRequest=u}).call(this,j("buffer").Buffer)},{"./../../../shims/crypto/crypto.js":284,"babel-runtime/core-js/object/assign":54,buffer:73,"copy-to":76,dateformat:190,debug:288,mime:202,path:205}],39:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/keys"),g=p(L),T=j("babel-runtime/helpers/typeof"),P=p(T);function p(v){return v&&v.__esModule?v:{default:v}}Object.defineProperty(D,"__esModule",{value:!0}),D.deepCopy=void 0,D.deepCopy=function(v){if(v===null||(typeof v=="undefined"?"undefined":(0,P.default)(v))!=="object")return v;var S=Array.isArray(v)?[]:{};return(0,g.default)(v).forEach(function(b){S[b]=D.deepCopy(v[b])}),S}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/keys"),g=p(L),T=j("babel-runtime/helpers/typeof"),P=p(T);function p(b){return b&&b.__esModule?b:{default:b}}Object.defineProperty(D,"__esModule",{value:!0}),D.formatObjKey=void 0;function v(b,d){if(b===null||(typeof b=="undefined"?"undefined":(0,P.default)(b))!=="object")return b;var l=void 0;if(Array.isArray(b)){l=[];for(var n=0;n<b.length;n++)l.push(v(b[n],d))}else l={},(0,g.default)(b).forEach(function(c){l[S(c,d)]=v(b[c],d)});return l}D.formatObjKey=v;function S(b,d){return d==="firstUpperCase"?b=b.replace(/^./,function(l){return l.toUpperCase()}):d==="firstLowerCase"&&(b=b.replace(/^./,function(l){return l.toLowerCase()})),b}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(j,Y,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.getStrBytesCount=void 0;function L(g){for(var T=0,P=0;P<g.length;P++){var p=g.charAt(P);/^[\u00-\uff]$/.test(p)?T+=1:T+=2}return T}D.getStrBytesCount=L},{}],42:[function(j,Y,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isArray=void 0,D.isArray=function(L){return Object.prototype.toString.call(L)==="[object Array]"}},{}],43:[function(j,Y,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isBlob=void 0;function L(g){return typeof Blob!="undefined"&&g instanceof Blob}D.isBlob=L},{}],44:[function(j,Y,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isFile=void 0,D.isFile=function(L){return typeof File!="undefined"&&L instanceof File}},{}],45:[function(j,Y,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isIP=void 0,D.isIP=function(L){var g=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,T=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return g.test(L)||T.test(L)}},{}],46:[function(j,Y,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isObject=void 0,D.isObject=function(L){return Object.prototype.toString.call(L)==="[object Object]"}},{}],47:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/keys"),g=T(L);function T(S){return S&&S.__esModule?S:{default:S}}Object.defineProperty(D,"__esModule",{value:!0}),D.obj2xml=void 0;var P=j("./formatObjKey");function p(S){return Object.prototype.toString.call(S).replace(/(.*? |])/g,"").toLowerCase()}function v(S,b){var d="";return b&&b.headers&&(d=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
`),b&&b.firstUpperCase&&(S=P.formatObjKey(S,"firstUpperCase")),p(S)==="object"?(0,g.default)(S).forEach(function(l){p(S[l])==="string"||p(S[l])==="number"?d+="<"+l+">"+S[l]+"</"+l+">":p(S[l])==="object"?d+="<"+l+">"+v(S[l])+"</"+l+">":p(S[l])==="array"?d+=S[l].map(function(n){return"<"+l+">"+v(n)+"</"+l+">"}).join(""):d+="<"+l+">"+S[l].toString()+"</"+l+">"}):d+=S.toString(),d}D.obj2xml=v},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(j,Y,D){Y.exports=L,Y.exports.HttpsAgent=L;function L(){}},{}],49:[function(j,Y,D){Y.exports=j("./register")().Promise},{"./register":51}],50:[function(j,Y,D){"use strict";var L="@@any-promise/REGISTRATION",g=null;Y.exports=function(T,P){return function(v,S){v=v||null,S=S||{};var b=S.global!==!1;if(g===null&&b&&(g=T[L]||null),g!==null&&v!==null&&g.implementation!==v)throw new Error('any-promise already defined as "'+g.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return g===null&&(v!==null&&typeof S.Promise!="undefined"?g={Promise:S.Promise,implementation:v}:g=P(v),b&&(T[L]=g)),g}}},{}],51:[function(j,Y,D){"use strict";Y.exports=j("./loader")(window,L);function L(){if(typeof window.Promise=="undefined")throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}},{"./loader":50}],52:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(j,Y,D){Y.exports={default:j("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(j,Y,D){"use strict";D.__esModule=!0;var L=j("../core-js/symbol/iterator"),g=v(L),T=j("../core-js/symbol"),P=v(T),p=typeof P.default=="function"&&typeof g.default=="symbol"?function(S){return typeof S}:function(S){return S&&typeof P.default=="function"&&S.constructor===P.default&&S!==P.default.prototype?"symbol":typeof S};function v(S){return S&&S.__esModule?S:{default:S}}D.default=typeof P.default=="function"&&p(g.default)==="symbol"?function(S){return typeof S=="undefined"?"undefined":p(S)}:function(S){return S&&typeof P.default=="function"&&S.constructor===P.default&&S!==P.default.prototype?"symbol":typeof S=="undefined"?"undefined":p(S)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(j,Y,D){Y.exports=j("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(j,Y,D){"use strict";D.byteLength=b,D.toByteArray=l,D.fromByteArray=u;for(var L=[],g=[],T=typeof Uint8Array!="undefined"?Uint8Array:Array,P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,v=P.length;p<v;++p)L[p]=P[p],g[P.charCodeAt(p)]=p;g["-".charCodeAt(0)]=62,g["_".charCodeAt(0)]=63;function S(o){var h=o.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var m=o.indexOf("=");m===-1&&(m=h);var s=m===h?0:4-m%4;return[m,s]}function b(o){var h=S(o),m=h[0],s=h[1];return(m+s)*3/4-s}function d(o,h,m){return(h+m)*3/4-m}function l(o){var h,m=S(o),s=m[0],r=m[1],a=new T(d(o,s,r)),t=0,w=r>0?s-4:s,E;for(E=0;E<w;E+=4)h=g[o.charCodeAt(E)]<<18|g[o.charCodeAt(E+1)]<<12|g[o.charCodeAt(E+2)]<<6|g[o.charCodeAt(E+3)],a[t++]=h>>16&255,a[t++]=h>>8&255,a[t++]=h&255;return r===2&&(h=g[o.charCodeAt(E)]<<2|g[o.charCodeAt(E+1)]>>4,a[t++]=h&255),r===1&&(h=g[o.charCodeAt(E)]<<10|g[o.charCodeAt(E+1)]<<4|g[o.charCodeAt(E+2)]>>2,a[t++]=h>>8&255,a[t++]=h&255),a}function n(o){return L[o>>18&63]+L[o>>12&63]+L[o>>6&63]+L[o&63]}function c(o,h,m){for(var s,r=[],a=h;a<m;a+=3)s=(o[a]<<16&16711680)+(o[a+1]<<8&65280)+(o[a+2]&255),r.push(n(s));return r.join("")}function u(o){for(var h,m=o.length,s=m%3,r=[],a=16383,t=0,w=m-s;t<w;t+=a)r.push(c(o,t,t+a>w?w:t+a));return s===1?(h=o[m-1],r.push(L[h>>2]+L[h<<4&63]+"==")):s===2&&(h=(o[m-2]<<8)+o[m-1],r.push(L[h>>10]+L[h>>4&63]+L[h<<2&63]+"=")),r.join("")}},{}],70:[function(j,Y,D){/*!
|
|
|
* Bowser - a browser detector
|
|
|
* https://github.com/ded/bowser
|
|
|
* MIT License | (c) Dustin Diaz 2015
|
|
|
*/!function(L,g,T){typeof Y!="undefined"&&Y.exports?Y.exports=T():typeof define=="function"&&define.amd?define(g,T):L[g]=T()}(this,"bowser",function(){var L=!0;function g(d){function l(K){var U=d.match(K);return U&&U.length>1&&U[1]||""}function n(K){var U=d.match(K);return U&&U.length>1&&U[2]||""}var c=l(/(ipod|iphone|ipad)/i).toLowerCase(),u=/like android/i.test(d),o=!u&&/android/i.test(d),h=/nexus\s*[0-6]\s*/i.test(d),m=!h&&/nexus\s*[0-9]+/i.test(d),s=/CrOS/.test(d),r=/silk/i.test(d),a=/sailfish/i.test(d),t=/tizen/i.test(d),w=/(web|hpw)(o|0)s/i.test(d),E=/windows phone/i.test(d),f=/SamsungBrowser/i.test(d),k=!E&&/windows/i.test(d),O=!c&&!r&&/macintosh/i.test(d),C=!o&&!a&&!t&&!w&&/linux/i.test(d),x=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),y=l(/version\/(\d+(\.\d+)?)/i),_=/tablet/i.test(d)&&!/tablet pc/i.test(d),M=!_&&/[^-]mobi/i.test(d),I=/xbox/i.test(d),N;/opera/i.test(d)?N={name:"Opera",opera:L,version:y||l(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(d)?N={name:"Opera",opera:L,version:l(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||y}:/SamsungBrowser/i.test(d)?N={name:"Samsung Internet for Android",samsungBrowser:L,version:y||l(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(d)?N={name:"NAVER Whale browser",whale:L,version:l(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(d)?N={name:"MZ Browser",mzbrowser:L,version:l(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(d)?N={name:"Opera Coast",coast:L,version:y||l(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(d)?N={name:"Focus",focus:L,version:l(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(d)?N={name:"Yandex Browser",yandexbrowser:L,version:y||l(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(d)?N={name:"UC Browser",ucbrowser:L,version:l(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(d)?N={name:"Maxthon",maxthon:L,version:l(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(d)?N={name:"Epiphany",epiphany:L,version:l(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(d)?N={name:"Puffin",puffin:L,version:l(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(d)?N={name:"Sleipnir",sleipnir:L,version:l(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(d)?N={name:"K-Meleon",kMeleon:L,version:l(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:E?(N={name:"Windows Phone",osname:"Windows Phone",windowsphone:L},x?(N.msedge=L,N.version=x):(N.msie=L,N.version=l(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(d)?N={name:"Internet Explorer",msie:L,version:l(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:s?N={name:"Chrome",osname:"Chrome OS",chromeos:L,chromeBook:L,chrome:L,version:l(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(d)?N={name:"Microsoft Edge",msedge:L,version:x}:/vivaldi/i.test(d)?N={name:"Vivaldi",vivaldi:L,version:l(/vivaldi\/(\d+(\.\d+)?)/i)||y}:a?N={name:"Sailfish",osname:"Sailfish OS",sailfish:L,version:l(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(d)?N={name:"SeaMonkey",seamonkey:L,version:l(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(d)?(N={name:"Firefox",firefox:L,version:l(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(d)&&(N.firefoxos=L,N.osname="Firefox OS")):r?N={name:"Amazon Silk",silk:L,version:l(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(d)?N={name:"PhantomJS",phantom:L,version:l(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(d)?N={name:"SlimerJS",slimer:L,version:l(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(d)||/rim\stablet/i.test(d)?N={name:"BlackBerry",osname:"BlackBerry OS",blackberry:L,version:y||l(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:w?(N={name:"WebOS",osname:"WebOS",webos:L,version:y||l(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(d)&&(N.touchpad=L)):/bada/i.test(d)?N={name:"Bada",osname:"Bada",bada:L,version:l(/dolfin\/(\d+(\.\d+)?)/i)}:t?N={name:"Tizen",osname:"Tizen",tizen:L,version:l(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||y}:/qupzilla/i.test(d)?N={name:"QupZilla",qupzilla:L,version:l(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||y}:/chromium/i.test(d)?N={name:"Chromium",chromium:L,version:l(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||y}:/chrome|crios|crmo/i.test(d)?N={name:"Chrome",chrome:L,version:l(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:o?N={name:"Android",version:y}:/safari|applewebkit/i.test(d)?(N={name:"Safari",safari:L},y&&(N.version=y)):c?(N={name:c=="iphone"?"iPhone":c=="ipad"?"iPad":"iPod"},y&&(N.version=y)):/googlebot/i.test(d)?N={name:"Googlebot",googlebot:L,version:l(/googlebot\/(\d+(\.\d+))/i)||y}:N={name:l(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!N.msedge&&/(apple)?webkit/i.test(d)?(/(apple)?webkit\/537\.36/i.test(d)?(N.name=N.name||"Blink",N.blink=L):(N.name=N.name||"Webkit",N.webkit=L),!N.version&&y&&(N.version=y)):!N.opera&&/gecko\//i.test(d)&&(N.name=N.name||"Gecko",N.gecko=L,N.version=N.version||l(/gecko\/(\d+(\.\d+)?)/i)),!N.windowsphone&&(o||N.silk)?(N.android=L,N.osname="Android"):!N.windowsphone&&c?(N[c]=L,N.ios=L,N.osname="iOS"):O?(N.mac=L,N.osname="macOS"):I?(N.xbox=L,N.osname="Xbox"):k?(N.windows=L,N.osname="Windows"):C&&(N.linux=L,N.osname="Linux");function G(K){switch(K){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var H="";N.windows?H=G(l(/Windows ((NT|XP)( \d\d?.\d)?)/i)):N.windowsphone?H=l(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):N.mac?(H=l(/Mac OS X (\d+([_\.\s]\d+)*)/i),H=H.replace(/[_\s]/g,".")):c?(H=l(/os (\d+([_\s]\d+)*) like mac os x/i),H=H.replace(/[_\s]/g,".")):o?H=l(/android[ \/-](\d+(\.\d+)*)/i):N.webos?H=l(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):N.blackberry?H=l(/rim\stablet\sos\s(\d+(\.\d+)*)/i):N.bada?H=l(/bada\/(\d+(\.\d+)*)/i):N.tizen&&(H=l(/tizen[\/\s](\d+(\.\d+)*)/i)),H&&(N.osversion=H);var B=!N.windows&&H.split(".")[0];return _||m||c=="ipad"||o&&(B==3||B>=4&&!M)||N.silk?N.tablet=L:(M||c=="iphone"||c=="ipod"||o||h||N.blackberry||N.webos||N.bada)&&(N.mobile=L),N.msedge||N.msie&&N.version>=10||N.yandexbrowser&&N.version>=15||N.vivaldi&&N.version>=1||N.chrome&&N.version>=20||N.samsungBrowser&&N.version>=4||N.whale&&v([N.version,"1.0"])===1||N.mzbrowser&&v([N.version,"6.0"])===1||N.focus&&v([N.version,"1.0"])===1||N.firefox&&N.version>=20||N.safari&&N.version>=6||N.opera&&N.version>=10||N.ios&&N.osversion&&N.osversion.split(".")[0]>=6||N.blackberry&&N.version>=10.1||N.chromium&&N.version>=20?N.a=L:N.msie&&N.version<10||N.chrome&&N.version<20||N.firefox&&N.version<20||N.safari&&N.version<6||N.opera&&N.version<10||N.ios&&N.osversion&&N.osversion.split(".")[0]<6||N.chromium&&N.version<20?N.c=L:N.x=L,N}var T=g(typeof navigator!="undefined"&&navigator.userAgent||"");T.test=function(d){for(var l=0;l<d.length;++l){var n=d[l];if(typeof n=="string"&&n in T)return!0}return!1};function P(d){return d.split(".").length}function p(d,l){var n=[],c;if(Array.prototype.map)return Array.prototype.map.call(d,l);for(c=0;c<d.length;c++)n.push(l(d[c]));return n}function v(d){for(var l=Math.max(P(d[0]),P(d[1])),n=p(d,function(c){var u=l-P(c);return c=c+new Array(u+1).join(".0"),p(c.split("."),function(o){return new Array(20-o.length).join("0")+o}).reverse()});--l>=0;){if(n[0][l]>n[1][l])return 1;if(n[0][l]===n[1][l]){if(l===0)return 0}else return-1}}function S(d,l,n){var c=T;typeof l=="string"&&(n=l,l=void 0),l===void 0&&(l=!1),n&&(c=g(n));var u=""+c.version;for(var o in d)if(d.hasOwnProperty(o)&&c[o]){if(typeof d[o]!="string")throw new Error("Browser version in the minVersion map should be a string: "+o+": "+String(d));return v([u,d[o]])<0}return l}function b(d,l,n){return!S(d,l,n)}return T.isUnsupportedBrowser=S,T.compareVersions=v,T.check=b,T._detect=g,T.detect=g,T})},{}],71:[function(j,Y,D){},{}],72:[function(j,Y,D){var L=j("buffer").Buffer,g=L.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 T(b){if(b&&!g(b))throw new Error("Unknown encoding: "+b)}var P=D.StringDecoder=function(b){this.encoding=(b||"utf8").toLowerCase().replace(/[-_]/,""),T(b);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=v;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=S;break;default:this.write=p;return}this.charBuffer=new L(6),this.charReceived=0,this.charLength=0};P.prototype.write=function(b){for(var d="";this.charLength;){var l=b.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:b.length;if(b.copy(this.charBuffer,this.charReceived,0,l),this.charReceived+=l,this.charReceived<this.charLength)return"";b=b.slice(l,b.length),d=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var c=d.charCodeAt(d.length-1);if(c>=55296&&c<=56319){this.charLength+=this.surrogateSize,d="";continue}if(this.charReceived=this.charLength=0,b.length===0)return d;break}this.detectIncompleteChar(b);var n=b.length;this.charLength&&(b.copy(this.charBuffer,0,b.length-this.charReceived,n),n-=this.charReceived),d+=b.toString(this.encoding,0,n);var n=d.length-1,c=d.charCodeAt(n);if(c>=55296&&c<=56319){var u=this.surrogateSize;return this.charLength+=u,this.charReceived+=u,this.charBuffer.copy(this.charBuffer,u,0,u),b.copy(this.charBuffer,0,0,u),d.substring(0,n)}return d},P.prototype.detectIncompleteChar=function(b){for(var d=b.length>=3?3:b.length;d>0;d--){var l=b[b.length-d];if(d==1&&l>>5==6){this.charLength=2;break}if(d<=2&&l>>4==14){this.charLength=3;break}if(d<=3&&l>>3==30){this.charLength=4;break}}this.charReceived=d},P.prototype.end=function(b){var d="";if(b&&b.length&&(d=this.write(b)),this.charReceived){var l=this.charReceived,n=this.charBuffer,c=this.encoding;d+=n.slice(0,l).toString(c)}return d};function p(b){return b.toString(this.encoding)}function v(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(j,Y,D){(function(L,g){/*!
|
|
|
* The buffer module from node.js, for the browser.
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
|
* @license MIT
|
|
|
*/"use strict";var T=j("base64-js"),P=j("ieee754"),p=j("isarray");D.Buffer=g,D.SlowBuffer=r,D.INSPECT_MAX_BYTES=50,g.TYPED_ARRAY_SUPPORT=L.TYPED_ARRAY_SUPPORT!==void 0?L.TYPED_ARRAY_SUPPORT:v(),D.kMaxLength=S();function v(){try{var q=new Uint8Array(1);return q.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},q.foo()===42&&typeof q.subarray=="function"&&q.subarray(1,1).byteLength===0}catch(Q){return!1}}function S(){return g.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function b(q,Q){if(S()<Q)throw new RangeError("Invalid typed array length");return g.TYPED_ARRAY_SUPPORT?(q=new Uint8Array(Q),q.__proto__=g.prototype):(q===null&&(q=new g(Q)),q.length=Q),q}function g(q,Q,V){if(!g.TYPED_ARRAY_SUPPORT&&!(this instanceof g))return new g(q,Q,V);if(typeof q=="number"){if(typeof Q=="string")throw new Error("If encoding is specified then the first argument must be a string");return c(this,q)}return d(this,q,Q,V)}g.poolSize=8192,g._augment=function(q){return q.__proto__=g.prototype,q};function d(q,Q,V,Z){if(typeof Q=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Q instanceof ArrayBuffer?h(q,Q,V,Z):typeof Q=="string"?u(q,Q,V):m(q,Q)}g.from=function(q,Q,V){return d(null,q,Q,V)},g.TYPED_ARRAY_SUPPORT&&(g.prototype.__proto__=Uint8Array.prototype,g.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&g[Symbol.species]===g&&Object.defineProperty(g,Symbol.species,{value:null,configurable:!0}));function l(q){if(typeof q!="number")throw new TypeError('"size" argument must be a number');if(q<0)throw new RangeError('"size" argument must not be negative')}function n(q,Q,V,Z){return l(Q),Q<=0?b(q,Q):V!==void 0?typeof Z=="string"?b(q,Q).fill(V,Z):b(q,Q).fill(V):b(q,Q)}g.alloc=function(q,Q,V){return n(null,q,Q,V)};function c(q,Q){if(l(Q),q=b(q,Q<0?0:s(Q)|0),!g.TYPED_ARRAY_SUPPORT)for(var V=0;V<Q;++V)q[V]=0;return q}g.allocUnsafe=function(q){return c(null,q)},g.allocUnsafeSlow=function(q){return c(null,q)};function u(q,Q,V){if((typeof V!="string"||V==="")&&(V="utf8"),!g.isEncoding(V))throw new TypeError('"encoding" must be a valid string encoding');var Z=a(Q,V)|0;q=b(q,Z);var be=q.write(Q,V);return be!==Z&&(q=q.slice(0,be)),q}function o(q,Q){var V=Q.length<0?0:s(Q.length)|0;q=b(q,V);for(var Z=0;Z<V;Z+=1)q[Z]=Q[Z]&255;return q}function h(q,Q,V,Z){if(Q.byteLength,V<0||Q.byteLength<V)throw new RangeError("'offset' is out of bounds");if(Q.byteLength<V+(Z||0))throw new RangeError("'length' is out of bounds");return V===void 0&&Z===void 0?Q=new Uint8Array(Q):Z===void 0?Q=new Uint8Array(Q,V):Q=new Uint8Array(Q,V,Z),g.TYPED_ARRAY_SUPPORT?(q=Q,q.__proto__=g.prototype):q=o(q,Q),q}function m(q,Q){if(g.isBuffer(Q)){var V=s(Q.length)|0;return q=b(q,V),q.length===0||Q.copy(q,0,0,V),q}if(Q){if(typeof ArrayBuffer!="undefined"&&Q.buffer instanceof ArrayBuffer||"length"in Q)return typeof Q.length!="number"||ce(Q.length)?b(q,0):o(q,Q);if(Q.type==="Buffer"&&p(Q.data))return o(q,Q.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function s(q){if(q>=S())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S().toString(16)+" bytes");return q|0}function r(q){return+q!=q&&(q=0),g.alloc(+q)}g.isBuffer=function(Q){return!!(Q!=null&&Q._isBuffer)},g.compare=function(Q,V){if(!g.isBuffer(Q)||!g.isBuffer(V))throw new TypeError("Arguments must be Buffers");if(Q===V)return 0;for(var Z=Q.length,be=V.length,ge=0,Te=Math.min(Z,be);ge<Te;++ge)if(Q[ge]!==V[ge]){Z=Q[ge],be=V[ge];break}return Z<be?-1:be<Z?1:0},g.isEncoding=function(Q){switch(String(Q).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},g.concat=function(Q,V){if(!p(Q))throw new TypeError('"list" argument must be an Array of Buffers');if(Q.length===0)return g.alloc(0);var Z;if(V===void 0)for(V=0,Z=0;Z<Q.length;++Z)V+=Q[Z].length;var be=g.allocUnsafe(V),ge=0;for(Z=0;Z<Q.length;++Z){var Te=Q[Z];if(!g.isBuffer(Te))throw new TypeError('"list" argument must be an Array of Buffers');Te.copy(be,ge),ge+=Te.length}return be};function a(q,Q){if(g.isBuffer(q))return q.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(q)||q instanceof ArrayBuffer))return q.byteLength;typeof q!="string"&&(q=""+q);var V=q.length;if(V===0)return 0;for(var Z=!1;;)switch(Q){case"ascii":case"latin1":case"binary":return V;case"utf8":case"utf-8":case void 0:return le(q).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V*2;case"hex":return V>>>1;case"base64":return ee(q).length;default:if(Z)return le(q).length;Q=(""+Q).toLowerCase(),Z=!0}}g.byteLength=a;function t(q,Q,V){var Z=!1;if((Q===void 0||Q<0)&&(Q=0),Q>this.length)return"";if((V===void 0||V>this.length)&&(V=this.length),V<=0)return"";if(V>>>=0,Q>>>=0,V<=Q)return"";for(q||(q="utf8");;)switch(q){case"hex":return K(this,Q,V);case"utf8":case"utf-8":return I(this,Q,V);case"ascii":return H(this,Q,V);case"latin1":case"binary":return B(this,Q,V);case"base64":return M(this,Q,V);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,Q,V);default:if(Z)throw new TypeError("Unknown encoding: "+q);q=(q+"").toLowerCase(),Z=!0}}g.prototype._isBuffer=!0;function w(q,Q,V){var Z=q[Q];q[Q]=q[V],q[V]=Z}g.prototype.swap16=function(){var Q=this.length;if(Q%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var V=0;V<Q;V+=2)w(this,V,V+1);return this},g.prototype.swap32=function(){var Q=this.length;if(Q%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var V=0;V<Q;V+=4)w(this,V,V+3),w(this,V+1,V+2);return this},g.prototype.swap64=function(){var Q=this.length;if(Q%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var V=0;V<Q;V+=8)w(this,V,V+7),w(this,V+1,V+6),w(this,V+2,V+5),w(this,V+3,V+4);return this},g.prototype.toString=function(){var Q=this.length|0;return Q===0?"":arguments.length===0?I(this,0,Q):t.apply(this,arguments)},g.prototype.equals=function(Q){if(!g.isBuffer(Q))throw new TypeError("Argument must be a Buffer");return this===Q?!0:g.compare(this,Q)===0},g.prototype.inspect=function(){var Q="",V=D.INSPECT_MAX_BYTES;return this.length>0&&(Q=this.toString("hex",0,V).match(/.{2}/g).join(" "),this.length>V&&(Q+=" ... ")),"<Buffer "+Q+">"},g.prototype.compare=function(Q,V,Z,be,ge){if(!g.isBuffer(Q))throw new TypeError("Argument must be a Buffer");if(V===void 0&&(V=0),Z===void 0&&(Z=Q?Q.length:0),be===void 0&&(be=0),ge===void 0&&(ge=this.length),V<0||Z>Q.length||be<0||ge>this.length)throw new RangeError("out of range index");if(be>=ge&&V>=Z)return 0;if(be>=ge)return-1;if(V>=Z)return 1;if(V>>>=0,Z>>>=0,be>>>=0,ge>>>=0,this===Q)return 0;for(var Te=ge-be,Je=Z-V,rt=Math.min(Te,Je),nt=this.slice(be,ge),at=Q.slice(V,Z),ct=0;ct<rt;++ct)if(nt[ct]!==at[ct]){Te=nt[ct],Je=at[ct];break}return Te<Je?-1:Je<Te?1:0};function E(q,Q,V,Z,be){if(q.length===0)return-1;if(typeof V=="string"?(Z=V,V=0):V>2147483647?V=2147483647:V<-2147483648&&(V=-2147483648),V=+V,isNaN(V)&&(V=be?0:q.length-1),V<0&&(V=q.length+V),V>=q.length){if(be)return-1;V=q.length-1}else if(V<0)if(be)V=0;else return-1;if(typeof Q=="string"&&(Q=g.from(Q,Z)),g.isBuffer(Q))return Q.length===0?-1:f(q,Q,V,Z,be);if(typeof Q=="number")return Q=Q&255,g.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?be?Uint8Array.prototype.indexOf.call(q,Q,V):Uint8Array.prototype.lastIndexOf.call(q,Q,V):f(q,[Q],V,Z,be);throw new TypeError("val must be string, number or Buffer")}function f(q,Q,V,Z,be){var ge=1,Te=q.length,Je=Q.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(q.length<2||Q.length<2)return-1;ge=2,Te/=2,Je/=2,V/=2}function rt(He,Re){return ge===1?He[Re]:He.readUInt16BE(Re*ge)}var nt;if(be){var at=-1;for(nt=V;nt<Te;nt++)if(rt(q,nt)===rt(Q,at===-1?0:nt-at)){if(at===-1&&(at=nt),nt-at+1===Je)return at*ge}else at!==-1&&(nt-=nt-at),at=-1}else for(V+Je>Te&&(V=Te-Je),nt=V;nt>=0;nt--){for(var ct=!0,ht=0;ht<Je;ht++)if(rt(q,nt+ht)!==rt(Q,ht)){ct=!1;break}if(ct)return nt}return-1}g.prototype.includes=function(Q,V,Z){return this.indexOf(Q,V,Z)!==-1},g.prototype.indexOf=function(Q,V,Z){return E(this,Q,V,Z,!0)},g.prototype.lastIndexOf=function(Q,V,Z){return E(this,Q,V,Z,!1)};function k(q,Q,V,Z){V=Number(V)||0;var be=q.length-V;Z?(Z=Number(Z),Z>be&&(Z=be)):Z=be;var ge=Q.length;if(ge%2!==0)throw new TypeError("Invalid hex string");Z>ge/2&&(Z=ge/2);for(var Te=0;Te<Z;++Te){var Je=parseInt(Q.substr(Te*2,2),16);if(isNaN(Je))return Te;q[V+Te]=Je}return Te}function O(q,Q,V,Z){return te(le(Q,q.length-V),q,V,Z)}function C(q,Q,V,Z){return te(re(Q),q,V,Z)}function x(q,Q,V,Z){return C(q,Q,V,Z)}function y(q,Q,V,Z){return te(ee(Q),q,V,Z)}function _(q,Q,V,Z){return te(pe(Q,q.length-V),q,V,Z)}g.prototype.write=function(Q,V,Z,be){if(V===void 0)be="utf8",Z=this.length,V=0;else if(Z===void 0&&typeof V=="string")be=V,Z=this.length,V=0;else if(isFinite(V))V=V|0,isFinite(Z)?(Z=Z|0,be===void 0&&(be="utf8")):(be=Z,Z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ge=this.length-V;if((Z===void 0||Z>ge)&&(Z=ge),Q.length>0&&(Z<0||V<0)||V>this.length)throw new RangeError("Attempt to write outside buffer bounds");be||(be="utf8");for(var Te=!1;;)switch(be){case"hex":return k(this,Q,V,Z);case"utf8":case"utf-8":return O(this,Q,V,Z);case"ascii":return C(this,Q,V,Z);case"latin1":case"binary":return x(this,Q,V,Z);case"base64":return y(this,Q,V,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,Q,V,Z);default:if(Te)throw new TypeError("Unknown encoding: "+be);be=(""+be).toLowerCase(),Te=!0}},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function M(q,Q,V){return Q===0&&V===q.length?T.fromByteArray(q):T.fromByteArray(q.slice(Q,V))}function I(q,Q,V){V=Math.min(q.length,V);for(var Z=[],be=Q;be<V;){var ge=q[be],Te=null,Je=ge>239?4:ge>223?3:ge>191?2:1;if(be+Je<=V){var rt,nt,at,ct;switch(Je){case 1:ge<128&&(Te=ge);break;case 2:rt=q[be+1],(rt&192)===128&&(ct=(ge&31)<<6|rt&63,ct>127&&(Te=ct));break;case 3:rt=q[be+1],nt=q[be+2],(rt&192)===128&&(nt&192)===128&&(ct=(ge&15)<<12|(rt&63)<<6|nt&63,ct>2047&&(ct<55296||ct>57343)&&(Te=ct));break;case 4:rt=q[be+1],nt=q[be+2],at=q[be+3],(rt&192)===128&&(nt&192)===128&&(at&192)===128&&(ct=(ge&15)<<18|(rt&63)<<12|(nt&63)<<6|at&63,ct>65535&&ct<1114112&&(Te=ct))}}Te===null?(Te=65533,Je=1):Te>65535&&(Te-=65536,Z.push(Te>>>10&1023|55296),Te=56320|Te&1023),Z.push(Te),be+=Je}return G(Z)}var N=4096;function G(q){var Q=q.length;if(Q<=N)return String.fromCharCode.apply(String,q);for(var V="",Z=0;Z<Q;)V+=String.fromCharCode.apply(String,q.slice(Z,Z+=N));return V}function H(q,Q,V){var Z="";V=Math.min(q.length,V);for(var be=Q;be<V;++be)Z+=String.fromCharCode(q[be]&127);return Z}function B(q,Q,V){var Z="";V=Math.min(q.length,V);for(var be=Q;be<V;++be)Z+=String.fromCharCode(q[be]);return Z}function K(q,Q,V){var Z=q.length;(!Q||Q<0)&&(Q=0),(!V||V<0||V>Z)&&(V=Z);for(var be="",ge=Q;ge<V;++ge)be+=ue(q[ge]);return be}function U(q,Q,V){for(var Z=q.slice(Q,V),be="",ge=0;ge<Z.length;ge+=2)be+=String.fromCharCode(Z[ge]+Z[ge+1]*256);return be}g.prototype.slice=function(Q,V){var Z=this.length;Q=~~Q,V=V===void 0?Z:~~V,Q<0?(Q+=Z,Q<0&&(Q=0)):Q>Z&&(Q=Z),V<0?(V+=Z,V<0&&(V=0)):V>Z&&(V=Z),V<Q&&(V=Q);var be;if(g.TYPED_ARRAY_SUPPORT)be=this.subarray(Q,V),be.__proto__=g.prototype;else{var ge=V-Q;be=new g(ge,void 0);for(var Te=0;Te<ge;++Te)be[Te]=this[Te+Q]}return be};function W(q,Q,V){if(q%1!==0||q<0)throw new RangeError("offset is not uint");if(q+Q>V)throw new RangeError("Trying to access beyond buffer length")}g.prototype.readUIntLE=function(Q,V,Z){Q=Q|0,V=V|0,Z||W(Q,V,this.length);for(var be=this[Q],ge=1,Te=0;++Te<V&&(ge*=256);)be+=this[Q+Te]*ge;return be},g.prototype.readUIntBE=function(Q,V,Z){Q=Q|0,V=V|0,Z||W(Q,V,this.length);for(var be=this[Q+--V],ge=1;V>0&&(ge*=256);)be+=this[Q+--V]*ge;return be},g.prototype.readUInt8=function(Q,V){return V||W(Q,1,this.length),this[Q]},g.prototype.readUInt16LE=function(Q,V){return V||W(Q,2,this.length),this[Q]|this[Q+1]<<8},g.prototype.readUInt16BE=function(Q,V){return V||W(Q,2,this.length),this[Q]<<8|this[Q+1]},g.prototype.readUInt32LE=function(Q,V){return V||W(Q,4,this.length),(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+this[Q+3]*16777216},g.prototype.readUInt32BE=function(Q,V){return V||W(Q,4,this.length),this[Q]*16777216+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])},g.prototype.readIntLE=function(Q,V,Z){Q=Q|0,V=V|0,Z||W(Q,V,this.length);for(var be=this[Q],ge=1,Te=0;++Te<V&&(ge*=256);)be+=this[Q+Te]*ge;return ge*=128,be>=ge&&(be-=Math.pow(2,8*V)),be},g.prototype.readIntBE=function(Q,V,Z){Q=Q|0,V=V|0,Z||W(Q,V,this.length);for(var be=V,ge=1,Te=this[Q+--be];be>0&&(ge*=256);)Te+=this[Q+--be]*ge;return ge*=128,Te>=ge&&(Te-=Math.pow(2,8*V)),Te},g.prototype.readInt8=function(Q,V){return V||W(Q,1,this.length),this[Q]&128?(255-this[Q]+1)*-1:this[Q]},g.prototype.readInt16LE=function(Q,V){V||W(Q,2,this.length);var Z=this[Q]|this[Q+1]<<8;return Z&32768?Z|4294901760:Z},g.prototype.readInt16BE=function(Q,V){V||W(Q,2,this.length);var Z=this[Q+1]|this[Q]<<8;return Z&32768?Z|4294901760:Z},g.prototype.readInt32LE=function(Q,V){return V||W(Q,4,this.length),this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24},g.prototype.readInt32BE=function(Q,V){return V||W(Q,4,this.length),this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]},g.prototype.readFloatLE=function(Q,V){return V||W(Q,4,this.length),P.read(this,Q,!0,23,4)},g.prototype.readFloatBE=function(Q,V){return V||W(Q,4,this.length),P.read(this,Q,!1,23,4)},g.prototype.readDoubleLE=function(Q,V){return V||W(Q,8,this.length),P.read(this,Q,!0,52,8)},g.prototype.readDoubleBE=function(Q,V){return V||W(Q,8,this.length),P.read(this,Q,!1,52,8)};function X(q,Q,V,Z,be,ge){if(!g.isBuffer(q))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>be||Q<ge)throw new RangeError('"value" argument is out of bounds');if(V+Z>q.length)throw new RangeError("Index out of range")}g.prototype.writeUIntLE=function(Q,V,Z,be){if(Q=+Q,V=V|0,Z=Z|0,!be){var ge=Math.pow(2,8*Z)-1;X(this,Q,V,Z,ge,0)}var Te=1,Je=0;for(this[V]=Q&255;++Je<Z&&(Te*=256);)this[V+Je]=Q/Te&255;return V+Z},g.prototype.writeUIntBE=function(Q,V,Z,be){if(Q=+Q,V=V|0,Z=Z|0,!be){var ge=Math.pow(2,8*Z)-1;X(this,Q,V,Z,ge,0)}var Te=Z-1,Je=1;for(this[V+Te]=Q&255;--Te>=0&&(Je*=256);)this[V+Te]=Q/Je&255;return V+Z},g.prototype.writeUInt8=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,1,255,0),g.TYPED_ARRAY_SUPPORT||(Q=Math.floor(Q)),this[V]=Q&255,V+1};function ne(q,Q,V,Z){Q<0&&(Q=65535+Q+1);for(var be=0,ge=Math.min(q.length-V,2);be<ge;++be)q[V+be]=(Q&255<<8*(Z?be:1-be))>>>(Z?be:1-be)*8}g.prototype.writeUInt16LE=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[V]=Q&255,this[V+1]=Q>>>8):ne(this,Q,V,!0),V+2},g.prototype.writeUInt16BE=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[V]=Q>>>8,this[V+1]=Q&255):ne(this,Q,V,!1),V+2};function fe(q,Q,V,Z){Q<0&&(Q=4294967295+Q+1);for(var be=0,ge=Math.min(q.length-V,4);be<ge;++be)q[V+be]=Q>>>(Z?be:3-be)*8&255}g.prototype.writeUInt32LE=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[V+3]=Q>>>24,this[V+2]=Q>>>16,this[V+1]=Q>>>8,this[V]=Q&255):fe(this,Q,V,!0),V+4},g.prototype.writeUInt32BE=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[V]=Q>>>24,this[V+1]=Q>>>16,this[V+2]=Q>>>8,this[V+3]=Q&255):fe(this,Q,V,!1),V+4},g.prototype.writeIntLE=function(Q,V,Z,be){if(Q=+Q,V=V|0,!be){var ge=Math.pow(2,8*Z-1);X(this,Q,V,Z,ge-1,-ge)}var Te=0,Je=1,rt=0;for(this[V]=Q&255;++Te<Z&&(Je*=256);)Q<0&&rt===0&&this[V+Te-1]!==0&&(rt=1),this[V+Te]=(Q/Je>>0)-rt&255;return V+Z},g.prototype.writeIntBE=function(Q,V,Z,be){if(Q=+Q,V=V|0,!be){var ge=Math.pow(2,8*Z-1);X(this,Q,V,Z,ge-1,-ge)}var Te=Z-1,Je=1,rt=0;for(this[V+Te]=Q&255;--Te>=0&&(Je*=256);)Q<0&&rt===0&&this[V+Te+1]!==0&&(rt=1),this[V+Te]=(Q/Je>>0)-rt&255;return V+Z},g.prototype.writeInt8=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,1,127,-128),g.TYPED_ARRAY_SUPPORT||(Q=Math.floor(Q)),Q<0&&(Q=255+Q+1),this[V]=Q&255,V+1},g.prototype.writeInt16LE=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[V]=Q&255,this[V+1]=Q>>>8):ne(this,Q,V,!0),V+2},g.prototype.writeInt16BE=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[V]=Q>>>8,this[V+1]=Q&255):ne(this,Q,V,!1),V+2},g.prototype.writeInt32LE=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,4,2147483647,-2147483648),g.TYPED_ARRAY_SUPPORT?(this[V]=Q&255,this[V+1]=Q>>>8,this[V+2]=Q>>>16,this[V+3]=Q>>>24):fe(this,Q,V,!0),V+4},g.prototype.writeInt32BE=function(Q,V,Z){return Q=+Q,V=V|0,Z||X(this,Q,V,4,2147483647,-2147483648),Q<0&&(Q=4294967295+Q+1),g.TYPED_ARRAY_SUPPORT?(this[V]=Q>>>24,this[V+1]=Q>>>16,this[V+2]=Q>>>8,this[V+3]=Q&255):fe(this,Q,V,!1),V+4};function me(q,Q,V,Z,be,ge){if(V+Z>q.length)throw new RangeError("Index out of range");if(V<0)throw new RangeError("Index out of range")}function Ae(q,Q,V,Z,be){return be||me(q,Q,V,4,34028234663852886e22,-34028234663852886e22),P.write(q,Q,V,Z,23,4),V+4}g.prototype.writeFloatLE=function(Q,V,Z){return Ae(this,Q,V,!0,Z)},g.prototype.writeFloatBE=function(Q,V,Z){return Ae(this,Q,V,!1,Z)};function De(q,Q,V,Z,be){return be||me(q,Q,V,8,17976931348623157e292,-17976931348623157e292),P.write(q,Q,V,Z,52,8),V+8}g.prototype.writeDoubleLE=function(Q,V,Z){return De(this,Q,V,!0,Z)},g.prototype.writeDoubleBE=function(Q,V,Z){return De(this,Q,V,!1,Z)},g.prototype.copy=function(Q,V,Z,be){if(Z||(Z=0),!be&&be!==0&&(be=this.length),V>=Q.length&&(V=Q.length),V||(V=0),be>0&&be<Z&&(be=Z),be===Z)return 0;if(Q.length===0||this.length===0)return 0;if(V<0)throw new RangeError("targetStart out of bounds");if(Z<0||Z>=this.length)throw new RangeError("sourceStart out of bounds");if(be<0)throw new RangeError("sourceEnd out of bounds");be>this.length&&(be=this.length),Q.length-V<be-Z&&(be=Q.length-V+Z);var ge=be-Z,Te;if(this===Q&&Z<V&&V<be)for(Te=ge-1;Te>=0;--Te)Q[Te+V]=this[Te+Z];else if(ge<1e3||!g.TYPED_ARRAY_SUPPORT)for(Te=0;Te<ge;++Te)Q[Te+V]=this[Te+Z];else Uint8Array.prototype.set.call(Q,this.subarray(Z,Z+ge),V);return ge},g.prototype.fill=function(Q,V,Z,be){if(typeof Q=="string"){if(typeof V=="string"?(be=V,V=0,Z=this.length):typeof Z=="string"&&(be=Z,Z=this.length),Q.length===1){var ge=Q.charCodeAt(0);ge<256&&(Q=ge)}if(be!==void 0&&typeof be!="string")throw new TypeError("encoding must be a string");if(typeof be=="string"&&!g.isEncoding(be))throw new TypeError("Unknown encoding: "+be)}else typeof Q=="number"&&(Q=Q&255);if(V<0||this.length<V||this.length<Z)throw new RangeError("Out of range index");if(Z<=V)return this;V=V>>>0,Z=Z===void 0?this.length:Z>>>0,Q||(Q=0);var Te;if(typeof Q=="number")for(Te=V;Te<Z;++Te)this[Te]=Q;else{var Je=g.isBuffer(Q)?Q:le(new g(Q,be).toString()),rt=Je.length;for(Te=0;Te<Z-V;++Te)this[Te+V]=Je[Te%rt]}return this};var ye=/[^+\/0-9A-Za-z-_]/g;function Oe(q){if(q=xe(q).replace(ye,""),q.length<2)return"";for(;q.length%4!==0;)q=q+"=";return q}function xe(q){return q.trim?q.trim():q.replace(/^\s+|\s+$/g,"")}function ue(q){return q<16?"0"+q.toString(16):q.toString(16)}function le(q,Q){Q=Q||Infinity;for(var V,Z=q.length,be=null,ge=[],Te=0;Te<Z;++Te){if(V=q.charCodeAt(Te),V>55295&&V<57344){if(!be){if(V>56319){(Q-=3)>-1&&ge.push(239,191,189);continue}else if(Te+1===Z){(Q-=3)>-1&&ge.push(239,191,189);continue}be=V;continue}if(V<56320){(Q-=3)>-1&&ge.push(239,191,189),be=V;continue}V=(be-55296<<10|V-56320)+65536}else be&&((Q-=3)>-1&&ge.push(239,191,189));if(be=null,V<128){if((Q-=1)<0)break;ge.push(V)}else if(V<2048){if((Q-=2)<0)break;ge.push(V>>6|192,V&63|128)}else if(V<65536){if((Q-=3)<0)break;ge.push(V>>12|224,V>>6&63|128,V&63|128)}else if(V<1114112){if((Q-=4)<0)break;ge.push(V>>18|240,V>>12&63|128,V>>6&63|128,V&63|128)}else throw new Error("Invalid code point")}return ge}function re(q){for(var Q=[],V=0;V<q.length;++V)Q.push(q.charCodeAt(V)&255);return Q}function pe(q,Q){for(var V,Z,be,ge=[],Te=0;Te<q.length&&!((Q-=2)<0);++Te)V=q.charCodeAt(Te),Z=V>>8,be=V%256,ge.push(be),ge.push(Z);return ge}function ee(q){return T.toByteArray(Oe(q))}function te(q,Q,V,Z){for(var be=0;be<Z&&!(be+V>=Q.length||be>=q.length);++be)Q[be+V]=q[be];return be}function ce(q){return q!==q}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(j,Y,D){Y.exports={"100":"Continue","101":"Switching Protocols","102":"Processing","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}},{}],75:[function(j,Y,D){Y.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],76:[function(j,Y,D){/*!
|
|
|
* copy-to - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var L=Array.prototype.slice;Y.exports=g;function g(P,p){if(!(this instanceof g))return new g(P,p);this.src=P,this._withAccess=p}g.prototype.withAccess=function(P){return this._withAccess=P!==!1,this},g.prototype.pick=function(P){return Array.isArray(P)||(P=L.call(arguments)),P.length&&(this.keys=P),this},g.prototype.to=function(P){if(P=P||{},!this.src)return P;var p=this.keys||Object.keys(this.src);if(!this._withAccess){for(var v=0;v<p.length;v++){if(S=p[v],P[S]!==void 0)continue;P[S]=this.src[S]}return P}for(var v=0;v<p.length;v++){var S=p[v];if(!T(P,S))continue;var b=this.src.__lookupGetter__(S),d=this.src.__lookupSetter__(S);b&&P.__defineGetter__(S,b),d&&P.__defineSetter__(S,d),!b&&!d&&(P[S]=this.src[S])}return P},g.prototype.toCover=function(P){for(var p=this.keys||Object.keys(this.src),v=0;v<p.length;v++){var S=p[v];delete P[S];var b=this.src.__lookupGetter__(S),d=this.src.__lookupSetter__(S);b&&P.__defineGetter__(S,b),d&&P.__defineSetter__(S,d),!b&&!d&&(P[S]=this.src[S])}},g.prototype.override=g.prototype.toCover,g.prototype.and=function(P){var p={};return this.to(p),this.src=P,this.to(p),this.src=p,this};function T(P,p){return P[p]===void 0&&P.__lookupGetter__(p)===void 0&&P.__lookupSetter__(p)===void 0}},{}],77:[function(j,Y,D){j("../../modules/es6.string.iterator"),j("../../modules/es6.array.from"),Y.exports=j("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(j,Y,D){var L=j("../../modules/_core"),g=L.JSON||(L.JSON={stringify:JSON.stringify});Y.exports=function(P){return g.stringify.apply(g,arguments)}},{"../../modules/_core":99}],79:[function(j,Y,D){j("../../modules/es6.object.assign"),Y.exports=j("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(j,Y,D){j("../../modules/es6.object.create");var L=j("../../modules/_core").Object;Y.exports=function(T,P){return L.create(T,P)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(j,Y,D){j("../../modules/es6.object.define-property");var L=j("../../modules/_core").Object;Y.exports=function(T,P,p){return L.defineProperty(T,P,p)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(j,Y,D){j("../../modules/es7.object.entries"),Y.exports=j("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(j,Y,D){j("../../modules/es6.object.get-own-property-names");var L=j("../../modules/_core").Object;Y.exports=function(T){return L.getOwnPropertyNames(T)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(j,Y,D){j("../../modules/es6.object.get-prototype-of"),Y.exports=j("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(j,Y,D){j("../../modules/es6.object.keys"),Y.exports=j("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(j,Y,D){j("../modules/es6.object.to-string"),j("../modules/es6.string.iterator"),j("../modules/web.dom.iterable"),j("../modules/es6.promise"),j("../modules/es7.promise.finally"),j("../modules/es7.promise.try"),Y.exports=j("../modules/_core").Promise},{"../modules/_core":99,"../modules/es6.object.to-string":177,"../modules/es6.promise":178,"../modules/es6.string.iterator":180,"../modules/es7.promise.finally":183,"../modules/es7.promise.try":184,"../modules/web.dom.iterable":187}],87:[function(j,Y,D){j("../modules/web.immediate"),Y.exports=j("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(j,Y,D){j("../../modules/es6.string.from-code-point"),Y.exports=j("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(j,Y,D){j("../../modules/es6.function.has-instance"),Y.exports=j("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(j,Y,D){j("../../modules/es6.symbol"),j("../../modules/es6.object.to-string"),j("../../modules/es7.symbol.async-iterator"),j("../../modules/es7.symbol.observable"),Y.exports=j("../../modules/_core").Symbol},{"../../modules/_core":99,"../../modules/es6.object.to-string":177,"../../modules/es6.symbol":181,"../../modules/es7.symbol.async-iterator":185,"../../modules/es7.symbol.observable":186}],91:[function(j,Y,D){j("../../modules/es6.string.iterator"),j("../../modules/web.dom.iterable"),Y.exports=j("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(j,Y,D){Y.exports=function(L){if(typeof L!="function")throw TypeError(L+" is not a function!");return L}},{}],93:[function(j,Y,D){Y.exports=function(){}},{}],94:[function(j,Y,D){Y.exports=function(L,g,T,P){if(!(L instanceof g)||P!==void 0&&P in L)throw TypeError(T+": incorrect invocation!");return L}},{}],95:[function(j,Y,D){var L=j("./_is-object");Y.exports=function(g){if(!L(g))throw TypeError(g+" is not an object!");return g}},{"./_is-object":119}],96:[function(j,Y,D){var L=j("./_to-iobject"),g=j("./_to-length"),T=j("./_to-absolute-index");Y.exports=function(P){return function(p,v,S){var b=L(p),d=g(b.length),l=T(S,d),n;if(P&&v!=v){for(;d>l;)if(n=b[l++],n!=n)return!0}else for(;d>l;l++)if((P||l in b)&&b[l]===v)return P||l||0;return!P&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(j,Y,D){var L=j("./_cof"),g=j("./_wks")("toStringTag"),T=L(function(){return arguments}())=="Arguments",P=function(p,v){try{return p[v]}catch(S){}};Y.exports=function(p){var v,S,b;return p===void 0?"Undefined":p===null?"Null":typeof(S=P(v=Object(p),g))=="string"?S:T?L(v):(b=L(v))=="Object"&&typeof v.callee=="function"?"Arguments":b}},{"./_cof":98,"./_wks":166}],98:[function(j,Y,D){var L={}.toString;Y.exports=function(g){return L.call(g).slice(8,-1)}},{}],99:[function(j,Y,D){var L=Y.exports={version:"2.6.11"};typeof __e=="number"&&(__e=L)},{}],100:[function(j,Y,D){"use strict";var L=j("./_object-dp"),g=j("./_property-desc");Y.exports=function(T,P,p){P in T?L.f(T,P,g(0,p)):T[P]=p}},{"./_object-dp":132,"./_property-desc":146}],101:[function(j,Y,D){var L=j("./_a-function");Y.exports=function(g,T,P){if(L(g),T===void 0)return g;switch(P){case 1:return function(p){return g.call(T,p)};case 2:return function(p,v){return g.call(T,p,v)};case 3:return function(p,v,S){return g.call(T,p,v,S)}}return function(){return g.apply(T,arguments)}}},{"./_a-function":92}],102:[function(j,Y,D){Y.exports=function(L){if(L==null)throw TypeError("Can't call method on "+L);return L}},{}],103:[function(j,Y,D){Y.exports=!j("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(j,Y,D){var L=j("./_is-object"),g=j("./_global").document,T=L(g)&&L(g.createElement);Y.exports=function(P){return T?g.createElement(P):{}}},{"./_global":110,"./_is-object":119}],105:[function(j,Y,D){Y.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(j,Y,D){var L=j("./_object-keys"),g=j("./_object-gops"),T=j("./_object-pie");Y.exports=function(P){var p=L(P),v=g.f;if(v)for(var S=v(P),b=T.f,d=0,l;S.length>d;)b.call(P,l=S[d++])&&p.push(l);return p}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(j,Y,D){var L=j("./_global"),g=j("./_core"),T=j("./_ctx"),P=j("./_hide"),p=j("./_has"),v="prototype",S=function(b,d,l){var n=b&S.F,c=b&S.G,u=b&S.S,o=b&S.P,h=b&S.B,m=b&S.W,s=c?g:g[d]||(g[d]={}),r=s[v],a=c?L:u?L[d]:(L[d]||{})[v],t,w,E;c&&(l=d);for(t in l){if(w=!n&&a&&a[t]!==void 0,w&&p(s,t))continue;E=w?a[t]:l[t],s[t]=c&&typeof a[t]!="function"?l[t]:h&&w?T(E,L):m&&a[t]==E?function(f){var k=function(O,C,x){if(this instanceof f){switch(arguments.length){case 0:return new f;case 1:return new f(O);case 2:return new f(O,C)}return new f(O,C,x)}return f.apply(this,arguments)};return k[v]=f[v],k}(E):o&&typeof E=="function"?T(Function.call,E):E,o&&((s.virtual||(s.virtual={}))[t]=E,b&S.R&&r&&!r[t]&&P(r,t,E))}};S.F=1,S.G=2,S.S=4,S.P=8,S.B=16,S.W=32,S.U=64,S.R=128,Y.exports=S},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(j,Y,D){Y.exports=function(L){try{return!!L()}catch(g){return!0}}},{}],109:[function(j,Y,D){var L=j("./_ctx"),g=j("./_iter-call"),T=j("./_is-array-iter"),P=j("./_an-object"),p=j("./_to-length"),v=j("./core.get-iterator-method"),S={},b={},D=Y.exports=function(d,l,n,c,u){var o=u?function(){return d}:v(d),h=L(n,c,l?2:1),m=0,s,r,a,t;if(typeof o!="function")throw TypeError(d+" is not iterable!");if(T(o)){for(s=p(d.length);s>m;m++)if(t=l?h(P(r=d[m])[0],r[1]):h(d[m]),t===S||t===b)return t}else for(a=o.call(d);!(r=a.next()).done;)if(t=g(a,h,r.value,l),t===S||t===b)return t};D.BREAK=S,D.RETURN=b},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(j,Y,D){var L=Y.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=L)},{}],111:[function(j,Y,D){var L={}.hasOwnProperty;Y.exports=function(g,T){return L.call(g,T)}},{}],112:[function(j,Y,D){var L=j("./_object-dp"),g=j("./_property-desc");Y.exports=j("./_descriptors")?function(T,P,p){return L.f(T,P,g(1,p))}:function(T,P,p){return T[P]=p,T}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(j,Y,D){var L=j("./_global").document;Y.exports=L&&L.documentElement},{"./_global":110}],114:[function(j,Y,D){Y.exports=!j("./_descriptors")&&!j("./_fails")(function(){return Object.defineProperty(j("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(j,Y,D){Y.exports=function(L,g,T){var P=T===void 0;switch(g.length){case 0:return P?L():L.call(T);case 1:return P?L(g[0]):L.call(T,g[0]);case 2:return P?L(g[0],g[1]):L.call(T,g[0],g[1]);case 3:return P?L(g[0],g[1],g[2]):L.call(T,g[0],g[1],g[2]);case 4:return P?L(g[0],g[1],g[2],g[3]):L.call(T,g[0],g[1],g[2],g[3])}return L.apply(T,g)}},{}],116:[function(j,Y,D){var L=j("./_cof");Y.exports=Object("z").propertyIsEnumerable(0)?Object:function(g){return L(g)=="String"?g.split(""):Object(g)}},{"./_cof":98}],117:[function(j,Y,D){var L=j("./_iterators"),g=j("./_wks")("iterator"),T=Array.prototype;Y.exports=function(P){return P!==void 0&&(L.Array===P||T[g]===P)}},{"./_iterators":125,"./_wks":166}],118:[function(j,Y,D){var L=j("./_cof");Y.exports=Array.isArray||function(T){return L(T)=="Array"}},{"./_cof":98}],119:[function(j,Y,D){Y.exports=function(L){return typeof L=="object"?L!==null:typeof L=="function"}},{}],120:[function(j,Y,D){var L=j("./_an-object");Y.exports=function(g,T,P,p){try{return p?T(L(P)[0],P[1]):T(P)}catch(S){var v=g.return;throw v!==void 0&&L(v.call(g)),S}}},{"./_an-object":95}],121:[function(j,Y,D){"use strict";var L=j("./_object-create"),g=j("./_property-desc"),T=j("./_set-to-string-tag"),P={};j("./_hide")(P,j("./_wks")("iterator"),function(){return this}),Y.exports=function(p,v,S){p.prototype=L(P,{next:g(1,S)}),T(p,v+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(j,Y,D){"use strict";var L=j("./_library"),g=j("./_export"),T=j("./_redefine"),P=j("./_hide"),p=j("./_iterators"),v=j("./_iter-create"),S=j("./_set-to-string-tag"),b=j("./_object-gpo"),d=j("./_wks")("iterator"),l=!([].keys&&"next"in[].keys()),n="@@iterator",c="keys",u="values",o=function(){return this};Y.exports=function(h,m,s,r,a,t,w){v(s,m,r);var E=function(H){if(!l&&H in C)return C[H];switch(H){case c:return function(){return new s(this,H)};case u:return function(){return new s(this,H)}}return function(){return new s(this,H)}},f=m+" Iterator",k=a==u,O=!1,C=h.prototype,x=C[d]||C[n]||a&&C[a],y=x||E(a),_=a?k?E("entries"):y:void 0,M=m=="Array"&&C.entries||x,I,N,G;if(M&&(G=b(M.call(new h)),G!==Object.prototype&&G.next&&(S(G,f,!0),!L&&typeof G[d]!="function"&&P(G,d,o))),k&&x&&x.name!==u&&(O=!0,y=function(){return x.call(this)}),(!L||w)&&(l||O||!C[d])&&P(C,d,y),p[m]=y,p[f]=o,a)if(I={values:k?y:E(u),keys:t?y:E(c),entries:_},w)for(N in I)N in C||T(C,N,I[N]);else g(g.P+g.F*(l||O),m,I);return I}},{"./_export":107,"./_hide":112,"./_iter-create":121,"./_iterators":125,"./_library":126,"./_object-gpo":138,"./_redefine":148,"./_set-to-string-tag":150,"./_wks":166}],123:[function(j,Y,D){var L=j("./_wks")("iterator"),g=!1;try{var T=[7][L]();T.return=function(){g=!0},Array.from(T,function(){throw 2})}catch(P){}Y.exports=function(P,p){if(!p&&!g)return!1;var v=!1;try{var S=[7],b=S[L]();b.next=function(){return{done:v=!0}},S[L]=function(){return b},P(S)}catch(d){}return v}},{"./_wks":166}],124:[function(j,Y,D){Y.exports=function(L,g){return{value:g,done:!!L}}},{}],125:[function(j,Y,D){Y.exports={}},{}],126:[function(j,Y,D){Y.exports=!0},{}],127:[function(j,Y,D){var L=j("./_uid")("meta"),g=j("./_is-object"),T=j("./_has"),P=j("./_object-dp").f,p=0,v=Object.isExtensible||function(){return!0},S=!j("./_fails")(function(){return v(Object.preventExtensions({}))}),b=function(u){P(u,L,{value:{i:"O"+ ++p,w:{}}})},d=function(u,o){if(!g(u))return typeof u=="symbol"?u:(typeof u=="string"?"S":"P")+u;if(!T(u,L)){if(!v(u))return"F";if(!o)return"E";b(u)}return u[L].i},l=function(u,o){if(!T(u,L)){if(!v(u))return!0;if(!o)return!1;b(u)}return u[L].w},n=function(u){return S&&c.NEED&&v(u)&&!T(u,L)&&b(u),u},c=Y.exports={KEY:L,NEED:!1,fastKey:d,getWeak:l,onFreeze:n}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(j,Y,D){var L=j("./_global"),g=j("./_task").set,T=L.MutationObserver||L.WebKitMutationObserver,P=L.process,p=L.Promise,v=j("./_cof")(P)=="process";Y.exports=function(){var S,b,d,l=function(){var o,h;for(v&&(o=P.domain)&&o.exit();S;){h=S.fn,S=S.next;try{h()}catch(m){throw S?d():b=void 0,m}}b=void 0,o&&o.enter()};if(v)d=function(){P.nextTick(l)};else if(T&&!(L.navigator&&L.navigator.standalone)){var n=!0,c=document.createTextNode("");new T(l).observe(c,{characterData:!0}),d=function(){c.data=n=!n}}else if(p&&p.resolve){var u=p.resolve(void 0);d=function(){u.then(l)}}else d=function(){g.call(L,l)};return function(o){var h={fn:o,next:void 0};b&&(b.next=h),S||(S=h,d()),b=h}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(j,Y,D){"use strict";var L=j("./_a-function");function g(T){var P,p;this.promise=new T(function(v,S){if(P!==void 0||p!==void 0)throw TypeError("Bad Promise constructor");P=v,p=S}),this.resolve=L(P),this.reject=L(p)}Y.exports.f=function(T){return new g(T)}},{"./_a-function":92}],130:[function(j,Y,D){"use strict";var L=j("./_descriptors"),g=j("./_object-keys"),T=j("./_object-gops"),P=j("./_object-pie"),p=j("./_to-object"),v=j("./_iobject"),S=Object.assign;Y.exports=!S||j("./_fails")(function(){var b={},d={},l=Symbol(),n="abcdefghijklmnopqrst";return b[l]=7,n.split("").forEach(function(c){d[c]=c}),S({},b)[l]!=7||Object.keys(S({},d)).join("")!=n})?function(d,l){for(var n=p(d),c=arguments.length,u=1,o=T.f,h=P.f;c>u;)for(var m=v(arguments[u++]),s=o?g(m).concat(o(m)):g(m),r=s.length,a=0,t;r>a;)t=s[a++],(!L||h.call(m,t))&&(n[t]=m[t]);return n}:S},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(j,Y,D){var L=j("./_an-object"),g=j("./_object-dps"),T=j("./_enum-bug-keys"),P=j("./_shared-key")("IE_PROTO"),p=function(){},v="prototype",S=function(){var b=j("./_dom-create")("iframe"),d=T.length,l="<",n=">",c;for(b.style.display="none",j("./_html").appendChild(b),b.src="javascript:",c=b.contentWindow.document,c.open(),c.write(l+"script"+n+"document.F=Object"+l+"/script"+n),c.close(),S=c.F;d--;)delete S[v][T[d]];return S()};Y.exports=Object.create||function(d,l){var n;return d!==null?(p[v]=L(d),n=new p,p[v]=null,n[P]=d):n=S(),l===void 0?n:g(n,l)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(j,Y,D){var L=j("./_an-object"),g=j("./_ie8-dom-define"),T=j("./_to-primitive"),P=Object.defineProperty;D.f=j("./_descriptors")?Object.defineProperty:function(v,S,b){if(L(v),S=T(S,!0),L(b),g)try{return P(v,S,b)}catch(d){}if("get"in b||"set"in b)throw TypeError("Accessors not supported!");return"value"in b&&(v[S]=b.value),v}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(j,Y,D){var L=j("./_object-dp"),g=j("./_an-object"),T=j("./_object-keys");Y.exports=j("./_descriptors")?Object.defineProperties:function(p,v){g(p);for(var S=T(v),b=S.length,d=0,l;b>d;)L.f(p,l=S[d++],v[l]);return p}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(j,Y,D){var L=j("./_object-pie"),g=j("./_property-desc"),T=j("./_to-iobject"),P=j("./_to-primitive"),p=j("./_has"),v=j("./_ie8-dom-define"),S=Object.getOwnPropertyDescriptor;D.f=j("./_descriptors")?S:function(d,l){if(d=T(d),l=P(l,!0),v)try{return S(d,l)}catch(n){}if(p(d,l))return g(!L.f.call(d,l),d[l])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(j,Y,D){var L=j("./_to-iobject"),g=j("./_object-gopn").f,T={}.toString,P=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],p=function(v){try{return g(v)}catch(S){return P.slice()}};Y.exports.f=function(S){return P&&T.call(S)=="[object Window]"?p(S):g(L(S))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(j,Y,D){var L=j("./_object-keys-internal"),g=j("./_enum-bug-keys").concat("length","prototype");D.f=Object.getOwnPropertyNames||function(P){return L(P,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(j,Y,D){D.f=Object.getOwnPropertySymbols},{}],138:[function(j,Y,D){var L=j("./_has"),g=j("./_to-object"),T=j("./_shared-key")("IE_PROTO"),P=Object.prototype;Y.exports=Object.getPrototypeOf||function(p){return p=g(p),L(p,T)?p[T]:typeof p.constructor=="function"&&p instanceof p.constructor?p.constructor.prototype:p instanceof Object?P:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(j,Y,D){var L=j("./_has"),g=j("./_to-iobject"),T=j("./_array-includes")(!1),P=j("./_shared-key")("IE_PROTO");Y.exports=function(p,v){var S=g(p),b=0,d=[],l;for(l in S)l!=P&&(L(S,l)&&d.push(l));for(;v.length>b;)L(S,l=v[b++])&&(~T(d,l)||d.push(l));return d}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(j,Y,D){var L=j("./_object-keys-internal"),g=j("./_enum-bug-keys");Y.exports=Object.keys||function(P){return L(P,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(j,Y,D){D.f={}.propertyIsEnumerable},{}],142:[function(j,Y,D){var L=j("./_export"),g=j("./_core"),T=j("./_fails");Y.exports=function(P,p){var v=(g.Object||{})[P]||Object[P],S={};S[P]=p(v),L(L.S+L.F*T(function(){v(1)}),"Object",S)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(j,Y,D){var L=j("./_descriptors"),g=j("./_object-keys"),T=j("./_to-iobject"),P=j("./_object-pie").f;Y.exports=function(p){return function(v){for(var S=T(v),b=g(S),d=b.length,l=0,n=[],c;d>l;)c=b[l++],(!L||P.call(S,c))&&n.push(p?[c,S[c]]:S[c]);return n}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(j,Y,D){Y.exports=function(L){try{return{e:!1,v:L()}}catch(g){return{e:!0,v:g}}}},{}],145:[function(j,Y,D){var L=j("./_an-object"),g=j("./_is-object"),T=j("./_new-promise-capability");Y.exports=function(P,p){if(L(P),g(p)&&p.constructor===P)return p;var v=T.f(P),S=v.resolve;return S(p),v.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(j,Y,D){Y.exports=function(L,g){return{enumerable:!(L&1),configurable:!(L&2),writable:!(L&4),value:g}}},{}],147:[function(j,Y,D){var L=j("./_hide");Y.exports=function(g,T,P){for(var p in T)P&&g[p]?g[p]=T[p]:L(g,p,T[p]);return g}},{"./_hide":112}],148:[function(j,Y,D){Y.exports=j("./_hide")},{"./_hide":112}],149:[function(j,Y,D){"use strict";var L=j("./_global"),g=j("./_core"),T=j("./_object-dp"),P=j("./_descriptors"),p=j("./_wks")("species");Y.exports=function(v){var S=typeof g[v]=="function"?g[v]:L[v];P&&S&&!S[p]&&T.f(S,p,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(j,Y,D){var L=j("./_object-dp").f,g=j("./_has"),T=j("./_wks")("toStringTag");Y.exports=function(P,p,v){P&&!g(P=v?P:P.prototype,T)&&L(P,T,{configurable:!0,value:p})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(j,Y,D){var L=j("./_shared")("keys"),g=j("./_uid");Y.exports=function(T){return L[T]||(L[T]=g(T))}},{"./_shared":152,"./_uid":162}],152:[function(j,Y,D){var L=j("./_core"),g=j("./_global"),T="__core-js_shared__",P=g[T]||(g[T]={});(Y.exports=function(p,v){return P[p]||(P[p]=v!==void 0?v:{})})("versions",[]).push({version:L.version,mode:j("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(j,Y,D){var L=j("./_an-object"),g=j("./_a-function"),T=j("./_wks")("species");Y.exports=function(P,p){var v=L(P).constructor,S;return v===void 0||(S=L(v)[T])==null?p:g(S)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(j,Y,D){var L=j("./_to-integer"),g=j("./_defined");Y.exports=function(T){return function(P,p){var v=String(g(P)),S=L(p),b=v.length,d,l;return S<0||S>=b?T?"":void 0:(d=v.charCodeAt(S),d<55296||d>56319||S+1===b||(l=v.charCodeAt(S+1))<56320||l>57343?T?v.charAt(S):d:T?v.slice(S,S+2):(d-55296<<10)+(l-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(j,Y,D){var L=j("./_ctx"),g=j("./_invoke"),T=j("./_html"),P=j("./_dom-create"),p=j("./_global"),v=p.process,S=p.setImmediate,b=p.clearImmediate,d=p.MessageChannel,l=p.Dispatch,n=0,c={},u="onreadystatechange",o,h,m,s=function(){var a=+this;if(c.hasOwnProperty(a)){var t=c[a];delete c[a],t()}},r=function(a){s.call(a.data)};(!S||!b)&&(S=function(t){for(var w=[],E=1;arguments.length>E;)w.push(arguments[E++]);return c[++n]=function(){g(typeof t=="function"?t:Function(t),w)},o(n),n},b=function(t){delete c[t]},j("./_cof")(v)=="process"?o=function(a){v.nextTick(L(s,a,1))}:l&&l.now?o=function(a){l.now(L(s,a,1))}:d?(h=new d,m=h.port2,h.port1.onmessage=r,o=L(m.postMessage,m,1)):p.addEventListener&&typeof postMessage=="function"&&!p.importScripts?(o=function(a){p.postMessage(a+"","*")},p.addEventListener("message",r,!1)):u in P("script")?o=function(a){T.appendChild(P("script"))[u]=function(){T.removeChild(this),s.call(a)}}:o=function(a){setTimeout(L(s,a,1),0)}),Y.exports={set:S,clear:b}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(j,Y,D){var L=j("./_to-integer"),g=Math.max,T=Math.min;Y.exports=function(P,p){return P=L(P),P<0?g(P+p,0):T(P,p)}},{"./_to-integer":157}],157:[function(j,Y,D){var L=Math.ceil,g=Math.floor;Y.exports=function(T){return isNaN(T=+T)?0:(T>0?g:L)(T)}},{}],158:[function(j,Y,D){var L=j("./_iobject"),g=j("./_defined");Y.exports=function(T){return L(g(T))}},{"./_defined":102,"./_iobject":116}],159:[function(j,Y,D){var L=j("./_to-integer"),g=Math.min;Y.exports=function(T){return T>0?g(L(T),9007199254740991):0}},{"./_to-integer":157}],160:[function(j,Y,D){var L=j("./_defined");Y.exports=function(g){return Object(L(g))}},{"./_defined":102}],161:[function(j,Y,D){var L=j("./_is-object");Y.exports=function(g,T){if(!L(g))return g;var P,p;if(T&&typeof(P=g.toString)=="function"&&!L(p=P.call(g)))return p;if(typeof(P=g.valueOf)=="function"&&!L(p=P.call(g)))return p;if(!T&&typeof(P=g.toString)=="function"&&!L(p=P.call(g)))return p;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(j,Y,D){var L=0,g=Math.random();Y.exports=function(T){return"Symbol(".concat(T===void 0?"":T,")_",(++L+g).toString(36))}},{}],163:[function(j,Y,D){var L=j("./_global"),g=L.navigator;Y.exports=g&&g.userAgent||""},{"./_global":110}],164:[function(j,Y,D){var L=j("./_global"),g=j("./_core"),T=j("./_library"),P=j("./_wks-ext"),p=j("./_object-dp").f;Y.exports=function(v){var S=g.Symbol||(g.Symbol=T?{}:L.Symbol||{});v.charAt(0)!="_"&&!(v in S)&&p(S,v,{value:P.f(v)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(j,Y,D){D.f=j("./_wks")},{"./_wks":166}],166:[function(j,Y,D){var L=j("./_shared")("wks"),g=j("./_uid"),T=j("./_global").Symbol,P=typeof T=="function",p=Y.exports=function(v){return L[v]||(L[v]=P&&T[v]||(P?T:g)("Symbol."+v))};p.store=L},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(j,Y,D){var L=j("./_classof"),g=j("./_wks")("iterator"),T=j("./_iterators");Y.exports=j("./_core").getIteratorMethod=function(P){if(P!=null)return P[g]||P["@@iterator"]||T[L(P)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(j,Y,D){"use strict";var L=j("./_ctx"),g=j("./_export"),T=j("./_to-object"),P=j("./_iter-call"),p=j("./_is-array-iter"),v=j("./_to-length"),S=j("./_create-property"),b=j("./core.get-iterator-method");g(g.S+g.F*!j("./_iter-detect")(function(d){Array.from(d)}),"Array",{from:function(l){var n=T(l),c=typeof this=="function"?this:Array,u=arguments.length,o=u>1?arguments[1]:void 0,h=o!==void 0,m=0,s=b(n),r,a,t,w;if(h&&(o=L(o,u>2?arguments[2]:void 0,2)),s!=null&&!(c==Array&&p(s)))for(w=s.call(n),a=new c;!(t=w.next()).done;m++)S(a,m,h?P(w,o,[t.value,m],!0):t.value);else for(r=v(n.length),a=new c(r);r>m;m++)S(a,m,h?o(n[m],m):n[m]);return a.length=m,a}})},{"./_create-property":100,"./_ctx":101,"./_export":107,"./_is-array-iter":117,"./_iter-call":120,"./_iter-detect":123,"./_to-length":159,"./_to-object":160,"./core.get-iterator-method":167}],169:[function(j,Y,D){"use strict";var L=j("./_add-to-unscopables"),g=j("./_iter-step"),T=j("./_iterators"),P=j("./_to-iobject");Y.exports=j("./_iter-define")(Array,"Array",function(p,v){this._t=P(p),this._i=0,this._k=v},function(){var p=this._t,v=this._k,S=this._i++;return!p||S>=p.length?(this._t=void 0,g(1)):v=="keys"?g(0,S):v=="values"?g(0,p[S]):g(0,[S,p[S]])},"values"),T.Arguments=T.Array,L("keys"),L("values"),L("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(j,Y,D){"use strict";var L=j("./_is-object"),g=j("./_object-gpo"),T=j("./_wks")("hasInstance"),P=Function.prototype;T in P||j("./_object-dp").f(P,T,{value:function(p){if(typeof this!="function"||!L(p))return!1;if(!L(this.prototype))return p instanceof this;for(;p=g(p);)if(this.prototype===p)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(j,Y,D){var L=j("./_export");L(L.S+L.F,"Object",{assign:j("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(j,Y,D){var L=j("./_export");L(L.S,"Object",{create:j("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(j,Y,D){var L=j("./_export");L(L.S+L.F*!j("./_descriptors"),"Object",{defineProperty:j("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(j,Y,D){j("./_object-sap")("getOwnPropertyNames",function(){return j("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(j,Y,D){var L=j("./_to-object"),g=j("./_object-gpo");j("./_object-sap")("getPrototypeOf",function(){return function(P){return g(L(P))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(j,Y,D){var L=j("./_to-object"),g=j("./_object-keys");j("./_object-sap")("keys",function(){return function(P){return g(L(P))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(j,Y,D){arguments[4][71][0].apply(D,arguments)},{dup:71}],178:[function(j,Y,D){"use strict";var L=j("./_library"),g=j("./_global"),T=j("./_ctx"),P=j("./_classof"),p=j("./_export"),v=j("./_is-object"),S=j("./_a-function"),b=j("./_an-instance"),d=j("./_for-of"),l=j("./_species-constructor"),n=j("./_task").set,c=j("./_microtask")(),u=j("./_new-promise-capability"),o=j("./_perform"),h=j("./_user-agent"),m=j("./_promise-resolve"),s="Promise",r=g.TypeError,a=g.process,t=a&&a.versions,w=t&&t.v8||"",E=g[s],f=P(a)=="process",k=function(){},O,C,x,y,_=C=u.f,M=!!function(){try{var W=E.resolve(1),X=(W.constructor={})[j("./_wks")("species")]=function(ne){ne(k,k)};return(f||typeof PromiseRejectionEvent=="function")&&W.then(k)instanceof X&&w.indexOf("6.6")!==0&&h.indexOf("Chrome/66")===-1}catch(ne){}}(),I=function(W){var X;return v(W)&&typeof(X=W.then)=="function"?X:!1},N=function(W,X){if(W._n)return;W._n=!0;var ne=W._c;c(function(){for(var fe=W._v,me=W._s==1,Ae=0,De=function(ye){var Oe=me?ye.ok:ye.fail,xe=ye.resolve,ue=ye.reject,le=ye.domain,re,pe,ee;try{Oe?(me||(W._h==2&&B(W),W._h=1),Oe===!0?re=fe:(le&&le.enter(),re=Oe(fe),le&&(le.exit(),ee=!0)),re===ye.promise?ue(r("Promise-chain cycle")):(pe=I(re))?pe.call(re,xe,ue):xe(re)):ue(fe)}catch(te){le&&!ee&&le.exit(),ue(te)}};ne.length>Ae;)De(ne[Ae++]);W._c=[],W._n=!1,X&&!W._h&&G(W)})},G=function(W){n.call(g,function(){var X=W._v,ne=H(W),fe,me,Ae;if(ne&&(fe=o(function(){f?a.emit("unhandledRejection",X,W):(me=g.onunhandledrejection)?me({promise:W,reason:X}):(Ae=g.console)&&Ae.error&&Ae.error("Unhandled promise rejection",X)}),W._h=f||H(W)?2:1),W._a=void 0,ne&&fe.e)throw fe.v})},H=function(W){return W._h!==1&&(W._a||W._c).length===0},B=function(W){n.call(g,function(){var X;f?a.emit("rejectionHandled",W):(X=g.onrejectionhandled)&&X({promise:W,reason:W._v})})},K=function(W){var X=this;if(X._d)return;X._d=!0,X=X._w||X,X._v=W,X._s=2,X._a||(X._a=X._c.slice()),N(X,!0)},U=function(W){var X=this,ne;if(X._d)return;X._d=!0,X=X._w||X;try{if(X===W)throw r("Promise can't be resolved itself");(ne=I(W))?c(function(){var fe={_w:X,_d:!1};try{ne.call(W,T(U,fe,1),T(K,fe,1))}catch(me){K.call(fe,me)}}):(X._v=W,X._s=1,N(X,!1))}catch(fe){K.call({_w:X,_d:!1},fe)}};M||(E=function(X){b(this,E,s,"_h"),S(X),O.call(this);try{X(T(U,this,1),T(K,this,1))}catch(ne){K.call(this,ne)}},O=function(X){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},O.prototype=j("./_redefine-all")(E.prototype,{then:function(X,ne){var fe=_(l(this,E));return fe.ok=typeof X=="function"?X:!0,fe.fail=typeof ne=="function"&&ne,fe.domain=f?a.domain:void 0,this._c.push(fe),this._a&&this._a.push(fe),this._s&&N(this,!1),fe.promise},catch:function(W){return this.then(void 0,W)}}),x=function(){var W=new O;this.promise=W,this.resolve=T(U,W,1),this.reject=T(K,W,1)},u.f=_=function(W){return W===E||W===y?new x(W):C(W)}),p(p.G+p.W+p.F*!M,{Promise:E}),j("./_set-to-string-tag")(E,s),j("./_set-species")(s),y=j("./_core")[s],p(p.S+p.F*!M,s,{reject:function(X){var ne=_(this),fe=ne.reject;return fe(X),ne.promise}}),p(p.S+p.F*(L||!M),s,{resolve:function(X){return m(L&&this===y?E:this,X)}}),p(p.S+p.F*!(M&&j("./_iter-detect")(function(W){E.all(W).catch(k)})),s,{all:function(X){var ne=this,fe=_(ne),me=fe.resolve,Ae=fe.reject,De=o(function(){var ye=[],Oe=0,xe=1;d(X,!1,function(ue){var le=Oe++,re=!1;ye.push(void 0),xe++,ne.resolve(ue).then(function(pe){if(re)return;re=!0,ye[le]=pe,--xe||me(ye)},Ae)}),--xe||me(ye)});return De.e&&Ae(De.v),fe.promise},race:function(X){var ne=this,fe=_(ne),me=fe.reject,Ae=o(function(){d(X,!1,function(De){ne.resolve(De).then(fe.resolve,me)})});return Ae.e&&me(Ae.v),fe.promise}})},{"./_a-function":92,"./_an-instance":94,"./_classof":97,"./_core":99,"./_ctx":101,"./_export":107,"./_for-of":109,"./_global":110,"./_is-object":119,"./_iter-detect":123,"./_library":126,"./_microtask":128,"./_new-promise-capability":129,"./_perform":144,"./_promise-resolve":145,"./_redefine-all":147,"./_set-species":149,"./_set-to-string-tag":150,"./_species-constructor":153,"./_task":155,"./_user-agent":163,"./_wks":166}],179:[function(j,Y,D){var L=j("./_export"),g=j("./_to-absolute-index"),T=String.fromCharCode,P=String.fromCodePoint;L(L.S+L.F*(!!P&&P.length!=1),"String",{fromCodePoint:function(v){for(var S=[],b=arguments.length,d=0,l;b>d;){if(l=+arguments[d++],g(l,1114111)!==l)throw RangeError(l+" is not a valid code point");S.push(l<65536?T(l):T(((l-=65536)>>10)+55296,l%1024+56320))}return S.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(j,Y,D){"use strict";var L=j("./_string-at")(!0);j("./_iter-define")(String,"String",function(g){this._t=String(g),this._i=0},function(){var g=this._t,T=this._i,P;return T>=g.length?{value:void 0,done:!0}:(P=L(g,T),this._i+=P.length,{value:P,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(j,Y,D){"use strict";var L=j("./_global"),g=j("./_has"),T=j("./_descriptors"),P=j("./_export"),p=j("./_redefine"),v=j("./_meta").KEY,S=j("./_fails"),b=j("./_shared"),d=j("./_set-to-string-tag"),l=j("./_uid"),n=j("./_wks"),c=j("./_wks-ext"),u=j("./_wks-define"),o=j("./_enum-keys"),h=j("./_is-array"),m=j("./_an-object"),s=j("./_is-object"),r=j("./_to-object"),a=j("./_to-iobject"),t=j("./_to-primitive"),w=j("./_property-desc"),E=j("./_object-create"),f=j("./_object-gopn-ext"),k=j("./_object-gopd"),O=j("./_object-gops"),C=j("./_object-dp"),x=j("./_object-keys"),y=k.f,_=C.f,M=f.f,I=L.Symbol,N=L.JSON,G=N&&N.stringify,H="prototype",B=n("_hidden"),K=n("toPrimitive"),U={}.propertyIsEnumerable,W=b("symbol-registry"),X=b("symbols"),ne=b("op-symbols"),fe=Object[H],me=typeof I=="function"&&!!O.f,Ae=L.QObject,De=!Ae||!Ae[H]||!Ae[H].findChild,ye=T&&S(function(){return E(_({},"a",{get:function(){return _(this,"a",{value:7}).a}})).a!=7})?function(ge,Te,Je){var rt=y(fe,Te);rt&&delete fe[Te],_(ge,Te,Je),rt&&ge!==fe&&_(fe,Te,rt)}:_,Oe=function(ge){var Te=X[ge]=E(I[H]);return Te._k=ge,Te},xe=me&&typeof I.iterator=="symbol"?function(ge){return typeof ge=="symbol"}:function(ge){return ge instanceof I},ue=function(Te,Je,rt){return Te===fe&&ue(ne,Je,rt),m(Te),Je=t(Je,!0),m(rt),g(X,Je)?(rt.enumerable?(g(Te,B)&&Te[B][Je]&&(Te[B][Je]=!1),rt=E(rt,{enumerable:w(0,!1)})):(g(Te,B)||_(Te,B,w(1,{})),Te[B][Je]=!0),ye(Te,Je,rt)):_(Te,Je,rt)},le=function(Te,Je){m(Te);for(var rt=o(Je=a(Je)),nt=0,at=rt.length,ct;at>nt;)ue(Te,ct=rt[nt++],Je[ct]);return Te},re=function(Te,Je){return Je===void 0?E(Te):le(E(Te),Je)},pe=function(Te){var Je=U.call(this,Te=t(Te,!0));return this===fe&&g(X,Te)&&!g(ne,Te)?!1:Je||!g(this,Te)||!g(X,Te)||g(this,B)&&this[B][Te]?Je:!0},ee=function(Te,Je){if(Te=a(Te),Je=t(Je,!0),Te===fe&&g(X,Je)&&!g(ne,Je))return;var rt=y(Te,Je);return rt&&g(X,Je)&&!(g(Te,B)&&Te[B][Je])&&(rt.enumerable=!0),rt},te=function(Te){for(var Je=M(a(Te)),rt=[],nt=0,at;Je.length>nt;)!g(X,at=Je[nt++])&&at!=B&&at!=v&&rt.push(at);return rt},ce=function(Te){for(var Je=Te===fe,rt=M(Je?ne:a(Te)),nt=[],at=0,ct;rt.length>at;)g(X,ct=rt[at++])&&(Je?g(fe,ct):!0)&&nt.push(X[ct]);return nt};me||(I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var Te=l(arguments.length>0?arguments[0]:void 0),Je=function(rt){this===fe&&Je.call(ne,rt),g(this,B)&&g(this[B],Te)&&(this[B][Te]=!1),ye(this,Te,w(1,rt))};return T&&De&&ye(fe,Te,{configurable:!0,set:Je}),Oe(Te)},p(I[H],"toString",function(){return this._k}),k.f=ee,C.f=ue,j("./_object-gopn").f=f.f=te,j("./_object-pie").f=pe,O.f=ce,T&&!j("./_library")&&p(fe,"propertyIsEnumerable",pe,!0),c.f=function(ge){return Oe(n(ge))}),P(P.G+P.W+P.F*!me,{Symbol:I});for(var q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Q=0;q.length>Q;)n(q[Q++]);for(var V=x(n.store),Z=0;V.length>Z;)u(V[Z++]);P(P.S+P.F*!me,"Symbol",{for:function(ge){return g(W,ge+="")?W[ge]:W[ge]=I(ge)},keyFor:function(Te){if(!xe(Te))throw TypeError(Te+" is not a symbol!");for(var Je in W)if(W[Je]===Te)return Je},useSetter:function(){De=!0},useSimple:function(){De=!1}}),P(P.S+P.F*!me,"Object",{create:re,defineProperty:ue,defineProperties:le,getOwnPropertyDescriptor:ee,getOwnPropertyNames:te,getOwnPropertySymbols:ce});var be=S(function(){O.f(1)});P(P.S+P.F*be,"Object",{getOwnPropertySymbols:function(Te){return O.f(r(Te))}}),N&&P(P.S+P.F*(!me||S(function(){var ge=I();return G([ge])!="[null]"||G({a:ge})!="{}"||G(Object(ge))!="{}"})),"JSON",{stringify:function(Te){for(var Je=[Te],rt=1,nt,at;arguments.length>rt;)Je.push(arguments[rt++]);return at=nt=Je[1],!s(nt)&&Te===void 0||xe(Te)?void 0:(h(nt)||(nt=function(ct,ht){if(typeof at=="function"&&(ht=at.call(this,ct,ht)),!xe(ht))return ht}),Je[1]=nt,G.apply(N,Je))}}),I[H][K]||j("./_hide")(I[H],K,I[H].valueOf),d(I,"Symbol"),d(Math,"Math",!0),d(L.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(j,Y,D){var L=j("./_export"),g=j("./_object-to-array")(!0);L(L.S,"Object",{entries:function(P){return g(P)}})},{"./_export":107,"./_object-to-array":143}],183:[function(j,Y,D){"use strict";var L=j("./_export"),g=j("./_core"),T=j("./_global"),P=j("./_species-constructor"),p=j("./_promise-resolve");L(L.P+L.R,"Promise",{finally:function(v){var S=P(this,g.Promise||T.Promise),b=typeof v=="function";return this.then(b?function(d){return p(S,v()).then(function(){return d})}:v,b?function(d){return p(S,v()).then(function(){throw d})}:v)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(j,Y,D){"use strict";var L=j("./_export"),g=j("./_new-promise-capability"),T=j("./_perform");L(L.S,"Promise",{try:function(P){var p=g.f(this),v=T(P);return(v.e?p.reject:p.resolve)(v.v),p.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(j,Y,D){j("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(j,Y,D){j("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(j,Y,D){j("./es6.array.iterator");for(var L=j("./_global"),g=j("./_hide"),T=j("./_iterators"),P=j("./_wks")("toStringTag"),p="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(","),v=0;v<p.length;v++){var S=p[v],b=L[S],d=b&&b.prototype;d&&!d[P]&&g(d,P,S),T[S]=T.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(j,Y,D){var L=j("./_export"),g=j("./_task");L(L.G+L.B,{setImmediate:g.set,clearImmediate:g.clear})},{"./_export":107,"./_task":155}],189:[function(j,Y,D){(function(L){"use strict";var g=j("babel-runtime/helpers/typeof"),T=P(g);function P(t){return t&&t.__esModule?t:{default:t}}function p(t){return Array.isArray?Array.isArray(t):a(t)==="[object Array]"}D.isArray=p;function v(t){return typeof t=="boolean"}D.isBoolean=v;function S(t){return t===null}D.isNull=S;function b(t){return t==null}D.isNullOrUndefined=b;function d(t){return typeof t=="number"}D.isNumber=d;function l(t){return typeof t=="string"}D.isString=l;function n(t){return(typeof t=="undefined"?"undefined":(0,T.default)(t))==="symbol"}D.isSymbol=n;function c(t){return t===void 0}D.isUndefined=c;function u(t){return a(t)==="[object RegExp]"}D.isRegExp=u;function o(t){return(typeof t=="undefined"?"undefined":(0,T.default)(t))==="object"&&t!==null}D.isObject=o;function h(t){return a(t)==="[object Date]"}D.isDate=h;function m(t){return a(t)==="[object Error]"||t instanceof Error}D.isError=m;function s(t){return typeof t=="function"}D.isFunction=s;function r(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||(typeof t=="undefined"?"undefined":(0,T.default)(t))==="symbol"||typeof t=="undefined"}D.isPrimitive=r,D.isBuffer=L.isBuffer;function a(t){return Object.prototype.toString.call(t)}}).call(this,{isBuffer:j("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(j,Y,D){"use strict";var L=j("babel-runtime/helpers/typeof"),g=T(L);function T(P){return P&&P.__esModule?P:{default:P}}(function(P){"use strict";var p=function(){var l=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,n=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,c=/[^-+\dA-Z]/g;return function(u,o,h,m){if(arguments.length===1&&d(u)==="string"&&!/\d/.test(u)&&(o=u,u=void 0),u=u||new Date,u instanceof Date||(u=new Date(u)),isNaN(u))throw TypeError("Invalid date");o=String(p.masks[o]||o||p.masks.default);var s=o.slice(0,4);(s==="UTC:"||s==="GMT:")&&(o=o.slice(4),h=!0,s==="GMT:"&&(m=!0));var r=h?"getUTC":"get",a=u[r+"Date"](),t=u[r+"Day"](),w=u[r+"Month"](),E=u[r+"FullYear"](),f=u[r+"Hours"](),k=u[r+"Minutes"](),O=u[r+"Seconds"](),C=u[r+"Milliseconds"](),x=h?0:u.getTimezoneOffset(),y=S(u),_=b(u),M={d:a,dd:v(a),ddd:p.i18n.dayNames[t],dddd:p.i18n.dayNames[t+7],m:w+1,mm:v(w+1),mmm:p.i18n.monthNames[w],mmmm:p.i18n.monthNames[w+12],yy:String(E).slice(2),yyyy:E,h:f%12||12,hh:v(f%12||12),H:f,HH:v(f),M:k,MM:v(k),s:O,ss:v(O),l:v(C,3),L:v(Math.round(C/10)),t:f<12?"a":"p",tt:f<12?"am":"pm",T:f<12?"A":"P",TT:f<12?"AM":"PM",Z:m?"GMT":h?"UTC":(String(u).match(n)||[""]).pop().replace(c,""),o:(x>0?"-":"+")+v(Math.floor(Math.abs(x)/60)*100+Math.abs(x)%60,4),S:["th","st","nd","rd"][a%10>3?0:(a%100-a%10!=10)*a%10],W:y,N:_};return o.replace(l,function(I){return I in M?M[I]:I.slice(1,I.length-1)})}}();p.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"},p.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 v(l,n){for(l=String(l),n=n||2;l.length<n;)l="0"+l;return l}function S(l){var n=new Date(l.getFullYear(),l.getMonth(),l.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var c=new Date(n.getFullYear(),0,4);c.setDate(c.getDate()-(c.getDay()+6)%7+3);var u=n.getTimezoneOffset()-c.getTimezoneOffset();n.setHours(n.getHours()-u);var o=(n-c)/(864e5*7);return 1+Math.floor(o)}function b(l){var n=l.getDay();return n===0&&(n=7),n}function d(l){return l===null?"null":l===void 0?"undefined":(typeof l=="undefined"?"undefined":(0,g.default)(l))!=="object"?typeof l=="undefined"?"undefined":(0,g.default)(l):Array.isArray(l)?"array":{}.toString.call(l).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return p}):(typeof D=="undefined"?"undefined":(0,g.default)(D))==="object"?Y.exports=p:P.dateFormat=p})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(j,Y,D){/*!
|
|
|
* escape-html
|
|
|
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
|
* Copyright(c) 2015 Andreas Lubbe
|
|
|
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var L=/["'&<>]/;Y.exports=g;function g(T){var P=""+T,p=L.exec(P);if(!p)return P;var v,S="",b=0,d=0;for(b=p.index;b<P.length;b++){switch(P.charCodeAt(b)){case 34:v=""";break;case 38:v="&";break;case 39:v="'";break;case 60:v="<";break;case 62:v=">";break;default:continue}d!==b&&(S+=P.substring(d,b)),d=b+1,S+=v}return d!==b?S+P.substring(d,b):S}},{}],192:[function(j,Y,D){function L(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}Y.exports=L,L.EventEmitter=L,L.prototype._events=void 0,L.prototype._maxListeners=void 0,L.defaultMaxListeners=10,L.prototype.setMaxListeners=function(v){if(!T(v)||v<0||isNaN(v))throw TypeError("n must be a positive number");return this._maxListeners=v,this},L.prototype.emit=function(v){var S,b,d,l,n,c;if(this._events||(this._events={}),v==="error"&&(!this._events.error||P(this._events.error)&&!this._events.error.length)){if(S=arguments[1],S instanceof Error)throw S;var u=new Error('Uncaught, unspecified "error" event. ('+S+")");throw u.context=S,u}if(b=this._events[v],p(b))return!1;if(g(b))switch(arguments.length){case 1:b.call(this);break;case 2:b.call(this,arguments[1]);break;case 3:b.call(this,arguments[1],arguments[2]);break;default:l=Array.prototype.slice.call(arguments,1),b.apply(this,l)}else if(P(b))for(l=Array.prototype.slice.call(arguments,1),c=b.slice(),d=c.length,n=0;n<d;n++)c[n].apply(this,l);return!0},L.prototype.addListener=function(v,S){var b;if(!g(S))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",v,g(S.listener)?S.listener:S),this._events[v]?P(this._events[v])?this._events[v].push(S):this._events[v]=[this._events[v],S]:this._events[v]=S,P(this._events[v])&&!this._events[v].warned&&(p(this._maxListeners)?b=L.defaultMaxListeners:b=this._maxListeners,b&&b>0&&this._events[v].length>b&&(this._events[v].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[v].length),typeof console.trace=="function"&&console.trace())),this},L.prototype.on=L.prototype.addListener,L.prototype.once=function(v,S){if(!g(S))throw TypeError("listener must be a function");var b=!1;function d(){this.removeListener(v,d),b||(b=!0,S.apply(this,arguments))}return d.listener=S,this.on(v,d),this},L.prototype.removeListener=function(v,S){var b,d,l,n;if(!g(S))throw TypeError("listener must be a function");if(!this._events||!this._events[v])return this;if(b=this._events[v],l=b.length,d=-1,b===S||g(b.listener)&&b.listener===S)delete this._events[v],this._events.removeListener&&this.emit("removeListener",v,S);else if(P(b)){for(n=l;n-- >0;)if(b[n]===S||b[n].listener&&b[n].listener===S){d=n;break}if(d<0)return this;b.length===1?(b.length=0,delete this._events[v]):b.splice(d,1),this._events.removeListener&&this.emit("removeListener",v,S)}return this},L.prototype.removeAllListeners=function(v){var S,b;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[v]&&delete this._events[v],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[v],g(b))this.removeListener(v,b);else if(b)for(;b.length;)this.removeListener(v,b[b.length-1]);return delete this._events[v],this},L.prototype.listeners=function(v){var S;return!this._events||!this._events[v]?S=[]:g(this._events[v])?S=[this._events[v]]:S=this._events[v].slice(),S},L.prototype.listenerCount=function(v){if(this._events){var S=this._events[v];if(g(S))return 1;if(S)return S.length}return 0},L.listenerCount=function(v,S){return v.listenerCount(S)};function g(v){return typeof v=="function"}function T(v){return typeof v=="number"}function P(v){return typeof v=="object"&&v!==null}function p(v){return v===void 0}},{}],193:[function(j,Y,D){var L=j("http"),g=Y.exports;for(var T in L)L.hasOwnProperty(T)&&(g[T]=L[T]);g.request=function(P,p){return P||(P={}),P.scheme="https",P.protocol="https:",L.request.call(this,P,p)}},{http:231}],194:[function(j,Y,D){/*!
|
|
|
* humanize-ms - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var L=j("util"),g=j("ms");Y.exports=function(T){if(typeof T=="number")return T;var P=g(T);if(P===void 0){var p=new Error(L.format("humanize-ms(%j) result undefined",T));console.warn(p.stack)}return P}},{ms:204,util:243}],195:[function(j,Y,D){D.read=function(L,g,T,P,p){var v,S,b=p*8-P-1,d=(1<<b)-1,l=d>>1,n=-7,c=T?p-1:0,u=T?-1:1,o=L[g+c];for(c+=u,v=o&(1<<-n)-1,o>>=-n,n+=b;n>0;v=v*256+L[g+c],c+=u,n-=8);for(S=v&(1<<-n)-1,v>>=-n,n+=P;n>0;S=S*256+L[g+c],c+=u,n-=8);if(v===0)v=1-l;else{if(v===d)return S?NaN:(o?-1:1)*Infinity;S=S+Math.pow(2,P),v=v-l}return(o?-1:1)*S*Math.pow(2,v-P)},D.write=function(L,g,T,P,p,v){var S,b,d,l=v*8-p-1,n=(1<<l)-1,c=n>>1,u=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,o=P?0:v-1,h=P?1:-1,m=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===Infinity?(b=isNaN(g)?1:0,S=n):(S=Math.floor(Math.log(g)/Math.LN2),g*(d=Math.pow(2,-S))<1&&(S--,d*=2),S+c>=1?g+=u/d:g+=u*Math.pow(2,1-c),g*d>=2&&(S++,d/=2),S+c>=n?(b=0,S=n):S+c>=1?(b=(g*d-1)*Math.pow(2,p),S=S+c):(b=g*Math.pow(2,c-1)*Math.pow(2,p),S=0));p>=8;L[T+o]=b&255,o+=h,b/=256,p-=8);for(S=S<<p|b,l+=p;l>0;L[T+o]=S&255,o+=h,S/=256,l-=8);L[T+o-h]|=m*128}},{}],196:[function(j,Y,D){typeof Object.create=="function"?Y.exports=function(g,T){T&&(g.super_=T,g.prototype=Object.create(T.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}))}:Y.exports=function(g,T){if(T){g.super_=T;var P=function(){};P.prototype=T.prototype,g.prototype=new P,g.prototype.constructor=g}}},{}],197:[function(j,Y,D){/*!
|
|
|
* Determine if an object is a Buffer
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
|
* @license MIT
|
|
|
*/Y.exports=function(T){return T!=null&&(L(T)||g(T)||!!T._isBuffer)};function L(T){return!!T.constructor&&typeof T.constructor.isBuffer=="function"&&T.constructor.isBuffer(T)}function g(T){return typeof T.readFloatLE=="function"&&typeof T.slice=="function"&&L(T.slice(0,0))}},{}],198:[function(j,Y,D){var L={}.toString;Y.exports=Array.isArray||function(g){return L.call(g)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(j,Y){typeof exports=="object"&&typeof module!="undefined"?module.exports=Y(j):typeof define=="function"&&define.amd?define(Y):Y(j)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:this,function(global){"use strict";global=global||{};var _Base64=global.Base64,version="2.5.2",buffer;if(typeof module!="undefined"&&module.exports)try{buffer=eval("require('buffer').Buffer")}catch(j){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(j){for(var Y={},D=0,L=j.length;D<L;D++)Y[j.charAt(D)]=D;return Y}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(j){if(j.length<2){var Y=j.charCodeAt(0);return Y<128?j:Y<2048?fromCharCode(192|Y>>>6)+fromCharCode(128|Y&63):fromCharCode(224|Y>>>12&15)+fromCharCode(128|Y>>>6&63)+fromCharCode(128|Y&63)}else{var Y=65536+(j.charCodeAt(0)-55296)*1024+(j.charCodeAt(1)-56320);return fromCharCode(240|Y>>>18&7)+fromCharCode(128|Y>>>12&63)+fromCharCode(128|Y>>>6&63)+fromCharCode(128|Y&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(j){return j.replace(re_utob,cb_utob)},cb_encode=function(j){var Y=[0,2,1][j.length%3],D=j.charCodeAt(0)<<16|(j.length>1?j.charCodeAt(1):0)<<8|(j.length>2?j.charCodeAt(2):0),L=[b64chars.charAt(D>>>18),b64chars.charAt(D>>>12&63),Y>=2?"=":b64chars.charAt(D>>>6&63),Y>=1?"=":b64chars.charAt(D&63)];return L.join("")},btoa=global.btoa?function(j){return global.btoa(j)}:function(j){return j.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(j){var Y=Object.prototype.toString.call(j)==="[object Uint8Array]";return Y?j.toString("base64"):btoa(utob(String(j)))},encode=function(j,Y){return Y?_encode(String(j)).replace(/[+\/]/g,function(D){return D=="+"?"-":"_"}).replace(/=/g,""):_encode(j)},encodeURI=function(j){return encode(j,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(j){switch(j.length){case 4:var Y=(7&j.charCodeAt(0))<<18|(63&j.charCodeAt(1))<<12|(63&j.charCodeAt(2))<<6|63&j.charCodeAt(3),D=Y-65536;return fromCharCode((D>>>10)+55296)+fromCharCode((D&1023)+56320);case 3:return fromCharCode((15&j.charCodeAt(0))<<12|(63&j.charCodeAt(1))<<6|63&j.charCodeAt(2));default:return fromCharCode((31&j.charCodeAt(0))<<6|63&j.charCodeAt(1))}},btou=function(j){return j.replace(re_btou,cb_btou)},cb_decode=function(j){var Y=j.length,D=Y%4,L=(Y>0?b64tab[j.charAt(0)]<<18:0)|(Y>1?b64tab[j.charAt(1)]<<12:0)|(Y>2?b64tab[j.charAt(2)]<<6:0)|(Y>3?b64tab[j.charAt(3)]:0),g=[fromCharCode(L>>>16),fromCharCode(L>>>8&255),fromCharCode(L&255)];return g.length-=[0,0,2,1][D],g.join("")},_atob=global.atob?function(j){return global.atob(j)}:function(j){return j.replace(/\S{1,4}/g,cb_decode)},atob=function(j){return _atob(String(j).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(j){return(j.constructor===buffer.constructor?j:buffer.from(j,"base64")).toString()}:function(j){return(j.constructor===buffer.constructor?j:new buffer(j,"base64")).toString()}:function(j){return btou(_atob(j))},decode=function(j){return _decode(String(j).replace(/[-_]/g,function(Y){return Y=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var j=global.Base64;return global.Base64=_Base64,j};if(global.Base64={VERSION:version,atob,btoa,fromBase64:decode,toBase64:encode,utob,encode,encodeURI,btou,decode,noConflict,__buffer__:buffer},typeof Object.defineProperty=="function"){var noEnum=function(j){return{value:j,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)})),Object.defineProperty(String.prototype,"toBase64",noEnum(function(j){return encode(this,j)})),Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,!0)}))}}return global.Meteor&&(Base64=global.Base64),typeof module!="undefined"&&module.exports?module.exports.Base64=global.Base64:typeof define=="function"&&define.amd&&define([],function(){return global.Base64}),{Base64:global.Base64}})}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],200:[function(j,Y,D){/*!
|
|
|
* merge-descriptors
|
|
|
* Copyright(c) 2014 Jonathan Ong
|
|
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
|
* MIT Licensed
|
|
|
*/"use strict";Y.exports=g;var L=Object.prototype.hasOwnProperty;function g(T,P,p){if(!T)throw new TypeError("argument dest is required");if(!P)throw new TypeError("argument src is required");return p===void 0&&(p=!0),Object.getOwnPropertyNames(P).forEach(function(S){if(!p&&L.call(T,S))return;var b=Object.getOwnPropertyDescriptor(P,S);Object.defineProperty(T,S,b)}),T}},{}],201:[function(j,Y,D){"use strict";function L(){this._types=Object.create(null),this._extensions=Object.create(null);for(var g=0;g<arguments.length;g++)this.define(arguments[g]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}L.prototype.define=function(g,T){for(var P in g){var p=g[P].map(function(b){return b.toLowerCase()});P=P.toLowerCase();for(var v=0;v<p.length;v++){var S=p[v];if(S[0]=="*")continue;if(!T&&S in this._types)throw new Error('Attempt to change mapping for "'+S+'" extension from "'+this._types[S]+'" to "'+P+'". Pass `force=true` to allow this, otherwise remove "'+S+'" from the list of extensions for "'+P+'".');this._types[S]=P}if(T||!this._extensions[P]){var S=p[0];this._extensions[P]=S[0]!="*"?S:S.substr(1)}}},L.prototype.getType=function(g){g=String(g);var T=g.replace(/^.*[/\\]/,"").toLowerCase(),P=T.replace(/^.*\./,"").toLowerCase(),p=T.length<g.length,v=P.length<T.length-1;return(v||!p)&&this._types[P]||null},L.prototype.getExtension=function(g){return g=/^\s*([^;\s]*)/.test(g)&&RegExp.$1,g&&this._extensions[g.toLowerCase()]||null},Y.exports=L},{}],202:[function(j,Y,D){"use strict";var L=j("./Mime");Y.exports=new L(j("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(j,Y,D){Y.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["*xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/urc-ressheet+xml":["rsheet"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],204:[function(j,Y,D){var L=1e3,g=L*60,T=g*60,P=T*24,p=P*7,v=P*365.25;Y.exports=function(n,c){c=c||{};var u=typeof n;if(u==="string"&&n.length>0)return S(n);if(u==="number"&&isFinite(n))return c.long?d(n):b(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function S(n){if(n=String(n),n.length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(!c)return;var u=parseFloat(c[1]),o=(c[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return u*v;case"weeks":case"week":case"w":return u*p;case"days":case"day":case"d":return u*P;case"hours":case"hour":case"hrs":case"hr":case"h":return u*T;case"minutes":case"minute":case"mins":case"min":case"m":return u*g;case"seconds":case"second":case"secs":case"sec":case"s":return u*L;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}function b(n){var c=Math.abs(n);return c>=P?Math.round(n/P)+"d":c>=T?Math.round(n/T)+"h":c>=g?Math.round(n/g)+"m":c>=L?Math.round(n/L)+"s":n+"ms"}function d(n){var c=Math.abs(n);return c>=P?l(n,c,P,"day"):c>=T?l(n,c,T,"hour"):c>=g?l(n,c,g,"minute"):c>=L?l(n,c,L,"second"):n+" ms"}function l(n,c,u,o){var h=c>=u*1.5;return Math.round(n/u)+" "+o+(h?"s":"")}},{}],205:[function(j,Y,D){(function(L){function g(v,S){for(var b=0,d=v.length-1;d>=0;d--){var l=v[d];l==="."?v.splice(d,1):l===".."?(v.splice(d,1),b++):b&&(v.splice(d,1),b--)}if(S)for(;b--;b)v.unshift("..");return v}D.resolve=function(){for(var v="",S=!1,b=arguments.length-1;b>=-1&&!S;b--){var d=b>=0?arguments[b]:L.cwd();if(typeof d!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!d)continue;v=d+"/"+v,S=d.charAt(0)==="/"}return v=g(P(v.split("/"),function(l){return!!l}),!S).join("/"),(S?"/":"")+v||"."},D.normalize=function(v){var S=D.isAbsolute(v),b=p(v,-1)==="/";return v=g(P(v.split("/"),function(d){return!!d}),!S).join("/"),!v&&!S&&(v="."),v&&b&&(v+="/"),(S?"/":"")+v},D.isAbsolute=function(v){return v.charAt(0)==="/"},D.join=function(){var v=Array.prototype.slice.call(arguments,0);return D.normalize(P(v,function(S,b){if(typeof S!="string")throw new TypeError("Arguments to path.join must be strings");return S}).join("/"))},D.relative=function(v,S){v=D.resolve(v).substr(1),S=D.resolve(S).substr(1);function b(h){for(var m=0;m<h.length&&!(h[m]!=="");m++);for(var s=h.length-1;s>=0&&!(h[s]!=="");s--);return m>s?[]:h.slice(m,s-m+1)}for(var d=b(v.split("/")),l=b(S.split("/")),n=Math.min(d.length,l.length),c=n,u=0;u<n;u++)if(d[u]!==l[u]){c=u;break}for(var o=[],u=c;u<d.length;u++)o.push("..");return o=o.concat(l.slice(c)),o.join("/")},D.sep="/",D.delimiter=":",D.dirname=function(v){if(typeof v!="string"&&(v=v+""),v.length===0)return".";for(var S=v.charCodeAt(0),b=S===47,d=-1,l=!0,n=v.length-1;n>=1;--n)if(S=v.charCodeAt(n),S===47){if(!l){d=n;break}}else l=!1;return d===-1?b?"/":".":b&&d===1?"/":v.slice(0,d)};function T(v){typeof v!="string"&&(v=v+"");var S=0,b=-1,d=!0,l;for(l=v.length-1;l>=0;--l)if(v.charCodeAt(l)===47){if(!d){S=l+1;break}}else b===-1&&(d=!1,b=l+1);return b===-1?"":v.slice(S,b)}D.basename=function(v,S){var b=T(v);return S&&b.substr(-1*S.length)===S&&(b=b.substr(0,b.length-S.length)),b},D.extname=function(v){typeof v!="string"&&(v=v+"");for(var S=-1,b=0,d=-1,l=!0,n=0,c=v.length-1;c>=0;--c){var u=v.charCodeAt(c);if(u===47){if(!l){b=c+1;break}continue}d===-1&&(l=!1,d=c+1),u===46?S===-1?S=c:n!==1&&(n=1):S!==-1&&(n=-1)}return S===-1||d===-1||n===0||n===1&&S===d-1&&S===b+1?"":v.slice(S,d)};function P(v,S){if(v.filter)return v.filter(S);for(var b=[],d=0;d<v.length;d++)S(v[d],d,v)&&b.push(v[d]);return b}var p="ab".substr(-1)==="b"?function(v,S,b){return v.substr(S,b)}:function(v,S,b){return S<0&&(S=v.length+S),v.substr(S,b)}}).call(this,j("_process"))},{_process:208}],206:[function(j,Y,D){(function(L){/*!
|
|
|
* Platform.js <https://mths.be/platform>
|
|
|
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
|
|
|
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
|
|
|
* Available under MIT license <https://mths.be/mit>
|
|
|
*/(function(){"use strict";var g={function:!0,object:!0},T=g[typeof window]&&window||this,P=T,p=g[typeof D]&&D,v=g[typeof Y]&&Y&&!Y.nodeType&&Y,S=p&&v&&typeof L=="object"&&L;S&&(S.global===S||S.window===S||S.self===S)&&(T=S);var b=Math.pow(2,53)-1,d=/\bOpera/,l=this,n=Object.prototype,c=n.hasOwnProperty,u=n.toString;function o(C){return C=String(C),C.charAt(0).toUpperCase()+C.slice(1)}function h(C,x,y){var _={"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&&y&&/^Win/i.test(C)&&!/^Windows Phone /i.test(C)&&(_=_[/[\d.]+$/.exec(C)])&&(C="Windows "+_),C=String(C),x&&y&&(C=C.replace(RegExp(x,"i"),y)),C=s(C.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]),C}function m(C,x){var y=-1,_=C?C.length:0;if(typeof _=="number"&&_>-1&&_<=b)for(;++y<_;)x(C[y],y,C);else r(C,x)}function s(C){return C=f(C),/^(?:webOS|i(?:OS|P))/.test(C)?C:o(C)}function r(C,x){for(var y in C)c.call(C,y)&&x(C[y],y,C)}function a(C){return C==null?o(C):u.call(C).slice(8,-1)}function t(C,x){var y=C!=null?typeof C[x]:"number";return!/^(?:boolean|number|string|undefined)$/.test(y)&&(y=="object"?!!C[x]:!0)}function w(C){return String(C).replace(/([ -])(?!$)/g,"$1?")}function E(C,x){var y=null;return m(C,function(_,M){y=x(y,_,M,C)}),y}function f(C){return String(C).replace(/^ +| +$/g,"")}function k(C){var x=T,y=C&&typeof C=="object"&&a(C)!="String";y&&(x=C,C=null);var _=x.navigator||{},M=_.userAgent||"";C||(C=M);var I=y||l==P,N=y?!!_.likeChrome:/\bChrome\b/.test(C)&&!/internal|\n/i.test(u.toString()),G="Object",H=y?G:"ScriptBridgingProxyObject",B=y?G:"Environment",K=y&&x.java?"JavaPackage":a(x.java),U=y?G:"RuntimeObject",W=/\bJava/.test(K)&&x.java,X=W&&a(x.environment)==B,ne=W?"a":"\u03B1",fe=W?"b":"\u03B2",me=x.document||{},Ae=x.operamini||x.opera,De=d.test(De=y&&Ae?Ae["[[Class]]"]:a(Ae))?De:Ae=null,ye,Oe=C,xe=[],ue=null,le=C==M,re=le&&Ae&&typeof Ae.version=="function"&&Ae.version(),pe,ee=V([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),te=be(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),ce=Te([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),q=Z({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),Q=ge(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function V(at){return E(at,function(ct,ht){return ct||RegExp("\\b"+(ht.pattern||w(ht))+"\\b","i").exec(C)&&(ht.label||ht)})}function Z(at){return E(at,function(ct,ht,He){return ct||(ht[ce]||ht[/^[a-z]+(?: +[a-z]+\b)*/i.exec(ce)]||RegExp("\\b"+w(He)+"(?:\\b|\\w*\\d)","i").exec(C))&&He})}function be(at){return E(at,function(ct,ht){return ct||RegExp("\\b"+(ht.pattern||w(ht))+"\\b","i").exec(C)&&(ht.label||ht)})}function ge(at){return E(at,function(ct,ht){var He=ht.pattern||w(ht);return!ct&&(ct=RegExp("\\b"+He+"(?:/[\\d.]+|[ \\w.]*)","i").exec(C))&&(ct=h(ct,He,ht.label||ht)),ct})}function Te(at){return E(at,function(ct,ht){var He=ht.pattern||w(ht);return!ct&&(ct=RegExp("\\b"+He+" *\\d+[.\\w_]*","i").exec(C)||RegExp("\\b"+He+" *\\w+-[\\w]*","i").exec(C)||RegExp("\\b"+He+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(C))&&((ct=String(ht.label&&!RegExp(He,"i").test(ht.label)?ht.label:ct).split("/"))[1]&&!/[\d.]+/.test(ct[0])&&(ct[0]+=" "+ct[1]),ht=ht.label||ht,ct=s(ct[0].replace(RegExp(He,"i"),ht).replace(RegExp("; *(?:"+ht+"[_-])?","i")," ").replace(RegExp("("+ht+")[-_.]?(\\w)","i"),"$1 $2"))),ct})}function Je(at){return E(at,function(ct,ht){return ct||(RegExp(ht+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(C)||0)[1]||null})}function rt(){return this.description||""}if(ee&&(ee=[ee]),q&&!ce&&(ce=Te([q])),(ye=/\bGoogle TV\b/.exec(ce))&&(ce=ye[0]),/\bSimulator\b/i.test(C)&&(ce=(ce?ce+" ":"")+"Simulator"),te=="Opera Mini"&&/\bOPiOS\b/.test(C)&&xe.push("running in Turbo/Uncompressed mode"),te=="IE"&&/\blike iPhone OS\b/.test(C)?(ye=k(C.replace(/like iPhone OS/,"")),q=ye.manufacturer,ce=ye.product):/^iP/.test(ce)?(te||(te="Safari"),Q="iOS"+((ye=/ OS ([\d_]+)/i.exec(C))?" "+ye[1].replace(/_/g,"."):"")):te=="Konqueror"&&!/buntu/i.test(Q)?Q="Kubuntu":q&&q!="Google"&&(/Chrome/.test(te)&&!/\bMobile Safari\b/i.test(C)||/\bVita\b/.test(ce))||/\bAndroid\b/.test(Q)&&/^Chrome/.test(te)&&/\bVersion\//i.test(C)?(te="Android Browser",Q=/\bAndroid\b/.test(Q)?Q:"Android"):te=="Silk"?(/\bMobi/i.test(C)||(Q="Android",xe.unshift("desktop mode")),/Accelerated *= *true/i.test(C)&&xe.unshift("accelerated")):te=="PaleMoon"&&(ye=/\bFirefox\/([\d.]+)\b/.exec(C))?xe.push("identifying as Firefox "+ye[1]):te=="Firefox"&&(ye=/\b(Mobile|Tablet|TV)\b/i.exec(C))?(Q||(Q="Firefox OS"),ce||(ce=ye[1])):!te||(ye=!/\bMinefield\b/i.test(C)&&/\b(?:Firefox|Safari)\b/.exec(te))?(te&&!ce&&/[\/,]|^[^(]+?\)/.test(C.slice(C.indexOf(ye+"/")+8))&&(te=null),(ye=ce||q||Q)&&(ce||q||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Q))&&(te=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Q)?Q:ye)+" Browser")):te=="Electron"&&(ye=(/\bChrome\/([\d.]+)\b/.exec(C)||0)[1])&&xe.push("Chromium "+ye),re||(re=Je(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",w(te),"(?:Firefox|Minefield|NetFront)"])),(ye=ee=="iCab"&&parseFloat(re)>3&&"WebKit"||/\bOpera\b/.test(te)&&(/\bOPR\b/.test(C)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(C)&&!/^(?:Trident|EdgeHTML)$/.test(ee)&&"WebKit"||!ee&&/\bMSIE\b/i.test(C)&&(Q=="Mac OS"?"Tasman":"Trident")||ee=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(te)&&"NetFront")&&(ee=[ye]),te=="IE"&&(ye=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(C)||0)[1])?(te+=" Mobile",Q="Windows Phone "+(/\+$/.test(ye)?ye:ye+".x"),xe.unshift("desktop mode")):/\bWPDesktop\b/i.test(C)?(te="IE Mobile",Q="Windows Phone 8.x",xe.unshift("desktop mode"),re||(re=(/\brv:([\d.]+)/.exec(C)||0)[1])):te!="IE"&&ee=="Trident"&&(ye=/\brv:([\d.]+)/.exec(C))&&(te&&xe.push("identifying as "+te+(re?" "+re:"")),te="IE",re=ye[1]),le){if(t(x,"global"))if(W&&(ye=W.lang.System,Oe=ye.getProperty("os.arch"),Q=Q||ye.getProperty("os.name")+" "+ye.getProperty("os.version")),X){try{re=x.require("ringo/engine").version.join("."),te="RingoJS"}catch(at){(ye=x.system)&&ye.global.system==x.system&&(te="Narwhal",Q||(Q=ye[0].os||null))}te||(te="Rhino")}else typeof x.process=="object"&&!x.process.browser&&(ye=x.process)&&(typeof ye.versions=="object"&&(typeof ye.versions.electron=="string"?(xe.push("Node "+ye.versions.node),te="Electron",re=ye.versions.electron):typeof ye.versions.nw=="string"&&(xe.push("Chromium "+re,"Node "+ye.versions.node),te="NW.js",re=ye.versions.nw)),te||(te="Node.js",Oe=ye.arch,Q=ye.platform,re=/[\d.]+/.exec(ye.version),re=re?re[0]:null));else a(ye=x.runtime)==H?(te="Adobe AIR",Q=ye.flash.system.Capabilities.os):a(ye=x.phantom)==U?(te="PhantomJS",re=(ye=ye.version||null)&&ye.major+"."+ye.minor+"."+ye.patch):typeof me.documentMode=="number"&&(ye=/\bTrident\/(\d+)/i.exec(C))?(re=[re,me.documentMode],(ye=+ye[1]+4)!=re[1]&&(xe.push("IE "+re[1]+" mode"),ee&&(ee[1]=""),re[1]=ye),re=te=="IE"?String(re[1].toFixed(1)):re[0]):typeof me.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(te)&&(xe.push("masking as "+te+" "+re),te="IE",re="11.0",ee=["Trident"],Q="Windows");Q=Q&&s(Q)}if(re&&(ye=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(re)||/(?:alpha|beta)(?: ?\d)?/i.exec(C+";"+(le&&_.appMinorVersion))||/\bMinefield\b/i.test(C)&&"a")&&(ue=/b/i.test(ye)?"beta":"alpha",re=re.replace(RegExp(ye+"\\+?$"),"")+(ue=="beta"?fe:ne)+(/\d+\+?/.exec(ye)||"")),te=="Fennec"||te=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Q))te="Firefox Mobile";else if(te=="Maxthon"&&re)re=re.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(ce))ce=="Xbox 360"&&(Q=null),ce=="Xbox 360"&&/\bIEMobile\b/.test(C)&&xe.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(te)||te&&!ce&&!/Browser|Mobi/.test(te))&&(Q=="Windows CE"||/Mobi/i.test(C)))te+=" Mobile";else if(te=="IE"&&le)try{x.external===null&&xe.unshift("platform preview")}catch(at){xe.unshift("embedded")}else(/\bBlackBerry\b/.test(ce)||/\bBB10\b/.test(C))&&(ye=(RegExp(ce.replace(/ +/g," *")+"/([.\\d]+)","i").exec(C)||0)[1]||re)?(ye=[ye,/BB10/.test(C)],Q=(ye[1]?(ce=null,q="BlackBerry"):"Device Software")+" "+ye[0],re=null):this!=r&&ce!="Wii"&&(le&&Ae||/Opera/.test(te)&&/\b(?:MSIE|Firefox)\b/i.test(C)||te=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Q)||te=="IE"&&(Q&&!/^Win/.test(Q)&&re>5.5||/\bWindows XP\b/.test(Q)&&re>8||re==8&&!/\bTrident\b/.test(C)))&&!d.test(ye=k.call(r,C.replace(d,"")+";"))&&ye.name&&(ye="ing as "+ye.name+((ye=ye.version)?" "+ye:""),d.test(te)?(/\bIE\b/.test(ye)&&Q=="Mac OS"&&(Q=null),ye="identify"+ye):(ye="mask"+ye,De?te=s(De.replace(/([a-z])([A-Z])/g,"$1 $2")):te="Opera",/\bIE\b/.test(ye)&&(Q=null),le||(re=null)),ee=["Presto"],xe.push(ye));(ye=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(C)||0)[1])&&(ye=[parseFloat(ye.replace(/\.(\d)$/,".0$1")),ye],te=="Safari"&&ye[1].slice(-1)=="+"?(te="WebKit Nightly",ue="alpha",re=ye[1].slice(0,-1)):(re==ye[1]||re==(ye[2]=(/\bSafari\/([\d.]+\+?)/i.exec(C)||0)[1]))&&(re=null),ye[1]=(/\bChrome\/([\d.]+)/i.exec(C)||0)[1],ye[0]==537.36&&ye[2]==537.36&&parseFloat(ye[1])>=28&&ee=="WebKit"&&(ee=["Blink"]),!le||!N&&!ye[1]?(ee&&(ee[1]="like Safari"),ye=(ye=ye[0],ye<400?1:ye<500?2:ye<526?3:ye<533?4:ye<534?"4+":ye<535?5:ye<537?6:ye<538?7:ye<601?8:"8")):(ee&&(ee[1]="like Chrome"),ye=ye[1]||(ye=ye[0],ye<530?1:ye<532?2:ye<532.05?3:ye<533?4:ye<534.03?5:ye<534.07?6:ye<534.1?7:ye<534.13?8:ye<534.16?9:ye<534.24?10:ye<534.3?11:ye<535.01?12:ye<535.02?"13+":ye<535.07?15:ye<535.11?16:ye<535.19?17:ye<536.05?18:ye<536.1?19:ye<537.01?20:ye<537.11?"21+":ye<537.13?23:ye<537.18?24:ye<537.24?25:ye<537.36?26:ee!="Blink"?"27":"28")),ee&&(ee[1]+=" "+(ye+=typeof ye=="number"?".x":/[.+]/.test(ye)?"":"+")),te=="Safari"&&(!re||parseInt(re)>45)&&(re=ye)),te=="Opera"&&(ye=/\bzbov|zvav$/.exec(Q))?(te+=" ",xe.unshift("desktop mode"),ye=="zvav"?(te+="Mini",re=null):te+="Mobile",Q=Q.replace(RegExp(" *"+ye+"$"),"")):te=="Safari"&&/\bChrome\b/.exec(ee&&ee[1])&&(xe.unshift("desktop mode"),te="Chrome Mobile",re=null,/\bOS X\b/.test(Q)?(q="Apple",Q="iOS 4.3+"):Q=null),re&&re.indexOf(ye=/[\d.]+$/.exec(Q))==0&&C.indexOf("/"+ye+"-")>-1&&(Q=f(Q.replace(ye,""))),ee&&!/\b(?:Avant|Nook)\b/.test(te)&&(/Browser|Lunascape|Maxthon/.test(te)||te!="Safari"&&/^iOS/.test(Q)&&/\bSafari\b/.test(ee[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(te)&&ee[1])&&((ye=ee[ee.length-1])&&xe.push(ye)),xe.length&&(xe=["("+xe.join("; ")+")"]),q&&ce&&ce.indexOf(q)<0&&xe.push("on "+q),ce&&xe.push((/^on /.test(xe[xe.length-1])?"":"on ")+ce),Q&&(ye=/ ([\d.+]+)$/.exec(Q),pe=ye&&Q.charAt(Q.length-ye[0].length-1)=="/",Q={architecture:32,family:ye&&!pe?Q.replace(ye[0],""):Q,version:ye?ye[1]:null,toString:function(){var at=this.version;return this.family+(at&&!pe?" "+at:"")+(this.architecture==64?" 64-bit":"")}}),(ye=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Oe))&&!/\bi686\b/i.test(Oe)?(Q&&(Q.architecture=64,Q.family=Q.family.replace(RegExp(" *"+ye),"")),te&&(/\bWOW64\b/i.test(C)||le&&/\w(?:86|32)$/.test(_.cpuClass||_.platform)&&!/\bWin64; x64\b/i.test(C))&&xe.unshift("32-bit")):Q&&/^OS X/.test(Q.family)&&te=="Chrome"&&parseFloat(re)>=39&&(Q.architecture=64),C||(C=null);var nt={};return nt.description=C,nt.layout=ee&&ee[0],nt.manufacturer=q,nt.name=te,nt.prerelease=ue,nt.product=ce,nt.ua=C,nt.version=te&&re,nt.os=Q||{architecture:null,family:null,version:null,toString:function(){return"null"}},nt.parse=k,nt.toString=rt,nt.version&&xe.unshift(re),nt.name&&xe.unshift(te),Q&&te&&!(Q==String(Q).split(" ")[0]&&(Q==te.split(" ")[0]||ce))&&xe.push(ce?"("+Q+")":"on "+Q),xe.length&&(nt.description=xe.join(" ")),nt}var O=k();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(T.platform=O,define(function(){return O})):p&&v?r(O,function(C,x){p[x]=C}):T.platform=O}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(j,Y,D){(function(L){"use strict";typeof L=="undefined"||!L.version||L.version.indexOf("v0.")===0||L.version.indexOf("v1.")===0&&L.version.indexOf("v1.8.")!==0?Y.exports={nextTick:g}:Y.exports=L;function g(T,P,p,v){if(typeof T!="function")throw new TypeError('"callback" argument must be a function');var S=arguments.length,b,d;switch(S){case 0:case 1:return L.nextTick(T);case 2:return L.nextTick(function(){T.call(null,P)});case 3:return L.nextTick(function(){T.call(null,P,p)});case 4:return L.nextTick(function(){T.call(null,P,p,v)});default:for(b=new Array(S-1),d=0;d<b.length;)b[d++]=arguments[d];return L.nextTick(function(){T.apply(null,b)})}}}).call(this,j("_process"))},{_process:208}],208:[function(j,Y,D){var L=Y.exports={},g,T;function P(){throw new Error("setTimeout has not been defined")}function p(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?g=setTimeout:g=P}catch(m){g=P}try{typeof clearTimeout=="function"?T=clearTimeout:T=p}catch(m){T=p}})();function v(m){if(g===setTimeout)return setTimeout(m,0);if((g===P||!g)&&setTimeout)return g=setTimeout,setTimeout(m,0);try{return g(m,0)}catch(s){try{return g.call(null,m,0)}catch(r){return g.call(this,m,0)}}}function S(m){if(T===clearTimeout)return clearTimeout(m);if((T===p||!T)&&clearTimeout)return T=clearTimeout,clearTimeout(m);try{return T(m)}catch(s){try{return T.call(null,m)}catch(r){return T.call(this,m)}}}var b=[],d=!1,l,n=-1;function c(){if(!d||!l)return;d=!1,l.length?b=l.concat(b):n=-1,b.length&&u()}function u(){if(d)return;var m=v(c);d=!0;for(var s=b.length;s;){for(l=b,b=[];++n<s;)l&&l[n].run();n=-1,s=b.length}l=null,d=!1,S(m)}L.nextTick=function(m){var s=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)s[r-1]=arguments[r];b.push(new o(m,s)),b.length===1&&!d&&v(u)};function o(m,s){this.fun=m,this.array=s}o.prototype.run=function(){this.fun.apply(null,this.array)},L.title="browser",L.browser=!0,L.env={},L.argv=[],L.version="",L.versions={};function h(){}L.on=h,L.addListener=h,L.once=h,L.off=h,L.removeListener=h,L.removeAllListeners=h,L.emit=h,L.prependListener=h,L.prependOnceListener=h,L.listeners=function(m){return[]},L.binding=function(m){throw new Error("process.binding is not supported")},L.cwd=function(){return"/"},L.chdir=function(m){throw new Error("process.chdir is not supported")},L.umask=function(){return 0}},{}],209:[function(j,Y,D){(function(L){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(g){var T=typeof D=="object"&&D&&!D.nodeType&&D,P=typeof Y=="object"&&Y&&!Y.nodeType&&Y,p=typeof L=="object"&&L;(p.global===p||p.window===p||p.self===p)&&(g=p);var v,S=2147483647,b=36,d=1,l=26,n=38,c=700,u=72,o=128,h="-",m=/^xn--/,s=/[^\x20-\x7E]/,r=/[\x2E\u3002\uFF0E\uFF61]/g,a={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},t=b-d,w=Math.floor,E=String.fromCharCode,f;function k(K){throw new RangeError(a[K])}function O(K,U){for(var W=K.length,X=[];W--;)X[W]=U(K[W]);return X}function C(K,U){var W=K.split("@"),X="";W.length>1&&(X=W[0]+"@",K=W[1]),K=K.replace(r,".");var ne=K.split("."),fe=O(ne,U).join(".");return X+fe}function x(K){for(var U=[],W=0,X=K.length,ne,fe;W<X;)ne=K.charCodeAt(W++),ne>=55296&&ne<=56319&&W<X?(fe=K.charCodeAt(W++),(fe&64512)==56320?U.push(((ne&1023)<<10)+(fe&1023)+65536):(U.push(ne),W--)):U.push(ne);return U}function y(K){return O(K,function(U){var W="";return U>65535&&(U-=65536,W+=E(U>>>10&1023|55296),U=56320|U&1023),W+=E(U),W}).join("")}function _(K){return K-48<10?K-22:K-65<26?K-65:K-97<26?K-97:b}function M(K,U){return K+22+75*(K<26)-((U!=0)<<5)}function I(K,U,W){var X=0;for(K=W?w(K/c):K>>1,K+=w(K/U);K>t*l>>1;X+=b)K=w(K/t);return w(X+(t+1)*K/(K+n))}function N(K){var U=[],W=K.length,X,ne=0,fe=o,me=u,Ae,De,ye,Oe,xe,ue,le,re,pe;for(Ae=K.lastIndexOf(h),Ae<0&&(Ae=0),De=0;De<Ae;++De)K.charCodeAt(De)>=128&&k("not-basic"),U.push(K.charCodeAt(De));for(ye=Ae>0?Ae+1:0;ye<W;){for(Oe=ne,xe=1,ue=b;!(ye>=W&&k("invalid-input"),le=_(K.charCodeAt(ye++)),(le>=b||le>w((S-ne)/xe))&&k("overflow"),ne+=le*xe,re=ue<=me?d:ue>=me+l?l:ue-me,le<re);ue+=b)pe=b-re,xe>w(S/pe)&&k("overflow"),xe*=pe;X=U.length+1,me=I(ne-Oe,X,Oe==0),w(ne/X)>S-fe&&k("overflow"),fe+=w(ne/X),ne%=X,U.splice(ne++,0,fe)}return y(U)}function G(K){var U,W,X,ne,fe,me,Ae,De,ye,Oe,xe,ue=[],le,re,pe,ee;for(K=x(K),le=K.length,U=o,W=0,fe=u,me=0;me<le;++me)xe=K[me],xe<128&&ue.push(E(xe));for(X=ne=ue.length,ne&&ue.push(h);X<le;){for(Ae=S,me=0;me<le;++me)xe=K[me],xe>=U&&xe<Ae&&(Ae=xe);for(re=X+1,Ae-U>w((S-W)/re)&&k("overflow"),W+=(Ae-U)*re,U=Ae,me=0;me<le;++me)if(xe=K[me],xe<U&&++W>S&&k("overflow"),xe==U){for(De=W,ye=b;!(Oe=ye<=fe?d:ye>=fe+l?l:ye-fe,De<Oe);ye+=b)ee=De-Oe,pe=b-Oe,ue.push(E(M(Oe+ee%pe,0))),De=w(ee/pe);ue.push(E(M(De,0))),fe=I(W,re,X==ne),W=0,++X}++W,++U}return ue.join("")}function H(K){return C(K,function(U){return m.test(U)?N(U.slice(4).toLowerCase()):U})}function B(K){return C(K,function(U){return s.test(U)?"xn--"+G(U):U})}if(v={version:"1.4.1",ucs2:{decode:x,encode:y},decode:N,encode:G,toASCII:B,toUnicode:H},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return v});else if(T&&P)if(Y.exports==T)P.exports=v;else for(f in v)v.hasOwnProperty(f)&&(T[f]=v[f]);else g.punycode=v})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(j,Y,D){"use strict";function L(T,P){return Object.prototype.hasOwnProperty.call(T,P)}Y.exports=function(T,P,p,v){P=P||"&",p=p||"=";var S={};if(typeof T!="string"||T.length===0)return S;var b=/\+/g;T=T.split(P);var d=1e3;v&&typeof v.maxKeys=="number"&&(d=v.maxKeys);var l=T.length;d>0&&l>d&&(l=d);for(var n=0;n<l;++n){var c=T[n].replace(b,"%20"),u=c.indexOf(p),o,h,m,s;u>=0?(o=c.substr(0,u),h=c.substr(u+1)):(o=c,h=""),m=decodeURIComponent(o),s=decodeURIComponent(h),L(S,m)?g(S[m])?S[m].push(s):S[m]=[S[m],s]:S[m]=s}return S};var g=Array.isArray||function(T){return Object.prototype.toString.call(T)==="[object Array]"}},{}],211:[function(j,Y,D){"use strict";var L=function(p){switch(typeof p){case"string":return p;case"boolean":return p?"true":"false";case"number":return isFinite(p)?p:"";default:return""}};Y.exports=function(p,v,S,b){return v=v||"&",S=S||"=",p===null&&(p=void 0),typeof p=="object"?T(P(p),function(d){var l=encodeURIComponent(L(d))+S;return g(p[d])?T(p[d],function(n){return l+encodeURIComponent(L(n))}).join(v):l+encodeURIComponent(L(p[d]))}).join(v):b?encodeURIComponent(L(b))+S+encodeURIComponent(L(p)):""};var g=Array.isArray||function(p){return Object.prototype.toString.call(p)==="[object Array]"};function T(p,v){if(p.map)return p.map(v);for(var S=[],b=0;b<p.length;b++)S.push(v(p[b],b));return S}var P=Object.keys||function(p){var v=[];for(var S in p)Object.prototype.hasOwnProperty.call(p,S)&&v.push(S);return v}},{}],212:[function(j,Y,D){"use strict";D.decode=D.parse=j("./decode"),D.encode=D.stringify=j("./encode")},{"./decode":210,"./encode":211}],213:[function(j,Y,D){Y.exports=j("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/create"),g=p(L),T=j("babel-runtime/core-js/object/keys"),P=p(T);function p(s){return s&&s.__esModule?s:{default:s}}var v=j("process-nextick-args"),S=P.default||function(s){var r=[];for(var a in s)r.push(a);return r};Y.exports=o;var b=(0,g.default)(j("core-util-is"));b.inherits=j("inherits");var d=j("./_stream_readable"),l=j("./_stream_writable");b.inherits(o,d);for(var n=S(l.prototype),c=0;c<n.length;c++){var u=n[c];o.prototype[u]||(o.prototype[u]=l.prototype[u])}function o(s){if(!(this instanceof o))return new o(s);d.call(this,s),l.call(this,s),s&&s.readable===!1&&(this.readable=!1),s&&s.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,s&&s.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",h)}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function h(){if(this.allowHalfOpen||this._writableState.ended)return;v.nextTick(m,this)}function m(s){s.end()}Object.defineProperty(o.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(r){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=r,this._writableState.destroyed=r}}),o.prototype._destroy=function(s,r){this.push(null),this.end(),v.nextTick(r,s)}},{"./_stream_readable":216,"./_stream_writable":218,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60,"core-util-is":189,inherits:196,"process-nextick-args":207}],215:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/create"),g=T(L);function T(S){return S&&S.__esModule?S:{default:S}}Y.exports=v;var P=j("./_stream_transform"),p=(0,g.default)(j("core-util-is"));p.inherits=j("inherits"),p.inherits(v,P);function v(S){if(!(this instanceof v))return new v(S);P.call(this,S)}v.prototype._transform=function(S,b,d){d(null,S)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(j,Y,D){(function(L,g){"use strict";var T=j("babel-runtime/core-js/object/get-prototype-of"),P=S(T),p=j("babel-runtime/core-js/object/create"),v=S(p);function S(ee){return ee&&ee.__esModule?ee:{default:ee}}var b=j("process-nextick-args");Y.exports=x;var d=j("isarray"),l;x.ReadableState=C;var n=j("events").EventEmitter,c=function(te,ce){return te.listeners(ce).length},u=j("./internal/streams/stream"),o=j("safe-buffer").Buffer,h=g.Uint8Array||function(){};function m(ee){return o.from(ee)}function s(ee){return o.isBuffer(ee)||ee instanceof h}var r=(0,v.default)(j("core-util-is"));r.inherits=j("inherits");var a=j("util"),t=void 0;a&&a.debuglog?t=a.debuglog("stream"):t=function(){};var w=j("./internal/streams/BufferList"),E=j("./internal/streams/destroy"),f;r.inherits(x,u);var k=["error","close","destroy","pause","resume"];function O(ee,te,ce){if(typeof ee.prependListener=="function")return ee.prependListener(te,ce);!ee._events||!ee._events[te]?ee.on(te,ce):d(ee._events[te])?ee._events[te].unshift(ce):ee._events[te]=[ce,ee._events[te]]}function C(ee,te){l=l||j("./_stream_duplex"),ee=ee||{};var ce=te instanceof l;this.objectMode=!!ee.objectMode,ce&&(this.objectMode=this.objectMode||!!ee.readableObjectMode);var q=ee.highWaterMark,Q=ee.readableHighWaterMark,V=this.objectMode?16:16*1024;q||q===0?this.highWaterMark=q:ce&&(Q||Q===0)?this.highWaterMark=Q:this.highWaterMark=V,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new w,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=ee.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ee.encoding&&(f||(f=j("string_decoder/").StringDecoder),this.decoder=new f(ee.encoding),this.encoding=ee.encoding)}function x(ee){if(l=l||j("./_stream_duplex"),!(this instanceof x))return new x(ee);this._readableState=new C(ee,this),this.readable=!0,ee&&(typeof ee.read=="function"&&(this._read=ee.read),typeof ee.destroy=="function"&&(this._destroy=ee.destroy)),u.call(this)}Object.defineProperty(x.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(te){if(!this._readableState)return;this._readableState.destroyed=te}}),x.prototype.destroy=E.destroy,x.prototype._undestroy=E.undestroy,x.prototype._destroy=function(ee,te){this.push(null),te(ee)},x.prototype.push=function(ee,te){var ce=this._readableState,q;return ce.objectMode?q=!0:typeof ee=="string"&&(te=te||ce.defaultEncoding,te!==ce.encoding&&(ee=o.from(ee,te),te=""),q=!0),y(this,ee,te,!1,q)},x.prototype.unshift=function(ee){return y(this,ee,null,!0,!1)};function y(ee,te,ce,q,Q){var V=ee._readableState;if(te===null)V.reading=!1,B(ee,V);else{var Z;Q||(Z=M(V,te)),Z?ee.emit("error",Z):V.objectMode||te&&te.length>0?(typeof te!="string"&&!V.objectMode&&(0,P.default)(te)!==o.prototype&&(te=m(te)),q?V.endEmitted?ee.emit("error",new Error("stream.unshift() after end event")):_(ee,V,te,!0):V.ended?ee.emit("error",new Error("stream.push() after EOF")):(V.reading=!1,V.decoder&&!ce?(te=V.decoder.write(te),V.objectMode||te.length!==0?_(ee,V,te,!1):W(ee,V)):_(ee,V,te,!1))):q||(V.reading=!1)}return I(V)}function _(ee,te,ce,q){te.flowing&&te.length===0&&!te.sync?(ee.emit("data",ce),ee.read(0)):(te.length+=te.objectMode?1:ce.length,q?te.buffer.unshift(ce):te.buffer.push(ce),te.needReadable&&K(ee)),W(ee,te)}function M(ee,te){var ce;return!s(te)&&typeof te!="string"&&te!==void 0&&!ee.objectMode&&(ce=new TypeError("Invalid non-string/buffer chunk")),ce}function I(ee){return!ee.ended&&(ee.needReadable||ee.length<ee.highWaterMark||ee.length===0)}x.prototype.isPaused=function(){return this._readableState.flowing===!1},x.prototype.setEncoding=function(ee){return f||(f=j("string_decoder/").StringDecoder),this._readableState.decoder=new f(ee),this._readableState.encoding=ee,this};var N=8388608;function G(ee){return ee>=N?ee=N:(ee--,ee|=ee>>>1,ee|=ee>>>2,ee|=ee>>>4,ee|=ee>>>8,ee|=ee>>>16,ee++),ee}function H(ee,te){return ee<=0||te.length===0&&te.ended?0:te.objectMode?1:ee!==ee?te.flowing&&te.length?te.buffer.head.data.length:te.length:(ee>te.highWaterMark&&(te.highWaterMark=G(ee)),ee<=te.length?ee:te.ended?te.length:(te.needReadable=!0,0))}x.prototype.read=function(ee){t("read",ee),ee=parseInt(ee,10);var te=this._readableState,ce=ee;if(ee!==0&&(te.emittedReadable=!1),ee===0&&te.needReadable&&(te.length>=te.highWaterMark||te.ended))return t("read: emitReadable",te.length,te.ended),te.length===0&&te.ended?le(this):K(this),null;if(ee=H(ee,te),ee===0&&te.ended)return te.length===0&&le(this),null;var q=te.needReadable;t("need readable",q),(te.length===0||te.length-ee<te.highWaterMark)&&(q=!0,t("length less than watermark",q)),te.ended||te.reading?(q=!1,t("reading or ended",q)):q&&(t("do read"),te.reading=!0,te.sync=!0,te.length===0&&(te.needReadable=!0),this._read(te.highWaterMark),te.sync=!1,te.reading||(ee=H(ce,te)));var Q;return ee>0?Q=ye(ee,te):Q=null,Q===null?(te.needReadable=!0,ee=0):te.length-=ee,te.length===0&&(te.ended||(te.needReadable=!0),ce!==ee&&te.ended&&le(this)),Q!==null&&this.emit("data",Q),Q};function B(ee,te){if(te.ended)return;if(te.decoder){var ce=te.decoder.end();ce&&ce.length&&(te.buffer.push(ce),te.length+=te.objectMode?1:ce.length)}te.ended=!0,K(ee)}function K(ee){var te=ee._readableState;te.needReadable=!1,te.emittedReadable||(t("emitReadable",te.flowing),te.emittedReadable=!0,te.sync?b.nextTick(U,ee):U(ee))}function U(ee){t("emit readable"),ee.emit("readable"),De(ee)}function W(ee,te){te.readingMore||(te.readingMore=!0,b.nextTick(X,ee,te))}function X(ee,te){for(var ce=te.length;!te.reading&&!te.flowing&&!te.ended&&te.length<te.highWaterMark&&!(t("maybeReadMore read 0"),ee.read(0),ce===te.length);)ce=te.length;te.readingMore=!1}x.prototype._read=function(ee){this.emit("error",new Error("_read() is not implemented"))},x.prototype.pipe=function(ee,te){var ce=this,q=this._readableState;switch(q.pipesCount){case 0:q.pipes=ee;break;case 1:q.pipes=[q.pipes,ee];break;default:q.pipes.push(ee);break}q.pipesCount+=1,t("pipe count=%d opts=%j",q.pipesCount,te);var Q=(!te||te.end!==!1)&&ee!==L.stdout&&ee!==L.stderr,V=Q?be:He;q.endEmitted?b.nextTick(V):ce.once("end",V),ee.on("unpipe",Z);function Z(Re,tt){t("onunpipe"),Re===ce&&(tt&&tt.hasUnpiped===!1&&(tt.hasUnpiped=!0,Je()))}function be(){t("onend"),ee.end()}var ge=ne(ce);ee.on("drain",ge);var Te=!1;function Je(){t("cleanup"),ee.removeListener("close",ct),ee.removeListener("finish",ht),ee.removeListener("drain",ge),ee.removeListener("error",at),ee.removeListener("unpipe",Z),ce.removeListener("end",be),ce.removeListener("end",He),ce.removeListener("data",nt),Te=!0,q.awaitDrain&&(!ee._writableState||ee._writableState.needDrain)&&ge()}var rt=!1;ce.on("data",nt);function nt(Re){t("ondata"),rt=!1;var tt=ee.write(Re);tt===!1&&!rt&&((q.pipesCount===1&&q.pipes===ee||q.pipesCount>1&&pe(q.pipes,ee)!==-1)&&!Te&&(t("false write response, pause",ce._readableState.awaitDrain),ce._readableState.awaitDrain++,rt=!0),ce.pause())}function at(Re){t("onerror",Re),He(),ee.removeListener("error",at),c(ee,"error")===0&&ee.emit("error",Re)}O(ee,"error",at);function ct(){ee.removeListener("finish",ht),He()}ee.once("close",ct);function ht(){t("onfinish"),ee.removeListener("close",ct),He()}ee.once("finish",ht);function He(){t("unpipe"),ce.unpipe(ee)}return ee.emit("pipe",ce),q.flowing||(t("pipe resume"),ce.resume()),ee};function ne(ee){return function(){var te=ee._readableState;t("pipeOnDrain",te.awaitDrain),te.awaitDrain&&te.awaitDrain--,te.awaitDrain===0&&c(ee,"data")&&(te.flowing=!0,De(ee))}}x.prototype.unpipe=function(ee){var te=this._readableState,ce={hasUnpiped:!1};if(te.pipesCount===0)return this;if(te.pipesCount===1)return ee&&ee!==te.pipes?this:(ee||(ee=te.pipes),te.pipes=null,te.pipesCount=0,te.flowing=!1,ee&&ee.emit("unpipe",this,ce),this);if(!ee){var q=te.pipes,Q=te.pipesCount;te.pipes=null,te.pipesCount=0,te.flowing=!1;for(var V=0;V<Q;V++)q[V].emit("unpipe",this,ce);return this}var Z=pe(te.pipes,ee);return Z===-1?this:(te.pipes.splice(Z,1),te.pipesCount-=1,te.pipesCount===1&&(te.pipes=te.pipes[0]),ee.emit("unpipe",this,ce),this)},x.prototype.on=function(ee,te){var ce=u.prototype.on.call(this,ee,te);if(ee==="data")this._readableState.flowing!==!1&&this.resume();else if(ee==="readable"){var q=this._readableState;!q.endEmitted&&!q.readableListening&&(q.readableListening=q.needReadable=!0,q.emittedReadable=!1,q.reading?q.length&&K(this):b.nextTick(fe,this))}return ce},x.prototype.addListener=x.prototype.on;function fe(ee){t("readable nexttick read 0"),ee.read(0)}x.prototype.resume=function(){var ee=this._readableState;return ee.flowing||(t("resume"),ee.flowing=!0,me(this,ee)),this};function me(ee,te){te.resumeScheduled||(te.resumeScheduled=!0,b.nextTick(Ae,ee,te))}function Ae(ee,te){te.reading||(t("resume read 0"),ee.read(0)),te.resumeScheduled=!1,te.awaitDrain=0,ee.emit("resume"),De(ee),te.flowing&&!te.reading&&ee.read(0)}x.prototype.pause=function(){return t("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(t("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function De(ee){var te=ee._readableState;for(t("flow",te.flowing);te.flowing&&ee.read()!==null;);}x.prototype.wrap=function(ee){var te=this,ce=this._readableState,q=!1;ee.on("end",function(){if(t("wrapped end"),ce.decoder&&!ce.ended){var Z=ce.decoder.end();Z&&Z.length&&te.push(Z)}te.push(null)}),ee.on("data",function(Z){if(t("wrapped data"),ce.decoder&&(Z=ce.decoder.write(Z)),ce.objectMode&&Z==null)return;if(!ce.objectMode&&(!Z||!Z.length))return;var be=te.push(Z);be||(q=!0,ee.pause())});for(var Q in ee)this[Q]===void 0&&typeof ee[Q]=="function"&&(this[Q]=function(Z){return function(){return ee[Z].apply(ee,arguments)}}(Q));for(var V=0;V<k.length;V++)ee.on(k[V],this.emit.bind(this,k[V]));return this._read=function(Z){t("wrapped _read",Z),q&&(q=!1,ee.resume())},this},Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),x._fromList=ye;function ye(ee,te){if(te.length===0)return null;var ce;return te.objectMode?ce=te.buffer.shift():!ee||ee>=te.length?(te.decoder?ce=te.buffer.join(""):te.buffer.length===1?ce=te.buffer.head.data:ce=te.buffer.concat(te.length),te.buffer.clear()):ce=Oe(ee,te.buffer,te.decoder),ce}function Oe(ee,te,ce){var q;return ee<te.head.data.length?(q=te.head.data.slice(0,ee),te.head.data=te.head.data.slice(ee)):ee===te.head.data.length?q=te.shift():q=ce?xe(ee,te):ue(ee,te),q}function xe(ee,te){var ce=te.head,q=1,Q=ce.data;for(ee-=Q.length;ce=ce.next;){var V=ce.data,Z=ee>V.length?V.length:ee;if(Z===V.length?Q+=V:Q+=V.slice(0,ee),ee-=Z,ee===0){Z===V.length?(++q,ce.next?te.head=ce.next:te.head=te.tail=null):(te.head=ce,ce.data=V.slice(Z));break}++q}return te.length-=q,Q}function ue(ee,te){var ce=o.allocUnsafe(ee),q=te.head,Q=1;for(q.data.copy(ce),ee-=q.data.length;q=q.next;){var V=q.data,Z=ee>V.length?V.length:ee;if(V.copy(ce,ce.length-ee,0,Z),ee-=Z,ee===0){Z===V.length?(++Q,q.next?te.head=q.next:te.head=te.tail=null):(te.head=q,q.data=V.slice(Z));break}++Q}return te.length-=Q,ce}function le(ee){var te=ee._readableState;if(te.length>0)throw new Error('"endReadable()" called on non-empty stream');te.endEmitted||(te.ended=!0,b.nextTick(re,te,ee))}function re(ee,te){!ee.endEmitted&&ee.length===0&&(ee.endEmitted=!0,te.readable=!1,te.emit("end"))}function pe(ee,te){for(var ce=0,q=ee.length;ce<q;ce++)if(ee[ce]===te)return ce;return-1}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":214,"./internal/streams/BufferList":219,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/get-prototype-of":59,"core-util-is":189,events:192,inherits:196,isarray:198,"process-nextick-args":207,"safe-buffer":228,"string_decoder/":235,util:71}],217:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/create"),g=T(L);function T(l){return l&&l.__esModule?l:{default:l}}Y.exports=S;var P=j("./_stream_duplex"),p=(0,g.default)(j("core-util-is"));p.inherits=j("inherits"),p.inherits(S,P);function v(l,n){var c=this._transformState;c.transforming=!1;var u=c.writecb;if(!u)return this.emit("error",new Error("write callback called multiple times"));c.writechunk=null,c.writecb=null,n!=null&&this.push(n),u(l);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function S(l){if(!(this instanceof S))return new S(l);P.call(this,l),this._transformState={afterTransform:v.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,l&&(typeof l.transform=="function"&&(this._transform=l.transform),typeof l.flush=="function"&&(this._flush=l.flush)),this.on("prefinish",b)}function b(){var l=this;typeof this._flush=="function"?this._flush(function(n,c){d(l,n,c)}):d(this,null,null)}S.prototype.push=function(l,n){return this._transformState.needTransform=!1,P.prototype.push.call(this,l,n)},S.prototype._transform=function(l,n,c){throw new Error("_transform() is not implemented")},S.prototype._write=function(l,n,c){var u=this._transformState;if(u.writecb=c,u.writechunk=l,u.writeencoding=n,!u.transforming){var o=this._readableState;(u.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},S.prototype._read=function(l){var n=this._transformState;n.writechunk!==null&&n.writecb&&!n.transforming?(n.transforming=!0,this._transform(n.writechunk,n.writeencoding,n.afterTransform)):n.needTransform=!0},S.prototype._destroy=function(l,n){var c=this;P.prototype._destroy.call(this,l,function(u){n(u),c.emit("close")})};function d(l,n,c){if(n)return l.emit("error",n);if(c!=null&&l.push(c),l._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(l._transformState.transforming)throw new Error("Calling transform done when still transforming");return l.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(j,Y,D){(function(L,g){"use strict";var T=j("babel-runtime/core-js/object/define-property"),P=u(T),p=j("babel-runtime/core-js/symbol/has-instance"),v=u(p),S=j("babel-runtime/core-js/symbol"),b=u(S),d=j("babel-runtime/core-js/object/create"),l=u(d),n=j("babel-runtime/core-js/set-immediate"),c=u(n);function u(ue){return ue&&ue.__esModule?ue:{default:ue}}var o=j("process-nextick-args");Y.exports=M;function h(ue,le,re){this.chunk=ue,this.encoding=le,this.callback=re,this.next=null}function m(ue){var le=this;this.next=null,this.entry=null,this.finish=function(){xe(le,ue)}}var s=!L.browser&&["v0.10","v0.9."].indexOf(L.version.slice(0,5))>-1?c.default:o.nextTick,r;M.WritableState=y;var a=(0,l.default)(j("core-util-is"));a.inherits=j("inherits");var t={deprecate:j("util-deprecate")},w=j("./internal/streams/stream"),E=j("safe-buffer").Buffer,f=g.Uint8Array||function(){};function k(ue){return E.from(ue)}function O(ue){return E.isBuffer(ue)||ue instanceof f}var C=j("./internal/streams/destroy");a.inherits(M,w);function x(){}function y(ue,le){r=r||j("./_stream_duplex"),ue=ue||{};var re=le instanceof r;this.objectMode=!!ue.objectMode,re&&(this.objectMode=this.objectMode||!!ue.writableObjectMode);var pe=ue.highWaterMark,ee=ue.writableHighWaterMark,te=this.objectMode?16:16*1024;pe||pe===0?this.highWaterMark=pe:re&&(ee||ee===0)?this.highWaterMark=ee:this.highWaterMark=te,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ce=ue.decodeStrings===!1;this.decodeStrings=!ce,this.defaultEncoding=ue.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(q){W(le,q)},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 m(this)}y.prototype.getBuffer=function(){for(var le=this.bufferedRequest,re=[];le;)re.push(le),le=le.next;return re},function(){try{Object.defineProperty(y.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ue){}}();var _;typeof b.default=="function"&&v.default&&typeof Function.prototype[v.default]=="function"?(_=Function.prototype[v.default],(0,P.default)(M,v.default,{value:function(le){return _.call(this,le)?!0:this!==M?!1:le&&le._writableState instanceof y}})):_=function(le){return le instanceof this};function M(ue){if(r=r||j("./_stream_duplex"),!_.call(M,this)&&!(this instanceof r))return new M(ue);this._writableState=new y(ue,this),this.writable=!0,ue&&(typeof ue.write=="function"&&(this._write=ue.write),typeof ue.writev=="function"&&(this._writev=ue.writev),typeof ue.destroy=="function"&&(this._destroy=ue.destroy),typeof ue.final=="function"&&(this._final=ue.final)),w.call(this)}M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function I(ue,le){var re=new Error("write after end");ue.emit("error",re),o.nextTick(le,re)}function N(ue,le,re,pe){var ee=!0,te=!1;return re===null?te=new TypeError("May not write null values to stream"):typeof re!="string"&&re!==void 0&&!le.objectMode&&(te=new TypeError("Invalid non-string/buffer chunk")),te&&(ue.emit("error",te),o.nextTick(pe,te),ee=!1),ee}M.prototype.write=function(ue,le,re){var pe=this._writableState,ee=!1,te=!pe.objectMode&&O(ue);return te&&!E.isBuffer(ue)&&(ue=k(ue)),typeof le=="function"&&(re=le,le=null),te?le="buffer":le||(le=pe.defaultEncoding),typeof re!="function"&&(re=x),pe.ended?I(this,re):(te||N(this,pe,ue,re))&&(pe.pendingcb++,ee=H(this,pe,te,ue,le,re)),ee},M.prototype.cork=function(){var ue=this._writableState;ue.corked++},M.prototype.uncork=function(){var ue=this._writableState;ue.corked&&(ue.corked--,!ue.writing&&!ue.corked&&!ue.finished&&!ue.bufferProcessing&&ue.bufferedRequest&&fe(this,ue))},M.prototype.setDefaultEncoding=function(le){if(typeof le=="string"&&(le=le.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((le+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+le);return this._writableState.defaultEncoding=le,this};function G(ue,le,re){return!ue.objectMode&&ue.decodeStrings!==!1&&typeof le=="string"&&(le=E.from(le,re)),le}Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function H(ue,le,re,pe,ee,te){if(!re){var ce=G(le,pe,ee);pe!==ce&&(re=!0,ee="buffer",pe=ce)}var q=le.objectMode?1:pe.length;le.length+=q;var Q=le.length<le.highWaterMark;if(Q||(le.needDrain=!0),le.writing||le.corked){var V=le.lastBufferedRequest;le.lastBufferedRequest={chunk:pe,encoding:ee,isBuf:re,callback:te,next:null},V?V.next=le.lastBufferedRequest:le.bufferedRequest=le.lastBufferedRequest,le.bufferedRequestCount+=1}else B(ue,le,!1,q,pe,ee,te);return Q}function B(ue,le,re,pe,ee,te,ce){le.writelen=pe,le.writecb=ce,le.writing=!0,le.sync=!0,re?ue._writev(ee,le.onwrite):ue._write(ee,te,le.onwrite),le.sync=!1}function K(ue,le,re,pe,ee){--le.pendingcb,re?(o.nextTick(ee,pe),o.nextTick(ye,ue,le),ue._writableState.errorEmitted=!0,ue.emit("error",pe)):(ee(pe),ue._writableState.errorEmitted=!0,ue.emit("error",pe),ye(ue,le))}function U(ue){ue.writing=!1,ue.writecb=null,ue.length-=ue.writelen,ue.writelen=0}function W(ue,le){var re=ue._writableState,pe=re.sync,ee=re.writecb;if(U(re),le)K(ue,re,pe,le,ee);else{var te=me(re);!te&&!re.corked&&!re.bufferProcessing&&re.bufferedRequest&&fe(ue,re),pe?s(X,ue,re,te,ee):X(ue,re,te,ee)}}function X(ue,le,re,pe){re||ne(ue,le),le.pendingcb--,pe(),ye(ue,le)}function ne(ue,le){le.length===0&&le.needDrain&&(le.needDrain=!1,ue.emit("drain"))}function fe(ue,le){le.bufferProcessing=!0;var re=le.bufferedRequest;if(ue._writev&&re&&re.next){var pe=le.bufferedRequestCount,ee=new Array(pe),te=le.corkedRequestsFree;te.entry=re;for(var ce=0,q=!0;re;)ee[ce]=re,re.isBuf||(q=!1),re=re.next,ce+=1;ee.allBuffers=q,B(ue,le,!0,le.length,ee,"",te.finish),le.pendingcb++,le.lastBufferedRequest=null,te.next?(le.corkedRequestsFree=te.next,te.next=null):le.corkedRequestsFree=new m(le),le.bufferedRequestCount=0}else{for(;re;){var Q=re.chunk,V=re.encoding,Z=re.callback,be=le.objectMode?1:Q.length;if(B(ue,le,!1,be,Q,V,Z),re=re.next,le.bufferedRequestCount--,le.writing)break}re===null&&(le.lastBufferedRequest=null)}le.bufferedRequest=re,le.bufferProcessing=!1}M.prototype._write=function(ue,le,re){re(new Error("_write() is not implemented"))},M.prototype._writev=null,M.prototype.end=function(ue,le,re){var pe=this._writableState;typeof ue=="function"?(re=ue,ue=null,le=null):typeof le=="function"&&(re=le,le=null),ue!=null&&this.write(ue,le),pe.corked&&(pe.corked=1,this.uncork()),!pe.ending&&!pe.finished&&Oe(this,pe,re)};function me(ue){return ue.ending&&ue.length===0&&ue.bufferedRequest===null&&!ue.finished&&!ue.writing}function Ae(ue,le){ue._final(function(re){le.pendingcb--,re&&ue.emit("error",re),le.prefinished=!0,ue.emit("prefinish"),ye(ue,le)})}function De(ue,le){!le.prefinished&&!le.finalCalled&&(typeof ue._final=="function"?(le.pendingcb++,le.finalCalled=!0,o.nextTick(Ae,ue,le)):(le.prefinished=!0,ue.emit("prefinish")))}function ye(ue,le){var re=me(le);return re&&(De(ue,le),le.pendingcb===0&&(le.finished=!0,ue.emit("finish"))),re}function Oe(ue,le,re){le.ending=!0,ye(ue,le),re&&(le.finished?o.nextTick(re):ue.once("finish",re)),le.ended=!0,ue.writable=!1}function xe(ue,le,re){var pe=ue.entry;for(ue.entry=null;pe;){var ee=pe.callback;le.pendingcb--,ee(re),pe=pe.next}le.corkedRequestsFree?le.corkedRequestsFree.next=ue:le.corkedRequestsFree=ue}Object.defineProperty(M.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(le){if(!this._writableState)return;this._writableState.destroyed=le}}),M.prototype.destroy=C.destroy,M.prototype._undestroy=C.undestroy,M.prototype._destroy=function(ue,le){this.end(),le(ue)}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":214,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/set-immediate":62,"babel-runtime/core-js/symbol":64,"babel-runtime/core-js/symbol/has-instance":65,"core-util-is":189,inherits:196,"process-nextick-args":207,"safe-buffer":228,"util-deprecate":240}],219:[function(j,Y,D){"use strict";function L(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}var g=j("safe-buffer").Buffer,T=j("util");function P(p,v,S){p.copy(v,S)}Y.exports=function(){function p(){L(this,p),this.head=null,this.tail=null,this.length=0}return p.prototype.push=function(S){var b={data:S,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length},p.prototype.unshift=function(S){var b={data:S,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length},p.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},p.prototype.clear=function(){this.head=this.tail=null,this.length=0},p.prototype.join=function(S){if(this.length===0)return"";for(var b=this.head,d=""+b.data;b=b.next;)d+=S+b.data;return d},p.prototype.concat=function(S){if(this.length===0)return g.alloc(0);if(this.length===1)return this.head.data;for(var b=g.allocUnsafe(S>>>0),d=this.head,l=0;d;)P(d.data,b,l),l+=d.data.length,d=d.next;return b},p}(),T&&T.inspect&&T.inspect.custom&&(Y.exports.prototype[T.inspect.custom]=function(){var p=T.inspect({length:this.length});return this.constructor.name+" "+p})},{"safe-buffer":228,util:71}],220:[function(j,Y,D){"use strict";var L=j("process-nextick-args");function g(p,v){var S=this,b=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return b||d?(v?v(p):p&&(!this._writableState||!this._writableState.errorEmitted)&&L.nextTick(P,this,p),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(p||null,function(l){!v&&l?(L.nextTick(P,S,l),S._writableState&&(S._writableState.errorEmitted=!0)):v&&v(l)}),this)}function T(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function P(p,v){p.emit("error",v)}Y.exports={destroy:g,undestroy:T}},{"process-nextick-args":207}],221:[function(j,Y,D){"use strict";Y.exports=j("events").EventEmitter},{events:192}],222:[function(j,Y,D){Y.exports=j("./readable").PassThrough},{"./readable":223}],223:[function(j,Y,D){D=Y.exports=j("./lib/_stream_readable.js"),D.Stream=D,D.Readable=D,D.Writable=j("./lib/_stream_writable.js"),D.Duplex=j("./lib/_stream_duplex.js"),D.Transform=j("./lib/_stream_transform.js"),D.PassThrough=j("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":214,"./lib/_stream_passthrough.js":215,"./lib/_stream_readable.js":216,"./lib/_stream_transform.js":217,"./lib/_stream_writable.js":218}],224:[function(j,Y,D){Y.exports=j("./readable").Transform},{"./readable":223}],225:[function(j,Y,D){Y.exports=j("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(j,Y,D){var L=function(){return this}()||Function("return this")(),g=L.regeneratorRuntime&&Object.getOwnPropertyNames(L).indexOf("regeneratorRuntime")>=0,T=g&&L.regeneratorRuntime;if(L.regeneratorRuntime=void 0,Y.exports=j("./runtime"),g)L.regeneratorRuntime=T;else try{delete L.regeneratorRuntime}catch(P){L.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(j,Y,D){!function(L){"use strict";var g=Object.prototype,T=g.hasOwnProperty,P,p=typeof Symbol=="function"?Symbol:{},v=p.iterator||"@@iterator",S=p.asyncIterator||"@@asyncIterator",b=p.toStringTag||"@@toStringTag",d=typeof Y=="object",l=L.regeneratorRuntime;if(l){d&&(Y.exports=l);return}l=L.regeneratorRuntime=d?Y.exports:{};function n(H,B,K,U){var W=B&&B.prototype instanceof r?B:r,X=Object.create(W.prototype),ne=new I(U||[]);return X._invoke=x(H,K,ne),X}l.wrap=n;function c(H,B,K){try{return{type:"normal",arg:H.call(B,K)}}catch(U){return{type:"throw",arg:U}}}var u="suspendedStart",o="suspendedYield",h="executing",m="completed",s={};function r(){}function a(){}function t(){}var w={};w[v]=function(){return this};var E=Object.getPrototypeOf,f=E&&E(E(N([])));f&&f!==g&&T.call(f,v)&&(w=f);var k=t.prototype=r.prototype=Object.create(w);a.prototype=k.constructor=t,t.constructor=a,t[b]=a.displayName="GeneratorFunction";function O(H){["next","throw","return"].forEach(function(B){H[B]=function(K){return this._invoke(B,K)}})}l.isGeneratorFunction=function(H){var B=typeof H=="function"&&H.constructor;return B?B===a||(B.displayName||B.name)==="GeneratorFunction":!1},l.mark=function(H){return Object.setPrototypeOf?Object.setPrototypeOf(H,t):(H.__proto__=t,b in H||(H[b]="GeneratorFunction")),H.prototype=Object.create(k),H},l.awrap=function(H){return{__await:H}};function C(H){function B(W,X,ne,fe){var me=c(H[W],H,X);if(me.type==="throw")fe(me.arg);else{var Ae=me.arg,De=Ae.value;return De&&typeof De=="object"&&T.call(De,"__await")?Promise.resolve(De.__await).then(function(ye){B("next",ye,ne,fe)},function(ye){B("throw",ye,ne,fe)}):Promise.resolve(De).then(function(ye){Ae.value=ye,ne(Ae)},fe)}}var K;function U(W,X){function ne(){return new Promise(function(fe,me){B(W,X,fe,me)})}return K=K?K.then(ne,ne):ne()}this._invoke=U}O(C.prototype),C.prototype[S]=function(){return this},l.AsyncIterator=C,l.async=function(H,B,K,U){var W=new C(n(H,B,K,U));return l.isGeneratorFunction(B)?W:W.next().then(function(X){return X.done?X.value:W.next()})};function x(H,B,K){var U=u;return function(X,ne){if(U===h)throw new Error("Generator is already running");if(U===m){if(X==="throw")throw ne;return G()}for(K.method=X,K.arg=ne;;){var fe=K.delegate;if(fe){var me=y(fe,K);if(me){if(me===s)continue;return me}}if(K.method==="next")K.sent=K._sent=K.arg;else if(K.method==="throw"){if(U===u)throw U=m,K.arg;K.dispatchException(K.arg)}else K.method==="return"&&K.abrupt("return",K.arg);U=h;var Ae=c(H,B,K);if(Ae.type==="normal"){if(U=K.done?m:o,Ae.arg===s)continue;return{value:Ae.arg,done:K.done}}else Ae.type==="throw"&&(U=m,K.method="throw",K.arg=Ae.arg)}}}function y(H,B){var K=H.iterator[B.method];if(K===P){if(B.delegate=null,B.method==="throw"){if(H.iterator.return&&(B.method="return",B.arg=P,y(H,B),B.method==="throw"))return s;B.method="throw",B.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var U=c(K,H.iterator,B.arg);if(U.type==="throw")return B.method="throw",B.arg=U.arg,B.delegate=null,s;var W=U.arg;if(!W)return B.method="throw",B.arg=new TypeError("iterator result is not an object"),B.delegate=null,s;if(W.done)B[H.resultName]=W.value,B.next=H.nextLoc,B.method!=="return"&&(B.method="next",B.arg=P);else return W;return B.delegate=null,s}O(k),k[b]="Generator",k[v]=function(){return this},k.toString=function(){return"[object Generator]"};function _(H){var B={tryLoc:H[0]};1 in H&&(B.catchLoc=H[1]),2 in H&&(B.finallyLoc=H[2],B.afterLoc=H[3]),this.tryEntries.push(B)}function M(H){var B=H.completion||{};B.type="normal",delete B.arg,H.completion=B}function I(H){this.tryEntries=[{tryLoc:"root"}],H.forEach(_,this),this.reset(!0)}l.keys=function(H){var B=[];for(var K in H)B.push(K);return B.reverse(),function U(){for(;B.length;){var W=B.pop();if(W in H)return U.value=W,U.done=!1,U}return U.done=!0,U}};function N(H){if(H){var B=H[v];if(B)return B.call(H);if(typeof H.next=="function")return H;if(!isNaN(H.length)){var K=-1,U=function W(){for(;++K<H.length;)if(T.call(H,K))return W.value=H[K],W.done=!1,W;return W.value=P,W.done=!0,W};return U.next=U}}return{next:G}}l.values=N;function G(){return{value:P,done:!0}}I.prototype={constructor:I,reset:function(H){if(this.prev=0,this.next=0,this.sent=this._sent=P,this.done=!1,this.delegate=null,this.method="next",this.arg=P,this.tryEntries.forEach(M),!H)for(var B in this)B.charAt(0)==="t"&&T.call(this,B)&&!isNaN(+B.slice(1))&&(this[B]=P)},stop:function(){this.done=!0;var H=this.tryEntries[0],B=H.completion;if(B.type==="throw")throw B.arg;return this.rval},dispatchException:function(H){if(this.done)throw H;var B=this;function K(me,Ae){return X.type="throw",X.arg=H,B.next=me,Ae&&(B.method="next",B.arg=P),!!Ae}for(var U=this.tryEntries.length-1;U>=0;--U){var W=this.tryEntries[U],X=W.completion;if(W.tryLoc==="root")return K("end");if(W.tryLoc<=this.prev){var ne=T.call(W,"catchLoc"),fe=T.call(W,"finallyLoc");if(ne&&fe){if(this.prev<W.catchLoc)return K(W.catchLoc,!0);if(this.prev<W.finallyLoc)return K(W.finallyLoc)}else if(ne){if(this.prev<W.catchLoc)return K(W.catchLoc,!0)}else if(fe){if(this.prev<W.finallyLoc)return K(W.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(H,B){for(var K=this.tryEntries.length-1;K>=0;--K){var U=this.tryEntries[K];if(U.tryLoc<=this.prev&&T.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var W=U;break}}W&&(H==="break"||H==="continue")&&W.tryLoc<=B&&B<=W.finallyLoc&&(W=null);var X=W?W.completion:{};return X.type=H,X.arg=B,W?(this.method="next",this.next=W.finallyLoc,s):this.complete(X)},complete:function(H,B){if(H.type==="throw")throw H.arg;return H.type==="break"||H.type==="continue"?this.next=H.arg:H.type==="return"?(this.rval=this.arg=H.arg,this.method="return",this.next="end"):H.type==="normal"&&B&&(this.next=B),s},finish:function(H){for(var B=this.tryEntries.length-1;B>=0;--B){var K=this.tryEntries[B];if(K.finallyLoc===H)return this.complete(K.completion,K.afterLoc),M(K),s}},catch:function(H){for(var B=this.tryEntries.length-1;B>=0;--B){var K=this.tryEntries[B];if(K.tryLoc===H){var U=K.completion;if(U.type==="throw"){var W=U.arg;M(K)}return W}}throw new Error("illegal catch attempt")},delegateYield:function(H,B,K){return this.delegate={iterator:N(H),resultName:B,nextLoc:K},this.method==="next"&&(this.arg=P),s}}}(function(){return this}()||Function("return this")())},{}],228:[function(j,Y,D){var L=j("buffer"),g=L.Buffer;function T(p,v){for(var S in p)v[S]=p[S]}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?Y.exports=L:(T(L,D),D.Buffer=P);function P(p,v,S){return g(p,v,S)}T(g,P),P.from=function(p,v,S){if(typeof p=="number")throw new TypeError("Argument must not be a number");return g(p,v,S)},P.alloc=function(p,v,S){if(typeof p!="number")throw new TypeError("Argument must be a number");var b=g(p);return v!==void 0?typeof S=="string"?b.fill(v,S):b.fill(v):b.fill(0),b},P.allocUnsafe=function(p){if(typeof p!="number")throw new TypeError("Argument must be a number");return g(p)},P.allocUnsafeSlow=function(p){if(typeof p!="number")throw new TypeError("Argument must be a number");return L.SlowBuffer(p)}},{buffer:73}],229:[function(j,Y,D){(function(L){"use strict";var g=j("babel-runtime/core-js/string/from-code-point"),T=o(g),P=j("babel-runtime/core-js/json/stringify"),p=o(P),v=j("babel-runtime/helpers/typeof"),S=o(v),b=j("babel-runtime/core-js/object/define-property"),d=o(b),l=j("babel-runtime/core-js/object/keys"),n=o(l),c=j("babel-runtime/core-js/object/create"),u=o(c);function o(h){return h&&h.__esModule?h:{default:h}}(function(h){h.parser=function(V,Z){return new s(V,Z)},h.SAXParser=s,h.SAXStream=k,h.createStream=f,h.MAX_BUFFER_LENGTH=64*1024;var m=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];h.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function s(V,Z){if(!(this instanceof s))return new s(V,Z);var be=this;a(be),be.q=be.c="",be.bufferCheckPosition=h.MAX_BUFFER_LENGTH,be.opt=Z||{},be.opt.lowercase=be.opt.lowercase||be.opt.lowercasetags,be.looseCase=be.opt.lowercase?"toLowerCase":"toUpperCase",be.tags=[],be.closed=be.closedRoot=be.sawRoot=!1,be.tag=be.error=null,be.strict=!!V,be.noscript=!!(V||be.opt.noscript),be.state=X.BEGIN,be.strictEntities=be.opt.strictEntities,be.ENTITIES=be.strictEntities?(0,u.default)(h.XML_ENTITIES):(0,u.default)(h.ENTITIES),be.attribList=[],be.opt.xmlns&&(be.ns=(0,u.default)(_)),be.trackPosition=be.opt.position!==!1,be.trackPosition&&(be.position=be.line=be.column=0),fe(be,"onready")}u.default||(Object.create=function(V){function Z(){}Z.prototype=V;var be=new Z;return be}),n.default||(Object.keys=function(V){var Z=[];for(var be in V)V.hasOwnProperty(be)&&Z.push(be);return Z});function r(V){for(var Z=Math.max(h.MAX_BUFFER_LENGTH,10),be=0,ge=0,Te=m.length;ge<Te;ge++){var Je=V[m[ge]].length;if(Je>Z)switch(m[ge]){case"textNode":Ae(V);break;case"cdata":me(V,"oncdata",V.cdata),V.cdata="";break;case"script":me(V,"onscript",V.script),V.script="";break;default:ye(V,"Max buffer length exceeded: "+m[ge])}be=Math.max(be,Je)}var rt=h.MAX_BUFFER_LENGTH-be;V.bufferCheckPosition=rt+V.position}function a(V){for(var Z=0,be=m.length;Z<be;Z++)V[m[Z]]=""}function t(V){Ae(V),V.cdata!==""&&(me(V,"oncdata",V.cdata),V.cdata=""),V.script!==""&&(me(V,"onscript",V.script),V.script="")}s.prototype={end:function(){Oe(this)},write:Q,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){t(this)}};var w;try{w=j("stream").Stream}catch(V){w=function(){}}var E=h.EVENTS.filter(function(V){return V!=="error"&&V!=="end"});function f(V,Z){return new k(V,Z)}function k(V,Z){if(!(this instanceof k))return new k(V,Z);w.apply(this),this._parser=new s(V,Z),this.writable=!0,this.readable=!0;var be=this;this._parser.onend=function(){be.emit("end")},this._parser.onerror=function(ge){be.emit("error",ge),be._parser.error=null},this._decoder=null,E.forEach(function(ge){(0,d.default)(be,"on"+ge,{get:function(){return be._parser["on"+ge]},set:function(Je){if(!Je)return be.removeAllListeners(ge),be._parser["on"+ge]=Je,Je;be.on(ge,Je)},enumerable:!0,configurable:!1})})}k.prototype=(0,u.default)(w.prototype,{constructor:{value:k}}),k.prototype.write=function(V){if(typeof L=="function"&&typeof L.isBuffer=="function"&&L.isBuffer(V)){if(!this._decoder){var Z=j("string_decoder").StringDecoder;this._decoder=new Z("utf8")}V=this._decoder.write(V)}return this._parser.write(V.toString()),this.emit("data",V),!0},k.prototype.end=function(V){return V&&V.length&&this.write(V),this._parser.end(),!0},k.prototype.on=function(V,Z){var be=this;return!be._parser["on"+V]&&E.indexOf(V)!==-1&&(be._parser["on"+V]=function(){var ge=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);ge.splice(0,0,V),be.emit.apply(be,ge)}),w.prototype.on.call(be,V,Z)};var O="[CDATA[",C="DOCTYPE",x="http://www.w3.org/XML/1998/namespace",y="http://www.w3.org/2000/xmlns/",_={xml:x,xmlns:y},M=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,I=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,N=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,G=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function H(V){return V===" "||V===`
|
|
|
`||V==="\r"||V===" "}function B(V){return V==='"'||V==="'"}function K(V){return V===">"||H(V)}function U(V,Z){return V.test(Z)}function W(V,Z){return!U(V,Z)}var X=0;h.STATE={BEGIN:X++,BEGIN_WHITESPACE:X++,TEXT:X++,TEXT_ENTITY:X++,OPEN_WAKA:X++,SGML_DECL:X++,SGML_DECL_QUOTED:X++,DOCTYPE:X++,DOCTYPE_QUOTED:X++,DOCTYPE_DTD:X++,DOCTYPE_DTD_QUOTED:X++,COMMENT_STARTING:X++,COMMENT:X++,COMMENT_ENDING:X++,COMMENT_ENDED:X++,CDATA:X++,CDATA_ENDING:X++,CDATA_ENDING_2:X++,PROC_INST:X++,PROC_INST_BODY:X++,PROC_INST_ENDING:X++,OPEN_TAG:X++,OPEN_TAG_SLASH:X++,ATTRIB:X++,ATTRIB_NAME:X++,ATTRIB_NAME_SAW_WHITE:X++,ATTRIB_VALUE:X++,ATTRIB_VALUE_QUOTED:X++,ATTRIB_VALUE_CLOSED:X++,ATTRIB_VALUE_UNQUOTED:X++,ATTRIB_VALUE_ENTITY_Q:X++,ATTRIB_VALUE_ENTITY_U:X++,CLOSE_TAG:X++,CLOSE_TAG_SAW_WHITE:X++,SCRIPT:X++,SCRIPT_ENDING:X++},h.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},h.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,n.default)(h.ENTITIES).forEach(function(V){var Z=h.ENTITIES[V],be=typeof Z=="number"?String.fromCharCode(Z):Z;h.ENTITIES[V]=be});for(var ne in h.STATE)h.STATE[h.STATE[ne]]=ne;X=h.STATE;function fe(V,Z,be){V[Z]&&V[Z](be)}function me(V,Z,be){V.textNode&&Ae(V),fe(V,Z,be)}function Ae(V){V.textNode=De(V.opt,V.textNode),V.textNode&&fe(V,"ontext",V.textNode),V.textNode=""}function De(V,Z){return V.trim&&(Z=Z.trim()),V.normalize&&(Z=Z.replace(/\s+/g," ")),Z}function ye(V,Z){return Ae(V),V.trackPosition&&(Z+=`
|
|
|
Line: `+V.line+`
|
|
|
Column: `+V.column+`
|
|
|
Char: `+V.c),Z=new Error(Z),V.error=Z,fe(V,"onerror",Z),V}function Oe(V){return V.sawRoot&&!V.closedRoot&&xe(V,"Unclosed root tag"),V.state!==X.BEGIN&&V.state!==X.BEGIN_WHITESPACE&&V.state!==X.TEXT&&ye(V,"Unexpected end"),Ae(V),V.c="",V.closed=!0,fe(V,"onend"),s.call(V,V.strict,V.opt),V}function xe(V,Z){if((typeof V=="undefined"?"undefined":(0,S.default)(V))!=="object"||!(V instanceof s))throw new Error("bad call to strictFail");V.strict&&ye(V,Z)}function ue(V){V.strict||(V.tagName=V.tagName[V.looseCase]());var Z=V.tags[V.tags.length-1]||V,be=V.tag={name:V.tagName,attributes:{}};V.opt.xmlns&&(be.ns=Z.ns),V.attribList.length=0,me(V,"onopentagstart",be)}function le(V,Z){var be=V.indexOf(":"),ge=be<0?["",V]:V.split(":"),Te=ge[0],Je=ge[1];return Z&&V==="xmlns"&&(Te="xmlns",Je=""),{prefix:Te,local:Je}}function re(V){if(V.strict||(V.attribName=V.attribName[V.looseCase]()),V.attribList.indexOf(V.attribName)!==-1||V.tag.attributes.hasOwnProperty(V.attribName)){V.attribName=V.attribValue="";return}if(V.opt.xmlns){var Z=le(V.attribName,!0),be=Z.prefix,ge=Z.local;if(be==="xmlns")if(ge==="xml"&&V.attribValue!==x)xe(V,"xml: prefix must be bound to "+x+`
|
|
|
Actual: `+V.attribValue);else if(ge==="xmlns"&&V.attribValue!==y)xe(V,"xmlns: prefix must be bound to "+y+`
|
|
|
Actual: `+V.attribValue);else{var Te=V.tag,Je=V.tags[V.tags.length-1]||V;Te.ns===Je.ns&&(Te.ns=(0,u.default)(Je.ns)),Te.ns[ge]=V.attribValue}V.attribList.push([V.attribName,V.attribValue])}else V.tag.attributes[V.attribName]=V.attribValue,me(V,"onattribute",{name:V.attribName,value:V.attribValue});V.attribName=V.attribValue=""}function pe(V,Z){if(V.opt.xmlns){var be=V.tag,ge=le(V.tagName);be.prefix=ge.prefix,be.local=ge.local,be.uri=be.ns[ge.prefix]||"",be.prefix&&!be.uri&&(xe(V,"Unbound namespace prefix: "+(0,p.default)(V.tagName)),be.uri=ge.prefix);var Te=V.tags[V.tags.length-1]||V;be.ns&&Te.ns!==be.ns&&(0,n.default)(be.ns).forEach(function(Qe){me(V,"onopennamespace",{prefix:Qe,uri:be.ns[Qe]})});for(var Je=0,rt=V.attribList.length;Je<rt;Je++){var nt=V.attribList[Je],at=nt[0],ct=nt[1],ht=le(at,!0),He=ht.prefix,Re=ht.local,tt=He===""?"":be.ns[He]||"",ft={name:at,value:ct,prefix:He,local:Re,uri:tt};He&&He!=="xmlns"&&!tt&&(xe(V,"Unbound namespace prefix: "+(0,p.default)(He)),ft.uri=He),V.tag.attributes[at]=ft,me(V,"onattribute",ft)}V.attribList.length=0}V.tag.isSelfClosing=!!Z,V.sawRoot=!0,V.tags.push(V.tag),me(V,"onopentag",V.tag),Z||(!V.noscript&&V.tagName.toLowerCase()==="script"?V.state=X.SCRIPT:V.state=X.TEXT,V.tag=null,V.tagName=""),V.attribName=V.attribValue="",V.attribList.length=0}function ee(V){if(!V.tagName){xe(V,"Weird empty close tag."),V.textNode+="</>",V.state=X.TEXT;return}if(V.script){if(V.tagName!=="script"){V.script+="</"+V.tagName+">",V.tagName="",V.state=X.SCRIPT;return}me(V,"onscript",V.script),V.script=""}var Z=V.tags.length,be=V.tagName;V.strict||(be=be[V.looseCase]());for(var ge=be;Z--;){var Te=V.tags[Z];if(Te.name!==ge)xe(V,"Unexpected close tag");else break}if(Z<0){xe(V,"Unmatched closing tag: "+V.tagName),V.textNode+="</"+V.tagName+">",V.state=X.TEXT;return}V.tagName=be;for(var Je=V.tags.length;Je-- >Z;){var rt=V.tag=V.tags.pop();V.tagName=V.tag.name,me(V,"onclosetag",V.tagName);var nt={};for(var at in rt.ns)nt[at]=rt.ns[at];var ct=V.tags[V.tags.length-1]||V;V.opt.xmlns&&rt.ns!==ct.ns&&(0,n.default)(rt.ns).forEach(function(ht){var He=rt.ns[ht];me(V,"onclosenamespace",{prefix:ht,uri:He})})}Z===0&&(V.closedRoot=!0),V.tagName=V.attribValue=V.attribName="",V.attribList.length=0,V.state=X.TEXT}function te(V){var Z=V.entity,be=Z.toLowerCase(),ge,Te="";return V.ENTITIES[Z]?V.ENTITIES[Z]:V.ENTITIES[be]?V.ENTITIES[be]:(Z=be,Z.charAt(0)==="#"&&(Z.charAt(1)==="x"?(Z=Z.slice(2),ge=parseInt(Z,16),Te=ge.toString(16)):(Z=Z.slice(1),ge=parseInt(Z,10),Te=ge.toString(10))),Z=Z.replace(/^0+/,""),isNaN(ge)||Te.toLowerCase()!==Z?(xe(V,"Invalid character entity"),"&"+V.entity+";"):(0,T.default)(ge))}function ce(V,Z){Z==="<"?(V.state=X.OPEN_WAKA,V.startTagPosition=V.position):H(Z)||(xe(V,"Non-whitespace before first tag."),V.textNode=Z,V.state=X.TEXT)}function q(V,Z){var be="";return Z<V.length&&(be=V.charAt(Z)),be}function Q(V){var Z=this;if(this.error)throw this.error;if(Z.closed)return ye(Z,"Cannot write after close. Assign an onready handler.");if(V===null)return Oe(Z);(typeof V=="undefined"?"undefined":(0,S.default)(V))==="object"&&(V=V.toString());for(var be=0,ge="";!(ge=q(V,be++),Z.c=ge,!ge);){Z.trackPosition&&(Z.position++,ge===`
|
|
|
`?(Z.line++,Z.column=0):Z.column++);switch(Z.state){case X.BEGIN:if(Z.state=X.BEGIN_WHITESPACE,ge==="\uFEFF")continue;ce(Z,ge);continue;case X.BEGIN_WHITESPACE:ce(Z,ge);continue;case X.TEXT:if(Z.sawRoot&&!Z.closedRoot){for(var Te=be-1;ge&&ge!=="<"&&ge!=="&";)ge=q(V,be++),ge&&Z.trackPosition&&(Z.position++,ge===`
|
|
|
`?(Z.line++,Z.column=0):Z.column++);Z.textNode+=V.substring(Te,be-1)}ge==="<"&&!(Z.sawRoot&&Z.closedRoot&&!Z.strict)?(Z.state=X.OPEN_WAKA,Z.startTagPosition=Z.position):(!H(ge)&&(!Z.sawRoot||Z.closedRoot)&&xe(Z,"Text data outside of root node."),ge==="&"?Z.state=X.TEXT_ENTITY:Z.textNode+=ge);continue;case X.SCRIPT:ge==="<"?Z.state=X.SCRIPT_ENDING:Z.script+=ge;continue;case X.SCRIPT_ENDING:ge==="/"?Z.state=X.CLOSE_TAG:(Z.script+="<"+ge,Z.state=X.SCRIPT);continue;case X.OPEN_WAKA:if(ge==="!")Z.state=X.SGML_DECL,Z.sgmlDecl="";else if(!H(ge))if(U(M,ge))Z.state=X.OPEN_TAG,Z.tagName=ge;else if(ge==="/")Z.state=X.CLOSE_TAG,Z.tagName="";else if(ge==="?")Z.state=X.PROC_INST,Z.procInstName=Z.procInstBody="";else{if(xe(Z,"Unencoded <"),Z.startTagPosition+1<Z.position){var Je=Z.position-Z.startTagPosition;ge=new Array(Je).join(" ")+ge}Z.textNode+="<"+ge,Z.state=X.TEXT}continue;case X.SGML_DECL:(Z.sgmlDecl+ge).toUpperCase()===O?(me(Z,"onopencdata"),Z.state=X.CDATA,Z.sgmlDecl="",Z.cdata=""):Z.sgmlDecl+ge==="--"?(Z.state=X.COMMENT,Z.comment="",Z.sgmlDecl=""):(Z.sgmlDecl+ge).toUpperCase()===C?(Z.state=X.DOCTYPE,(Z.doctype||Z.sawRoot)&&xe(Z,"Inappropriately located doctype declaration"),Z.doctype="",Z.sgmlDecl=""):ge===">"?(me(Z,"onsgmldeclaration",Z.sgmlDecl),Z.sgmlDecl="",Z.state=X.TEXT):(B(ge)&&(Z.state=X.SGML_DECL_QUOTED),Z.sgmlDecl+=ge);continue;case X.SGML_DECL_QUOTED:ge===Z.q&&(Z.state=X.SGML_DECL,Z.q=""),Z.sgmlDecl+=ge;continue;case X.DOCTYPE:ge===">"?(Z.state=X.TEXT,me(Z,"ondoctype",Z.doctype),Z.doctype=!0):(Z.doctype+=ge,ge==="["?Z.state=X.DOCTYPE_DTD:B(ge)&&(Z.state=X.DOCTYPE_QUOTED,Z.q=ge));continue;case X.DOCTYPE_QUOTED:Z.doctype+=ge,ge===Z.q&&(Z.q="",Z.state=X.DOCTYPE);continue;case X.DOCTYPE_DTD:Z.doctype+=ge,ge==="]"?Z.state=X.DOCTYPE:B(ge)&&(Z.state=X.DOCTYPE_DTD_QUOTED,Z.q=ge);continue;case X.DOCTYPE_DTD_QUOTED:Z.doctype+=ge,ge===Z.q&&(Z.state=X.DOCTYPE_DTD,Z.q="");continue;case X.COMMENT:ge==="-"?Z.state=X.COMMENT_ENDING:Z.comment+=ge;continue;case X.COMMENT_ENDING:ge==="-"?(Z.state=X.COMMENT_ENDED,Z.comment=De(Z.opt,Z.comment),Z.comment&&me(Z,"oncomment",Z.comment),Z.comment=""):(Z.comment+="-"+ge,Z.state=X.COMMENT);continue;case X.COMMENT_ENDED:ge!==">"?(xe(Z,"Malformed comment"),Z.comment+="--"+ge,Z.state=X.COMMENT):Z.state=X.TEXT;continue;case X.CDATA:ge==="]"?Z.state=X.CDATA_ENDING:Z.cdata+=ge;continue;case X.CDATA_ENDING:ge==="]"?Z.state=X.CDATA_ENDING_2:(Z.cdata+="]"+ge,Z.state=X.CDATA);continue;case X.CDATA_ENDING_2:ge===">"?(Z.cdata&&me(Z,"oncdata",Z.cdata),me(Z,"onclosecdata"),Z.cdata="",Z.state=X.TEXT):ge==="]"?Z.cdata+="]":(Z.cdata+="]]"+ge,Z.state=X.CDATA);continue;case X.PROC_INST:ge==="?"?Z.state=X.PROC_INST_ENDING:H(ge)?Z.state=X.PROC_INST_BODY:Z.procInstName+=ge;continue;case X.PROC_INST_BODY:if(!Z.procInstBody&&H(ge))continue;ge==="?"?Z.state=X.PROC_INST_ENDING:Z.procInstBody+=ge;continue;case X.PROC_INST_ENDING:ge===">"?(me(Z,"onprocessinginstruction",{name:Z.procInstName,body:Z.procInstBody}),Z.procInstName=Z.procInstBody="",Z.state=X.TEXT):(Z.procInstBody+="?"+ge,Z.state=X.PROC_INST_BODY);continue;case X.OPEN_TAG:U(I,ge)?Z.tagName+=ge:(ue(Z),ge===">"?pe(Z):ge==="/"?Z.state=X.OPEN_TAG_SLASH:(H(ge)||xe(Z,"Invalid character in tag name"),Z.state=X.ATTRIB));continue;case X.OPEN_TAG_SLASH:ge===">"?(pe(Z,!0),ee(Z)):(xe(Z,"Forward-slash in opening tag not followed by >"),Z.state=X.ATTRIB);continue;case X.ATTRIB:if(H(ge))continue;ge===">"?pe(Z):ge==="/"?Z.state=X.OPEN_TAG_SLASH:U(M,ge)?(Z.attribName=ge,Z.attribValue="",Z.state=X.ATTRIB_NAME):xe(Z,"Invalid attribute name");continue;case X.ATTRIB_NAME:ge==="="?Z.state=X.ATTRIB_VALUE:ge===">"?(xe(Z,"Attribute without value"),Z.attribValue=Z.attribName,re(Z),pe(Z)):H(ge)?Z.state=X.ATTRIB_NAME_SAW_WHITE:U(I,ge)?Z.attribName+=ge:xe(Z,"Invalid attribute name");continue;case X.ATTRIB_NAME_SAW_WHITE:if(ge==="=")Z.state=X.ATTRIB_VALUE;else{if(H(ge))continue;xe(Z,"Attribute without value"),Z.tag.attributes[Z.attribName]="",Z.attribValue="",me(Z,"onattribute",{name:Z.attribName,value:""}),Z.attribName="",ge===">"?pe(Z):U(M,ge)?(Z.attribName=ge,Z.state=X.ATTRIB_NAME):(xe(Z,"Invalid attribute name"),Z.state=X.ATTRIB)}continue;case X.ATTRIB_VALUE:if(H(ge))continue;B(ge)?(Z.q=ge,Z.state=X.ATTRIB_VALUE_QUOTED):(xe(Z,"Unquoted attribute value"),Z.state=X.ATTRIB_VALUE_UNQUOTED,Z.attribValue=ge);continue;case X.ATTRIB_VALUE_QUOTED:if(ge!==Z.q){ge==="&"?Z.state=X.ATTRIB_VALUE_ENTITY_Q:Z.attribValue+=ge;continue}re(Z),Z.q="",Z.state=X.ATTRIB_VALUE_CLOSED;continue;case X.ATTRIB_VALUE_CLOSED:H(ge)?Z.state=X.ATTRIB:ge===">"?pe(Z):ge==="/"?Z.state=X.OPEN_TAG_SLASH:U(M,ge)?(xe(Z,"No whitespace between attributes"),Z.attribName=ge,Z.attribValue="",Z.state=X.ATTRIB_NAME):xe(Z,"Invalid attribute name");continue;case X.ATTRIB_VALUE_UNQUOTED:if(!K(ge)){ge==="&"?Z.state=X.ATTRIB_VALUE_ENTITY_U:Z.attribValue+=ge;continue}re(Z),ge===">"?pe(Z):Z.state=X.ATTRIB;continue;case X.CLOSE_TAG:if(Z.tagName)ge===">"?ee(Z):U(I,ge)?Z.tagName+=ge:Z.script?(Z.script+="</"+Z.tagName,Z.tagName="",Z.state=X.SCRIPT):(H(ge)||xe(Z,"Invalid tagname in closing tag"),Z.state=X.CLOSE_TAG_SAW_WHITE);else{if(H(ge))continue;W(M,ge)?Z.script?(Z.script+="</"+ge,Z.state=X.SCRIPT):xe(Z,"Invalid tagname in closing tag."):Z.tagName=ge}continue;case X.CLOSE_TAG_SAW_WHITE:if(H(ge))continue;ge===">"?ee(Z):xe(Z,"Invalid characters in closing tag");continue;case X.TEXT_ENTITY:case X.ATTRIB_VALUE_ENTITY_Q:case X.ATTRIB_VALUE_ENTITY_U:var rt,nt;switch(Z.state){case X.TEXT_ENTITY:rt=X.TEXT,nt="textNode";break;case X.ATTRIB_VALUE_ENTITY_Q:rt=X.ATTRIB_VALUE_QUOTED,nt="attribValue";break;case X.ATTRIB_VALUE_ENTITY_U:rt=X.ATTRIB_VALUE_UNQUOTED,nt="attribValue";break}ge===";"?(Z[nt]+=te(Z),Z.entity="",Z.state=rt):U(Z.entity.length?G:N,ge)?Z.entity+=ge:(xe(Z,"Invalid character in entity name"),Z[nt]+="&"+Z.entity+ge,Z.entity="",Z.state=rt);continue;default:throw new Error(Z,"Unknown state: "+Z.state)}}return Z.position>=Z.bufferCheckPosition&&r(Z),Z}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */T.default||function(){var V=String.fromCharCode,Z=Math.floor,be=function(){var Te=16384,Je=[],rt,nt,at=-1,ct=arguments.length;if(!ct)return"";for(var ht="";++at<ct;){var He=Number(arguments[at]);if(!isFinite(He)||He<0||He>1114111||Z(He)!==He)throw RangeError("Invalid code point: "+He);He<=65535?Je.push(He):(He-=65536,rt=(He>>10)+55296,nt=He%1024+56320,Je.push(rt,nt)),(at+1===ct||Je.length>Te)&&(ht+=V.apply(null,Je),Je.length=0)}return ht};d.default?Object.defineProperty(String,"fromCodePoint",{value:be,configurable:!0,writable:!0}):String.fromCodePoint=be}()})(typeof D=="undefined"?(void 0).sax={}:D)}).call(this,j("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/string/from-code-point":63,"babel-runtime/helpers/typeof":67,buffer:73,stream:230,string_decoder:72}],230:[function(j,Y,D){Y.exports=T;var L=j("events").EventEmitter,g=j("inherits");g(T,L),T.Readable=j("readable-stream/readable.js"),T.Writable=j("readable-stream/writable.js"),T.Duplex=j("readable-stream/duplex.js"),T.Transform=j("readable-stream/transform.js"),T.PassThrough=j("readable-stream/passthrough.js"),T.Stream=T;function T(){L.call(this)}T.prototype.pipe=function(P,p){var v=this;function S(o){P.writable&&(P.write(o)===!1&&v.pause&&v.pause())}v.on("data",S);function b(){v.readable&&v.resume&&v.resume()}P.on("drain",b),!P._isStdio&&(!p||p.end!==!1)&&(v.on("end",l),v.on("close",n));var d=!1;function l(){if(d)return;d=!0,P.end()}function n(){if(d)return;d=!0,typeof P.destroy=="function"&&P.destroy()}function c(o){if(u(),L.listenerCount(this,"error")===0)throw o}v.on("error",c),P.on("error",c);function u(){v.removeListener("data",S),P.removeListener("drain",b),v.removeListener("end",l),v.removeListener("close",n),v.removeListener("error",c),P.removeListener("error",c),v.removeListener("end",u),v.removeListener("close",u),P.removeListener("close",u)}return v.on("end",u),v.on("close",u),P.on("close",u),P.emit("pipe",v),P}},{events:192,inherits:196,"readable-stream/duplex.js":213,"readable-stream/passthrough.js":222,"readable-stream/readable.js":223,"readable-stream/transform.js":224,"readable-stream/writable.js":225}],231:[function(j,Y,D){(function(L){var g=j("./lib/request"),T=j("./lib/response"),P=j("xtend"),p=j("builtin-status-codes"),v=j("url"),S=D;S.request=function(b,d){typeof b=="string"?b=v.parse(b):b=P(b);var l=L.location.protocol.search(/^https?:$/)===-1?"http:":"",n=b.protocol||l,c=b.hostname||b.host,u=b.port,o=b.path||"/";c&&c.indexOf(":")!==-1&&(c="["+c+"]"),b.url=(c?n+"//"+c:"")+(u?":"+u:"")+o,b.method=(b.method||"GET").toUpperCase(),b.headers=b.headers||{};var h=new g(b);return d&&h.on("response",d),h},S.get=function(d,l){var n=S.request(d,l);return n.end(),n},S.ClientRequest=g,S.IncomingMessage=T.IncomingMessage,S.Agent=function(){},S.Agent.defaultMaxSockets=4,S.globalAgent=new S.Agent,S.STATUS_CODES=p,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(j,Y,D){(function(L){"use strict";D.fetch=S(L.fetch)&&S(L.ReadableStream),D.writableStream=S(L.WritableStream),D.abortController=S(L.AbortController),D.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),D.blobConstructor=!0}catch(b){}var g;function T(){if(g!==void 0)return g;if(L.XMLHttpRequest){g=new L.XMLHttpRequest;try{g.open("GET",L.XDomainRequest?"/":"https://example.com")}catch(b){g=null}}else g=null;return g}function P(b){var d=T();if(!d)return!1;try{return d.responseType=b,d.responseType===b}catch(l){}return!1}var p=typeof L.ArrayBuffer!="undefined",v=p&&S(L.ArrayBuffer.prototype.slice);D.arraybuffer=D.fetch||p&&P("arraybuffer"),D.msstream=!D.fetch&&v&&P("ms-stream"),D.mozchunkedarraybuffer=!D.fetch&&p&&P("moz-chunked-arraybuffer"),D.overrideMimeType=D.fetch||(T()?S(T().overrideMimeType):!1),D.vbArray=S(L.VBArray);function S(b){return typeof b=="function"}g=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(j,Y,D){(function(L,g,T){"use strict";var P=j("babel-runtime/core-js/object/keys"),p=v(P);function v(r){return r&&r.__esModule?r:{default:r}}var S=j("./capability"),b=j("inherits"),d=j("./response"),l=j("readable-stream"),n=j("to-arraybuffer"),c=d.IncomingMessage,u=d.readyStates;function o(r,a){return S.fetch&&a?"fetch":S.mozchunkedarraybuffer?"moz-chunked-arraybuffer":S.msstream?"ms-stream":S.arraybuffer&&r?"arraybuffer":S.vbArray&&r?"text:vbarray":"text"}var h=Y.exports=function(r){var a=this;l.Writable.call(a),a._opts=r,a._body=[],a._headers={},r.auth&&a.setHeader("Authorization","Basic "+new T(r.auth).toString("base64")),(0,p.default)(r.headers).forEach(function(E){a.setHeader(E,r.headers[E])});var t,w=!0;if(r.mode==="disable-fetch"||"requestTimeout"in r&&!S.abortController)w=!1,t=!0;else if(r.mode==="prefer-streaming")t=!1;else if(r.mode==="allow-wrong-content-type")t=!S.overrideMimeType;else if(!r.mode||r.mode==="default"||r.mode==="prefer-fast")t=!0;else throw new Error("Invalid value for opts.mode");a._mode=o(t,w),a._fetchTimer=null,a.on("finish",function(){a._onFinish()})};b(h,l.Writable),h.prototype.setHeader=function(r,a){var t=this,w=r.toLowerCase();if(s.indexOf(w)!==-1)return;t._headers[w]={name:r,value:a}},h.prototype.getHeader=function(r){var a=this._headers[r.toLowerCase()];return a?a.value:null},h.prototype.removeHeader=function(r){var a=this;delete a._headers[r.toLowerCase()]},h.prototype._onFinish=function(){var r=this;if(r._destroyed)return;var a=r._opts,t=r._headers,w=null;a.method!=="GET"&&a.method!=="HEAD"&&(S.arraybuffer?w=n(T.concat(r._body)):S.blobConstructor?w=new g.Blob(r._body.map(function(x){return n(x)}),{type:(t["content-type"]||{}).value||""}):w=T.concat(r._body).toString());var E=[];if((0,p.default)(t).forEach(function(x){var y=t[x].name,_=t[x].value;Array.isArray(_)?_.forEach(function(M){E.push([y,M])}):E.push([y,_])}),r._mode==="fetch"){var f=null,k=null;if(S.abortController){var O=new AbortController;f=O.signal,r._fetchAbortController=O,"requestTimeout"in a&&a.requestTimeout!==0&&(r._fetchTimer=g.setTimeout(function(){r.emit("requestTimeout"),r._fetchAbortController&&r._fetchAbortController.abort()},a.requestTimeout))}g.fetch(r._opts.url,{method:r._opts.method,headers:E,body:w||void 0,mode:"cors",credentials:a.withCredentials?"include":"same-origin",signal:f}).then(function(x){r._fetchResponse=x,r._connect()},function(x){g.clearTimeout(r._fetchTimer),r._destroyed||r.emit("error",x)})}else{var C=r._xhr=new g.XMLHttpRequest;try{C.open(r._opts.method,r._opts.url,!0)}catch(x){L.nextTick(function(){r.emit("error",x)});return}"responseType"in C&&(C.responseType=r._mode.split(":")[0]),"withCredentials"in C&&(C.withCredentials=!!a.withCredentials),r._mode==="text"&&"overrideMimeType"in C&&C.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in a&&(C.timeout=a.requestTimeout,C.ontimeout=function(){r.emit("requestTimeout")}),E.forEach(function(x){C.setRequestHeader(x[0],x[1])}),r._response=null,C.onreadystatechange=function(){switch(C.readyState){case u.LOADING:case u.DONE:r._onXHRProgress();break}},r._mode==="moz-chunked-arraybuffer"&&(C.onprogress=function(){r._onXHRProgress()}),C.onerror=function(){if(r._destroyed)return;r.emit("error",new Error("XHR error"))};try{C.send(w)}catch(x){L.nextTick(function(){r.emit("error",x)});return}}};function m(r){try{var a=r.status;return a!==null&&a!==0}catch(t){return!1}}h.prototype._onXHRProgress=function(){var r=this;if(!m(r._xhr)||r._destroyed)return;r._response||r._connect(),r._response._onXHRProgress()},h.prototype._connect=function(){var r=this;if(r._destroyed)return;r._response=new c(r._xhr,r._fetchResponse,r._mode,r._fetchTimer),r._response.on("error",function(a){r.emit("error",a)}),r.emit("response",r._response)},h.prototype._write=function(r,a,t){var w=this;w._body.push(r),t()},h.prototype.abort=h.prototype.destroy=function(){var r=this;r._destroyed=!0,g.clearTimeout(r._fetchTimer),r._response&&(r._response._destroyed=!0),r._xhr?r._xhr.abort():r._fetchAbortController&&r._fetchAbortController.abort()},h.prototype.end=function(r,a,t){var w=this;typeof r=="function"&&(t=r,r=void 0),l.Writable.prototype.end.call(w,r,a,t)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var s=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("buffer").Buffer)},{"./capability":232,"./response":234,_process:208,"babel-runtime/core-js/object/keys":60,buffer:73,inherits:196,"readable-stream":223,"to-arraybuffer":237}],234:[function(j,Y,D){(function(L,g,T){"use strict";var P=j("babel-runtime/core-js/promise"),p=v(P);function v(c){return c&&c.__esModule?c:{default:c}}var S=j("./capability"),b=j("inherits"),d=j("readable-stream"),l=D.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=D.IncomingMessage=function(c,u,o,h){var m=this;if(d.Readable.call(m),m._mode=o,m.headers={},m.rawHeaders=[],m.trailers={},m.rawTrailers=[],m.on("end",function(){L.nextTick(function(){m.emit("close")})}),o==="fetch"){var s=function f(){a.read().then(function(k){if(m._destroyed)return;if(k.done){g.clearTimeout(h),m.push(null);return}m.push(new T(k.value)),f()}).catch(function(k){g.clearTimeout(h),m._destroyed||m.emit("error",k)})};if(m._fetchResponse=u,m.url=u.url,m.statusCode=u.status,m.statusMessage=u.statusText,u.headers.forEach(function(f,k){m.headers[k.toLowerCase()]=f,m.rawHeaders.push(k,f)}),S.writableStream){var r=new WritableStream({write:function(k){return new p.default(function(O,C){m._destroyed?C():m.push(new T(k))?O():m._resumeFetch=O})},close:function(){g.clearTimeout(h),m._destroyed||m.push(null)},abort:function(k){m._destroyed||m.emit("error",k)}});try{u.body.pipeTo(r).catch(function(f){g.clearTimeout(h),m._destroyed||m.emit("error",f)});return}catch(f){}}var a=u.body.getReader();s()}else{m._xhr=c,m._pos=0,m.url=c.responseURL,m.statusCode=c.status,m.statusMessage=c.statusText;var t=c.getAllResponseHeaders().split(/\r?\n/);if(t.forEach(function(f){var k=f.match(/^([^:]+):\s*(.*)/);if(k){var O=k[1].toLowerCase();O==="set-cookie"?(m.headers[O]===void 0&&(m.headers[O]=[]),m.headers[O].push(k[2])):m.headers[O]!==void 0?m.headers[O]+=", "+k[2]:m.headers[O]=k[2],m.rawHeaders.push(k[1],k[2])}}),m._charset="x-user-defined",!S.overrideMimeType){var w=m.rawHeaders["mime-type"];if(w){var E=w.match(/;\s*charset=([^;])(;|$)/);E&&(m._charset=E[1].toLowerCase())}m._charset||(m._charset="utf-8")}}};b(n,d.Readable),n.prototype._read=function(){var c=this,u=c._resumeFetch;u&&(c._resumeFetch=null,u())},n.prototype._onXHRProgress=function(){var c=this,u=c._xhr,o=null;switch(c._mode){case"text:vbarray":if(u.readyState!==l.DONE)break;try{o=new g.VBArray(u.responseBody).toArray()}catch(a){}if(o!==null){c.push(new T(o));break}case"text":try{o=u.responseText}catch(a){c._mode="text:vbarray";break}if(o.length>c._pos){var h=o.substr(c._pos);if(c._charset==="x-user-defined"){for(var m=new T(h.length),s=0;s<h.length;s++)m[s]=h.charCodeAt(s)&255;c.push(m)}else c.push(h,c._charset);c._pos=o.length}break;case"arraybuffer":if(u.readyState!==l.DONE||!u.response)break;o=u.response,c.push(new T(new Uint8Array(o)));break;case"moz-chunked-arraybuffer":if(o=u.response,u.readyState!==l.LOADING||!o)break;c.push(new T(new Uint8Array(o)));break;case"ms-stream":if(o=u.response,u.readyState!==l.LOADING)break;var r=new g.MSStreamReader;r.onprogress=function(){r.result.byteLength>c._pos&&(c.push(new T(new Uint8Array(r.result.slice(c._pos)))),c._pos=r.result.byteLength)},r.onload=function(){c.push(null)},r.readAsArrayBuffer(o);break}c._xhr.readyState===l.DONE&&c._mode!=="ms-stream"&&c.push(null)}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(j,Y,D){"use strict";var L=j("safe-buffer").Buffer,g=L.isEncoding||function(r){r=""+r;switch(r&&r.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function T(r){if(!r)return"utf8";for(var a;;)switch(r){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 r;default:if(a)return;r=(""+r).toLowerCase(),a=!0}}function P(r){var a=T(r);if(typeof a!="string"&&(L.isEncoding===g||!g(r)))throw new Error("Unknown encoding: "+r);return a||r}D.StringDecoder=p;function p(r){this.encoding=P(r);var a;switch(this.encoding){case"utf16le":this.text=c,this.end=u,a=4;break;case"utf8":this.fillLast=d,a=4;break;case"base64":this.text=o,this.end=h,a=3;break;default:this.write=m,this.end=s;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=L.allocUnsafe(a)}p.prototype.write=function(r){if(r.length===0)return"";var a,t;if(this.lastNeed){if(a=this.fillLast(r),a===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<r.length?a?a+this.text(r,t):this.text(r,t):a||""},p.prototype.end=n,p.prototype.text=l,p.prototype.fillLast=function(r){if(this.lastNeed<=r.length)return r.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);r.copy(this.lastChar,this.lastTotal-this.lastNeed,0,r.length),this.lastNeed-=r.length};function v(r){return r<=127?0:r>>5===6?2:r>>4===14?3:r>>3===30?4:r>>6===2?-1:-2}function S(r,a,t){var w=a.length-1;if(w<t)return 0;var E=v(a[w]);return E>=0?(E>0&&(r.lastNeed=E-1),E):--w<t||E===-2?0:(E=v(a[w]),E>=0?(E>0&&(r.lastNeed=E-2),E):--w<t||E===-2?0:(E=v(a[w]),E>=0?(E>0&&(E===2?E=0:r.lastNeed=E-3),E):0))}function b(r,a,t){if((a[0]&192)!==128)return r.lastNeed=0,"\uFFFD";if(r.lastNeed>1&&a.length>1){if((a[1]&192)!==128)return r.lastNeed=1,"\uFFFD";if(r.lastNeed>2&&a.length>2&&(a[2]&192)!==128)return r.lastNeed=2,"\uFFFD"}}function d(r){var a=this.lastTotal-this.lastNeed,t=b(this,r,a);if(t!==void 0)return t;if(this.lastNeed<=r.length)return r.copy(this.lastChar,a,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);r.copy(this.lastChar,a,0,r.length),this.lastNeed-=r.length}function l(r,a){var t=S(this,r,a);if(!this.lastNeed)return r.toString("utf8",a);this.lastTotal=t;var w=r.length-(t-this.lastNeed);return r.copy(this.lastChar,0,w),r.toString("utf8",a,w)}function n(r){var a=r&&r.length?this.write(r):"";return this.lastNeed?a+"\uFFFD":a}function c(r,a){if((r.length-a)%2===0){var t=r.toString("utf16le",a);if(t){var w=t.charCodeAt(t.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=r[r.length-2],this.lastChar[1]=r[r.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=r[r.length-1],r.toString("utf16le",a,r.length-1)}function u(r){var a=r&&r.length?this.write(r):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return a+this.lastChar.toString("utf16le",0,t)}return a}function o(r,a){var t=(r.length-a)%3;return t===0?r.toString("base64",a):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=r[r.length-1]:(this.lastChar[0]=r[r.length-2],this.lastChar[1]=r[r.length-1]),r.toString("base64",a,r.length-t))}function h(r){var a=r&&r.length?this.write(r):"";return this.lastNeed?a+this.lastChar.toString("base64",0,3-this.lastNeed):a}function m(r){return r.toString(this.encoding)}function s(r){return r&&r.length?this.write(r):""}},{"safe-buffer":228}],236:[function(j,Y,D){(function(L,g){var T=j("process/browser.js").nextTick,P=Function.prototype.apply,p=Array.prototype.slice,v={},S=0;D.setTimeout=function(){return new b(P.call(setTimeout,window,arguments),clearTimeout)},D.setInterval=function(){return new b(P.call(setInterval,window,arguments),clearInterval)},D.clearTimeout=D.clearInterval=function(d){d.close()};function b(d,l){this._id=d,this._clearFn=l}b.prototype.unref=b.prototype.ref=function(){},b.prototype.close=function(){this._clearFn.call(window,this._id)},D.enroll=function(d,l){clearTimeout(d._idleTimeoutId),d._idleTimeout=l},D.unenroll=function(d){clearTimeout(d._idleTimeoutId),d._idleTimeout=-1},D._unrefActive=D.active=function(d){clearTimeout(d._idleTimeoutId);var l=d._idleTimeout;l>=0&&(d._idleTimeoutId=setTimeout(function(){d._onTimeout&&d._onTimeout()},l))},D.setImmediate=typeof L=="function"?L:function(d){var l=S++,n=arguments.length<2?!1:p.call(arguments,1);return v[l]=!0,T(function(){v[l]&&(n?d.apply(null,n):d.call(null),D.clearImmediate(l))}),l},D.clearImmediate=typeof g=="function"?g:function(d){delete v[d]}}).call(this,j("timers").setImmediate,j("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(j,Y,D){var L=j("buffer").Buffer;Y.exports=function(g){if(g instanceof Uint8Array){if(g.byteOffset===0&&g.byteLength===g.buffer.byteLength)return g.buffer;if(typeof g.buffer.slice=="function")return g.buffer.slice(g.byteOffset,g.byteOffset+g.byteLength)}if(L.isBuffer(g)){for(var T=new Uint8Array(g.length),P=g.length,p=0;p<P;p++)T[p]=g[p];return T.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(j,Y,D){"use strict";var L=j("punycode"),g=j("./util");D.parse=a,D.resolve=w,D.resolveObject=E,D.format=t,D.Url=T;function T(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var P=/^([a-z0-9.+-]+:)/i,p=/:[0-9]*$/,v=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,S=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],b=["{","}","|","\\","^","`"].concat(S),d=["'"].concat(b),l=["%","/","?",";","#"].concat(d),n=["/","?","#"],c=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,o=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},s={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},r=j("querystring");function a(f,k,O){if(f&&g.isObject(f)&&f instanceof T)return f;var C=new T;return C.parse(f,k,O),C}T.prototype.parse=function(f,k,O){if(!g.isString(f))throw new TypeError("Parameter 'url' must be a string, not "+typeof f);var C=f.indexOf("?"),x=C!==-1&&C<f.indexOf("#")?"?":"#",y=f.split(x),_=/\\/g;y[0]=y[0].replace(_,"/"),f=y.join(x);var M=f;if(M=M.trim(),!O&&f.split("#").length===1){var I=v.exec(M);if(I)return this.path=M,this.href=M,this.pathname=I[1],I[2]?(this.search=I[2],k?this.query=r.parse(this.search.substr(1)):this.query=this.search.substr(1)):k&&(this.search="",this.query={}),this}var N=P.exec(M);if(N){N=N[0];var G=N.toLowerCase();this.protocol=G,M=M.substr(N.length)}if(O||N||M.match(/^\/\/[^@\/]+@[^@\/]+/)){var H=M.substr(0,2)==="//";H&&!(N&&m[N])&&(M=M.substr(2),this.slashes=!0)}if(!m[N]&&(H||N&&!s[N])){for(var B=-1,K=0;K<n.length;K++){var U=M.indexOf(n[K]);U!==-1&&(B===-1||U<B)&&(B=U)}var W,X;B===-1?X=M.lastIndexOf("@"):X=M.lastIndexOf("@",B),X!==-1&&(W=M.slice(0,X),M=M.slice(X+1),this.auth=decodeURIComponent(W)),B=-1;for(var K=0;K<l.length;K++){var U=M.indexOf(l[K]);U!==-1&&(B===-1||U<B)&&(B=U)}B===-1&&(B=M.length),this.host=M.slice(0,B),M=M.slice(B),this.parseHost(),this.hostname=this.hostname||"";var ne=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ne)for(var fe=this.hostname.split(/\./),K=0,me=fe.length;K<me;K++){var Ae=fe[K];if(!Ae)continue;if(!Ae.match(u)){for(var De="",ye=0,Oe=Ae.length;ye<Oe;ye++)Ae.charCodeAt(ye)>127?De+="x":De+=Ae[ye];if(!De.match(u)){var xe=fe.slice(0,K),ue=fe.slice(K+1),le=Ae.match(o);le&&(xe.push(le[1]),ue.unshift(le[2])),ue.length&&(M="/"+ue.join(".")+M),this.hostname=xe.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),ne||(this.hostname=L.toASCII(this.hostname));var re=this.port?":"+this.port:"",pe=this.hostname||"";this.host=pe+re,this.href+=this.host,ne&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),M[0]!=="/"&&(M="/"+M))}if(!h[G])for(var K=0,me=d.length;K<me;K++){var ee=d[K];if(M.indexOf(ee)===-1)continue;var te=encodeURIComponent(ee);te===ee&&(te=escape(ee)),M=M.split(ee).join(te)}var ce=M.indexOf("#");ce!==-1&&(this.hash=M.substr(ce),M=M.slice(0,ce));var q=M.indexOf("?");if(q!==-1?(this.search=M.substr(q),this.query=M.substr(q+1),k&&(this.query=r.parse(this.query)),M=M.slice(0,q)):k&&(this.search="",this.query={}),M&&(this.pathname=M),s[G]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var re=this.pathname||"",Q=this.search||"";this.path=re+Q}return this.href=this.format(),this};function t(f){return g.isString(f)&&(f=a(f)),f instanceof T?f.format():T.prototype.format.call(f)}T.prototype.format=function(){var f=this.auth||"";f&&(f=encodeURIComponent(f),f=f.replace(/%3A/i,":"),f+="@");var k=this.protocol||"",O=this.pathname||"",C=this.hash||"",x=!1,y="";this.host?x=f+this.host:this.hostname&&(x=f+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(x+=":"+this.port)),this.query&&g.isObject(this.query)&&Object.keys(this.query).length&&(y=r.stringify(this.query));var _=this.search||y&&"?"+y||"";return k&&k.substr(-1)!==":"&&(k+=":"),this.slashes||(!k||s[k])&&x!==!1?(x="//"+(x||""),O&&O.charAt(0)!=="/"&&(O="/"+O)):x||(x=""),C&&C.charAt(0)!=="#"&&(C="#"+C),_&&_.charAt(0)!=="?"&&(_="?"+_),O=O.replace(/[?#]/g,function(M){return encodeURIComponent(M)}),_=_.replace("#","%23"),k+x+O+_+C};function w(f,k){return a(f,!1,!0).resolve(k)}T.prototype.resolve=function(f){return this.resolveObject(a(f,!1,!0)).format()};function E(f,k){return f?a(f,!1,!0).resolveObject(k):k}T.prototype.resolveObject=function(f){if(g.isString(f)){var k=new T;k.parse(f,!1,!0),f=k}for(var O=new T,C=Object.keys(this),x=0;x<C.length;x++){var y=C[x];O[y]=this[y]}if(O.hash=f.hash,f.href==="")return O.href=O.format(),O;if(f.slashes&&!f.protocol){for(var _=Object.keys(f),M=0;M<_.length;M++){var I=_[M];I!=="protocol"&&(O[I]=f[I])}return s[O.protocol]&&O.hostname&&!O.pathname&&(O.path=O.pathname="/"),O.href=O.format(),O}if(f.protocol&&f.protocol!==O.protocol){if(!s[f.protocol]){for(var N=Object.keys(f),G=0;G<N.length;G++){var H=N[G];O[H]=f[H]}return O.href=O.format(),O}if(O.protocol=f.protocol,!f.host&&!m[f.protocol]){for(var me=(f.pathname||"").split("/");me.length&&!(f.host=me.shift()););f.host||(f.host=""),f.hostname||(f.hostname=""),me[0]!==""&&me.unshift(""),me.length<2&&me.unshift(""),O.pathname=me.join("/")}else O.pathname=f.pathname;if(O.search=f.search,O.query=f.query,O.host=f.host||"",O.auth=f.auth,O.hostname=f.hostname||f.host,O.port=f.port,O.pathname||O.search){var B=O.pathname||"",K=O.search||"";O.path=B+K}return O.slashes=O.slashes||f.slashes,O.href=O.format(),O}var U=O.pathname&&O.pathname.charAt(0)==="/",W=f.host||f.pathname&&f.pathname.charAt(0)==="/",X=W||U||O.host&&f.pathname,ne=X,fe=O.pathname&&O.pathname.split("/")||[],me=f.pathname&&f.pathname.split("/")||[],Ae=O.protocol&&!s[O.protocol];if(Ae&&(O.hostname="",O.port=null,O.host&&(fe[0]===""?fe[0]=O.host:fe.unshift(O.host)),O.host="",f.protocol&&(f.hostname=null,f.port=null,f.host&&(me[0]===""?me[0]=f.host:me.unshift(f.host)),f.host=null),X=X&&(me[0]===""||fe[0]==="")),W)O.host=f.host||f.host===""?f.host:O.host,O.hostname=f.hostname||f.hostname===""?f.hostname:O.hostname,O.search=f.search,O.query=f.query,fe=me;else if(me.length)fe||(fe=[]),fe.pop(),fe=fe.concat(me),O.search=f.search,O.query=f.query;else if(!g.isNullOrUndefined(f.search)){if(Ae){O.hostname=O.host=fe.shift();var De=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;De&&(O.auth=De.shift(),O.host=O.hostname=De.shift())}return O.search=f.search,O.query=f.query,(!g.isNull(O.pathname)||!g.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!fe.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var ye=fe.slice(-1)[0],Oe=(O.host||f.host||fe.length>1)&&(ye==="."||ye==="..")||ye==="",xe=0,ue=fe.length;ue>=0;ue--)ye=fe[ue],ye==="."?fe.splice(ue,1):ye===".."?(fe.splice(ue,1),xe++):xe&&(fe.splice(ue,1),xe--);if(!X&&!ne)for(;xe--;xe)fe.unshift("..");X&&fe[0]!==""&&(!fe[0]||fe[0].charAt(0)!=="/")&&fe.unshift(""),Oe&&fe.join("/").substr(-1)!=="/"&&fe.push("");var le=fe[0]===""||fe[0]&&fe[0].charAt(0)==="/";if(Ae){O.hostname=O.host=le?"":fe.length?fe.shift():"";var De=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;De&&(O.auth=De.shift(),O.host=O.hostname=De.shift())}return X=X||O.host&&fe.length,X&&!le&&fe.unshift(""),fe.length?O.pathname=fe.join("/"):(O.pathname=null,O.path=null),(!g.isNull(O.pathname)||!g.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=f.auth||O.auth,O.slashes=O.slashes||f.slashes,O.href=O.format(),O},T.prototype.parseHost=function(){var f=this.host,k=p.exec(f);k&&(k=k[0],k!==":"&&(this.port=k.substr(1)),f=f.substr(0,f.length-k.length)),f&&(this.hostname=f)}},{"./util":239,punycode:209,querystring:212}],239:[function(j,Y,D){"use strict";Y.exports={isString:function(L){return typeof L=="string"},isObject:function(L){return typeof L=="object"&&L!==null},isNull:function(L){return L===null},isNullOrUndefined:function(L){return L==null}}},{}],240:[function(j,Y,D){(function(L){Y.exports=g;function g(P,p){if(T("noDeprecation"))return P;var v=!1;function S(){if(!v){if(T("throwDeprecation"))throw new Error(p);T("traceDeprecation")?console.trace(p):console.warn(p),v=!0}return P.apply(this,arguments)}return S}function T(P){try{if(!L.localStorage)return!1}catch(v){return!1}var p=L.localStorage[P];return p==null?!1:String(p).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(j,Y,D){typeof Object.create=="function"?Y.exports=function(g,T){g.super_=T,g.prototype=Object.create(T.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})}:Y.exports=function(g,T){g.super_=T;var P=function(){};P.prototype=T.prototype,g.prototype=new P,g.prototype.constructor=g}},{}],242:[function(j,Y,D){Y.exports=function(g){return g&&typeof g=="object"&&typeof g.copy=="function"&&typeof g.fill=="function"&&typeof g.readUInt8=="function"}},{}],243:[function(j,Y,D){(function(L,g){var T=/%[sdj%]/g;D.format=function(B){if(!w(B)){for(var K=[],U=0;U<arguments.length;U++)K.push(v(arguments[U]));return K.join(" ")}for(var U=1,W=arguments,X=W.length,ne=String(B).replace(T,function(me){if(me==="%%")return"%";if(U>=X)return me;switch(me){case"%s":return String(W[U++]);case"%d":return Number(W[U++]);case"%j":try{return JSON.stringify(W[U++])}catch(Ae){return"[Circular]"}default:return me}}),fe=W[U];U<X;fe=W[++U])r(fe)||!O(fe)?ne+=" "+fe:ne+=" "+v(fe);return ne},D.deprecate=function(B,K){if(f(g.process))return function(){return D.deprecate(B,K).apply(this,arguments)};if(L.noDeprecation===!0)return B;var U=!1;function W(){if(!U){if(L.throwDeprecation)throw new Error(K);L.traceDeprecation?console.trace(K):console.error(K),U=!0}return B.apply(this,arguments)}return W};var P={},p;D.debuglog=function(B){if(f(p)&&(p=L.env.NODE_DEBUG||""),B=B.toUpperCase(),!P[B])if(new RegExp("\\b"+B+"\\b","i").test(p)){var K=L.pid;P[B]=function(){var U=D.format.apply(D,arguments);console.error("%s %d: %s",B,K,U)}}else P[B]=function(){};return P[B]};function v(B,K){var U={seen:[],stylize:b};return arguments.length>=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),s(K)?U.showHidden=K:K&&D._extend(U,K),f(U.showHidden)&&(U.showHidden=!1),f(U.depth)&&(U.depth=2),f(U.colors)&&(U.colors=!1),f(U.customInspect)&&(U.customInspect=!0),U.colors&&(U.stylize=S),l(U,B,U.depth)}D.inspect=v,v.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]},v.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function S(B,K){var U=v.styles[K];return U?"["+v.colors[U][0]+"m"+B+"["+v.colors[U][1]+"m":B}function b(B,K){return B}function d(B){var K={};return B.forEach(function(U,W){K[U]=!0}),K}function l(B,K,U){if(B.customInspect&&K&&y(K.inspect)&&K.inspect!==D.inspect&&!(K.constructor&&K.constructor.prototype===K)){var W=K.inspect(U,B);return w(W)||(W=l(B,W,U)),W}var X=n(B,K);if(X)return X;var ne=Object.keys(K),fe=d(ne);if(B.showHidden&&(ne=Object.getOwnPropertyNames(K)),x(K)&&(ne.indexOf("message")>=0||ne.indexOf("description")>=0))return c(K);if(ne.length===0){if(y(K)){var me=K.name?": "+K.name:"";return B.stylize("[Function"+me+"]","special")}if(k(K))return B.stylize(RegExp.prototype.toString.call(K),"regexp");if(C(K))return B.stylize(Date.prototype.toString.call(K),"date");if(x(K))return c(K)}var Ae="",De=!1,ye=["{","}"];if(m(K)&&(De=!0,ye=["[","]"]),y(K)){var Oe=K.name?": "+K.name:"";Ae=" [Function"+Oe+"]"}if(k(K)&&(Ae=" "+RegExp.prototype.toString.call(K)),C(K)&&(Ae=" "+Date.prototype.toUTCString.call(K)),x(K)&&(Ae=" "+c(K)),ne.length===0&&(!De||K.length==0))return ye[0]+Ae+ye[1];if(U<0)return k(K)?B.stylize(RegExp.prototype.toString.call(K),"regexp"):B.stylize("[Object]","special");B.seen.push(K);var xe;return De?xe=u(B,K,U,fe,ne):xe=ne.map(function(ue){return o(B,K,U,fe,ue,De)}),B.seen.pop(),h(xe,Ae,ye)}function n(B,K){if(f(K))return B.stylize("undefined","undefined");if(w(K)){var U="'"+JSON.stringify(K).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(U,"string")}if(t(K))return B.stylize(""+K,"number");if(s(K))return B.stylize(""+K,"boolean");if(r(K))return B.stylize("null","null")}function c(B){return"["+Error.prototype.toString.call(B)+"]"}function u(B,K,U,W,X){for(var ne=[],fe=0,me=K.length;fe<me;++fe)H(K,String(fe))?ne.push(o(B,K,U,W,String(fe),!0)):ne.push("");return X.forEach(function(Ae){Ae.match(/^\d+$/)||ne.push(o(B,K,U,W,Ae,!0))}),ne}function o(B,K,U,W,X,ne){var fe,me,Ae;if(Ae=Object.getOwnPropertyDescriptor(K,X)||{value:K[X]},Ae.get?Ae.set?me=B.stylize("[Getter/Setter]","special"):me=B.stylize("[Getter]","special"):Ae.set&&(me=B.stylize("[Setter]","special")),H(W,X)||(fe="["+X+"]"),me||(B.seen.indexOf(Ae.value)<0?(r(U)?me=l(B,Ae.value,null):me=l(B,Ae.value,U-1),me.indexOf(`
|
|
|
`)>-1&&(ne?me=me.split(`
|
|
|
`).map(function(De){return" "+De}).join(`
|
|
|
`).substr(2):me=`
|
|
|
`+me.split(`
|
|
|
`).map(function(De){return" "+De}).join(`
|
|
|
`))):me=B.stylize("[Circular]","special")),f(fe)){if(ne&&X.match(/^\d+$/))return me;fe=JSON.stringify(""+X),fe.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(fe=fe.substr(1,fe.length-2),fe=B.stylize(fe,"name")):(fe=fe.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),fe=B.stylize(fe,"string"))}return fe+": "+me}function h(B,K,U){var W=0,X=B.reduce(function(ne,fe){return W++,fe.indexOf(`
|
|
|
`)>=0&&W++,ne+fe.replace(/\u001b\[\d\d?m/g,"").length+1},0);return X>60?U[0]+(K===""?"":K+`
|
|
|
`)+" "+B.join(`,
|
|
|
`)+" "+U[1]:U[0]+K+" "+B.join(", ")+" "+U[1]}function m(B){return Array.isArray(B)}D.isArray=m;function s(B){return typeof B=="boolean"}D.isBoolean=s;function r(B){return B===null}D.isNull=r;function a(B){return B==null}D.isNullOrUndefined=a;function t(B){return typeof B=="number"}D.isNumber=t;function w(B){return typeof B=="string"}D.isString=w;function E(B){return typeof B=="symbol"}D.isSymbol=E;function f(B){return B===void 0}D.isUndefined=f;function k(B){return O(B)&&M(B)==="[object RegExp]"}D.isRegExp=k;function O(B){return typeof B=="object"&&B!==null}D.isObject=O;function C(B){return O(B)&&M(B)==="[object Date]"}D.isDate=C;function x(B){return O(B)&&(M(B)==="[object Error]"||B instanceof Error)}D.isError=x;function y(B){return typeof B=="function"}D.isFunction=y;function _(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B=="undefined"}D.isPrimitive=_,D.isBuffer=j("./support/isBuffer");function M(B){return Object.prototype.toString.call(B)}function I(B){return B<10?"0"+B.toString(10):B.toString(10)}var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function G(){var B=new Date,K=[I(B.getHours()),I(B.getMinutes()),I(B.getSeconds())].join(":");return[B.getDate(),N[B.getMonth()],K].join(" ")}D.log=function(){console.log("%s - %s",G(),D.format.apply(D,arguments))},D.inherits=j("inherits"),D._extend=function(B,K){if(!K||!O(K))return B;for(var U=Object.keys(K),W=U.length;W--;)B[U[W]]=K[U[W]];return B};function H(B,K){return Object.prototype.hasOwnProperty.call(B,K)}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(j,Y,D){"use strict";(function(){"use strict";D.stripBOM=function(L){return L[0]==="\uFEFF"?L.substring(1):L}}).call(void 0)},{}],245:[function(j,Y,D){"use strict";var L=j("babel-runtime/helpers/typeof"),g=p(L),T=j("babel-runtime/core-js/object/keys"),P=p(T);function p(v){return v&&v.__esModule?v:{default:v}}(function(){"use strict";var v,S,b,d,l,n={}.hasOwnProperty;v=j("xmlbuilder"),S=j("./defaults").defaults,d=function(u){return typeof u=="string"&&(u.indexOf("&")>=0||u.indexOf(">")>=0||u.indexOf("<")>=0)},l=function(u){return"<![CDATA["+b(u)+"]]>"},b=function(u){return u.replace("]]>","]]]]><![CDATA[>")},D.Builder=function(){function c(u){var o,h,m;this.options={},h=S["0.2"];for(o in h){if(!n.call(h,o))continue;m=h[o],this.options[o]=m}for(o in u){if(!n.call(u,o))continue;m=u[o],this.options[o]=m}}return c.prototype.buildObject=function(u){var o,h,m,s,r;return o=this.options.attrkey,h=this.options.charkey,(0,P.default)(u).length===1&&this.options.rootName===S["0.2"].rootName?(r=(0,P.default)(u)[0],u=u[r]):r=this.options.rootName,m=function(a){return function(t,w){var E,f,k,O,C,x;if((typeof w=="undefined"?"undefined":(0,g.default)(w))!=="object")a.options.cdata&&d(w)?t.raw(l(w)):t.txt(w);else if(Array.isArray(w))for(O in w){if(!n.call(w,O))continue;f=w[O];for(C in f)k=f[C],t=m(t.ele(C),k).up()}else for(C in w){if(!n.call(w,C))continue;if(f=w[C],C===o){if((typeof f=="undefined"?"undefined":(0,g.default)(f))==="object")for(E in f)x=f[E],t=t.att(E,x)}else if(C===h)a.options.cdata&&d(f)?t=t.raw(l(f)):t=t.txt(f);else if(Array.isArray(f))for(O in f){if(!n.call(f,O))continue;k=f[O],typeof k=="string"?a.options.cdata&&d(k)?t=t.ele(C).raw(l(k)).up():t=t.ele(C,k).up():t=m(t.ele(C),k).up()}else(typeof f=="undefined"?"undefined":(0,g.default)(f))==="object"?t=m(t.ele(C),f).up():typeof f=="string"&&a.options.cdata&&d(f)?t=t.ele(C).raw(l(f)).up():(f==null&&(f=""),t=t.ele(C,f.toString()).up())}return t}}(this),s=v.create(r,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),m(s,u).end(this.options.renderOpts)},c}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(j,Y,D){"use strict";(function(){D.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
|
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],247:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/promise"),g=d(L),T=j("babel-runtime/core-js/object/get-own-property-names"),P=d(T),p=j("babel-runtime/core-js/object/keys"),v=d(p),S=j("babel-runtime/helpers/typeof"),b=d(S);function d(l){return l&&l.__esModule?l:{default:l}}(function(){"use strict";var l,n,c,u,o,h,m,s,r=function(E,f){return function(){return E.apply(f,arguments)}},a=function(E,f){for(var k in f)t.call(f,k)&&(E[k]=f[k]);function O(){this.constructor=E}return O.prototype=f.prototype,E.prototype=new O,E.__super__=f.prototype,E},t={}.hasOwnProperty;m=j("sax"),c=j("events"),l=j("./bom"),h=j("./processors"),s=j("timers").setImmediate,n=j("./defaults").defaults,u=function(E){return(typeof E=="undefined"?"undefined":(0,b.default)(E))==="object"&&E!=null&&(0,v.default)(E).length===0},o=function(E,f,k){var O,C,x;for(O=0,C=E.length;O<C;O++)x=E[O],f=x(f,k);return f},D.Parser=function(w){a(E,w);function E(f){this.parseStringPromise=r(this.parseStringPromise,this),this.parseString=r(this.parseString,this),this.reset=r(this.reset,this),this.assignOrPush=r(this.assignOrPush,this),this.processAsync=r(this.processAsync,this);var k,O,C;if(!(this instanceof D.Parser))return new D.Parser(f);this.options={},O=n["0.2"];for(k in O){if(!t.call(O,k))continue;C=O[k],this.options[k]=C}for(k in f){if(!t.call(f,k))continue;C=f[k],this.options[k]=C}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(h.normalize)),this.reset()}return E.prototype.processAsync=function(){var f,k;try{return this.remaining.length<=this.options.chunkSize?(f=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(f),this.saxParser.close()):(f=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(f),s(this.processAsync))}catch(O){if(k=O,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(k)}},E.prototype.assignOrPush=function(f,k,O){return k in f?(f[k]instanceof Array||(f[k]=[f[k]]),f[k].push(O)):this.options.explicitArray?f[k]=[O]:f[k]=O},E.prototype.reset=function(){var f,k,O,C;return this.removeAllListeners(),this.saxParser=m.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(x){return function(y){if(x.saxParser.resume(),!x.saxParser.errThrown)return x.saxParser.errThrown=!0,x.emit("error",y)}}(this),this.saxParser.onend=function(x){return function(){if(!x.saxParser.ended)return x.saxParser.ended=!0,x.emit("end",x.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,C=[],f=this.options.attrkey,k=this.options.charkey,this.saxParser.onopentag=function(x){return function(y){var _,M,I,N,G;if(I={},I[k]="",!x.options.ignoreAttrs){G=y.attributes;for(_ in G){if(!t.call(G,_))continue;!(f in I)&&!x.options.mergeAttrs&&(I[f]={}),M=x.options.attrValueProcessors?o(x.options.attrValueProcessors,y.attributes[_],_):y.attributes[_],N=x.options.attrNameProcessors?o(x.options.attrNameProcessors,_):_,x.options.mergeAttrs?x.assignOrPush(I,N,M):I[f][N]=M}}return I["#name"]=x.options.tagNameProcessors?o(x.options.tagNameProcessors,y.name):y.name,x.options.xmlns&&(I[x.options.xmlnskey]={uri:y.uri,local:y.local}),C.push(I)}}(this),this.saxParser.onclosetag=function(x){return function(){var y,_,M,I,N,G,H,B,K,U;if(G=C.pop(),N=G["#name"],(!x.options.explicitChildren||!x.options.preserveChildrenOrder)&&delete G["#name"],G.cdata===!0&&(y=G.cdata,delete G.cdata),K=C[C.length-1],G[k].match(/^\s*$/)&&!y?(_=G[k],delete G[k]):(x.options.trim&&(G[k]=G[k].trim()),x.options.normalize&&(G[k]=G[k].replace(/\s{2,}/g," ").trim()),G[k]=x.options.valueProcessors?o(x.options.valueProcessors,G[k],N):G[k],(0,v.default)(G).length===1&&k in G&&!x.EXPLICIT_CHARKEY&&(G=G[k])),u(G)&&(G=x.options.emptyTag!==""?x.options.emptyTag:_),x.options.validator!=null&&(U="/"+function(){var W,X,ne;for(ne=[],W=0,X=C.length;W<X;W++)I=C[W],ne.push(I["#name"]);return ne}().concat(N).join("/"),function(){var W;try{return G=x.options.validator(U,K&&K[N],G)}catch(X){return W=X,x.emit("error",W)}}()),x.options.explicitChildren&&!x.options.mergeAttrs&&(typeof G=="undefined"?"undefined":(0,b.default)(G))==="object"){if(!x.options.preserveChildrenOrder)I={},x.options.attrkey in G&&(I[x.options.attrkey]=G[x.options.attrkey],delete G[x.options.attrkey]),!x.options.charsAsChildren&&x.options.charkey in G&&(I[x.options.charkey]=G[x.options.charkey],delete G[x.options.charkey]),(0,P.default)(G).length>0&&(I[x.options.childkey]=G),G=I;else if(K){K[x.options.childkey]=K[x.options.childkey]||[],H={};for(M in G){if(!t.call(G,M))continue;H[M]=G[M]}K[x.options.childkey].push(H),delete G["#name"],(0,v.default)(G).length===1&&k in G&&!x.EXPLICIT_CHARKEY&&(G=G[k])}}return C.length>0?x.assignOrPush(K,N,G):(x.options.explicitRoot&&(B=G,G={},G[N]=B),x.resultObject=G,x.saxParser.ended=!0,x.emit("end",x.resultObject))}}(this),O=function(x){return function(y){var _,M;if(M=C[C.length-1],M)return M[k]+=y,x.options.explicitChildren&&x.options.preserveChildrenOrder&&x.options.charsAsChildren&&(x.options.includeWhiteChars||y.replace(/\\n/g,"").trim()!=="")&&(M[x.options.childkey]=M[x.options.childkey]||[],_={"#name":"__text__"},_[k]=y,x.options.normalize&&(_[k]=_[k].replace(/\s{2,}/g," ").trim()),M[x.options.childkey].push(_)),M}}(this),this.saxParser.ontext=O,this.saxParser.oncdata=function(x){return function(y){var _;if(_=O(y),_)return _.cdata=!0}}(this)},E.prototype.parseString=function(f,k){var O;k!=null&&typeof k=="function"&&(this.on("end",function(C){return this.reset(),k(null,C)}),this.on("error",function(C){return this.reset(),k(C)}));try{return f=f.toString(),f.trim()===""?(this.emit("end",null),!0):(f=l.stripBOM(f),this.options.async?(this.remaining=f,s(this.processAsync),this.saxParser):this.saxParser.write(f).close())}catch(C){if(O=C,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw O}else return this.emit("error",O),this.saxParser.errThrown=!0}},E.prototype.parseStringPromise=function(f){return new g.default(function(k){return function(O,C){return k.parseString(f,function(x,y){return x?C(x):O(y)})}}(this))},E}(c),D.parseString=function(w,E,f){var k,O,C;return f!=null?(typeof f=="function"&&(k=f),(typeof E=="undefined"?"undefined":(0,b.default)(E))==="object"&&(O=E)):(typeof E=="function"&&(k=E),O={}),C=new D.Parser(O),C.parseString(w,k)},D.parseStringPromise=function(w,E){var f,k;return(typeof E=="undefined"?"undefined":(0,b.default)(E))==="object"&&(f=E),k=new D.Parser(f),k.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(j,Y,D){"use strict";(function(){"use strict";var L;L=new RegExp(/(?!xmlns)^.*:/),D.normalize=function(g){return g.toLowerCase()},D.firstCharLowerCase=function(g){return g.charAt(0).toLowerCase()+g.slice(1)},D.stripPrefix=function(g){return g.replace(L,"")},D.parseNumbers=function(g){return isNaN(g)||(g=g%1===0?parseInt(g,10):parseFloat(g)),g},D.parseBooleans=function(g){return/^(?:true|false)$/i.test(g)&&(g=g.toLowerCase()==="true"),g}}).call(void 0)},{}],249:[function(j,Y,D){"use strict";(function(){"use strict";var L,g,T,P,p=function(b,d){for(var l in d)v.call(d,l)&&(b[l]=d[l]);function n(){this.constructor=b}return n.prototype=d.prototype,b.prototype=new n,b.__super__=d.prototype,b},v={}.hasOwnProperty;g=j("./defaults"),L=j("./builder"),T=j("./parser"),P=j("./processors"),D.defaults=g.defaults,D.processors=P,D.ValidationError=function(S){p(b,S);function b(d){this.message=d}return b}(Error),D.Builder=L.Builder,D.Parser=T.Parser,D.parseString=T.parseString,D.parseStringPromise=T.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(j,Y,D){"use strict";(function(){Y.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(j,Y,D){"use strict";(function(){Y.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(void 0)},{}],252:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/get-prototype-of"),g=S(L),T=j("babel-runtime/helpers/typeof"),P=S(T),p=j("babel-runtime/core-js/object/assign"),v=S(p);function S(b){return b&&b.__esModule?b:{default:b}}(function(){var b,d,l,n,c,u,o,h=[].slice,m={}.hasOwnProperty;b=function(){var r,a,t,w,E,f;if(f=arguments[0],E=2<=arguments.length?h.call(arguments,1):[],c(v.default))v.default.apply(null,arguments);else for(r=0,t=E.length;r<t;r++)if(w=E[r],w!=null)for(a in w){if(!m.call(w,a))continue;f[a]=w[a]}return f},c=function(r){return!!r&&Object.prototype.toString.call(r)==="[object Function]"},u=function(r){var a;return!!r&&((a=typeof r=="undefined"?"undefined":(0,P.default)(r))==="function"||a==="object")},l=function(r){return c(Array.isArray)?Array.isArray(r):Object.prototype.toString.call(r)==="[object Array]"},n=function(r){var a;if(l(r))return!r.length;for(a in r){if(!m.call(r,a))continue;return!1}return!0},o=function(r){var a,t;return u(r)&&(t=(0,g.default)(r))&&(a=t.constructor)&&typeof a=="function"&&a instanceof a&&Function.prototype.toString.call(a)===Function.prototype.toString.call(Object)},d=function(r){return c(r.valueOf)?r.valueOf():r},Y.exports.assign=b,Y.exports.isFunction=c,Y.exports.isObject=u,Y.exports.isArray=l,Y.exports.isEmpty=n,Y.exports.isPlainObject=o,Y.exports.getValue=d}).call(void 0)},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/get-prototype-of":59,"babel-runtime/helpers/typeof":67}],253:[function(j,Y,D){"use strict";(function(){Y.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/create"),g=T(L);function T(P){return P&&P.__esModule?P:{default:P}}(function(){var P,p,v;P=j("./NodeType"),v=j("./XMLNode"),Y.exports=p=function(){function S(b,d,l){if(this.parent=b,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),d==null)throw new Error("Missing attribute name. "+this.debugInfo(d));this.name=this.stringify.name(d),this.value=this.stringify.attValue(l),this.type=P.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(S.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(S.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(S.prototype,"textContent",{get:function(){return this.value},set:function(d){return this.value=d||""}}),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,"specified",{get:function(){return!0}}),S.prototype.clone=function(){return(0,g.default)(this)},S.prototype.toString=function(b){return this.options.writer.attribute(this,this.options.writer.filterOptions(b))},S.prototype.debugInfo=function(b){return b=b||this.name,b==null?"parent: <"+this.parent.name+">":"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(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/create"),g=T(L);function T(P){return P&&P.__esModule?P:{default:P}}(function(){var P,p,v,S=function(l,n){for(var c in n)b.call(n,c)&&(l[c]=n[c]);function u(){this.constructor=l}return u.prototype=n.prototype,l.prototype=new u,l.__super__=n.prototype,l},b={}.hasOwnProperty;P=j("./NodeType"),v=j("./XMLCharacterData"),Y.exports=p=function(d){S(l,d);function l(n,c){if(l.__super__.constructor.call(this,n),c==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=P.CData,this.value=this.stringify.cdata(c)}return l.prototype.clone=function(){return(0,g.default)(this)},l.prototype.toString=function(n){return this.options.writer.cdata(this,this.options.writer.filterOptions(n))},l}(v)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/create"),g=T(L);function T(P){return P&&P.__esModule?P:{default:P}}(function(){var P,p,v=function(d,l){for(var n in l)S.call(l,n)&&(d[n]=l[n]);function c(){this.constructor=d}return c.prototype=l.prototype,d.prototype=new c,d.__super__=l.prototype,d},S={}.hasOwnProperty;p=j("./XMLNode"),Y.exports=P=function(b){v(d,b);function d(l){d.__super__.constructor.call(this,l),this.value=""}return Object.defineProperty(d.prototype,"data",{get:function(){return this.value},set:function(n){return this.value=n||""}}),Object.defineProperty(d.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(d.prototype,"textContent",{get:function(){return this.value},set:function(n){return this.value=n||""}}),d.prototype.clone=function(){return(0,g.default)(this)},d.prototype.substringData=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.appendData=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.insertData=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.deleteData=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.replaceData=function(l,n,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.isEqualNode=function(l){return d.__super__.isEqualNode.apply(this,arguments).isEqualNode(l)?!(l.data!==this.data):!1},d}(p)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/create"),g=T(L);function T(P){return P&&P.__esModule?P:{default:P}}(function(){var P,p,v,S=function(l,n){for(var c in n)b.call(n,c)&&(l[c]=n[c]);function u(){this.constructor=l}return u.prototype=n.prototype,l.prototype=new u,l.__super__=n.prototype,l},b={}.hasOwnProperty;P=j("./NodeType"),p=j("./XMLCharacterData"),Y.exports=v=function(d){S(l,d);function l(n,c){if(l.__super__.constructor.call(this,n),c==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=P.Comment,this.value=this.stringify.comment(c)}return l.prototype.clone=function(){return(0,g.default)(this)},l.prototype.toString=function(n){return this.options.writer.comment(this,this.options.writer.filterOptions(n))},l}(p)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/keys"),g=p(L),T=j("babel-runtime/core-js/object/create"),P=p(T);function p(v){return v&&v.__esModule?v:{default:v}}(function(){var v,S,b;S=j("./XMLDOMErrorHandler"),b=j("./XMLDOMStringList"),Y.exports=v=function(){function d(){var l;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=l=(0,P.default)(this.defaultParams)}return Object.defineProperty(d.prototype,"parameterNames",{get:function(){return new b((0,g.default)(this.defaultParams))}}),d.prototype.getParameter=function(l){return this.params.hasOwnProperty(l)?this.params[l]:null},d.prototype.canSetParameter=function(l,n){return!0},d.prototype.setParameter=function(l,n){return n!=null?this.params[l]=n:delete this.params[l]},d}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(j,Y,D){"use strict";(function(){var L;Y.exports=L=function(){function g(){}return g.prototype.handleError=function(T){throw new Error(T)},g}()}).call(void 0)},{}],260:[function(j,Y,D){"use strict";(function(){var L;Y.exports=L=function(){function g(){}return g.prototype.hasFeature=function(T,P){return!0},g.prototype.createDocumentType=function(T,P,p){throw new Error("This DOM method is not implemented.")},g.prototype.createDocument=function(T,P,p){throw new Error("This DOM method is not implemented.")},g.prototype.createHTMLDocument=function(T){throw new Error("This DOM method is not implemented.")},g.prototype.getFeature=function(T,P){throw new Error("This DOM method is not implemented.")},g}()}).call(void 0)},{}],261:[function(j,Y,D){"use strict";(function(){var L;Y.exports=L=function(){function g(T){this.arr=T||[]}return Object.defineProperty(g.prototype,"length",{get:function(){return this.arr.length}}),g.prototype.item=function(T){return this.arr[T]||null},g.prototype.contains=function(T){return this.arr.indexOf(T)!==-1},g}()}).call(void 0)},{}],262:[function(j,Y,D){"use strict";(function(){var L,g,T,P=function(S,b){for(var d in b)p.call(b,d)&&(S[d]=b[d]);function l(){this.constructor=S}return l.prototype=b.prototype,S.prototype=new l,S.__super__=b.prototype,S},p={}.hasOwnProperty;T=j("./XMLNode"),L=j("./NodeType"),Y.exports=g=function(v){P(S,v);function S(b,d,l,n,c,u){if(S.__super__.constructor.call(this,b),d==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(l==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(d));if(!n)throw new Error("Missing DTD attribute type. "+this.debugInfo(d));if(!c)throw new Error("Missing DTD attribute default. "+this.debugInfo(d));if(c.indexOf("#")!==0&&(c="#"+c),!c.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(d));if(u&&!c.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(d));this.elementName=this.stringify.name(d),this.type=L.AttributeDeclaration,this.attributeName=this.stringify.name(l),this.attributeType=this.stringify.dtdAttType(n),u&&(this.defaultValue=this.stringify.dtdAttDefault(u)),this.defaultValueType=c}return S.prototype.toString=function(b){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(b))},S}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(j,Y,D){"use strict";(function(){var L,g,T,P=function(S,b){for(var d in b)p.call(b,d)&&(S[d]=b[d]);function l(){this.constructor=S}return l.prototype=b.prototype,S.prototype=new l,S.__super__=b.prototype,S},p={}.hasOwnProperty;T=j("./XMLNode"),L=j("./NodeType"),Y.exports=g=function(v){P(S,v);function S(b,d,l){if(S.__super__.constructor.call(this,b),d==null)throw new Error("Missing DTD element name. "+this.debugInfo());l||(l="(#PCDATA)"),Array.isArray(l)&&(l="("+l.join(",")+")"),this.name=this.stringify.name(d),this.type=L.ElementDeclaration,this.value=this.stringify.dtdElementValue(l)}return S.prototype.toString=function(b){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(b))},S}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(j,Y,D){"use strict";(function(){var L,g,T,P,p=function(b,d){for(var l in d)v.call(d,l)&&(b[l]=d[l]);function n(){this.constructor=b}return n.prototype=d.prototype,b.prototype=new n,b.__super__=d.prototype,b},v={}.hasOwnProperty;P=j("./Utility").isObject,T=j("./XMLNode"),L=j("./NodeType"),Y.exports=g=function(S){p(b,S);function b(d,l,n,c){if(b.__super__.constructor.call(this,d),n==null)throw new Error("Missing DTD entity name. "+this.debugInfo(n));if(c==null)throw new Error("Missing DTD entity value. "+this.debugInfo(n));if(this.pe=!!l,this.name=this.stringify.name(n),this.type=L.EntityDeclaration,!P(c))this.value=this.stringify.dtdEntityValue(c),this.internal=!0;else{if(!c.pubID&&!c.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(n));if(c.pubID&&!c.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(n));if(this.internal=!1,c.pubID!=null&&(this.pubID=this.stringify.dtdPubID(c.pubID)),c.sysID!=null&&(this.sysID=this.stringify.dtdSysID(c.sysID)),c.nData!=null&&(this.nData=this.stringify.dtdNData(c.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(n))}}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(d){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(d))},b}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(j,Y,D){"use strict";(function(){var L,g,T,P=function(S,b){for(var d in b)p.call(b,d)&&(S[d]=b[d]);function l(){this.constructor=S}return l.prototype=b.prototype,S.prototype=new l,S.__super__=b.prototype,S},p={}.hasOwnProperty;T=j("./XMLNode"),L=j("./NodeType"),Y.exports=g=function(v){P(S,v);function S(b,d,l){if(S.__super__.constructor.call(this,b),d==null)throw new Error("Missing DTD notation name. "+this.debugInfo(d));if(!l.pubID&&!l.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(d));this.name=this.stringify.name(d),this.type=L.NotationDeclaration,l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID))}return Object.defineProperty(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}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(j,Y,D){"use strict";(function(){var L,g,T,P,p=function(b,d){for(var l in d)v.call(d,l)&&(b[l]=d[l]);function n(){this.constructor=b}return n.prototype=d.prototype,b.prototype=new n,b.__super__=d.prototype,b},v={}.hasOwnProperty;P=j("./Utility").isObject,T=j("./XMLNode"),L=j("./NodeType"),Y.exports=g=function(S){p(b,S);function b(d,l,n,c){var u;b.__super__.constructor.call(this,d),P(l)&&(u=l,l=u.version,n=u.encoding,c=u.standalone),l||(l="1.0"),this.type=L.Declaration,this.version=this.stringify.xmlVersion(l),n!=null&&(this.encoding=this.stringify.xmlEncoding(n)),c!=null&&(this.standalone=this.stringify.xmlStandalone(c))}return b.prototype.toString=function(d){return this.options.writer.declaration(this,this.options.writer.filterOptions(d))},b}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(j,Y,D){"use strict";(function(){var L,g,T,P,p,v,S,b,d,l=function(u,o){for(var h in o)n.call(o,h)&&(u[h]=o[h]);function m(){this.constructor=u}return m.prototype=o.prototype,u.prototype=new m,u.__super__=o.prototype,u},n={}.hasOwnProperty;d=j("./Utility").isObject,b=j("./XMLNode"),L=j("./NodeType"),g=j("./XMLDTDAttList"),P=j("./XMLDTDEntity"),T=j("./XMLDTDElement"),p=j("./XMLDTDNotation"),S=j("./XMLNamedNodeMap"),Y.exports=v=function(c){l(u,c);function u(o,h,m){var s,r,a,t,w,E;if(u.__super__.constructor.call(this,o),this.type=L.DocType,o.children){for(t=o.children,r=0,a=t.length;r<a;r++)if(s=t[r],s.type===L.Element){this.name=s.name;break}}this.documentObject=o,d(h)&&(w=h,h=w.pubID,m=w.sysID),m==null&&(E=[h,m],m=E[0],h=E[1]),h!=null&&(this.pubID=this.stringify.dtdPubID(h)),m!=null&&(this.sysID=this.stringify.dtdSysID(m))}return Object.defineProperty(u.prototype,"entities",{get:function(){var h,m,s,r,a;for(r={},a=this.children,m=0,s=a.length;m<s;m++)h=a[m],h.type===L.EntityDeclaration&&!h.pe&&(r[h.name]=h);return new S(r)}}),Object.defineProperty(u.prototype,"notations",{get:function(){var h,m,s,r,a;for(r={},a=this.children,m=0,s=a.length;m<s;m++)h=a[m],h.type===L.NotationDeclaration&&(r[h.name]=h);return new S(r)}}),Object.defineProperty(u.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(u.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(u.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),u.prototype.element=function(o,h){var m;return m=new T(this,o,h),this.children.push(m),this},u.prototype.attList=function(o,h,m,s,r){var a;return a=new g(this,o,h,m,s,r),this.children.push(a),this},u.prototype.entity=function(o,h){var m;return m=new P(this,!1,o,h),this.children.push(m),this},u.prototype.pEntity=function(o,h){var m;return m=new P(this,!0,o,h),this.children.push(m),this},u.prototype.notation=function(o,h){var m;return m=new p(this,o,h),this.children.push(m),this},u.prototype.toString=function(o){return this.options.writer.docType(this,this.options.writer.filterOptions(o))},u.prototype.ele=function(o,h){return this.element(o,h)},u.prototype.att=function(o,h,m,s,r){return this.attList(o,h,m,s,r)},u.prototype.ent=function(o,h){return this.entity(o,h)},u.prototype.pent=function(o,h){return this.pEntity(o,h)},u.prototype.not=function(o,h){return this.notation(o,h)},u.prototype.up=function(){return this.root()||this.documentObject},u.prototype.isEqualNode=function(o){return u.__super__.isEqualNode.apply(this,arguments).isEqualNode(o)?o.name!==this.name||o.publicId!==this.publicId?!1:!(o.systemId!==this.systemId):!1},u}(b)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(j,Y,D){"use strict";(function(){var L,g,T,P,p,v,S,b,d=function(c,u){for(var o in u)l.call(u,o)&&(c[o]=u[o]);function h(){this.constructor=c}return h.prototype=u.prototype,c.prototype=new h,c.__super__=u.prototype,c},l={}.hasOwnProperty;b=j("./Utility").isPlainObject,T=j("./XMLDOMImplementation"),g=j("./XMLDOMConfiguration"),p=j("./XMLNode"),L=j("./NodeType"),S=j("./XMLStringifier"),v=j("./XMLStringWriter"),Y.exports=P=function(n){d(c,n);function c(u){c.__super__.constructor.call(this,null),this.name="#document",this.type=L.Document,this.documentURI=null,this.domConfig=new g,u||(u={}),u.writer||(u.writer=new v),this.options=u,this.stringify=new S(u)}return Object.defineProperty(c.prototype,"implementation",{value:new T}),Object.defineProperty(c.prototype,"doctype",{get:function(){var o,h,m,s;for(s=this.children,h=0,m=s.length;h<m;h++)if(o=s[h],o.type===L.DocType)return o;return null}}),Object.defineProperty(c.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(c.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(c.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(c.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===L.Declaration?this.children[0].encoding:null}}),Object.defineProperty(c.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===L.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(c.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===L.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(c.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(c.prototype,"origin",{get:function(){return null}}),Object.defineProperty(c.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(c.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(c.prototype,"contentType",{get:function(){return null}}),c.prototype.end=function(u){var o;return o={},u?b(u)&&(o=u,u=this.options.writer):u=this.options.writer,u.document(this,u.filterOptions(o))},c.prototype.toString=function(u){return this.options.writer.document(this,this.options.writer.filterOptions(u))},c.prototype.createElement=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createTextNode=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createComment=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createCDATASection=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createProcessingInstruction=function(u,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createAttribute=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createEntityReference=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagName=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.importNode=function(u,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createElementNS=function(u,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createAttributeNS=function(u,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagNameNS=function(u,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementById=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.adoptNode=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.renameNode=function(u,o,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByClassName=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createEvent=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createNodeIterator=function(u,o,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createTreeWalker=function(u,o,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},c}(p)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(j,Y,D){"use strict";(function(){var L,g,T,P,p,v,S,b,d,l,n,c,u,o,h,m,s,r,a,t,w,E,f,k,O={}.hasOwnProperty;k=j("./Utility"),E=k.isObject,w=k.isFunction,f=k.isPlainObject,t=k.getValue,L=j("./NodeType"),c=j("./XMLDocument"),o=j("./XMLElement"),P=j("./XMLCData"),p=j("./XMLComment"),m=j("./XMLRaw"),a=j("./XMLText"),h=j("./XMLProcessingInstruction"),l=j("./XMLDeclaration"),n=j("./XMLDocType"),v=j("./XMLDTDAttList"),b=j("./XMLDTDEntity"),S=j("./XMLDTDElement"),d=j("./XMLDTDNotation"),T=j("./XMLAttribute"),r=j("./XMLStringifier"),s=j("./XMLStringWriter"),g=j("./WriterState"),Y.exports=u=function(){function C(x,y,_){var M;this.name="?xml",this.type=L.Document,x||(x={}),M={},x.writer?f(x.writer)&&(M=x.writer,x.writer=new s):x.writer=new s,this.options=x,this.writer=x.writer,this.writerOptions=this.writer.filterOptions(M),this.stringify=new r(x),this.onDataCallback=y||function(){},this.onEndCallback=_||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return C.prototype.createChildNode=function(x){var y,_,M,I,N,G,H,B;switch(x.type){case L.CData:this.cdata(x.value);break;case L.Comment:this.comment(x.value);break;case L.Element:M={},H=x.attribs;for(_ in H){if(!O.call(H,_))continue;y=H[_],M[_]=y.value}this.node(x.name,M);break;case L.Dummy:this.dummy();break;case L.Raw:this.raw(x.value);break;case L.Text:this.text(x.value);break;case L.ProcessingInstruction:this.instruction(x.target,x.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+x.constructor.name)}for(B=x.children,N=0,G=B.length;N<G;N++)I=B[N],this.createChildNode(I),I.type===L.Element&&this.up();return this},C.prototype.dummy=function(){return this},C.prototype.node=function(x,y,_){var M;if(x==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(x));return this.openCurrent(),x=t(x),y==null&&(y={}),y=t(y),E(y)||(M=[y,_],_=M[0],y=M[1]),this.currentNode=new o(this,x,y),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,_!=null&&this.text(_),this},C.prototype.element=function(x,y,_){var M,I,N,G,H,B;if(this.currentNode&&this.currentNode.type===L.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(x)||E(x)||w(x))for(G=this.options.noValidation,this.options.noValidation=!0,B=new c(this.options).element("TEMP_ROOT"),B.element(x),this.options.noValidation=G,H=B.children,I=0,N=H.length;I<N;I++)M=H[I],this.createChildNode(M),M.type===L.Element&&this.up();else this.node(x,y,_);return this},C.prototype.attribute=function(x,y){var _,M;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(x));if(x!=null&&(x=t(x)),E(x))for(_ in x){if(!O.call(x,_))continue;M=x[_],this.attribute(_,M)}else w(y)&&(y=y.apply()),this.options.keepNullAttributes&&y==null?this.currentNode.attribs[x]=new T(this,x,""):y!=null&&(this.currentNode.attribs[x]=new T(this,x,y));return this},C.prototype.text=function(x){var y;return this.openCurrent(),y=new a(this,x),this.onData(this.writer.text(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.cdata=function(x){var y;return this.openCurrent(),y=new P(this,x),this.onData(this.writer.cdata(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.comment=function(x){var y;return this.openCurrent(),y=new p(this,x),this.onData(this.writer.comment(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.raw=function(x){var y;return this.openCurrent(),y=new m(this,x),this.onData(this.writer.raw(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.instruction=function(x,y){var _,M,I,N,G;if(this.openCurrent(),x!=null&&(x=t(x)),y!=null&&(y=t(y)),Array.isArray(x))for(_=0,N=x.length;_<N;_++)M=x[_],this.instruction(M);else if(E(x))for(M in x){if(!O.call(x,M))continue;I=x[M],this.instruction(M,I)}else w(y)&&(y=y.apply()),G=new h(this,x,y),this.onData(this.writer.processingInstruction(G,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},C.prototype.declaration=function(x,y,_){var M;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return M=new l(this,x,y,_),this.onData(this.writer.declaration(M,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.doctype=function(x,y,_){if(this.openCurrent(),x==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new n(this,y,_),this.currentNode.rootNodeName=x,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},C.prototype.dtdElement=function(x,y){var _;return this.openCurrent(),_=new S(this,x,y),this.onData(this.writer.dtdElement(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.attList=function(x,y,_,M,I){var N;return this.openCurrent(),N=new v(this,x,y,_,M,I),this.onData(this.writer.dtdAttList(N,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.entity=function(x,y){var _;return this.openCurrent(),_=new b(this,!1,x,y),this.onData(this.writer.dtdEntity(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.pEntity=function(x,y){var _;return this.openCurrent(),_=new b(this,!0,x,y),this.onData(this.writer.dtdEntity(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.notation=function(x,y){var _;return this.openCurrent(),_=new d(this,x,y),this.onData(this.writer.dtdNotation(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},C.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},C.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},C.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},C.prototype.openNode=function(x){var y,_,M,I;if(!x.isOpen){if(!this.root&&this.currentLevel===0&&x.type===L.Element&&(this.root=x),_="",x.type===L.Element){this.writerOptions.state=g.OpenTag,_=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<"+x.name,I=x.attribs;for(M in I){if(!O.call(I,M))continue;y=I[M],_+=this.writer.attribute(y,this.writerOptions,this.currentLevel)}_+=(x.children?">":"/>")+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=g.InsideTag}else this.writerOptions.state=g.OpenTag,_=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+x.rootNodeName,x.pubID&&x.sysID?_+=' PUBLIC "'+x.pubID+'" "'+x.sysID+'"':x.sysID&&(_+=' SYSTEM "'+x.sysID+'"'),x.children?(_+=" [",this.writerOptions.state=g.InsideTag):(this.writerOptions.state=g.CloseTag,_+=">"),_+=this.writer.endline(x,this.writerOptions,this.currentLevel);return this.onData(_,this.currentLevel),x.isOpen=!0}},C.prototype.closeNode=function(x){var y;if(!x.isClosed)return y="",this.writerOptions.state=g.CloseTag,x.type===L.Element?y=this.writer.indent(x,this.writerOptions,this.currentLevel)+"</"+x.name+">"+this.writer.endline(x,this.writerOptions,this.currentLevel):y=this.writer.indent(x,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=g.None,this.onData(y,this.currentLevel),x.isClosed=!0},C.prototype.onData=function(x,y){return this.documentStarted=!0,this.onDataCallback(x,y+1)},C.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},C.prototype.debugInfo=function(x){return x==null?"":"node: <"+x+">"},C.prototype.ele=function(){return this.element.apply(this,arguments)},C.prototype.nod=function(x,y,_){return this.node(x,y,_)},C.prototype.txt=function(x){return this.text(x)},C.prototype.dat=function(x){return this.cdata(x)},C.prototype.com=function(x){return this.comment(x)},C.prototype.ins=function(x,y){return this.instruction(x,y)},C.prototype.dec=function(x,y,_){return this.declaration(x,y,_)},C.prototype.dtd=function(x,y,_){return this.doctype(x,y,_)},C.prototype.e=function(x,y,_){return this.element(x,y,_)},C.prototype.n=function(x,y,_){return this.node(x,y,_)},C.prototype.t=function(x){return this.text(x)},C.prototype.d=function(x){return this.cdata(x)},C.prototype.c=function(x){return this.comment(x)},C.prototype.r=function(x){return this.raw(x)},C.prototype.i=function(x,y){return this.instruction(x,y)},C.prototype.att=function(){return this.currentNode&&this.currentNode.type===L.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},C.prototype.a=function(){return this.currentNode&&this.currentNode.type===L.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},C.prototype.ent=function(x,y){return this.entity(x,y)},C.prototype.pent=function(x,y){return this.pEntity(x,y)},C.prototype.not=function(x,y){return this.notation(x,y)},C}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/create"),g=T(L);function T(P){return P&&P.__esModule?P:{default:P}}(function(){var P,p,v,S=function(l,n){for(var c in n)b.call(n,c)&&(l[c]=n[c]);function u(){this.constructor=l}return u.prototype=n.prototype,l.prototype=new u,l.__super__=n.prototype,l},b={}.hasOwnProperty;v=j("./XMLNode"),P=j("./NodeType"),Y.exports=p=function(d){S(l,d);function l(n){l.__super__.constructor.call(this,n),this.type=P.Dummy}return l.prototype.clone=function(){return(0,g.default)(this)},l.prototype.toString=function(n){return""},l}(v)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/create"),g=T(L);function T(P){return P&&P.__esModule?P:{default:P}}(function(){var P,p,v,S,b,d,l,n,c,u=function(m,s){for(var r in s)o.call(s,r)&&(m[r]=s[r]);function a(){this.constructor=m}return a.prototype=s.prototype,m.prototype=new a,m.__super__=s.prototype,m},o={}.hasOwnProperty;c=j("./Utility"),n=c.isObject,l=c.isFunction,d=c.getValue,b=j("./XMLNode"),P=j("./NodeType"),p=j("./XMLAttribute"),S=j("./XMLNamedNodeMap"),Y.exports=v=function(h){u(m,h);function m(s,r,a){var t,w,E,f;if(m.__super__.constructor.call(this,s),r==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(r),this.type=P.Element,this.attribs={},this.schemaTypeInfo=null,a!=null&&this.attribute(a),s.type===P.Document&&(this.isRoot=!0,this.documentObject=s,s.rootObject=this,s.children)){for(f=s.children,w=0,E=f.length;w<E;w++)if(t=f[w],t.type===P.DocType){t.name=this.name;break}}}return Object.defineProperty(m.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(m.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(m.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(m.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(m.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(m.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(m.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(m.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new S(this.attribs)),this.attributeMap}}),m.prototype.clone=function(){var s,r,a,t;a=(0,g.default)(this),a.isRoot&&(a.documentObject=null),a.attribs={},t=this.attribs;for(r in t){if(!o.call(t,r))continue;s=t[r],a.attribs[r]=s.clone()}return a.children=[],this.children.forEach(function(w){var E;return E=w.clone(),E.parent=a,a.children.push(E)}),a},m.prototype.attribute=function(s,r){var a,t;if(s!=null&&(s=d(s)),n(s))for(a in s){if(!o.call(s,a))continue;t=s[a],this.attribute(a,t)}else l(r)&&(r=r.apply()),this.options.keepNullAttributes&&r==null?this.attribs[s]=new p(this,s,""):r!=null&&(this.attribs[s]=new p(this,s,r));return this},m.prototype.removeAttribute=function(s){var r,a,t;if(s==null)throw new Error("Missing attribute name. "+this.debugInfo());if(s=d(s),Array.isArray(s))for(a=0,t=s.length;a<t;a++)r=s[a],delete this.attribs[r];else delete this.attribs[s];return this},m.prototype.toString=function(s){return this.options.writer.element(this,this.options.writer.filterOptions(s))},m.prototype.att=function(s,r){return this.attribute(s,r)},m.prototype.a=function(s,r){return this.attribute(s,r)},m.prototype.getAttribute=function(s){return this.attribs.hasOwnProperty(s)?this.attribs[s].value:null},m.prototype.setAttribute=function(s,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getAttributeNode=function(s){return this.attribs.hasOwnProperty(s)?this.attribs[s]:null},m.prototype.setAttributeNode=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.removeAttributeNode=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagName=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getAttributeNS=function(s,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.setAttributeNS=function(s,r,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.removeAttributeNS=function(s,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getAttributeNodeNS=function(s,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.setAttributeNodeNS=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagNameNS=function(s,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.hasAttribute=function(s){return this.attribs.hasOwnProperty(s)},m.prototype.hasAttributeNS=function(s,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.setIdAttribute=function(s,r){return this.attribs.hasOwnProperty(s)?this.attribs[s].isId:r},m.prototype.setIdAttributeNS=function(s,r,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.setIdAttributeNode=function(s,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagName=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagNameNS=function(s,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByClassName=function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.isEqualNode=function(s){var r,a,t;if(!m.__super__.isEqualNode.apply(this,arguments).isEqualNode(s))return!1;if(s.namespaceURI!==this.namespaceURI)return!1;if(s.prefix!==this.prefix)return!1;if(s.localName!==this.localName)return!1;if(s.attribs.length!==this.attribs.length)return!1;for(r=a=0,t=this.attribs.length-1;0<=t?a<=t:a>=t;r=0<=t?++a:--a)if(!this.attribs[r].isEqualNode(s.attribs[r]))return!1;return!0},m}(b)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/keys"),g=T(L);function T(P){return P&&P.__esModule?P:{default:P}}(function(){var P;Y.exports=P=function(){function p(v){this.nodes=v}return Object.defineProperty(p.prototype,"length",{get:function(){return(0,g.default)(this.nodes).length||0}}),p.prototype.clone=function(){return this.nodes=null},p.prototype.getNamedItem=function(v){return this.nodes[v]},p.prototype.setNamedItem=function(v){var S;return S=this.nodes[v.nodeName],this.nodes[v.nodeName]=v,S||null},p.prototype.removeNamedItem=function(v){var S;return S=this.nodes[v],delete this.nodes[v],S||null},p.prototype.item=function(v){return this.nodes[(0,g.default)(this.nodes)[v]]||null},p.prototype.getNamedItemNS=function(v,S){throw new Error("This DOM method is not implemented.")},p.prototype.setNamedItemNS=function(v){throw new Error("This DOM method is not implemented.")},p.prototype.removeNamedItemNS=function(v,S){throw new Error("This DOM method is not implemented.")},p}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(j,Y,D){"use strict";(function(){var L,g,T,P,p,v,S,b,d,l,n,c,u,o,h,m,s,r,a,t={}.hasOwnProperty;a=j("./Utility"),r=a.isObject,s=a.isFunction,m=a.isEmpty,h=a.getValue,b=null,T=null,P=null,p=null,v=null,u=null,o=null,c=null,S=null,g=null,n=null,d=null,L=null,Y.exports=l=function(){function w(E){this.parent=E,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,b||(b=j("./XMLElement"),T=j("./XMLCData"),P=j("./XMLComment"),p=j("./XMLDeclaration"),v=j("./XMLDocType"),u=j("./XMLRaw"),o=j("./XMLText"),c=j("./XMLProcessingInstruction"),S=j("./XMLDummy"),g=j("./NodeType"),n=j("./XMLNodeList"),d=j("./XMLNamedNodeMap"),L=j("./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 n(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 f;return f=this.parent.children.indexOf(this),this.parent.children[f-1]||null}}),Object.defineProperty(w.prototype,"nextSibling",{get:function(){var f;return f=this.parent.children.indexOf(this),this.parent.children[f+1]||null}}),Object.defineProperty(w.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(w.prototype,"textContent",{get:function(){var f,k,O,C,x;if(this.nodeType===g.Element||this.nodeType===g.DocumentFragment){for(x="",C=this.children,k=0,O=C.length;k<O;k++)f=C[k],f.textContent&&(x+=f.textContent);return x}else return null},set:function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),w.prototype.setParent=function(E){var f,k,O,C,x;for(this.parent=E,E&&(this.options=E.options,this.stringify=E.stringify),C=this.children,x=[],k=0,O=C.length;k<O;k++)f=C[k],x.push(f.setParent(this));return x},w.prototype.element=function(E,f,k){var O,C,x,y,_,M,I,N,G,H,B;if(M=null,f===null&&k==null&&(G=[{},null],f=G[0],k=G[1]),f==null&&(f={}),f=h(f),r(f)||(H=[f,k],k=H[0],f=H[1]),E!=null&&(E=h(E)),Array.isArray(E))for(x=0,I=E.length;x<I;x++)C=E[x],M=this.element(C);else if(s(E))M=this.element(E.apply());else if(r(E))for(_ in E){if(!t.call(E,_))continue;if(B=E[_],s(B)&&(B=B.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&_.indexOf(this.stringify.convertAttKey)===0)M=this.attribute(_.substr(this.stringify.convertAttKey.length),B);else if(!this.options.separateArrayItems&&Array.isArray(B)&&m(B))M=this.dummy();else if(r(B)&&m(B))M=this.element(_);else if(!this.options.keepNullNodes&&B==null)M=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(B))for(y=0,N=B.length;y<N;y++)C=B[y],O={},O[_]=C,M=this.element(O);else r(B)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&_.indexOf(this.stringify.convertTextKey)===0?M=this.element(B):(M=this.element(_),M.element(B)):M=this.element(_,B)}else!this.options.keepNullNodes&&k===null?M=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&E.indexOf(this.stringify.convertTextKey)===0?M=this.text(k):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&E.indexOf(this.stringify.convertCDataKey)===0?M=this.cdata(k):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&E.indexOf(this.stringify.convertCommentKey)===0?M=this.comment(k):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&E.indexOf(this.stringify.convertRawKey)===0?M=this.raw(k):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&E.indexOf(this.stringify.convertPIKey)===0?M=this.instruction(E.substr(this.stringify.convertPIKey.length),k):M=this.node(E,f,k);if(M==null)throw new Error("Could not create any elements with: "+E+". "+this.debugInfo());return M},w.prototype.insertBefore=function(E,f,k){var O,C,x,y,_;if(E!=null?E.type:void 0)return x=E,y=f,x.setParent(this),y?(C=children.indexOf(y),_=children.splice(C),children.push(x),Array.prototype.push.apply(children,_)):children.push(x),x;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(E));return C=this.parent.children.indexOf(this),_=this.parent.children.splice(C),O=this.parent.element(E,f,k),Array.prototype.push.apply(this.parent.children,_),O},w.prototype.insertAfter=function(E,f,k){var O,C,x;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(E));return C=this.parent.children.indexOf(this),x=this.parent.children.splice(C+1),O=this.parent.element(E,f,k),Array.prototype.push.apply(this.parent.children,x),O},w.prototype.remove=function(){var E,f;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return E=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[E,E-E+1].concat(f=[])),this.parent},w.prototype.node=function(E,f,k){var O,C;return E!=null&&(E=h(E)),f||(f={}),f=h(f),r(f)||(C=[f,k],k=C[0],f=C[1]),O=new b(this,E,f),k!=null&&O.text(k),this.children.push(O),O},w.prototype.text=function(E){var f;return r(E)&&this.element(E),f=new o(this,E),this.children.push(f),this},w.prototype.cdata=function(E){var f;return f=new T(this,E),this.children.push(f),this},w.prototype.comment=function(E){var f;return f=new P(this,E),this.children.push(f),this},w.prototype.commentBefore=function(E){var f,k,O;return k=this.parent.children.indexOf(this),O=this.parent.children.splice(k),f=this.parent.comment(E),Array.prototype.push.apply(this.parent.children,O),this},w.prototype.commentAfter=function(E){var f,k,O;return k=this.parent.children.indexOf(this),O=this.parent.children.splice(k+1),f=this.parent.comment(E),Array.prototype.push.apply(this.parent.children,O),this},w.prototype.raw=function(E){var f;return f=new u(this,E),this.children.push(f),this},w.prototype.dummy=function(){var E;return E=new S(this),E},w.prototype.instruction=function(E,f){var k,O,C,x,y;if(E!=null&&(E=h(E)),f!=null&&(f=h(f)),Array.isArray(E))for(x=0,y=E.length;x<y;x++)k=E[x],this.instruction(k);else if(r(E))for(k in E){if(!t.call(E,k))continue;O=E[k],this.instruction(k,O)}else s(f)&&(f=f.apply()),C=new c(this,E,f),this.children.push(C);return this},w.prototype.instructionBefore=function(E,f){var k,O,C;return O=this.parent.children.indexOf(this),C=this.parent.children.splice(O),k=this.parent.instruction(E,f),Array.prototype.push.apply(this.parent.children,C),this},w.prototype.instructionAfter=function(E,f){var k,O,C;return O=this.parent.children.indexOf(this),C=this.parent.children.splice(O+1),k=this.parent.instruction(E,f),Array.prototype.push.apply(this.parent.children,C),this},w.prototype.declaration=function(E,f,k){var O,C;return O=this.document(),C=new p(O,E,f,k),O.children.length===0?O.children.unshift(C):O.children[0].type===g.Declaration?O.children[0]=C:O.children.unshift(C),O.root()||O},w.prototype.dtd=function(E,f){var k,O,C,x,y,_,M,I,N,G;for(O=this.document(),C=new v(O,E,f),N=O.children,x=y=0,M=N.length;y<M;x=++y)if(k=N[x],k.type===g.DocType)return O.children[x]=C,C;for(G=O.children,x=_=0,I=G.length;_<I;x=++_)if(k=G[x],k.isRoot)return O.children.splice(x,0,C),C;return O.children.push(C),C},w.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},w.prototype.root=function(){var E;for(E=this;E;){if(E.type===g.Document)return E.rootObject;if(E.isRoot)return E;E=E.parent}},w.prototype.document=function(){var E;for(E=this;E;){if(E.type===g.Document)return E;E=E.parent}},w.prototype.end=function(E){return this.document().end(E)},w.prototype.prev=function(){var E;if(E=this.parent.children.indexOf(this),E<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[E-1]},w.prototype.next=function(){var E;if(E=this.parent.children.indexOf(this),E===-1||E===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[E+1]},w.prototype.importDocument=function(E){var f;return f=E.root().clone(),f.parent=this,f.isRoot=!1,this.children.push(f),this},w.prototype.debugInfo=function(E){var f,k;return E=E||this.name,E==null&&!((f=this.parent)!=null?f.name:void 0)?"":E==null?"parent: <"+this.parent.name+">":((k=this.parent)!=null?k.name:void 0)?"node: <"+E+">, parent: <"+this.parent.name+">":"node: <"+E+">"},w.prototype.ele=function(E,f,k){return this.element(E,f,k)},w.prototype.nod=function(E,f,k){return this.node(E,f,k)},w.prototype.txt=function(E){return this.text(E)},w.prototype.dat=function(E){return this.cdata(E)},w.prototype.com=function(E){return this.comment(E)},w.prototype.ins=function(E,f){return this.instruction(E,f)},w.prototype.doc=function(){return this.document()},w.prototype.dec=function(E,f,k){return this.declaration(E,f,k)},w.prototype.e=function(E,f,k){return this.element(E,f,k)},w.prototype.n=function(E,f,k){return this.node(E,f,k)},w.prototype.t=function(E){return this.text(E)},w.prototype.d=function(E){return this.cdata(E)},w.prototype.c=function(E){return this.comment(E)},w.prototype.r=function(E){return this.raw(E)},w.prototype.i=function(E,f){return this.instruction(E,f)},w.prototype.u=function(){return this.up()},w.prototype.importXMLBuilder=function(E){return this.importDocument(E)},w.prototype.replaceChild=function(E,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.removeChild=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.appendChild=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.hasChildNodes=function(){return this.children.length!==0},w.prototype.cloneNode=function(E){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(E,f){return!0},w.prototype.hasAttributes=function(){return this.attribs.length!==0},w.prototype.compareDocumentPosition=function(E){var f,k;return f=this,f===E?0:this.document()!==E.document()?(k=L.Disconnected|L.ImplementationSpecific,Math.random()<.5?k|=L.Preceding:k|=L.Following,k):f.isAncestor(E)?L.Contains|L.Preceding:f.isDescendant(E)?L.Contains|L.Following:f.isPreceding(E)?L.Preceding:L.Following},w.prototype.isSameNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.lookupPrefix=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isDefaultNamespace=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.lookupNamespaceURI=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isEqualNode=function(E){var f,k,O;if(E.nodeType!==this.nodeType)return!1;if(E.children.length!==this.children.length)return!1;for(f=k=0,O=this.children.length-1;0<=O?k<=O:k>=O;f=0<=O?++k:--k)if(!this.children[f].isEqualNode(E.children[f]))return!1;return!0},w.prototype.getFeature=function(E,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.setUserData=function(E,f,k){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.getUserData=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.contains=function(E){return E?E===this||this.isDescendant(E):!1},w.prototype.isDescendant=function(E){var f,k,O,C,x;for(x=this.children,O=0,C=x.length;O<C;O++){if(f=x[O],E===f)return!0;if(k=f.isDescendant(E),k)return!0}return!1},w.prototype.isAncestor=function(E){return E.isDescendant(this)},w.prototype.isPreceding=function(E){var f,k;return f=this.treePosition(E),k=this.treePosition(this),f===-1||k===-1?!1:f<k},w.prototype.isFollowing=function(E){var f,k;return f=this.treePosition(E),k=this.treePosition(this),f===-1||k===-1?!1:f>k},w.prototype.treePosition=function(E){var f,k;return k=0,f=!1,this.foreachTreeNode(this.document(),function(O){if(k++,!f&&O===E)return f=!0}),f?k:-1},w.prototype.foreachTreeNode=function(E,f){var k,O,C,x,y;for(E||(E=this.document()),x=E.children,O=0,C=x.length;O<C;O++){if(k=x[O],y=f(k))return y;if(y=this.foreachTreeNode(k,f),y)return y}},w}()}).call(void 0)},{"./DocumentPosition":250,"./NodeType":251,"./Utility":252,"./XMLCData":255,"./XMLComment":257,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLNamedNodeMap":272,"./XMLNodeList":274,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],274:[function(j,Y,D){"use strict";(function(){var L;Y.exports=L=function(){function g(T){this.nodes=T}return Object.defineProperty(g.prototype,"length",{get:function(){return this.nodes.length||0}}),g.prototype.clone=function(){return this.nodes=null},g.prototype.item=function(T){return this.nodes[T]||null},g}()}).call(void 0)},{}],275:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/create"),g=T(L);function T(P){return P&&P.__esModule?P:{default:P}}(function(){var P,p,v,S=function(l,n){for(var c in n)b.call(n,c)&&(l[c]=n[c]);function u(){this.constructor=l}return u.prototype=n.prototype,l.prototype=new u,l.__super__=n.prototype,l},b={}.hasOwnProperty;P=j("./NodeType"),p=j("./XMLCharacterData"),Y.exports=v=function(d){S(l,d);function l(n,c,u){if(l.__super__.constructor.call(this,n),c==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=P.ProcessingInstruction,this.target=this.stringify.insTarget(c),this.name=this.target,u&&(this.value=this.stringify.insValue(u))}return l.prototype.clone=function(){return(0,g.default)(this)},l.prototype.toString=function(n){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(n))},l.prototype.isEqualNode=function(n){return l.__super__.isEqualNode.apply(this,arguments).isEqualNode(n)?!(n.target!==this.target):!1},l}(p)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/create"),g=T(L);function T(P){return P&&P.__esModule?P:{default:P}}(function(){var P,p,v,S=function(l,n){for(var c in n)b.call(n,c)&&(l[c]=n[c]);function u(){this.constructor=l}return u.prototype=n.prototype,l.prototype=new u,l.__super__=n.prototype,l},b={}.hasOwnProperty;P=j("./NodeType"),p=j("./XMLNode"),Y.exports=v=function(d){S(l,d);function l(n,c){if(l.__super__.constructor.call(this,n),c==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=P.Raw,this.value=this.stringify.raw(c)}return l.prototype.clone=function(){return(0,g.default)(this)},l.prototype.toString=function(n){return this.options.writer.raw(this,this.options.writer.filterOptions(n))},l}(p)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(j,Y,D){"use strict";(function(){var L,g,T,P,p=function(b,d){for(var l in d)v.call(d,l)&&(b[l]=d[l]);function n(){this.constructor=b}return n.prototype=d.prototype,b.prototype=new n,b.__super__=d.prototype,b},v={}.hasOwnProperty;L=j("./NodeType"),P=j("./XMLWriterBase"),g=j("./WriterState"),Y.exports=T=function(S){p(b,S);function b(d,l){this.stream=d,b.__super__.constructor.call(this,l)}return b.prototype.endline=function(d,l,n){return d.isLastRootNode&&l.state===g.CloseTag?"":b.__super__.endline.call(this,d,l,n)},b.prototype.document=function(d,l){var n,c,u,o,h,m,s,r,a;for(s=d.children,c=u=0,h=s.length;u<h;c=++u)n=s[c],n.isLastRootNode=c===d.children.length-1;for(l=this.filterOptions(l),r=d.children,a=[],o=0,m=r.length;o<m;o++)n=r[o],a.push(this.writeChildNode(n,l,0));return a},b.prototype.attribute=function(d,l,n){return this.stream.write(b.__super__.attribute.call(this,d,l,n))},b.prototype.cdata=function(d,l,n){return this.stream.write(b.__super__.cdata.call(this,d,l,n))},b.prototype.comment=function(d,l,n){return this.stream.write(b.__super__.comment.call(this,d,l,n))},b.prototype.declaration=function(d,l,n){return this.stream.write(b.__super__.declaration.call(this,d,l,n))},b.prototype.docType=function(d,l,n){var c,u,o,h;if(n||(n=0),this.openNode(d,l,n),l.state=g.OpenTag,this.stream.write(this.indent(d,l,n)),this.stream.write("<!DOCTYPE "+d.root().name),d.pubID&&d.sysID?this.stream.write(' PUBLIC "'+d.pubID+'" "'+d.sysID+'"'):d.sysID&&this.stream.write(' SYSTEM "'+d.sysID+'"'),d.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(d,l,n)),l.state=g.InsideTag,h=d.children,u=0,o=h.length;u<o;u++)c=h[u],this.writeChildNode(c,l,n+1);l.state=g.CloseTag,this.stream.write("]")}return l.state=g.CloseTag,this.stream.write(l.spaceBeforeSlash+">"),this.stream.write(this.endline(d,l,n)),l.state=g.None,this.closeNode(d,l,n)},b.prototype.element=function(d,l,n){var c,u,o,h,m,s,r,a,t,w;n||(n=0),this.openNode(d,l,n),l.state=g.OpenTag,this.stream.write(this.indent(d,l,n)+"<"+d.name),t=d.attribs;for(r in t){if(!v.call(t,r))continue;c=t[r],this.attribute(c,l,n)}if(o=d.children.length,h=o===0?null:d.children[0],o===0||d.children.every(function(E){return(E.type===L.Text||E.type===L.Raw)&&E.value===""}))l.allowEmpty?(this.stream.write(">"),l.state=g.CloseTag,this.stream.write("</"+d.name+">")):(l.state=g.CloseTag,this.stream.write(l.spaceBeforeSlash+"/>"));else if(l.pretty&&o===1&&(h.type===L.Text||h.type===L.Raw)&&h.value!=null)this.stream.write(">"),l.state=g.InsideTag,l.suppressPrettyCount++,a=!0,this.writeChildNode(h,l,n+1),l.suppressPrettyCount--,a=!1,l.state=g.CloseTag,this.stream.write("</"+d.name+">");else{for(this.stream.write(">"+this.endline(d,l,n)),l.state=g.InsideTag,w=d.children,m=0,s=w.length;m<s;m++)u=w[m],this.writeChildNode(u,l,n+1);l.state=g.CloseTag,this.stream.write(this.indent(d,l,n)+"</"+d.name+">")}return this.stream.write(this.endline(d,l,n)),l.state=g.None,this.closeNode(d,l,n)},b.prototype.processingInstruction=function(d,l,n){return this.stream.write(b.__super__.processingInstruction.call(this,d,l,n))},b.prototype.raw=function(d,l,n){return this.stream.write(b.__super__.raw.call(this,d,l,n))},b.prototype.text=function(d,l,n){return this.stream.write(b.__super__.text.call(this,d,l,n))},b.prototype.dtdAttList=function(d,l,n){return this.stream.write(b.__super__.dtdAttList.call(this,d,l,n))},b.prototype.dtdElement=function(d,l,n){return this.stream.write(b.__super__.dtdElement.call(this,d,l,n))},b.prototype.dtdEntity=function(d,l,n){return this.stream.write(b.__super__.dtdEntity.call(this,d,l,n))},b.prototype.dtdNotation=function(d,l,n){return this.stream.write(b.__super__.dtdNotation.call(this,d,l,n))},b}(P)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(j,Y,D){"use strict";(function(){var L,g,T=function(v,S){for(var b in S)P.call(S,b)&&(v[b]=S[b]);function d(){this.constructor=v}return d.prototype=S.prototype,v.prototype=new d,v.__super__=S.prototype,v},P={}.hasOwnProperty;g=j("./XMLWriterBase"),Y.exports=L=function(p){T(v,p);function v(S){v.__super__.constructor.call(this,S)}return v.prototype.document=function(S,b){var d,l,n,c,u;for(b=this.filterOptions(b),c="",u=S.children,l=0,n=u.length;l<n;l++)d=u[l],c+=this.writeChildNode(d,b,0);return b.pretty&&c.slice(-b.newline.length)===b.newline&&(c=c.slice(0,-b.newline.length)),c},v}(g)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(j,Y,D){"use strict";(function(){var L,g=function(p,v){return function(){return p.apply(v,arguments)}},T={}.hasOwnProperty;Y.exports=L=function(){function P(p){this.assertLegalName=g(this.assertLegalName,this),this.assertLegalChar=g(this.assertLegalChar,this);var v,S,b;p||(p={}),this.options=p,this.options.version||(this.options.version="1.0"),S=p.stringify||{};for(v in S){if(!T.call(S,v))continue;b=S[v],this[v]=b}}return P.prototype.name=function(p){return this.options.noValidation?p:this.assertLegalName(""+p||"")},P.prototype.text=function(p){return this.options.noValidation?p:this.assertLegalChar(this.textEscape(""+p||""))},P.prototype.cdata=function(p){return this.options.noValidation?p:(p=""+p||"",p=p.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(p))},P.prototype.comment=function(p){if(this.options.noValidation)return p;if(p=""+p||"",p.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+p);return this.assertLegalChar(p)},P.prototype.raw=function(p){return this.options.noValidation?p:""+p||""},P.prototype.attValue=function(p){return this.options.noValidation?p:this.assertLegalChar(this.attEscape(p=""+p||""))},P.prototype.insTarget=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},P.prototype.insValue=function(p){if(this.options.noValidation)return p;if(p=""+p||"",p.match(/\?>/))throw new Error("Invalid processing instruction value: "+p);return this.assertLegalChar(p)},P.prototype.xmlVersion=function(p){if(this.options.noValidation)return p;if(p=""+p||"",!p.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+p);return p},P.prototype.xmlEncoding=function(p){if(this.options.noValidation)return p;if(p=""+p||"",!p.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+p);return this.assertLegalChar(p)},P.prototype.xmlStandalone=function(p){return this.options.noValidation?p:p?"yes":"no"},P.prototype.dtdPubID=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},P.prototype.dtdSysID=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},P.prototype.dtdElementValue=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},P.prototype.dtdAttType=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},P.prototype.dtdAttDefault=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},P.prototype.dtdEntityValue=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},P.prototype.dtdNData=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},P.prototype.convertAttKey="@",P.prototype.convertPIKey="?",P.prototype.convertTextKey="#text",P.prototype.convertCDataKey="#cdata",P.prototype.convertCommentKey="#comment",P.prototype.convertRawKey="#raw",P.prototype.assertLegalChar=function(p){var v,S;if(this.options.noValidation)return p;if(v="",this.options.version==="1.0"){if(v=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=p.match(v))throw new Error("Invalid character in string: "+p+" at index "+S.index)}else if(this.options.version==="1.1"&&(v=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=p.match(v)))throw new Error("Invalid character in string: "+p+" at index "+S.index);return p},P.prototype.assertLegalName=function(p){var v;if(this.options.noValidation)return p;if(this.assertLegalChar(p),v=/^([: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])*$/,!p.match(v))throw new Error("Invalid character in name");return p},P.prototype.textEscape=function(p){var v;return this.options.noValidation?p:(v=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(v,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},P.prototype.attEscape=function(p){var v;return this.options.noValidation?p:(v=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(v,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},P}()}).call(void 0)},{}],280:[function(j,Y,D){"use strict";var L=j("babel-runtime/core-js/object/create"),g=T(L);function T(P){return P&&P.__esModule?P:{default:P}}(function(){var P,p,v,S=function(l,n){for(var c in n)b.call(n,c)&&(l[c]=n[c]);function u(){this.constructor=l}return u.prototype=n.prototype,l.prototype=new u,l.__super__=n.prototype,l},b={}.hasOwnProperty;P=j("./NodeType"),p=j("./XMLCharacterData"),Y.exports=v=function(d){S(l,d);function l(n,c){if(l.__super__.constructor.call(this,n),c==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=P.Text,this.value=this.stringify.text(c)}return Object.defineProperty(l.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(l.prototype,"wholeText",{get:function(){var c,u,o;for(o="",u=this.previousSibling;u;)o=u.data+o,u=u.previousSibling;for(o+=this.data,c=this.nextSibling;c;)o=o+c.data,c=c.nextSibling;return o}}),l.prototype.clone=function(){return(0,g.default)(this)},l.prototype.toString=function(n){return this.options.writer.text(this,this.options.writer.filterOptions(n))},l.prototype.splitText=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.replaceWholeText=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},l}(p)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(j,Y,D){"use strict";(function(){var L,g,T,P,p,v,S,b,d,l,n,c,u,o,h,m,s,r={}.hasOwnProperty;s=j("./Utility").assign,L=j("./NodeType"),d=j("./XMLDeclaration"),l=j("./XMLDocType"),T=j("./XMLCData"),P=j("./XMLComment"),c=j("./XMLElement"),o=j("./XMLRaw"),h=j("./XMLText"),u=j("./XMLProcessingInstruction"),n=j("./XMLDummy"),p=j("./XMLDTDAttList"),v=j("./XMLDTDElement"),S=j("./XMLDTDEntity"),b=j("./XMLDTDNotation"),g=j("./WriterState"),Y.exports=m=function(){function a(t){var w,E,f;t||(t={}),this.options=t,E=t.writer||{};for(w in E){if(!r.call(E,w))continue;f=E[w],this["_"+w]=this[w],this[w]=f}}return a.prototype.filterOptions=function(t){var w,E,f,k,O,C,x,y;return t||(t={}),t=s({},this.options,t),w={writer:this},w.pretty=t.pretty||!1,w.allowEmpty=t.allowEmpty||!1,w.indent=(E=t.indent)!=null?E:" ",w.newline=(f=t.newline)!=null?f:`
|
|
|
`,w.offset=(k=t.offset)!=null?k:0,w.dontPrettyTextNodes=(O=(C=t.dontPrettyTextNodes)!=null?C:t.dontprettytextnodes)!=null?O:0,w.spaceBeforeSlash=(x=(y=t.spaceBeforeSlash)!=null?y:t.spacebeforeslash)!=null?x:"",w.spaceBeforeSlash===!0&&(w.spaceBeforeSlash=" "),w.suppressPrettyCount=0,w.user={},w.state=g.None,w},a.prototype.indent=function(t,w,E){var f;return!w.pretty||w.suppressPrettyCount?"":w.pretty&&(f=(E||0)+w.offset+1,f>0)?new Array(f).join(w.indent):""},a.prototype.endline=function(t,w,E){return!w.pretty||w.suppressPrettyCount?"":w.newline},a.prototype.attribute=function(t,w,E){var f;return this.openAttribute(t,w,E),f=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,w,E),f},a.prototype.cdata=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E)+"<![CDATA[",w.state=g.InsideTag,f+=t.value,w.state=g.CloseTag,f+="]]>"+this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.comment=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E)+"<!-- ",w.state=g.InsideTag,f+=t.value,w.state=g.CloseTag,f+=" -->"+this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.declaration=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E)+"<?xml",w.state=g.InsideTag,f+=' version="'+t.version+'"',t.encoding!=null&&(f+=' encoding="'+t.encoding+'"'),t.standalone!=null&&(f+=' standalone="'+t.standalone+'"'),w.state=g.CloseTag,f+=w.spaceBeforeSlash+"?>",f+=this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.docType=function(t,w,E){var f,k,O,C,x;if(E||(E=0),this.openNode(t,w,E),w.state=g.OpenTag,C=this.indent(t,w,E),C+="<!DOCTYPE "+t.root().name,t.pubID&&t.sysID?C+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(C+=' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(C+=" [",C+=this.endline(t,w,E),w.state=g.InsideTag,x=t.children,k=0,O=x.length;k<O;k++)f=x[k],C+=this.writeChildNode(f,w,E+1);w.state=g.CloseTag,C+="]"}return w.state=g.CloseTag,C+=w.spaceBeforeSlash+">",C+=this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),C},a.prototype.element=function(t,w,E){var f,k,O,C,x,y,_,M,I,N,G,H,B,K;E||(E=0),N=!1,G="",this.openNode(t,w,E),w.state=g.OpenTag,G+=this.indent(t,w,E)+"<"+t.name,H=t.attribs;for(I in H){if(!r.call(H,I))continue;f=H[I],G+=this.attribute(f,w,E)}if(O=t.children.length,C=O===0?null:t.children[0],O===0||t.children.every(function(U){return(U.type===L.Text||U.type===L.Raw)&&U.value===""}))w.allowEmpty?(G+=">",w.state=g.CloseTag,G+="</"+t.name+">"+this.endline(t,w,E)):(w.state=g.CloseTag,G+=w.spaceBeforeSlash+"/>"+this.endline(t,w,E));else if(w.pretty&&O===1&&(C.type===L.Text||C.type===L.Raw)&&C.value!=null)G+=">",w.state=g.InsideTag,w.suppressPrettyCount++,N=!0,G+=this.writeChildNode(C,w,E+1),w.suppressPrettyCount--,N=!1,w.state=g.CloseTag,G+="</"+t.name+">"+this.endline(t,w,E);else{if(w.dontPrettyTextNodes){for(B=t.children,x=0,_=B.length;x<_;x++)if(k=B[x],(k.type===L.Text||k.type===L.Raw)&&k.value!=null){w.suppressPrettyCount++,N=!0;break}}for(G+=">"+this.endline(t,w,E),w.state=g.InsideTag,K=t.children,y=0,M=K.length;y<M;y++)k=K[y],G+=this.writeChildNode(k,w,E+1);w.state=g.CloseTag,G+=this.indent(t,w,E)+"</"+t.name+">",N&&w.suppressPrettyCount--,G+=this.endline(t,w,E),w.state=g.None}return this.closeNode(t,w,E),G},a.prototype.writeChildNode=function(t,w,E){switch(t.type){case L.CData:return this.cdata(t,w,E);case L.Comment:return this.comment(t,w,E);case L.Element:return this.element(t,w,E);case L.Raw:return this.raw(t,w,E);case L.Text:return this.text(t,w,E);case L.ProcessingInstruction:return this.processingInstruction(t,w,E);case L.Dummy:return"";case L.Declaration:return this.declaration(t,w,E);case L.DocType:return this.docType(t,w,E);case L.AttributeDeclaration:return this.dtdAttList(t,w,E);case L.ElementDeclaration:return this.dtdElement(t,w,E);case L.EntityDeclaration:return this.dtdEntity(t,w,E);case L.NotationDeclaration:return this.dtdNotation(t,w,E);default:throw new Error("Unknown XML node type: "+t.constructor.name)}},a.prototype.processingInstruction=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E)+"<?",w.state=g.InsideTag,f+=t.target,t.value&&(f+=" "+t.value),w.state=g.CloseTag,f+=w.spaceBeforeSlash+"?>",f+=this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.raw=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E),w.state=g.InsideTag,f+=t.value,w.state=g.CloseTag,f+=this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.text=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E),w.state=g.InsideTag,f+=t.value,w.state=g.CloseTag,f+=this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.dtdAttList=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E)+"<!ATTLIST",w.state=g.InsideTag,f+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType,t.defaultValueType!=="#DEFAULT"&&(f+=" "+t.defaultValueType),t.defaultValue&&(f+=' "'+t.defaultValue+'"'),w.state=g.CloseTag,f+=w.spaceBeforeSlash+">"+this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.dtdElement=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E)+"<!ELEMENT",w.state=g.InsideTag,f+=" "+t.name+" "+t.value,w.state=g.CloseTag,f+=w.spaceBeforeSlash+">"+this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.dtdEntity=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E)+"<!ENTITY",w.state=g.InsideTag,t.pe&&(f+=" %"),f+=" "+t.name,t.value?f+=' "'+t.value+'"':(t.pubID&&t.sysID?f+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(f+=' SYSTEM "'+t.sysID+'"'),t.nData&&(f+=" NDATA "+t.nData)),w.state=g.CloseTag,f+=w.spaceBeforeSlash+">"+this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.dtdNotation=function(t,w,E){var f;return this.openNode(t,w,E),w.state=g.OpenTag,f=this.indent(t,w,E)+"<!NOTATION",w.state=g.InsideTag,f+=" "+t.name,t.pubID&&t.sysID?f+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.pubID?f+=' PUBLIC "'+t.pubID+'"':t.sysID&&(f+=' SYSTEM "'+t.sysID+'"'),w.state=g.CloseTag,f+=w.spaceBeforeSlash+">"+this.endline(t,w,E),w.state=g.None,this.closeNode(t,w,E),f},a.prototype.openNode=function(t,w,E){},a.prototype.closeNode=function(t,w,E){},a.prototype.openAttribute=function(t,w,E){},a.prototype.closeAttribute=function(t,w,E){},a}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],282:[function(j,Y,D){"use strict";(function(){var L,g,T,P,p,v,S,b,d,l;l=j("./Utility"),b=l.assign,d=l.isFunction,T=j("./XMLDOMImplementation"),P=j("./XMLDocument"),p=j("./XMLDocumentCB"),S=j("./XMLStringWriter"),v=j("./XMLStreamWriter"),L=j("./NodeType"),g=j("./WriterState"),Y.exports.create=function(n,c,u,o){var h,m;if(n==null)throw new Error("Root element needs a name.");return o=b({},c,u,o),h=new P(o),m=h.element(n),o.headless||(h.declaration(o),(o.pubID!=null||o.sysID!=null)&&h.dtd(o)),m},Y.exports.begin=function(n,c,u){var o;return d(n)&&(o=[n,c],c=o[0],u=o[1],n={}),c?new p(n,c,u):new P(n)},Y.exports.stringWriter=function(n){return new S(n)},Y.exports.streamWriter=function(n,c){return new v(n,c)},Y.exports.implementation=new T,Y.exports.nodeType=L,Y.exports.writerState=g}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(j,Y,D){Y.exports=g;var L=Object.prototype.hasOwnProperty;function g(){for(var T={},P=0;P<arguments.length;P++){var p=arguments[P];for(var v in p)L.call(p,v)&&(T[v]=p[v])}return T}},{}],284:[function(j,Y,D){"use strict";var L=j("buffer").Buffer,g=j("./sha"),T=j("./md5"),P={sha1:g,md5:T},p=64,v=L.alloc(p);v.fill(0);function S(l,n,c){L.isBuffer(n)||(n=L.from(n)),L.isBuffer(c)||(c=L.from(c)),n.length>p?n=l(n):n.length<p&&(n=L.concat([n,v],p));for(var u=L.alloc(p),o=L.alloc(p),h=0;h<p;h++)u[h]=n[h]^54,o[h]=n[h]^92;var m=l(L.concat([u,c]));return l(L.concat([o,m]))}function b(l,n){l=l||"sha1";var c=P[l],u=[],o=0;return c||d("algorithm:",l,"is not yet supported"),{update:function(m){return L.isBuffer(m)||(m=L.from(m)),u.push(m),o+=m.length,this},digest:function(m){var s=L.concat(u),r=n?S(c,n,s):c(s);return u=null,m?r.toString(m):r}}}function d(){var l=[].slice.call(arguments).join(" ");throw new Error([l,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}D.createHash=function(l){return b(l)},D.createHmac=function(l,n){return b(l,n)},D.createCredentials=function(){d("sorry,createCredentials is not implemented yet")},D.createCipher=function(){d("sorry,createCipher is not implemented yet")},D.createCipheriv=function(){d("sorry,createCipheriv is not implemented yet")},D.createDecipher=function(){d("sorry,createDecipher is not implemented yet")},D.createDecipheriv=function(){d("sorry,createDecipheriv is not implemented yet")},D.createSign=function(){d("sorry,createSign is not implemented yet")},D.createVerify=function(){d("sorry,createVerify is not implemented yet")},D.createDiffieHellman=function(){d("sorry,createDiffieHellman is not implemented yet")},D.pbkdf2=function(){d("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(j,Y,D){"use strict";var L=j("buffer").Buffer,g=4,T=L.alloc(g);T.fill(0);var P=8;function p(b,d){if(b.length%g!==0){var l=b.length+(g-b.length%g);b=L.concat([b,T],l)}for(var n=[],c=d?b.readInt32BE:b.readInt32LE,u=0;u<b.length;u+=g)n.push(c.call(b,u));return n}function v(b,d,l){for(var n=L.alloc(d),c=l?n.writeInt32BE:n.writeInt32LE,u=0;u<b.length;u++)c.call(n,b[u],u*4,!0);return n}function S(b,d,l,n){L.isBuffer(b)||(b=L.from(b));var c=d(p(b,n),b.length*P);return v(c,l,n)}Y.exports={hash:S}},{buffer:73}],286:[function(j,Y,D){"use strict";var L=j("./helpers");function g(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function T(n,c){n[c>>5]|=128<<c%32,n[(c+64>>>9<<4)+14]=c;for(var u=1732584193,o=-271733879,h=-1732584194,m=271733878,s=0;s<n.length;s+=16){var r=u,a=o,t=h,w=m;u=p(u,o,h,m,n[s+0],7,-680876936),m=p(m,u,o,h,n[s+1],12,-389564586),h=p(h,m,u,o,n[s+2],17,606105819),o=p(o,h,m,u,n[s+3],22,-1044525330),u=p(u,o,h,m,n[s+4],7,-176418897),m=p(m,u,o,h,n[s+5],12,1200080426),h=p(h,m,u,o,n[s+6],17,-1473231341),o=p(o,h,m,u,n[s+7],22,-45705983),u=p(u,o,h,m,n[s+8],7,1770035416),m=p(m,u,o,h,n[s+9],12,-1958414417),h=p(h,m,u,o,n[s+10],17,-42063),o=p(o,h,m,u,n[s+11],22,-1990404162),u=p(u,o,h,m,n[s+12],7,1804603682),m=p(m,u,o,h,n[s+13],12,-40341101),h=p(h,m,u,o,n[s+14],17,-1502002290),o=p(o,h,m,u,n[s+15],22,1236535329),u=v(u,o,h,m,n[s+1],5,-165796510),m=v(m,u,o,h,n[s+6],9,-1069501632),h=v(h,m,u,o,n[s+11],14,643717713),o=v(o,h,m,u,n[s+0],20,-373897302),u=v(u,o,h,m,n[s+5],5,-701558691),m=v(m,u,o,h,n[s+10],9,38016083),h=v(h,m,u,o,n[s+15],14,-660478335),o=v(o,h,m,u,n[s+4],20,-405537848),u=v(u,o,h,m,n[s+9],5,568446438),m=v(m,u,o,h,n[s+14],9,-1019803690),h=v(h,m,u,o,n[s+3],14,-187363961),o=v(o,h,m,u,n[s+8],20,1163531501),u=v(u,o,h,m,n[s+13],5,-1444681467),m=v(m,u,o,h,n[s+2],9,-51403784),h=v(h,m,u,o,n[s+7],14,1735328473),o=v(o,h,m,u,n[s+12],20,-1926607734),u=S(u,o,h,m,n[s+5],4,-378558),m=S(m,u,o,h,n[s+8],11,-2022574463),h=S(h,m,u,o,n[s+11],16,1839030562),o=S(o,h,m,u,n[s+14],23,-35309556),u=S(u,o,h,m,n[s+1],4,-1530992060),m=S(m,u,o,h,n[s+4],11,1272893353),h=S(h,m,u,o,n[s+7],16,-155497632),o=S(o,h,m,u,n[s+10],23,-1094730640),u=S(u,o,h,m,n[s+13],4,681279174),m=S(m,u,o,h,n[s+0],11,-358537222),h=S(h,m,u,o,n[s+3],16,-722521979),o=S(o,h,m,u,n[s+6],23,76029189),u=S(u,o,h,m,n[s+9],4,-640364487),m=S(m,u,o,h,n[s+12],11,-421815835),h=S(h,m,u,o,n[s+15],16,530742520),o=S(o,h,m,u,n[s+2],23,-995338651),u=b(u,o,h,m,n[s+0],6,-198630844),m=b(m,u,o,h,n[s+7],10,1126891415),h=b(h,m,u,o,n[s+14],15,-1416354905),o=b(o,h,m,u,n[s+5],21,-57434055),u=b(u,o,h,m,n[s+12],6,1700485571),m=b(m,u,o,h,n[s+3],10,-1894986606),h=b(h,m,u,o,n[s+10],15,-1051523),o=b(o,h,m,u,n[s+1],21,-2054922799),u=b(u,o,h,m,n[s+8],6,1873313359),m=b(m,u,o,h,n[s+15],10,-30611744),h=b(h,m,u,o,n[s+6],15,-1560198380),o=b(o,h,m,u,n[s+13],21,1309151649),u=b(u,o,h,m,n[s+4],6,-145523070),m=b(m,u,o,h,n[s+11],10,-1120210379),h=b(h,m,u,o,n[s+2],15,718787259),o=b(o,h,m,u,n[s+9],21,-343485551),u=d(u,r),o=d(o,a),h=d(h,t),m=d(m,w)}return Array(u,o,h,m)}function P(n,c,u,o,h,m){return d(l(d(d(c,n),d(o,m)),h),u)}function p(n,c,u,o,h,m,s){return P(c&u|~c&o,n,c,h,m,s)}function v(n,c,u,o,h,m,s){return P(c&o|u&~o,n,c,h,m,s)}function S(n,c,u,o,h,m,s){return P(c^u^o,n,c,h,m,s)}function b(n,c,u,o,h,m,s){return P(u^(c|~o),n,c,h,m,s)}function d(n,c){var u=(n&65535)+(c&65535),o=(n>>16)+(c>>16)+(u>>16);return o<<16|u&65535}function l(n,c){return n<<c|n>>>32-c}Y.exports=function(c){return L.hash(c,T,16)}},{"./helpers":285}],287:[function(j,Y,D){"use strict";var L=j("./helpers");function g(S,b){S[b>>5]|=128<<24-b%32,S[(b+64>>9<<4)+15]=b;for(var d=Array(80),l=1732584193,n=-271733879,c=-1732584194,u=271733878,o=-1009589776,h=0;h<S.length;h+=16){for(var m=l,s=n,r=c,a=u,t=o,w=0;w<80;w++){w<16?d[w]=S[h+w]:d[w]=v(d[w-3]^d[w-8]^d[w-14]^d[w-16],1);var E=p(p(v(l,5),T(w,n,c,u)),p(p(o,d[w]),P(w)));o=u,u=c,c=v(n,30),n=l,l=E}l=p(l,m),n=p(n,s),c=p(c,r),u=p(u,a),o=p(o,t)}return Array(l,n,c,u,o)}function T(S,b,d,l){return S<20?b&d|~b&l:S<40?b^d^l:S<60?b&d|b&l|d&l:b^d^l}function P(S){return S<20?1518500249:S<40?1859775393:S<60?-1894007588:-899497514}function p(S,b){var d=(S&65535)+(b&65535),l=(S>>16)+(b>>16)+(d>>16);return l<<16|d&65535}function v(S,b){return S<<b|S>>>32-b}Y.exports=function(b){return L.hash(b,g,20,!0)}},{"./helpers":285}],288:[function(j,Y,D){"use strict";Y.exports=function(){return function(){}}},{}],289:[function(j,Y,D){(function(L){"use strict";var g=j("babel-runtime/helpers/typeof"),T=P(g);function P(l){return l&&l.__esModule?l:{default:l}}var p=j("stream"),v=p.Stream,S=j("../lib/common/utils/isArray"),b=S.isArray;Y.exports.string=function(n){return typeof n=="string"},Y.exports.array=b,Y.exports.buffer=L.isBuffer;function d(l){return l instanceof v}Y.exports.writableStream=function(n){return d(n)&&typeof n._write=="function"&&(0,T.default)(n._writableState)==="object"}}).call(this,{isBuffer:j("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":42,"../node_modules/is-buffer/index.js":197,"babel-runtime/helpers/typeof":67,stream:230}],290:[function(j,Y,D){"use strict";D.encodeURIComponent=function(L){try{return encodeURIComponent(L)}catch(g){return L}},D.escape=j("escape-html"),D.timestamp=function(g){if(g){var T=g;return typeof T=="string"&&(T=Number(T)),String(g).length===10&&(T*=1e3),new Date(T)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(j,Y,D){(function(L,g){"use strict";var T=j("babel-runtime/core-js/json/stringify"),P=S(T),p=j("babel-runtime/helpers/typeof"),v=S(p);function S(w){return w&&w.__esModule?w:{default:w}}var b=j("util"),d=j("url"),l=j("http"),n=j("https"),c=j("debug")("urllib"),u=j("humanize-ms"),o,h=0,m=Math.pow(2,31)-10,s=/^https?:\/\//i;function r(w,E){return w===void 0?E:w}function a(w,E){return function(f,k,O){if(f)return E(f);w({data:k,status:O.statusCode,headers:O.headers,res:O})}}D.TIMEOUTS=[u("300s"),u("300s")];var t=["json","text"];D.request=function(E,f,k){return arguments.length===2&&typeof f=="function"&&(k=f,f=null),typeof k=="function"?D.requestWithCallback(E,f,k):(o||(o=j("any-promise")),new o(function(O,C){D.requestWithCallback(E,f,a(O,C))}))},D.requestWithCallback=function(E,f,k){if(!E||typeof E!="string"&&(typeof E=="undefined"?"undefined":(0,v.default)(E))!=="object"){var O=b.format("expect request url to be a string or a http request options, but got %j",E);throw new Error(O)}arguments.length===2&&typeof f=="function"&&(k=f,f=null),f=f||{},h>=m&&(h=0);var C=++h;f.requestUrls=f.requestUrls||[];var x={requestId:C,url:E,args:f,ctx:f.ctx};f.emitter&&f.emitter.emit("request",x),f.timeout=f.timeout||D.TIMEOUTS,f.maxRedirects=f.maxRedirects||10,f.streaming=f.streaming||f.customResponse;var y=Date.now(),_;typeof E=="string"?(s.test(E)||(E="http://"+E),_=d.parse(E)):_=E;var M=(f.type||f.method||_.method||"GET").toUpperCase(),I=_.port||80,N=l,G=r(f.agent,D.agent),H=f.fixJSONCtlChars;_.protocol==="https:"&&(N=n,G=r(f.httpsAgent,D.httpsAgent),_.port||(I=443));var B={host:_.hostname||_.host||"localhost",path:_.path||"/",method:M,port:I,agent:G,headers:f.headers||{},lookup:f.lookup};Array.isArray(f.timeout)?B.requestTimeout=f.timeout[f.timeout.length-1]:typeof f.timeout!="undefined"&&(B.requestTimeout=f.timeout);for(var K=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U<K.length;U++){var W=K[U];f.hasOwnProperty(W)&&(B[W]=f[W])}B.rejectUnauthorized===!1&&!B.hasOwnProperty("secureOptions")&&(B.secureOptions=j("constants").SSL_OP_NO_TLSv1_2);var X=f.auth||_.auth;X&&(B.auth=X);var ne=f.content||f.data,fe=M==="GET"||M==="HEAD"||f.dataAsQueryString;if(!f.content&&(ne&&!(typeof ne=="string"||g.isBuffer(ne))))if(fe)ne=f.nestedQuerystring?qs.stringify(ne):querystring.stringify(ne);else{var me=B.headers["Content-Type"]||B.headers["content-type"];me||(f.contentType==="json"?me="application/json":me="application/x-www-form-urlencoded",B.headers["Content-Type"]=me),parseContentType(me).type==="application/json"?ne=(0,P.default)(ne):ne=f.nestedQuerystring?qs.stringify(ne):querystring.stringify(ne)}fe&&ne&&(B.path+=(_.query?"&":"?")+ne,ne=null);var Ae=0;if(ne){var De=ne.length;g.isBuffer(ne)||(De=g.byteLength(ne)),Ae=B.headers["Content-Length"]=De}f.dataType==="json"&&(B.headers.Accept="application/json"),typeof f.beforeRequest=="function"&&f.beforeRequest(B);var ye=null,Oe=null,xe=null,ue=!1,le=!1,re=0,pe=-1,ee=!1,te="",ce="",q=null;f.timing&&(q={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function Q(){ye&&(clearTimeout(ye),ye=null)}function V(){Oe&&(clearTimeout(Oe),Oe=null)}function Z(Re,tt,ft){if(V(),!k){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),C,L.pid,B.method,E),Re&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),C,L.pid,Re.name,Re.message,Re.stack);return}var Qe=k;k=null;var lt={};if(ft&&(pe=ft.statusCode,lt=ft.headers),pe===401&<["www-authenticate"]&&(!f.headers||!f.headers.Authorization)&&f.digestAuth){var Ue=lt["www-authenticate"];if(Ue.indexOf("Digest ")>=0)return c("Request#%d %s: got digest auth header WWW-Authenticate: %s",C,E,Ue),f.headers=f.headers||{},f.headers.Authorization=digestAuthHeader(B.method,B.path,Ue,f.digestAuth),c("Request#%d %s: auth with digest header: %s",C,E,f.headers.Authorization),ft.headers["set-cookie"]&&(f.headers.Cookie=ft.headers["set-cookie"].join(";")),D.requestWithCallback(E,f,Qe)}var Le=Date.now()-y;q&&(q.contentDownload=Le),c("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Le,re,pe,B.method,B.host,B.path,le,q);var Ie={status:pe,statusCode:pe,headers:lt,size:re,aborted:ee,rt:Le,keepAliveSocket:le,data:tt,requestUrls:f.requestUrls,timing:q,remoteAddress:te,remotePort:ce};if(Re){var Ce="";G&&typeof G.getCurrentStatus=="function"&&(Ce=", agent status: "+(0,P.default)(G.getCurrentStatus())),Re.message+=", "+B.method+" "+E+" "+pe+" (connected: "+ue+", keepalive socket: "+le+Ce+`)
|
|
|
headers: `+(0,P.default)(lt),Re.data=tt,Re.path=B.path,Re.status=pe,Re.headers=lt,Re.res=Ie}Qe(Re,tt,f.streaming?ft:Ie),f.emitter&&(x.url=E,x.socket=ht&&ht.connection,x.options=B,x.size=Ae,f.emitter.emit("response",{requestId:C,error:Re,ctx:f.ctx,req:x,res:Ie}))}function be(Re){var tt=null;if(f.followRedirect&&statuses.redirect[Re.statusCode]){f._followRedirectCount=(f._followRedirectCount||0)+1;var ft=Re.headers.location;if(!ft)tt=new Error("Got statusCode "+Re.statusCode+" but cannot resolve next location from headers"),tt.name="FollowRedirectError";else if(f._followRedirectCount>f.maxRedirects)tt=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+E),tt.name="MaxRedirectError";else{var Qe=f.formatRedirectUrl?f.formatRedirectUrl(E,ft):d.resolve(E,ft);c("Request#%d %s: `redirected` from %s to %s",C,B.path,E,Qe),V(),f.headers&&f.headers.Host&&s.test(ft)&&(f.headers.Host=null);var lt=k;return k=null,D.requestWithCallback(Qe,f,lt),{redirect:!0,error:null}}}return{redirect:!1,error:tt}}!B.headers["User-Agent"]&&!B.headers["user-agent"]&&(B.headers["User-Agent"]=navigator.userAgent),f.gzip&&(!B.headers["Accept-Encoding"]&&!B.headers["accept-encoding"]&&(B.headers["Accept-Encoding"]="gzip"));function ge(Re,tt,ft){var Qe=Re.headers["content-encoding"];return ft(null,tt,Qe)}var Te=f.writeStream;c("Request#%d %s %s with headers %j, options.path: %s",C,M,E,B.headers,B.path),f.requestUrls.push(E);function Je(Re){if(q&&(q.waiting=Date.now()-y),c("Request#%d %s `req response` event emit: status %d, headers: %j",C,E,Re.statusCode,Re.headers),f.streaming){var tt=be(Re);if(tt.redirect){Re.resume();return}return tt.error?(Re.resume(),Z(tt.error,null,Re)):Z(null,null,Re)}if(Re.on("close",function(){c("Request#%d %s: `res close` event emit, total size %d",C,E,re)}),Re.on("error",function(){c("Request#%d %s: `res error` event emit, total size %d",C,E,re)}),Re.on("aborted",function(){ee=!0,c("Request#%d %s: `res aborted` event emit, total size %d",C,E,re)}),Te){var tt=be(Re);if(tt.redirect){Re.resume();return}return tt.error?(Re.resume(),Te.end(),Z(tt.error,null,Re)):(f.consumeWriteStream===!1?Re.on("end",Z.bind(null,null,null,Re)):isNode010||isNode012?first([[Te,"close"],[Re,"aborted"]],function(lt,Ue,Le){c("Request#%d %s: writeStream or res %s event emitted",C,E,Le),Z(xe||null,null,Re)}):Te.on("close",function(){c("Request#%d %s: writeStream close event emitted",C,E),Z(xe||null,null,Re)}),Re.pipe(Te))}var ft=[];Re.on("data",function(Qe){c("Request#%d %s: `res data` event emit, size %d",C,E,Qe.length),re+=Qe.length,ft.push(Qe)}),Re.on("end",function(){var Qe=g.concat(ft,re);if(c("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",C,E,re,Re._dumped),xe)return Z(xe,Qe,Re);var lt=be(Re);if(lt.error)return Z(lt.error,Qe,Re);if(lt.redirect)return;ge(Re,Qe,function(Ue,Le,Ie){if(Ue)return Z(Ue,Qe,Re);if(!Ie&&t.indexOf(f.dataType)>=0){try{Le=decodeBodyByCharset(Le,Re)}catch(Se){return c("decodeBodyByCharset error: %s",Se),Z(null,Le,Re)}if(f.dataType==="json")if(re===0)Le=null;else{var Ce=parseJSON(Le,H);Ce.error?Ue=Ce.error:Le=Ce.data}}ee&&c("Request#%d %s: Remote socket was terminated before `response.end()` was called",C,E),Z(Ue,Le,Re)})})}var rt,nt;Array.isArray(f.timeout)?(rt=u(f.timeout[0]),nt=u(f.timeout[1])):rt=nt=u(f.timeout),c("ConnectTimeout: %d, ResponseTimeout: %d",rt,nt);function at(){c("Connect timer ticking, timeout: %d",rt),ye=setTimeout(function(){ye=null,pe===-1&&(pe=-2);var Re="Connect timeout for "+rt+"ms",tt="ConnectionTimeoutError";ht.socket||(tt="SocketAssignTimeoutError",Re+=", working sockets is full"),xe=new Error(Re),xe.name=tt,xe.requestId=C,c("ConnectTimeout: Request#%d %s %s: %s, connected: %s",C,E,xe.name,Re,ue),He()},rt)}function ct(){c("Response timer ticking, timeout: %d",nt),Oe=setTimeout(function(){Oe=null;var Re="Response timeout for "+nt+"ms",tt="ResponseTimeoutError";xe=new Error(Re),xe.name=tt,xe.requestId=C,c("ResponseTimeout: Request#%d %s %s: %s, connected: %s",C,E,xe.name,Re,ue),He()},nt)}var ht;B.mode=f.mode?f.mode:"";try{ht=N.request(B,Je)}catch(Re){return Z(Re)}typeof window=="undefined"?at():ht.on("requestTimeout",function(){pe===-1&&(pe=-2);var Re="Connect timeout for "+rt+"ms",tt="ConnectionTimeoutError";xe=new Error(Re),xe.name=tt,xe.requestId=C,He()});function He(){c("Request#%d %s abort, connected: %s",C,E,ue),ht.socket||(xe.noSocket=!0,Z(xe)),ht.abort()}return q&&ht.on("finish",function(){q.requestSent=Date.now()-y}),ht.once("socket",function(Re){q&&(q.queuing=Date.now()-y),isNode010&&Re.socket&&(Re=Re.socket);var tt=Re.readyState;if(tt==="opening"){Re.once("lookup",function(ft,Qe,lt){c("Request#%d %s lookup: %s, %s, %s",C,E,ft,Qe,lt),q&&(q.dnslookup=Date.now()-y),Qe&&(te=Qe)}),Re.once("connect",function(){q&&(q.connected=Date.now()-y),Q(),ct(),c("Request#%d %s new socket connected",C,E),ue=!0,te||(te=Re.remoteAddress),ce=Re.remotePort});return}c("Request#%d %s reuse socket connected, readyState: %s",C,E,tt),ue=!0,le=!0,te||(te=Re.remoteAddress),ce=Re.remotePort,Q(),ct()}),ht.on("error",function(Re){(Re.name==="Error"||Re.name==="TypeError")&&(Re.name=ue?"ResponseError":"RequestError"),Re.message+=' (req "error")',c("Request#%d %s `req error` event emit, %s: %s",C,E,Re.name,Re.message),Z(xe||Re)}),Te&&Te.once("error",function(Re){Re.message+=' (writeStream "error")',xe=Re,c("Request#%d %s `writeStream error` event emit, %s: %s",C,E,Re.name,Re.message),He()}),f.stream?(f.stream.pipe(ht),f.stream.once("error",function(Re){Re.message+=' (stream "error")',xe=Re,c("Request#%d %s `readStream error` event emit, %s: %s",C,E,Re.name,Re.message),He()})):ht.end(ne),ht.requestId=C,ht}}).call(this,j("_process"),j("buffer").Buffer)},{_process:208,"any-promise":49,"babel-runtime/core-js/json/stringify":53,"babel-runtime/helpers/typeof":67,buffer:73,constants:75,debug:288,http:231,https:193,"humanize-ms":194,url:238,util:243}]},{},[1])(1)})}).call(this,__webpack_require__("IyRk"))},n6Qo:function(j,Y,D){"use strict";D.d(Y,"a",function(){return b});var L=D("q1tI"),g=D("biw7"),T=D("fyJ8");function P(d){var l=d.className,n=d.index,c=d.children,u=d.colSpan,o=d.rowSpan,h=L.useContext(g.a),m=h.prefixCls,s=h.fixedInfoList,r=s[n];return L.createElement(T.a,Object.assign({className:l,index:n,component:"td",prefixCls:m,record:null,dataIndex:null,render:function(){return{children:c,props:{colSpan:u,rowSpan:o}}}},r))}function p(d){return L.createElement("tr",Object.assign({},d))}function v(d){var l=d.children,n=L.useContext(g.a),c=n.prefixCls;return L.createElement("tfoot",{className:"".concat(c,"-summary")},l)}var S=Y.b=v,b={Cell:P,Row:p}},nnTU:function(j,Y,D){"use strict";D.d(Y,"b",function(){return b}),D.d(Y,"a",function(){return d});var L=D("pmY6"),g=D("746U"),T=D("Cg/j"),P=D("MI8n"),p=D("24hK"),v=D("QDVR"),S=function(){for(var l=0,n=0,c=arguments.length;n<c;n++)l+=arguments[n].length;for(var u=Array(l),o=0,n=0;n<c;n++)for(var h=arguments[n],m=0,s=h.length;m<s;m++,o++)u[o]=h[m];return u},b=Object(T.c)("commandService"),d=new(function(){function l(){this._commands=new Map,this._onDidRegisterCommand=new P.a,this.onDidRegisterCommand=this._onDidRegisterCommand.event}return l.prototype.registerCommand=function(n,c){var u=this;if(!n)throw new Error("invalid command");if(typeof n=="string"){if(!c)throw new Error("invalid command");return this.registerCommand({id:n,handler:c})}if(n.description){for(var o=[],h=0,m=n.description.args;h<m.length;h++){var s=m[h];o.push(s.constraint)}var r=n.handler;n.handler=function(f){for(var k=[],O=1;O<arguments.length;O++)k[O-1]=arguments[O];return Object(g.m)(k,o),r.apply(void 0,S([f],k))}}var a=n.id,t=this._commands.get(a);t||(t=new p.a,this._commands.set(a,t));var w=t.unshift(n),E=Object(L.h)(function(){w();var f=u._commands.get(a);(f==null?void 0:f.isEmpty())&&u._commands.delete(a)});return this._onDidRegisterCommand.fire(a),E},l.prototype.registerCommandAlias=function(n,c){return d.registerCommand(n,function(u){for(var o,h=[],m=1;m<arguments.length;m++)h[m-1]=arguments[m];return(o=u.get(b)).executeCommand.apply(o,S([c],h))})},l.prototype.getCommand=function(n){var c=this._commands.get(n);return!c||c.isEmpty()?void 0:c.iterator().next().value},l.prototype.getCommands=function(){for(var n=new Map,c=0,u=Object(v.d)(this._commands);c<u.length;c++){var o=u[c],h=this.getCommand(o);h&&n.set(o,h)}return n},l}())},oRuE:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){return L.pad.Iso10126={pad:function(g,T){var P=T*4,p=P-g.sigBytes%P;g.concat(L.lib.WordArray.random(p-1)).concat(L.lib.WordArray.create([p<<24],1))},unpad:function(g){var T=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=T}},L.pad.Iso10126})},osHv:function(j,Y,D){(function(L){L(D("VrN/"))})(function(L){"use strict";var g=L.Pos;function T(s,r){return s.line-r.line||s.ch-r.ch}var P="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",p=P+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",v=new RegExp("<(/?)(["+P+"]["+p+"]*)","g");function S(s,r,a,t){this.line=r,this.ch=a,this.cm=s,this.text=s.getLine(r),this.min=t?Math.max(t.from,s.firstLine()):s.firstLine(),this.max=t?Math.min(t.to-1,s.lastLine()):s.lastLine()}function b(s,r){var a=s.cm.getTokenTypeAt(g(s.line,r));return a&&/\btag\b/.test(a)}function d(s){return s.line>=s.max?void 0:(s.ch=0,s.text=s.cm.getLine(++s.line),!0)}function l(s){return s.line<=s.min?void 0:(s.text=s.cm.getLine(--s.line),s.ch=s.text.length,!0)}function n(s){for(;;){var r=s.text.indexOf(">",s.ch);if(r==-1){if(d(s))continue;return}if(!b(s,r+1)){s.ch=r+1;continue}var a=s.text.lastIndexOf("/",r),t=a>-1&&!/\S/.test(s.text.slice(a+1,r));return s.ch=r+1,t?"selfClose":"regular"}}function c(s){for(;;){var r=s.ch?s.text.lastIndexOf("<",s.ch-1):-1;if(r==-1){if(l(s))continue;return}if(!b(s,r+1)){s.ch=r;continue}v.lastIndex=r,s.ch=r;var a=v.exec(s.text);if(a&&a.index==r)return a}}function u(s){for(;;){v.lastIndex=s.ch;var r=v.exec(s.text);if(!r){if(d(s))continue;return}if(!b(s,r.index+1)){s.ch=r.index+1;continue}return s.ch=r.index+r[0].length,r}}function o(s){for(;;){var r=s.ch?s.text.lastIndexOf(">",s.ch-1):-1;if(r==-1){if(l(s))continue;return}if(!b(s,r+1)){s.ch=r;continue}var a=s.text.lastIndexOf("/",r),t=a>-1&&!/\S/.test(s.text.slice(a+1,r));return s.ch=r+1,t?"selfClose":"regular"}}function h(s,r){for(var a=[];;){var t=u(s),w,E=s.line,f=s.ch-(t?t[0].length:0);if(!t||!(w=n(s)))return;if(w=="selfClose")continue;if(t[1]){for(var k=a.length-1;k>=0;--k)if(a[k]==t[2]){a.length=k;break}if(k<0&&(!r||r==t[2]))return{tag:t[2],from:g(E,f),to:g(s.line,s.ch)}}else a.push(t[2])}}function m(s,r){for(var a=[];;){var t=o(s);if(!t)return;if(t=="selfClose"){c(s);continue}var w=s.line,E=s.ch,f=c(s);if(!f)return;if(f[1])a.push(f[2]);else{for(var k=a.length-1;k>=0;--k)if(a[k]==f[2]){a.length=k;break}if(k<0&&(!r||r==f[2]))return{tag:f[2],from:g(s.line,s.ch),to:g(w,E)}}}}L.registerHelper("fold","xml",function(s,r){for(var a=new S(s,r.line,0);;){var t=u(a);if(!t||a.line!=r.line)return;var w=n(a);if(!w)return;if(!t[1]&&w!="selfClose"){var E=g(a.line,a.ch),f=h(a,t[2]);return f&&T(f.from,E)>0?{from:E,to:f.from}:null}}}),L.findMatchingTag=function(s,r,a){var t=new S(s,r.line,r.ch,a);if(t.text.indexOf(">")==-1&&t.text.indexOf("<")==-1)return;var w=n(t),E=w&&g(t.line,t.ch),f=w&&c(t);if(!w||!f||T(t,r)>0)return;var k={from:g(t.line,t.ch),to:E,tag:f[2]};return w=="selfClose"?{open:k,close:null,at:"open"}:f[1]?{open:m(t,f[2]),close:k,at:"close"}:(t=new S(s,E.line,E.ch,a),{open:k,close:h(t,f[2]),at:"open"})},L.findEnclosingTag=function(s,r,a,t){for(var w=new S(s,r.line,r.ch,a);;){var E=m(w,t);if(!E)break;var f=new S(s,r.line,r.ch,a),k=h(f,E.tag);if(k)return{open:E,close:k}}},L.scanForClosingTag=function(s,r,a,t){var w=new S(s,r.line,r.ch,t?{from:0,to:t}:null);return h(w,a)}})},p5ED:function(j,Y,D){"use strict";var L=D("+L6B"),g=D("2/Rp"),T=D("5Dmo"),P=D("3S7+"),p=D("k1fw"),v=D("9og8"),S=D("tJVT"),b=D("WmNS"),d=D.n(b),l=D("q1tI"),n=D.n(l),c=D("vHTk"),u=D.n(c),o=D("yEEn"),h=D("ZW9T"),m=D("1vsH"),s=D("V0Rq"),r=D("m3rI");Y.a=function(a){var t,w,E,f,k,O,C=a.editOffice,x=C===void 0?"view":C,y=a.name,_=a.data,M=a.theme,I=a.type,N=a.filename,G=a.monacoEditor,H=a.className,B=a.style,K=a.close,U=a.onClose,W=a.hasMask,X=a.disabledDownload,ne=a.onImgDimensions,fe=a.otherData,me=Object(l.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),Ae=Object(S.a)(me,2),De=Ae[0],ye=Ae[1],Oe=Object(l.useState)(""),xe=Object(S.a)(Oe,2),ue=xe[0],le=xe[1],re=Object(l.useState)(),pe=Object(S.a)(re,2),ee=pe[0],te=pe[1],ce=window.ENV==="build"?"/react/build":"",q=location.host.startsWith("localhost")?r.a.PROXY_SERVER:r.a.API_SERVER,Q,V=1024*1024,Z=10*V,be=Object(l.useRef)();(t=_)!==null&&t!==void 0&&t.startsWith("/api")&&I!=="txt"&&(_=r.a.API_SERVER+_),I==="office"&&(Q=Object(m.P)(_).filesize,Q>Z&&(I="other")),N&&(G.filename=N),Object(l.useEffect)(function(){var rt,nt,at=(rt=document.cookie)===null||rt===void 0||((nt=rt.replace(/\s/g,""))===null||nt===void 0)?void 0:nt.split(";");at==null||at.map(function(ct){var ht=ct.split("=");ht[0]==="_educoder_session"&&le(ht[1])})},[]),Object(l.useEffect)(function(){I==="office"&&ge()},[I,_]);var ge=function(){var rt=Object(v.a)(d.a.mark(function nt(){var at,ct,ht;return d.a.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return console.log("data:",_),at=_,_.startsWith("http")||(at=location.origin+at),ct=new URL(at).pathname.split("/").pop(),Re.next=6,Object(s.U)({attachment_id:ct});case 6:ht=Re.sent,te(ht);case 8:case"end":return Re.stop()}},nt)}));return function(){return rt.apply(this,arguments)}}(),Te=function(){if(_.startsWith("http")||_.startsWith("blob:")){Je();return}Object(m.x)(N||"educoder",_,N)},Je=function(){Object(m.v)(N||"educoder",decodeURIComponent(_))};return n.a.createElement("div",{style:Object(p.a)({},B||{}),className:"".concat(W&&u.a.bgBlack," ").concat(I?u.a.wrp:"hide")},K&&n.a.createElement("div",{className:u.a.close,ref:be},!!ne&&n.a.createElement(P.a,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:function(){return be.current}},n.a.createElement("span",{onClick:function(){U(),ne()}},n.a.createElement("i",{className:"icon-yulanpizhu"}))),!X&&n.a.createElement(P.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return be.current}},n.a.createElement("span",{onClick:Je},n.a.createElement("i",{className:"icon-quxiaozhiding"}))),n.a.createElement(P.a,{title:"\u5173\u95ED",getPopupContainer:function(){return be.current}},n.a.createElement("span",{className:"",onClick:U},n.a.createElement("i",{className:"icon-guanbi1"})))),n.a.createElement("div",{className:"".concat(u.a[H]," ").concat(H," ").concat(u.a.monaco," ").concat(I==="txt"?"show":"hide")},I==="txt"&&n.a.createElement(h.b,G)),I==="audio"&&n.a.createElement("audio",{src:"".concat(((w=_)===null||w===void 0?void 0:w.indexOf("http://"))>-1||((E=_)===null||E===void 0?void 0:E.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(_),autoPlay:!0}),I==="video"&&n.a.createElement(n.a.Fragment,null,((f=_)===null||f===void 0?void 0:f.indexOf("http"))>-1?n.a.createElement("video",{controls:!0,src:"".concat(_),autoPlay:!0}):n.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(_),autoPlay:!0})),I==="office"&&ee&&n.a.createElement("iframe",{src:"".concat(ce,"/office.html?key=").concat(ee.key,"&url=").concat(q+ee.url,"&callbackUrl=").concat(q+ee.callbackUrl,"&fileType=").concat(ee.fileType,"&title=").concat(ee.title,"&model=").concat(x,"&officeServer=").concat(r.a.OFFICE_SERVER,"&disabledDownload=").concat(!!X)}),(I==="xlsx"||I==="doc"||I==="pptx"||I==="docx")&&n.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(fe.key,"&url=").concat(r.a.API_SERVER+fe.url,"&callbackUrl=").concat(r.a.API_SERVER+fe.callbackUrl,"&fileType=").concat(fe.fileType,"&title=").concat(fe.title,"&model=").concat(fe.model)}),I==="html"&&n.a.createElement("iframe",{src:_+"&disposition=inline"}),I==="pdf"&&n.a.createElement("embed",{className:u.a.embed,src:_}),I==="image"&&n.a.createElement("img",{src:"".concat(((k=_)===null||k===void 0?void 0:k.indexOf("http://"))>-1||((O=_)===null||O===void 0?void 0:O.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(_)}),I==="other"&&n.a.createElement("div",null,n.a.createElement(g.a,{type:"primary",size:"large",onClick:Te},n.a.createElement(o.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),I==="download"&&n.a.createElement(g.a,{type:"primary",size:"large",onClick:Te},n.a.createElement(o.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(j,Y,D){},pA7S:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.WordArray,p=T.BlockCipher,v=g.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],d=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],n=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],c=v.DES=p.extend({_doReset:function(){for(var m=this._key,s=m.words,r=[],a=0;a<56;a++){var t=S[a]-1;r[a]=s[t>>>5]>>>31-t%32&1}for(var w=this._subKeys=[],E=0;E<16;E++){for(var f=w[E]=[],k=d[E],a=0;a<24;a++)f[a/6|0]|=r[(b[a]-1+k)%28]<<31-a%6,f[4+(a/6|0)]|=r[28+(b[a+24]-1+k)%28]<<31-a%6;f[0]=f[0]<<1|f[0]>>>31;for(var a=1;a<7;a++)f[a]=f[a]>>>(a-1)*4+3;f[7]=f[7]<<5|f[7]>>>27}for(var O=this._invSubKeys=[],a=0;a<16;a++)O[a]=w[15-a]},encryptBlock:function(m,s){this._doCryptBlock(m,s,this._subKeys)},decryptBlock:function(m,s){this._doCryptBlock(m,s,this._invSubKeys)},_doCryptBlock:function(m,s,r){this._lBlock=m[s],this._rBlock=m[s+1],u.call(this,4,252645135),u.call(this,16,65535),o.call(this,2,858993459),o.call(this,8,16711935),u.call(this,1,1431655765);for(var a=0;a<16;a++){for(var t=r[a],w=this._lBlock,E=this._rBlock,f=0,k=0;k<8;k++)f|=l[k][((E^t[k])&n[k])>>>0];this._lBlock=E,this._rBlock=w^f}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,u.call(this,1,1431655765),o.call(this,8,16711935),o.call(this,2,858993459),u.call(this,16,65535),u.call(this,4,252645135),m[s]=this._lBlock,m[s+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function u(m,s){var r=(this._lBlock>>>m^this._rBlock)&s;this._rBlock^=r,this._lBlock^=r<<m}function o(m,s){var r=(this._rBlock>>>m^this._lBlock)&s;this._lBlock^=r,this._rBlock^=r<<m}g.DES=p._createHelper(c);var h=v.TripleDES=p.extend({_doReset:function(){var m=this._key,s=m.words;if(s.length!==2&&s.length!==4&&s.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var r=s.slice(0,2),a=s.length<4?s.slice(0,2):s.slice(2,4),t=s.length<6?s.slice(0,2):s.slice(4,6);this._des1=c.createEncryptor(P.create(r)),this._des2=c.createEncryptor(P.create(a)),this._des3=c.createEncryptor(P.create(t))},encryptBlock:function(m,s){this._des1.encryptBlock(m,s),this._des2.decryptBlock(m,s),this._des3.encryptBlock(m,s)},decryptBlock:function(m,s){this._des3.decryptBlock(m,s),this._des2.encryptBlock(m,s),this._des1.decryptBlock(m,s)},keySize:192/32,ivSize:64/32,blockSize:64/32});g.TripleDES=p._createHelper(h)}(),L.TripleDES})},pIsd:function(j,Y,D){var L=D("BJfS"),g=function(p){var v=/[height|width]$/;return v.test(p)},T=function(p){var v="",S=Object.keys(p);return S.forEach(function(b,d){var l=p[b];b=L(b),g(b)&&typeof l=="number"&&(l=l+"px"),l===!0?v+=b:l===!1?v+="not "+b:v+="("+b+": "+l+")",d<S.length-1&&(v+=" and ")}),v},P=function(p){var v="";return typeof p=="string"?p:p instanceof Array?(p.forEach(function(S,b){v+=T(S),b<p.length-1&&(v+=", ")}),v):T(p)};j.exports=P},pmY6:function(j,Y,D){"use strict";D.d(Y,"g",function(){return p}),D.d(Y,"f",function(){return v}),D.d(Y,"e",function(){return S}),D.d(Y,"h",function(){return b}),D.d(Y,"b",function(){return d}),D.d(Y,"a",function(){return l}),D.d(Y,"d",function(){return n}),D.d(Y,"c",function(){return c});var L=!1,g="__is_disposable_tracked__";function T(u){if(!L)return;if(u&&u!==l.None)try{u[g]=!0}catch(o){}}function P(u){if(!L)return u;var o=new Error("Potentially leaked disposable").stack;return setTimeout(function(){u[g]||console.log(o)},3e3),u}function p(u){return typeof u.dispose=="function"&&u.dispose.length===0}function v(u){return Array.isArray(u)?(u.forEach(function(o){o&&(T(o),o.dispose())}),[]):u?(T(u),u.dispose(),u):void 0}function S(){for(var u=[],o=0;o<arguments.length;o++)u[o]=arguments[o];return u.forEach(T),P({dispose:function(){return v(u)}})}function b(u){var o=P({dispose:function(){T(o),u()}});return o}var d=function(){function u(){this._toDispose=new Set,this._isDisposed=!1}return u.prototype.dispose=function(){if(this._isDisposed)return;T(this),this._isDisposed=!0,this.clear()},u.prototype.clear=function(){this._toDispose.forEach(function(o){return o.dispose()}),this._toDispose.clear()},u.prototype.add=function(o){if(!o)return o;if(o===this)throw new Error("Cannot register a disposable on itself!");return T(o),this._isDisposed?console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(o),o},u}(),l=function(){function u(){this._store=new d,P(this)}return u.prototype.dispose=function(){T(this),this._store.dispose()},u.prototype._register=function(o){if(o===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(o)},u.None=Object.freeze({dispose:function(){}}),u}(),n=function(){function u(){this._isDisposed=!1,P(this)}return Object.defineProperty(u.prototype,"value",{get:function(){return this._isDisposed?void 0:this._value},set:function(o){if(this._isDisposed||o===this._value)return;this._value&&this._value.dispose(),o&&T(o),this._value=o},enumerable:!0,configurable:!0}),u.prototype.clear=function(){this.value=void 0},u.prototype.dispose=function(){this._isDisposed=!0,T(this),this._value&&this._value.dispose(),this._value=void 0},u}(),c=function(){function u(o){this.object=o}return u.prototype.dispose=function(){},u}()},qBft:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){return L.pad.AnsiX923={pad:function(g,T){var P=g.sigBytes,p=T*4,v=p-P%p,S=P+v-1;g.clamp(),g.words[S>>>2]|=v<<24-S%4*8,g.sigBytes+=v},unpad:function(g){var T=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=T}},L.pad.Ansix923})},qHvr:function(j,Y,D){"use strict";var L=D("2qtc"),g=D("kLXV"),T=D("5NDa"),P=D("5rEg"),p=D("miYZ"),v=D("tsqr"),S=D("tJVT"),b=D("q1tI"),d=D.n(b),l=D("4i/N");function n(c){var u=c.isAddmodle,o=c.setIsAdd,h=c.createTeam,m=Object(b.useState)(""),s=Object(S.a)(m,2),r=s[0],a=s[1];return d.a.createElement(g.a,{centered:!0,title:d.a.createElement("div",{style:{alignItems:"center",display:"flex"}},d.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u521B\u5EFA\u6218\u961F"),d.a.createElement(l.a,{onClick:function(){return o(!1)},style:{cursor:"porint"}})),visible:u,closable:!1,destroyOnClose:!0,onOk:function(){if(!r){v.b.info("\u6218\u961F\u540D\u4E0D\u80FD\u4E3A\u7A7A");return}h(r)},onCancel:function(){return o(!1)}},d.a.createElement("div",null,d.a.createElement("span",{style:{fontSize:"14px",color:"#F73737"}},"*"),"\u961F\u540D\uFF1A",d.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px"}},d.a.createElement(P.a,{placeholder:"\u8BF7\u8F93\u5165\u961F\u540D",value:r,maxLength:60,addonAfter:String(r&&r.length||0)+"/60",onChange:function(w){return a(w.target.value)}}))))}Y.a=n},qM6L:function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.WordArray,p=g.enc,v=p.Utf16=p.Utf16BE={stringify:function(b){for(var d=b.words,l=b.sigBytes,n=[],c=0;c<l;c+=2){var u=d[c>>>2]>>>16-c%4*8&65535;n.push(String.fromCharCode(u))}return n.join("")},parse:function(b){for(var d=b.length,l=[],n=0;n<d;n++)l[n>>>1]|=b.charCodeAt(n)<<16-n%2*16;return P.create(l,d*2)}};p.Utf16LE={stringify:function(b){for(var d=b.words,l=b.sigBytes,n=[],c=0;c<l;c+=2){var u=S(d[c>>>2]>>>16-c%4*8&65535);n.push(String.fromCharCode(u))}return n.join("")},parse:function(b){for(var d=b.length,l=[],n=0;n<d;n++)l[n>>>1]|=S(b.charCodeAt(n)<<16-n%2*16);return P.create(l,d*2)}};function S(b){return b<<8&4278255360|b>>>8&16711935}}(),L.enc.Utf16})},qu8F:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){/** @preserve
|
|
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
|
* derived from CryptoJS.mode.CTR
|
|
|
* Jan Hruby jhruby.web@gmail.com
|
|
|
*/return L.mode.CTRGladman=function(){var g=L.lib.BlockCipherMode.extend();function T(v){if((v>>24&255)===255){var S=v>>16&255,b=v>>8&255,d=v&255;S===255?(S=0,b===255?(b=0,d===255?d=0:++d):++b):++S,v=0,v+=S<<16,v+=b<<8,v+=d}else v+=1<<24;return v}function P(v){return(v[0]=T(v[0]))===0&&(v[1]=T(v[1])),v}var p=g.Encryptor=g.extend({processBlock:function(v,S){var b=this._cipher,d=b.blockSize,l=this._iv,n=this._counter;l&&(n=this._counter=l.slice(0),this._iv=void 0),P(n);var c=n.slice(0);b.encryptBlock(c,0);for(var u=0;u<d;u++)v[S+u]^=c[u]}});return g.Decryptor=p,g}(),L.mode.CTRGladman})},"rAM+":function(j,Y,D){"use strict";D.d(Y,"a",function(){return g});var L=D("Qw5x");function g(T,P){var p;if(typeof Symbol=="undefined"||T[Symbol.iterator]==null){if(Array.isArray(T)||(p=Object(L.a)(T))||P&&T&&typeof T.length=="number"){p&&(T=p);var v=0,S=function(){};return{s:S,n:function(){return v>=T.length?{done:!0}:{done:!1,value:T[v++]}},e:function(c){throw c},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,d=!1,l;return{s:function(){p=T[Symbol.iterator]()},n:function(){var c=p.next();return b=c.done,c},e:function(c){d=!0,l=c},f:function(){try{!b&&p.return!=null&&p.return()}finally{if(d)throw l}}}}},rUJ1:function(j,Y){const D=/[&<>"']/,L=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,T=/[<>"']|&(?!#?\w+;)/g,P={"&":"&","<":"<",">":">",'"':""","'":"'"},p=O=>P[O];function v(O,C){if(C){if(D.test(O))return O.replace(L,p)}else if(g.test(O))return O.replace(T,p);return O}const S=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function b(O){return O.replace(S,(C,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 d=/(^|[^\[])\^/g;function l(O,C){O=O.source||O,C=C||"";const x={replace:(y,_)=>(_=_.source||_,_=_.replace(d,"$1"),O=O.replace(y,_),x),getRegex:()=>new RegExp(O,C)};return x}const n=/[^\w:]/g,c=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function u(O,C,x){if(O){let y;try{y=decodeURIComponent(b(x)).replace(n,"").toLowerCase()}catch(_){return null}if(y.indexOf("javascript:")===0||y.indexOf("vbscript:")===0||y.indexOf("data:")===0)return null}C&&!c.test(x)&&(x=r(C,x));try{x=encodeURI(x).replace(/%25/g,"%")}catch(y){return null}return x}const o={},h=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,s=/^([^:]+:\/*[^/]*)[\s\S]*$/;function r(O,C){o[" "+O]||(h.test(O)?o[" "+O]=O+"/":o[" "+O]=E(O,"/",!0)),O=o[" "+O];const x=O.indexOf(":")===-1;return C.substring(0,2)==="//"?x?C:O.replace(m,"$1")+C:C.charAt(0)==="/"?x?C:O.replace(s,"$1")+C:O+C}const a={exec:function(){}};function t(O){let C=1,x,y;for(;C<arguments.length;C++){x=arguments[C];for(y in x)Object.prototype.hasOwnProperty.call(x,y)&&(O[y]=x[y])}return O}function w(O,C){const x=O.replace(/\|/g,(M,I,N)=>{let G=!1,H=I;for(;--H>=0&&N[H]==="\\";)G=!G;return G?"|":" |"}),y=x.split(/ \|/);let _=0;if(y.length>C)y.splice(C);else for(;y.length<C;)y.push("");for(;_<y.length;_++)y[_]=y[_].trim().replace(/\\\|/g,"|");return y}function E(O,C,x){const y=O.length;if(y===0)return"";let _=0;for(;_<y;){const M=O.charAt(y-_-1);if(M===C&&!x)_++;else if(M!==C&&x)_++;else break}return O.substr(0,y-_)}function f(O,C){if(O.indexOf(C[1])===-1)return-1;const x=O.length;let y=0,_=0;for(;_<x;_++)if(O[_]==="\\")_++;else if(O[_]===C[0])y++;else if(O[_]===C[1]&&(y--,y<0))return _;return-1}function k(O){O&&O.sanitize&&!O.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}j.exports={escape:v,unescape:b,edit:l,cleanUrl:u,resolveUrl:r,noopTest:a,merge:t,splitCells:w,rtrim:E,findClosingBracket:f,checkSanitizeDeprecation:k}},sR1s:function(j,Y,D){"use strict";D.d(Y,"b",function(){return P}),D.d(Y,"a",function(){return p}),D.d(Y,"c",function(){return v}),D.d(Y,"d",function(){return S});var L=D("U8pU"),g="RC_TABLE_KEY";function T(b){return b==null?[]:Array.isArray(b)?b:[b]}function P(b,d){if(!d&&typeof d!="number")return b;for(var l=T(d),n=b,c=0;c<l.length;c+=1){if(!n)return null;var u=l[c];n=n[u]}return n}function p(b){var d=[],l={};return b.forEach(function(n){for(var c=n||{},u=c.key,o=c.dataIndex,h=u||T(o).join("-")||g;l[h];)h="".concat(h,"_next");l[h]=!0,d.push(h)}),d}function v(){var b={};function d(u,o){o&&Object.keys(o).forEach(function(h){var m=o[h];m&&Object(L.a)(m)==="object"?(u[h]=u[h]||{},d(u[h],m)):u[h]=m})}for(var l=arguments.length,n=new Array(l),c=0;c<l;c++)n[c]=arguments[c];return n.forEach(function(u){d(b,u)}),b}function S(b){return b!=null}},sboe:function(j,Y,D){"use strict";D.d(Y,"a",function(){return T});var L=D("q1tI"),g=D.n(L),T=L.createContext(null)},t23M:function(j,Y,D){"use strict";var L=D("VTBJ"),g=D("1OyB"),T=D("vuIU"),P=D("Ji7U"),p=D("LK+K"),v=D("q1tI"),S=D.n(v),b=D("m+aA"),d=D("Zm9Q"),l=D("Kwbf"),n=D("c+Xe"),c=D("bdgK"),u="rc-observer-key",o=function(h){Object(P.a)(s,h);var m=Object(p.a)(s);function s(){var r;return Object(g.a)(this,s),r=m.apply(this,arguments),r.resizeObserver=null,r.childNode=null,r.currentElement=null,r.state={width:0,height:0,offsetHeight:0,offsetWidth:0},r.onResize=function(a){var t=r.props.onResize,w=a[0].target,E=w.getBoundingClientRect(),f=E.width,k=E.height,O=w.offsetWidth,C=w.offsetHeight,x=Math.floor(f),y=Math.floor(k);if(r.state.width!==x||r.state.height!==y||r.state.offsetWidth!==O||r.state.offsetHeight!==C){var _={width:x,height:y,offsetWidth:O,offsetHeight:C};r.setState(_),t&&Promise.resolve().then(function(){t(Object(L.a)(Object(L.a)({},_),{},{offsetWidth:O,offsetHeight:C}))})}},r.setChildNode=function(a){r.childNode=a},r}return Object(T.a)(s,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var a=this.props.disabled;if(a){this.destroyObserver();return}var t=Object(b.a)(this.childNode||this),w=t!==this.currentElement;w&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new c.default(this.onResize),this.resizeObserver.observe(t))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var a=this.props.children,t=Object(d.a)(a);if(t.length>1)Object(l.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(t.length===0)return Object(l.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var w=t[0];if(v.isValidElement(w)&&Object(n.c)(w)){var E=w.ref;t[0]=v.cloneElement(w,{ref:Object(n.a)(E,this.setChildNode)})}return t.length===1?t[0]:t.map(function(f,k){return!v.isValidElement(f)||"key"in f&&f.key!==null?f:v.cloneElement(f,{key:"".concat(u,"-").concat(k)})})}}]),s}(v.Component);o.displayName="ResizeObserver",Y.a=o},uGsb:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("MlIO"),D("1uat"))})(this,function(L){return function(){var g=L,T=g.x64,P=T.Word,p=T.WordArray,v=g.algo,S=v.SHA512,b=v.SHA384=S.extend({_doReset:function(){this._hash=new p.init([new P.init(3418070365,3238371032),new P.init(1654270250,914150663),new P.init(2438529370,812702999),new P.init(355462360,4144912697),new P.init(1731405415,4290775857),new P.init(2394180231,1750603025),new P.init(3675008525,1694076839),new P.init(1203062813,3204075428)])},_doFinalize:function(){var d=S._doFinalize.call(this);return d.sigBytes-=16,d}});g.SHA384=S._createHelper(b),g.HmacSHA384=S._createHmacHelper(b)}(),L.SHA384})},uGxW:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("OLod"))})(this,function(L){return L.pad.NoPadding={pad:function(){},unpad:function(){}},L.pad.NoPadding})},uK0f:function(j,Y,D){(function(L,g){j.exports=g()})(this,function(){"use strict";function L(g,T,P){P=P||{},P.childrenKeyName=P.childrenKeyName||"children";var p=g||[],v=[],S=0;do{var b=p.filter(function(d){return T(d,S)})[0];if(!b)break;v.push(b),p=b[P.childrenKeyName]||[],S+=1}while(p.length>0);return v}return L})},ulZh:function(j,Y,D){typeof window!="undefined"&&function(g,T){j.exports=T()}(this,function(){return function(L){var g={};function T(P){if(g[P])return g[P].exports;var p=g[P]={i:P,l:!1,exports:{}};return L[P].call(p.exports,p,p.exports,T),p.l=!0,p.exports}return T.m=L,T.c=g,T.d=function(P,p,v){T.o(P,p)||Object.defineProperty(P,p,{enumerable:!0,get:v})},T.r=function(P){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(P,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(P,"__esModule",{value:!0})},T.t=function(P,p){if(p&1&&(P=T(P)),p&8)return P;if(p&4&&typeof P=="object"&&P&&P.__esModule)return P;var v=Object.create(null);if(T.r(v),Object.defineProperty(v,"default",{enumerable:!0,value:P}),p&2&&typeof P!="string")for(var S in P)T.d(v,S,function(b){return P[b]}.bind(null,S));return v},T.n=function(P){var p=P&&P.__esModule?function(){return P.default}:function(){return P};return T.d(p,"a",p),p},T.o=function(P,p){return Object.prototype.hasOwnProperty.call(P,p)},T.p="/dist/",T(T.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(L,g,T){"use strict";var P=Object.prototype.hasOwnProperty,p="~";function v(){}Object.create&&(v.prototype=Object.create(null),new v().__proto__||(p=!1));function S(n,c,u){this.fn=n,this.context=c,this.once=u||!1}function b(n,c,u,o,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var m=new S(u,o||n,h),s=p?p+c:c;return n._events[s]?n._events[s].fn?n._events[s]=[n._events[s],m]:n._events[s].push(m):(n._events[s]=m,n._eventsCount++),n}function d(n,c){--n._eventsCount===0?n._events=new v:delete n._events[c]}function l(){this._events=new v,this._eventsCount=0}l.prototype.eventNames=function(){var c=[],u,o;if(this._eventsCount===0)return c;for(o in u=this._events)P.call(u,o)&&c.push(p?o.slice(1):o);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},l.prototype.listeners=function(c){var u=p?p+c:c,o=this._events[u];if(!o)return[];if(o.fn)return[o.fn];for(var h=0,m=o.length,s=new Array(m);h<m;h++)s[h]=o[h].fn;return s},l.prototype.listenerCount=function(c){var u=p?p+c:c,o=this._events[u];return o?o.fn?1:o.length:0},l.prototype.emit=function(c,u,o,h,m,s){var r=p?p+c:c;if(!this._events[r])return!1;var a=this._events[r],t=arguments.length,w,E;if(a.fn){a.once&&this.removeListener(c,a.fn,void 0,!0);switch(t){case 1:return a.fn.call(a.context),!0;case 2:return a.fn.call(a.context,u),!0;case 3:return a.fn.call(a.context,u,o),!0;case 4:return a.fn.call(a.context,u,o,h),!0;case 5:return a.fn.call(a.context,u,o,h,m),!0;case 6:return a.fn.call(a.context,u,o,h,m,s),!0}for(E=1,w=new Array(t-1);E<t;E++)w[E-1]=arguments[E];a.fn.apply(a.context,w)}else{var f=a.length,k;for(E=0;E<f;E++){a[E].once&&this.removeListener(c,a[E].fn,void 0,!0);switch(t){case 1:a[E].fn.call(a[E].context);break;case 2:a[E].fn.call(a[E].context,u);break;case 3:a[E].fn.call(a[E].context,u,o);break;case 4:a[E].fn.call(a[E].context,u,o,h);break;default:if(!w)for(k=1,w=new Array(t-1);k<t;k++)w[k-1]=arguments[k];a[E].fn.apply(a[E].context,w)}}}return!0},l.prototype.on=function(c,u,o){return b(this,c,u,o,!1)},l.prototype.once=function(c,u,o){return b(this,c,u,o,!0)},l.prototype.removeListener=function(c,u,o,h){var m=p?p+c:c;if(!this._events[m])return this;if(!u)return d(this,m),this;var s=this._events[m];if(s.fn)s.fn===u&&(!h||s.once)&&(!o||s.context===o)&&d(this,m);else{for(var r=0,a=[],t=s.length;r<t;r++)(s[r].fn!==u||h&&!s[r].once||o&&s[r].context!==o)&&a.push(s[r]);a.length?this._events[m]=a.length===1?a[0]:a:d(this,m)}return this},l.prototype.removeAllListeners=function(c){var u;return c?(u=p?p+c:c,this._events[u]&&d(this,u)):(this._events=new v,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=p,l.EventEmitter=l,L.exports=l},"./node_modules/url-toolkit/src/url-toolkit.js":function(L,g,T){(function(P){var p=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,v=/^([^\/?#]*)([^]*)$/,S=/(?:\/|^)\.(?=\/)/g,b=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,d={buildAbsoluteURL:function(l,n,c){if(c=c||{},l=l.trim(),n=n.trim(),!n){if(!c.alwaysNormalize)return l;var u=d.parseURL(l);if(!u)throw new Error("Error trying to parse base URL.");return u.path=d.normalizePath(u.path),d.buildURLFromParts(u)}var o=d.parseURL(n);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return c.alwaysNormalize?(o.path=d.normalizePath(o.path),d.buildURLFromParts(o)):n;var h=d.parseURL(l);if(!h)throw new Error("Error trying to parse base URL.");if(!h.netLoc&&h.path&&h.path[0]!=="/"){var m=v.exec(h.path);h.netLoc=m[1],h.path=m[2]}h.netLoc&&!h.path&&(h.path="/");var s={scheme:h.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(s.netLoc=h.netLoc,o.path[0]!=="/"))if(!o.path)s.path=h.path,o.params||(s.params=h.params,o.query||(s.query=h.query));else{var r=h.path,a=r.substring(0,r.lastIndexOf("/")+1)+o.path;s.path=d.normalizePath(a)}return s.path===null&&(s.path=c.alwaysNormalize?d.normalizePath(o.path):o.path),d.buildURLFromParts(s)},parseURL:function(l){var n=p.exec(l);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(l){for(l=l.split("").reverse().join("").replace(S,"");l.length!==(l=l.replace(b,"")).length;);return l.split("").reverse().join("")},buildURLFromParts:function(l){return l.scheme+l.netLoc+l.path+l.params+l.query+l.fragment}};L.exports=d})(this)},"./node_modules/webworkify-webpack/index.js":function(L,g,T){function P(c){var u={};function o(m){if(u[m])return u[m].exports;var s=u[m]={i:m,l:!1,exports:{}};return c[m].call(s.exports,s,s.exports,o),s.l=!0,s.exports}o.m=c,o.c=u,o.i=function(m){return m},o.d=function(m,s,r){o.o(m,s)||Object.defineProperty(m,s,{configurable:!1,enumerable:!0,get:r})},o.r=function(m){Object.defineProperty(m,"__esModule",{value:!0})},o.n=function(m){var s=m&&m.__esModule?function(){return m.default}:function(){return m};return o.d(s,"a",s),s},o.o=function(m,s){return Object.prototype.hasOwnProperty.call(m,s)},o.p="/",o.oe=function(m){throw console.error(m),m};var h=o(o.s=ENTRY_MODULE);return h.default||h}var p="[\\.|\\-|\\+|\\w|/|@]+",v="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+p+").*?\\)";function S(c){return(c+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function b(c){return!isNaN(1*c)}function d(c,u,o){var h={};h[o]=[];var m=u.toString(),s=m.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return h;for(var r=s[1],a=new RegExp("(\\\\n|\\W)"+S(r)+v,"g"),t;t=a.exec(m);){if(t[3]==="dll-reference")continue;h[o].push(t[3])}for(a=new RegExp("\\("+S(r)+'\\("(dll-reference\\s('+p+'))"\\)\\)'+v,"g");t=a.exec(m);)c[t[2]]||(h[o].push(t[1]),c[t[2]]=T(t[1]).m),h[t[2]]=h[t[2]]||[],h[t[2]].push(t[4]);for(var w=Object.keys(h),E=0;E<w.length;E++)for(var f=0;f<h[w[E]].length;f++)b(h[w[E]][f])&&(h[w[E]][f]=1*h[w[E]][f]);return h}function l(c){var u=Object.keys(c);return u.reduce(function(o,h){return o||c[h].length>0},!1)}function n(c,u){for(var o={main:[u]},h={main:[]},m={main:{}};l(o);)for(var s=Object.keys(o),r=0;r<s.length;r++){var a=s[r],t=o[a],w=t.pop();if(m[a]=m[a]||{},m[a][w]||!c[a][w])continue;m[a][w]=!0,h[a]=h[a]||[],h[a].push(w);for(var E=d(c,c[a][w],a),f=Object.keys(E),k=0;k<f.length;k++)o[f[k]]=o[f[k]]||[],o[f[k]]=o[f[k]].concat(E[f[k]])}return h}L.exports=function(c,u){u=u||{};var o={main:T.m},h=u.all?{main:Object.keys(o.main)}:n(o,c),m="";Object.keys(h).filter(function(w){return w!=="main"}).forEach(function(w){for(var E=0;h[w][E];)E++;h[w].push(E),o[w][E]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",m=m+"var "+w+" = ("+P.toString().replace("ENTRY_MODULE",JSON.stringify(E))+")({"+h[w].map(function(f){return""+JSON.stringify(f)+": "+o[w][f].toString()}).join(",")+`});
|
|
|
`}),m=m+"new (("+P.toString().replace("ENTRY_MODULE",JSON.stringify(c))+")({"+h.main.map(function(w){return""+JSON.stringify(w)+": "+o.main[w].toString()}).join(",")+"}))(self);";var s=new window.Blob([m],{type:"text/javascript"});if(u.bare)return s;var r=window.URL||window.webkitURL||window.mozURL||window.msURL,a=r.createObjectURL(s),t=new window.Worker(a);return t.objectURL=a,t}},"./src/config.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"hlsDefaultConfig",function(){return k}),T.d(g,"mergeConfig",function(){return C}),T.d(g,"enableStreamingMode",function(){return x});var P=T("./src/controller/abr-controller.ts"),p=T("./src/controller/audio-stream-controller.ts"),v=T("./src/controller/audio-track-controller.ts"),S=T("./src/controller/subtitle-stream-controller.ts"),b=T("./src/controller/subtitle-track-controller.ts"),d=T("./src/controller/buffer-controller.ts"),l=T("./src/controller/timeline-controller.ts"),n=T("./src/controller/cap-level-controller.ts"),c=T("./src/controller/fps-controller.ts"),u=T("./src/controller/eme-controller.ts"),o=T("./src/controller/cmcd-controller.ts"),h=T("./src/utils/xhr-loader.ts"),m=T("./src/utils/fetch-loader.ts"),s=T("./src/utils/cues.ts"),r=T("./src/utils/mediakeys-helper.ts"),a=T("./src/utils/logger.ts");function t(){return t=Object.assign||function(y){for(var _=1;_<arguments.length;_++){var M=arguments[_];for(var I in M)Object.prototype.hasOwnProperty.call(M,I)&&(y[I]=M[I])}return y},t.apply(this,arguments)}function w(y,_){var M=Object.keys(y);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(y);_&&(I=I.filter(function(N){return Object.getOwnPropertyDescriptor(y,N).enumerable})),M.push.apply(M,I)}return M}function E(y){for(var _=1;_<arguments.length;_++){var M=arguments[_]!=null?arguments[_]:{};_%2?w(Object(M),!0).forEach(function(I){f(y,I,M[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(M)):w(Object(M)).forEach(function(I){Object.defineProperty(y,I,Object.getOwnPropertyDescriptor(M,I))})}return y}function f(y,_,M){return _ in y?Object.defineProperty(y,_,{value:M,enumerable:!0,configurable:!0,writable:!0}):y[_]=M,y}var k=E(E({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:h.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:P.default,bufferController:d.default,capLevelController:n.default,fpsController:c.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:r.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},O()),{},{subtitleStreamController:S.SubtitleStreamController,subtitleTrackController:b.default,timelineController:l.TimelineController,audioStreamController:p.default,audioTrackController:v.default,emeController:u.default,cmcdController:o.default});function O(){return{cueHandler:s.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function C(y,_){if((_.liveSyncDurationCount||_.liveMaxLatencyDurationCount)&&(_.liveSyncDuration||_.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(_.liveMaxLatencyDurationCount!==void 0&&(_.liveSyncDurationCount===void 0||_.liveMaxLatencyDurationCount<=_.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(_.liveMaxLatencyDuration!==void 0&&(_.liveSyncDuration===void 0||_.liveMaxLatencyDuration<=_.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return t({},y,_)}function x(y){var _=y.loader;if(_!==m.default&&_!==h.default)a.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),y.progressive=!1;else{var M=Object(m.fetchSupported)();M&&(y.loader=m.default,y.progressive=!0,y.enableSoftwareAES=!0,a.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/polyfills/number.ts"),p=T("./src/utils/ewma-bandwidth-estimator.ts"),v=T("./src/events.ts"),S=T("./src/utils/buffer-helper.ts"),b=T("./src/errors.ts"),d=T("./src/types/loader.ts"),l=T("./src/utils/logger.ts");function n(o,h){for(var m=0;m<h.length;m++){var s=h[m];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,s.key,s)}}function c(o,h,m){return h&&n(o.prototype,h),m&&n(o,m),o}var u=function(){function o(m){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=m;var s=m.config;this.bwEstimator=new p.default(s.abrEwmaSlowVoD,s.abrEwmaFastVoD,s.abrEwmaDefaultEstimate),this.registerListeners()}var h=o.prototype;return h.registerListeners=function(){var s=this.hls;s.on(v.Events.FRAG_LOADING,this.onFragLoading,this),s.on(v.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(v.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.on(v.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.on(v.Events.ERROR,this.onError,this)},h.unregisterListeners=function(){var s=this.hls;s.off(v.Events.FRAG_LOADING,this.onFragLoading,this),s.off(v.Events.FRAG_LOADED,this.onFragLoaded,this),s.off(v.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.off(v.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.off(v.Events.ERROR,this.onError,this)},h.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},h.onFragLoading=function(s,r){var a=r.frag;if(a.type===d.PlaylistLevelType.MAIN&&!this.timer){var t;this.fragCurrent=a,this.partCurrent=(t=r.part)!=null?t:null,this.timer=self.setInterval(this.onCheck,100)}},h.onLevelLoaded=function(s,r){var a=this.hls.config;r.details.live?this.bwEstimator.update(a.abrEwmaSlowLive,a.abrEwmaFastLive):this.bwEstimator.update(a.abrEwmaSlowVoD,a.abrEwmaFastVoD)},h._abandonRulesCheck=function(){var s=this.fragCurrent,r=this.partCurrent,a=this.hls,t=a.autoLevelEnabled,w=a.config,E=a.media;if(!s||!E)return;var f=r?r.stats:s.stats,k=r?r.duration:s.duration;if(f.aborted){l.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!t||E.paused||!E.playbackRate||!E.readyState)return;var O=performance.now()-f.loading.start,C=Math.abs(E.playbackRate);if(O<=500*k/C)return;var x=a.levels,y=a.minAutoLevel,_=x[s.level],M=f.total||Math.max(f.loaded,Math.round(k*_.maxBitrate/8)),I=Math.max(1,f.bwEstimate?f.bwEstimate/8:f.loaded*1e3/O),N=(M-f.loaded)/I,G=E.currentTime,H=(S.BufferHelper.bufferInfo(E,G,w.maxBufferHole).end-G)/C;if(H>=2*k/C||N<=H)return;var B=Number.POSITIVE_INFINITY,K;for(K=s.level-1;K>y;K--){var U=x[K].maxBitrate;if(B=k*U/(8*.8*I),B<H)break}if(B>=N)return;var W=this.bwEstimator.getEstimate();l.logger.warn("Fragment "+s.sn+(r?" part "+r.index:"")+" of level "+s.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+K+`
|
|
|
Current BW estimate: `+(Object(P.isFiniteNumber)(W)?(W/1024).toFixed(3):"Unknown")+` Kb/s
|
|
|
Estimated load time for current fragment: `+N.toFixed(3)+` s
|
|
|
Estimated load time for the next fragment: `+B.toFixed(3)+` s
|
|
|
Time to underbuffer: `+H.toFixed(3)+" s"),a.nextLoadLevel=K,this.bwEstimator.sample(O,f.loaded),this.clearTimer(),s.loader&&(this.fragCurrent=this.partCurrent=null,s.loader.abort()),a.trigger(v.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:s,part:r,stats:f})},h.onFragLoaded=function(s,r){var a=r.frag,t=r.part;if(a.type===d.PlaylistLevelType.MAIN&&Object(P.isFiniteNumber)(a.sn)){var w=t?t.stats:a.stats,E=t?t.duration:a.duration;if(this.clearTimer(),this.lastLoadedFragLevel=a.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var f=this.hls.levels[a.level],k=(f.loaded?f.loaded.bytes:0)+w.loaded,O=(f.loaded?f.loaded.duration:0)+E;f.loaded={bytes:k,duration:O},f.realBitrate=Math.round(8*k/O)}if(a.bitrateTest){var C={stats:w,frag:a,part:t,id:a.type};this.onFragBuffered(v.Events.FRAG_BUFFERED,C),a.bitrateTest=!1}}},h.onFragBuffered=function(s,r){var a=r.frag,t=r.part,w=t?t.stats:a.stats;if(w.aborted)return;if(a.type!==d.PlaylistLevelType.MAIN||a.sn==="initSegment")return;var E=w.parsing.end-w.loading.start;this.bwEstimator.sample(E,w.loaded),w.bwEstimate=this.bwEstimator.getEstimate(),a.bitrateTest?this.bitrateTestDelay=E/1e3:this.bitrateTestDelay=0},h.onError=function(s,r){switch(r.details){case b.ErrorDetails.FRAG_LOAD_ERROR:case b.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},h.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},h.getNextABRAutoLevel=function(){var s=this.fragCurrent,r=this.partCurrent,a=this.hls,t=a.maxAutoLevel,w=a.config,E=a.minAutoLevel,f=a.media,k=r?r.duration:s?s.duration:0,O=f?f.currentTime:0,C=f&&f.playbackRate!==0?Math.abs(f.playbackRate):1,x=this.bwEstimator?this.bwEstimator.getEstimate():w.abrEwmaDefaultEstimate,y=(S.BufferHelper.bufferInfo(f,O,w.maxBufferHole).end-O)/C,_=this.findBestLevel(x,E,t,y,w.abrBandWidthFactor,w.abrBandWidthUpFactor);if(_>=0)return _;l.logger.trace((y?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var M=k?Math.min(k,w.maxStarvationDelay):w.maxStarvationDelay,I=w.abrBandWidthFactor,N=w.abrBandWidthUpFactor;if(!y){var G=this.bitrateTestDelay;if(G){var H=k?Math.min(k,w.maxLoadingDelay):w.maxLoadingDelay;M=H-G,l.logger.trace("bitrate test took "+Math.round(1e3*G)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*M)+" ms"),I=N=1}}return _=this.findBestLevel(x,E,t,y+M,I,N),Math.max(_,0)},h.findBestLevel=function(s,r,a,t,w,E){for(var f,k=this.fragCurrent,O=this.partCurrent,C=this.lastLoadedFragLevel,x=this.hls.levels,y=x[C],_=!!(y!=null&&(f=y.details)!==null&&f!==void 0&&f.live),M=y==null?void 0:y.codecSet,I=O?O.duration:k?k.duration:0,N=a;N>=r;N--){var G=x[N];if(!G||M&&G.codecSet!==M)continue;var H=G.details,B=(O?H==null?void 0:H.partTarget:H==null?void 0:H.averagetargetduration)||I,K=void 0;N<=C?K=w*s:K=E*s;var U=x[N].maxBitrate,W=U*B/K;if(l.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+N+"/"+Math.round(K)+"/"+U+"/"+B+"/"+t+"/"+W),K>U&&(!W||_&&!this.bitrateTestDelay||W<t))return N}return-1},c(o,[{key:"nextAutoLevel",get:function(){var s=this._nextAutoLevel,r=this.bwEstimator;if(s!==-1&&(!r||!r.canEstimate()))return s;var a=this.getNextABRAutoLevel();return s!==-1&&(a=Math.min(s,a)),a},set:function(s){this._nextAutoLevel=s}}]),o}();g.default=u},"./src/controller/audio-stream-controller.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/polyfills/number.ts"),p=T("./src/controller/base-stream-controller.ts"),v=T("./src/events.ts"),S=T("./src/utils/buffer-helper.ts"),b=T("./src/controller/fragment-tracker.ts"),d=T("./src/types/level.ts"),l=T("./src/types/loader.ts"),n=T("./src/loader/fragment.ts"),c=T("./src/demux/chunk-cache.ts"),u=T("./src/demux/transmuxer-interface.ts"),o=T("./src/types/transmuxer.ts"),h=T("./src/controller/fragment-finders.ts"),m=T("./src/utils/discontinuities.ts"),s=T("./src/errors.ts"),r=T("./src/utils/logger.ts");function a(){return a=Object.assign||function(k){for(var O=1;O<arguments.length;O++){var C=arguments[O];for(var x in C)Object.prototype.hasOwnProperty.call(C,x)&&(k[x]=C[x])}return k},a.apply(this,arguments)}function t(k,O){k.prototype=Object.create(O.prototype),k.prototype.constructor=k,w(k,O)}function w(k,O){return w=Object.setPrototypeOf||function(x,y){return x.__proto__=y,x},w(k,O)}var E=100,f=function(k){t(O,k);function O(x,y){var _;return _=k.call(this,x,y,"[audio-stream-controller]")||this,_.videoBuffer=null,_.videoTrackCC=-1,_.waitingVideoCC=-1,_.audioSwitch=!1,_.trackId=-1,_.waitingData=null,_.mainDetails=null,_.bufferFlushed=!1,_._registerListeners(),_}var C=O.prototype;return C.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},C._registerListeners=function(){var y=this.hls;y.on(v.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.on(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.on(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.on(v.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(v.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),y.on(v.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.on(v.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),y.on(v.Events.ERROR,this.onError,this),y.on(v.Events.BUFFER_RESET,this.onBufferReset,this),y.on(v.Events.BUFFER_CREATED,this.onBufferCreated,this),y.on(v.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.on(v.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),y.on(v.Events.FRAG_BUFFERED,this.onFragBuffered,this)},C._unregisterListeners=function(){var y=this.hls;y.off(v.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.off(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.off(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.off(v.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(v.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),y.off(v.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.off(v.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),y.off(v.Events.ERROR,this.onError,this),y.off(v.Events.BUFFER_RESET,this.onBufferReset,this),y.off(v.Events.BUFFER_CREATED,this.onBufferCreated,this),y.off(v.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.off(v.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),y.off(v.Events.FRAG_BUFFERED,this.onFragBuffered,this)},C.onInitPtsFound=function(y,_){var M=_.frag,I=_.id,N=_.initPTS;if(I==="main"){var G=M.cc;this.initPTS[M.cc]=N,this.log("InitPTS for cc: "+G+" found from main: "+N),this.videoTrackCC=G,this.state===p.State.WAITING_INIT_PTS&&this.tick()}},C.startLoad=function(y){if(!this.levels){this.startPosition=y,this.state=p.State.STOPPED;return}var _=this.lastCurrentTime;this.stopLoad(),this.setInterval(E),this.fragLoadError=0,_>0&&y===-1?(this.log("Override startPosition with lastCurrentTime @"+_.toFixed(3)),this.state=p.State.IDLE):(this.loadedmetadata=!1,this.state=p.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=y,this.tick()},C.doTick=function(){switch(this.state){case p.State.IDLE:this.doTickIdle();break;case p.State.WAITING_TRACK:{var y,_=this.levels,M=this.trackId,I=_==null||((y=_[M])===null||y===void 0)?void 0:y.details;if(I){if(this.waitForCdnTuneIn(I))break;this.state=p.State.WAITING_INIT_PTS}break}case p.State.FRAG_LOADING_WAITING_RETRY:{var N,G=performance.now(),H=this.retryDate;(!H||G>=H||(N=this.media)!==null&&N!==void 0&&N.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=p.State.IDLE);break}case p.State.WAITING_INIT_PTS:{var B=this.waitingData;if(B){var K=B.frag,U=B.part,W=B.cache,X=B.complete;if(this.initPTS[K.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=p.State.FRAG_LOADING;var ne=W.flush(),fe={frag:K,part:U,payload:ne,networkDetails:null};this._handleFragmentLoadProgress(fe),X&&k.prototype._handleFragmentLoadComplete.call(this,fe)}else if(this.videoTrackCC!==this.waitingVideoCC)r.logger.log("Waiting fragment cc ("+K.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var me=this.getLoadPosition(),Ae=S.BufferHelper.bufferInfo(this.mediaBuffer,me,this.config.maxBufferHole),De=Object(h.fragmentWithinToleranceTest)(Ae.end,this.config.maxFragLookUpTolerance,K);De<0&&(r.logger.log("Waiting fragment cc ("+K.cc+") @ "+K.start+" cancelled because another fragment at "+Ae.end+" is needed"),this.clearWaitingFragment())}}else this.state=p.State.IDLE}}this.onTickEnd()},C.clearWaitingFragment=function(){var y=this.waitingData;y&&(this.fragmentTracker.removeFragment(y.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=p.State.IDLE)},C.onTickEnd=function(){var y=this.media;if(!y||!y.readyState)return;var _=this.mediaBuffer?this.mediaBuffer:y,M=_.buffered;!this.loadedmetadata&&M.length&&(this.loadedmetadata=!0),this.lastCurrentTime=y.currentTime},C.doTickIdle=function(){var y,_,M=this.hls,I=this.levels,N=this.media,G=this.trackId,H=M.config;if(!I||!I[G])return;if(!N&&(this.startFragRequested||!H.startFragPrefetch))return;var B=I[G],K=B.details;if(!K||K.live&&this.levelLastLoaded!==G||this.waitForCdnTuneIn(K)){this.state=p.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,n.ElementaryStreamTypes.AUDIO,l.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,l.PlaylistLevelType.AUDIO);if(U===null)return;var W=U.len,X=this.getMaxBufferLength(),ne=this.audioSwitch;if(W>=X&&!ne)return;if(!ne&&this._streamEnded(U,K)){M.trigger(v.Events.BUFFER_EOS,{type:"audio"}),this.state=p.State.ENDED;return}var fe=K.fragments,me=fe[0].start,Ae=U.end;if(ne){var De=this.getLoadPosition();Ae=De,K.PTSKnown&&De<me&&((U.end>me||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),N.currentTime=me+.05))}var ye=this.getNextFragment(Ae,K);if(!ye){this.bufferFlushed=!0;return}((y=ye.decryptdata)===null||y===void 0?void 0:y.keyFormat)==="identity"&&!((_=ye.decryptdata)!==null&&_!==void 0&&_.key)?this.loadKey(ye,K):this.loadFragment(ye,K,Ae)},C.getMaxBufferLength=function(){var y=k.prototype.getMaxBufferLength.call(this),_=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,l.PlaylistLevelType.MAIN);return _===null?y:Math.max(y,_.len)},C.onMediaDetaching=function(){this.videoBuffer=null,k.prototype.onMediaDetaching.call(this)},C.onAudioTracksUpdated=function(y,_){var M=_.audioTracks;this.resetTransmuxer(),this.levels=M.map(function(I){return new d.Level(I)})},C.onAudioTrackSwitching=function(y,_){var M=!!_.url;this.trackId=_.id;var I=this.fragCurrent;I!=null&&I.loader&&I.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),M?this.setInterval(E):this.resetTransmuxer(),M?(this.audioSwitch=!0,this.state=p.State.IDLE):this.state=p.State.STOPPED,this.tick()},C.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},C.onLevelLoaded=function(y,_){this.mainDetails=_.details},C.onAudioTrackLoaded=function(y,_){var M,I=this.levels,N=_.details,G=_.id;if(!I){this.warn("Audio tracks were reset while loading level "+G);return}this.log("Track "+G+" loaded ["+N.startSN+","+N.endSN+"],duration:"+N.totalduration);var H=I[G],B=0;if(N.live||(M=H.details)!==null&&M!==void 0&&M.live){var K=this.mainDetails;if(N.fragments[0]||(N.deltaUpdateFailed=!0),N.deltaUpdateFailed||!K)return;!H.details&&N.hasProgramDateTime&&K.hasProgramDateTime?(Object(m.alignMediaPlaylistByPDT)(N,K),B=N.fragments[0].start):B=this.alignPlaylists(N,H.details)}H.details=N,this.levelLastLoaded=G,!this.startFragRequested&&(this.mainDetails||!N.live)&&this.setStartPosition(H.details,B),this.state===p.State.WAITING_TRACK&&!this.waitForCdnTuneIn(N)&&(this.state=p.State.IDLE),this.tick()},C._handleFragmentLoadProgress=function(y){var _,M=y.frag,I=y.part,N=y.payload,G=this.config,H=this.trackId,B=this.levels;if(!B){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+M.sn+" of level "+M.level+" will not be buffered");return}var K=B[H];console.assert(K,"Audio track is defined on fragment load progress");var U=K.details;console.assert(U,"Audio track details are defined on fragment load progress");var W=G.defaultAudioCodec||K.audioCodec||"mp4a.40.2",X=this.transmuxer;X||(X=this.transmuxer=new u.default(this.hls,l.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ne=this.initPTS[M.cc],fe=(_=M.initSegment)===null||_===void 0?void 0:_.data;if(ne!==void 0){var me=!1,Ae=I?I.index:-1,De=Ae!==-1,ye=new o.ChunkMetadata(M.level,M.sn,M.stats.chunkCount,N.byteLength,Ae,De);X.push(N,fe,W,"",M,I,U.totalduration,me,ye,ne)}else{r.logger.log("Unknown video PTS for cc "+M.cc+", waiting for video PTS before demuxing audio frag "+M.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+H);var Oe=this.waitingData=this.waitingData||{frag:M,part:I,cache:new c.default,complete:!1},xe=Oe.cache;xe.push(new Uint8Array(N)),this.waitingVideoCC=this.videoTrackCC,this.state=p.State.WAITING_INIT_PTS}},C._handleFragmentLoadComplete=function(y){if(this.waitingData){this.waitingData.complete=!0;return}k.prototype._handleFragmentLoadComplete.call(this,y)},C.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},C.onBufferCreated=function(y,_){var M=_.tracks.audio;M&&(this.mediaBuffer=M.buffer),_.tracks.video&&(this.videoBuffer=_.tracks.video.buffer)},C.onFragBuffered=function(y,_){var M=_.frag,I=_.part;if(M.type!==l.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(M)){this.warn("Fragment "+M.sn+(I?" p: "+I.index:"")+" of level "+M.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}M.sn!=="initSegment"&&(this.fragPrevious=M,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(v.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(M,I)},C.onError=function(y,_){switch(_.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(l.PlaylistLevelType.AUDIO,_);break;case s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==p.State.ERROR&&this.state!==p.State.STOPPED&&(this.state=_.fatal?p.State.ERROR:p.State.IDLE,this.warn(_.details+" while loading frag, switching to "+this.state+" state"));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(_.parent==="audio"&&(this.state===p.State.PARSING||this.state===p.State.PARSED)){var M=!0,I=this.getFwdBufferInfo(this.mediaBuffer,l.PlaylistLevelType.AUDIO);I&&I.len>.5&&(M=!this.reduceMaxBufferLength(I.len)),M&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,k.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},C.onBufferFlushed=function(y,_){var M=_.type;M===n.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},C._handleTransmuxComplete=function(y){var _,M="audio",I=this.hls,N=y.remuxResult,G=y.chunkMeta,H=this.getCurrentContext(G);if(!H){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 B=H.frag,K=H.part,U=N.audio,W=N.text,X=N.id3,ne=N.initSegment;if(this.fragContextChanged(B))return;if(this.state=p.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),ne!=null&&ne.tracks&&(this._bufferInitSegment(ne.tracks,B,G),I.trigger(v.Events.FRAG_PARSING_INIT_SEGMENT,{frag:B,id:M,tracks:ne.tracks})),U){var fe=U.startPTS,me=U.endPTS,Ae=U.startDTS,De=U.endDTS;K&&(K.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:fe,endPTS:me,startDTS:Ae,endDTS:De}),B.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,fe,me,Ae,De),this.bufferFragmentData(U,B,K,G)}if(X!=null&&(_=X.samples)!==null&&_!==void 0&&_.length){var ye=a({frag:B,id:M},X);I.trigger(v.Events.FRAG_PARSING_METADATA,ye)}if(W){var Oe=a({frag:B,id:M},W);I.trigger(v.Events.FRAG_PARSING_USERDATA,Oe)}},C._bufferInitSegment=function(y,_,M){if(this.state!==p.State.PARSING)return;y.video&&delete y.video;var I=y.audio;if(!I)return;I.levelCodec=I.codec,I.id="audio",this.log("Init audio buffer, container:"+I.container+", codecs[parsed]=["+I.codec+"]"),this.hls.trigger(v.Events.BUFFER_CODECS,y);var N=I.initSegment;if(N!=null&&N.byteLength){var G={type:"audio",frag:_,part:null,chunkMeta:M,parent:_.type,data:N};this.hls.trigger(v.Events.BUFFER_APPENDING,G)}this.tick()},C.loadFragment=function(y,_,M){var I=this.fragmentTracker.getState(y);this.fragCurrent=y,(this.audioSwitch||I===b.FragmentState.NOT_LOADED||I===b.FragmentState.PARTIAL)&&(y.sn==="initSegment"?this._loadInitSegment(y):_.live&&!Object(P.isFiniteNumber)(this.initPTS[y.cc])?(this.log("Waiting for video PTS in continuity counter "+y.cc+" of live stream before loading audio fragment "+y.sn+" of level "+this.trackId),this.state=p.State.WAITING_INIT_PTS):(this.startFragRequested=!0,k.prototype.loadFragment.call(this,y,_,M)))},C.completeAudioSwitch=function(){var y=this.hls,_=this.media,M=this.trackId;_&&(this.log("Switching audio track : flushing all audio"),k.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,y.trigger(v.Events.AUDIO_TRACK_SWITCHED,{id:M})},O}(p.default);g.default=f},"./src/controller/audio-track-controller.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/events.ts"),p=T("./src/errors.ts"),v=T("./src/controller/base-playlist-controller.ts"),S=T("./src/types/loader.ts");function b(u,o){for(var h=0;h<o.length;h++){var m=o[h];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(u,m.key,m)}}function d(u,o,h){return o&&b(u.prototype,o),h&&b(u,h),u}function l(u,o){u.prototype=Object.create(o.prototype),u.prototype.constructor=u,n(u,o)}function n(u,o){return n=Object.setPrototypeOf||function(m,s){return m.__proto__=s,m},n(u,o)}var c=function(u){l(o,u);function o(m){var s;return s=u.call(this,m,"[audio-track-controller]")||this,s.tracks=[],s.groupId=null,s.tracksInGroup=[],s.trackId=-1,s.trackName="",s.selectDefaultTrack=!0,s.registerListeners(),s}var h=o.prototype;return h.registerListeners=function(){var s=this.hls;s.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.on(P.Events.LEVEL_LOADING,this.onLevelLoading,this),s.on(P.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.on(P.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.on(P.Events.ERROR,this.onError,this)},h.unregisterListeners=function(){var s=this.hls;s.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.off(P.Events.LEVEL_LOADING,this.onLevelLoading,this),s.off(P.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.off(P.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.off(P.Events.ERROR,this.onError,this)},h.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,u.prototype.destroy.call(this)},h.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},h.onManifestParsed=function(s,r){this.tracks=r.audioTracks||[]},h.onAudioTrackLoaded=function(s,r){var a=r.id,t=r.details,w=this.tracksInGroup[a];if(!w){this.warn("Invalid audio track id "+a);return}var E=w.details;w.details=r.details,this.log("audioTrack "+a+" loaded ["+t.startSN+"-"+t.endSN+"]"),a===this.trackId&&(this.retryCount=0,this.playlistLoaded(a,r,E))},h.onLevelLoading=function(s,r){this.switchLevel(r.level)},h.onLevelSwitching=function(s,r){this.switchLevel(r.level)},h.switchLevel=function(s){var r=this.hls.levels[s];if(!(r!=null&&r.audioGroupIds))return;var a=r.audioGroupIds[r.urlId];if(this.groupId!==a){this.groupId=a;var t=this.tracks.filter(function(E){return!a||E.groupId===a});this.selectDefaultTrack&&!t.some(function(E){return E.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=t;var w={audioTracks:t};this.log("Updating audio tracks, "+t.length+' track(s) found in "'+a+'" group-id'),this.hls.trigger(P.Events.AUDIO_TRACKS_UPDATED,w),this.selectInitialTrack()}},h.onError=function(s,r){if(u.prototype.onError.call(this,s,r),r.fatal||!r.context)return;r.context.type===S.PlaylistContextType.AUDIO_TRACK&&r.context.id===this.trackId&&r.context.groupId===this.groupId&&this.retryLoadingOrFail(r)},h.setAudioTrack=function(s){var r=this.tracksInGroup;if(s<0||s>=r.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var a=r[this.trackId];this.log("Now switching to audio-track index "+s);var t=r[s],w=t.id,E=t.groupId,f=E===void 0?"":E,k=t.name,O=t.type,C=t.url;if(this.trackId=s,this.trackName=k,this.selectDefaultTrack=!1,this.hls.trigger(P.Events.AUDIO_TRACK_SWITCHING,{id:w,groupId:f,name:k,type:O,url:C}),t.details&&!t.details.live)return;var x=this.switchParams(t.url,a==null?void 0:a.details);this.loadPlaylist(x)},h.selectInitialTrack=function(){var s=this.tracksInGroup;console.assert(s.length,"Initial audio track should be selected when tracks are known");var r=this.trackName,a=this.findTrackId(r)||this.findTrackId();a!==-1?this.setAudioTrack(a):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},h.findTrackId=function(s){for(var r=this.tracksInGroup,a=0;a<r.length;a++){var t=r[a];if((!this.selectDefaultTrack||t.default)&&(!s||s===t.name))return t.id}return-1},h.loadPlaylist=function(s){var r=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(r)){var a=r.id,t=r.groupId,w=r.url;if(s)try{w=s.addDirectives(w)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("loading audio-track playlist for id: "+a),this.clearTimer(),this.hls.trigger(P.Events.AUDIO_TRACK_LOADING,{url:w,id:a,groupId:t,deliveryDirectives:s||null})}},d(o,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(s){this.selectDefaultTrack=!1,this.setAudioTrack(s)}}]),o}(v.default);g.default=c},"./src/controller/base-playlist-controller.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return d});var P=T("./src/polyfills/number.ts"),p=T("./src/types/level.ts"),v=T("./src/controller/level-helper.ts"),S=T("./src/utils/logger.ts"),b=T("./src/errors.ts"),d=function(){function l(c,u){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=S.logger.log.bind(S.logger,u+":"),this.warn=S.logger.warn.bind(S.logger,u+":"),this.hls=c}var n=l.prototype;return n.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},n.onError=function(u,o){o.fatal&&o.type===b.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},n.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},n.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},n.stopLoad=function(){this.canLoad=!1,this.clearTimer()},n.switchParams=function(u,o){var h=o==null?void 0:o.renditionReports;if(h)for(var m=0;m<h.length;m++){var s=h[m],r=""+s.URI;if(r===u.substr(-r.length)){var a=parseInt(s["LAST-MSN"]),t=parseInt(s["LAST-PART"]);if(o&&this.hls.config.lowLatencyMode){var w=Math.min(o.age-o.partTarget,o.targetduration);t!==void 0&&w>o.partTarget&&(t+=1)}if(Object(P.isFiniteNumber)(a))return new p.HlsUrlParameters(a,Object(P.isFiniteNumber)(t)?t:void 0,p.HlsSkip.No)}}},n.loadPlaylist=function(u){},n.shouldLoadTrack=function(u){return this.canLoad&&u&&!!u.url&&(!u.details||u.details.live)},n.playlistLoaded=function(u,o,h){var m=this,s=o.details,r=o.stats,a=r.loading.end?Math.max(0,self.performance.now()-r.loading.end):0;if(s.advancedDateTime=Date.now()-a,s.live||h!=null&&h.live){if(s.reloaded(h),h&&this.log("live playlist "+u+" "+(s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:"MISSED")),h&&s.fragments.length>0&&Object(v.mergeDetails)(h,s),!this.canLoad||!s.live)return;var t,w=void 0,E=void 0;if(s.canBlockReload&&s.endSN&&s.advanced){var f=this.hls.config.lowLatencyMode,k=s.lastPartSn,O=s.endSN,C=s.lastPartIndex,x=C!==-1,y=k===O,_=f?0:C;x?(w=y?O+1:k,E=y?_:C+1):w=O+1;var M=s.age,I=M+s.ageHeader,N=Math.min(I-s.partTarget,s.targetduration*1.5);if(N>0){if(h&&N>h.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+h.tuneInGoal+" to: "+N+" with playlist age: "+s.age),N=0;else{var G=Math.floor(N/s.targetduration);if(w+=G,E!==void 0){var H=Math.round(N%s.targetduration/s.partTarget);E+=H}this.log("CDN Tune-in age: "+s.ageHeader+"s last advanced "+M.toFixed(2)+"s goal: "+N+" skip sn "+G+" to part "+E)}s.tuneInGoal=N}if(t=this.getDeliveryDirectives(s,o.deliveryDirectives,w,E),f||!y){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(s,o.deliveryDirectives,w,E);var B=Object(v.computeReloadInterval)(s,r);w!==void 0&&s.canBlockReload&&(B-=s.partTarget||1),this.log("reload live playlist "+u+" in "+Math.round(B)+" ms"),this.timer=self.setTimeout(function(){return m.loadPlaylist(t)},B)}else this.clearTimer()},n.getDeliveryDirectives=function(u,o,h,m){var s=Object(p.getSkipValue)(u,h);return o!=null&&o.skip&&u.deltaUpdateFailed&&(h=o.msn,m=o.part,s=p.HlsSkip.No),new p.HlsUrlParameters(h,m,s)},n.retryLoadingOrFail=function(u){var o=this,h=this.hls.config,m=this.retryCount<h.levelLoadingMaxRetry;if(m){var s;if(this.retryCount++,u.details.indexOf("LoadTimeOut")>-1&&(s=u.context)!==null&&s!==void 0&&s.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+u.details+'"'),this.loadPlaylist();else{var r=Math.min(Math.pow(2,this.retryCount)*h.levelLoadingRetryDelay,h.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return o.loadPlaylist()},r),this.warn("retry playlist loading #"+this.retryCount+" in "+r+' ms after "'+u.details+'"')}}else this.warn('cannot recover from error "'+u.details+'"'),this.clearTimer(),u.fatal=!0;return m},l}()},"./src/controller/base-stream-controller.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"State",function(){return O}),T.d(g,"default",function(){return C});var P=T("./src/polyfills/number.ts"),p=T("./src/task-loop.ts"),v=T("./src/controller/fragment-tracker.ts"),S=T("./src/utils/buffer-helper.ts"),b=T("./src/utils/logger.ts"),d=T("./src/events.ts"),l=T("./src/errors.ts"),n=T("./src/types/transmuxer.ts"),c=T("./src/utils/mp4-tools.ts"),u=T("./src/utils/discontinuities.ts"),o=T("./src/controller/fragment-finders.ts"),h=T("./src/controller/level-helper.ts"),m=T("./src/loader/fragment-loader.ts"),s=T("./src/crypt/decrypter.ts"),r=T("./src/utils/time-ranges.ts"),a=T("./src/types/loader.ts");function t(x,y){for(var _=0;_<y.length;_++){var M=y[_];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(x,M.key,M)}}function w(x,y,_){return y&&t(x.prototype,y),_&&t(x,_),x}function E(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function f(x,y){x.prototype=Object.create(y.prototype),x.prototype.constructor=x,k(x,y)}function k(x,y){return k=Object.setPrototypeOf||function(M,I){return M.__proto__=I,M},k(x,y)}var O={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},C=function(x){f(y,x);function y(M,I,N){var G;return G=x.call(this)||this,G.hls=void 0,G.fragPrevious=null,G.fragCurrent=null,G.fragmentTracker=void 0,G.transmuxer=null,G._state=O.STOPPED,G.media=void 0,G.mediaBuffer=void 0,G.config=void 0,G.bitrateTest=!1,G.lastCurrentTime=0,G.nextLoadPosition=0,G.startPosition=0,G.loadedmetadata=!1,G.fragLoadError=0,G.retryDate=0,G.levels=null,G.fragmentLoader=void 0,G.levelLastLoaded=null,G.startFragRequested=!1,G.decrypter=void 0,G.initPTS=[],G.onvseeking=null,G.onvended=null,G.logPrefix="",G.log=void 0,G.warn=void 0,G.logPrefix=N,G.log=b.logger.log.bind(b.logger,N+":"),G.warn=b.logger.warn.bind(b.logger,N+":"),G.hls=M,G.fragmentLoader=new m.default(M.config),G.fragmentTracker=I,G.config=M.config,G.decrypter=new s.default(M,M.config),M.on(d.Events.KEY_LOADED,G.onKeyLoaded,E(G)),G}var _=y.prototype;return _.doTick=function(){this.onTickEnd()},_.onTickEnd=function(){},_.startLoad=function(I){},_.stopLoad=function(){this.fragmentLoader.abort();var I=this.fragCurrent;I&&this.fragmentTracker.removeFragment(I),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=O.STOPPED},_._streamEnded=function(I,N){var G=this.fragCurrent,H=this.fragmentTracker;if(!N.live&&G&&G.sn===N.endSN&&!I.nextStart){var B=H.getState(G);return B===v.FragmentState.PARTIAL||B===v.FragmentState.OK}return!1},_.onMediaAttached=function(I,N){var G=this.media=this.mediaBuffer=N.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),G.addEventListener("seeking",this.onvseeking),G.addEventListener("ended",this.onvended);var H=this.config;this.levels&&H.autoStartLoad&&this.state===O.STOPPED&&this.startLoad(H.startPosition)},_.onMediaDetaching=function(){var I=this.media;I!=null&&I.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),I&&(I.removeEventListener("seeking",this.onvseeking),I.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},_.onMediaSeeking=function(){var I=this.config,N=this.fragCurrent,G=this.media,H=this.mediaBuffer,B=this.state,K=G?G.currentTime:0,U=S.BufferHelper.bufferInfo(H||G,K,I.maxBufferHole);if(this.log("media seeking to "+(Object(P.isFiniteNumber)(K)?K.toFixed(3):K)+", state: "+B),B===O.ENDED)this.resetLoadingState();else if(N&&!U.len){var W=I.maxFragLookUpTolerance,X=N.start-W,ne=N.start+N.duration+W,fe=K>ne;(K<X||fe)&&(fe&&N.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),N.loader.abort()),this.resetLoadingState())}G&&(this.lastCurrentTime=K),!this.loadedmetadata&&!U.len&&(this.nextLoadPosition=this.startPosition=K),this.tickImmediate()},_.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},_.onKeyLoaded=function(I,N){if(this.state!==O.KEY_LOADING||N.frag!==this.fragCurrent||!this.levels)return;this.state=O.IDLE;var G=this.levels[N.frag.level].details;G&&this.loadFragment(N.frag,G,N.frag.start)},_.onHandlerDestroying=function(){this.stopLoad(),x.prototype.onHandlerDestroying.call(this)},_.onHandlerDestroyed=function(){this.state=O.STOPPED,this.hls.off(d.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,x.prototype.onHandlerDestroyed.call(this)},_.loadKey=function(I,N){this.log("Loading key for "+I.sn+" of ["+N.startSN+"-"+N.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+I.level),this.state=O.KEY_LOADING,this.fragCurrent=I,this.hls.trigger(d.Events.KEY_LOADING,{frag:I})},_.loadFragment=function(I,N,G){this._loadFragForPlayback(I,N,G)},_._loadFragForPlayback=function(I,N,G){var H=this,B=function(U){if(H.fragContextChanged(I)){H.warn("Fragment "+I.sn+(U.part?" p: "+U.part.index:"")+" of level "+I.level+" was dropped during download."),H.fragmentTracker.removeFragment(I);return}I.stats.chunkCount++,H._handleFragmentLoadProgress(U)};this._doFragLoad(I,N,G,B).then(function(K){if(!K)return;H.fragLoadError=0;var U=H.state;if(H.fragContextChanged(I)){(U===O.FRAG_LOADING||U===O.BACKTRACKING||!H.fragCurrent&&U===O.PARSING)&&(H.fragmentTracker.removeFragment(I),H.state=O.IDLE);return}if("payload"in K&&(H.log("Loaded fragment "+I.sn+" of level "+I.level),H.hls.trigger(d.Events.FRAG_LOADED,K),H.state===O.BACKTRACKING)){H.fragmentTracker.backtrack(I,K),H.resetFragmentLoading(I);return}H._handleFragmentLoadComplete(K)}).catch(function(K){H.warn(K),H.resetFragmentLoading(I)})},_.flushMainBuffer=function(I,N,G){if(G===void 0&&(G=null),!(I-N))return;var H={startOffset:I,endOffset:N,type:G};this.fragLoadError=0,this.hls.trigger(d.Events.BUFFER_FLUSHING,H)},_._loadInitSegment=function(I){var N=this;this._doFragLoad(I).then(function(G){if(!G||N.fragContextChanged(I)||!N.levels)throw new Error("init load aborted");return G}).then(function(G){var H=N.hls,B=G.payload,K=I.decryptdata;if(B&&B.byteLength>0&&K&&K.key&&K.iv&&K.method==="AES-128"){var U=self.performance.now();return N.decrypter.webCryptoDecrypt(new Uint8Array(B),K.key.buffer,K.iv.buffer).then(function(W){var X=self.performance.now();return H.trigger(d.Events.FRAG_DECRYPTED,{frag:I,payload:W,stats:{tstart:U,tdecrypt:X}}),G.payload=W,G})}return G}).then(function(G){var H=N.fragCurrent,B=N.hls,K=N.levels;if(!K)throw new Error("init load aborted, missing levels");var U=K[I.level].details;console.assert(U,"Level details are defined when init segment is loaded");var W=I.stats;N.state=O.IDLE,N.fragLoadError=0,I.data=new Uint8Array(G.payload),W.parsing.start=W.buffering.start=self.performance.now(),W.parsing.end=W.buffering.end=self.performance.now(),G.frag===H&&B.trigger(d.Events.FRAG_BUFFERED,{stats:W,frag:H,part:null,id:I.type}),N.tick()}).catch(function(G){N.warn(G),N.resetFragmentLoading(I)})},_.fragContextChanged=function(I){var N=this.fragCurrent;return!I||!N||I.level!==N.level||I.sn!==N.sn||I.urlId!==N.urlId},_.fragBufferedComplete=function(I,N){var G=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+I.type+" sn: "+I.sn+(N?" part: "+N.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+I.level+" "+r.default.toString(S.BufferHelper.getBuffered(G))),this.state=O.IDLE,this.tick()},_._handleFragmentLoadComplete=function(I){var N=this.transmuxer;if(!N)return;var G=I.frag,H=I.part,B=I.partsLoaded,K=!B||B.length===0||B.some(function(W){return!W}),U=new n.ChunkMetadata(G.level,G.sn,G.stats.chunkCount+1,0,H?H.index:-1,!K);N.flush(U)},_._handleFragmentLoadProgress=function(I){},_._doFragLoad=function(I,N,G,H){var B=this;if(G===void 0&&(G=null),!this.levels)throw new Error("frag load aborted, missing levels");if(G=Math.max(I.start,G||0),this.config.lowLatencyMode&&N){var K=N.partList;if(K&&H){G>I.end&&N.fragmentHint&&(I=N.fragmentHint);var U=this.getNextPart(K,I,G);if(U>-1){var W=K[U];return this.log("Loading part sn: "+I.sn+" p: "+W.index+" cc: "+I.cc+" of playlist ["+N.startSN+"-"+N.endSN+"] parts [0-"+U+"-"+(K.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+I.level+", target: "+parseFloat(G.toFixed(3))),this.nextLoadPosition=W.start+W.duration,this.state=O.FRAG_LOADING,this.hls.trigger(d.Events.FRAG_LOADING,{frag:I,part:K[U],targetBufferTime:G}),this.doFragPartsLoad(I,K,U,H).catch(function(X){return B.handleFragLoadError(X)})}else if(!I.url||this.loadedEndOfParts(K,G))return Promise.resolve(null)}}return this.log("Loading fragment "+I.sn+" cc: "+I.cc+" "+(N?"of ["+N.startSN+"-"+N.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+I.level+", target: "+parseFloat(G.toFixed(3))),Object(P.isFiniteNumber)(I.sn)&&!this.bitrateTest&&(this.nextLoadPosition=I.start+I.duration),this.state=O.FRAG_LOADING,this.hls.trigger(d.Events.FRAG_LOADING,{frag:I,targetBufferTime:G}),this.fragmentLoader.load(I,H).catch(function(X){return B.handleFragLoadError(X)})},_.doFragPartsLoad=function(I,N,G,H){var B=this;return new Promise(function(K,U){var W=[],X=function ne(fe){var me=N[fe];B.fragmentLoader.loadPart(I,me,H).then(function(Ae){W[me.index]=Ae;var De=Ae.part;B.hls.trigger(d.Events.FRAG_LOADED,Ae);var ye=N[fe+1];if(ye&&ye.fragment===I)ne(fe+1);else return K({frag:I,part:De,partsLoaded:W})}).catch(U)};X(G)})},_.handleFragLoadError=function(I){var N=I.data;return N&&N.details===l.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(N.frag,N.part):this.hls.trigger(d.Events.ERROR,N),null},_._handleTransmuxerFlush=function(I){var N=this.getCurrentContext(I);if(!N||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var G=N.frag,H=N.part,B=N.level,K=self.performance.now();G.stats.parsing.end=K,H&&(H.stats.parsing.end=K),this.updateLevelTiming(G,H,B,I.partial)},_.getCurrentContext=function(I){var N=this.levels,G=I.level,H=I.sn,B=I.part;if(!N||!N[G])return this.warn("Levels object was unset while buffering fragment "+H+" of level "+G+". The current chunk will not be buffered."),null;var K=N[G],U=B>-1?Object(h.getPartWith)(K,H,B):null,W=U?U.fragment:Object(h.getFragmentWithSN)(K,H,this.fragCurrent);return W?{frag:W,part:U,level:K}:null},_.bufferFragmentData=function(I,N,G,H){if(!I||this.state!==O.PARSING)return;var B=I.data1,K=I.data2,U=B;if(B&&K&&(U=Object(c.appendUint8Array)(B,K)),!U||!U.length)return;var W={type:I.type,frag:N,part:G,chunkMeta:H,parent:N.type,data:U};this.hls.trigger(d.Events.BUFFER_APPENDING,W),I.dropped&&I.independent&&!G&&this.flushBufferGap(N)},_.flushBufferGap=function(I){var N=this.media;if(!N)return;if(!S.BufferHelper.isBuffered(N,N.currentTime)){this.flushMainBuffer(0,I.start);return}var G=N.currentTime,H=S.BufferHelper.bufferInfo(N,G,0),B=I.duration,K=Math.min(this.config.maxFragLookUpTolerance*2,B*.25),U=Math.max(Math.min(I.start-K,H.end-K),G+K);I.start-U>K&&this.flushMainBuffer(U,I.start)},_.getFwdBufferInfo=function(I,N){var G=this.config,H=this.getLoadPosition();if(!Object(P.isFiniteNumber)(H))return null;var B=S.BufferHelper.bufferInfo(I,H,G.maxBufferHole);if(B.len===0&&B.nextStart!==void 0){var K=this.fragmentTracker.getBufferedFrag(H,N);if(K&&B.nextStart<K.end)return S.BufferHelper.bufferInfo(I,H,Math.max(B.nextStart,G.maxBufferHole))}return B},_.getMaxBufferLength=function(I){var N=this.config,G;return I?G=Math.max(8*N.maxBufferSize/I,N.maxBufferLength):G=N.maxBufferLength,Math.min(G,N.maxMaxBufferLength)},_.reduceMaxBufferLength=function(I){var N=this.config,G=I||N.maxBufferLength;return N.maxMaxBufferLength>=G?(N.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+N.maxMaxBufferLength+"s"),!0):!1},_.getNextFragment=function(I,N){var G,H,B=N.fragments,K=B.length;if(!K)return null;var U=this.config,W=B[0].start,X;if(N.live){var ne=U.initialLiveManifestSize;if(K<ne)return this.warn("Not enough fragments to start playback (have: "+K+", need: "+ne+")"),null;!N.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(X=this.getInitialLiveFragment(N,B),this.startPosition=X?this.hls.liveSyncPosition||X.start:I)}else I<=W&&(X=B[0]);if(!X){var fe=U.lowLatencyMode?N.partEnd:N.fragmentEnd;X=this.getFragmentAtPosition(I,fe,N)}return(G=X)!==null&&G!==void 0&&G.initSegment&&!((H=X)!==null&&H!==void 0&&H.initSegment.data)&&!this.bitrateTest&&(X=X.initSegment),X},_.getNextPart=function(I,N,G){for(var H=-1,B=!1,K=!0,U=0,W=I.length;U<W;U++){var X=I[U];if(K=K&&!X.independent,H>-1&&G<X.start)break;var ne=X.loaded;!ne&&(B||X.independent||K)&&X.fragment===N&&(H=U),B=ne}return H},_.loadedEndOfParts=function(I,N){var G=I[I.length-1];return G&&N>G.start&&G.loaded},_.getInitialLiveFragment=function(I,N){var G=this.fragPrevious,H=null;if(G){if(I.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+G.programDateTime),H=Object(o.findFragmentByPDT)(N,G.endProgramDateTime,this.config.maxFragLookUpTolerance)),!H){var B=G.sn+1;if(B>=I.startSN&&B<=I.endSN){var K=N[B-I.startSN];G.cc===K.cc&&(H=K,this.log("Live playlist, switching playlist, load frag with next SN: "+H.sn))}H||(H=Object(o.findFragWithCC)(N,G.cc),H&&this.log("Live playlist, switching playlist, load frag with same CC: "+H.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(H=this.getFragmentAtPosition(U,this.bitrateTest?I.fragmentEnd:I.edge,I))}return H},_.getFragmentAtPosition=function(I,N,G){var H=this.config,B=this.fragPrevious,K=G.fragments,U=G.endSN,W=G.fragmentHint,X=H.maxFragLookUpTolerance,ne=!!(H.lowLatencyMode&&G.partList&&W);ne&&W&&!this.bitrateTest&&(K=K.concat(W),U=W.sn);var fe;if(I<N){var me=I>N-X?0:X;fe=Object(o.findFragmentByPTS)(B,K,I,me)}else fe=K[K.length-1];if(fe){var Ae=fe.sn-G.startSN,De=B&&fe.level===B.level,ye=K[Ae+1],Oe=this.fragmentTracker.getState(fe);if(Oe===v.FragmentState.BACKTRACKED){fe=null;for(var xe=Ae;K[xe]&&this.fragmentTracker.getState(K[xe])===v.FragmentState.BACKTRACKED;)B?fe=K[xe--]:fe=K[--xe];fe||(fe=ye)}else B&&fe.sn===B.sn&&!ne&&(De&&(fe.sn<U&&this.fragmentTracker.getState(ye)!==v.FragmentState.OK?(this.log("SN "+fe.sn+" just loaded, load next one: "+ye.sn),fe=ye):fe=null))}return fe},_.synchronizeToLiveEdge=function(I){var N=this.config,G=this.media;if(!G)return;var H=this.hls.liveSyncPosition,B=G.currentTime,K=I.fragments[0].start,U=I.edge,W=B>=K-N.maxFragLookUpTolerance&&B<=U;if(H!==null&&G.duration>H&&(B<H||!W)){var X=N.liveMaxLatencyDuration!==void 0?N.liveMaxLatencyDuration:N.liveMaxLatencyDurationCount*I.targetduration;(!W&&G.readyState<4||B<U-X)&&(this.loadedmetadata||(this.nextLoadPosition=H),G.readyState&&(this.warn("Playback: "+B.toFixed(3)+" is located too far from the end of live sliding playlist: "+U+", reset currentTime to : "+H.toFixed(3)),G.currentTime=H))}},_.alignPlaylists=function(I,N){var G=this.levels,H=this.levelLastLoaded,B=this.fragPrevious,K=H!==null?G[H]:null,U=I.fragments.length;if(!U)return this.warn("No fragments in live playlist"),0;var W=I.fragments[0].start,X=!N,ne=I.alignedSliding&&Object(P.isFiniteNumber)(W);if(X||!ne&&!W){Object(u.alignStream)(B,K,I);var fe=I.fragments[0].start;return this.log("Live playlist sliding: "+fe.toFixed(2)+" start-sn: "+(N?N.startSN:"na")+"->"+I.startSN+" prev-sn: "+(B?B.sn:"na")+" fragments: "+U),fe}return W},_.waitForCdnTuneIn=function(I){var N=3;return I.live&&I.canBlockReload&&I.tuneInGoal>Math.max(I.partHoldBack,I.partTarget*N)},_.setStartPosition=function(I,N){var G=this.startPosition;if(G<N&&(G=-1),G===-1||this.lastCurrentTime===-1){var H=I.startTimeOffset;Object(P.isFiniteNumber)(H)?(G=N+H,H<0&&(G+=I.totalduration),G=Math.min(Math.max(N,G),N+I.totalduration),this.log("Start time offset "+H+" found in playlist, adjust startPosition to "+G),this.startPosition=G):I.live?G=this.hls.liveSyncPosition||N:this.startPosition=G=0,this.lastCurrentTime=G}this.nextLoadPosition=G},_.getLoadPosition=function(){var I=this.media,N=0;return this.loadedmetadata&&I?N=I.currentTime:this.nextLoadPosition&&(N=this.nextLoadPosition),N},_.handleFragLoadAborted=function(I,N){this.transmuxer&&I.sn!=="initSegment"&&I.stats.aborted&&(this.warn("Fragment "+I.sn+(N?" part"+N.index:"")+" of level "+I.level+" was aborted"),this.resetFragmentLoading(I))},_.resetFragmentLoading=function(I){(!this.fragCurrent||!this.fragContextChanged(I))&&(this.state=O.IDLE)},_.onFragmentOrKeyLoadError=function(I,N){if(N.fatal)return;var G=N.frag;if(!G||G.type!==I)return;var H=this.fragCurrent;console.assert(H&&G.sn===H.sn&&G.level===H.level&&G.urlId===H.urlId,"Frag load error must match current frag to retry");var B=this.config;if(this.fragLoadError+1<=B.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(G.level))return;var K=Math.min(Math.pow(2,this.fragLoadError)*B.fragLoadingRetryDelay,B.fragLoadingMaxRetryTimeout);this.warn("Fragment "+G.sn+" of "+I+" "+G.level+" failed to load, retrying in "+K+"ms"),this.retryDate=self.performance.now()+K,this.fragLoadError++,this.state=O.FRAG_LOADING_WAITING_RETRY}else N.levelRetry?(I===a.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=O.IDLE):(b.logger.error(N.details+" reaches max retry, redispatch as fatal ..."),N.fatal=!0,this.hls.stopLoad(),this.state=O.ERROR)},_.afterBufferFlushed=function(I,N,G){if(!I)return;var H=S.BufferHelper.getBuffered(I);this.fragmentTracker.detectEvictedFragments(N,H,G),this.state===O.ENDED&&this.resetLoadingState()},_.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=O.IDLE},_.resetLiveStartWhenNotLoaded=function(I){if(!this.loadedmetadata){this.startFragRequested=!1;var N=this.levels?this.levels[I].details:null;if(N!=null&&N.live)return this.startPosition=-1,this.setStartPosition(N,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},_.updateLevelTiming=function(I,N,G,H){var B=this,K=G.details;console.assert(!!K,"level.details must be defined");var U=Object.keys(I.elementaryStreams).reduce(function(W,X){var ne=I.elementaryStreams[X];if(ne){var fe=ne.endPTS-ne.startPTS;if(fe<=0)return B.warn("Could not parse fragment "+I.sn+" "+X+" duration reliably ("+fe+") resetting transmuxer to fallback to playlist timing"),B.resetTransmuxer(),W||!1;var me=H?0:Object(h.updateFragPTSDTS)(K,I,ne.startPTS,ne.endPTS,ne.startDTS,ne.endDTS);return B.hls.trigger(d.Events.LEVEL_PTS_UPDATED,{details:K,level:G,drift:me,type:X,frag:I,start:ne.startPTS,end:ne.endPTS}),!0}return W},!1);U?(this.state=O.PARSED,this.hls.trigger(d.Events.FRAG_PARSED,{frag:I,part:N})):this.resetLoadingState()},_.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},w(y,[{key:"state",get:function(){return this._state},set:function(I){var N=this._state;N!==I&&(this._state=I,this.log(N+"->"+I))}}]),y}(p.default)},"./src/controller/buffer-controller.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return o});var P=T("./src/polyfills/number.ts"),p=T("./src/events.ts"),v=T("./src/utils/logger.ts"),S=T("./src/errors.ts"),b=T("./src/utils/buffer-helper.ts"),d=T("./src/utils/mediasource-helper.ts"),l=T("./src/loader/fragment.ts"),n=T("./src/controller/buffer-operation-queue.ts"),c=Object(d.getMediaSource)(),u=/([ha]vc.)(?:\.[^.,]+)+/,o=function(){function h(s){var r=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var a=r.hls,t=r.media,w=r.mediaSource;v.logger.log("[buffer-controller]: Media source opened"),t&&(r.updateMediaElementDuration(),a.trigger(p.Events.MEDIA_ATTACHED,{media:t})),w&&w.removeEventListener("sourceopen",r._onMediaSourceOpen),r.checkPendingTracks()},this._onMediaSourceClose=function(){v.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){v.logger.log("[buffer-controller]: Media source ended")},this.hls=s,this._initSourceBuffer(),this.registerListeners()}var m=h.prototype;return m.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},m.destroy=function(){this.unregisterListeners(),this.details=null},m.registerListeners=function(){var r=this.hls;r.on(p.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(p.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(p.Events.BUFFER_RESET,this.onBufferReset,this),r.on(p.Events.BUFFER_APPENDING,this.onBufferAppending,this),r.on(p.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.on(p.Events.BUFFER_EOS,this.onBufferEos,this),r.on(p.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),r.on(p.Events.LEVEL_UPDATED,this.onLevelUpdated,this),r.on(p.Events.FRAG_PARSED,this.onFragParsed,this),r.on(p.Events.FRAG_CHANGED,this.onFragChanged,this)},m.unregisterListeners=function(){var r=this.hls;r.off(p.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(p.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(p.Events.BUFFER_RESET,this.onBufferReset,this),r.off(p.Events.BUFFER_APPENDING,this.onBufferAppending,this),r.off(p.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.off(p.Events.BUFFER_EOS,this.onBufferEos,this),r.off(p.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),r.off(p.Events.LEVEL_UPDATED,this.onLevelUpdated,this),r.off(p.Events.FRAG_PARSED,this.onFragParsed,this),r.off(p.Events.FRAG_CHANGED,this.onFragChanged,this)},m._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new n.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},m.onManifestParsed=function(r,a){var t=2;(a.audio&&!a.video||!a.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,v.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},m.onMediaAttaching=function(r,a){var t=this.media=a.media;if(t&&c){var w=this.mediaSource=new c;w.addEventListener("sourceopen",this._onMediaSourceOpen),w.addEventListener("sourceended",this._onMediaSourceEnded),w.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(w),this._objectUrl=t.src}},m.onMediaDetaching=function(){var r=this.media,a=this.mediaSource,t=this._objectUrl;if(a){if(v.logger.log("[buffer-controller]: media source detaching"),a.readyState==="open")try{a.endOfStream()}catch(w){v.logger.warn("[buffer-controller]: onMediaDetaching: "+w.message+" while calling endOfStream")}this.onBufferReset(),a.removeEventListener("sourceopen",this._onMediaSourceOpen),a.removeEventListener("sourceended",this._onMediaSourceEnded),a.removeEventListener("sourceclose",this._onMediaSourceClose),r&&(t&&self.URL.revokeObjectURL(t),r.src===t?(r.removeAttribute("src"),r.load()):v.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(p.Events.MEDIA_DETACHED,void 0)},m.onBufferReset=function(){var r=this;this.getSourceBufferTypes().forEach(function(a){var t=r.sourceBuffer[a];try{t&&(r.removeBufferListeners(a),r.mediaSource&&r.mediaSource.removeSourceBuffer(t),r.sourceBuffer[a]=void 0)}catch(w){v.logger.warn("[buffer-controller]: Failed to reset the "+a+" buffer",w)}}),this._initSourceBuffer()},m.onBufferCodecs=function(r,a){var t=this,w=this.getSourceBufferTypes().length;if(Object.keys(a).forEach(function(E){if(w){var f=t.tracks[E];if(f&&typeof f.buffer.changeType=="function"){var k=a[E],O=k.codec,C=k.levelCodec,x=k.container,y=(f.levelCodec||f.codec).replace(u,"$1"),_=(C||O).replace(u,"$1");if(y!==_){var M=x+";codecs="+(C||O);t.appendChangeType(E,M)}}}else t.pendingTracks[E]=a[E]}),w)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},m.appendChangeType=function(r,a){var t=this,w=this.operationQueue,E={execute:function(){var k=t.sourceBuffer[r];k&&(v.logger.log("[buffer-controller]: changing "+r+" sourceBuffer type to "+a),k.changeType(a)),w.shiftAndExecuteNext(r)},onStart:function(){},onComplete:function(){},onError:function(k){v.logger.warn("[buffer-controller]: Failed to change "+r+" SourceBuffer type",k)}};w.append(E,r)},m.onBufferAppending=function(r,a){var t=this,w=this.hls,E=this.operationQueue,f=this.tracks,k=a.data,O=a.type,C=a.frag,x=a.part,y=a.chunkMeta,_=y.buffering[O],M=self.performance.now();_.start=M;var I=C.stats.buffering,N=x?x.stats.buffering:null;I.start===0&&(I.start=M),N&&N.start===0&&(N.start=M);var G=f.audio,H=O==="audio"&&y.id===1&&(G==null?void 0:G.container)==="audio/mpeg",B={execute:function(){if(_.executeStart=self.performance.now(),H){var U=t.sourceBuffer[O];if(U){var W=C.start-U.timestampOffset;Math.abs(W)>=.1&&(v.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+C.start+" (delta: "+W+") sn: "+C.sn+")"),U.timestampOffset=C.start)}}t.appendExecutor(k,O)},onStart:function(){},onComplete:function(){var U=self.performance.now();_.executeEnd=_.end=U,I.first===0&&(I.first=U),N&&N.first===0&&(N.first=U);var W=t.sourceBuffer,X={};for(var ne in W)X[ne]=b.BufferHelper.getBuffered(W[ne]);t.appendError=0,t.hls.trigger(p.Events.BUFFER_APPENDED,{type:O,frag:C,part:x,chunkMeta:y,parent:C.type,timeRanges:X})},onError:function(U){v.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",U);var W={type:S.ErrorTypes.MEDIA_ERROR,parent:C.type,details:S.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?W.details=S.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,W.details=S.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>w.config.appendErrorMaxRetry&&(v.logger.error("[buffer-controller]: Failed "+w.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),W.fatal=!0)),w.trigger(p.Events.ERROR,W)}};E.append(B,O)},m.onBufferFlushing=function(r,a){var t=this,w=this.operationQueue,E=function(k){return{execute:t.removeExecutor.bind(t,k,a.startOffset,a.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(p.Events.BUFFER_FLUSHED,{type:k})},onError:function(C){v.logger.warn("[buffer-controller]: Failed to remove from "+k+" SourceBuffer",C)}}};a.type?w.append(E(a.type),a.type):this.getSourceBufferTypes().forEach(function(f){w.append(E(f),f)})},m.onFragParsed=function(r,a){var t=this,w=a.frag,E=a.part,f=[],k=E?E.elementaryStreams:w.elementaryStreams;k[l.ElementaryStreamTypes.AUDIOVIDEO]?f.push("audiovideo"):(k[l.ElementaryStreamTypes.AUDIO]&&f.push("audio"),k[l.ElementaryStreamTypes.VIDEO]&&f.push("video"));var O=function(){var x=self.performance.now();w.stats.buffering.end=x,E&&(E.stats.buffering.end=x);var y=E?E.stats:w.stats;t.hls.trigger(p.Events.FRAG_BUFFERED,{frag:w,part:E,stats:y,id:w.type})};f.length===0&&v.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+w.type+" level: "+w.level+" sn: "+w.sn),this.blockBuffers(O,f)},m.onFragChanged=function(r,a){this.flushBackBuffer()},m.onBufferEos=function(r,a){var t=this,w=this.getSourceBufferTypes().reduce(function(E,f){var k=t.sourceBuffer[f];return(!a.type||a.type===f)&&(k&&!k.ended&&(k.ended=!0,v.logger.log("[buffer-controller]: "+f+" sourceBuffer now EOS"))),E&&!!(!k||k.ended)},!0);w&&this.blockBuffers(function(){var E=t.mediaSource;if(!E||E.readyState!=="open")return;E.endOfStream()})},m.onLevelUpdated=function(r,a){var t=a.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},m.flushBackBuffer=function(){var r=this.hls,a=this.details,t=this.media,w=this.sourceBuffer;if(!t||a===null)return;var E=this.getSourceBufferTypes();if(!E.length)return;var f=a.live&&r.config.liveBackBufferLength!==null?r.config.liveBackBufferLength:r.config.backBufferLength;if(!Object(P.isFiniteNumber)(f)||f<0)return;var k=t.currentTime,O=a.levelTargetDuration,C=Math.max(f,O),x=Math.floor(k/O)*O-C;E.forEach(function(y){var _=w[y];if(_){var M=b.BufferHelper.getBuffered(_);M.length>0&&x>M.start(0)&&(r.trigger(p.Events.BACK_BUFFER_REACHED,{bufferEnd:x}),a.live&&r.trigger(p.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:x}),r.trigger(p.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:x,type:y}))}})},m.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var r=this.details,a=this.hls,t=this.media,w=this.mediaSource,E=r.fragments[0].start+r.totalduration,f=t.duration,k=Object(P.isFiniteNumber)(w.duration)?w.duration:0;r.live&&a.config.liveDurationInfinity?(v.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),w.duration=Infinity,this.updateSeekableRange(r)):(E>k&&E>f||!Object(P.isFiniteNumber)(f))&&(v.logger.log("[buffer-controller]: Updating Media Source duration to "+E.toFixed(3)),w.duration=E)},m.updateSeekableRange=function(r){var a=this.mediaSource,t=r.fragments,w=t.length;if(w&&r.live&&a!==null&&a!==void 0&&a.setLiveSeekableRange){var E=Math.max(0,t[0].start),f=Math.max(E,E+r.totalduration);a.setLiveSeekableRange(E,f)}},m.checkPendingTracks=function(){var r=this.bufferCodecEventsExpected,a=this.operationQueue,t=this.pendingTracks,w=Object.keys(t).length;if(w&&!r||w===2){this.createSourceBuffers(t),this.pendingTracks={};var E=this.getSourceBufferTypes();if(E.length===0){this.hls.trigger(p.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}E.forEach(function(f){a.executeNext(f)})}},m.createSourceBuffers=function(r){var a=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var w=0;for(var E in r)if(!a[E]){var f=r[E];if(!f)throw Error("source buffer exists for track "+E+", however track does not");var k=f.levelCodec||f.codec,O=f.container+";codecs="+k;v.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var C=a[E]=t.addSourceBuffer(O),x=E;this.addBufferListener(x,"updatestart",this._onSBUpdateStart),this.addBufferListener(x,"updateend",this._onSBUpdateEnd),this.addBufferListener(x,"error",this._onSBUpdateError),this.tracks[E]={buffer:C,codec:k,container:f.container,levelCodec:f.levelCodec,id:f.id},w++}catch(y){v.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+y.message),this.hls.trigger(p.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:y,mimeType:O})}}w&&this.hls.trigger(p.Events.BUFFER_CREATED,{tracks:this.tracks})},m._onSBUpdateStart=function(r){var a=this.operationQueue,t=a.current(r);t.onStart()},m._onSBUpdateEnd=function(r){var a=this.operationQueue,t=a.current(r);t.onComplete(),a.shiftAndExecuteNext(r)},m._onSBUpdateError=function(r,a){v.logger.error("[buffer-controller]: "+r+" SourceBuffer error",a),this.hls.trigger(p.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(r);t&&t.onError(a)},m.removeExecutor=function(r,a,t){var w=this.media,E=this.mediaSource,f=this.operationQueue,k=this.sourceBuffer,O=k[r];if(!w||!E||!O){v.logger.warn("[buffer-controller]: Attempting to remove from the "+r+" SourceBuffer, but it does not exist"),f.shiftAndExecuteNext(r);return}var C=Object(P.isFiniteNumber)(w.duration)?w.duration:Infinity,x=Object(P.isFiniteNumber)(E.duration)?E.duration:Infinity,y=Math.max(0,a),_=Math.min(t,C,x);_>y?(v.logger.log("[buffer-controller]: Removing ["+y+","+_+"] from the "+r+" SourceBuffer"),console.assert(!O.updating,r+" sourceBuffer must not be updating"),O.remove(y,_)):f.shiftAndExecuteNext(r)},m.appendExecutor=function(r,a){var t=this.operationQueue,w=this.sourceBuffer,E=w[a];if(!E){v.logger.warn("[buffer-controller]: Attempting to append to the "+a+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(a);return}E.ended=!1,console.assert(!E.updating,a+" sourceBuffer must not be updating"),E.appendBuffer(r)},m.blockBuffers=function(r,a){var t=this;if(a===void 0&&(a=this.getSourceBufferTypes()),!a.length){v.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(r);return}var w=this.operationQueue,E=a.map(function(f){return w.appendBlocker(f)});Promise.all(E).then(function(){r(),a.forEach(function(f){var k=t.sourceBuffer[f];(!k||!k.updating)&&w.shiftAndExecuteNext(f)})})},m.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},m.addBufferListener=function(r,a,t){var w=this.sourceBuffer[r];if(!w)return;var E=t.bind(this,r);this.listeners[r].push({event:a,listener:E}),w.addEventListener(a,E)},m.removeBufferListeners=function(r){var a=this.sourceBuffer[r];if(!a)return;this.listeners[r].forEach(function(t){a.removeEventListener(t.event,t.listener)})},h}()},"./src/controller/buffer-operation-queue.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return p});var P=T("./src/utils/logger.ts"),p=function(){function v(b){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=b}var S=v.prototype;return S.append=function(d,l){var n=this.queues[l];n.push(d),n.length===1&&this.buffers[l]&&this.executeNext(l)},S.insertAbort=function(d,l){var n=this.queues[l];n.unshift(d),this.executeNext(l)},S.appendBlocker=function(d){var l,n=new Promise(function(u){l=u}),c={execute:l,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(c,d),n},S.executeNext=function(d){var l=this.buffers,n=this.queues,c=l[d],u=n[d];if(u.length){var o=u[0];try{o.execute()}catch(h){P.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(h),(!c||!c.updating)&&(u.shift(),this.executeNext(d))}}},S.shiftAndExecuteNext=function(d){this.queues[d].shift(),this.executeNext(d)},S.current=function(d){return this.queues[d][0]},v}()},"./src/controller/cap-level-controller.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/events.ts");function p(b,d){for(var l=0;l<d.length;l++){var n=d[l];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(b,n.key,n)}}function v(b,d,l){return d&&p(b.prototype,d),l&&p(b,l),b}var S=function(){function b(l){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=l,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var d=b.prototype;return d.setStreamController=function(n){this.streamController=n},d.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},d.registerListeners=function(){var n=this.hls;n.on(P.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),n.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},d.unregisterListener=function(){var n=this.hls;n.off(P.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),n.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},d.onFpsDropLevelCapping=function(n,c){b.isLevelAllowed(c.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(c.droppedLevel)},d.onMediaAttaching=function(n,c){this.media=c.media instanceof HTMLVideoElement?c.media:null},d.onManifestParsed=function(n,c){var u=this.hls;this.restrictedLevels=[],this.firstLevel=c.firstLevel,u.config.capLevelToPlayerSize&&c.video&&this.startCapping()},d.onBufferCodecs=function(n,c){var u=this.hls;u.config.capLevelToPlayerSize&&c.video&&this.startCapping()},d.onMediaDetaching=function(){this.stopCapping()},d.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var n=this.hls.levels;if(n.length){var c=this.hls;c.autoLevelCapping=this.getMaxLevel(n.length-1),c.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=c.autoLevelCapping}}},d.getMaxLevel=function(n){var c=this,u=this.hls.levels;if(!u.length)return-1;var o=u.filter(function(h,m){return b.isLevelAllowed(m,c.restrictedLevels)&&m<=n});return this.clientRect=null,b.getMaxLevelByMediaSize(o,this.mediaWidth,this.mediaHeight)},d.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()},d.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},d.getDimensions=function(){if(this.clientRect)return this.clientRect;var n=this.media,c={width:0,height:0};if(n){var u=n.getBoundingClientRect();c.width=u.width,c.height=u.height,!c.width&&!c.height&&(c.width=u.right-u.left||n.width||0,c.height=u.bottom-u.top||n.height||0)}return this.clientRect=c,c},b.isLevelAllowed=function(n,c){return c===void 0&&(c=[]),c.indexOf(n)===-1},b.getMaxLevelByMediaSize=function(n,c,u){if(!n||!n.length)return-1;for(var o=function(a,t){return t?a.width!==t.width||a.height!==t.height:!0},h=n.length-1,m=0;m<n.length;m+=1){var s=n[m];if((s.width>=c||s.height>=u)&&o(s,n[m+1])){h=m;break}}return h},v(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 n=1;try{n=self.devicePixelRatio}catch(c){}return n}}]),b}();g.default=S},"./src/controller/cmcd-controller.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return o});var P=T("./src/events.ts"),p=T("./src/types/cmcd.ts"),v=T("./src/utils/buffer-helper.ts"),S=T("./src/utils/logger.ts");function b(h,m){for(var s=0;s<m.length;s++){var r=m[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(h,r.key,r)}}function d(h,m,s){return m&&b(h.prototype,m),s&&b(h,s),h}function l(h,m){var s=typeof Symbol!="undefined"&&h[Symbol.iterator]||h["@@iterator"];if(s)return(s=s.call(h)).next.bind(s);if(Array.isArray(h)||(s=n(h))||m&&h&&typeof h.length=="number"){s&&(h=s);var r=0;return function(){return r>=h.length?{done:!0}:{done:!1,value:h[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n(h,m){if(!h)return;if(typeof h=="string")return c(h,m);var s=Object.prototype.toString.call(h).slice(8,-1);if(s==="Object"&&h.constructor&&(s=h.constructor.name),s==="Map"||s==="Set")return Array.from(h);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return c(h,m)}function c(h,m){(m==null||m>h.length)&&(m=h.length);for(var s=0,r=new Array(m);s<m;s++)r[s]=h[s];return r}function u(){return u=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var s=arguments[m];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(h[r]=s[r])}return h},u.apply(this,arguments)}var o=function(){function h(s){var r=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){r.initialized&&(r.starved=!0),r.buffering=!0},this.onPlaying=function(){r.initialized||(r.initialized=!0),r.buffering=!1},this.applyPlaylistData=function(w){try{r.apply(w,{ot:p.CMCDObjectType.MANIFEST,su:!r.initialized})}catch(E){S.logger.warn("Could not generate manifest CMCD data.",E)}},this.applyFragmentData=function(w){try{var E=w.frag,f=r.hls.levels[E.level],k=r.getObjectType(E),O={d:E.duration*1e3,ot:k};(k===p.CMCDObjectType.VIDEO||k===p.CMCDObjectType.AUDIO||k==p.CMCDObjectType.MUXED)&&(O.br=f.bitrate/1e3,O.tb=r.getTopBandwidth(k),O.bl=r.getBufferLength(k)),r.apply(w,O)}catch(C){S.logger.warn("Could not generate segment CMCD data.",C)}},this.hls=s;var a=this.config=s.config,t=a.cmcd;t!=null&&(a.pLoader=this.createPlaylistLoader(),a.fLoader=this.createFragmentLoader(),this.sid=t.sessionId||h.uuid(),this.cid=t.contentId,this.useHeaders=t.useHeaders===!0,this.registerListeners())}var m=h.prototype;return m.registerListeners=function(){var r=this.hls;r.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.on(P.Events.MEDIA_DETACHED,this.onMediaDetached,this),r.on(P.Events.BUFFER_CREATED,this.onBufferCreated,this)},m.unregisterListeners=function(){var r=this.hls;r.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.off(P.Events.MEDIA_DETACHED,this.onMediaDetached,this),r.off(P.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},m.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},m.onMediaAttached=function(r,a){this.media=a.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},m.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},m.onBufferCreated=function(r,a){var t,w;this.audioBuffer=(t=a.tracks.audio)===null||t===void 0?void 0:t.buffer,this.videoBuffer=(w=a.tracks.video)===null||w===void 0?void 0:w.buffer},m.createData=function(){var r;return{v:p.CMCDVersion,sf:p.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(r=this.media)===null||r===void 0?void 0:r.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},m.apply=function(r,a){a===void 0&&(a={}),u(a,this.createData());var t=a.ot===p.CMCDObjectType.INIT||a.ot===p.CMCDObjectType.VIDEO||a.ot===p.CMCDObjectType.MUXED;if(this.starved&&t&&(a.bs=!0,a.su=!0,this.starved=!1),a.su==null&&(a.su=this.buffering),this.useHeaders){var w=h.toHeaders(a);if(!Object.keys(w).length)return;r.headers||(r.headers={}),u(r.headers,w)}else{var E=h.toQuery(a);if(!E)return;r.url=h.appendQueryToUri(r.url,E)}},m.getObjectType=function(r){var a=r.type;return a==="subtitle"?p.CMCDObjectType.TIMED_TEXT:r.sn==="initSegment"?p.CMCDObjectType.INIT:a==="audio"?p.CMCDObjectType.AUDIO:a==="main"?this.hls.audioTracks.length?p.CMCDObjectType.VIDEO:p.CMCDObjectType.MUXED:void 0},m.getTopBandwidth=function(r){for(var a=0,t=r===p.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,w=l(t),E;!(E=w()).done;){var f=E.value;f.bitrate>a&&(a=f.bitrate)}return a>0?a:NaN},m.getBufferLength=function(r){var a=this.hls.media,t=r===p.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!a)return NaN;var w=v.BufferHelper.bufferInfo(t,a.currentTime,this.config.maxBufferHole);return w.len*1e3},m.createPlaylistLoader=function(){var r=this.config.pLoader,a=this.applyPlaylistData,t=r||this.config.loader;return function(){function w(f){this.loader=void 0,this.loader=new t(f)}var E=w.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(k,O,C){a(k),this.loader.load(k,O,C)},d(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},m.createFragmentLoader=function(){var r=this.config.fLoader,a=this.applyFragmentData,t=r||this.config.loader;return function(){function w(f){this.loader=void 0,this.loader=new t(f)}var E=w.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(k,O,C){a(k),this.loader.load(k,O,C)},d(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},h.uuid=function(){var r=URL.createObjectURL(new Blob),a=r.toString();return URL.revokeObjectURL(r),a.substr(a.lastIndexOf("/")+1)},h.serialize=function(r){for(var a=[],t=function(H){return!Number.isNaN(H)&&H!=null&&H!==""&&H!==!1},w=function(H){return Math.round(H)},E=function(H){return w(H/100)*100},f=function(H){return encodeURIComponent(H)},k={br:w,d:w,bl:E,dl:E,mtp:E,nor:f,rtp:E,tb:w},O=Object.keys(r||{}).sort(),C=l(O),x;!(x=C()).done;){var y=x.value,_=r[y];if(!t(_))continue;if(y==="v"&&_===1)continue;if(y=="pr"&&_===1)continue;var M=k[y];M&&(_=M(_));var I=typeof _,N=void 0;y==="ot"||y==="sf"||y==="st"?N=y+"="+_:I==="boolean"?N=y:I==="number"?N=y+"="+_:N=y+"="+JSON.stringify(_),a.push(N)}return a.join(",")},h.toHeaders=function(r){for(var a=Object.keys(r),t={},w=["Object","Request","Session","Status"],E=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},k=0,O=a;k<O.length;k++){var C=O[k],x=f[C]!=null?f[C]:1;E[x][C]=r[C]}for(var y=0;y<E.length;y++){var _=h.serialize(E[y]);_&&(t["CMCD-"+w[y]]=_)}return t},h.toQuery=function(r){return"CMCD="+encodeURIComponent(h.serialize(r))},h.appendQueryToUri=function(r,a){if(!a)return r;var t=r.includes("?")?"&":"?";return""+r+t+a},h}()},"./src/controller/eme-controller.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/events.ts"),p=T("./src/errors.ts"),v=T("./src/utils/logger.ts"),S=T("./src/utils/mediakeys-helper.ts");function b(o,h){for(var m=0;m<h.length;m++){var s=h[m];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,s.key,s)}}function d(o,h,m){return h&&b(o.prototype,h),m&&b(o,m),o}var l=3,n=function(h,m,s){var r={audioCapabilities:[],videoCapabilities:[]};return h.forEach(function(a){r.audioCapabilities.push({contentType:'audio/mp4; codecs="'+a+'"',robustness:s.audioRobustness||""})}),m.forEach(function(a){r.videoCapabilities.push({contentType:'video/mp4; codecs="'+a+'"',robustness:s.videoRobustness||""})}),[r]},c=function(h,m,s,r){switch(h){case S.KeySystems.WIDEVINE:return n(m,s,r);default:throw new Error("Unknown key-system: "+h)}},u=function(){function o(m){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=m,this._config=m.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var h=o.prototype;return h.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},h._registerListeners=function(){this.hls.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(P.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this)},h._unregisterListeners=function(){this.hls.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(P.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this)},h.getLicenseServerUrl=function(s){switch(s){case S.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+s+'"')},h._attemptKeySystemAccess=function(s,r,a){var t=this,w=c(s,r,a,this._drmSystemOptions);v.logger.log("Requesting encrypted media key-system access");var E=this.requestMediaKeySystemAccess(s,w);this.mediaKeysPromise=E.then(function(f){return t._onMediaKeySystemAccessObtained(s,f)}),E.catch(function(f){v.logger.error('Failed to obtain key-system "'+s+'" access:',f)})},h._onMediaKeySystemAccessObtained=function(s,r){var a=this;v.logger.log('Access for key-system "'+s+'" obtained');var t={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:r,mediaKeySystemDomain:s};this._mediaKeysList.push(t);var w=Promise.resolve().then(function(){return r.createMediaKeys()}).then(function(E){return t.mediaKeys=E,v.logger.log('Media-keys created for key-system "'+s+'"'),a._onMediaKeysCreated(),E});return w.catch(function(E){v.logger.error("Failed to create media-keys:",E)}),w},h._onMediaKeysCreated=function(){var s=this;this._mediaKeysList.forEach(function(r){r.mediaKeysSession||(r.mediaKeysSession=r.mediaKeys.createSession(),s._onNewMediaKeySession(r.mediaKeysSession))})},h._onNewMediaKeySession=function(s){var r=this;v.logger.log("New key-system session "+s.sessionId),s.addEventListener("message",function(a){r._onKeySessionMessage(s,a.message)},!1)},h._onKeySessionMessage=function(s,r){v.logger.log("Got EME message event, creating license request"),this._requestLicense(r,function(a){v.logger.log("Received license data (length: "+(a&&a.byteLength)+"), updating key-session"),s.update(a)})},h.onMediaEncrypted=function(s){var r=this;if(v.logger.log('Media is encrypted using "'+s.initDataType+'" init data type'),!this.mediaKeysPromise){v.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var a=function(w){if(!r._media)return;r._attemptSetMediaKeys(w),r._generateRequestWithPreferredKeySession(s.initDataType,s.initData)};this.mediaKeysPromise.then(a).catch(a)},h._attemptSetMediaKeys=function(s){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var r=this._mediaKeysList[0];if(!r||!r.mediaKeys){v.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}v.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(r.mediaKeys),this._hasSetMediaKeys=!0}},h._generateRequestWithPreferredKeySession=function(s,r){var a=this,t=this._mediaKeysList[0];if(!t){v.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(t.mediaKeysSessionInitialized){v.logger.warn("Key-Session already initialized but requested again");return}var w=t.mediaKeysSession;if(!w){v.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!r){v.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}v.logger.log('Generating key-session request for "'+s+'" init data type'),t.mediaKeysSessionInitialized=!0,w.generateRequest(s,r).then(function(){v.logger.debug("Key-session generation succeeded")}).catch(function(E){v.logger.error("Error generating key-session request:",E),a.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},h._createLicenseXhr=function(s,r,a){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,t,s,r,a);var w=this._licenseXhrSetup;if(w)try{w.call(this.hls,t,s),w=void 0}catch(E){v.logger.error(E)}try{t.readyState||t.open("POST",s,!0),w&&w.call(this.hls,t,s)}catch(E){throw new Error("issue setting up KeySystem license XHR "+E)}return t},h._onLicenseRequestReadyStageChange=function(s,r,a,t){switch(s.readyState){case 4:if(s.status===200){this._requestLicenseFailureCount=0,v.logger.log("License request succeeded");var w=s.response,E=this._licenseResponseCallback;if(E)try{w=E.call(this.hls,s,r)}catch(k){v.logger.error(k)}t(w)}else{if(v.logger.error("License Request XHR failed ("+r+"). Status: "+s.status+" ("+s.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>l){this.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var f=l-this._requestLicenseFailureCount+1;v.logger.warn("Retrying license request, "+f+" attempts left"),this._requestLicense(a,t)}break}},h._generateLicenseRequestChallenge=function(s,r){switch(s.mediaKeySystemDomain){case S.KeySystems.WIDEVINE:return r}throw new Error("unsupported key-system: "+s.mediaKeySystemDomain)},h._requestLicense=function(s,r){v.logger.log("Requesting content license for key-system");var a=this._mediaKeysList[0];if(!a){v.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(a.mediaKeySystemDomain),w=this._createLicenseXhr(t,s,r);v.logger.log("Sending license request to URL: "+t);var E=this._generateLicenseRequestChallenge(a,s);w.send(E)}catch(f){v.logger.error("Failure requesting DRM license: "+f),this.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},h.onMediaAttached=function(s,r){if(!this._emeEnabled)return;var a=r.media;this._media=a,a.addEventListener("encrypted",this._onMediaEncrypted)},h.onMediaDetached=function(){var s=this._media,r=this._mediaKeysList;if(!s)return;s.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(r.map(function(a){if(a.mediaKeysSession)return a.mediaKeysSession.close().catch(function(){})})).then(function(){return s.setMediaKeys(null)}).catch(function(){})},h.onManifestParsed=function(s,r){if(!this._emeEnabled)return;var a=r.levels.map(function(w){return w.audioCodec}).filter(function(w){return!!w}),t=r.levels.map(function(w){return w.videoCodec}).filter(function(w){return!!w});this._attemptKeySystemAccess(S.KeySystems.WIDEVINE,a,t)},d(o,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),o}();g.default=u},"./src/controller/fps-controller.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/events.ts"),p=T("./src/utils/logger.ts"),v=function(){function S(d){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=d,this.registerListeners()}var b=S.prototype;return b.setStreamController=function(l){this.streamController=l},b.registerListeners=function(){this.hls.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},b.unregisterListeners=function(){this.hls.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching)},b.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},b.onMediaAttaching=function(l,n){var c=this.hls.config;if(c.capLevelOnFPSDrop){var u=n.media instanceof self.HTMLVideoElement?n.media:null;this.media=u,u&&typeof u.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),c.fpsDroppedMonitoringPeriod)}},b.checkFPS=function(l,n,c){var u=performance.now();if(n){if(this.lastTime){var o=u-this.lastTime,h=c-this.lastDroppedFrames,m=n-this.lastDecodedFrames,s=1e3*h/o,r=this.hls;if(r.trigger(P.Events.FPS_DROP,{currentDropped:h,currentDecoded:m,totalDroppedFrames:c}),s>0&&h>r.config.fpsDroppedMonitoringThreshold*m){var a=r.currentLevel;p.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+a),a>0&&(r.autoLevelCapping===-1||r.autoLevelCapping>=a)&&(a=a-1,r.trigger(P.Events.FPS_DROP_LEVEL_CAPPING,{level:a,droppedLevel:r.currentLevel}),r.autoLevelCapping=a,this.streamController.nextLevelSwitch())}}this.lastTime=u,this.lastDroppedFrames=c,this.lastDecodedFrames=n}},b.checkFPSInterval=function(){var l=this.media;if(l)if(this.isVideoPlaybackQualityAvailable){var n=l.getVideoPlaybackQuality();this.checkFPS(l,n.totalVideoFrames,n.droppedVideoFrames)}else this.checkFPS(l,l.webkitDecodedFrameCount,l.webkitDroppedFrameCount)},S}();g.default=v},"./src/controller/fragment-finders.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"findFragmentByPDT",function(){return v}),T.d(g,"findFragmentByPTS",function(){return S}),T.d(g,"fragmentWithinToleranceTest",function(){return b}),T.d(g,"pdtWithinToleranceTest",function(){return d}),T.d(g,"findFragWithCC",function(){return l});var P=T("./src/polyfills/number.ts"),p=T("./src/utils/binary-search.ts");function v(n,c,u){if(c===null||!Array.isArray(n)||!n.length||!Object(P.isFiniteNumber)(c))return null;var o=n[0].programDateTime;if(c<(o||0))return null;var h=n[n.length-1].endProgramDateTime;if(c>=(h||0))return null;u=u||0;for(var m=0;m<n.length;++m){var s=n[m];if(d(c,u,s))return s}return null}function S(n,c,u,o){u===void 0&&(u=0),o===void 0&&(o=0);var h=null;if(n?h=c[n.sn-c[0].sn+1]||null:u===0&&c[0].start===0&&(h=c[0]),h&&b(u,o,h)===0)return h;var m=p.default.search(c,b.bind(null,u,o));return m||h}function b(n,c,u){n===void 0&&(n=0),c===void 0&&(c=0);var o=Math.min(c,u.duration+(u.deltaPTS?u.deltaPTS:0));return u.start+u.duration-o<=n?1:u.start-o>n&&u.start?-1:0}function d(n,c,u){var o=Math.min(c,u.duration+(u.deltaPTS?u.deltaPTS:0))*1e3,h=u.endProgramDateTime||0;return h-o>n}function l(n,c){return p.default.search(n,function(u){return u.cc<c?1:u.cc>c?-1:0})}},"./src/controller/fragment-tracker.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"FragmentState",function(){return v}),T.d(g,"FragmentTracker",function(){return S});var P=T("./src/events.ts"),p=T("./src/types/loader.ts"),v;(function(l){l.NOT_LOADED="NOT_LOADED",l.BACKTRACKED="BACKTRACKED",l.APPENDING="APPENDING",l.PARTIAL="PARTIAL",l.OK="OK"})(v||(v={}));var S=function(){function l(c){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=c,this._registerListeners()}var n=l.prototype;return n._registerListeners=function(){var u=this.hls;u.on(P.Events.BUFFER_APPENDED,this.onBufferAppended,this),u.on(P.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.on(P.Events.FRAG_LOADED,this.onFragLoaded,this)},n._unregisterListeners=function(){var u=this.hls;u.off(P.Events.BUFFER_APPENDED,this.onBufferAppended,this),u.off(P.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.off(P.Events.FRAG_LOADED,this.onFragLoaded,this)},n.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},n.getAppendedFrag=function(u,o){if(o===p.PlaylistLevelType.MAIN){var h=this.activeFragment,m=this.activeParts;if(!h)return null;if(m)for(var s=m.length;s--;){var r=m[s],a=r?r.end:h.appendedPTS;if(r.start<=u&&a!==void 0&&u<=a)return s>9&&(this.activeParts=m.slice(s-9)),r}else if(h.start<=u&&h.appendedPTS!==void 0&&u<=h.appendedPTS)return h}return this.getBufferedFrag(u,o)},n.getBufferedFrag=function(u,o){for(var h=this.fragments,m=Object.keys(h),s=m.length;s--;){var r=h[m[s]];if((r==null?void 0:r.body.type)===o&&r.buffered){var a=r.body;if(a.start<=u&&u<=a.end)return a}}return null},n.detectEvictedFragments=function(u,o,h){var m=this;Object.keys(this.fragments).forEach(function(s){var r=m.fragments[s];if(!r)return;if(!r.buffered){r.body.type===h&&m.removeFragment(r.body);return}var a=r.range[u];if(!a)return;a.time.some(function(t){var w=!m.isTimeBuffered(t.startPTS,t.endPTS,o);return w&&m.removeFragment(r.body),w})})},n.detectPartialFragments=function(u){var o=this,h=this.timeRanges,m=u.frag,s=u.part;if(!h||m.sn==="initSegment")return;var r=d(m),a=this.fragments[r];if(!a)return;Object.keys(h).forEach(function(t){var w=m.elementaryStreams[t];if(!w)return;var E=h[t],f=s!==null||w.partial===!0;a.range[t]=o.getBufferedTimes(m,s,f,E)}),a.backtrack=a.loaded=null,Object.keys(a.range).length?a.buffered=!0:this.removeFragment(a.body)},n.fragBuffered=function(u){var o=d(u),h=this.fragments[o];h&&(h.backtrack=h.loaded=null,h.buffered=!0)},n.getBufferedTimes=function(u,o,h,m){for(var s={time:[],partial:h},r=o?o.start:u.start,a=o?o.end:u.end,t=u.minEndPTS||a,w=u.maxStartPTS||r,E=0;E<m.length;E++){var f=m.start(E)-this.bufferPadding,k=m.end(E)+this.bufferPadding;if(w>=f&&t<=k){s.time.push({startPTS:Math.max(r,m.start(E)),endPTS:Math.min(a,m.end(E))});break}else if(r<k&&a>f)s.partial=!0,s.time.push({startPTS:Math.max(r,m.start(E)),endPTS:Math.min(a,m.end(E))});else if(a<=f)break}return s},n.getPartialFragment=function(u){var o=null,h,m,s,r=0,a=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(w){var E=t[w];if(!E)return;b(E)&&(m=E.body.start-a,s=E.body.end+a,u>=m&&u<=s&&(h=Math.min(u-m,s-u),r<=h&&(o=E.body,r=h)))}),o},n.getState=function(u){var o=d(u),h=this.fragments[o];return h?h.buffered?b(h)?v.PARTIAL:v.OK:h.backtrack?v.BACKTRACKED:v.APPENDING:v.NOT_LOADED},n.backtrack=function(u,o){var h=d(u),m=this.fragments[h];if(!m||m.backtrack)return null;var s=m.backtrack=o||m.loaded;return m.loaded=null,s},n.getBacktrackData=function(u){var o=d(u),h=this.fragments[o];if(h){var m,s=h.backtrack;if(s!=null&&(m=s.payload)!==null&&m!==void 0&&m.byteLength)return s;this.removeFragment(u)}return null},n.isTimeBuffered=function(u,o,h){for(var m,s,r=0;r<h.length;r++){if(m=h.start(r)-this.bufferPadding,s=h.end(r)+this.bufferPadding,u>=m&&o<=s)return!0;if(o<=m)return!1}return!1},n.onFragLoaded=function(u,o){var h=o.frag,m=o.part;if(h.sn==="initSegment"||h.bitrateTest||m)return;var s=d(h);this.fragments[s]={body:h,loaded:o,backtrack:null,buffered:!1,range:Object.create(null)}},n.onBufferAppended=function(u,o){var h=this,m=o.frag,s=o.part,r=o.timeRanges;if(m.type===p.PlaylistLevelType.MAIN)if(this.activeFragment=m,s){var a=this.activeParts;a||(this.activeParts=a=[]),a.push(s)}else this.activeParts=null;this.timeRanges=r,Object.keys(r).forEach(function(t){var w=r[t];if(h.detectEvictedFragments(t,w),!s)for(var E=0;E<w.length;E++)m.appendedPTS=Math.max(w.end(E),m.appendedPTS||0)})},n.onFragBuffered=function(u,o){this.detectPartialFragments(o)},n.hasFragment=function(u){var o=d(u);return!!this.fragments[o]},n.removeFragmentsInRange=function(u,o,h){var m=this;Object.keys(this.fragments).forEach(function(s){var r=m.fragments[s];if(!r)return;if(r.buffered){var a=r.body;a.type===h&&a.start<o&&a.end>u&&m.removeFragment(a)}})},n.removeFragment=function(u){var o=d(u);u.stats.loaded=0,u.clearElementaryStreamInfo(),delete this.fragments[o]},n.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},l}();function b(l){var n,c;return l.buffered&&(((n=l.range.video)===null||n===void 0?void 0:n.partial)||((c=l.range.audio)===null||c===void 0?void 0:c.partial))}function d(l){return l.type+"_"+l.level+"_"+l.urlId+"_"+l.sn}},"./src/controller/gap-controller.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"STALL_MINIMUM_DURATION_MS",function(){return b}),T.d(g,"MAX_START_GAP_JUMP",function(){return d}),T.d(g,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return l}),T.d(g,"SKIP_BUFFER_RANGE_START",function(){return n}),T.d(g,"default",function(){return c});var P=T("./src/utils/buffer-helper.ts"),p=T("./src/errors.ts"),v=T("./src/events.ts"),S=T("./src/utils/logger.ts"),b=250,d=2,l=.1,n=.05,c=function(){function u(h,m,s,r){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=h,this.media=m,this.fragmentTracker=s,this.hls=r}var o=u.prototype;return o.destroy=function(){this.hls=this.fragmentTracker=this.media=null},o.poll=function(m){var s=this.config,r=this.media,a=this.stalled,t=r.currentTime,w=r.seeking,E=this.seeking&&!w,f=!this.seeking&&w;if(this.seeking=w,t!==m){if(this.moved=!0,a!==null){if(this.stallReported){var k=self.performance.now()-a;S.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(k)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((f||E)&&(this.stalled=null),r.paused||r.ended||r.playbackRate===0||!P.BufferHelper.getBuffered(r).length)return;var O=P.BufferHelper.bufferInfo(r,t,0),C=O.len>0,x=O.nextStart||0;if(!C&&!x)return;if(w){var y=O.len>d,_=!x||x-t>d&&!this.fragmentTracker.getPartialFragment(t);if(y||_)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var M,I=Math.max(x,O.start||0)-t,N=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,G=N==null||((M=N.details)===null||M===void 0)?void 0:M.live,H=G?N.details.targetduration*2:d;if(I>0&&I<=H){this._trySkipBufferHole(null);return}}var B=self.performance.now();if(a===null){this.stalled=B;return}var K=B-a;!w&&K>=b&&this._reportStall(O.len);var U=P.BufferHelper.bufferInfo(r,t,s.maxBufferHole);this._tryFixBufferStall(U,K)},o._tryFixBufferStall=function(m,s){var r=this.config,a=this.fragmentTracker,t=this.media,w=t.currentTime,E=a.getPartialFragment(w);if(E){var f=this._trySkipBufferHole(E);if(f)return}m.len>r.maxBufferHole&&s>r.highBufferWatchdogPeriod*1e3&&(S.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},o._reportStall=function(m){var s=this.hls,r=this.media,a=this.stallReported;a||(this.stallReported=!0,S.logger.warn("Playback stalling at @"+r.currentTime+" due to low buffer (buffer="+m+")"),s.trigger(v.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:m}))},o._trySkipBufferHole=function(m){for(var s=this.config,r=this.hls,a=this.media,t=a.currentTime,w=0,E=P.BufferHelper.getBuffered(a),f=0;f<E.length;f++){var k=E.start(f);if(t+s.maxBufferHole>=w&&t<k){var O=Math.max(k+n,a.currentTime+l);return S.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+O),this.moved=!0,this.stalled=null,a.currentTime=O,m&&r.trigger(v.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+t+" to "+O,frag:m}),O}w=E.end(f)}return 0},o._tryNudgeBuffer=function(){var m=this.config,s=this.hls,r=this.media,a=r.currentTime,t=(this.nudgeRetry||0)+1;if(this.nudgeRetry=t,t<m.nudgeMaxRetry){var w=a+t*m.nudgeOffset;S.logger.warn("Nudging 'currentTime' from "+a+" to "+w),r.currentTime=w,s.trigger(v.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else S.logger.error("Playhead still not moving while enough data buffered @"+a+" after "+m.nudgeMaxRetry+" nudges"),s.trigger(v.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},u}()},"./src/controller/id3-track-controller.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/events.ts"),p=T("./src/utils/texttrack-utils.ts"),v=T("./src/demux/id3.ts"),S=.25,b=function(){function d(n){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=n,this._registerListeners()}var l=d.prototype;return l.destroy=function(){this._unregisterListeners()},l._registerListeners=function(){var c=this.hls;c.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(P.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),c.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},l._unregisterListeners=function(){var c=this.hls;c.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(P.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),c.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},l.onMediaAttached=function(c,u){this.media=u.media},l.onMediaDetaching=function(){if(!this.id3Track)return;Object(p.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},l.getID3Track=function(c){if(!this.media)return;for(var u=0;u<c.length;u++){var o=c[u];if(o.kind==="metadata"&&o.label==="id3")return Object(p.sendAddTrackEvent)(o,this.media),o}return this.media.addTextTrack("metadata","id3")},l.onFragParsingMetadata=function(c,u){if(!this.media)return;var o=u.frag,h=u.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var m=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,s=0;s<h.length;s++){var r=v.getID3Frames(h[s].data);if(r){var a=h[s].pts,t=s<h.length-1?h[s+1].pts:o.end,w=t-a;w<=0&&(t=a+S);for(var E=0;E<r.length;E++){var f=r[E];if(!v.isTimeStampFrame(f)){var k=new m(a,t,"");k.value=f,this.id3Track.addCue(k)}}}}},l.onBufferFlushing=function(c,u){var o=u.startOffset,h=u.endOffset,m=u.type;if(!m||m==="audio"){var s=this.id3Track;s&&Object(p.removeCuesInRange)(s,o,h)}},d}();g.default=b},"./src/controller/latency-controller.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return d});var P=T("./src/errors.ts"),p=T("./src/events.ts"),v=T("./src/utils/logger.ts");function S(l,n){for(var c=0;c<n.length;c++){var u=n[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(l,u.key,u)}}function b(l,n,c){return n&&S(l.prototype,n),c&&S(l,c),l}var d=function(){function l(c){var u=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return u.timeupdate()},this.hls=c,this.config=c.config,this.registerListeners()}var n=l.prototype;return n.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},n.registerListeners=function(){this.hls.on(p.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(p.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(p.Events.ERROR,this.onError,this)},n.unregisterListeners=function(){this.hls.off(p.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(p.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(p.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(p.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(p.Events.ERROR,this.onError)},n.onMediaAttached=function(u,o){this.media=o.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},n.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},n.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},n.onLevelUpdated=function(u,o){var h=o.details;this.levelDetails=h,h.advanced&&this.timeupdate(),!h.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},n.onError=function(u,o){if(o.details!==P.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,v.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},n.timeupdate=function(){var u=this.media,o=this.levelDetails;if(!u||!o)return;this.currentTime=u.currentTime;var h=this.computeLatency();if(h===null)return;this._latency=h;var m=this.config,s=m.lowLatencyMode,r=m.maxLiveSyncPlaybackRate;if(!s||r===1)return;var a=this.targetLatency;if(a===null)return;var t=h-a,w=Math.min(this.maxLatency,a+o.targetduration),E=t<w;if(o.live&&E&&t>.05&&this.forwardBufferLength>1){var f=Math.min(2,Math.max(1,r)),k=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;u.playbackRate=Math.min(f,Math.max(1,k))}else u.playbackRate!==1&&u.playbackRate!==0&&(u.playbackRate=1)},n.estimateLiveEdge=function(){var u=this.levelDetails;return u===null?null:u.edge+u.age},n.computeLatency=function(){var u=this.estimateLiveEdge();return u===null?null:u-this.currentTime},b(l,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var u=this.config,o=this.levelDetails;return u.liveMaxLatencyDuration!==void 0?u.liveMaxLatencyDuration:o?u.liveMaxLatencyDurationCount*o.targetduration:0}},{key:"targetLatency",get:function(){var u=this.levelDetails;if(u===null)return null;var o=u.holdBack,h=u.partHoldBack,m=u.targetduration,s=this.config,r=s.liveSyncDuration,a=s.liveSyncDurationCount,t=s.lowLatencyMode,w=this.hls.userConfig,E=t&&h||o;(w.liveSyncDuration||w.liveSyncDurationCount||E===0)&&(E=r!==void 0?r:a*m);var f=m,k=1;return E+Math.min(this.stallCount*k,f)}},{key:"liveSyncPosition",get:function(){var u=this.estimateLiveEdge(),o=this.targetLatency,h=this.levelDetails;if(u===null||o===null||h===null)return null;var m=h.edge,s=u-o-this.edgeStalled,r=m-h.totalduration,a=m-(this.config.lowLatencyMode&&h.partTarget||h.targetduration);return Math.min(Math.max(r,s),a)}},{key:"drift",get:function(){var u=this.levelDetails;return u===null?1:u.drift}},{key:"edgeStalled",get:function(){var u=this.levelDetails;if(u===null)return 0;var o=(this.config.lowLatencyMode&&u.partTarget||u.targetduration)*3;return Math.max(u.age-o,0)}},{key:"forwardBufferLength",get:function(){var u=this.media,o=this.levelDetails;if(!u||!o)return 0;var h=u.buffered.length;return h?u.buffered.end(h-1):o.edge-this.currentTime}}]),l}()},"./src/controller/level-controller.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return s});var P=T("./src/types/level.ts"),p=T("./src/events.ts"),v=T("./src/errors.ts"),S=T("./src/utils/codecs.ts"),b=T("./src/controller/level-helper.ts"),d=T("./src/controller/base-playlist-controller.ts"),l=T("./src/types/loader.ts");function n(){return n=Object.assign||function(r){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var w in t)Object.prototype.hasOwnProperty.call(t,w)&&(r[w]=t[w])}return r},n.apply(this,arguments)}function c(r,a){for(var t=0;t<a.length;t++){var w=a[t];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(r,w.key,w)}}function u(r,a,t){return a&&c(r.prototype,a),t&&c(r,t),r}function o(r,a){r.prototype=Object.create(a.prototype),r.prototype.constructor=r,h(r,a)}function h(r,a){return h=Object.setPrototypeOf||function(w,E){return w.__proto__=E,w},h(r,a)}var m=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),s=function(r){o(a,r);function a(w){var E;return E=r.call(this,w,"[level-controller]")||this,E._levels=[],E._firstLevel=-1,E._startLevel=void 0,E.currentLevelIndex=-1,E.manualLevelIndex=-1,E.onParsedComplete=void 0,E._registerListeners(),E}var t=a.prototype;return t._registerListeners=function(){var E=this.hls;E.on(p.Events.MANIFEST_LOADED,this.onManifestLoaded,this),E.on(p.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(p.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.on(p.Events.FRAG_LOADED,this.onFragLoaded,this),E.on(p.Events.ERROR,this.onError,this)},t._unregisterListeners=function(){var E=this.hls;E.off(p.Events.MANIFEST_LOADED,this.onManifestLoaded,this),E.off(p.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(p.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.off(p.Events.FRAG_LOADED,this.onFragLoaded,this),E.off(p.Events.ERROR,this.onError,this)},t.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,r.prototype.destroy.call(this)},t.startLoad=function(){var E=this._levels;E.forEach(function(f){f.loadError=0}),r.prototype.startLoad.call(this)},t.onManifestLoaded=function(E,f){var k=[],O=[],C=[],x,y={},_,M=!1,I=!1,N=!1;if(f.levels.forEach(function(K){var U=K.attrs;M=M||!!(K.width&&K.height),I=I||!!K.videoCodec,N=N||!!K.audioCodec,m&&K.audioCodec&&K.audioCodec.indexOf("mp4a.40.34")!==-1&&(K.audioCodec=void 0);var W=K.bitrate+"-"+K.attrs.RESOLUTION+"-"+K.attrs.CODECS;_=y[W],_?_.url.push(K.url):(_=new P.Level(K),y[W]=_,k.push(_)),U&&(U.AUDIO&&Object(b.addGroupId)(_,"audio",U.AUDIO),U.SUBTITLES&&Object(b.addGroupId)(_,"text",U.SUBTITLES))}),(M||I)&&N&&(k=k.filter(function(K){var U=K.videoCodec,W=K.width,X=K.height;return!!U||!!(W&&X)})),k=k.filter(function(K){var U=K.audioCodec,W=K.videoCodec;return(!U||Object(S.isCodecSupportedInMp4)(U,"audio"))&&(!W||Object(S.isCodecSupportedInMp4)(W,"video"))}),f.audioTracks&&(O=f.audioTracks.filter(function(K){return!K.audioCodec||Object(S.isCodecSupportedInMp4)(K.audioCodec,"audio")}),Object(b.assignTrackIdsByGroup)(O)),f.subtitles&&(C=f.subtitles,Object(b.assignTrackIdsByGroup)(C)),k.length>0){x=k[0].bitrate,k.sort(function(K,U){return K.bitrate-U.bitrate}),this._levels=k;for(var G=0;G<k.length;G++)if(k[G].bitrate===x){this._firstLevel=G,this.log("manifest loaded, "+k.length+" level(s) found, first bitrate: "+x);break}var H=N&&!I,B={levels:k,audioTracks:O,subtitleTracks:C,firstLevel:this._firstLevel,stats:f.stats,audio:N,video:I,altAudio:!H&&O.some(function(K){return!!K.url})};this.hls.trigger(p.Events.MANIFEST_PARSED,B),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(p.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:f.url,reason:"no level with compatible codecs found in manifest"})},t.onError=function(E,f){if(r.prototype.onError.call(this,E,f),f.fatal)return;var k=f.context,O=this._levels[this.currentLevelIndex];if(k&&(k.type===l.PlaylistContextType.AUDIO_TRACK&&O.audioGroupIds&&k.groupId===O.audioGroupIds[O.urlId]||k.type===l.PlaylistContextType.SUBTITLE_TRACK&&O.textGroupIds&&k.groupId===O.textGroupIds[O.urlId])){this.redundantFailover(this.currentLevelIndex);return}var C=!1,x=!0,y;switch(f.details){case v.ErrorDetails.FRAG_LOAD_ERROR:case v.ErrorDetails.FRAG_LOAD_TIMEOUT:case v.ErrorDetails.KEY_LOAD_ERROR:case v.ErrorDetails.KEY_LOAD_TIMEOUT:if(f.frag){var _=this._levels[f.frag.level];_?(_.fragmentError++,_.fragmentError>this.hls.config.fragLoadingMaxRetry&&(y=f.frag.level)):y=f.frag.level}break;case v.ErrorDetails.LEVEL_LOAD_ERROR:case v.ErrorDetails.LEVEL_LOAD_TIMEOUT:k&&(k.deliveryDirectives&&(x=!1),y=k.level),C=!0;break;case v.ErrorDetails.REMUX_ALLOC_ERROR:y=f.level,C=!0;break}y!==void 0&&this.recoverLevel(f,y,C,x)},t.recoverLevel=function(E,f,k,O){var C=E.details,x=this._levels[f];if(x.loadError++,k){var y=this.retryLoadingOrFail(E);if(y)E.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var _=x.url.length;if(_>1&&x.loadError<_)E.levelRetry=!0,this.redundantFailover(f);else if(this.manualLevelIndex===-1){var M=f===0?this._levels.length-1:f-1;this.currentLevelIndex!==M&&this._levels[M].loadError===0&&(this.warn(C+": switch to "+M),E.levelRetry=!0,this.hls.nextAutoLevel=M)}}},t.redundantFailover=function(E){var f=this._levels[E],k=f.url.length;if(k>1){var O=(f.urlId+1)%k;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(C){C.urlId=O}),this.level=E}},t.onFragLoaded=function(E,f){var k=f.frag;if(k!==void 0&&k.type===l.PlaylistLevelType.MAIN){var O=this._levels[k.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},t.onLevelLoaded=function(E,f){var k,O=f.level,C=f.details,x=this._levels[O];if(!x){var y;this.warn("Invalid level index "+O),(y=f.deliveryDirectives)!==null&&y!==void 0&&y.skip&&(C.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(x.fragmentError===0&&(x.loadError=0,this.retryCount=0),this.playlistLoaded(O,f,x.details)):(k=f.deliveryDirectives)!==null&&k!==void 0&&k.skip&&(C.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(E,f){var k=this.hls.levels[this.currentLevelIndex];if(!k)return;if(k.audioGroupIds){for(var O=-1,C=this.hls.audioTracks[f.id].groupId,x=0;x<k.audioGroupIds.length;x++)if(k.audioGroupIds[x]===C){O=x;break}O!==k.urlId&&(k.urlId=O,this.startLoad())}},t.loadPlaylist=function(E){var f=this.currentLevelIndex,k=this._levels[f];if(this.canLoad&&k&&k.url.length>0){var O=k.urlId,C=k.url[O];if(E)try{C=E.addDirectives(C)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Attempt loading level index "+f+(E?" at sn "+E.msn+" part "+E.part:"")+" with URL-id "+O+" "+C),this.clearTimer(),this.hls.trigger(p.Events.LEVEL_LOADING,{url:C,level:f,id:O,deliveryDirectives:E||null})}},t.removeLevel=function(E,f){var k=function(x,y){return y!==f},O=this._levels.filter(function(C,x){return x!==E?!0:C.url.length>1&&f!==void 0?(C.url=C.url.filter(k),C.audioGroupIds&&(C.audioGroupIds=C.audioGroupIds.filter(k)),C.textGroupIds&&(C.textGroupIds=C.textGroupIds.filter(k)),C.urlId=0,!0):!1}).map(function(C,x){var y=C.details;return y!=null&&y.fragments&&y.fragments.forEach(function(_){_.level=x}),C});this._levels=O,this.hls.trigger(p.Events.LEVELS_UPDATED,{levels:O})},u(a,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(E){var f,k=this._levels;if(k.length===0)return;if(this.currentLevelIndex===E&&(f=k[E])!==null&&f!==void 0&&f.details)return;if(E<0||E>=k.length){var O=E<0;if(this.hls.trigger(p.Events.ERROR,{type:v.ErrorTypes.OTHER_ERROR,details:v.ErrorDetails.LEVEL_SWITCH_ERROR,level:E,fatal:O,reason:"invalid level idx"}),O)return;E=Math.min(E,k.length-1)}this.clearTimer();var C=this.currentLevelIndex,x=k[C],y=k[E];this.log("switching to level "+E+" from "+C),this.currentLevelIndex=E;var _=n({},y,{level:E,maxBitrate:y.maxBitrate,uri:y.uri,urlId:y.urlId});delete _._urlId,this.hls.trigger(p.Events.LEVEL_SWITCHING,_);var M=y.details;if(!M||M.live){var I=this.switchParams(y.uri,x==null?void 0:x.details);this.loadPlaylist(I)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(E){this.manualLevelIndex=E,this._startLevel===void 0&&(this._startLevel=E),E!==-1&&(this.level=E)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(E){this._firstLevel=E}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var E=this.hls.config.startLevel;return E!==void 0?E:this._firstLevel}else return this._startLevel},set:function(E){this._startLevel=E}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(E){this.level=E,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=E)}}]),a}(d.default)},"./src/controller/level-helper.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"addGroupId",function(){return v}),T.d(g,"assignTrackIdsByGroup",function(){return S}),T.d(g,"updatePTS",function(){return b}),T.d(g,"updateFragPTSDTS",function(){return l}),T.d(g,"mergeDetails",function(){return n}),T.d(g,"mapPartIntersection",function(){return c}),T.d(g,"mapFragmentIntersection",function(){return u}),T.d(g,"adjustSliding",function(){return o}),T.d(g,"addSliding",function(){return h}),T.d(g,"computeReloadInterval",function(){return m}),T.d(g,"getFragmentWithSN",function(){return s}),T.d(g,"getPartWith",function(){return r});var P=T("./src/polyfills/number.ts"),p=T("./src/utils/logger.ts");function v(a,t,w){switch(t){case"audio":a.audioGroupIds||(a.audioGroupIds=[]),a.audioGroupIds.push(w);break;case"text":a.textGroupIds||(a.textGroupIds=[]),a.textGroupIds.push(w);break}}function S(a){var t={};a.forEach(function(w){var E=w.groupId||"";w.id=t[E]=t[E]||0,t[E]++})}function b(a,t,w){var E=a[t],f=a[w];d(E,f)}function d(a,t){var w=t.startPTS;if(Object(P.isFiniteNumber)(w)){var E=0,f;t.sn>a.sn?(E=w-a.start,f=a):(E=a.start-w,f=t),f.duration!==E&&(f.duration=E)}else if(t.sn>a.sn){var k=a.cc===t.cc;k&&a.minEndPTS?t.start=a.start+(a.minEndPTS-a.start):t.start=a.start+a.duration}else t.start=Math.max(a.start-t.duration,0)}function l(a,t,w,E,f,k){var O=E-w;O<=0&&(p.logger.warn("Fragment should have a positive duration",t),E=w+t.duration,k=f+t.duration);var C=w,x=E,y=t.startPTS,_=t.endPTS;if(Object(P.isFiniteNumber)(y)){var M=Math.abs(y-w);Object(P.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(M,t.deltaPTS):t.deltaPTS=M,C=Math.max(w,y),w=Math.min(w,y),f=Math.min(f,t.startDTS),x=Math.min(E,_),E=Math.max(E,_),k=Math.max(k,t.endDTS)}t.duration=E-w;var I=w-t.start;t.appendedPTS=E,t.start=t.startPTS=w,t.maxStartPTS=C,t.startDTS=f,t.endPTS=E,t.minEndPTS=x,t.endDTS=k;var N=t.sn;if(!a||N<a.startSN||N>a.endSN)return 0;var G,H=N-a.startSN,B=a.fragments;for(B[H]=t,G=H;G>0;G--)d(B[G],B[G-1]);for(G=H;G<B.length-1;G++)d(B[G],B[G+1]);return a.fragmentHint&&d(B[B.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,I}function n(a,t){for(var w=null,E=a.fragments,f=E.length-1;f>=0;f--){var k=E[f].initSegment;if(k){w=k;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;var O=0,C;if(u(a,t,function(G,H){G.relurl&&(O=G.cc-H.cc),Object(P.isFiniteNumber)(G.startPTS)&&Object(P.isFiniteNumber)(G.endPTS)&&(H.start=H.startPTS=G.startPTS,H.startDTS=G.startDTS,H.appendedPTS=G.appendedPTS,H.maxStartPTS=G.maxStartPTS,H.endPTS=G.endPTS,H.endDTS=G.endDTS,H.minEndPTS=G.minEndPTS,H.duration=G.endPTS-G.startPTS,H.duration&&(C=H),t.PTSKnown=t.alignedSliding=!0),H.elementaryStreams=G.elementaryStreams,H.loader=G.loader,H.stats=G.stats,H.urlId=G.urlId,G.initSegment&&(H.initSegment=G.initSegment,w=G.initSegment)}),w){var x=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;x.forEach(function(G){var H;(!G.initSegment||G.initSegment.relurl===((H=w)===null||H===void 0?void 0:H.relurl))&&(G.initSegment=w)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(G){return!G}),t.deltaUpdateFailed)){p.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var y=t.skippedSegments;y--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var _=t.fragments;if(O){p.logger.warn("discontinuity sliding from playlist, take drift into account");for(var M=0;M<_.length;M++)_[M].cc+=O}t.skippedSegments&&(t.startCC=t.fragments[0].cc),c(a.partList,t.partList,function(G,H){H.elementaryStreams=G.elementaryStreams,H.stats=G.stats}),C?l(t,C,C.startPTS,C.endPTS,C.startDTS,C.endDTS):o(a,t),_.length&&(t.totalduration=t.edge-_[0].start),t.driftStartTime=a.driftStartTime,t.driftStart=a.driftStart;var I=t.advancedDateTime;if(t.advanced&&I){var N=t.edge;t.driftStart||(t.driftStartTime=I,t.driftStart=N),t.driftEndTime=I,t.driftEnd=N}else t.driftEndTime=a.driftEndTime,t.driftEnd=a.driftEnd,t.advancedDateTime=a.advancedDateTime}function c(a,t,w){if(a&&t)for(var E=0,f=0,k=a.length;f<=k;f++){var O=a[f],C=t[f+E];O&&C&&O.index===C.index&&O.fragment.sn===C.fragment.sn?w(O,C):E--}}function u(a,t,w){for(var E=t.skippedSegments,f=Math.max(a.startSN,t.startSN)-t.startSN,k=(a.fragmentHint?1:0)+(E?t.endSN:Math.min(a.endSN,t.endSN))-t.startSN,O=t.startSN-a.startSN,C=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,x=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments,y=f;y<=k;y++){var _=x[O+y],M=C[y];E&&!M&&y<E&&(M=t.fragments[y]=_),_&&M&&w(_,M)}}function o(a,t){var w=t.startSN+t.skippedSegments-a.startSN,E=a.fragments;if(w<0||w>=E.length)return;h(t,E[w].start)}function h(a,t){if(t){for(var w=a.fragments,E=a.skippedSegments;E<w.length;E++)w[E].start+=t;a.fragmentHint&&(a.fragmentHint.start+=t)}}function m(a,t){var w=1e3*a.levelTargetDuration,E=w/2,f=a.age,k=f>0&&f<w*3,O=t.loading.end-t.loading.start,C,x=a.availabilityDelay;if(a.updated===!1)if(k){var y=333*a.misses;C=Math.max(Math.min(E,O*2),y),a.availabilityDelay=(a.availabilityDelay||0)+C}else C=E;else k?(x=Math.min(x||w/2,f),a.availabilityDelay=x,C=x+w-f):C=w-O;return Math.round(C)}function s(a,t,w){if(!a||!a.details)return null;var E=a.details,f=E.fragments[t-E.startSN];return f||(f=E.fragmentHint,f&&f.sn===t?f:t<E.startSN&&w&&w.sn===t?w:null)}function r(a,t,w){if(!a||!a.details)return null;var E=a.details.partList;if(E)for(var f=E.length;f--;){var k=E[f];if(k.index===w&&k.fragment.sn===t)return k}return null}},"./src/controller/stream-controller.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return E});var P=T("./src/polyfills/number.ts"),p=T("./src/controller/base-stream-controller.ts"),v=T("./src/is-supported.ts"),S=T("./src/events.ts"),b=T("./src/utils/buffer-helper.ts"),d=T("./src/controller/fragment-tracker.ts"),l=T("./src/types/loader.ts"),n=T("./src/loader/fragment.ts"),c=T("./src/demux/transmuxer-interface.ts"),u=T("./src/types/transmuxer.ts"),o=T("./src/controller/gap-controller.ts"),h=T("./src/errors.ts"),m=T("./src/utils/logger.ts");function s(f,k){for(var O=0;O<k.length;O++){var C=k[O];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(f,C.key,C)}}function r(f,k,O){return k&&s(f.prototype,k),O&&s(f,O),f}function a(f,k){f.prototype=Object.create(k.prototype),f.prototype.constructor=f,t(f,k)}function t(f,k){return t=Object.setPrototypeOf||function(C,x){return C.__proto__=x,C},t(f,k)}var w=100,E=function(f){a(k,f);function k(C,x){var y;return y=f.call(this,C,x,"[stream-controller]")||this,y.audioCodecSwap=!1,y.gapController=null,y.level=-1,y._forceStartLoad=!1,y.altAudio=!1,y.audioOnly=!1,y.fragPlaying=null,y.onvplaying=null,y.onvseeked=null,y.fragLastKbps=0,y.stalled=!1,y.couldBacktrack=!1,y.audioCodecSwitch=!1,y.videoBuffer=null,y._registerListeners(),y}var O=k.prototype;return O._registerListeners=function(){var x=this.hls;x.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.on(S.Events.LEVEL_LOADING,this.onLevelLoading,this),x.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.on(S.Events.ERROR,this.onError,this),x.on(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.on(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.on(S.Events.BUFFER_CREATED,this.onBufferCreated,this),x.on(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.on(S.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O._unregisterListeners=function(){var x=this.hls;x.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.off(S.Events.ERROR,this.onError,this),x.off(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.off(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.off(S.Events.BUFFER_CREATED,this.onBufferCreated,this),x.off(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.off(S.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},O.startLoad=function(x){if(this.levels){var y=this.lastCurrentTime,_=this.hls;if(this.stopLoad(),this.setInterval(w),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var M=_.startLevel;M===-1&&(_.config.testBandwidth?(M=0,this.bitrateTest=!0):M=_.nextAutoLevel),this.level=_.nextLoadLevel=M,this.loadedmetadata=!1}y>0&&x===-1&&(this.log("Override startPosition with lastCurrentTime @"+y.toFixed(3)),x=y),this.state=p.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,this.tick()}else this._forceStartLoad=!0,this.state=p.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,f.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case p.State.IDLE:this.doTickIdle();break;case p.State.WAITING_LEVEL:{var x,y=this.levels,_=this.level,M=y==null||((x=y[_])===null||x===void 0)?void 0:x.details;if(M&&(!M.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(M))break;this.state=p.State.IDLE;break}break}case p.State.FRAG_LOADING_WAITING_RETRY:{var I,N=self.performance.now(),G=this.retryDate;(!G||N>=G||(I=this.media)!==null&&I!==void 0&&I.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=p.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){f.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var x,y,_=this.hls,M=this.levelLastLoaded,I=this.levels,N=this.media,G=_.config,H=_.nextLoadLevel;if(M===null||!N&&(this.startFragRequested||!G.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!I||!I[H])return;var B=I[H];this.level=_.nextLoadLevel=H;var K=B.details;if(!K||this.state===p.State.WAITING_LEVEL||K.live&&this.levelLastLoaded!==H){this.state=p.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:N,l.PlaylistLevelType.MAIN);if(U===null)return;var W=U.len,X=this.getMaxBufferLength(B.maxBitrate);if(W>=X)return;if(this._streamEnded(U,K)){var ne={};this.altAudio&&(ne.type="video"),this.hls.trigger(S.Events.BUFFER_EOS,ne),this.state=p.State.ENDED;return}var fe=U.end,me=this.getNextFragment(fe,K);if(this.couldBacktrack&&!this.fragPrevious&&me&&me.sn!=="initSegment"){var Ae=me.sn-K.startSN;Ae>1&&(me=K.fragments[Ae-1],this.fragmentTracker.removeFragment(me))}if(me&&this.fragmentTracker.getState(me)===d.FragmentState.OK&&this.nextLoadPosition>fe){var De=this.audioOnly&&!this.altAudio?n.ElementaryStreamTypes.AUDIO:n.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(N,De,l.PlaylistLevelType.MAIN),me=this.getNextFragment(this.nextLoadPosition,K)}if(!me)return;me.initSegment&&!me.initSegment.data&&!this.bitrateTest&&(me=me.initSegment),((x=me.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((y=me.decryptdata)!==null&&y!==void 0&&y.key)?this.loadKey(me,K):this.loadFragment(me,K,fe)},O.loadFragment=function(x,y,_){var M,I=this.fragmentTracker.getState(x);if(this.fragCurrent=x,I===d.FragmentState.BACKTRACKED){var N=this.fragmentTracker.getBacktrackData(x);if(N){this._handleFragmentLoadProgress(N),this._handleFragmentLoadComplete(N);return}else I=d.FragmentState.NOT_LOADED}I===d.FragmentState.NOT_LOADED||I===d.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,f.prototype.loadFragment.call(this,x,y,_)):I===d.FragmentState.APPENDING?this.reduceMaxBufferLength(x.duration)&&this.fragmentTracker.removeFragment(x):((M=this.media)===null||M===void 0?void 0:M.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(x){var y=this.fragmentTracker.getAppendedFrag(x,l.PlaylistLevelType.MAIN);return y&&"fragment"in y?y.fragment:y},O.getBufferedFrag=function(x){return this.fragmentTracker.getBufferedFrag(x,l.PlaylistLevelType.MAIN)},O.followingBufferedFrag=function(x){return x?this.getBufferedFrag(x.end+.5):null},O.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},O.nextLevelSwitch=function(){var x=this.levels,y=this.media;if(y!=null&&y.readyState){var _,M=this.getAppendedFrag(y.currentTime);if(M&&M.start>1&&this.flushMainBuffer(0,M.start-1),!y.paused&&x){var I=this.hls.nextLoadLevel,N=x[I],G=this.fragLastKbps;G&&this.fragCurrent?_=this.fragCurrent.duration*N.maxBitrate/(1e3*G)+1:_=0}else _=0;var H=this.getBufferedFrag(y.currentTime+_);if(H){var B=this.followingBufferedFrag(H);if(B){this.abortCurrentFrag();var K=B.maxStartPTS?B.maxStartPTS:B.start,U=B.duration,W=Math.max(H.end,K+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(W,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var x=this.fragCurrent;this.fragCurrent=null,x!=null&&x.loader&&x.loader.abort(),this.state===p.State.KEY_LOADING&&(this.state=p.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(x,y){f.prototype.flushMainBuffer.call(this,x,y,this.altAudio?"video":null)},O.onMediaAttached=function(x,y){f.prototype.onMediaAttached.call(this,x,y);var _=y.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),_.addEventListener("playing",this.onvplaying),_.addEventListener("seeked",this.onvseeked),this.gapController=new o.default(this.config,_,this.fragmentTracker,this.hls)},O.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),f.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var x=this.media,y=x?x.currentTime:null;Object(P.isFiniteNumber)(y)&&this.log("Media seeked to "+y.toFixed(3)),this.tick()},O.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(S.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},O.onManifestParsed=function(x,y){var _=!1,M=!1,I;y.levels.forEach(function(N){I=N.audioCodec,I&&(I.indexOf("mp4a.40.2")!==-1&&(_=!0),I.indexOf("mp4a.40.5")!==-1&&(M=!0))}),this.audioCodecSwitch=_&&M&&!Object(v.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=y.levels,this.startFragRequested=!1},O.onLevelLoading=function(x,y){var _=this.levels;if(!_||this.state!==p.State.IDLE)return;var M=_[y.level];(!M.details||M.details.live&&this.levelLastLoaded!==y.level||this.waitForCdnTuneIn(M.details))&&(this.state=p.State.WAITING_LEVEL)},O.onLevelLoaded=function(x,y){var _,M=this.levels,I=y.level,N=y.details,G=N.totalduration;if(!M){this.warn("Levels were reset while loading level "+I);return}this.log("Level "+I+" loaded ["+N.startSN+","+N.endSN+"], cc ["+N.startCC+", "+N.endCC+"] duration:"+G);var H=this.fragCurrent;H&&(this.state===p.State.FRAG_LOADING||this.state===p.State.FRAG_LOADING_WAITING_RETRY)&&(H.level!==y.level&&H.loader&&(this.state=p.State.IDLE,H.loader.abort()));var B=M[I],K=0;if(N.live||(_=B.details)!==null&&_!==void 0&&_.live){if(N.fragments[0]||(N.deltaUpdateFailed=!0),N.deltaUpdateFailed)return;K=this.alignPlaylists(N,B.details)}if(B.details=N,this.levelLastLoaded=I,this.hls.trigger(S.Events.LEVEL_UPDATED,{details:N,level:I}),this.state===p.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(N))return;this.state=p.State.IDLE}this.startFragRequested?N.live&&this.synchronizeToLiveEdge(N):this.setStartPosition(N,K),this.tick()},O._handleFragmentLoadProgress=function(x){var y,_=x.frag,M=x.part,I=x.payload,N=this.levels;if(!N){this.warn("Levels were reset while fragment load was in progress. Fragment "+_.sn+" of level "+_.level+" will not be buffered");return}var G=N[_.level],H=G.details;if(!H){this.warn("Dropping fragment "+_.sn+" of level "+_.level+" after level details were reset");return}var B=G.videoCodec,K=H.PTSKnown||!H.live,U=(y=_.initSegment)===null||y===void 0?void 0:y.data,W=this._getAudioCodec(G),X=this.transmuxer=this.transmuxer||new c.default(this.hls,l.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ne=M?M.index:-1,fe=ne!==-1,me=new u.ChunkMetadata(_.level,_.sn,_.stats.chunkCount,I.byteLength,ne,fe),Ae=this.initPTS[_.cc];X.push(I,U,W,B,_,M,H.totalduration,K,me,Ae)},O.onAudioTrackSwitching=function(x,y){var _=this.altAudio,M=!!y.url,I=y.id;if(!M){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var N=this.fragCurrent;N!=null&&N.loader&&(this.log("Switching to main audio track, cancel main fragment load"),N.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var G=this.hls;_&&G.trigger(S.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),G.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:I})}},O.onAudioTrackSwitched=function(x,y){var _=y.id,M=!!this.hls.audioTracks[_].url;if(M){var I=this.videoBuffer;I&&this.mediaBuffer!==I&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=I)}this.altAudio=M,this.tick()},O.onBufferCreated=function(x,y){var _=y.tracks,M,I,N=!1;for(var G in _){var H=_[G];if(H.id==="main"){if(I=G,M=H,G==="video"){var B=_[G];B&&(this.videoBuffer=B.buffer)}}else N=!0}N&&M?(this.log("Alternate track found, use "+I+".buffered to schedule main fragment loading"),this.mediaBuffer=M.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(x,y){var _=y.frag,M=y.part;if(_&&_.type!==l.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(_)){this.warn("Fragment "+_.sn+(M?" p: "+M.index:"")+" of level "+_.level+" finished buffering, but was aborted. state: "+this.state),this.state===p.State.PARSED&&(this.state=p.State.IDLE);return}var I=M?M.stats:_.stats;this.fragLastKbps=Math.round(8*I.total/(I.buffering.end-I.loading.first)),_.sn!=="initSegment"&&(this.fragPrevious=_),this.fragBufferedComplete(_,M)},O.onError=function(x,y){switch(y.details){case h.ErrorDetails.FRAG_LOAD_ERROR:case h.ErrorDetails.FRAG_LOAD_TIMEOUT:case h.ErrorDetails.KEY_LOAD_ERROR:case h.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(l.PlaylistLevelType.MAIN,y);break;case h.ErrorDetails.LEVEL_LOAD_ERROR:case h.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==p.State.ERROR&&(y.fatal?(this.warn(""+y.details),this.state=p.State.ERROR):!y.levelRetry&&this.state===p.State.WAITING_LEVEL&&(this.state=p.State.IDLE));break;case h.ErrorDetails.BUFFER_FULL_ERROR:if(y.parent==="main"&&(this.state===p.State.PARSING||this.state===p.State.PARSED)){var _=!0,M=this.getFwdBufferInfo(this.media,l.PlaylistLevelType.MAIN);M&&M.len>.5&&(_=!this.reduceMaxBufferLength(M.len)),_&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},O.checkBuffer=function(){var x=this.media,y=this.gapController;if(!x||!y||!x.readyState)return;var _=b.BufferHelper.getBuffered(x);!this.loadedmetadata&&_.length?(this.loadedmetadata=!0,this.seekToStartPos()):y.poll(this.lastCurrentTime),this.lastCurrentTime=x.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=p.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(x,y){var _=y.type;if(_!==n.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var M=(_===n.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(M,_,l.PlaylistLevelType.MAIN)}},O.onLevelsUpdated=function(x,y){this.levels=y.levels},O.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},O.seekToStartPos=function(){var x=this.media,y=x.currentTime,_=this.startPosition;if(_>=0&&y<_){if(x.seeking){m.logger.log("could not seek to "+_+", already seeking at "+y);return}var M=b.BufferHelper.getBuffered(x),I=M.length?M.start(0):0,N=I-_;N>0&&(N<this.config.maxBufferHole||N<this.config.maxFragLookUpTolerance)&&(m.logger.log("adjusting start position by "+N+" to match buffer start"),_+=N,this.startPosition=_),this.log("seek to target start position "+_+" from current time "+y),x.currentTime=_}},O._getAudioCodec=function(x){var y=this.config.defaultAudioCodec||x.audioCodec;return this.audioCodecSwap&&y&&(this.log("Swapping audio codec"),y.indexOf("mp4a.40.5")!==-1?y="mp4a.40.2":y="mp4a.40.5"),y},O._loadBitrateTestFrag=function(x){var y=this;this._doFragLoad(x).then(function(_){var M=y.hls;if(!_||M.nextLoadLevel||y.fragContextChanged(x))return;y.fragLoadError=0,y.state=p.State.IDLE,y.startFragRequested=!1,y.bitrateTest=!1;var I=x.stats;I.parsing.start=I.parsing.end=I.buffering.start=I.buffering.end=self.performance.now(),M.trigger(S.Events.FRAG_LOADED,_)})},O._handleTransmuxComplete=function(x){var y,_="main",M=this.hls,I=x.remuxResult,N=x.chunkMeta,G=this.getCurrentContext(N);if(!G){this.warn("The loading context changed while buffering fragment "+N.sn+" of level "+N.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(N.level);return}var H=G.frag,B=G.part,K=G.level,U=I.video,W=I.text,X=I.id3,ne=I.initSegment,fe=this.altAudio?void 0:I.audio;if(this.fragContextChanged(H))return;if(this.state=p.State.PARSING,ne){ne.tracks&&(this._bufferInitSegment(K,ne.tracks,H,N),M.trigger(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:_,tracks:ne.tracks}));var me=ne.initPTS,Ae=ne.timescale;Object(P.isFiniteNumber)(me)&&(this.initPTS[H.cc]=me,M.trigger(S.Events.INIT_PTS_FOUND,{frag:H,id:_,initPTS:me,timescale:Ae}))}if(U&&I.independent!==!1){if(K.details){var De=U.startPTS,ye=U.endPTS,Oe=U.startDTS,xe=U.endDTS;if(B)B.elementaryStreams[U.type]={startPTS:De,endPTS:ye,startDTS:Oe,endDTS:xe};else if(U.firstKeyFrame&&U.independent&&(this.couldBacktrack=!0),U.dropped&&U.independent){var ue=this.getLoadPosition()+this.config.maxBufferHole;if(ue<De){this.backtrack(H);return}H.setElementaryStreamInfo(U.type,H.start,ye,H.start,xe,!0)}H.setElementaryStreamInfo(U.type,De,ye,Oe,xe),this.bufferFragmentData(U,H,B,N)}}else if(I.independent===!1){this.backtrack(H);return}if(fe){var le=fe.startPTS,re=fe.endPTS,pe=fe.startDTS,ee=fe.endDTS;B&&(B.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:le,endPTS:re,startDTS:pe,endDTS:ee}),H.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,le,re,pe,ee),this.bufferFragmentData(fe,H,B,N)}if(X!=null&&(y=X.samples)!==null&&y!==void 0&&y.length){var te={frag:H,id:_,samples:X.samples};M.trigger(S.Events.FRAG_PARSING_METADATA,te)}if(W){var ce={frag:H,id:_,samples:W.samples};M.trigger(S.Events.FRAG_PARSING_USERDATA,ce)}},O._bufferInitSegment=function(x,y,_,M){var I=this;if(this.state!==p.State.PARSING)return;this.audioOnly=!!y.audio&&!y.video,this.altAudio&&!this.audioOnly&&delete y.audio;var N=y.audio,G=y.video,H=y.audiovideo;if(N){var B=x.audioCodec,K=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(B&&(B.indexOf("mp4a.40.5")!==-1?B="mp4a.40.2":B="mp4a.40.5"),N.metadata.channelCount!==1&&K.indexOf("firefox")===-1&&(B="mp4a.40.5")),K.indexOf("android")!==-1&&N.container!=="audio/mpeg"&&(B="mp4a.40.2",this.log("Android: force audio codec to "+B)),x.audioCodec&&x.audioCodec!==B&&this.log('Swapping manifest audio codec "'+x.audioCodec+'" for "'+B+'"'),N.levelCodec=B,N.id="main",this.log("Init audio buffer, container:"+N.container+", codecs[selected/level/parsed]=["+(B||"")+"/"+(x.audioCodec||"")+"/"+N.codec+"]")}G&&(G.levelCodec=x.videoCodec,G.id="main",this.log("Init video buffer, container:"+G.container+", codecs[level/parsed]=["+(x.videoCodec||"")+"/"+G.codec+"]")),H&&this.log("Init audiovideo buffer, container:"+H.container+", codecs[level/parsed]=["+(x.attrs.CODECS||"")+"/"+H.codec+"]"),this.hls.trigger(S.Events.BUFFER_CODECS,y),Object.keys(y).forEach(function(U){var W=y[U],X=W.initSegment;X!=null&&X.byteLength&&I.hls.trigger(S.Events.BUFFER_APPENDING,{type:U,data:X,frag:_,part:null,chunkMeta:M,parent:_.type})}),this.tick()},O.backtrack=function(x){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(x);var y=this.fragmentTracker.backtrack(x);this.fragPrevious=null,this.nextLoadPosition=x.start,y?this.resetFragmentLoading(x):this.state=p.State.BACKTRACKING},O.checkFragmentChanged=function(){var x=this.media,y=null;if(x&&x.readyState>1&&x.seeking===!1){var _=x.currentTime;if(b.BufferHelper.isBuffered(x,_)?y=this.getAppendedFrag(_):b.BufferHelper.isBuffered(x,_+.1)&&(y=this.getAppendedFrag(_+.1)),y){var M=this.fragPlaying,I=y.level;(!M||y.sn!==M.sn||M.level!==I||y.urlId!==M.urlId)&&(this.hls.trigger(S.Events.FRAG_CHANGED,{frag:y}),(!M||M.level!==I)&&this.hls.trigger(S.Events.LEVEL_SWITCHED,{level:I}),this.fragPlaying=y)}}},r(k,[{key:"nextLevel",get:function(){var x=this.nextBufferedFrag;return x?x.level:-1}},{key:"currentLevel",get:function(){var x=this.media;if(x){var y=this.getAppendedFrag(x.currentTime);if(y)return y.level}return-1}},{key:"nextBufferedFrag",get:function(){var x=this.media;if(x){var y=this.getAppendedFrag(x.currentTime);return this.followingBufferedFrag(y)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),k}(p.default)},"./src/controller/subtitle-stream-controller.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"SubtitleStreamController",function(){return a});var P=T("./src/events.ts"),p=T("./src/utils/logger.ts"),v=T("./src/utils/buffer-helper.ts"),S=T("./src/controller/fragment-finders.ts"),b=T("./src/utils/discontinuities.ts"),d=T("./src/controller/level-helper.ts"),l=T("./src/controller/fragment-tracker.ts"),n=T("./src/controller/base-stream-controller.ts"),c=T("./src/types/loader.ts"),u=T("./src/types/level.ts");function o(t,w){for(var E=0;E<w.length;E++){var f=w[E];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(t,f.key,f)}}function h(t,w,E){return w&&o(t.prototype,w),E&&o(t,E),t}function m(t,w){t.prototype=Object.create(w.prototype),t.prototype.constructor=t,s(t,w)}function s(t,w){return s=Object.setPrototypeOf||function(f,k){return f.__proto__=k,f},s(t,w)}var r=500,a=function(t){m(w,t);function w(f,k){var O;return O=t.call(this,f,k,"[subtitle-stream-controller]")||this,O.levels=[],O.currentTrackId=-1,O.tracksBuffered=[],O.mainDetails=null,O._registerListeners(),O}var E=w.prototype;return E.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},E._registerListeners=function(){var k=this.hls;k.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),k.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),k.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),k.on(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),k.on(P.Events.ERROR,this.onError,this),k.on(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),k.on(P.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),k.on(P.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),k.on(P.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),k.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E._unregisterListeners=function(){var k=this.hls;k.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),k.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),k.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),k.off(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),k.off(P.Events.ERROR,this.onError,this),k.off(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),k.off(P.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),k.off(P.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),k.off(P.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),k.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E.startLoad=function(){this.stopLoad(),this.state=n.State.IDLE,this.setInterval(r),this.tick()},E.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},E.onLevelLoaded=function(k,O){this.mainDetails=O.details},E.onSubtitleFragProcessed=function(k,O){var C=O.frag,x=O.success;if(this.fragPrevious=C,this.state=n.State.IDLE,!x)return;var y=this.tracksBuffered[this.currentTrackId];if(!y)return;for(var _,M=C.start,I=0;I<y.length;I++)if(M>=y[I].start&&M<=y[I].end){_=y[I];break}var N=C.start+C.duration;_?_.end=N:(_={start:M,end:N},y.push(_)),this.fragmentTracker.fragBuffered(C)},E.onBufferFlushing=function(k,O){var C=O.startOffset,x=O.endOffset;if(C===0&&x!==Number.POSITIVE_INFINITY){var y=this.currentTrackId,_=this.levels;if(!_.length||!_[y]||!_[y].details)return;var M=_[y].details,I=M.targetduration,N=x-I;if(N<=0)return;O.endOffsetSubtitles=Math.max(0,N),this.tracksBuffered.forEach(function(G){for(var H=0;H<G.length;){if(G[H].end<=N){G.shift();continue}else if(G[H].start<N)G[H].start=N;else break;H++}}),this.fragmentTracker.removeFragmentsInRange(C,N,c.PlaylistLevelType.SUBTITLE)}},E.onError=function(k,O){var C,x=O.frag;if(!x||x.type!==c.PlaylistLevelType.SUBTITLE)return;(C=this.fragCurrent)!==null&&C!==void 0&&C.loader&&this.fragCurrent.loader.abort(),this.state=n.State.IDLE},E.onSubtitleTracksUpdated=function(k,O){var C=this,x=O.subtitleTracks;this.tracksBuffered=[],this.levels=x.map(function(y){return new u.Level(y)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(y){C.tracksBuffered[y.id]=[]}),this.mediaBuffer=null},E.onSubtitleTrackSwitch=function(k,O){if(this.currentTrackId=O.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var C=this.levels[this.currentTrackId];C!=null&&C.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,C&&this.setInterval(r)},E.onSubtitleTrackLoaded=function(k,O){var C,x=O.details,y=O.id,_=this.currentTrackId,M=this.levels;if(!M.length)return;var I=M[_];if(y>=M.length||y!==_||!I)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,x.live||(C=I.details)!==null&&C!==void 0&&C.live){var N=this.mainDetails;if(x.deltaUpdateFailed||!N)return;var G=N.fragments[0];if(!I.details)x.hasProgramDateTime&&N.hasProgramDateTime?Object(b.alignMediaPlaylistByPDT)(x,N):G&&Object(d.addSliding)(x,G.start);else{var H=this.alignPlaylists(x,I.details);H===0&&G&&Object(d.addSliding)(x,G.start)}}if(I.details=x,this.levelLastLoaded=y,this.tick(),x.live&&!this.fragCurrent&&this.media&&this.state===n.State.IDLE){var B=Object(S.findFragmentByPTS)(null,x.fragments,this.media.currentTime,0);B||(this.warn("Subtitle playlist not aligned with playback"),I.details=void 0)}},E._handleFragmentLoadComplete=function(k){var O=k.frag,C=k.payload,x=O.decryptdata,y=this.hls;if(this.fragContextChanged(O))return;if(C&&C.byteLength>0&&x&&x.key&&x.iv&&x.method==="AES-128"){var _=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(C),x.key.buffer,x.iv.buffer).then(function(M){var I=performance.now();y.trigger(P.Events.FRAG_DECRYPTED,{frag:O,payload:M,stats:{tstart:_,tdecrypt:I}})})}},E.doTick=function(){if(!this.media){this.state=n.State.IDLE;return}if(this.state===n.State.IDLE){var k,O=this.currentTrackId,C=this.levels;if(!C.length||!C[O]||!C[O].details)return;var x=C[O].details,y=x.targetduration,_=this.config,M=this.media,I=v.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,M.currentTime-y,_.maxBufferHole),N=I.end,G=I.len,H=this.getMaxBufferLength()+y;if(G>H)return;console.assert(x,"Subtitle track details are defined on idle subtitle stream controller tick");var B=x.fragments,K=B.length,U=x.edge,W,X=this.fragPrevious;if(N<U){var ne=_.maxFragLookUpTolerance;X&&x.hasProgramDateTime&&(W=Object(S.findFragmentByPDT)(B,X.endProgramDateTime,ne)),W||(W=Object(S.findFragmentByPTS)(X,B,N,ne),!W&&X&&X.start<B[0].start&&(W=B[0]))}else W=B[K-1];(k=W)!==null&&k!==void 0&&k.encrypted?(p.logger.log("Loading key for "+W.sn),this.state=n.State.KEY_LOADING,this.hls.trigger(P.Events.KEY_LOADING,{frag:W})):W&&this.fragmentTracker.getState(W)===l.FragmentState.NOT_LOADED&&this.loadFragment(W,x,N)}},E.loadFragment=function(k,O,C){this.fragCurrent=k,t.prototype.loadFragment.call(this,k,O,C)},h(w,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),w}(n.default)},"./src/controller/subtitle-track-controller.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/events.ts"),p=T("./src/utils/texttrack-utils.ts"),v=T("./src/controller/base-playlist-controller.ts"),S=T("./src/types/loader.ts");function b(o,h){for(var m=0;m<h.length;m++){var s=h[m];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,s.key,s)}}function d(o,h,m){return h&&b(o.prototype,h),m&&b(o,m),o}function l(o,h){o.prototype=Object.create(h.prototype),o.prototype.constructor=o,n(o,h)}function n(o,h){return n=Object.setPrototypeOf||function(s,r){return s.__proto__=r,s},n(o,h)}var c=function(o){l(h,o);function h(s){var r;return r=o.call(this,s,"[subtitle-track-controller]")||this,r.media=null,r.tracks=[],r.groupId=null,r.tracksInGroup=[],r.trackId=-1,r.selectDefaultTrack=!0,r.queuedDefaultTrack=-1,r.trackChangeListener=function(){return r.onTextTracksChanged()},r.asyncPollTrackChange=function(){return r.pollTrackChange(0)},r.useTextTrackPolling=!1,r.subtitlePollingInterval=-1,r.subtitleDisplay=!0,r.registerListeners(),r}var m=h.prototype;return m.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,o.prototype.destroy.call(this)},m.registerListeners=function(){var r=this.hls;r.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(P.Events.LEVEL_LOADING,this.onLevelLoading,this),r.on(P.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),r.on(P.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),r.on(P.Events.ERROR,this.onError,this)},m.unregisterListeners=function(){var r=this.hls;r.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(P.Events.LEVEL_LOADING,this.onLevelLoading,this),r.off(P.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),r.off(P.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),r.off(P.Events.ERROR,this.onError,this)},m.onMediaAttached=function(r,a){if(this.media=a.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},m.pollTrackChange=function(r){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,r)},m.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 r=u(this.media.textTracks);r.forEach(function(a){Object(p.clearCurrentCues)(a)}),this.subtitleTrack=-1,this.media=null},m.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},m.onManifestParsed=function(r,a){this.tracks=a.subtitleTracks},m.onSubtitleTrackLoaded=function(r,a){var t=a.id,w=a.details,E=this.trackId,f=this.tracksInGroup[E];if(!f){this.warn("Invalid subtitle track id "+t);return}var k=f.details;f.details=a.details,this.log("subtitle track "+t+" loaded ["+w.startSN+"-"+w.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,a,k))},m.onLevelLoading=function(r,a){this.switchLevel(a.level)},m.onLevelSwitching=function(r,a){this.switchLevel(a.level)},m.switchLevel=function(r){var a=this.hls.levels[r];if(!(a!=null&&a.textGroupIds))return;var t=a.textGroupIds[a.urlId];if(this.groupId!==t){var w=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,E=this.tracks.filter(function(O){return!t||O.groupId===t});this.tracksInGroup=E;var f=this.findTrackId(w==null?void 0:w.name)||this.findTrackId();this.groupId=t;var k={subtitleTracks:E};this.log("Updating subtitle tracks, "+E.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(P.Events.SUBTITLE_TRACKS_UPDATED,k),f!==-1&&this.setSubtitleTrack(f,w)}},m.findTrackId=function(r){for(var a=this.tracksInGroup,t=0;t<a.length;t++){var w=a[t];if((!this.selectDefaultTrack||w.default)&&(!r||r===w.name))return w.id}return-1},m.onError=function(r,a){if(o.prototype.onError.call(this,r,a),a.fatal||!a.context)return;a.context.type===S.PlaylistContextType.SUBTITLE_TRACK&&a.context.id===this.trackId&&a.context.groupId===this.groupId&&this.retryLoadingOrFail(a)},m.loadPlaylist=function(r){var a=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(a)){var t=a.id,w=a.groupId,E=a.url;if(r)try{E=r.addDirectives(E)}catch(f){this.warn("Could not construct new URL with HLS Delivery Directives: "+f)}this.log("Loading subtitle playlist for id "+t),this.hls.trigger(P.Events.SUBTITLE_TRACK_LOADING,{url:E,id:t,groupId:w,deliveryDirectives:r||null})}},m.toggleTrackModes=function(r){var a=this,t=this.media,w=this.subtitleDisplay,E=this.trackId;if(!t)return;var f=u(t.textTracks),k=f.filter(function(x){return x.groupId===a.groupId});if(r===-1)[].slice.call(f).forEach(function(x){x.mode="disabled"});else{var O=k[E];O&&(O.mode="disabled")}var C=k[r];C&&(C.mode=w?"showing":"hidden")},m.setSubtitleTrack=function(r,a){var t,w=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=r;return}if(this.trackId!==r&&this.toggleTrackModes(r),this.trackId===r&&(r===-1||(t=w[r])!==null&&t!==void 0&&t.details)||r<-1||r>=w.length)return;this.clearTimer();var E=w[r];if(this.log("Switching to subtitle track "+r),this.trackId=r,E){var f=E.id,k=E.groupId,O=k===void 0?"":k,C=E.name,x=E.type,y=E.url;this.hls.trigger(P.Events.SUBTITLE_TRACK_SWITCH,{id:f,groupId:O,name:C,type:x,url:y});var _=this.switchParams(E.url,a==null?void 0:a.details);this.loadPlaylist(_)}else this.hls.trigger(P.Events.SUBTITLE_TRACK_SWITCH,{id:r})},m.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var r=-1,a=u(this.media.textTracks),t=0;t<a.length;t++)if(a[t].mode==="hidden")r=t;else if(a[t].mode==="showing"){r=t;break}this.subtitleTrack!==r&&(this.subtitleTrack=r)},d(h,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(r){this.selectDefaultTrack=!1;var a=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(r,a)}}]),h}(v.default);function u(o){for(var h=[],m=0;m<o.length;m++){var s=o[m];s.kind==="subtitles"&&s.label&&h.push(o[m])}return h}g.default=c},"./src/controller/timeline-controller.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"TimelineController",function(){return u});var P=T("./src/polyfills/number.ts"),p=T("./src/events.ts"),v=T("./src/utils/cea-608-parser.ts"),S=T("./src/utils/output-filter.ts"),b=T("./src/utils/webvtt-parser.ts"),d=T("./src/utils/texttrack-utils.ts"),l=T("./src/utils/imsc1-ttml-parser.ts"),n=T("./src/types/loader.ts"),c=T("./src/utils/logger.ts"),u=function(){function s(a){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=m(),this.captionsProperties=void 0,this.hls=a,this.config=a.config,this.Cues=a.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var t=new S.default(this,"textTrack1"),w=new S.default(this,"textTrack2"),E=new S.default(this,"textTrack3"),f=new S.default(this,"textTrack4");this.cea608Parser1=new v.default(1,t,w),this.cea608Parser2=new v.default(3,E,f)}a.on(p.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(p.Events.MANIFEST_LOADED,this.onManifestLoaded,this),a.on(p.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),a.on(p.Events.FRAG_LOADING,this.onFragLoading,this),a.on(p.Events.FRAG_LOADED,this.onFragLoaded,this),a.on(p.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),a.on(p.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),a.on(p.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),a.on(p.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),a.on(p.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var r=s.prototype;return r.destroy=function(){var t=this.hls;t.off(p.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(p.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(p.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(p.Events.FRAG_LOADING,this.onFragLoading,this),t.off(p.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(p.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(p.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(p.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(p.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(p.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},r.addCues=function(t,w,E,f,k){for(var O=!1,C=k.length;C--;){var x=k[C],y=h(x[0],x[1],w,E);if(y>=0&&(x[0]=Math.min(x[0],w),x[1]=Math.max(x[1],E),O=!0,y/(E-w)>.5))return}if(O||k.push([w,E]),this.config.renderTextTracksNatively){var _=this.captionsTracks[t];this.Cues.newCue(_,w,E,f)}else{var M=this.Cues.newCue(null,w,E,f);this.hls.trigger(p.Events.CUES_PARSED,{type:"captions",cues:M,track:t})}},r.onInitPtsFound=function(t,w){var E=this,f=w.frag,k=w.id,O=w.initPTS,C=w.timescale,x=this.unparsedVttFrags;k==="main"&&(this.initPTS[f.cc]=O,this.timescale[f.cc]=C),x.length&&(this.unparsedVttFrags=[],x.forEach(function(y){E.onFragLoaded(p.Events.FRAG_LOADED,y)}))},r.getExistingTrack=function(t){var w=this.media;if(w)for(var E=0;E<w.textTracks.length;E++){var f=w.textTracks[E];if(f[t])return f}return null},r.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},r.createNativeTrack=function(t){if(this.captionsTracks[t])return;var w=this.captionsProperties,E=this.captionsTracks,f=this.media,k=w[t],O=k.label,C=k.languageCode,x=this.getExistingTrack(t);if(x)E[t]=x,Object(d.clearCurrentCues)(E[t]),Object(d.sendAddTrackEvent)(E[t],f);else{var y=this.createTextTrack("captions",O,C);y&&(y[t]=!0,E[t]=y)}},r.createNonNativeTrack=function(t){if(this.nonNativeCaptionsTracks[t])return;var w=this.captionsProperties[t];if(!w)return;var E=w.label,f={_id:t,label:E,kind:"captions",default:w.media?!!w.media.default:!1,closedCaptions:w.media};this.nonNativeCaptionsTracks[t]=f,this.hls.trigger(p.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[f]})},r.createTextTrack=function(t,w,E){var f=this.media;return f?f.addTextTrack(t,w,E):void 0},r.onMediaAttaching=function(t,w){this.media=w.media,this._cleanTracks()},r.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(w){Object(d.clearCurrentCues)(t[w]),delete t[w]}),this.nonNativeCaptionsTracks={}},r.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=m(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},r._cleanTracks=function(){var t=this.media;if(!t)return;var w=t.textTracks;if(w)for(var E=0;E<w.length;E++)Object(d.clearCurrentCues)(w[E])},r.onSubtitleTracksUpdated=function(t,w){var E=this;this.textTracks=[];var f=w.subtitleTracks||[],k=f.some(function(y){return y.textCodec===l.IMSC1_CODEC});if(this.config.enableWebVTT||k&&this.config.enableIMSC1){var O=this.tracks&&f&&this.tracks.length===f.length;if(this.tracks=f||[],this.config.renderTextTracksNatively){var C=this.media?this.media.textTracks:[];this.tracks.forEach(function(y,_){var M;if(_<C.length){for(var I=null,N=0;N<C.length;N++)if(o(C[N],y)){I=C[N];break}I&&(M=I)}M?Object(d.clearCurrentCues)(M):(M=E.createTextTrack("subtitles",y.name,y.lang),M&&(M.mode="disabled")),M&&(M.groupId=y.groupId,E.textTracks.push(M))})}else if(!O&&this.tracks&&this.tracks.length){var x=this.tracks.map(function(y){return{label:y.name,kind:y.type.toLowerCase(),default:y.default,subtitleTrack:y}});this.hls.trigger(p.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:x})}}},r.onManifestLoaded=function(t,w){var E=this;this.config.enableCEA708Captions&&w.captions&&w.captions.forEach(function(f){var k=/(?:CC|SERVICE)([1-4])/.exec(f.instreamId);if(!k)return;var O="textTrack"+k[1],C=E.captionsProperties[O];if(!C)return;C.label=f.name,f.lang&&(C.languageCode=f.lang),C.media=f})},r.onFragLoading=function(t,w){var E=this.cea608Parser1,f=this.cea608Parser2,k=this.lastSn,O=this.lastPartIndex;if(!this.enabled||!(E&&f))return;if(w.frag.type===n.PlaylistLevelType.MAIN){var C,x,y=w.frag.sn,_=(C=w==null||((x=w.part)===null||x===void 0)?void 0:x.index)!=null?C:-1;y===k+1||y===k&&_===O+1||(E.reset(),f.reset()),this.lastSn=y,this.lastPartIndex=_}},r.onFragLoaded=function(t,w){var E=w.frag,f=w.payload,k=this.initPTS,O=this.unparsedVttFrags;if(E.type===n.PlaylistLevelType.SUBTITLE)if(f.byteLength){if(!Object(P.isFiniteNumber)(k[E.cc])){O.push(w),k.length&&this.hls.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:E,error:new Error("Missing initial subtitle PTS")});return}var C=E.decryptdata;if(C==null||C.key==null||C.method!=="AES-128"){var x=this.tracks[E.level],y=this.vttCCs;y[E.cc]||(y[E.cc]={start:E.start,prevCC:this.prevCC,new:!0},this.prevCC=E.cc),x&&x.textCodec===l.IMSC1_CODEC?this._parseIMSC1(E,f):this._parseVTTs(E,f,y)}}else this.hls.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:E,error:new Error("Empty subtitle payload")})},r._parseIMSC1=function(t,w){var E=this,f=this.hls;Object(l.parseIMSC1)(w,this.initPTS[t.cc],this.timescale[t.cc],function(k){E._appendCues(k,t.level),f.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(k){c.logger.log("Failed to parse IMSC1: "+k),f.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:k})})},r._parseVTTs=function(t,w,E){var f=this,k=this.hls;Object(b.parseWebVTT)(w,this.initPTS[t.cc],this.timescale[t.cc],E,t.cc,t.start,function(O){f._appendCues(O,t.level),k.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(O){f._fallbackToIMSC1(t,w),c.logger.log("Failed to parse VTT cue: "+O),k.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:O})})},r._fallbackToIMSC1=function(t,w){var E=this,f=this.tracks[t.level];f.textCodec||Object(l.parseIMSC1)(w,this.initPTS[t.cc],this.timescale[t.cc],function(){f.textCodec=l.IMSC1_CODEC,E._parseIMSC1(t,w)},function(){f.textCodec="wvtt"})},r._appendCues=function(t,w){var E=this.hls;if(this.config.renderTextTracksNatively){var f=this.textTracks[w];if(f.mode==="disabled")return;t.forEach(function(C){return Object(d.addCueToTrack)(f,C)})}else{var k=this.tracks[w],O=k.default?"default":"subtitles"+w;E.trigger(p.Events.CUES_PARSED,{type:"subtitles",cues:t,track:O})}},r.onFragDecrypted=function(t,w){var E=w.frag;if(E.type===n.PlaylistLevelType.SUBTITLE){if(!Object(P.isFiniteNumber)(this.initPTS[E.cc])){this.unparsedVttFrags.push(w);return}this.onFragLoaded(p.Events.FRAG_LOADED,w)}},r.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},r.onFragParsingUserdata=function(t,w){var E=this.cea608Parser1,f=this.cea608Parser2;if(!this.enabled||!(E&&f))return;for(var k=0;k<w.samples.length;k++){var O=w.samples[k].bytes;if(O){var C=this.extractCea608Data(O);E.addData(w.samples[k].pts,C[0]),f.addData(w.samples[k].pts,C[1])}}},r.onBufferFlushing=function(t,w){var E=w.startOffset,f=w.endOffset,k=w.endOffsetSubtitles,O=w.type,C=this.media;if(!C||C.currentTime<f)return;if(!O||O==="video"){var x=this.captionsTracks;Object.keys(x).forEach(function(_){return Object(d.removeCuesInRange)(x[_],E,f)})}if(this.config.renderTextTracksNatively&&(E===0&&k!==void 0)){var y=this.textTracks;Object.keys(y).forEach(function(_){return Object(d.removeCuesInRange)(y[_],E,k)})}},r.extractCea608Data=function(t){for(var w=t[0]&31,E=2,f=[[],[]],k=0;k<w;k++){var O=t[E++],C=127&t[E++],x=127&t[E++],y=(4&O)!==0,_=3&O;if(C===0&&x===0)continue;y&&((_===0||_===1)&&(f[_].push(C),f[_].push(x)))}return f},s}();function o(s,r){return s&&s.label===r.name&&!(s.textTrack1||s.textTrack2)}function h(s,r,a,t){return Math.min(r,t)-Math.max(s,a)}function m(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return P});var P=function(){function p(S,b){this.subtle=void 0,this.aesIV=void 0,this.subtle=S,this.aesIV=b}var v=p.prototype;return v.decrypt=function(b,d){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},d,b)},p}()},"./src/crypt/aes-decryptor.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"removePadding",function(){return p}),T.d(g,"default",function(){return v});var P=T("./src/utils/typed-array.ts");function p(S){var b=S.byteLength,d=b&&new DataView(S.buffer).getUint8(b-1);return d?Object(P.sliceUint8)(S,0,b-d):S}var v=function(){function S(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var b=S.prototype;return b.uint8ArrayToUint32Array_=function(l){for(var n=new DataView(l),c=new Uint32Array(4),u=0;u<4;u++)c[u]=n.getUint32(u*4);return c},b.initTable=function(){var l=this.sBox,n=this.invSBox,c=this.subMix,u=c[0],o=c[1],h=c[2],m=c[3],s=this.invSubMix,r=s[0],a=s[1],t=s[2],w=s[3],E=new Uint32Array(256),f=0,k=0,O=0;for(O=0;O<256;O++)O<128?E[O]=O<<1:E[O]=O<<1^283;for(O=0;O<256;O++){var C=k^k<<1^k<<2^k<<3^k<<4;C=C>>>8^C&255^99,l[f]=C,n[C]=f;var x=E[f],y=E[x],_=E[y],M=E[C]*257^C*16843008;u[f]=M<<24|M>>>8,o[f]=M<<16|M>>>16,h[f]=M<<8|M>>>24,m[f]=M,M=_*16843009^y*65537^x*257^f*16843008,r[C]=M<<24|M>>>8,a[C]=M<<16|M>>>16,t[C]=M<<8|M>>>24,w[C]=M,f?(f=x^E[E[E[_^x]]],k^=E[E[k]]):f=k=1}},b.expandKey=function(l){for(var n=this.uint8ArrayToUint32Array_(l),c=!0,u=0;u<n.length&&c;)c=n[u]===this.key[u],u++;if(c)return;this.key=n;var o=this.keySize=n.length;if(o!==4&&o!==6&&o!==8)throw new Error("Invalid aes key size="+o);var h=this.ksRows=(o+6+1)*4,m,s,r=this.keySchedule=new Uint32Array(h),a=this.invKeySchedule=new Uint32Array(h),t=this.sBox,w=this.rcon,E=this.invSubMix,f=E[0],k=E[1],O=E[2],C=E[3],x,y;for(m=0;m<h;m++){if(m<o){x=r[m]=n[m];continue}y=x,m%o===0?(y=y<<8|y>>>24,y=t[y>>>24]<<24|t[y>>>16&255]<<16|t[y>>>8&255]<<8|t[y&255],y^=w[m/o|0]<<24):o>6&&m%o===4&&(y=t[y>>>24]<<24|t[y>>>16&255]<<16|t[y>>>8&255]<<8|t[y&255]),r[m]=x=(r[m-o]^y)>>>0}for(s=0;s<h;s++)m=h-s,s&3?y=r[m]:y=r[m-4],s<4||m<=4?a[s]=y:a[s]=f[t[y>>>24]]^k[t[y>>>16&255]]^O[t[y>>>8&255]]^C[t[y&255]],a[s]=a[s]>>>0},b.networkToHostOrderSwap=function(l){return l<<24|(l&65280)<<8|(l&16711680)>>8|l>>>24},b.decrypt=function(l,n,c){for(var u=this.keySize+6,o=this.invKeySchedule,h=this.invSBox,m=this.invSubMix,s=m[0],r=m[1],a=m[2],t=m[3],w=this.uint8ArrayToUint32Array_(c),E=w[0],f=w[1],k=w[2],O=w[3],C=new Int32Array(l),x=new Int32Array(C.length),y,_,M,I,N,G,H,B,K,U,W,X,ne,fe,me=this.networkToHostOrderSwap;n<C.length;){for(K=me(C[n]),U=me(C[n+1]),W=me(C[n+2]),X=me(C[n+3]),N=K^o[0],G=X^o[1],H=W^o[2],B=U^o[3],ne=4,fe=1;fe<u;fe++)y=s[N>>>24]^r[G>>16&255]^a[H>>8&255]^t[B&255]^o[ne],_=s[G>>>24]^r[H>>16&255]^a[B>>8&255]^t[N&255]^o[ne+1],M=s[H>>>24]^r[B>>16&255]^a[N>>8&255]^t[G&255]^o[ne+2],I=s[B>>>24]^r[N>>16&255]^a[G>>8&255]^t[H&255]^o[ne+3],N=y,G=_,H=M,B=I,ne=ne+4;y=h[N>>>24]<<24^h[G>>16&255]<<16^h[H>>8&255]<<8^h[B&255]^o[ne],_=h[G>>>24]<<24^h[H>>16&255]<<16^h[B>>8&255]<<8^h[N&255]^o[ne+1],M=h[H>>>24]<<24^h[B>>16&255]<<16^h[N>>8&255]<<8^h[G&255]^o[ne+2],I=h[B>>>24]<<24^h[N>>16&255]<<16^h[G>>8&255]<<8^h[H&255]^o[ne+3],x[n]=me(y^E),x[n+1]=me(I^f),x[n+2]=me(M^k),x[n+3]=me(_^O),E=K,f=U,k=W,O=X,n=n+4}return x.buffer},S}()},"./src/crypt/decrypter.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return n});var P=T("./src/crypt/aes-crypto.ts"),p=T("./src/crypt/fast-aes-key.ts"),v=T("./src/crypt/aes-decryptor.ts"),S=T("./src/utils/logger.ts"),b=T("./src/utils/mp4-tools.ts"),d=T("./src/utils/typed-array.ts"),l=16,n=function(){function c(o,h,m){var s=m===void 0?{}:m,r=s.removePKCS7Padding,a=r===void 0?!0:r;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=o,this.config=h,this.removePKCS7Padding=a,a)try{var t=self.crypto;t&&(this.subtle=t.subtle||t.webkitSubtle)}catch(w){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var u=c.prototype;return u.destroy=function(){this.observer=null},u.isSync=function(){return this.config.enableSoftwareAES},u.flush=function(){var h=this.currentResult;if(!h){this.reset();return}var m=new Uint8Array(h);return this.reset(),this.removePKCS7Padding?Object(v.removePadding)(m):m},u.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},u.decrypt=function(h,m,s,r){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(h),m,s);var a=this.flush();a&&r(a.buffer)}else this.webCryptoDecrypt(new Uint8Array(h),m,s).then(r)},u.softwareDecrypt=function(h,m,s){var r=this.currentIV,a=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(h=Object(b.appendUint8Array)(t,h),this.remainderData=null);var w=this.getValidChunk(h);if(!w.length)return null;r&&(s=r);var E=this.softwareDecrypter;E||(E=this.softwareDecrypter=new v.default),E.expandKey(m);var f=a;return this.currentResult=E.decrypt(w.buffer,0,s),this.currentIV=Object(d.sliceUint8)(w,-16).buffer,f||null},u.webCryptoDecrypt=function(h,m,s){var r=this,a=this.subtle;return(this.key!==m||!this.fastAesKey)&&(this.key=m,this.fastAesKey=new p.default(a,m)),this.fastAesKey.expandKey().then(function(t){if(!a)return Promise.reject(new Error("web crypto not initialized"));var w=new P.default(a,s);return w.decrypt(h.buffer,t)}).catch(function(t){return r.onWebCryptoError(t,h,m,s)})},u.onWebCryptoError=function(h,m,s,r){return S.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",h),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(m,s,r)},u.getValidChunk=function(h){var m=h,s=h.length-h.length%l;return s!==h.length&&(m=Object(d.sliceUint8)(h,0,s),this.remainderData=Object(d.sliceUint8)(h,s)),m},u.logOnce=function(h){if(!this.logEnabled)return;S.logger.log("[decrypter.ts]: "+h),this.logEnabled=!1},c}()},"./src/crypt/fast-aes-key.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return P});var P=function(){function p(S,b){this.subtle=void 0,this.key=void 0,this.subtle=S,this.key=b}var v=p.prototype;return v.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},p}()},"./src/demux/aacdemuxer.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/demux/base-audio-demuxer.ts"),p=T("./src/demux/adts.ts"),v=T("./src/utils/logger.ts"),S=T("./src/demux/id3.ts");function b(n,c){n.prototype=Object.create(c.prototype),n.prototype.constructor=n,d(n,c)}function d(n,c){return d=Object.setPrototypeOf||function(o,h){return o.__proto__=h,o},d(n,c)}var l=function(n){b(c,n);function c(o,h){var m;return m=n.call(this)||this,m.observer=void 0,m.config=void 0,m.observer=o,m.config=h,m}var u=c.prototype;return u.resetInitSegment=function(h,m,s){n.prototype.resetInitSegment.call(this,h,m,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:h,duration:s,inputTimeScale:9e4,dropped:0}},c.probe=function(h){if(!h)return!1;for(var m=S.getID3Data(h,0)||[],s=m.length,r=h.length;s<r;s++)if(p.probe(h,s))return v.logger.log("ADTS sync word found !"),!0;return!1},u.canParse=function(h,m){return p.canParse(h,m)},u.appendFrame=function(h,m,s){p.initTrackConfig(h,this.observer,m,s,h.manifestCodec);var r=p.appendFrame(h,m,s,this.initPTS,this.frameIndex);if(r&&r.missing===0)return r},c}(P.default);l.minProbeByteLength=9,g.default=l},"./src/demux/adts.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"getAudioConfig",function(){return S}),T.d(g,"isHeaderPattern",function(){return b}),T.d(g,"getHeaderLength",function(){return d}),T.d(g,"getFullFrameLength",function(){return l}),T.d(g,"canGetFrameLength",function(){return n}),T.d(g,"isHeader",function(){return c}),T.d(g,"canParse",function(){return u}),T.d(g,"probe",function(){return o}),T.d(g,"initTrackConfig",function(){return h}),T.d(g,"getFrameDuration",function(){return m}),T.d(g,"parseFrameHeader",function(){return s}),T.d(g,"appendFrame",function(){return r});var P=T("./src/utils/logger.ts"),p=T("./src/errors.ts"),v=T("./src/events.ts");function S(a,t,w,E){var f,k,O,C,x=navigator.userAgent.toLowerCase(),y=E,_=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];f=((t[w+2]&192)>>>6)+1;var M=(t[w+2]&60)>>>2;if(M>_.length-1){a.trigger(v.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+M});return}return O=(t[w+2]&1)<<2,O|=(t[w+3]&192)>>>6,P.logger.log("manifest codec:"+E+", ADTS type:"+f+", samplingIndex:"+M),/firefox/i.test(x)?M>=6?(f=5,C=new Array(4),k=M-3):(f=2,C=new Array(2),k=M):x.indexOf("android")!==-1?(f=2,C=new Array(2),k=M):(f=5,C=new Array(4),E&&(E.indexOf("mp4a.40.29")!==-1||E.indexOf("mp4a.40.5")!==-1)||!E&&M>=6?k=M-3:((E&&E.indexOf("mp4a.40.2")!==-1&&(M>=6&&O===1||/vivaldi/i.test(x))||!E&&O===1)&&(f=2,C=new Array(2)),k=M)),C[0]=f<<3,C[0]|=(M&14)>>1,C[1]|=(M&1)<<7,C[1]|=O<<3,f===5&&(C[1]|=(k&14)>>1,C[2]=(k&1)<<7,C[2]|=2<<2,C[3]=0),{config:C,samplerate:_[M],channelCount:O,codec:"mp4a.40."+f,manifestCodec:y}}function b(a,t){return a[t]===255&&(a[t+1]&246)===240}function d(a,t){return a[t+1]&1?7:9}function l(a,t){return(a[t+3]&3)<<11|a[t+4]<<3|(a[t+5]&224)>>>5}function n(a,t){return t+5<a.length}function c(a,t){return t+1<a.length&&b(a,t)}function u(a,t){return n(a,t)&&b(a,t)&&l(a,t)<=a.length-t}function o(a,t){if(c(a,t)){var w=d(a,t);if(t+w>=a.length)return!1;var E=l(a,t);if(E<=w)return!1;var f=t+E;return f===a.length||c(a,f)}return!1}function h(a,t,w,E,f){if(!a.samplerate){var k=S(t,w,E,f);if(!k)return;a.config=k.config,a.samplerate=k.samplerate,a.channelCount=k.channelCount,a.codec=k.codec,a.manifestCodec=k.manifestCodec,P.logger.log("parsed codec:"+a.codec+", rate:"+k.samplerate+", channels:"+k.channelCount)}}function m(a){return 1024*9e4/a}function s(a,t,w,E,f){var k=d(a,t),O=l(a,t);if(O-=k,O>0){var C=w+E*f;return{headerLength:k,frameLength:O,stamp:C}}}function r(a,t,w,E,f){var k=m(a.samplerate),O=s(t,w,E,f,k);if(O){var C=O.frameLength,x=O.headerLength,y=O.stamp,_=x+C,M=Math.max(0,w+_-t.length),I;M?(I=new Uint8Array(_-x),I.set(t.subarray(w+x,t.length),0)):I=t.subarray(w+x,w+_);var N={unit:I,pts:y};return M||a.samples.push(N),{sample:N,length:_,missing:M}}}},"./src/demux/base-audio-demuxer.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"initPTSFn",function(){return l});var P=T("./src/polyfills/number.ts"),p=T("./src/demux/id3.ts"),v=T("./src/demux/dummy-demuxed-track.ts"),S=T("./src/utils/mp4-tools.ts"),b=T("./src/utils/typed-array.ts"),d=function(){function n(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var c=n.prototype;return c.resetInitSegment=function(o,h,m){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},c.resetTimeStamp=function(){},c.resetContiguity=function(){},c.canParse=function(o,h){return!1},c.appendFrame=function(o,h,m){},c.demux=function(o,h){this.cachedData&&(o=Object(S.appendUint8Array)(this.cachedData,o),this.cachedData=null);var m=p.getID3Data(o,0),s=m?m.length:0,r,a,t=this._audioTrack,w=this._id3Track,E=m?p.getTimeStamp(m):void 0,f=o.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=l(E,h)),m&&m.length>0&&w.samples.push({pts:this.initPTS,dts:this.initPTS,data:m}),a=this.initPTS;s<f;){if(this.canParse(o,s)){var k=this.appendFrame(t,o,s);k?(this.frameIndex++,a=k.sample.pts,s+=k.length,r=s):s=f}else p.canParse(o,s)?(m=p.getID3Data(o,s),w.samples.push({pts:a,dts:a,data:m}),s+=m.length,r=s):s++;if(s===f&&r!==f){var O=Object(b.sliceUint8)(o,r);this.cachedData?this.cachedData=Object(S.appendUint8Array)(this.cachedData,O):this.cachedData=O}}return{audioTrack:t,avcTrack:Object(v.dummyTrack)(),id3Track:w,textTrack:Object(v.dummyTrack)()}},c.demuxSampleAes=function(o,h,m){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},c.flush=function(o){var h=this.cachedData;return h&&(this.cachedData=null,this.demux(h,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(v.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(v.dummyTrack)()}},c.destroy=function(){},n}(),l=function(c,u){return Object(P.isFiniteNumber)(c)?c*90:u*9e4};g.default=d},"./src/demux/chunk-cache.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return P});var P=function(){function v(){this.chunks=[],this.dataLength=0}var S=v.prototype;return S.push=function(d){this.chunks.push(d),this.dataLength+=d.length},S.flush=function(){var d=this.chunks,l=this.dataLength,n;if(d.length)d.length===1?n=d[0]:n=p(d,l);else return new Uint8Array(0);return this.reset(),n},S.reset=function(){this.chunks.length=0,this.dataLength=0},v}();function p(v,S){for(var b=new Uint8Array(S),d=0,l=0;l<v.length;l++){var n=v[l];b.set(n,d),d+=n.length}return b}},"./src/demux/dummy-demuxed-track.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"dummyTrack",function(){return P});function P(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/utils/logger.ts"),p=function(){function v(b){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=b,this.bytesAvailable=b.byteLength,this.word=0,this.bitsAvailable=0}var S=v.prototype;return S.loadWord=function(){var d=this.data,l=this.bytesAvailable,n=d.byteLength-l,c=new Uint8Array(4),u=Math.min(4,l);if(u===0)throw new Error("no bytes available");c.set(d.subarray(n,n+u)),this.word=new DataView(c.buffer).getUint32(0),this.bitsAvailable=u*8,this.bytesAvailable-=u},S.skipBits=function(d){var l;this.bitsAvailable>d?(this.word<<=d,this.bitsAvailable-=d):(d-=this.bitsAvailable,l=d>>3,d-=l>>3,this.bytesAvailable-=l,this.loadWord(),this.word<<=d,this.bitsAvailable-=d)},S.readBits=function(d){var l=Math.min(this.bitsAvailable,d),n=this.word>>>32-l;return d>32&&P.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=l,this.bitsAvailable>0?this.word<<=l:this.bytesAvailable>0&&this.loadWord(),l=d-l,l>0&&this.bitsAvailable?n<<l|this.readBits(l):n},S.skipLZ=function(){var d;for(d=0;d<this.bitsAvailable;++d)if((this.word&2147483648>>>d)!==0)return this.word<<=d,this.bitsAvailable-=d,d;return this.loadWord(),d+this.skipLZ()},S.skipUEG=function(){this.skipBits(1+this.skipLZ())},S.skipEG=function(){this.skipBits(1+this.skipLZ())},S.readUEG=function(){var d=this.skipLZ();return this.readBits(d+1)-1},S.readEG=function(){var d=this.readUEG();return 1&d?1+d>>>1:-1*(d>>>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(d){for(var l=8,n=8,c,u=0;u<d;u++)n!==0&&(c=this.readEG(),n=(l+c+256)%256),l=n===0?l:n},S.readSPS=function(){var d=0,l=0,n=0,c=0,u,o,h,m=this.readUByte.bind(this),s=this.readBits.bind(this),r=this.readUEG.bind(this),a=this.readBoolean.bind(this),t=this.skipBits.bind(this),w=this.skipEG.bind(this),E=this.skipUEG.bind(this),f=this.skipScalingList.bind(this);m();var k=m();if(s(5),t(3),m(),E(),k===100||k===110||k===122||k===244||k===44||k===83||k===86||k===118||k===128){var O=r();if(O===3&&t(1),E(),E(),t(1),a())for(o=O!==3?8:12,h=0;h<o;h++)a()&&(h<6?f(16):f(64))}E();var C=r();if(C===0)r();else if(C===1)for(t(1),w(),w(),u=r(),h=0;h<u;h++)w();E(),t(1);var x=r(),y=r(),_=s(1);_===0&&t(1),t(1),a()&&(d=r(),l=r(),n=r(),c=r());var M=[1,1];if(a()&&a()){var I=m();switch(I){case 1:M=[1,1];break;case 2:M=[12,11];break;case 3:M=[10,11];break;case 4:M=[16,11];break;case 5:M=[40,33];break;case 6:M=[24,11];break;case 7:M=[20,11];break;case 8:M=[32,11];break;case 9:M=[80,33];break;case 10:M=[18,11];break;case 11:M=[15,11];break;case 12:M=[64,33];break;case 13:M=[160,99];break;case 14:M=[4,3];break;case 15:M=[3,2];break;case 16:M=[2,1];break;case 255:{M=[m()<<8|m(),m()<<8|m()];break}}}return{width:Math.ceil((x+1)*16-d*2-l*2),height:(2-_)*(y+1)*16-(_?2:4)*(n+c),pixelRatio:M}},S.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},v}();g.default=p},"./src/demux/id3.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"isHeader",function(){return P}),T.d(g,"isFooter",function(){return p}),T.d(g,"getID3Data",function(){return v}),T.d(g,"canParse",function(){return b}),T.d(g,"getTimeStamp",function(){return d}),T.d(g,"isTimeStampFrame",function(){return l}),T.d(g,"getID3Frames",function(){return c}),T.d(g,"decodeFrame",function(){return u}),T.d(g,"utf8ArrayToStr",function(){return r}),T.d(g,"testables",function(){return a});var P=function(f,k){return k+10<=f.length&&(f[k]===73&&f[k+1]===68&&f[k+2]===51&&(f[k+3]<255&&f[k+4]<255&&(f[k+6]<128&&f[k+7]<128&&f[k+8]<128&&f[k+9]<128)))},p=function(f,k){return k+10<=f.length&&(f[k]===51&&f[k+1]===68&&f[k+2]===73&&(f[k+3]<255&&f[k+4]<255&&(f[k+6]<128&&f[k+7]<128&&f[k+8]<128&&f[k+9]<128)))},v=function(f,k){for(var O=k,C=0;P(f,k);){C+=10;var x=S(f,k+6);C+=x,p(f,k+10)&&(C+=10),k+=C}return C>0?f.subarray(O,O+C):void 0},S=function(f,k){var O=0;return O=(f[k]&127)<<21,O|=(f[k+1]&127)<<14,O|=(f[k+2]&127)<<7,O|=f[k+3]&127,O},b=function(f,k){return P(f,k)&&S(f,k+6)+10<=f.length-k},d=function(f){for(var k=c(f),O=0;O<k.length;O++){var C=k[O];if(l(C))return s(C)}return},l=function(f){return f&&f.key==="PRIV"&&f.info==="com.apple.streaming.transportStreamTimestamp"},n=function(f){var k=String.fromCharCode(f[0],f[1],f[2],f[3]),O=S(f,4),C=10;return{type:k,size:O,data:f.subarray(C,C+O)}},c=function(f){for(var k=0,O=[];P(f,k);){var C=S(f,k+6);k+=10;for(var x=k+C;k+8<x;){var y=n(f.subarray(k)),_=u(y);_&&O.push(_),k+=y.size+10}p(f,k)&&(k+=10)}return O},u=function(f){return f.type==="PRIV"?o(f):f.type[0]==="W"?m(f):h(f)},o=function(f){if(f.size<2)return;var k=r(f.data,!0),O=new Uint8Array(f.data.subarray(k.length+1));return{key:f.type,info:k,data:O.buffer}},h=function(f){if(f.size<2)return;if(f.type==="TXXX"){var k=1,O=r(f.data.subarray(k),!0);k+=O.length+1;var C=r(f.data.subarray(k));return{key:f.type,info:O,data:C}}var x=r(f.data.subarray(1));return{key:f.type,data:x}},m=function(f){if(f.type==="WXXX"){if(f.size<2)return;var k=1,O=r(f.data.subarray(k),!0);k+=O.length+1;var C=r(f.data.subarray(k));return{key:f.type,info:O,data:C}}var x=r(f.data);return{key:f.type,data:x}},s=function(f){if(f.data.byteLength===8){var k=new Uint8Array(f.data),O=k[3]&1,C=(k[4]<<23)+(k[5]<<15)+(k[6]<<7)+k[7];return C/=45,O&&(C+=4772185884e-2),Math.round(C)}return},r=function(f,k){k===void 0&&(k=!1);var O=w();if(O){var C=O.decode(f);if(k){var x=C.indexOf("\0");return x!==-1?C.substring(0,x):C}return C.replace(/\0/g,"")}for(var y=f.length,_,M,I,N="",G=0;G<y;){if(_=f[G++],_===0&&k)return N;if(_===0||_===3)continue;switch(_>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:N+=String.fromCharCode(_);break;case 12:case 13:M=f[G++],N+=String.fromCharCode((_&31)<<6|M&63);break;case 14:M=f[G++],I=f[G++],N+=String.fromCharCode((_&15)<<12|(M&63)<<6|(I&63)<<0);break;default:}}return N},a={decodeTextFrame:h},t;function w(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/demux/base-audio-demuxer.ts"),p=T("./src/demux/id3.ts"),v=T("./src/utils/logger.ts"),S=T("./src/demux/mpegaudio.ts");function b(n,c){n.prototype=Object.create(c.prototype),n.prototype.constructor=n,d(n,c)}function d(n,c){return d=Object.setPrototypeOf||function(o,h){return o.__proto__=h,o},d(n,c)}var l=function(n){b(c,n);function c(){return n.apply(this,arguments)||this}var u=c.prototype;return u.resetInitSegment=function(h,m,s){n.prototype.resetInitSegment.call(this,h,m,s),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:h,duration:s,inputTimeScale:9e4,dropped:0}},c.probe=function(h){if(!h)return!1;for(var m=p.getID3Data(h,0)||[],s=m.length,r=h.length;s<r;s++)if(S.probe(h,s))return v.logger.log("MPEG Audio sync word found !"),!0;return!1},u.canParse=function(h,m){return S.canParse(h,m)},u.appendFrame=function(h,m,s){return this.initPTS===null?void 0:S.appendFrame(h,m,s,this.initPTS,this.frameIndex)},c}(P.default);l.minProbeByteLength=4,g.default=l},"./src/demux/mp4demuxer.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/utils/mp4-tools.ts"),p=T("./src/demux/dummy-demuxed-track.ts"),v=function(){function S(d,l){this.remainderData=null,this.config=void 0,this.config=l}var b=S.prototype;return b.resetTimeStamp=function(){},b.resetInitSegment=function(){},b.resetContiguity=function(){},S.probe=function(l){return Object(P.findBox)({data:l,start:0,end:Math.min(l.length,16384)},["moof"]).length>0},b.demux=function(l){var n=l,c=Object(p.dummyTrack)();if(this.config.progressive){this.remainderData&&(n=Object(P.appendUint8Array)(this.remainderData,l));var u=Object(P.segmentValidRange)(n);this.remainderData=u.remainder,c.samples=u.valid||new Uint8Array}else c.samples=n;return{audioTrack:Object(p.dummyTrack)(),avcTrack:c,id3Track:Object(p.dummyTrack)(),textTrack:Object(p.dummyTrack)()}},b.flush=function(){var l=Object(p.dummyTrack)();return l.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(p.dummyTrack)(),avcTrack:l,id3Track:Object(p.dummyTrack)(),textTrack:Object(p.dummyTrack)()}},b.demuxSampleAes=function(l,n,c){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},b.destroy=function(){},S}();v.minProbeByteLength=1024,g.default=v},"./src/demux/mpegaudio.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"appendFrame",function(){return d}),T.d(g,"parseHeader",function(){return l}),T.d(g,"isHeaderPattern",function(){return n}),T.d(g,"isHeader",function(){return c}),T.d(g,"canParse",function(){return u}),T.d(g,"probe",function(){return o});var P=null,p=[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],v=[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 d(h,m,s,r,a){if(s+24>m.length)return;var t=l(m,s);if(t&&s+t.frameLength<=m.length){var w=t.samplesPerFrame*9e4/t.sampleRate,E=r+a*w,f={unit:m.subarray(s,s+t.frameLength),pts:E,dts:E};return h.config=[],h.channelCount=t.channelCount,h.samplerate=t.sampleRate,h.samples.push(f),{sample:f,length:t.frameLength,missing:0}}}function l(h,m){var s=h[m+1]>>3&3,r=h[m+1]>>1&3,a=h[m+2]>>4&15,t=h[m+2]>>2&3;if(s!==1&&a!==0&&a!==15&&t!==3){var w=h[m+2]>>1&1,E=h[m+3]>>6,f=s===3?3-r:r===3?3:4,k=p[f*14+a-1]*1e3,O=s===3?0:s===2?1:2,C=v[O*3+t],x=E===3?1:2,y=S[s][r],_=b[r],M=y*8*_,I=Math.floor(y*k/C+w)*_;if(P===null){var N=navigator.userAgent||"",G=N.match(/Chrome\/(\d+)/i);P=G?parseInt(G[1]):0}var H=!!P&&P<=87;return H&&r===2&&k>=224e3&&E===0&&(h[m+3]=h[m+3]|128),{sampleRate:C,channelCount:x,frameLength:I,samplesPerFrame:M}}}function n(h,m){return h[m]===255&&(h[m+1]&224)===224&&(h[m+1]&6)!==0}function c(h,m){return m+1<h.length&&n(h,m)}function u(h,m){var s=4;return n(h,m)&&s<=h.length-m}function o(h,m){if(m+1<h.length&&n(h,m)){var s=4,r=l(h,m),a=s;r!=null&&r.frameLength&&(a=r.frameLength);var t=m+a;return t===h.length||c(h,t)}return!1}},"./src/demux/sample-aes.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/crypt/decrypter.ts"),p=T("./src/demux/tsdemuxer.ts"),v=function(){function S(d,l,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new P.default(d,l,{removePKCS7Padding:!1})}var b=S.prototype;return b.decryptBuffer=function(l,n){this.decrypter.decrypt(l,this.keyData.key.buffer,this.keyData.iv.buffer,n)},b.decryptAacSample=function(l,n,c,u){var o=l[n].unit,h=o.subarray(16,o.length-o.length%16),m=h.buffer.slice(h.byteOffset,h.byteOffset+h.length),s=this;this.decryptBuffer(m,function(r){var a=new Uint8Array(r);o.set(a,16),u||s.decryptAacSamples(l,n+1,c)})},b.decryptAacSamples=function(l,n,c){for(;;n++){if(n>=l.length){c();return}if(l[n].unit.length<32)continue;var u=this.decrypter.isSync();if(this.decryptAacSample(l,n,c,u),!u)return}},b.getAvcEncryptedData=function(l){for(var n=Math.floor((l.length-48)/160)*16+16,c=new Int8Array(n),u=0,o=32;o<=l.length-16;o+=160,u+=16)c.set(l.subarray(o,o+16),u);return c},b.getAvcDecryptedUnit=function(l,n){for(var c=new Uint8Array(n),u=0,o=32;o<=l.length-16;o+=160,u+=16)l.set(c.subarray(u,u+16),o);return l},b.decryptAvcSample=function(l,n,c,u,o,h){var m=Object(p.discardEPB)(o.data),s=this.getAvcEncryptedData(m),r=this;this.decryptBuffer(s.buffer,function(a){o.data=r.getAvcDecryptedUnit(m,a),h||r.decryptAvcSamples(l,n,c+1,u)})},b.decryptAvcSamples=function(l,n,c,u){if(l instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;n++,c=0){if(n>=l.length){u();return}for(var o=l[n].units;!(c>=o.length);c++){var h=o[c];if(h.data.length<=48||h.type!==1&&h.type!==5)continue;var m=this.decrypter.isSync();if(this.decryptAvcSample(l,n,c,u,h,m),!m)return}}},S}();g.default=v},"./src/demux/transmuxer-interface.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return o});var P=T("./node_modules/webworkify-webpack/index.js"),p=T.n(P),v=T("./src/events.ts"),S=T("./src/demux/transmuxer.ts"),b=T("./src/utils/logger.ts"),d=T("./src/errors.ts"),l=T("./src/utils/mediasource-helper.ts"),n=T("./node_modules/eventemitter3/index.js"),c=T.n(n),u=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},o=function(){function h(s,r,a,t){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=s,this.id=r,this.onTransmuxComplete=a,this.onFlush=t;var E=s.config,f=function(y,_){_=_||{},_.frag=w.frag,_.id=w.id,s.trigger(y,_)};this.observer=new n.EventEmitter,this.observer.on(v.Events.FRAG_DECRYPTED,f),this.observer.on(v.Events.ERROR,f);var k={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(E.enableWorker&&typeof Worker!="undefined"){b.logger.log("demuxing in webworker");var C;try{C=this.worker=P("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),C.addEventListener("message",this.onwmsg),C.onerror=function(x){s.trigger(v.Events.ERROR,{type:d.ErrorTypes.OTHER_ERROR,details:d.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(x.message+" ("+x.filename+":"+x.lineno+")")})},C.postMessage({cmd:"init",typeSupported:k,vendor:O,id:r,config:JSON.stringify(E)})}catch(x){b.logger.warn("Error in worker:",x),b.logger.error("Error while initializing DemuxerWorker, fallback to inline"),C&&self.URL.revokeObjectURL(C.objectURL),this.transmuxer=new S.default(this.observer,k,E,O,r),this.worker=null}}else this.transmuxer=new S.default(this.observer,k,E,O,r)}var m=h.prototype;return m.destroy=function(){var r=this.worker;if(r)r.removeEventListener("message",this.onwmsg),r.terminate(),this.worker=null;else{var a=this.transmuxer;a&&(a.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},m.push=function(r,a,t,w,E,f,k,O,C,x){var y=this;C.transmuxing.start=self.performance.now();var _=this.transmuxer,M=this.worker,I=f?f.start:E.start,N=E.decryptdata,G=this.frag,H=!(G&&E.cc===G.cc),B=!(G&&C.level===G.level),K=G?C.sn-G.sn:-1,U=this.part?C.part-this.part.index:1,W=!B&&(K===1||K===0&&U===1),X=self.performance.now();(B||K||E.stats.parsing.start===0)&&(E.stats.parsing.start=X),f&&(U||!W)&&(f.stats.parsing.start=X);var ne=new S.TransmuxState(H,W,O,B,I);if(!W||H){b.logger.log("[transmuxer-interface, "+E.type+"]: Starting new transmux session for sn: "+C.sn+" p: "+C.part+" level: "+C.level+" id: "+C.id+`
|
|
|
discontinuity: `+H+`
|
|
|
trackSwitch: `+B+`
|
|
|
contiguous: `+W+`
|
|
|
accurateTimeOffset: `+O+`
|
|
|
timeOffset: `+I);var fe=new S.TransmuxConfig(t,w,a,k,x);this.configureTransmuxer(fe)}if(this.frag=E,this.part=f,M)M.postMessage({cmd:"demux",data:r,decryptdata:N,chunkMeta:C,state:ne},r instanceof ArrayBuffer?[r]:[]);else if(_){var me=_.push(r,N,C,ne);Object(S.isPromise)(me)?me.then(function(Ae){y.handleTransmuxComplete(Ae)}):this.handleTransmuxComplete(me)}},m.flush=function(r){var a=this;r.transmuxing.start=self.performance.now();var t=this.transmuxer,w=this.worker;if(w)w.postMessage({cmd:"flush",chunkMeta:r});else if(t){var E=t.flush(r);Object(S.isPromise)(E)?E.then(function(f){a.handleFlushResult(f,r)}):this.handleFlushResult(E,r)}},m.handleFlushResult=function(r,a){var t=this;r.forEach(function(w){t.handleTransmuxComplete(w)}),this.onFlush(a)},m.onWorkerMessage=function(r){var a=r.data,t=this.hls;switch(a.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(a.data);break}case"flush":{this.onFlush(a.data);break}default:{a.data=a.data||{},a.data.frag=this.frag,a.data.id=this.id,t.trigger(a.event,a.data);break}}},m.configureTransmuxer=function(r){var a=this.worker,t=this.transmuxer;a?a.postMessage({cmd:"configure",config:r}):t&&t.configure(r)},m.handleTransmuxComplete=function(r){r.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(r)},h}()},"./src/demux/transmuxer-worker.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return d});var P=T("./src/demux/transmuxer.ts"),p=T("./src/events.ts"),v=T("./src/utils/logger.ts"),S=T("./node_modules/eventemitter3/index.js"),b=T.n(S);function d(o){var h=new S.EventEmitter,m=function(r,a){o.postMessage({event:r,data:a})};h.on(p.Events.FRAG_DECRYPTED,m),h.on(p.Events.ERROR,m),o.addEventListener("message",function(s){var r=s.data;switch(r.cmd){case"init":{var a=JSON.parse(r.config);o.transmuxer=new P.default(h,r.typeSupported,a,r.vendor,r.id),Object(v.enableLogs)(a.debug),m("init",null);break}case"configure":{o.transmuxer.configure(r.config);break}case"demux":{var t=o.transmuxer.push(r.data,r.decryptdata,r.chunkMeta,r.state);Object(P.isPromise)(t)?t.then(function(f){l(o,f)}):l(o,t);break}case"flush":{var w=r.chunkMeta,E=o.transmuxer.flush(w);Object(P.isPromise)(E)?E.then(function(f){c(o,f,w)}):c(o,E,w);break}default:break}})}function l(o,h){if(u(h.remuxResult))return;var m=[],s=h.remuxResult,r=s.audio,a=s.video;r&&n(m,r),a&&n(m,a),o.postMessage({event:"transmuxComplete",data:h},m)}function n(o,h){h.data1&&o.push(h.data1.buffer),h.data2&&o.push(h.data2.buffer)}function c(o,h,m){h.forEach(function(s){l(o,s)}),o.postMessage({event:"flush",data:m})}function u(o){return!o.audio&&!o.video&&!o.text&&!o.id3&&!o.initSegment}},"./src/demux/transmuxer.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return a}),T.d(g,"isPromise",function(){return E}),T.d(g,"TransmuxConfig",function(){return f}),T.d(g,"TransmuxState",function(){return k});var P=T("./src/events.ts"),p=T("./src/errors.ts"),v=T("./src/crypt/decrypter.ts"),S=T("./src/demux/aacdemuxer.ts"),b=T("./src/demux/mp4demuxer.ts"),d=T("./src/demux/tsdemuxer.ts"),l=T("./src/demux/mp3demuxer.ts"),n=T("./src/remux/mp4-remuxer.ts"),c=T("./src/remux/passthrough-remuxer.ts"),u=T("./src/demux/chunk-cache.ts"),o=T("./src/utils/mp4-tools.ts"),h=T("./src/utils/logger.ts"),m;try{m=self.performance.now.bind(self.performance)}catch(O){h.logger.debug("Unable to use Performance API on this environment"),m=self.Date.now}var s=[{demux:d.default,remux:n.default},{demux:b.default,remux:c.default},{demux:S.default,remux:n.default},{demux:l.default,remux:n.default}],r=1024;s.forEach(function(O){var C=O.demux;r=Math.max(r,C.minProbeByteLength)});var a=function(){function O(x,y,_,M,I){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 u.default,this.observer=x,this.typeSupported=y,this.config=_,this.vendor=M,this.id=I}var C=O.prototype;return C.configure=function(y){this.transmuxConfig=y,this.decrypter&&this.decrypter.reset()},C.push=function(y,_,M,I){var N=this,G=M.transmuxing;G.executeStart=m();var H=new Uint8Array(y),B=this.cache,K=this.config,U=this.currentTransmuxState,W=this.transmuxConfig;I&&(this.currentTransmuxState=I);var X=t(H,_);if(X&&X.method==="AES-128"){var ne=this.getDecrypter();if(K.enableSoftwareAES){var fe=ne.softwareDecrypt(H,X.key.buffer,X.iv.buffer);if(!fe)return G.executeEnd=m(),w(M);H=new Uint8Array(fe)}else return this.decryptionPromise=ne.webCryptoDecrypt(H,X.key.buffer,X.iv.buffer).then(function(Q){var V=N.push(Q,null,M);return N.decryptionPromise=null,V}),this.decryptionPromise}var me=I||U,Ae=me.contiguous,De=me.discontinuity,ye=me.trackSwitch,Oe=me.accurateTimeOffset,xe=me.timeOffset,ue=W.audioCodec,le=W.videoCodec,re=W.defaultInitPts,pe=W.duration,ee=W.initSegmentData;if((De||ye)&&this.resetInitSegment(ee,ue,le,pe),De&&this.resetInitialTimestamp(re),Ae||this.resetContiguity(),this.needsProbing(H,De,ye)){if(B.dataLength){var te=B.flush();H=Object(o.appendUint8Array)(te,H)}this.configureTransmuxer(H,W)}var ce=this.transmux(H,X,xe,Oe,M),q=this.currentTransmuxState;return q.contiguous=!0,q.discontinuity=!1,q.trackSwitch=!1,G.executeEnd=m(),ce},C.flush=function(y){var _=this,M=y.transmuxing;M.executeStart=m();var I=this.decrypter,N=this.cache,G=this.currentTransmuxState,H=this.decryptionPromise;if(H)return H.then(function(){return _.flush(y)});var B=[],K=G.timeOffset;if(I){var U=I.flush();U&&B.push(this.push(U,null,y))}var W=N.dataLength;N.reset();var X=this.demuxer,ne=this.remuxer;if(!X||!ne)return W>=r&&this.observer.emit(P.Events.ERROR,P.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),M.executeEnd=m(),[w(y)];var fe=X.flush(K);return E(fe)?fe.then(function(me){return _.flushRemux(B,me,y),B}):(this.flushRemux(B,fe,y),B)},C.flushRemux=function(y,_,M){var I=_.audioTrack,N=_.avcTrack,G=_.id3Track,H=_.textTrack,B=this.currentTransmuxState,K=B.accurateTimeOffset,U=B.timeOffset;h.logger.log("[transmuxer.ts]: Flushed fragment "+M.sn+(M.part>-1?" p: "+M.part:"")+" of level "+M.level);var W=this.remuxer.remux(I,N,G,H,U,K,!0,this.id);y.push({remuxResult:W,chunkMeta:M}),M.transmuxing.executeEnd=m()},C.resetInitialTimestamp=function(y){var _=this.demuxer,M=this.remuxer;if(!_||!M)return;_.resetTimeStamp(y),M.resetTimeStamp(y)},C.resetContiguity=function(){var y=this.demuxer,_=this.remuxer;if(!y||!_)return;y.resetContiguity(),_.resetNextTimestamp()},C.resetInitSegment=function(y,_,M,I){var N=this.demuxer,G=this.remuxer;if(!N||!G)return;N.resetInitSegment(_,M,I),G.resetInitSegment(y,_,M)},C.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},C.transmux=function(y,_,M,I,N){var G;return _&&_.method==="SAMPLE-AES"?G=this.transmuxSampleAes(y,_,M,I,N):G=this.transmuxUnencrypted(y,M,I,N),G},C.transmuxUnencrypted=function(y,_,M,I){var N=this.demuxer.demux(y,_,!1,!this.config.progressive),G=N.audioTrack,H=N.avcTrack,B=N.id3Track,K=N.textTrack,U=this.remuxer.remux(G,H,B,K,_,M,!1,this.id);return{remuxResult:U,chunkMeta:I}},C.transmuxSampleAes=function(y,_,M,I,N){var G=this;return this.demuxer.demuxSampleAes(y,_,M).then(function(H){var B=G.remuxer.remux(H.audioTrack,H.avcTrack,H.id3Track,H.textTrack,M,I,!1,G.id);return{remuxResult:B,chunkMeta:N}})},C.configureTransmuxer=function(y,_){for(var M=this.config,I=this.observer,N=this.typeSupported,G=this.vendor,H=_.audioCodec,B=_.defaultInitPts,K=_.duration,U=_.initSegmentData,W=_.videoCodec,X,ne=0,fe=s.length;ne<fe;ne++)if(s[ne].demux.probe(y)){X=s[ne];break}X||(h.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),X={demux:b.default,remux:c.default});var me=this.demuxer,Ae=this.remuxer,De=X.remux,ye=X.demux;(!Ae||!(Ae instanceof De))&&(this.remuxer=new De(I,M,N,G)),(!me||!(me instanceof ye))&&(this.demuxer=new ye(I,M,N),this.probe=ye.probe),this.resetInitSegment(U,H,W,K),this.resetInitialTimestamp(B)},C.needsProbing=function(y,_,M){return!this.demuxer||!this.remuxer||_||M},C.getDecrypter=function(){var y=this.decrypter;return y||(y=this.decrypter=new v.default(this.observer,this.config)),y},O}();function t(O,C){var x=null;return O.byteLength>0&&C!=null&&C.key!=null&&C.iv!==null&&C.method!=null&&(x=C),x}var w=function(C){return{remuxResult:{},chunkMeta:C}};function E(O){return"then"in O&&O.then instanceof Function}var f=function(C,x,y,_,M){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=C,this.videoCodec=x,this.initSegmentData=y,this.duration=_,this.defaultInitPts=M},k=function(C,x,y,_,M){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=C,this.contiguous=x,this.accurateTimeOffset=y,this.trackSwitch=_,this.timeOffset=M}},"./src/demux/tsdemuxer.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"discardEPB",function(){return w});var P=T("./src/demux/adts.ts"),p=T("./src/demux/mpegaudio.ts"),v=T("./src/demux/exp-golomb.ts"),S=T("./src/demux/id3.ts"),b=T("./src/demux/sample-aes.ts"),d=T("./src/events.ts"),l=T("./src/utils/mp4-tools.ts"),n=T("./src/utils/logger.ts"),c=T("./src/errors.ts"),u={video:1,audio:2,id3:3,text:4},o=function(){function E(k,O,C){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=k,this.config=O,this.typeSupported=C}E.probe=function(O){var C=E.syncOffset(O);return C<0?!1:(C&&n.logger.warn("MPEG2-TS detected but first sync word found @ offset "+C+", junk ahead ?"),!0)},E.syncOffset=function(O){for(var C=Math.min(1e3,O.length-3*188),x=0;x<C;){if(O[x]===71&&O[x+188]===71&&O[x+2*188]===71)return x;x++}return-1},E.createTrack=function(O,C){return{container:O==="video"||O==="audio"?"video/mp2t":void 0,type:O,id:u[O],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:O==="audio"?C:void 0}};var f=E.prototype;return f.resetInitSegment=function(O,C,x){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=E.createTrack("video",x),this._audioTrack=E.createTrack("audio",x),this._id3Track=E.createTrack("id3",x),this._txtTrack=E.createTrack("text",x),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=O,this.videoCodec=C,this._duration=x},f.resetTimeStamp=function(){},f.resetContiguity=function(){var O=this._audioTrack,C=this._avcTrack,x=this._id3Track;O&&(O.pesData=null),C&&(C.pesData=null),x&&(x.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},f.demux=function(O,C,x,y){x===void 0&&(x=!1),y===void 0&&(y=!1),x||(this.sampleAes=null);var _,M=this._avcTrack,I=this._audioTrack,N=this._id3Track,G=M.pid,H=M.pesData,B=I.pid,K=N.pid,U=I.pesData,W=N.pesData,X=!1,ne=this.pmtParsed,fe=this._pmtId,me=O.length;if(this.remainderData&&(O=Object(l.appendUint8Array)(this.remainderData,O),me=O.length,this.remainderData=null),me<188&&!y)return this.remainderData=O,{audioTrack:I,avcTrack:M,id3Track:N,textTrack:this._txtTrack};var Ae=Math.max(0,E.syncOffset(O));me-=(me+Ae)%188,me<O.byteLength&&!y&&(this.remainderData=new Uint8Array(O.buffer,me,O.buffer.byteLength-me));for(var De=Ae;De<me;De+=188)if(O[De]===71){var ye=!!(O[De+1]&64),Oe=((O[De+1]&31)<<8)+O[De+2],xe=(O[De+3]&48)>>4,ue=void 0;if(xe>1){if(ue=De+5+O[De+4],ue===De+188)continue}else ue=De+4;switch(Oe){case G:ye&&(H&&(_=r(H))&&this.parseAVCPES(_,!1),H={data:[],size:0}),H&&(H.data.push(O.subarray(ue,De+188)),H.size+=De+188-ue);break;case B:ye&&(U&&(_=r(U))&&(I.isAAC?this.parseAACPES(_):this.parseMPEGPES(_)),U={data:[],size:0}),U&&(U.data.push(O.subarray(ue,De+188)),U.size+=De+188-ue);break;case K:ye&&(W&&(_=r(W))&&this.parseID3PES(_),W={data:[],size:0}),W&&(W.data.push(O.subarray(ue,De+188)),W.size+=De+188-ue);break;case 0:ye&&(ue+=O[ue]+1),fe=this._pmtId=m(O,ue);break;case fe:{ye&&(ue+=O[ue]+1);var le=s(O,ue,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,x);G=le.avc,G>0&&(M.pid=G),B=le.audio,B>0&&(I.pid=B,I.isAAC=le.isAAC),K=le.id3,K>0&&(N.pid=K),X&&!ne&&(n.logger.log("reparse from beginning"),X=!1,De=Ae-188),ne=this.pmtParsed=!0;break}case 17:case 8191:break;default:X=!0;break}}else this.observer.emit(d.Events.ERROR,d.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});M.pesData=H,I.pesData=U,N.pesData=W;var re={audioTrack:I,avcTrack:M,id3Track:N,textTrack:this._txtTrack};return y&&this.extractRemainingSamples(re),re},f.flush=function(){var O=this.remainderData;this.remainderData=null;var C;return O?C=this.demux(O,-1,!1,!0):C={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(C),this.sampleAes?this.decrypt(C,this.sampleAes):C},f.extractRemainingSamples=function(O){var C=O.audioTrack,x=O.avcTrack,y=O.id3Track,_=x.pesData,M=C.pesData,I=y.pesData,N;_&&(N=r(_))?(this.parseAVCPES(N,!0),x.pesData=null):x.pesData=_,M&&(N=r(M))?(C.isAAC?this.parseAACPES(N):this.parseMPEGPES(N),C.pesData=null):(M!=null&&M.size&&n.logger.log("last AAC PES packet truncated,might overlap between fragments"),C.pesData=M),I&&(N=r(I))?(this.parseID3PES(N),y.pesData=null):y.pesData=I},f.demuxSampleAes=function(O,C,x){var y=this.demux(O,x,!0,!this.config.progressive),_=this.sampleAes=new b.default(this.observer,this.config,C);return this.decrypt(y,_)},f.decrypt=function(O,C){return new Promise(function(x){var y=O.audioTrack,_=O.avcTrack;y.samples&&y.isAAC?C.decryptAacSamples(y.samples,0,function(){_.samples?C.decryptAvcSamples(_.samples,0,0,function(){x(O)}):x(O)}):_.samples&&C.decryptAvcSamples(_.samples,0,0,function(){x(O)})})},f.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},f.parseAVCPES=function(O,C){var x=this,y=this._avcTrack,_=this.parseAVCNALu(O.data),M=!1,I=this.avcSample,N,G=!1;O.data=null,I&&_.length&&!y.audFound&&(a(I,y),I=this.avcSample=h(!1,O.pts,O.dts,"")),_.forEach(function(H){switch(H.type){case 1:{N=!0,I||(I=x.avcSample=h(!0,O.pts,O.dts,"")),M&&(I.debug+="NDR "),I.frame=!0;var B=H.data;if(G&&B.length>4){var K=new v.default(B).readSliceType();(K===2||K===4||K===7||K===9)&&(I.key=!0)}break}case 5:N=!0,I||(I=x.avcSample=h(!0,O.pts,O.dts,"")),M&&(I.debug+="IDR "),I.key=!0,I.frame=!0;break;case 6:{N=!0,M&&I&&(I.debug+="SEI ");var U=new v.default(w(H.data));U.readUByte();for(var W=0,X=0,ne=!1,fe=0;!ne&&U.bytesAvailable>1;){W=0;do fe=U.readUByte(),W+=fe;while(fe===255);X=0;do fe=U.readUByte(),X+=fe;while(fe===255);if(W===4&&U.bytesAvailable!==0){ne=!0;var me=U.readUByte();if(me===181){var Ae=U.readUShort();if(Ae===49){var De=U.readUInt();if(De===1195456820){var ye=U.readUByte();if(ye===3){for(var Oe=U.readUByte(),xe=U.readUByte(),ue=31&Oe,le=[Oe,xe],re=0;re<ue;re++)le.push(U.readUByte()),le.push(U.readUByte()),le.push(U.readUByte());t(x._txtTrack.samples,{type:3,pts:O.pts,bytes:le})}}}}}else if(W===5&&U.bytesAvailable!==0){if(ne=!0,X>16){for(var pe=[],ee=0;ee<16;ee++)pe.push(U.readUByte().toString(16)),(ee===3||ee===5||ee===7||ee===9)&&pe.push("-");for(var te=X-16,ce=new Uint8Array(te),q=0;q<te;q++)ce[q]=U.readUByte();t(x._txtTrack.samples,{pts:O.pts,payloadType:W,uuid:pe.join(""),userData:Object(S.utf8ArrayToStr)(ce),userDataBytes:ce})}}else if(X<U.bytesAvailable)for(var Q=0;Q<X;Q++)U.readUByte()}break}case 7:if(N=!0,G=!0,M&&I&&(I.debug+="SPS "),!y.sps){var V=new v.default(H.data),Z=V.readSPS();y.width=Z.width,y.height=Z.height,y.pixelRatio=Z.pixelRatio,y.sps=[H.data],y.duration=x._duration;for(var be=H.data.subarray(1,4),ge="avc1.",Te=0;Te<3;Te++){var Je=be[Te].toString(16);Je.length<2&&(Je="0"+Je),ge+=Je}y.codec=ge}break;case 8:N=!0,M&&I&&(I.debug+="PPS "),y.pps||(y.pps=[H.data]);break;case 9:N=!1,y.audFound=!0,I&&a(I,y),I=x.avcSample=h(!1,O.pts,O.dts,M?"AUD ":"");break;case 12:N=!1;break;default:N=!1,I&&(I.debug+="unknown NAL "+H.type+" ");break}if(I&&N){var rt=I.units;rt.push(H)}}),C&&I&&(a(I,y),this.avcSample=null)},f.getLastNalUnit=function(){var O,C=this.avcSample,x;if(!C||C.units.length===0){var y=this._avcTrack.samples;C=y[y.length-1]}if((O=C)!==null&&O!==void 0&&O.units){var _=C.units;x=_[_.length-1]}return x},f.parseAVCNALu=function(O){var C=O.byteLength,x=this._avcTrack,y=x.naluState||0,_=y,M=[],I=0,N,G,H,B=-1,K=0;for(y===-1&&(B=0,K=O[0]&31,y=0,I=1);I<C;){if(N=O[I++],!y){y=N?0:1;continue}if(y===1){y=N?0:2;continue}if(!N)y=3;else if(N===1){if(B>=0){var U={data:O.subarray(B,I-y-1),type:K};M.push(U)}else{var W=this.getLastNalUnit();if(W&&(_&&I<=4-_&&(W.state&&(W.data=W.data.subarray(0,W.data.byteLength-_))),G=I-y-1,G>0)){var X=new Uint8Array(W.data.byteLength+G);X.set(W.data,0),X.set(O.subarray(0,G),W.data.byteLength),W.data=X,W.state=0}}I<C?(H=O[I]&31,B=I,K=H,y=0):y=-1}else y=0}if(B>=0&&y>=0){var ne={data:O.subarray(B,C),type:K,state:y};M.push(ne)}if(M.length===0){var fe=this.getLastNalUnit();if(fe){var me=new Uint8Array(fe.data.byteLength+O.byteLength);me.set(fe.data,0),me.set(O,fe.data.byteLength),fe.data=me}}return x.naluState=y,M},f.parseAACPES=function(O){var C=0,x=this._audioTrack,y=this.aacOverFlow,_=O.data;if(y){this.aacOverFlow=null;var M=y.sample.unit.byteLength,I=Math.min(y.missing,M),N=M-I;y.sample.unit.set(_.subarray(0,I),N),x.samples.push(y.sample),C=y.missing}var G,H;for(G=C,H=_.length;G<H-1&&!P.isHeader(_,G);G++);if(G!==C){var B,K;if(G<H-1?(B="AAC PES did not start with ADTS header,offset:"+G,K=!1):(B="no ADTS header found in AAC PES",K=!0),n.logger.warn("parsing error:"+B),this.observer.emit(d.Events.ERROR,d.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:K,reason:B}),K)return}P.initTrackConfig(x,this.observer,_,G,this.audioCodec);var U;if(O.pts!==void 0)U=O.pts;else if(y){var W=P.getFrameDuration(x.samplerate);U=y.sample.pts+W}else{n.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var X=0;G<H;)if(P.isHeader(_,G)){if(G+5<H){var ne=P.appendFrame(x,_,G,U,X);if(ne)if(ne.missing)this.aacOverFlow=ne;else{G+=ne.length,X++;continue}}break}else G++},f.parseMPEGPES=function(O){var C=O.data,x=C.length,y=0,_=0,M=O.pts;if(M===void 0){n.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;_<x;)if(p.isHeader(C,_)){var I=p.appendFrame(this._audioTrack,C,_,M,y);if(I)_+=I.length,y++;else break}else _++},f.parseID3PES=function(O){if(O.pts===void 0){n.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(O)},E}();o.minProbeByteLength=188;function h(E,f,k,O){return{key:E,frame:!1,pts:f,dts:k,units:[],debug:O,length:0}}function m(E,f){return(E[f+10]&31)<<8|E[f+11]}function s(E,f,k,O){var C={audio:-1,avc:-1,id3:-1,isAAC:!0},x=(E[f+1]&15)<<8|E[f+2],y=f+3+x-4,_=(E[f+10]&15)<<8|E[f+11];for(f+=12+_;f<y;){var M=(E[f+1]&31)<<8|E[f+2];switch(E[f]){case 207:if(!O){n.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:C.audio===-1&&(C.audio=M);break;case 21:C.id3===-1&&(C.id3=M);break;case 219:if(!O){n.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:C.avc===-1&&(C.avc=M);break;case 3:case 4:k?C.audio===-1&&(C.audio=M,C.isAAC=!1):n.logger.log("MPEG audio found, not supported in this browser");break;case 36:n.logger.warn("Unsupported HEVC stream type found");break;default:break}f+=((E[f+3]&15)<<8|E[f+4])+5}return C}function r(E){var f=0,k,O,C,x,y,_=E.data;if(!E||E.size===0)return null;for(;_[0].length<19&&_.length>1;){var M=new Uint8Array(_[0].length+_[1].length);M.set(_[0]),M.set(_[1],_[0].length),_[0]=M,_.splice(1,1)}k=_[0];var I=(k[0]<<16)+(k[1]<<8)+k[2];if(I===1){if(O=(k[4]<<8)+k[5],O&&O>E.size-6)return null;var N=k[7];N&192&&(x=(k[9]&14)*536870912+(k[10]&255)*4194304+(k[11]&254)*16384+(k[12]&255)*128+(k[13]&254)/2,N&64?(y=(k[14]&14)*536870912+(k[15]&255)*4194304+(k[16]&254)*16384+(k[17]&255)*128+(k[18]&254)/2,x-y>60*9e4&&(n.logger.warn(Math.round((x-y)/9e4)+"s delta between PTS and DTS, align them"),x=y)):y=x),C=k[8];var G=C+9;if(E.size<=G)return null;E.size-=G;for(var H=new Uint8Array(E.size),B=0,K=_.length;B<K;B++){k=_[B];var U=k.byteLength;if(G)if(G>U){G-=U;continue}else k=k.subarray(G),U-=G,G=0;H.set(k,f),f+=U}return O&&(O-=C+3),{data:H,pts:x,dts:y,len:O}}return null}function a(E,f){if(E.units.length&&E.frame){if(E.pts===void 0){var k=f.samples,O=k.length;if(O){var C=k[O-1];E.pts=C.pts,E.dts=C.dts}else{f.dropped++;return}}f.samples.push(E)}E.debug.length&&n.logger.log(E.pts+"/"+E.dts+":"+E.debug)}function t(E,f){var k=E.length;if(k>0){if(f.pts>=E[k-1].pts)E.push(f);else for(var O=k-1;O>=0;O--)if(f.pts<E[O].pts){E.splice(O,0,f);break}}else E.push(f)}function w(E){for(var f=E.byteLength,k=[],O=1;O<f-2;)E[O]===0&&E[O+1]===0&&E[O+2]===3?(k.push(O+2),O+=2):O++;if(k.length===0)return E;var C=f-k.length,x=new Uint8Array(C),y=0;for(O=0;O<C;y++,O++)y===k[0]&&(y++,k.shift()),x[O]=E[y];return x}g.default=o},"./src/errors.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"ErrorTypes",function(){return P}),T.d(g,"ErrorDetails",function(){return p});var P;(function(v){v.NETWORK_ERROR="networkError",v.MEDIA_ERROR="mediaError",v.KEY_SYSTEM_ERROR="keySystemError",v.MUX_ERROR="muxError",v.OTHER_ERROR="otherError"})(P||(P={}));var p;(function(v){v.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",v.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",v.KEY_SYSTEM_NO_SESSION="keySystemNoSession",v.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",v.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",v.MANIFEST_LOAD_ERROR="manifestLoadError",v.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",v.MANIFEST_PARSING_ERROR="manifestParsingError",v.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",v.LEVEL_EMPTY_ERROR="levelEmptyError",v.LEVEL_LOAD_ERROR="levelLoadError",v.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",v.LEVEL_SWITCH_ERROR="levelSwitchError",v.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",v.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",v.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",v.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",v.FRAG_LOAD_ERROR="fragLoadError",v.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",v.FRAG_DECRYPT_ERROR="fragDecryptError",v.FRAG_PARSING_ERROR="fragParsingError",v.REMUX_ALLOC_ERROR="remuxAllocError",v.KEY_LOAD_ERROR="keyLoadError",v.KEY_LOAD_TIMEOUT="keyLoadTimeOut",v.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",v.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",v.BUFFER_APPEND_ERROR="bufferAppendError",v.BUFFER_APPENDING_ERROR="bufferAppendingError",v.BUFFER_STALLED_ERROR="bufferStalledError",v.BUFFER_FULL_ERROR="bufferFullError",v.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",v.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",v.INTERNAL_EXCEPTION="internalException",v.INTERNAL_ABORTED="aborted",v.UNKNOWN="unknown"})(p||(p={}))},"./src/events.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"Events",function(){return P});var P;(function(p){p.MEDIA_ATTACHING="hlsMediaAttaching",p.MEDIA_ATTACHED="hlsMediaAttached",p.MEDIA_DETACHING="hlsMediaDetaching",p.MEDIA_DETACHED="hlsMediaDetached",p.BUFFER_RESET="hlsBufferReset",p.BUFFER_CODECS="hlsBufferCodecs",p.BUFFER_CREATED="hlsBufferCreated",p.BUFFER_APPENDING="hlsBufferAppending",p.BUFFER_APPENDED="hlsBufferAppended",p.BUFFER_EOS="hlsBufferEos",p.BUFFER_FLUSHING="hlsBufferFlushing",p.BUFFER_FLUSHED="hlsBufferFlushed",p.MANIFEST_LOADING="hlsManifestLoading",p.MANIFEST_LOADED="hlsManifestLoaded",p.MANIFEST_PARSED="hlsManifestParsed",p.LEVEL_SWITCHING="hlsLevelSwitching",p.LEVEL_SWITCHED="hlsLevelSwitched",p.LEVEL_LOADING="hlsLevelLoading",p.LEVEL_LOADED="hlsLevelLoaded",p.LEVEL_UPDATED="hlsLevelUpdated",p.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",p.LEVELS_UPDATED="hlsLevelsUpdated",p.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",p.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",p.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",p.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",p.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",p.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",p.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",p.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",p.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",p.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",p.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",p.CUES_PARSED="hlsCuesParsed",p.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",p.INIT_PTS_FOUND="hlsInitPtsFound",p.FRAG_LOADING="hlsFragLoading",p.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",p.FRAG_LOADED="hlsFragLoaded",p.FRAG_DECRYPTED="hlsFragDecrypted",p.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",p.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",p.FRAG_PARSING_METADATA="hlsFragParsingMetadata",p.FRAG_PARSED="hlsFragParsed",p.FRAG_BUFFERED="hlsFragBuffered",p.FRAG_CHANGED="hlsFragChanged",p.FPS_DROP="hlsFpsDrop",p.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",p.ERROR="hlsError",p.DESTROYING="hlsDestroying",p.KEY_LOADING="hlsKeyLoading",p.KEY_LOADED="hlsKeyLoaded",p.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",p.BACK_BUFFER_REACHED="hlsBackBufferReached"})(P||(P={}))},"./src/hls.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return E});var P=T("./node_modules/url-toolkit/src/url-toolkit.js"),p=T.n(P),v=T("./src/loader/playlist-loader.ts"),S=T("./src/loader/key-loader.ts"),b=T("./src/controller/id3-track-controller.ts"),d=T("./src/controller/latency-controller.ts"),l=T("./src/controller/level-controller.ts"),n=T("./src/controller/fragment-tracker.ts"),c=T("./src/controller/stream-controller.ts"),u=T("./src/is-supported.ts"),o=T("./src/utils/logger.ts"),h=T("./src/config.ts"),m=T("./node_modules/eventemitter3/index.js"),s=T.n(m),r=T("./src/events.ts"),a=T("./src/errors.ts");function t(f,k){for(var O=0;O<k.length;O++){var C=k[O];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(f,C.key,C)}}function w(f,k,O){return k&&t(f.prototype,k),O&&t(f,O),f}var E=function(){f.isSupported=function(){return Object(u.isSupported)()};function f(O){O===void 0&&(O={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new m.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var C=this.config=Object(h.mergeConfig)(f.DefaultConfig,O);this.userConfig=O,Object(o.enableLogs)(C.debug),this._autoLevelCapping=-1,C.progressive&&Object(h.enableStreamingMode)(C);var x=C.abrController,y=C.bufferController,_=C.capLevelController,M=C.fpsController,I=this.abrController=new x(this),N=this.bufferController=new y(this),G=this.capLevelController=new _(this),H=new M(this),B=new v.default(this),K=new S.default(this),U=new b.default(this),W=this.levelController=new l.default(this),X=new n.FragmentTracker(this),ne=this.streamController=new c.default(this,X);G.setStreamController(ne),H.setStreamController(ne);var fe=[W,ne];this.networkControllers=fe;var me=[B,K,I,N,G,H,U,X];this.audioTrackController=this.createController(C.audioTrackController,null,fe),this.createController(C.audioStreamController,X,fe),this.subtitleTrackController=this.createController(C.subtitleTrackController,null,fe),this.createController(C.subtitleStreamController,X,fe),this.createController(C.timelineController,null,me),this.emeController=this.createController(C.emeController,null,me),this.cmcdController=this.createController(C.cmcdController,null,me),this.latencyController=this.createController(d.default,null,me),this.coreComponents=me}var k=f.prototype;return k.createController=function(C,x,y){if(C){var _=x?new C(this,x):new C(this);return y&&y.push(_),_}return null},k.on=function(C,x,y){y===void 0&&(y=this),this._emitter.on(C,x,y)},k.once=function(C,x,y){y===void 0&&(y=this),this._emitter.once(C,x,y)},k.removeAllListeners=function(C){this._emitter.removeAllListeners(C)},k.off=function(C,x,y,_){y===void 0&&(y=this),this._emitter.off(C,x,y,_)},k.listeners=function(C){return this._emitter.listeners(C)},k.emit=function(C,x,y){return this._emitter.emit(C,x,y)},k.trigger=function(C,x){if(this.config.debug)return this.emit(C,C,x);try{return this.emit(C,C,x)}catch(y){o.logger.error("An internal error happened while handling event "+C+'. Error message: "'+y.message+'". Here is a stacktrace:',y),this.trigger(r.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:C,error:y})}return!1},k.listenerCount=function(C){return this._emitter.listenerCount(C)},k.destroy=function(){o.logger.log("destroy"),this.trigger(r.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(C){return C.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(C){return C.destroy()}),this.coreComponents.length=0},k.attachMedia=function(C){o.logger.log("attachMedia"),this._media=C,this.trigger(r.Events.MEDIA_ATTACHING,{media:C})},k.detachMedia=function(){o.logger.log("detachMedia"),this.trigger(r.Events.MEDIA_DETACHING,void 0),this._media=null},k.loadSource=function(C){this.stopLoad();var x=this.media,y=this.url,_=this.url=P.buildAbsoluteURL(self.location.href,C,{alwaysNormalize:!0});o.logger.log("loadSource:"+_),x&&y&&y!==_&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(x)),this.trigger(r.Events.MANIFEST_LOADING,{url:C})},k.startLoad=function(C){C===void 0&&(C=-1),o.logger.log("startLoad("+C+")"),this.networkControllers.forEach(function(x){x.startLoad(C)})},k.stopLoad=function(){o.logger.log("stopLoad"),this.networkControllers.forEach(function(C){C.stopLoad()})},k.swapAudioCodec=function(){o.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},k.recoverMediaError=function(){o.logger.log("recoverMediaError");var C=this._media;this.detachMedia(),C&&this.attachMedia(C)},k.removeLevel=function(C,x){x===void 0&&(x=0),this.levelController.removeLevel(C,x)},w(f,[{key:"levels",get:function(){var C=this.levelController.levels;return C||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(C){o.logger.log("set currentLevel:"+C),this.loadLevel=C,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(C){o.logger.log("set nextLevel:"+C),this.levelController.manualLevel=C,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(C){o.logger.log("set loadLevel:"+C),this.levelController.manualLevel=C}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(C){this.levelController.nextLoadLevel=C}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(C){o.logger.log("set firstLevel:"+C),this.levelController.firstLevel=C}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(C){o.logger.log("set startLevel:"+C),C!==-1&&(C=Math.max(C,this.minAutoLevel)),this.levelController.startLevel=C}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(C){var x=!!C;x!==this.config.capLevelToPlayerSize&&(x?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=x)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(C){this._autoLevelCapping!==C&&(o.logger.log("set autoLevelCapping:"+C),this._autoLevelCapping=C)}},{key:"bandwidthEstimate",get:function(){var C=this.abrController.bwEstimator;return C?C.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var C=this.levels,x=this.config.minAutoBitrate;if(!C)return 0;for(var y=C.length,_=0;_<y;_++)if(C[_].maxBitrate>x)return _;return 0}},{key:"maxAutoLevel",get:function(){var C=this.levels,x=this.autoLevelCapping,y;return x===-1&&C&&C.length?y=C.length-1:y=x,y}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(C){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,C)}},{key:"audioTracks",get:function(){var C=this.audioTrackController;return C?C.audioTracks:[]}},{key:"audioTrack",get:function(){var C=this.audioTrackController;return C?C.audioTrack:-1},set:function(C){var x=this.audioTrackController;x&&(x.audioTrack=C)}},{key:"subtitleTracks",get:function(){var C=this.subtitleTrackController;return C?C.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var C=this.subtitleTrackController;return C?C.subtitleTrack:-1},set:function(C){var x=this.subtitleTrackController;x&&(x.subtitleTrack=C)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var C=this.subtitleTrackController;return C?C.subtitleDisplay:!1},set:function(C){var x=this.subtitleTrackController;x&&(x.subtitleDisplay=C)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(C){this.config.lowLatencyMode=C}},{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 r.Events}},{key:"ErrorTypes",get:function(){return a.ErrorTypes}},{key:"ErrorDetails",get:function(){return a.ErrorDetails}},{key:"DefaultConfig",get:function(){return f.defaultConfig?f.defaultConfig:h.hlsDefaultConfig},set:function(C){f.defaultConfig=C}}]),f}();E.defaultConfig=void 0},"./src/is-supported.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"isSupported",function(){return v}),T.d(g,"changeTypeSupported",function(){return S});var P=T("./src/utils/mediasource-helper.ts");function p(){return self.SourceBuffer||self.WebKitSourceBuffer}function v(){var b=Object(P.getMediaSource)();if(!b)return!1;var d=p(),l=b&&typeof b.isTypeSupported=="function"&&b.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),n=!d||d.prototype&&typeof d.prototype.appendBuffer=="function"&&typeof d.prototype.remove=="function";return!!l&&!!n}function S(){var b,d=p();return typeof(d==null||((b=d.prototype)===null||b===void 0)?void 0:b.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return o}),T.d(g,"LoadError",function(){return m});var P=T("./src/polyfills/number.ts"),p=T("./src/errors.ts");function v(s,r){s.prototype=Object.create(r.prototype),s.prototype.constructor=s,n(s,r)}function S(s){var r=typeof Map=="function"?new Map:void 0;return S=function(t){if(t===null||!l(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof r!="undefined"){if(r.has(t))return r.get(t);r.set(t,w)}function w(){return b(t,arguments,c(this).constructor)}return w.prototype=Object.create(t.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),n(w,t)},S(s)}function b(s,r,a){return d()?b=Reflect.construct:b=function(w,E,f){var k=[null];k.push.apply(k,E);var O=Function.bind.apply(w,k),C=new O;return f&&n(C,f.prototype),C},b.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(s){return!1}}function l(s){return Function.toString.call(s).indexOf("[native code]")!==-1}function n(s,r){return n=Object.setPrototypeOf||function(t,w){return t.__proto__=w,t},n(s,r)}function c(s){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},c(s)}var u=Math.pow(2,17),o=function(){function s(a){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=a}var r=s.prototype;return r.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},r.abort=function(){this.loader&&this.loader.abort()},r.load=function(t,w){var E=this,f=t.url;if(!f)return Promise.reject(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(f?"part list":"url")));this.abort();var k=this.config,O=k.fLoader,C=k.loader;return new Promise(function(x,y){E.loader&&E.loader.destroy();var _=E.loader=t.loader=O?new O(k):new C(k),M=h(t),I={timeout:k.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:k.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=_.stats,_.load(M,I,{onSuccess:function(G,H,B,K){E.resetLoader(t,_),x({frag:t,part:null,payload:G.data,networkDetails:K})},onError:function(G,H,B){E.resetLoader(t,_),y(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:G,networkDetails:B}))},onAbort:function(G,H,B){E.resetLoader(t,_),y(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:B}))},onTimeout:function(G,H,B){E.resetLoader(t,_),y(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:B}))},onProgress:function(G,H,B,K){w&&w({frag:t,part:null,payload:B,networkDetails:K})}})})},r.loadPart=function(t,w,E){var f=this;this.abort();var k=this.config,O=k.fLoader,C=k.loader;return new Promise(function(x,y){f.loader&&f.loader.destroy();var _=f.loader=t.loader=O?new O(k):new C(k),M=h(t,w),I={timeout:k.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:k.fragLoadingMaxRetryTimeout,highWaterMark:u};w.stats=_.stats,_.load(M,I,{onSuccess:function(G,H,B,K){f.resetLoader(t,_),f.updateStatsFromPart(t,w);var U={frag:t,part:w,payload:G.data,networkDetails:K};E(U),x(U)},onError:function(G,H,B){f.resetLoader(t,_),y(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:w,response:G,networkDetails:B}))},onAbort:function(G,H,B){t.stats.aborted=w.stats.aborted,f.resetLoader(t,_),y(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:w,networkDetails:B}))},onTimeout:function(G,H,B){f.resetLoader(t,_),y(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:w,networkDetails:B}))}})})},r.updateStatsFromPart=function(t,w){var E=t.stats,f=w.stats,k=f.total;if(E.loaded+=f.loaded,k){var O=Math.round(t.duration/w.duration),C=Math.min(Math.round(E.loaded/k),O),x=O-C,y=x*Math.round(E.loaded/C);E.total=E.loaded+y}else E.total=Math.max(E.loaded,E.total);var _=E.loading,M=f.loading;_.start?_.first+=M.first-M.start:(_.start=M.start,_.first=M.first),_.end=M.end},r.resetLoader=function(t,w){t.loader=null,this.loader===w&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),w.destroy()},s}();function h(s,r){r===void 0&&(r=null);var a=r||s,t={frag:s,part:r,responseType:"arraybuffer",url:a.url,headers:{},rangeStart:0,rangeEnd:0},w=a.byteRangeStartOffset,E=a.byteRangeEndOffset;return Object(P.isFiniteNumber)(w)&&Object(P.isFiniteNumber)(E)&&(t.rangeStart=w,t.rangeEnd=E),t}var m=function(s){v(r,s);function r(a){for(var t,w=arguments.length,E=new Array(w>1?w-1:0),f=1;f<w;f++)E[f-1]=arguments[f];return t=s.call.apply(s,[this].concat(E))||this,t.data=void 0,t.data=a,t}return r}(S(Error))},"./src/loader/fragment.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"ElementaryStreamTypes",function(){return o}),T.d(g,"BaseSegment",function(){return h}),T.d(g,"Fragment",function(){return m}),T.d(g,"Part",function(){return s});var P=T("./src/polyfills/number.ts"),p=T("./node_modules/url-toolkit/src/url-toolkit.js"),v=T.n(p),S=T("./src/utils/logger.ts"),b=T("./src/loader/level-key.ts"),d=T("./src/loader/load-stats.ts");function l(r,a){r.prototype=Object.create(a.prototype),r.prototype.constructor=r,n(r,a)}function n(r,a){return n=Object.setPrototypeOf||function(w,E){return w.__proto__=E,w},n(r,a)}function c(r,a){for(var t=0;t<a.length;t++){var w=a[t];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(r,w.key,w)}}function u(r,a,t){return a&&c(r.prototype,a),t&&c(r,t),r}var o;(function(r){r.AUDIO="audio",r.VIDEO="video",r.AUDIOVIDEO="audiovideo"})(o||(o={}));var h=function(){function r(t){var w;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(w={},w[o.AUDIO]=null,w[o.VIDEO]=null,w[o.AUDIOVIDEO]=null,w),this.baseurl=t}var a=r.prototype;return a.setByteRange=function(w,E){var f=w.split("@",2),k=[];f.length===1?k[0]=E?E.byteRangeEndOffset:0:k[0]=parseInt(f[1]),k[1]=parseInt(f[0])+k[0],this._byteRange=k},u(r,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(p.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(w){this._url=w}}]),r}(),m=function(r){l(a,r);function a(w,E){var f;return f=r.call(this,E)||this,f._decryptdata=null,f.rawProgramDateTime=null,f.programDateTime=null,f.tagList=[],f.duration=0,f.sn=0,f.levelkey=void 0,f.type=void 0,f.loader=null,f.level=-1,f.cc=0,f.startPTS=void 0,f.endPTS=void 0,f.appendedPTS=void 0,f.startDTS=void 0,f.endDTS=void 0,f.start=0,f.deltaPTS=void 0,f.maxStartPTS=void 0,f.minEndPTS=void 0,f.stats=new d.LoadStats,f.urlId=0,f.data=void 0,f.bitrateTest=!1,f.title=null,f.initSegment=null,f.type=w,f}var t=a.prototype;return t.createInitializationVector=function(E){for(var f=new Uint8Array(16),k=12;k<16;k++)f[k]=E>>8*(15-k)&255;return f},t.setDecryptDataFromLevelKey=function(E,f){var k=E;return(E==null?void 0:E.method)==="AES-128"&&E.uri&&!E.iv&&(k=b.LevelKey.fromURI(E.uri),k.method=E.method,k.iv=this.createInitializationVector(f),k.keyFormat="identity"),k},t.setElementaryStreamInfo=function(E,f,k,O,C,x){x===void 0&&(x=!1);var y=this.elementaryStreams,_=y[E];if(!_){y[E]={startPTS:f,endPTS:k,startDTS:O,endDTS:C,partial:x};return}_.startPTS=Math.min(_.startPTS,f),_.endPTS=Math.max(_.endPTS,k),_.startDTS=Math.min(_.startDTS,O),_.endDTS=Math.max(_.endDTS,C)},t.clearElementaryStreamInfo=function(){var E=this.elementaryStreams;E[o.AUDIO]=null,E[o.VIDEO]=null,E[o.AUDIOVIDEO]=null},u(a,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var E=this.sn;typeof E!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&S.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),E=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,E)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(P.isFiniteNumber)(this.programDateTime))return null;var E=Object(P.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+E*1e3}},{key:"encrypted",get:function(){var E;return!!((E=this.decryptdata)!==null&&E!==void 0&&E.keyFormat&&this.decryptdata.uri)}}]),a}(h),s=function(r){l(a,r);function a(t,w,E,f,k){var O;O=r.call(this,E)||this,O.fragOffset=0,O.duration=0,O.gap=!1,O.independent=!1,O.relurl=void 0,O.fragment=void 0,O.index=void 0,O.stats=new d.LoadStats,O.duration=t.decimalFloatingPoint("DURATION"),O.gap=t.bool("GAP"),O.independent=t.bool("INDEPENDENT"),O.relurl=t.enumeratedString("URI"),O.fragment=w,O.index=f;var C=t.enumeratedString("BYTERANGE");return C&&O.setByteRange(C,k),k&&(O.fragOffset=k.fragOffset+k.duration),O}return u(a,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var w=this.elementaryStreams;return!!(w.audio||w.video||w.audiovideo)}}]),a}(h)},"./src/loader/key-loader.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return S});var P=T("./src/events.ts"),p=T("./src/errors.ts"),v=T("./src/utils/logger.ts"),S=function(){function b(l){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=l,this._registerListeners()}var d=b.prototype;return d._registerListeners=function(){this.hls.on(P.Events.KEY_LOADING,this.onKeyLoading,this)},d._unregisterListeners=function(){this.hls.off(P.Events.KEY_LOADING,this.onKeyLoading)},d.destroy=function(){this._unregisterListeners();for(var n in this.loaders){var c=this.loaders[n];c&&c.destroy()}this.loaders={}},d.onKeyLoading=function(n,c){var u=c.frag,o=u.type,h=this.loaders[o];if(!u.decryptdata){v.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var m=u.decryptdata.uri;if(m!==this.decrypturl||this.decryptkey===null){var s=this.hls.config;if(h&&(v.logger.warn("abort previous key loader for type:"+o),h.abort()),!m){v.logger.warn("key uri is falsy");return}var r=s.loader,a=u.loader=this.loaders[o]=new r(s);this.decrypturl=m,this.decryptkey=null;var t={url:m,frag:u,responseType:"arraybuffer"},w={timeout:s.fragLoadingTimeOut,maxRetry:0,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout,highWaterMark:0},E={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};a.load(t,w,E)}else this.decryptkey&&(u.decryptdata.key=this.decryptkey,this.hls.trigger(P.Events.KEY_LOADED,{frag:u}))},d.loadsuccess=function(n,c,u){var o=u.frag;if(!o.decryptdata){v.logger.error("after key load, decryptdata unset");return}this.decryptkey=o.decryptdata.key=new Uint8Array(n.data),o.loader=null,delete this.loaders[o.type],this.hls.trigger(P.Events.KEY_LOADED,{frag:o})},d.loaderror=function(n,c){var u=c.frag,o=u.loader;o&&o.abort(),delete this.loaders[u.type],this.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:u,response:n})},d.loadtimeout=function(n,c){var u=c.frag,o=u.loader;o&&o.abort(),delete this.loaders[u.type],this.hls.trigger(P.Events.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:u})},b}()},"./src/loader/level-details.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"LevelDetails",function(){return b});var P=T("./src/polyfills/number.ts");function p(d,l){for(var n=0;n<l.length;n++){var c=l[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(d,c.key,c)}}function v(d,l,n){return l&&p(d.prototype,l),n&&p(d,n),d}var S=10,b=function(){function d(n){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=n}var l=d.prototype;return l.reloaded=function(c){if(!c){this.advanced=!0,this.updated=!0;return}var u=this.lastPartSn-c.lastPartSn,o=this.lastPartIndex-c.lastPartIndex;this.updated=this.endSN!==c.endSN||!!o||!!u,this.advanced=this.endSN>c.endSN||u>0||u===0&&o>0,this.updated||this.advanced?this.misses=Math.floor(c.misses*.6):this.misses=c.misses+1,this.availabilityDelay=c.availabilityDelay},v(d,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(P.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||S}},{key:"drift",get:function(){var c=this.driftEndTime-this.driftStartTime;if(c>0){var u=this.driftEnd-this.driftStart;return u*1e3/c}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var c;return(c=this.partList)!==null&&c!==void 0&&c.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var c;return(c=this.fragments)!==null&&c!==void 0&&c.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 c;return(c=this.partList)!==null&&c!==void 0&&c.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var c;return(c=this.partList)!==null&&c!==void 0&&c.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),d}()},"./src/loader/level-key.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"LevelKey",function(){return b});var P=T("./node_modules/url-toolkit/src/url-toolkit.js"),p=T.n(P);function v(d,l){for(var n=0;n<l.length;n++){var c=l[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(d,c.key,c)}}function S(d,l,n){return l&&v(d.prototype,l),n&&v(d,n),d}var b=function(){d.fromURL=function(n,c){return new d(n,c)},d.fromURI=function(n){return new d(n)};function d(l,n){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,n?this._uri=Object(P.buildAbsoluteURL)(l,n,{alwaysNormalize:!0}):this._uri=l}return S(d,[{key:"uri",get:function(){return this._uri}}]),d}()},"./src/loader/load-stats.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"LoadStats",function(){return P});var P=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return a});var P=T("./src/polyfills/number.ts"),p=T("./node_modules/url-toolkit/src/url-toolkit.js"),v=T.n(p),S=T("./src/loader/fragment.ts"),b=T("./src/loader/level-details.ts"),d=T("./src/loader/level-key.ts"),l=T("./src/utils/attr-list.ts"),n=T("./src/utils/logger.ts"),c=T("./src/utils/codecs.ts"),u=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,o=/#EXT-X-MEDIA:(.*)/g,h=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),m=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),s=/\.(mp4|m4s|m4v|m4a)$/i;function r(k){var O,C;return s.test((O=(C=p.parseURL(k))===null||C===void 0?void 0:C.path)!=null?O:"")}var a=function(){function k(){}return k.findGroup=function(C,x){for(var y=0;y<C.length;y++){var _=C[y];if(_.id===x)return _}},k.convertAVC1ToAVCOTI=function(C){var x=C.split(".");if(x.length>2){var y=x.shift()+".";return y+=parseInt(x.shift()).toString(16),y+=("000"+parseInt(x.shift()).toString(16)).substr(-4),y}return C},k.resolve=function(C,x){return p.buildAbsoluteURL(x,C,{alwaysNormalize:!0})},k.parseMasterPlaylist=function(C,x){var y=[],_={},M=!1;u.lastIndex=0;for(var I;(I=u.exec(C))!=null;)if(I[1]){var N=new l.AttrList(I[1]),G={attrs:N,bitrate:N.decimalInteger("AVERAGE-BANDWIDTH")||N.decimalInteger("BANDWIDTH"),name:N.NAME,url:k.resolve(I[2],x)},H=N.decimalResolution("RESOLUTION");H&&(G.width=H.width,G.height=H.height),t((N.CODECS||"").split(/[ ,]+/).filter(function(K){return K}),G),G.videoCodec&&G.videoCodec.indexOf("avc1")!==-1&&(G.videoCodec=k.convertAVC1ToAVCOTI(G.videoCodec)),y.push(G)}else if(I[3]){var B=new l.AttrList(I[3]);B["DATA-ID"]&&(M=!0,_[B["DATA-ID"]]=B)}return{levels:y,sessionData:M?_:null}},k.parseMasterPlaylistMedia=function(C,x,y,_){_===void 0&&(_=[]);var M,I=[],N=0;for(o.lastIndex=0;(M=o.exec(C))!==null;){var G=new l.AttrList(M[1]);if(G.TYPE===y){var H={attrs:G,bitrate:0,id:N++,groupId:G["GROUP-ID"],instreamId:G["INSTREAM-ID"],name:G.NAME||G.LANGUAGE||"",type:y,default:G.bool("DEFAULT"),autoselect:G.bool("AUTOSELECT"),forced:G.bool("FORCED"),lang:G.LANGUAGE,url:G.URI?k.resolve(G.URI,x):""};if(_.length){var B=k.findGroup(_,H.groupId)||_[0];w(H,B,"audioCodec"),w(H,B,"textCodec")}I.push(H)}}return I},k.parseLevelPlaylist=function(C,x,y,_,M){var I=new b.LevelDetails(x),N=I.fragments,G=null,H=0,B=0,K=0,U=0,W=null,X=new S.Fragment(_,x),ne,fe,me,Ae=-1,De=!1;for(h.lastIndex=0,I.m3u8=C;(ne=h.exec(C))!==null;){De&&(De=!1,X=new S.Fragment(_,x),X.start=K,X.sn=H,X.cc=U,X.level=y,G&&(X.initSegment=G,X.rawProgramDateTime=G.rawProgramDateTime));var ye=ne[1];if(ye){X.duration=parseFloat(ye);var Oe=(" "+ne[2]).slice(1);X.title=Oe||null,X.tagList.push(Oe?["INF",ye,Oe]:["INF",ye])}else if(ne[3])Object(P.isFiniteNumber)(X.duration)&&(X.start=K,me&&(X.levelkey=me),X.sn=H,X.level=y,X.cc=U,X.urlId=M,N.push(X),X.relurl=(" "+ne[3]).slice(1),f(X,W),W=X,K+=X.duration,H++,B=0,De=!0);else if(ne[4]){var xe=(" "+ne[4]).slice(1);W?X.setByteRange(xe,W):X.setByteRange(xe)}else if(ne[5])X.rawProgramDateTime=(" "+ne[5]).slice(1),X.tagList.push(["PROGRAM-DATE-TIME",X.rawProgramDateTime]),Ae===-1&&(Ae=N.length);else{if(ne=ne[0].match(m),!ne){n.logger.warn("No matches on slow regex match for level playlist!");continue}for(fe=1;fe<ne.length&&!(typeof ne[fe]!="undefined");fe++);var ue=(" "+ne[fe]).slice(1),le=(" "+ne[fe+1]).slice(1),re=ne[fe+2]?(" "+ne[fe+2]).slice(1):"";switch(ue){case"PLAYLIST-TYPE":I.type=le.toUpperCase();break;case"MEDIA-SEQUENCE":H=I.startSN=parseInt(le);break;case"SKIP":{var pe=new l.AttrList(le),ee=pe.decimalInteger("SKIPPED-SEGMENTS");if(Object(P.isFiniteNumber)(ee)){I.skippedSegments=ee;for(var te=ee;te--;)N.unshift(null);H+=ee}var ce=pe.enumeratedString("RECENTLY-REMOVED-DATERANGES");ce&&(I.recentlyRemovedDateranges=ce.split(" "));break}case"TARGETDURATION":I.targetduration=parseFloat(le);break;case"VERSION":I.version=parseInt(le);break;case"EXTM3U":break;case"ENDLIST":I.live=!1;break;case"#":(le||re)&&X.tagList.push(re?[le,re]:[le]);break;case"DIS":U++;case"GAP":X.tagList.push([ue]);break;case"BITRATE":X.tagList.push([ue,le]);break;case"DISCONTINUITY-SEQ":U=parseInt(le);break;case"KEY":{var q,Q=new l.AttrList(le),V=Q.enumeratedString("METHOD"),Z=Q.URI,be=Q.hexadecimalInteger("IV"),ge=Q.enumeratedString("KEYFORMATVERSIONS"),Te=Q.enumeratedString("KEYID"),Je=(q=Q.enumeratedString("KEYFORMAT"))!=null?q:"identity",rt=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(rt.indexOf(Je)>-1){n.logger.warn("Keyformat "+Je+" is not supported from the manifest");continue}else if(Je!=="identity")continue;V&&(me=d.LevelKey.fromURL(x,Z),Z&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(V)>=0&&(me.method=V,me.keyFormat=Je,Te&&(me.keyID=Te),ge&&(me.keyFormatVersions=ge),me.iv=be));break}case"START":{var nt=new l.AttrList(le),at=nt.decimalFloatingPoint("TIME-OFFSET");Object(P.isFiniteNumber)(at)&&(I.startTimeOffset=at);break}case"MAP":{var ct=new l.AttrList(le);X.relurl=ct.URI,ct.BYTERANGE&&X.setByteRange(ct.BYTERANGE),X.level=y,X.sn="initSegment",me&&(X.levelkey=me),X.initSegment=null,G=X,De=!0;break}case"SERVER-CONTROL":{var ht=new l.AttrList(le);I.canBlockReload=ht.bool("CAN-BLOCK-RELOAD"),I.canSkipUntil=ht.optionalFloat("CAN-SKIP-UNTIL",0),I.canSkipDateRanges=I.canSkipUntil>0&&ht.bool("CAN-SKIP-DATERANGES"),I.partHoldBack=ht.optionalFloat("PART-HOLD-BACK",0),I.holdBack=ht.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var He=new l.AttrList(le);I.partTarget=He.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Re=I.partList;Re||(Re=I.partList=[]);var tt=B>0?Re[Re.length-1]:void 0,ft=B++,Qe=new S.Part(new l.AttrList(le),X,x,ft,tt);Re.push(Qe),X.duration+=Qe.duration;break}case"PRELOAD-HINT":{var lt=new l.AttrList(le);I.preloadHint=lt;break}case"RENDITION-REPORT":{var Ue=new l.AttrList(le);I.renditionReports=I.renditionReports||[],I.renditionReports.push(Ue);break}default:n.logger.warn("line parsed but not handled: "+ne);break}}}W&&!W.relurl?(N.pop(),K-=W.duration,I.partList&&(I.fragmentHint=W)):I.partList&&(f(X,W),X.cc=U,I.fragmentHint=X);var Le=N.length,Ie=N[0],Ce=N[Le-1];if(K+=I.skippedSegments*I.targetduration,K>0&&Le&&Ce){I.averagetargetduration=K/Le;var Se=Ce.sn;I.endSN=Se!=="initSegment"?Se:0,Ie&&(I.startCC=Ie.cc,Ie.initSegment||I.fragments.every(function(ke){return ke.relurl&&r(ke.relurl)})&&(n.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),X=new S.Fragment(_,x),X.relurl=Ce.relurl,X.level=y,X.sn="initSegment",Ie.initSegment=X,I.needSidxRanges=!0))}else I.endSN=0,I.startCC=0;return I.fragmentHint&&(K+=I.fragmentHint.duration),I.totalduration=K,I.endCC=U,Ae>0&&E(N,Ae),I},k}();function t(k,O){["video","audio","text"].forEach(function(C){var x=k.filter(function(_){return Object(c.isCodecType)(_,C)});if(x.length){var y=x.filter(function(_){return _.lastIndexOf("avc1",0)===0||_.lastIndexOf("mp4a",0)===0});O[C+"Codec"]=y.length>0?y[0]:x[0],k=k.filter(function(_){return x.indexOf(_)===-1})}}),O.unknownCodecs=k}function w(k,O,C){var x=O[C];x&&(k[C]=x)}function E(k,O){for(var C=k[O],x=O;x--;){var y=k[x];if(!y)return;y.programDateTime=C.programDateTime-y.duration*1e3,C=y}}function f(k,O){k.rawProgramDateTime?k.programDateTime=Date.parse(k.rawProgramDateTime):O!=null&&O.programDateTime&&(k.programDateTime=O.endProgramDateTime),Object(P.isFiniteNumber)(k.programDateTime)||(k.programDateTime=null,k.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/polyfills/number.ts"),p=T("./src/events.ts"),v=T("./src/errors.ts"),S=T("./src/utils/logger.ts"),b=T("./src/utils/mp4-tools.ts"),d=T("./src/loader/m3u8-parser.ts"),l=T("./src/types/loader.ts"),n=T("./src/utils/attr-list.ts");function c(h){var m=h.type;switch(m){case l.PlaylistContextType.AUDIO_TRACK:return l.PlaylistLevelType.AUDIO;case l.PlaylistContextType.SUBTITLE_TRACK:return l.PlaylistLevelType.SUBTITLE;default:return l.PlaylistLevelType.MAIN}}function u(h,m){var s=h.url;return(s===void 0||s.indexOf("data:")===0)&&(s=m.url),s}var o=function(){function h(s){this.hls=void 0,this.loaders=Object.create(null),this.hls=s,this.registerListeners()}var m=h.prototype;return m.registerListeners=function(){var r=this.hls;r.on(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(p.Events.LEVEL_LOADING,this.onLevelLoading,this),r.on(p.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),r.on(p.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},m.unregisterListeners=function(){var r=this.hls;r.off(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(p.Events.LEVEL_LOADING,this.onLevelLoading,this),r.off(p.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),r.off(p.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},m.createInternalLoader=function(r){var a=this.hls.config,t=a.pLoader,w=a.loader,E=t||w,f=new E(a);return r.loader=f,this.loaders[r.type]=f,f},m.getInternalLoader=function(r){return this.loaders[r.type]},m.resetInternalLoader=function(r){this.loaders[r]&&delete this.loaders[r]},m.destroyInternalLoaders=function(){for(var r in this.loaders){var a=this.loaders[r];a&&a.destroy(),this.resetInternalLoader(r)}},m.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},m.onManifestLoading=function(r,a){var t=a.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:l.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},m.onLevelLoading=function(r,a){var t=a.id,w=a.level,E=a.url,f=a.deliveryDirectives;this.load({id:t,groupId:null,level:w,responseType:"text",type:l.PlaylistContextType.LEVEL,url:E,deliveryDirectives:f})},m.onAudioTrackLoading=function(r,a){var t=a.id,w=a.groupId,E=a.url,f=a.deliveryDirectives;this.load({id:t,groupId:w,level:null,responseType:"text",type:l.PlaylistContextType.AUDIO_TRACK,url:E,deliveryDirectives:f})},m.onSubtitleTrackLoading=function(r,a){var t=a.id,w=a.groupId,E=a.url,f=a.deliveryDirectives;this.load({id:t,groupId:w,level:null,responseType:"text",type:l.PlaylistContextType.SUBTITLE_TRACK,url:E,deliveryDirectives:f})},m.load=function(r){var a,t=this.hls.config,w=this.getInternalLoader(r);if(w){var E=w.context;if(E&&E.url===r.url){S.logger.trace("[playlist-loader]: playlist request ongoing");return}S.logger.log("[playlist-loader]: aborting previous loader for type: "+r.type),w.abort()}var f,k,O,C;switch(r.type){case l.PlaylistContextType.MANIFEST:f=t.manifestLoadingMaxRetry,k=t.manifestLoadingTimeOut,O=t.manifestLoadingRetryDelay,C=t.manifestLoadingMaxRetryTimeout;break;case l.PlaylistContextType.LEVEL:case l.PlaylistContextType.AUDIO_TRACK:case l.PlaylistContextType.SUBTITLE_TRACK:f=0,k=t.levelLoadingTimeOut;break;default:f=t.levelLoadingMaxRetry,k=t.levelLoadingTimeOut,O=t.levelLoadingRetryDelay,C=t.levelLoadingMaxRetryTimeout;break}if(w=this.createInternalLoader(r),(a=r.deliveryDirectives)!==null&&a!==void 0&&a.part){var x;if(r.type===l.PlaylistContextType.LEVEL&&r.level!==null?x=this.hls.levels[r.level].details:r.type===l.PlaylistContextType.AUDIO_TRACK&&r.id!==null?x=this.hls.audioTracks[r.id].details:r.type===l.PlaylistContextType.SUBTITLE_TRACK&&r.id!==null&&(x=this.hls.subtitleTracks[r.id].details),x){var y=x.partTarget,_=x.targetduration;y&&_&&(k=Math.min(Math.max(y*3,_*.8)*1e3,k))}}var M={timeout:k,maxRetry:f,retryDelay:O,maxRetryDelay:C,highWaterMark:0},I={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};w.load(r,M,I)},m.loadsuccess=function(r,a,t,w){if(w===void 0&&(w=null),t.isSidxRequest){this.handleSidxRequest(r,t),this.handlePlaylistLoaded(r,a,t,w);return}this.resetInternalLoader(t.type);var E=r.data;if(E.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(r,t,"no EXTM3U delimiter",w);return}a.parsing.start=performance.now(),E.indexOf("#EXTINF:")>0||E.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(r,a,t,w):this.handleMasterPlaylist(r,a,t,w)},m.loaderror=function(r,a,t){t===void 0&&(t=null),this.handleNetworkError(a,t,!1,r)},m.loadtimeout=function(r,a,t){t===void 0&&(t=null),this.handleNetworkError(a,t,!0)},m.handleMasterPlaylist=function(r,a,t,w){var E=this.hls,f=r.data,k=u(r,t),O=d.default.parseMasterPlaylist(f,k),C=O.levels,x=O.sessionData;if(!C.length){this.handleManifestParsingError(r,t,"no level found in manifest",w);return}var y=C.map(function(H){return{id:H.attrs.AUDIO,audioCodec:H.audioCodec}}),_=C.map(function(H){return{id:H.attrs.SUBTITLES,textCodec:H.textCodec}}),M=d.default.parseMasterPlaylistMedia(f,k,"AUDIO",y),I=d.default.parseMasterPlaylistMedia(f,k,"SUBTITLES",_),N=d.default.parseMasterPlaylistMedia(f,k,"CLOSED-CAPTIONS");if(M.length){var G=M.some(function(H){return!H.url});!G&&C[0].audioCodec&&!C[0].attrs.AUDIO&&(S.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),M.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new n.AttrList({}),bitrate:0,url:""}))}E.trigger(p.Events.MANIFEST_LOADED,{levels:C,audioTracks:M,subtitles:I,captions:N,url:k,stats:a,networkDetails:w,sessionData:x})},m.handleTrackOrLevelPlaylist=function(r,a,t,w){var E=this.hls,f=t.id,k=t.level,O=t.type,C=u(r,t),x=Object(P.isFiniteNumber)(f)?f:0,y=Object(P.isFiniteNumber)(k)?k:x,_=c(t),M=d.default.parseLevelPlaylist(r.data,C,y,_,x);if(!M.fragments.length){E.trigger(p.Events.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:C,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(O===l.PlaylistContextType.MANIFEST){var I={attrs:new n.AttrList({}),bitrate:0,details:M,name:"",url:C};E.trigger(p.Events.MANIFEST_LOADED,{levels:[I],audioTracks:[],url:C,stats:a,networkDetails:w,sessionData:null})}if(a.parsing.end=performance.now(),M.needSidxRanges){var N,G=(N=M.fragments[0].initSegment)===null||N===void 0?void 0:N.url;this.load({url:G,isSidxRequest:!0,type:O,level:k,levelDetails:M,id:f,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=M,this.handlePlaylistLoaded(r,a,t,w)},m.handleSidxRequest=function(r,a){var t=Object(b.parseSegmentIndex)(new Uint8Array(r.data));if(!t)return;var w=t.references,E=a.levelDetails;w.forEach(function(f,k){var O=f.info,C=E.fragments[k];C.byteRange.length===0&&C.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),C.initSegment&&C.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},m.handleManifestParsingError=function(r,a,t,w){this.hls.trigger(p.Events.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:a.type===l.PlaylistContextType.MANIFEST,url:r.url,reason:t,response:r,context:a,networkDetails:w})},m.handleNetworkError=function(r,a,t,w){t===void 0&&(t=!1),S.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+r.type+" level: "+r.level+" id: "+r.id+' group-id: "'+r.groupId+'"');var E=v.ErrorDetails.UNKNOWN,f=!1,k=this.getInternalLoader(r);switch(r.type){case l.PlaylistContextType.MANIFEST:E=t?v.ErrorDetails.MANIFEST_LOAD_TIMEOUT:v.ErrorDetails.MANIFEST_LOAD_ERROR,f=!0;break;case l.PlaylistContextType.LEVEL:E=t?v.ErrorDetails.LEVEL_LOAD_TIMEOUT:v.ErrorDetails.LEVEL_LOAD_ERROR,f=!1;break;case l.PlaylistContextType.AUDIO_TRACK:E=t?v.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:v.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,f=!1;break;case l.PlaylistContextType.SUBTITLE_TRACK:E=t?v.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:v.ErrorDetails.SUBTITLE_LOAD_ERROR,f=!1;break}k&&this.resetInternalLoader(r.type);var O={type:v.ErrorTypes.NETWORK_ERROR,details:E,fatal:f,url:r.url,loader:k,context:r,networkDetails:a};w&&(O.response=w),this.hls.trigger(p.Events.ERROR,O)},m.handlePlaylistLoaded=function(r,a,t,w){var E=t.type,f=t.level,k=t.id,O=t.groupId,C=t.loader,x=t.levelDetails,y=t.deliveryDirectives;if(!(x!=null&&x.targetduration)){this.handleManifestParsingError(r,t,"invalid target duration",w);return}if(!C)return;x.live&&(C.getCacheAge&&(x.ageHeader=C.getCacheAge()||0),(!C.getCacheAge||isNaN(x.ageHeader))&&(x.ageHeader=0));switch(E){case l.PlaylistContextType.MANIFEST:case l.PlaylistContextType.LEVEL:this.hls.trigger(p.Events.LEVEL_LOADED,{details:x,level:f||0,id:k||0,stats:a,networkDetails:w,deliveryDirectives:y});break;case l.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(p.Events.AUDIO_TRACK_LOADED,{details:x,id:k||0,groupId:O||"",stats:a,networkDetails:w,deliveryDirectives:y});break;case l.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(p.Events.SUBTITLE_TRACK_LOADED,{details:x,id:k||0,groupId:O||"",stats:a,networkDetails:w,deliveryDirectives:y});break}},h}();g.default=o},"./src/polyfills/number.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"isFiniteNumber",function(){return P}),T.d(g,"MAX_SAFE_INTEGER",function(){return p});var P=Number.isFinite||function(v){return typeof v=="number"&&isFinite(v)},p=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(L,g,T){"use strict";T.r(g);var P=function(){function p(){}return p.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},p}();g.default=P},"./src/remux/mp4-generator.ts":function(L,g,T){"use strict";T.r(g);var P=Math.pow(2,32)-1,p=function(){function v(){}return v.init=function(){v.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 v.types)v.types.hasOwnProperty(b)&&(v.types[b]=[b.charCodeAt(0),b.charCodeAt(1),b.charCodeAt(2),b.charCodeAt(3)]);var d=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),l=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);v.HDLR_TYPES={video:d,audio:l};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),c=new Uint8Array([0,0,0,0,0,0,0,0]);v.STTS=v.STSC=v.STCO=c,v.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),v.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),v.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),v.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var u=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),h=new Uint8Array([0,0,0,1]);v.FTYP=v.box(v.types.ftyp,u,h,u,o),v.DINF=v.box(v.types.dinf,v.box(v.types.dref,n))},v.box=function(b){for(var d=8,l=arguments.length,n=new Array(l>1?l-1:0),c=1;c<l;c++)n[c-1]=arguments[c];for(var u=n.length,o=u;u--;)d+=n[u].byteLength;var h=new Uint8Array(d);for(h[0]=d>>24&255,h[1]=d>>16&255,h[2]=d>>8&255,h[3]=d&255,h.set(b,4),u=0,d=8;u<o;u++)h.set(n[u],d),d+=n[u].byteLength;return h},v.hdlr=function(b){return v.box(v.types.hdlr,v.HDLR_TYPES[b])},v.mdat=function(b){return v.box(v.types.mdat,b)},v.mdhd=function(b,d){d*=b;var l=Math.floor(d/(P+1)),n=Math.floor(d%(P+1));return v.box(v.types.mdhd,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,l>>24,l>>16&255,l>>8&255,l&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))},v.mdia=function(b){return v.box(v.types.mdia,v.mdhd(b.timescale,b.duration),v.hdlr(b.type),v.minf(b))},v.mfhd=function(b){return v.box(v.types.mfhd,new Uint8Array([0,0,0,0,b>>24,b>>16&255,b>>8&255,b&255]))},v.minf=function(b){return b.type==="audio"?v.box(v.types.minf,v.box(v.types.smhd,v.SMHD),v.DINF,v.stbl(b)):v.box(v.types.minf,v.box(v.types.vmhd,v.VMHD),v.DINF,v.stbl(b))},v.moof=function(b,d,l){return v.box(v.types.moof,v.mfhd(b),v.traf(l,d))},v.moov=function(b){for(var d=b.length,l=[];d--;)l[d]=v.trak(b[d]);return v.box.apply(null,[v.types.moov,v.mvhd(b[0].timescale,b[0].duration)].concat(l).concat(v.mvex(b)))},v.mvex=function(b){for(var d=b.length,l=[];d--;)l[d]=v.trex(b[d]);return v.box.apply(null,[v.types.mvex].concat(l))},v.mvhd=function(b,d){d*=b;var l=Math.floor(d/(P+1)),n=Math.floor(d%(P+1)),c=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,l>>24,l>>16&255,l>>8&255,l&255,n>>24,n>>16&255,n>>8&255,n&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return v.box(v.types.mvhd,c)},v.sdtp=function(b){var d=b.samples||[],l=new Uint8Array(4+d.length),n,c;for(n=0;n<d.length;n++)c=d[n].flags,l[n+4]=c.dependsOn<<4|c.isDependedOn<<2|c.hasRedundancy;return v.box(v.types.sdtp,l)},v.stbl=function(b){return v.box(v.types.stbl,v.stsd(b),v.box(v.types.stts,v.STTS),v.box(v.types.stsc,v.STSC),v.box(v.types.stsz,v.STSZ),v.box(v.types.stco,v.STCO))},v.avc1=function(b){var d=[],l=[],n,c,u;for(n=0;n<b.sps.length;n++)c=b.sps[n],u=c.byteLength,d.push(u>>>8&255),d.push(u&255),d=d.concat(Array.prototype.slice.call(c));for(n=0;n<b.pps.length;n++)c=b.pps[n],u=c.byteLength,l.push(u>>>8&255),l.push(u&255),l=l.concat(Array.prototype.slice.call(c));var o=v.box(v.types.avcC,new Uint8Array([1,d[3],d[4],d[5],252|3,224|b.sps.length].concat(d).concat([b.pps.length]).concat(l))),h=b.width,m=b.height,s=b.pixelRatio[0],r=b.pixelRatio[1];return v.box(v.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,h>>8&255,h&255,m>>8&255,m&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]),o,v.box(v.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),v.box(v.types.pasp,new Uint8Array([s>>24,s>>16&255,s>>8&255,s&255,r>>24,r>>16&255,r>>8&255,r&255])))},v.esds=function(b){var d=b.config.length;return new Uint8Array([0,0,0,0,3,23+d,0,1,0,4,15+d,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([d]).concat(b.config).concat([6,1,2]))},v.mp4a=function(b){var d=b.samplerate;return v.box(v.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,d>>8&255,d&255,0,0]),v.box(v.types.esds,v.esds(b)))},v.mp3=function(b){var d=b.samplerate;return v.box(v.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,d>>8&255,d&255,0,0]))},v.stsd=function(b){return b.type==="audio"?!b.isAAC&&b.codec==="mp3"?v.box(v.types.stsd,v.STSD,v.mp3(b)):v.box(v.types.stsd,v.STSD,v.mp4a(b)):v.box(v.types.stsd,v.STSD,v.avc1(b))},v.tkhd=function(b){var d=b.id,l=b.duration*b.timescale,n=b.width,c=b.height,u=Math.floor(l/(P+1)),o=Math.floor(l%(P+1));return v.box(v.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,d>>24&255,d>>16&255,d>>8&255,d&255,0,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,o>>24,o>>16&255,o>>8&255,o&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>8&255,n&255,0,0,c>>8&255,c&255,0,0]))},v.traf=function(b,d){var l=v.sdtp(b),n=b.id,c=Math.floor(d/(P+1)),u=Math.floor(d%(P+1));return v.box(v.types.traf,v.box(v.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),v.box(v.types.tfdt,new Uint8Array([1,0,0,0,c>>24,c>>16&255,c>>8&255,c&255,u>>24,u>>16&255,u>>8&255,u&255])),v.trun(b,l.length+16+20+8+16+8+8),l)},v.trak=function(b){return b.duration=b.duration||4294967295,v.box(v.types.trak,v.tkhd(b),v.mdia(b))},v.trex=function(b){var d=b.id;return v.box(v.types.trex,new Uint8Array([0,0,0,0,d>>24,d>>16&255,d>>8&255,d&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},v.trun=function(b,d){var l=b.samples||[],n=l.length,c=12+16*n,u=new Uint8Array(c),o,h,m,s,r,a;for(d+=8+c,u.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,d>>>24&255,d>>>16&255,d>>>8&255,d&255],0),o=0;o<n;o++)h=l[o],m=h.duration,s=h.size,r=h.flags,a=h.cts,u.set([m>>>24&255,m>>>16&255,m>>>8&255,m&255,s>>>24&255,s>>>16&255,s>>>8&255,s&255,r.isLeading<<2|r.dependsOn,r.isDependedOn<<6|r.hasRedundancy<<4|r.paddingValue<<1|r.isNonSync,r.degradPrio&240<<8,r.degradPrio&15,a>>>24&255,a>>>16&255,a>>>8&255,a&255],12+16*o);return v.box(v.types.trun,u)},v.initSegment=function(b){v.types||v.init();var d=v.moov(b),l=new Uint8Array(v.FTYP.byteLength+d.byteLength);return l.set(v.FTYP),l.set(d,v.FTYP.byteLength),l},v}();p.types=void 0,p.HDLR_TYPES=void 0,p.STTS=void 0,p.STSC=void 0,p.STCO=void 0,p.STSZ=void 0,p.VMHD=void 0,p.SMHD=void 0,p.STSD=void 0,p.FTYP=void 0,p.DINF=void 0,g.default=p},"./src/remux/mp4-remuxer.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return a}),T.d(g,"normalizePts",function(){return t});var P=T("./src/polyfills/number.ts"),p=T("./src/remux/aac-helper.ts"),v=T("./src/remux/mp4-generator.ts"),S=T("./src/events.ts"),b=T("./src/errors.ts"),d=T("./src/utils/logger.ts"),l=T("./src/types/loader.ts"),n=T("./src/utils/timescale-conversion.ts");function c(){return c=Object.assign||function(k){for(var O=1;O<arguments.length;O++){var C=arguments[O];for(var x in C)Object.prototype.hasOwnProperty.call(C,x)&&(k[x]=C[x])}return k},c.apply(this,arguments)}var u=10*1e3,o=1024,h=1152,m=null,s=null,r=!1,a=function(){function k(C,x,y,_){if(_===void 0&&(_=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=C,this.config=x,this.typeSupported=y,this.ISGenerated=!1,m===null){var M=navigator.userAgent||"",I=M.match(/Chrome\/(\d+)/i);m=I?parseInt(I[1]):0}if(s===null){var N=navigator.userAgent.match(/Safari\/(\d+)/i);s=N?parseInt(N[1]):0}r=!!m&&m<75||!!s&&s<600}var O=k.prototype;return O.destroy=function(){},O.resetTimeStamp=function(x){d.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=x},O.resetNextTimestamp=function(){d.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},O.resetInitSegment=function(){d.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},O.getVideoStartPts=function(x){var y=!1,_=x.reduce(function(M,I){var N=I.pts-M;return N<-4294967296?(y=!0,t(M,I.pts)):N>0?M:I.pts},x[0].pts);return y&&d.logger.debug("PTS rollover detected"),_},O.remux=function(x,y,_,M,I,N,G,H){var B,K,U,W,X,ne,fe=I,me=I,Ae=x.pid>-1,De=y.pid>-1,ye=y.samples.length,Oe=x.samples.length>0,xe=ye>1,ue=(!Ae||Oe)&&(!De||xe)||this.ISGenerated||G;if(ue){this.ISGenerated||(U=this.generateIS(x,y,I));var le=this.isVideoContiguous,re=-1;if(xe&&(re=w(y.samples),!le&&this.config.forceKeyFrameOnDiscontinuity))if(ne=!0,re>0){d.logger.warn("[mp4-remuxer]: Dropped "+re+" out of "+ye+" video samples due to a missing keyframe");var pe=this.getVideoStartPts(y.samples);y.samples=y.samples.slice(re),y.dropped+=re,me+=(y.samples[0].pts-pe)/(y.timescale||9e4)}else re===-1&&(d.logger.warn("[mp4-remuxer]: No keyframe found out of "+ye+" video samples"),ne=!1);if(this.ISGenerated){if(Oe&&xe){var ee=this.getVideoStartPts(y.samples),te=t(x.samples[0].pts,ee)-ee,ce=te/y.inputTimeScale;fe+=Math.max(0,ce),me+=Math.max(0,-ce)}if(Oe){if(x.samplerate||(d.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(x,y,I)),K=this.remuxAudio(x,fe,this.isAudioContiguous,N,De||xe||H===l.PlaylistLevelType.AUDIO?me:void 0),xe){var q=K?K.endPTS-K.startPTS:0;y.inputTimeScale||(d.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(x,y,I)),B=this.remuxVideo(y,me,le,q)}}else xe&&(B=this.remuxVideo(y,me,le,0));B&&(B.firstKeyFrame=re,B.independent=re!==-1)}}return this.ISGenerated&&(_.samples.length&&(X=this.remuxID3(_,I)),M.samples.length&&(W=this.remuxText(M,I))),{audio:K,video:B,initSegment:U,independent:ne,text:W,id3:X}},O.generateIS=function(x,y,_){var M=x.samples,I=y.samples,N=this.typeSupported,G={},H=!Object(P.isFiniteNumber)(this._initPTS),B="audio/mp4",K,U,W;if(H&&(K=U=Infinity),x.config&&M.length&&(x.timescale=x.samplerate,x.isAAC||(N.mpeg?(B="audio/mpeg",x.codec=""):N.mp3&&(x.codec="mp3")),G.audio={id:"audio",container:B,codec:x.codec,initSegment:!x.isAAC&&N.mpeg?new Uint8Array(0):v.default.initSegment([x]),metadata:{channelCount:x.channelCount}},H&&(W=x.inputTimeScale,K=U=M[0].pts-Math.round(W*_))),y.sps&&y.pps&&I.length&&(y.timescale=y.inputTimeScale,G.video={id:"main",container:"video/mp4",codec:y.codec,initSegment:v.default.initSegment([y]),metadata:{width:y.width,height:y.height}},H)){W=y.inputTimeScale;var X=this.getVideoStartPts(I),ne=Math.round(W*_);U=Math.min(U,t(I[0].dts,X)-ne),K=Math.min(K,X-ne)}if(Object.keys(G).length)return this.ISGenerated=!0,H&&(this._initPTS=K,this._initDTS=U),{tracks:G,initPTS:K,timescale:W}},O.remuxVideo=function(x,y,_,M){var I=x.inputTimeScale,N=x.samples,G=[],H=N.length,B=this._initPTS,K=this.nextAvcDts,U=8,W,X,ne,fe=Number.POSITIVE_INFINITY,me=Number.NEGATIVE_INFINITY,Ae=0,De=!1;if(!_||K===null){var ye=y*I,Oe=N[0].pts-t(N[0].dts,N[0].pts);K=ye-Oe}for(var xe=0;xe<H;xe++){var ue=N[xe];if(ue.pts=t(ue.pts-B,K),ue.dts=t(ue.dts-B,K),ue.dts>ue.pts){var le=9e4*.2;Ae=Math.max(Math.min(Ae,ue.pts-ue.dts),-1*le)}ue.dts<N[xe>0?xe-1:xe].dts&&(De=!0)}De&&N.sort(function(hr,mr){var St=hr.dts-mr.dts,Yr=hr.pts-mr.pts;return St||Yr}),X=N[0].dts,ne=N[N.length-1].dts;var re=Math.round((ne-X)/(H-1));if(Ae<0){if(Ae<re*-2){d.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(n.toMsFromMpegTsClock)(-re,!0)+" ms");for(var pe=Ae,ee=0;ee<H;ee++)N[ee].dts=pe=Math.max(pe,N[ee].pts-re),N[ee].pts=Math.max(pe,N[ee].pts)}else{d.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(n.toMsFromMpegTsClock)(Ae,!0)+" ms to overcome this issue");for(var te=0;te<H;te++)N[te].dts=N[te].dts+Ae}X=N[0].dts}if(_){var ce=X-K,q=ce>re,Q=ce<-1;if(q||Q){q?d.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(ce,!0)+" ms ("+ce+"dts) hole between fragments detected, filling it"):d.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(-ce,!0)+" ms ("+ce+"dts) overlapping between fragments detected"),X=K;var V=N[0].pts-ce;N[0].dts=X,N[0].pts=V,d.logger.log("Video: First PTS/DTS adjusted: "+Object(n.toMsFromMpegTsClock)(V,!0)+"/"+Object(n.toMsFromMpegTsClock)(X,!0)+", delta: "+Object(n.toMsFromMpegTsClock)(ce,!0)+" ms")}}r&&(X=Math.max(0,X));for(var Z=0,be=0,ge=0;ge<H;ge++){for(var Te=N[ge],Je=Te.units,rt=Je.length,nt=0,at=0;at<rt;at++)nt+=Je[at].data.length;be+=nt,Z+=rt,Te.length=nt,Te.dts=Math.max(Te.dts,X),Te.pts=Math.max(Te.pts,Te.dts,0),fe=Math.min(Te.pts,fe),me=Math.max(Te.pts,me)}ne=N[H-1].dts;var ct=be+4*Z+8,ht;try{ht=new Uint8Array(ct)}catch(hr){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:b.ErrorTypes.MUX_ERROR,details:b.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ct,reason:"fail allocating video mdat "+ct});return}var He=new DataView(ht.buffer);He.setUint32(0,ct),ht.set(v.default.types.mdat,4);for(var Re=0;Re<H;Re++){for(var tt=N[Re],ft=tt.units,Qe=0,lt=0,Ue=ft.length;lt<Ue;lt++){var Le=ft[lt],Ie=Le.data,Ce=Le.data.byteLength;He.setUint32(U,Ce),U+=4,ht.set(Ie,U),U+=Ce,Qe+=4+Ce}if(Re<H-1)W=N[Re+1].dts-tt.dts;else{var Se=this.config,ke=tt.dts-N[Re>0?Re-1:Re].dts;if(Se.stretchShortVideoTrack&&this.nextAudioPts!==null){var Ne=Math.floor(Se.maxBufferHole*I),et=(M?fe+M*I:this.nextAudioPts)-tt.pts;et>Ne?(W=et-ke,W<0&&(W=ke),d.logger.log("[mp4-remuxer]: It is approximately "+et/90+" ms to the next segment; using duration "+W/90+" ms for the last video frame.")):W=ke}else W=ke}var $e=Math.round(tt.pts-tt.dts);G.push(new E(tt.key,W,Qe,$e))}if(G.length&&m&&m<70){var bt=G[0].flags;bt.dependsOn=2,bt.isNonSync=0}console.assert(W!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=K=ne+W,this.isVideoContiguous=!0;var gt=v.default.moof(x.sequenceNumber++,X,c({},x,{samples:G})),Ut="video",Nt={data1:gt,data2:ht,startPTS:fe/I,endPTS:(me+W)/I,startDTS:X/I,endDTS:K/I,type:Ut,hasAudio:!1,hasVideo:!0,nb:G.length,dropped:x.dropped};return x.samples=[],x.dropped=0,console.assert(ht.length,"MDAT length must not be zero"),Nt},O.remuxAudio=function(x,y,_,M,I){var N=x.inputTimeScale,G=x.samplerate?x.samplerate:N,H=N/G,B=x.isAAC?o:h,K=B*H,U=this._initPTS,W=!x.isAAC&&this.typeSupported.mpeg,X=[],ne=x.samples,fe=W?0:8,me=this.nextAudioPts||-1,Ae=y*N;if(this.isAudioContiguous=_=_||ne.length&&me>0&&(M&&Math.abs(Ae-me)<9e3||Math.abs(t(ne[0].pts-U,Ae)-me)<20*K),ne.forEach(function(Ie){Ie.pts=t(Ie.pts-U,Ae)}),!_||me<0){if(ne=ne.filter(function(Ie){return Ie.pts>=0}),!ne.length)return;I===0?me=0:M?me=Math.max(0,Ae):me=ne[0].pts}if(x.isAAC)for(var De=I!==void 0,ye=this.config.maxAudioFramesDrift,Oe=0,xe=me;Oe<ne.length;Oe++){var ue=ne[Oe],le=ue.pts,re=le-xe,pe=Math.abs(1e3*re/N);if(re<=-ye*K&&De)Oe===0&&(d.logger.warn("Audio frame @ "+(le/N).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*re/N)+" ms."),this.nextAudioPts=me=xe=le);else if(re>=ye*K&&pe<u&&De){var ee=Math.round(re/K);xe=le-ee*K,xe<0&&(ee--,xe+=K),Oe===0&&(this.nextAudioPts=me=xe),d.logger.warn("[mp4-remuxer]: Injecting "+ee+" audio frame @ "+(xe/N).toFixed(3)+"s due to "+Math.round(1e3*re/N)+" ms gap.");for(var te=0;te<ee;te++){var ce=Math.max(xe,0),q=p.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);q||(d.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),q=ue.unit.subarray()),ne.splice(Oe,0,{unit:q,pts:ce}),xe+=K,Oe++}}ue.pts=xe,xe+=K}for(var Q=null,V=null,Z,be=0,ge=ne.length;ge--;)be+=ne[ge].unit.byteLength;for(var Te=0,Je=ne.length;Te<Je;Te++){var rt=ne[Te],nt=rt.unit,at=rt.pts;if(V!==null){var ct=X[Te-1];ct.duration=Math.round((at-V)/H)}else if(_&&x.isAAC&&(at=me),Q=at,be>0){be+=fe;try{Z=new Uint8Array(be)}catch(Ie){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:b.ErrorTypes.MUX_ERROR,details:b.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:be,reason:"fail allocating audio mdat "+be});return}if(!W){var ht=new DataView(Z.buffer);ht.setUint32(0,be),Z.set(v.default.types.mdat,4)}}else return;Z.set(nt,fe);var He=nt.byteLength;fe+=He,X.push(new E(!0,B,He,0)),V=at}var Re=X.length;if(!Re)return;var tt=X[X.length-1];this.nextAudioPts=me=V+H*tt.duration;var ft=W?new Uint8Array(0):v.default.moof(x.sequenceNumber++,Q/H,c({},x,{samples:X}));x.samples=[];var Qe=Q/N,lt=me/N,Ue="audio",Le={data1:ft,data2:Z,startPTS:Qe,endPTS:lt,startDTS:Qe,endDTS:lt,type:Ue,hasAudio:!0,hasVideo:!1,nb:Re};return this.isAudioContiguous=!0,console.assert(Z.length,"MDAT length must not be zero"),Le},O.remuxEmptyAudio=function(x,y,_,M){var I=x.inputTimeScale,N=x.samplerate?x.samplerate:I,G=I/N,H=this.nextAudioPts,B=(H!==null?H:M.startDTS*I)+this._initDTS,K=M.endDTS*I+this._initDTS,U=G*o,W=Math.ceil((K-B)/U),X=p.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);if(d.logger.warn("[mp4-remuxer]: remux empty Audio"),!X){d.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ne=[],fe=0;fe<W;fe++){var me=B+fe*U;ne.push({unit:X,pts:me,dts:me})}return x.samples=ne,this.remuxAudio(x,y,_,!1)},O.remuxID3=function(x,y){var _=x.samples.length;if(!_)return;for(var M=x.inputTimeScale,I=this._initPTS,N=this._initDTS,G=0;G<_;G++){var H=x.samples[G];H.pts=t(H.pts-I,y*M)/M,H.dts=t(H.dts-N,y*M)/M}var B=x.samples;return x.samples=[],{samples:B}},O.remuxText=function(x,y){var _=x.samples.length;if(!_)return;for(var M=x.inputTimeScale,I=this._initPTS,N=0;N<_;N++){var G=x.samples[N];G.pts=t(G.pts-I,y*M)/M}x.samples.sort(function(B,K){return B.pts-K.pts});var H=x.samples;return x.samples=[],{samples:H}},k}();function t(k,O){var C;if(O===null)return k;for(O<k?C=-8589934592:C=8589934592;Math.abs(k-O)>4294967296;)k+=C;return k}function w(k){for(var O=0;O<k.length;O++)if(k[O].key)return O;return-1}var E=function(O,C,x,y){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=C,this.size=x,this.cts=y,this.flags=new f(O)},f=function(O){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=O?2:1,this.isNonSync=O?0:1}},"./src/remux/passthrough-remuxer.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/polyfills/number.ts"),p=T("./src/utils/mp4-tools.ts"),v=T("./src/loader/fragment.ts"),S=T("./src/utils/logger.ts"),b=function(){function n(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var c=n.prototype;return c.destroy=function(){},c.resetTimeStamp=function(o){this.initPTS=o,this.lastEndDTS=null},c.resetNextTimestamp=function(){this.lastEndDTS=null},c.resetInitSegment=function(o,h,m){this.audioCodec=h,this.videoCodec=m,this.generateInitSegment(o),this.emitInitSegment=!0},c.generateInitSegment=function(o){var h=this.audioCodec,m=this.videoCodec;if(!o||!o.byteLength){this.initTracks=void 0,this.initData=void 0;return}var s=this.initData=Object(p.parseInitSegment)(o);h||(h=l(s.audio,v.ElementaryStreamTypes.AUDIO)),m||(m=l(s.video,v.ElementaryStreamTypes.VIDEO));var r={};s.audio&&s.video?r.audiovideo={container:"video/mp4",codec:h+","+m,initSegment:o,id:"main"}:s.audio?r.audio={container:"audio/mp4",codec:h,initSegment:o,id:"audio"}:s.video?r.video={container:"video/mp4",codec:m,initSegment:o,id:"main"}:S.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=r},c.remux=function(o,h,m,s,r){var a=this.initPTS,t=this.lastEndDTS,w={audio:void 0,video:void 0,text:s,id3:m,initSegment:void 0};Object(P.isFiniteNumber)(t)||(t=this.lastEndDTS=r||0);var E=h.samples;if(!E||!E.length)return w;var f={initPTS:void 0,timescale:1},k=this.initData;if((!k||!k.length)&&(this.generateInitSegment(E),k=this.initData),!k||!k.length)return S.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),w;this.emitInitSegment&&(f.tracks=this.initTracks,this.emitInitSegment=!1),Object(P.isFiniteNumber)(a)||(this.initPTS=f.initPTS=a=d(k,E,t));var O=Object(p.getDuration)(E,k),C=t,x=O+C;Object(p.offsetStartDTS)(k,E,a),O>0?this.lastEndDTS=x:(S.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var y=!!k.audio,_=!!k.video,M="";y&&(M+="audio"),_&&(M+="video");var I={data1:E,startPTS:C,startDTS:C,endPTS:x,endDTS:x,type:M,hasAudio:y,hasVideo:_,nb:1,dropped:0};return w.audio=I.type==="audio"?I:void 0,w.video=I.type!=="audio"?I:void 0,w.text=s,w.id3=m,w.initSegment=f,w},n}(),d=function(c,u,o){return Object(p.getStartDTS)(c,u)-o};function l(n,c){var u=n==null?void 0:n.codec;return u&&u.length>4?u:u==="hvc1"?"hvc1.1.c.L120.90":u==="av01"?"av01.0.04M.08":u==="avc1"||c===v.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}g.default=b},"./src/task-loop.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return P});var P=function(){function p(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var v=p.prototype;return v.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},v.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},v.onHandlerDestroyed=function(){},v.hasInterval=function(){return!!this._tickInterval},v.hasNextTick=function(){return!!this._tickTimer},v.setInterval=function(b){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,b),!0)},v.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},v.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},v.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},v.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},v.doTick=function(){},p}()},"./src/types/cmcd.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"CMCDVersion",function(){return P}),T.d(g,"CMCDObjectType",function(){return p}),T.d(g,"CMCDStreamingFormat",function(){return v}),T.d(g,"CMCDStreamType",function(){return S});var P=1,p;(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"})(p||(p={}));var v;(function(b){b.DASH="d",b.HLS="h",b.SMOOTH="s",b.OTHER="o"})(v||(v={}));var S;(function(b){b.VOD="v",b.LIVE="l"})(S||(S={}))},"./src/types/level.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"HlsSkip",function(){return v}),T.d(g,"getSkipValue",function(){return S}),T.d(g,"HlsUrlParameters",function(){return b}),T.d(g,"Level",function(){return d});function P(l,n){for(var c=0;c<n.length;c++){var u=n[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(l,u.key,u)}}function p(l,n,c){return n&&P(l.prototype,n),c&&P(l,c),l}var v;(function(l){l.No="",l.Yes="YES",l.v2="v2"})(v||(v={}));function S(l,n){var c=l.canSkipUntil,u=l.canSkipDateRanges,o=l.endSN,h=n!==void 0?n-o:0;return c&&h<c?u?v.v2:v.Yes:v.No}var b=function(){function l(c,u,o){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=c,this.part=u,this.skip=o}var n=l.prototype;return n.addDirectives=function(u){var o=new self.URL(u);return this.msn!==void 0&&o.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&o.searchParams.set("_HLS_part",this.part.toString()),this.skip&&o.searchParams.set("_HLS_skip",this.skip),o.toString()},l}(),d=function(){function l(n){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[n.url],this.attrs=n.attrs,this.bitrate=n.bitrate,n.details&&(this.details=n.details),this.id=n.id||0,this.name=n.name,this.width=n.width||0,this.height=n.height||0,this.audioCodec=n.audioCodec,this.videoCodec=n.videoCodec,this.unknownCodecs=n.unknownCodecs,this.codecSet=[n.videoCodec,n.audioCodec].filter(function(c){return c}).join(",").replace(/\.[^.,]+/g,"")}return p(l,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(c){var u=c%this.url.length;this._urlId!==u&&(this.details=void 0,this._urlId=u)}}]),l}()},"./src/types/loader.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"PlaylistContextType",function(){return P}),T.d(g,"PlaylistLevelType",function(){return p});var P;(function(v){v.MANIFEST="manifest",v.LEVEL="level",v.AUDIO_TRACK="audioTrack",v.SUBTITLE_TRACK="subtitleTrack"})(P||(P={}));var p;(function(v){v.MAIN="main",v.AUDIO="audio",v.SUBTITLE="subtitle"})(p||(p={}))},"./src/types/transmuxer.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"ChunkMetadata",function(){return P});var P=function(S,b,d,l,n,c){l===void 0&&(l=0),n===void 0&&(n=-1),c===void 0&&(c=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=p(),this.buffering={audio:p(),video:p(),audiovideo:p()},this.level=S,this.sn=b,this.id=d,this.size=l,this.part=n,this.partial=c};function p(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"AttrList",function(){return v});var P=/^(\d+)x(\d+)$/,p=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,v=function(){function S(d){typeof d=="string"&&(d=S.parseAttrList(d));for(var l in d)d.hasOwnProperty(l)&&(this[l]=d[l])}var b=S.prototype;return b.decimalInteger=function(l){var n=parseInt(this[l],10);return n>Number.MAX_SAFE_INTEGER?Infinity:n},b.hexadecimalInteger=function(l){if(this[l]){var n=(this[l]||"0x").slice(2);n=(n.length&1?"0":"")+n;for(var c=new Uint8Array(n.length/2),u=0;u<n.length/2;u++)c[u]=parseInt(n.slice(u*2,u*2+2),16);return c}else return null},b.hexadecimalIntegerAsNumber=function(l){var n=parseInt(this[l],16);return n>Number.MAX_SAFE_INTEGER?Infinity:n},b.decimalFloatingPoint=function(l){return parseFloat(this[l])},b.optionalFloat=function(l,n){var c=this[l];return c?parseFloat(c):n},b.enumeratedString=function(l){return this[l]},b.bool=function(l){return this[l]==="YES"},b.decimalResolution=function(l){var n=P.exec(this[l]);return n===null?void 0:{width:parseInt(n[1],10),height:parseInt(n[2],10)}},S.parseAttrList=function(l){var n,c={},u='"';for(p.lastIndex=0;(n=p.exec(l))!==null;){var o=n[2];o.indexOf(u)===0&&o.lastIndexOf(u)===o.length-1&&(o=o.slice(1,-1)),c[n[1]]=o}return c},S}()},"./src/utils/binary-search.ts":function(L,g,T){"use strict";T.r(g);var P={search:function(v,S){for(var b=0,d=v.length-1,l=null,n=null;b<=d;){l=(b+d)/2|0,n=v[l];var c=S(n);if(c>0)b=l+1;else if(c<0)d=l-1;else return n}return null}};g.default=P},"./src/utils/buffer-helper.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"BufferHelper",function(){return v});var P=T("./src/utils/logger.ts"),p={length:0,start:function(){return 0},end:function(){return 0}},v=function(){function S(){}return S.isBuffered=function(d,l){try{if(d){for(var n=S.getBuffered(d),c=0;c<n.length;c++)if(l>=n.start(c)&&l<=n.end(c))return!0}}catch(u){}return!1},S.bufferInfo=function(d,l,n){try{if(d){var c=S.getBuffered(d),u=[],o;for(o=0;o<c.length;o++)u.push({start:c.start(o),end:c.end(o)});return this.bufferedInfo(u,l,n)}}catch(h){}return{len:0,start:l,end:l,nextStart:void 0}},S.bufferedInfo=function(d,l,n){l=Math.max(0,l),d.sort(function(f,k){var O=f.start-k.start;return O||k.end-f.end});var c=[];if(n)for(var u=0;u<d.length;u++){var o=c.length;if(o){var h=c[o-1].end;d[u].start-h<n?d[u].end>h&&(c[o-1].end=d[u].end):c.push(d[u])}else c.push(d[u])}else c=d;for(var m=0,s,r=l,a=l,t=0;t<c.length;t++){var w=c[t].start,E=c[t].end;if(l+n>=w&&l<E)r=w,a=E,m=a-l;else if(l+n<w){s=w;break}}return{len:m,start:r||0,end:a||0,nextStart:s}},S.getBuffered=function(d){try{return d.buffered}catch(l){return P.logger.log("failed to get media.buffered",l),p}},S}()},"./src/utils/cea-608-parser.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"Row",function(){return a}),T.d(g,"CaptionScreen",function(){return t});var P=T("./src/utils/logger.ts"),p={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},v=function(x){var y=x;return p.hasOwnProperty(x)&&(y=p[x]),String.fromCharCode(y)},S=15,b=100,d={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},l={17:2,18:4,21:6,22:8,23:10,19:13,20:15},n={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},c={25:2,26:4,29:6,30:8,31:10,27:13,28:15},u=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],o;(function(C){C[C.ERROR=0]="ERROR",C[C.TEXT=1]="TEXT",C[C.WARNING=2]="WARNING",C[C.INFO=2]="INFO",C[C.DEBUG=3]="DEBUG",C[C.DATA=3]="DATA"})(o||(o={}));var h=function(){function C(){this.time=null,this.verboseLevel=o.ERROR}var x=C.prototype;return x.log=function(_,M){this.verboseLevel>=_&&P.logger.log(this.time+" ["+_+"] "+M)},C}(),m=function(x){for(var y=[],_=0;_<x.length;_++)y.push(x[_].toString(16));return y},s=function(){function C(y,_,M,I,N){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=y||"white",this.underline=_||!1,this.italics=M||!1,this.background=I||"black",this.flash=N||!1}var x=C.prototype;return x.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},x.setStyles=function(_){for(var M=["foreground","underline","italics","background","flash"],I=0;I<M.length;I++){var N=M[I];_.hasOwnProperty(N)&&(this[N]=_[N])}},x.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},x.equals=function(_){return this.foreground===_.foreground&&this.underline===_.underline&&this.italics===_.italics&&this.background===_.background&&this.flash===_.flash},x.copy=function(_){this.foreground=_.foreground,this.underline=_.underline,this.italics=_.italics,this.background=_.background,this.flash=_.flash},x.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},C}(),r=function(){function C(y,_,M,I,N,G){this.uchar=void 0,this.penState=void 0,this.uchar=y||" ",this.penState=new s(_,M,I,N,G)}var x=C.prototype;return x.reset=function(){this.uchar=" ",this.penState.reset()},x.setChar=function(_,M){this.uchar=_,this.penState.copy(M)},x.setPenState=function(_){this.penState.copy(_)},x.equals=function(_){return this.uchar===_.uchar&&this.penState.equals(_.penState)},x.copy=function(_){this.uchar=_.uchar,this.penState.copy(_.penState)},x.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},C}(),a=function(){function C(y){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var _=0;_<b;_++)this.chars.push(new r);this.logger=y,this.pos=0,this.currPenState=new s}var x=C.prototype;return x.equals=function(_){for(var M=!0,I=0;I<b;I++)if(!this.chars[I].equals(_.chars[I])){M=!1;break}return M},x.copy=function(_){for(var M=0;M<b;M++)this.chars[M].copy(_.chars[M])},x.isEmpty=function(){for(var _=!0,M=0;M<b;M++)if(!this.chars[M].isEmpty()){_=!1;break}return _},x.setCursor=function(_){this.pos!==_&&(this.pos=_),this.pos<0?(this.logger.log(o.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>b&&(this.logger.log(o.DEBUG,"Too large cursor position "+this.pos),this.pos=b)},x.moveCursor=function(_){var M=this.pos+_;if(_>1)for(var I=this.pos+1;I<M+1;I++)this.chars[I].setPenState(this.currPenState);this.setCursor(M)},x.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},x.insertChar=function(_){_>=144&&this.backSpace();var M=v(_);if(this.pos>=b){this.logger.log(o.ERROR,"Cannot insert "+_.toString(16)+" ("+M+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(M,this.currPenState),this.moveCursor(1)},x.clearFromPos=function(_){var M;for(M=_;M<b;M++)this.chars[M].reset()},x.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},x.clearToEndOfRow=function(){this.clearFromPos(this.pos)},x.getTextString=function(){for(var _=[],M=!0,I=0;I<b;I++){var N=this.chars[I].uchar;N!==" "&&(M=!1),_.push(N)}return M?"":_.join("")},x.setPenStyles=function(_){this.currPenState.setStyles(_);var M=this.chars[this.pos];M.setPenState(this.currPenState)},C}(),t=function(){function C(y){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var _=0;_<S;_++)this.rows.push(new a(y));this.logger=y,this.currRow=S-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var x=C.prototype;return x.reset=function(){for(var _=0;_<S;_++)this.rows[_].clear();this.currRow=S-1},x.equals=function(_){for(var M=!0,I=0;I<S;I++)if(!this.rows[I].equals(_.rows[I])){M=!1;break}return M},x.copy=function(_){for(var M=0;M<S;M++)this.rows[M].copy(_.rows[M])},x.isEmpty=function(){for(var _=!0,M=0;M<S;M++)if(!this.rows[M].isEmpty()){_=!1;break}return _},x.backSpace=function(){var _=this.rows[this.currRow];_.backSpace()},x.clearToEndOfRow=function(){var _=this.rows[this.currRow];_.clearToEndOfRow()},x.insertChar=function(_){var M=this.rows[this.currRow];M.insertChar(_)},x.setPen=function(_){var M=this.rows[this.currRow];M.setPenStyles(_)},x.moveCursor=function(_){var M=this.rows[this.currRow];M.moveCursor(_)},x.setCursor=function(_){this.logger.log(o.INFO,"setCursor: "+_);var M=this.rows[this.currRow];M.setCursor(_)},x.setPAC=function(_){this.logger.log(o.INFO,"pacData = "+JSON.stringify(_));var M=_.row-1;if(this.nrRollUpRows&&M<this.nrRollUpRows-1&&(M=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==M){for(var I=0;I<S;I++)this.rows[I].clear();var N=this.currRow+1-this.nrRollUpRows,G=this.lastOutputScreen;if(G){var H=G.rows[N].cueStartTime,B=this.logger.time;if(H&&B!==null&&H<B)for(var K=0;K<this.nrRollUpRows;K++)this.rows[M-this.nrRollUpRows+K+1].copy(G.rows[N+K])}}this.currRow=M;var U=this.rows[this.currRow];if(_.indent!==null){var W=_.indent,X=Math.max(W-1,0);U.setCursor(_.indent),_.color=U.chars[X].penState.foreground}var ne={foreground:_.color,underline:_.underline,italics:_.italics,background:"black",flash:!1};this.setPen(ne)},x.setBkgData=function(_){this.logger.log(o.INFO,"bkgData = "+JSON.stringify(_)),this.backSpace(),this.setPen(_),this.insertChar(32)},x.setRollUpRows=function(_){this.nrRollUpRows=_},x.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(o.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(o.TEXT,this.getDisplayText());var _=this.currRow+1-this.nrRollUpRows,M=this.rows.splice(_,1)[0];M.clear(),this.rows.splice(this.currRow,0,M),this.logger.log(o.INFO,"Rolling up")},x.getDisplayText=function(_){_=_||!1;for(var M=[],I="",N=-1,G=0;G<S;G++){var H=this.rows[G].getTextString();H&&(N=G+1,_?M.push("Row "+N+": '"+H+"'"):M.push(H.trim()))}return M.length>0&&(_?I="["+M.join(" | ")+"]":I=M.join(`
|
|
|
`)),I},x.getTextAndFormat=function(){return this.rows},C}(),w=function(){function C(y,_,M){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=y,this.outputFilter=_,this.mode=null,this.verbose=0,this.displayedMemory=new t(M),this.nonDisplayedMemory=new t(M),this.lastOutputScreen=new t(M),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=M}var x=C.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(_){this.outputFilter=_},x.setPAC=function(_){this.writeScreen.setPAC(_)},x.setBkgData=function(_){this.writeScreen.setBkgData(_)},x.setMode=function(_){if(_===this.mode)return;this.mode=_,this.logger.log(o.INFO,"MODE="+_),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=_},x.insertChars=function(_){for(var M=0;M<_.length;M++)this.writeScreen.insertChar(_[M]);var I=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(o.INFO,I+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(o.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},x.ccRCL=function(){this.logger.log(o.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},x.ccBS=function(){if(this.logger.log(o.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},x.ccAOF=function(){},x.ccAON=function(){},x.ccDER=function(){this.logger.log(o.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},x.ccRU=function(_){this.logger.log(o.INFO,"RU("+_+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(_)},x.ccFON=function(){this.logger.log(o.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},x.ccRDC=function(){this.logger.log(o.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},x.ccTR=function(){this.logger.log(o.INFO,"TR"),this.setMode("MODE_TEXT")},x.ccRTD=function(){this.logger.log(o.INFO,"RTD"),this.setMode("MODE_TEXT")},x.ccEDM=function(){this.logger.log(o.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},x.ccCR=function(){this.logger.log(o.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},x.ccENM=function(){this.logger.log(o.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},x.ccEOC=function(){if(this.logger.log(o.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var _=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=_,this.writeScreen=this.nonDisplayedMemory,this.logger.log(o.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},x.ccTO=function(_){this.logger.log(o.INFO,"TO("+_+") - Tab Offset"),this.writeScreen.moveCursor(_)},x.ccMIDROW=function(_){var M={flash:!1};if(M.underline=_%2===1,M.italics=_>=46,M.italics)M.foreground="white";else{var I=Math.floor(_/2)-16,N=["white","green","blue","cyan","red","yellow","magenta"];M.foreground=N[I]}this.logger.log(o.INFO,"MIDROW: "+JSON.stringify(M)),this.writeScreen.setPen(M)},x.outputDataUpdate=function(_){_===void 0&&(_=!1);var M=this.logger.time;if(M===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=M:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,M,this.lastOutputScreen),_&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:M),this.lastOutputScreen.copy(this.displayedMemory))},x.cueSplitAtTime=function(_){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,_,this.displayedMemory),this.cueStartTime=_))},C}(),E=function(){function C(y,_,M){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var I=new h;this.channels=[null,new w(y,_,I),new w(y+1,M,I)],this.cmdHistory=O(),this.logger=I}var x=C.prototype;return x.getHandler=function(_){return this.channels[_].getHandler()},x.setHandler=function(_,M){this.channels[_].setHandler(M)},x.addData=function(_,M){var I,N,G,H=!1;this.logger.time=_;for(var B=0;B<M.length;B+=2){if(N=M[B]&127,G=M[B+1]&127,N===0&&G===0)continue;if(this.logger.log(o.DATA,"["+m([M[B],M[B+1]])+"] -> ("+m([N,G])+")"),I=this.parseCmd(N,G),I||(I=this.parseMidrow(N,G)),I||(I=this.parsePAC(N,G)),I||(I=this.parseBackgroundAttributes(N,G)),!I&&(H=this.parseChars(N,G),H)){var K=this.currentChannel;if(K&&K>0){var U=this.channels[K];U.insertChars(H)}else this.logger.log(o.WARNING,"No channel found yet. TEXT-MODE?")}!I&&!H&&this.logger.log(o.WARNING,"Couldn't parse cleaned data "+m([N,G])+" orig: "+m([M[B],M[B+1]]))}},x.parseCmd=function(_,M){var I=this.cmdHistory,N=(_===20||_===28||_===21||_===29)&&M>=32&&M<=47,G=(_===23||_===31)&&M>=33&&M<=35;if(!(N||G))return!1;if(k(_,M,I))return f(null,null,I),this.logger.log(o.DEBUG,"Repeated command ("+m([_,M])+") is dropped"),!0;var H=_===20||_===21||_===23?1:2,B=this.channels[H];return _===20||_===21||_===28||_===29?M===32?B.ccRCL():M===33?B.ccBS():M===34?B.ccAOF():M===35?B.ccAON():M===36?B.ccDER():M===37?B.ccRU(2):M===38?B.ccRU(3):M===39?B.ccRU(4):M===40?B.ccFON():M===41?B.ccRDC():M===42?B.ccTR():M===43?B.ccRTD():M===44?B.ccEDM():M===45?B.ccCR():M===46?B.ccENM():M===47&&B.ccEOC():B.ccTO(M-32),f(_,M,I),this.currentChannel=H,!0},x.parseMidrow=function(_,M){var I=0;if((_===17||_===25)&&M>=32&&M<=47){if(_===17?I=1:I=2,I!==this.currentChannel)return this.logger.log(o.ERROR,"Mismatch channel in midrow parsing"),!1;var N=this.channels[I];return N?(N.ccMIDROW(M),this.logger.log(o.DEBUG,"MIDROW ("+m([_,M])+")"),!0):!1}return!1},x.parsePAC=function(_,M){var I,N=this.cmdHistory,G=(_>=17&&_<=23||_>=25&&_<=31)&&M>=64&&M<=127,H=(_===16||_===24)&&M>=64&&M<=95;if(!(G||H))return!1;if(k(_,M,N))return f(null,null,N),!0;var B=_<=23?1:2;M>=64&&M<=95?I=B===1?d[_]:n[_]:I=B===1?l[_]:c[_];var K=this.channels[B];return K?(K.setPAC(this.interpretPAC(I,M)),f(_,M,N),this.currentChannel=B,!0):!1},x.interpretPAC=function(_,M){var I,N={color:null,italics:!1,indent:null,underline:!1,row:_};return M>95?I=M-96:I=M-64,N.underline=(I&1)===1,I<=13?N.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(I/2)]:I<=15?(N.italics=!0,N.color="white"):N.indent=Math.floor((I-16)/2)*4,N},x.parseChars=function(_,M){var I,N=null,G=null;if(_>=25?(I=2,G=_-8):(I=1,G=_),G>=17&&G<=19){var H;G===17?H=M+80:G===18?H=M+112:H=M+144,this.logger.log(o.INFO,"Special char '"+v(H)+"' in channel "+I),N=[H]}else _>=32&&_<=127&&(N=M===0?[_]:[_,M]);if(N){var B=m(N);this.logger.log(o.DEBUG,"Char codes = "+B.join(",")),f(_,M,this.cmdHistory)}return N},x.parseBackgroundAttributes=function(_,M){var I=(_===16||_===24)&&M>=32&&M<=47,N=(_===23||_===31)&&M>=45&&M<=47;if(!(I||N))return!1;var G,H={};_===16||_===24?(G=Math.floor((M-32)/2),H.background=u[G],M%2===1&&(H.background=H.background+"_semi")):M===45?H.background="transparent":(H.foreground="black",M===47&&(H.underline=!0));var B=_<=23?1:2,K=this.channels[B];return K.setBkgData(H),f(_,M,this.cmdHistory),!0},x.reset=function(){for(var _=0;_<Object.keys(this.channels).length;_++){var M=this.channels[_];M&&M.reset()}this.cmdHistory=O()},x.cueSplitAtTime=function(_){for(var M=0;M<this.channels.length;M++){var I=this.channels[M];I&&I.cueSplitAtTime(_)}},C}();function f(C,x,y){y.a=C,y.b=x}function k(C,x,y){return y.a===C&&y.b===x}function O(){return{a:null,b:null}}g.default=E},"./src/utils/codecs.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"isCodecType",function(){return p}),T.d(g,"isCodecSupportedInMp4",function(){return v});var P={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function p(S,b){var d=P[b];return!!d&&d[S.slice(0,4)]===!0}function v(S,b){return MediaSource.isTypeSupported((b||"video")+'/mp4;codecs="'+S+'"')}},"./src/utils/cues.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/utils/vttparser.ts"),p=T("./src/utils/webvtt-parser.ts"),v=T("./src/utils/texttrack-utils.ts"),S=/\s/,b={newCue:function(l,n,c,u){for(var o=[],h,m,s,r,a,t=self.VTTCue||self.TextTrackCue,w=0;w<u.rows.length;w++)if(h=u.rows[w],s=!0,r=0,a="",!h.isEmpty()){for(var E=0;E<h.chars.length;E++)S.test(h.chars[E].uchar)&&s?r++:(a+=h.chars[E].uchar,s=!1);h.cueStartTime=n,n===c&&(c+=1e-4),r>=16?r--:r++;var f=Object(P.fixLineBreaks)(a.trim()),k=Object(p.generateCueId)(n,c,f);(!l||!l.cues||!l.cues.getCueById(k))&&(m=new t(n,c,f),m.id=k,m.line=w+1,m.align="left",m.position=10+Math.min(80,Math.floor(r*8/32)*10),o.push(m))}return l&&o.length&&(o.sort(function(O,C){return O.line==="auto"||C.line==="auto"?0:O.line>8&&C.line>8?C.line-O.line:O.line-C.line}),o.forEach(function(O){return Object(v.addCueToTrack)(l,O)})),o}};g.default=b},"./src/utils/discontinuities.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"findFirstFragWithCC",function(){return S}),T.d(g,"shouldAlignOnDiscontinuities",function(){return b}),T.d(g,"findDiscontinuousReferenceFrag",function(){return d}),T.d(g,"adjustSlidingStart",function(){return n}),T.d(g,"alignStream",function(){return c}),T.d(g,"alignPDT",function(){return o}),T.d(g,"alignFragmentByPDTDelta",function(){return h}),T.d(g,"alignMediaPlaylistByPDT",function(){return m});var P=T("./src/polyfills/number.ts"),p=T("./src/utils/logger.ts"),v=T("./src/controller/level-helper.ts");function S(s,r){for(var a=null,t=0,w=s.length;t<w;t++){var E=s[t];if(E&&E.cc===r){a=E;break}}return a}function b(s,r,a){return!!(r.details&&(a.endCC>a.startCC||s&&s.cc<a.startCC))}function d(s,r){var a=s.fragments,t=r.fragments;if(!t.length||!a.length){p.logger.log("No fragments to align");return}var w=S(a,t[0].cc);if(!w||w&&!w.startPTS){p.logger.log("No frag in previous level to align on");return}return w}function l(s,r){if(s){var a=s.start+r;s.start=s.startPTS=a,s.endPTS=a+s.duration}}function n(s,r){for(var a=r.fragments,t=0,w=a.length;t<w;t++)l(a[t],s);r.fragmentHint&&l(r.fragmentHint,s),r.alignedSliding=!0}function c(s,r,a){if(!r)return;u(s,a,r),!a.alignedSliding&&r.details&&o(a,r.details),!a.alignedSliding&&r.details&&!a.skippedSegments&&Object(v.adjustSliding)(r.details,a)}function u(s,r,a){if(b(s,a,r)){var t=d(a.details,r);t&&Object(P.isFiniteNumber)(t.start)&&(p.logger.log("Adjusting PTS using last level due to CC increase within current level "+r.url),n(t.start,r))}}function o(s,r){if(!r.fragments.length||!s.hasProgramDateTime||!r.hasProgramDateTime)return;var a=r.fragments[0].programDateTime,t=s.fragments[0].programDateTime,w=(t-a)/1e3+r.fragments[0].start;w&&Object(P.isFiniteNumber)(w)&&(p.logger.log("Adjusting PTS using programDateTime delta "+(t-a)+"ms, sliding:"+w.toFixed(3)+" "+s.url+" "),n(w,s))}function h(s,r){var a=s.programDateTime;if(!a)return;var t=(a-r)/1e3;s.start=s.startPTS=t,s.endPTS=t+s.duration}function m(s,r){if(!r.fragments.length||!s.hasProgramDateTime||!r.hasProgramDateTime)return;var a=r.fragments[0].programDateTime,t=r.fragments[0].start,w=a-t*1e3;s.fragments.forEach(function(E){h(E,w)}),s.fragmentHint&&h(s.fragmentHint,w),s.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/utils/ewma.ts"),p=function(){function v(b,d,l){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=l,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new P.default(b),this.fast_=new P.default(d)}var S=v.prototype;return S.update=function(d,l){var n=this.slow_,c=this.fast_;this.slow_.halfLife!==d&&(this.slow_=new P.default(d,n.getEstimate(),n.getTotalWeight())),this.fast_.halfLife!==l&&(this.fast_=new P.default(l,c.getEstimate(),c.getTotalWeight()))},S.sample=function(d,l){d=Math.max(d,this.minDelayMs_);var n=8*l,c=d/1e3,u=n/c;this.fast_.sample(c,u),this.slow_.sample(c,u)},S.canEstimate=function(){var d=this.fast_;return d&&d.getTotalWeight()>=this.minWeight_},S.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},S.destroy=function(){},v}();g.default=p},"./src/utils/ewma.ts":function(L,g,T){"use strict";T.r(g);var P=function(){function p(S,b,d){b===void 0&&(b=0),d===void 0&&(d=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_=d}var v=p.prototype;return v.sample=function(b,d){var l=Math.pow(this.alpha_,b);this.estimate_=d*(1-l)+l*this.estimate_,this.totalWeight_+=b},v.getTotalWeight=function(){return this.totalWeight_},v.getEstimate=function(){if(this.alpha_){var b=1-Math.pow(this.alpha_,this.totalWeight_);if(b)return this.estimate_/b}return this.estimate_},p}();g.default=P},"./src/utils/fetch-loader.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"fetchSupported",function(){return h});var P=T("./src/polyfills/number.ts"),p=T("./src/loader/load-stats.ts"),v=T("./src/demux/chunk-cache.ts");function S(t,w){t.prototype=Object.create(w.prototype),t.prototype.constructor=t,c(t,w)}function b(t){var w=typeof Map=="function"?new Map:void 0;return b=function(f){if(f===null||!n(f))return f;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(typeof w!="undefined"){if(w.has(f))return w.get(f);w.set(f,k)}function k(){return d(f,arguments,u(this).constructor)}return k.prototype=Object.create(f.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),c(k,f)},b(t)}function d(t,w,E){return l()?d=Reflect.construct:d=function(k,O,C){var x=[null];x.push.apply(x,O);var y=Function.bind.apply(k,x),_=new y;return C&&c(_,C.prototype),_},d.apply(null,arguments)}function l(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function n(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function c(t,w){return c=Object.setPrototypeOf||function(f,k){return f.__proto__=k,f},c(t,w)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},u(t)}function o(){return o=Object.assign||function(t){for(var w=1;w<arguments.length;w++){var E=arguments[w];for(var f in E)Object.prototype.hasOwnProperty.call(E,f)&&(t[f]=E[f])}return t},o.apply(this,arguments)}function h(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var m=function(){function t(E){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=E.fetchSetup||r,this.controller=new self.AbortController,this.stats=new p.LoadStats}var w=t.prototype;return w.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},w.abortInternal=function(){var f=this.response;(!f||!f.ok)&&(this.stats.aborted=!0,this.controller.abort())},w.abort=function(){var f;this.abortInternal(),(f=this.callbacks)!==null&&f!==void 0&&f.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},w.load=function(f,k,O){var C=this,x=this.stats;if(x.loading.start)throw new Error("Loader can only be used once.");x.loading.start=self.performance.now();var y=s(f,this.controller.signal),_=O.onProgress,M=f.responseType==="arraybuffer",I=M?"byteLength":"length";this.context=f,this.config=k,this.callbacks=O,this.request=this.fetchSetup(f,y),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){C.abortInternal(),O.onTimeout(x,f,C.response)},k.timeout),self.fetch(this.request).then(function(N){if(C.response=C.loader=N,!N.ok){var G=N.status,H=N.statusText;throw new a(H||"fetch, bad network response",G,N)}return x.loading.first=Math.max(self.performance.now(),x.loading.start),x.total=parseInt(N.headers.get("Content-Length")||"0"),_&&Object(P.isFiniteNumber)(k.highWaterMark)?C.loadProgressively(N,x,f,k.highWaterMark,_):M?N.arrayBuffer():N.text()}).then(function(N){var G=C.response;self.clearTimeout(C.requestTimeout),x.loading.end=Math.max(self.performance.now(),x.loading.first),x.loaded=x.total=N[I];var H={url:G.url,data:N};_&&!Object(P.isFiniteNumber)(k.highWaterMark)&&_(x,f,N,G),O.onSuccess(H,x,f,G)}).catch(function(N){if(self.clearTimeout(C.requestTimeout),x.aborted)return;var G=N.code||0;O.onError({code:G,text:N.message},f,N.details)})},w.getCacheAge=function(){var f=null;if(this.response){var k=this.response.headers.get("age");f=k?parseFloat(k):null}return f},w.loadProgressively=function(f,k,O,C,x){C===void 0&&(C=0);var y=new v.default,_=f.body.getReader(),M=function I(){return _.read().then(function(N){if(N.done)return y.dataLength&&x(k,O,y.flush(),f),Promise.resolve(new ArrayBuffer(0));var G=N.value,H=G.length;return k.loaded+=H,H<C||y.dataLength?(y.push(G),y.dataLength>=C&&x(k,O,y.flush(),f)):x(k,O,G,f),I()}).catch(function(){return Promise.reject()})};return M()},t}();function s(t,w){var E={method:"GET",mode:"cors",credentials:"same-origin",signal:w,headers:new self.Headers(o({},t.headers))};return t.rangeEnd&&E.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),E}function r(t,w){return new self.Request(t.url,w)}var a=function(t){S(w,t);function w(E,f,k){var O;return O=t.call(this,E)||this,O.code=void 0,O.details=void 0,O.code=f,O.details=k,O}return w}(b(Error));g.default=m},"./src/utils/imsc1-ttml-parser.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"IMSC1_CODEC",function(){return n}),T.d(g,"parseIMSC1",function(){return h});var P=T("./src/utils/mp4-tools.ts"),p=T("./src/utils/vttparser.ts"),v=T("./src/utils/vttcue.ts"),S=T("./src/demux/id3.ts"),b=T("./src/utils/timescale-conversion.ts"),d=T("./src/utils/webvtt-parser.ts");function l(){return l=Object.assign||function(C){for(var x=1;x<arguments.length;x++){var y=arguments[x];for(var _ in y)Object.prototype.hasOwnProperty.call(y,_)&&(C[_]=y[_])}return C},l.apply(this,arguments)}var n="stpp.ttml.im1t",c=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,u=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,o={left:"start",center:"center",right:"end",start:"start",end:"end"};function h(C,x,y,_,M){var I=Object(P.findBox)(new Uint8Array(C),["mdat"]);if(I.length===0){M(new Error("Could not parse IMSC1 mdat"));return}var N=I[0],G=Object(S.utf8ArrayToStr)(new Uint8Array(C,N.start,N.end-N.start)),H=Object(b.toTimescaleFromScale)(x,1,y);try{_(m(G,H))}catch(B){M(B)}}function m(C,x){var y=new DOMParser,_=y.parseFromString(C,"text/xml"),M=_.getElementsByTagName("tt")[0];if(!M)throw new Error("Invalid ttml");var I={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},N=Object.keys(I).reduce(function(U,W){return U[W]=M.getAttribute("ttp:"+W)||I[W],U},{}),G=M.getAttribute("xml:space")!=="preserve",H=r(s(M,"styling","style")),B=r(s(M,"layout","region")),K=s(M,"body","[begin]");return[].map.call(K,function(U){var W=a(U,G);if(!W||!U.hasAttribute("begin"))return null;var X=f(U.getAttribute("begin"),N),ne=f(U.getAttribute("dur"),N),fe=f(U.getAttribute("end"),N);if(X===null)throw E(U);if(fe===null){if(ne===null)throw E(U);fe=X+ne}var me=new v.default(X-x,fe-x,W);me.id=Object(d.generateCueId)(me.startTime,me.endTime,me.text);var Ae=B[U.getAttribute("region")],De=H[U.getAttribute("style")];me.position=10,me.size=80;var ye=t(Ae,De),Oe=ye.textAlign;if(Oe){var xe=o[Oe];xe&&(me.lineAlign=xe),me.align=Oe}return l(me,ye),me}).filter(function(U){return U!==null})}function s(C,x,y){var _=C.getElementsByTagName(x)[0];return _?[].slice.call(_.querySelectorAll(y)):[]}function r(C){return C.reduce(function(x,y){var _=y.getAttribute("xml:id");return _&&(x[_]=y),x},{})}function a(C,x){return[].slice.call(C.childNodes).reduce(function(y,_,M){var I;return _.nodeName==="br"&&M?y+`
|
|
|
`:(I=_.childNodes)!==null&&I!==void 0&&I.length?a(_,x):x?y+_.textContent.trim().replace(/\s+/g," "):y+_.textContent},"")}function t(C,x){var y="http://www.w3.org/ns/ttml#styling",_=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return _.reduce(function(M,I){var N=w(x,y,I)||w(C,y,I);return N&&(M[I]=N),M},{})}function w(C,x,y){return C.hasAttributeNS(x,y)?C.getAttributeNS(x,y):null}function E(C){return new Error("Could not parse ttml timestamp "+C)}function f(C,x){if(!C)return null;var y=Object(p.parseTimeStamp)(C);return y===null&&(c.test(C)?y=k(C,x):u.test(C)&&(y=O(C,x))),y}function k(C,x){var y=c.exec(C),_=(y[4]|0)+(y[5]|0)/x.subFrameRate;return(y[1]|0)*3600+(y[2]|0)*60+(y[3]|0)+_/x.frameRate}function O(C,x){var y=u.exec(C),_=Number(y[1]),M=y[2];switch(M){case"h":return _*3600;case"m":return _*60;case"ms":return _*1e3;case"f":return _/x.frameRate;case"t":return _/x.tickRate}return _}},"./src/utils/logger.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"enableLogs",function(){return d}),T.d(g,"logger",function(){return l});var P=function(){},p={trace:P,debug:P,log:P,warn:P,info:P,error:P},v=p;function S(n){var c=self.console[n];return c?c.bind(self.console,"["+n+"] >"):P}function b(n){for(var c=arguments.length,u=new Array(c>1?c-1:0),o=1;o<c;o++)u[o-1]=arguments[o];u.forEach(function(h){v[h]=n[h]?n[h].bind(n):S(h)})}function d(n){if(self.console&&n===!0||typeof n=="object"){b(n,"debug","log","info","warn","error");try{v.log()}catch(c){v=p}}else v=p}var l=v},"./src/utils/mediakeys-helper.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"KeySystems",function(){return P}),T.d(g,"requestMediaKeySystemAccess",function(){return p});var P;(function(v){v.WIDEVINE="com.widevine.alpha",v.PLAYREADY="com.microsoft.playready"})(P||(P={}));var p=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"getMediaSource",function(){return P});function P(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"bin2str",function(){return b}),T.d(g,"readUint16",function(){return d}),T.d(g,"readUint32",function(){return l}),T.d(g,"writeUint32",function(){return n}),T.d(g,"findBox",function(){return c}),T.d(g,"parseSegmentIndex",function(){return u}),T.d(g,"parseInitSegment",function(){return o}),T.d(g,"getStartDTS",function(){return h}),T.d(g,"getDuration",function(){return m}),T.d(g,"computeRawDurationFromSamples",function(){return s}),T.d(g,"offsetStartDTS",function(){return r}),T.d(g,"segmentValidRange",function(){return a}),T.d(g,"appendUint8Array",function(){return t});var P=T("./src/utils/typed-array.ts"),p=T("./src/loader/fragment.ts"),v=Math.pow(2,32)-1,S=[].push;function b(w){return String.fromCharCode.apply(null,w)}function d(w,E){"data"in w&&(E+=w.start,w=w.data);var f=w[E]<<8|w[E+1];return f<0?65536+f:f}function l(w,E){"data"in w&&(E+=w.start,w=w.data);var f=w[E]<<24|w[E+1]<<16|w[E+2]<<8|w[E+3];return f<0?4294967296+f:f}function n(w,E,f){"data"in w&&(E+=w.start,w=w.data),w[E]=f>>24,w[E+1]=f>>16&255,w[E+2]=f>>8&255,w[E+3]=f&255}function c(w,E){var f=[];if(!E.length)return f;var k,O,C;"data"in w?(k=w.data,O=w.start,C=w.end):(k=w,O=0,C=k.byteLength);for(var x=O;x<C;){var y=l(k,x),_=b(k.subarray(x+4,x+8)),M=y>1?x+y:C;if(_===E[0])if(E.length===1)f.push({data:k,start:x+8,end:M});else{var I=c({data:k,start:x+8,end:M},E.slice(1));I.length&&S.apply(f,I)}x=M}return f}function u(w){var E=c(w,["moov"]),f=E[0],k=f?f.end:null,O=c(w,["sidx"]);if(!O||!O[0])return null;var C=[],x=O[0],y=x.data[0],_=y===0?8:16,M=l(x,_);_+=4;var I=0,N=0;y===0?_+=8:_+=16,_+=2;var G=x.end+N,H=d(x,_);_+=2;for(var B=0;B<H;B++){var K=_,U=l(x,K);K+=4;var W=U&2147483647,X=(U&2147483648)>>>31;if(X===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ne=l(x,K);K+=4,C.push({referenceSize:W,subsegmentDuration:ne,info:{duration:ne/M,start:G,end:G+W-1}}),G+=W,K+=4,_=K}return{earliestPresentationTime:I,timescale:M,version:y,referencesCount:H,references:C,moovEndOffset:k}}function o(w){for(var E=[],f=c(w,["moov","trak"]),k=0;k<f.length;k++){var O=f[k],C=c(O,["tkhd"])[0];if(C){var x=C.data[C.start],y=x===0?12:20,_=l(C,y),M=c(O,["mdia","mdhd"])[0];if(M){x=M.data[M.start],y=x===0?12:20;var I=l(M,y),N=c(O,["mdia","hdlr"])[0];if(N){var G=b(N.data.subarray(N.start+8,N.start+12)),H={soun:p.ElementaryStreamTypes.AUDIO,vide:p.ElementaryStreamTypes.VIDEO}[G];if(H){var B=c(O,["mdia","minf","stbl","stsd"])[0],K=void 0;B&&(K=b(B.data.subarray(B.start+12,B.start+16))),E[_]={timescale:I,type:H},E[H]={timescale:I,id:_,codec:K}}}}}}var U=c(w,["moov","mvex","trex"]);return U.forEach(function(W){var X=l(W,4),ne=E[X];ne&&(ne.default={duration:l(W,12),flags:l(W,20)})}),E}function h(w,E){return c(E,["moof","traf"]).reduce(function(f,k){var O=c(k,["tfdt"])[0],C=O.data[O.start],x=c(k,["tfhd"]).reduce(function(y,_){var M=l(_,4),I=w[M];if(I){var N=l(O,4);C===1&&(N*=Math.pow(2,32),N+=l(O,8));var G=I.timescale||9e4,H=N/G;if(isFinite(H)&&(y===null||H<y))return H}return y},null);return x!==null&&isFinite(x)&&(f===null||x<f)?x:f},null)||0}function m(w,E){for(var f=0,k=0,O=0,C=c(w,["moof","traf"]),x=0;x<C.length;x++){var y=C[x],_=c(y,["tfhd"])[0],M=l(_,4),I=E[M];if(!I)continue;var N=I.default,G=l(_,0)|(N==null?void 0:N.flags),H=N==null?void 0:N.duration;G&8&&(G&2?H=l(_,12):H=l(_,8));for(var B=I.timescale||9e4,K=c(y,["trun"]),U=0;U<K.length;U++){if(H){var W=l(K[U],4);f=H*W}else f=s(K[U]);I.type===p.ElementaryStreamTypes.VIDEO?k+=f/B:I.type===p.ElementaryStreamTypes.AUDIO&&(O+=f/B)}}if(k===0&&O===0){var X=u(w);if(X!=null&&X.references)return X.references.reduce(function(ne,fe){return ne+fe.info.duration||0},0)}return k||O}function s(w){var E=l(w,0),f=8;E&1&&(f+=4),E&4&&(f+=4);for(var k=0,O=l(w,4),C=0;C<O;C++){if(E&256){var x=l(w,f);k+=x,f+=4}E&512&&(f+=4),E&1024&&(f+=4),E&2048&&(f+=4)}return k}function r(w,E,f){c(E,["moof","traf"]).forEach(function(k){c(k,["tfhd"]).forEach(function(O){var C=l(O,4),x=w[C];if(!x)return;var y=x.timescale||9e4;c(k,["tfdt"]).forEach(function(_){var M=_.data[_.start],I=l(_,4);if(M===0)n(_,4,I-f*y);else{I*=Math.pow(2,32),I+=l(_,8),I-=f*y,I=Math.max(I,0);var N=Math.floor(I/(v+1)),G=Math.floor(I%(v+1));n(_,4,N),n(_,8,G)}})})})}function a(w){var E={valid:null,remainder:null},f=c(w,["moof"]);if(f){if(f.length<2)return E.remainder=w,E}else return E;var k=f[f.length-1];return E.valid=Object(P.sliceUint8)(w,0,k.start-8),E.remainder=Object(P.sliceUint8)(w,k.start-8),E}function t(w,E){var f=new Uint8Array(w.length+E.length);return f.set(w),f.set(E,w.length),f}},"./src/utils/output-filter.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"default",function(){return P});var P=function(){function p(S,b){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=S,this.trackName=b}var v=p.prototype;return v.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},v.newCue=function(b,d,l){(this.startTime===null||this.startTime>b)&&(this.startTime=b),this.endTime=d,this.screen=l,this.timelineController.createCaptionsTrack(this.trackName)},v.reset=function(){this.cueRanges=[]},p}()},"./src/utils/texttrack-utils.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"sendAddTrackEvent",function(){return p}),T.d(g,"addCueToTrack",function(){return v}),T.d(g,"clearCurrentCues",function(){return S}),T.d(g,"removeCuesInRange",function(){return b}),T.d(g,"getCuesInRange",function(){return l});var P=T("./src/utils/logger.ts");function p(n,c){var u;try{u=new Event("addtrack")}catch(o){u=document.createEvent("Event"),u.initEvent("addtrack",!1,!1)}u.track=n,c.dispatchEvent(u)}function v(n,c){var u=n.mode;if(u==="disabled"&&(n.mode="hidden"),n.cues&&!n.cues.getCueById(c.id))try{if(n.addCue(c),!n.cues.getCueById(c.id))throw new Error("addCue is failed for: "+c)}catch(h){P.logger.debug("[texttrack-utils]: "+h);var o=new self.TextTrackCue(c.startTime,c.endTime,c.text);o.id=c.id,n.addCue(o)}u==="disabled"&&(n.mode=u)}function S(n){var c=n.mode;if(c==="disabled"&&(n.mode="hidden"),n.cues)for(var u=n.cues.length;u--;)n.removeCue(n.cues[u]);c==="disabled"&&(n.mode=c)}function b(n,c,u){var o=n.mode;if(o==="disabled"&&(n.mode="hidden"),n.cues&&n.cues.length>0)for(var h=l(n.cues,c,u),m=0;m<h.length;m++)n.removeCue(h[m]);o==="disabled"&&(n.mode=o)}function d(n,c){if(c<n[0].startTime)return 0;var u=n.length-1;if(c>n[u].endTime)return-1;for(var o=0,h=u;o<=h;){var m=Math.floor((h+o)/2);if(c<n[m].startTime)h=m-1;else if(c>n[m].startTime&&o<u)o=m+1;else return m}return n[o].startTime-c<c-n[h].startTime?o:h}function l(n,c,u){var o=[],h=d(n,c);if(h>-1)for(var m=h,s=n.length;m<s;m++){var r=n[m];if(r.startTime>=c&&r.endTime<=u)o.push(r);else if(r.startTime>u)return o}return o}},"./src/utils/time-ranges.ts":function(L,g,T){"use strict";T.r(g);var P={toString:function(v){for(var S="",b=v.length,d=0;d<b;d++)S+="["+v.start(d).toFixed(3)+","+v.end(d).toFixed(3)+"]";return S}};g.default=P},"./src/utils/timescale-conversion.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"toTimescaleFromBase",function(){return p}),T.d(g,"toTimescaleFromScale",function(){return v}),T.d(g,"toMsFromMpegTsClock",function(){return S}),T.d(g,"toMpegTsClockFromTimescale",function(){return b});var P=9e4;function p(d,l,n,c){n===void 0&&(n=1),c===void 0&&(c=!1);var u=d*l*n;return c?Math.round(u):u}function v(d,l,n,c){return n===void 0&&(n=1),c===void 0&&(c=!1),p(d,l,1/n,c)}function S(d,l){return l===void 0&&(l=!1),p(d,1e3,1/P,l)}function b(d,l){return l===void 0&&(l=1),p(d,P,1/l)}},"./src/utils/typed-array.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"sliceUint8",function(){return P});function P(p,v,S){return Uint8Array.prototype.slice?p.slice(v,S):new Uint8Array(Array.prototype.slice.call(p,v,S))}},"./src/utils/vttcue.ts":function(L,g,T){"use strict";T.r(g),g.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var P=["","lr","rl"],p=["start","middle","end","left","right"];function v(n,c){if(typeof c!="string")return!1;if(!Array.isArray(n))return!1;var u=c.toLowerCase();return~n.indexOf(u)?u:!1}function S(n){return v(P,n)}function b(n){return v(p,n)}function d(n){for(var c=arguments.length,u=new Array(c>1?c-1:0),o=1;o<c;o++)u[o-1]=arguments[o];for(var h=1;h<arguments.length;h++){var m=arguments[h];for(var s in m)n[s]=m[s]}return n}function l(n,c,u){var o=this,h={enumerable:!0};o.hasBeenReset=!1;var m="",s=!1,r=n,a=c,t=u,w=null,E="",f=!0,k="auto",O="start",C=50,x="middle",y=50,_="middle";Object.defineProperty(o,"id",d({},h,{get:function(){return m},set:function(I){m=""+I}})),Object.defineProperty(o,"pauseOnExit",d({},h,{get:function(){return s},set:function(I){s=!!I}})),Object.defineProperty(o,"startTime",d({},h,{get:function(){return r},set:function(I){if(typeof I!="number")throw new TypeError("Start time must be set to a number.");r=I,this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",d({},h,{get:function(){return a},set:function(I){if(typeof I!="number")throw new TypeError("End time must be set to a number.");a=I,this.hasBeenReset=!0}})),Object.defineProperty(o,"text",d({},h,{get:function(){return t},set:function(I){t=""+I,this.hasBeenReset=!0}})),Object.defineProperty(o,"region",d({},h,{get:function(){return w},set:function(I){w=I,this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",d({},h,{get:function(){return E},set:function(I){var N=S(I);if(N===!1)throw new SyntaxError("An invalid or illegal string was specified.");E=N,this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",d({},h,{get:function(){return f},set:function(I){f=!!I,this.hasBeenReset=!0}})),Object.defineProperty(o,"line",d({},h,{get:function(){return k},set:function(I){if(typeof I!="number"&&I!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");k=I,this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",d({},h,{get:function(){return O},set:function(I){var N=b(I);if(!N)throw new SyntaxError("An invalid or illegal string was specified.");O=N,this.hasBeenReset=!0}})),Object.defineProperty(o,"position",d({},h,{get:function(){return C},set:function(I){if(I<0||I>100)throw new Error("Position must be between 0 and 100.");C=I,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",d({},h,{get:function(){return x},set:function(I){var N=b(I);if(!N)throw new SyntaxError("An invalid or illegal string was specified.");x=N,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",d({},h,{get:function(){return y},set:function(I){if(I<0||I>100)throw new Error("Size must be between 0 and 100.");y=I,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",d({},h,{get:function(){return _},set:function(I){var N=b(I);if(!N)throw new SyntaxError("An invalid or illegal string was specified.");_=N,this.hasBeenReset=!0}})),o.displayState=void 0}return l.prototype.getCueAsHTML=function(){var n=self.WebVTT;return n.convertCueToDOMTree(self,this.text)},l}()},"./src/utils/vttparser.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"parseTimeStamp",function(){return v}),T.d(g,"fixLineBreaks",function(){return c}),T.d(g,"VTTParser",function(){return u});var P=T("./src/utils/vttcue.ts"),p=function(){function o(){}var h=o.prototype;return h.decode=function(s,r){if(!s)return"";if(typeof s!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(s))},o}();function v(o){function h(s,r,a,t){return(s|0)*3600+(r|0)*60+(a|0)+parseFloat(t||0)}var m=o.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return m?parseFloat(m[2])>59?h(m[2],m[3],0,m[4]):h(m[1],m[2],m[3],m[4]):null}var S=function(){function o(){this.values=Object.create(null)}var h=o.prototype;return h.set=function(s,r){!this.get(s)&&r!==""&&(this.values[s]=r)},h.get=function(s,r,a){return a?this.has(s)?this.values[s]:r[a]:this.has(s)?this.values[s]:r},h.has=function(s){return s in this.values},h.alt=function(s,r,a){for(var t=0;t<a.length;++t)if(r===a[t]){this.set(s,r);break}},h.integer=function(s,r){/^-?\d+$/.test(r)&&this.set(s,parseInt(r,10))},h.percent=function(s,r){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(r)){var a=parseFloat(r);if(a>=0&&a<=100)return this.set(s,a),!0}return!1},o}();function b(o,h,m,s){var r=s?o.split(s):[o];for(var a in r){if(typeof r[a]!="string")continue;var t=r[a].split(m);if(t.length!==2)continue;var w=t[0],E=t[1];h(w,E)}}var d=new P.default(0,0,""),l=d.align==="middle"?"middle":"center";function n(o,h,m){var s=o;function r(){var w=v(o);if(w===null)throw new Error("Malformed timestamp: "+s);return o=o.replace(/^[^\sa-zA-Z-]+/,""),w}function a(w,E){var f=new S;b(w,function(C,x){var y;switch(C){case"region":for(var _=m.length-1;_>=0;_--)if(m[_].id===x){f.set(C,m[_].region);break}break;case"vertical":f.alt(C,x,["rl","lr"]);break;case"line":y=x.split(","),f.integer(C,y[0]),f.percent(C,y[0])&&f.set("snapToLines",!1),f.alt(C,y[0],["auto"]),y.length===2&&f.alt("lineAlign",y[1],["start",l,"end"]);break;case"position":y=x.split(","),f.percent(C,y[0]),y.length===2&&f.alt("positionAlign",y[1],["start",l,"end","line-left","line-right","auto"]);break;case"size":f.percent(C,x);break;case"align":f.alt(C,x,["start",l,"end","left","right"]);break}},/:/,/\s/),E.region=f.get("region",null),E.vertical=f.get("vertical","");var k=f.get("line","auto");k==="auto"&&d.line===-1&&(k=-1),E.line=k,E.lineAlign=f.get("lineAlign","start"),E.snapToLines=f.get("snapToLines",!0),E.size=f.get("size",100),E.align=f.get("align",l);var O=f.get("position","auto");O==="auto"&&d.position===50&&(O=E.align==="start"||E.align==="left"?0:E.align==="end"||E.align==="right"?100:50),E.position=O}function t(){o=o.replace(/^\s+/,"")}if(t(),h.startTime=r(),t(),o.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+s);o=o.substr(3),t(),h.endTime=r(),t(),a(o,h)}function c(o){return o.replace(/<br(?: \/)?>/gi,`
|
|
|
`)}var u=function(){function o(){this.state="INITIAL",this.buffer="",this.decoder=new p,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var h=o.prototype;return h.parse=function(s){var r=this;s&&(r.buffer+=r.decoder.decode(s,{stream:!0}));function a(){var O=r.buffer,C=0;for(O=c(O);C<O.length&&O[C]!=="\r"&&O[C]!==`
|
|
|
`;)++C;var x=O.substr(0,C);return O[C]==="\r"&&++C,O[C]===`
|
|
|
`&&++C,r.buffer=O.substr(C),x}function t(O){b(O,function(C,x){},/:/)}try{var w="";if(r.state==="INITIAL"){if(!/\r\n|\n/.test(r.buffer))return this;w=a();var E=w.match(/^()?WEBVTT([ \t].*)?$/);if(!E||!E[0])throw new Error("Malformed WebVTT signature.");r.state="HEADER"}for(var f=!1;r.buffer;){if(!/\r\n|\n/.test(r.buffer))return this;f?f=!1:w=a();switch(r.state){case"HEADER":/:/.test(w)?t(w):w||(r.state="ID");continue;case"NOTE":w||(r.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(w)){r.state="NOTE";break}if(!w)continue;if(r.cue=new P.default(0,0,""),r.state="CUE",w.indexOf("-->")===-1){r.cue.id=w;continue}case"CUE":if(!r.cue){r.state="BADCUE";continue}try{n(w,r.cue,r.regionList)}catch(O){r.cue=null,r.state="BADCUE";continue}r.state="CUETEXT";continue;case"CUETEXT":{var k=w.indexOf("-->")!==-1;if(!w||k&&(f=!0)){r.oncue&&r.cue&&r.oncue(r.cue),r.cue=null,r.state="ID";continue}if(r.cue===null)continue;r.cue.text&&(r.cue.text+=`
|
|
|
`),r.cue.text+=w}continue;case"BADCUE":w||(r.state="ID")}}}catch(O){r.state==="CUETEXT"&&r.cue&&r.oncue&&r.oncue(r.cue),r.cue=null,r.state=r.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},h.flush=function(){var s=this;try{if((s.cue||s.state==="HEADER")&&(s.buffer+=`
|
|
|
|
|
|
`,s.parse()),s.state==="INITIAL"||s.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(r){s.onparsingerror&&s.onparsingerror(r)}return s.onflush&&s.onflush(),this},o}()},"./src/utils/webvtt-parser.ts":function(L,g,T){"use strict";T.r(g),T.d(g,"generateCueId",function(){return u}),T.d(g,"parseWebVTT",function(){return h});var P=T("./src/polyfills/number.ts"),p=T("./src/utils/vttparser.ts"),v=T("./src/demux/id3.ts"),S=T("./src/utils/timescale-conversion.ts"),b=T("./src/remux/mp4-remuxer.ts"),d=/\r\n|\n\r|\n|\r/g,l=function(s,r,a){return a===void 0&&(a=0),s.substr(a,r.length)===r},n=function(s){var r=parseInt(s.substr(-3)),a=parseInt(s.substr(-6,2)),t=parseInt(s.substr(-9,2)),w=s.length>9?parseInt(s.substr(0,s.indexOf(":"))):0;if(!Object(P.isFiniteNumber)(r)||!Object(P.isFiniteNumber)(a)||!Object(P.isFiniteNumber)(t)||!Object(P.isFiniteNumber)(w))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+s);return r+=1e3*a,r+=60*1e3*t,r+=60*60*1e3*w,r},c=function(s){for(var r=5381,a=s.length;a;)r=r*33^s.charCodeAt(--a);return(r>>>0).toString()};function u(m,s,r){return c(m.toString())+c(s.toString())+c(r)}var o=function(s,r,a){var t=s[r],w=s[t.prevCC];if(!w||!w.new&&t.new){s.ccOffset=s.presentationOffset=t.start,t.new=!1;return}for(;(E=w)!==null&&E!==void 0&&E.new;){var E;s.ccOffset+=t.start-w.start,t.new=!1,t=w,w=s[t.prevCC]}s.presentationOffset=a};function h(m,s,r,a,t,w,E,f){var k=new p.VTTParser,O=Object(v.utf8ArrayToStr)(new Uint8Array(m)).trim().replace(d,`
|
|
|
`).split(`
|
|
|
`),C=[],x=Object(S.toMpegTsClockFromTimescale)(s,r),y="00:00.000",_=0,M=0,I,N=!0,G=!1;k.oncue=function(H){var B=a[t],K=a.ccOffset,U=(_-x)/9e4;if(B!=null&&B.new&&(M!==void 0?K=a.ccOffset=B.start:o(a,t,U)),U&&(K=U-a.presentationOffset),G){var W=H.endTime-H.startTime,X=Object(b.normalizePts)((H.startTime+K-M)*9e4,w*9e4)/9e4;H.startTime=X,H.endTime=X+W}var ne=H.text.trim();H.text=decodeURIComponent(encodeURIComponent(ne)),H.id||(H.id=u(H.startTime,H.endTime,ne)),H.endTime>0&&C.push(H)},k.onparsingerror=function(H){I=H},k.onflush=function(){if(I){f(I);return}E(C)},O.forEach(function(H){if(N)if(l(H,"X-TIMESTAMP-MAP=")){N=!1,G=!0,H.substr(16).split(",").forEach(function(B){l(B,"LOCAL:")?y=B.substr(6):l(B,"MPEGTS:")&&(_=parseInt(B.substr(7)))});try{M=n(y)/1e3}catch(B){G=!1,I=B}return}else H===""&&(N=!1);k.parse(H+`
|
|
|
`)}),k.flush()}},"./src/utils/xhr-loader.ts":function(L,g,T){"use strict";T.r(g);var P=T("./src/utils/logger.ts"),p=T("./src/loader/load-stats.ts"),v=/^age:\s*[\d.]+\s*$/m,S=function(){function b(l){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=l?l.xhrSetup:null,this.stats=new p.LoadStats,this.retryDelay=0}var d=b.prototype;return d.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},d.abortInternal=function(){var n=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),n&&(n.onreadystatechange=null,n.onprogress=null,n.readyState!==4&&(this.stats.aborted=!0,n.abort()))},d.abort=function(){var n;this.abortInternal(),(n=this.callbacks)!==null&&n!==void 0&&n.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},d.load=function(n,c,u){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=n,this.config=c,this.callbacks=u,this.retryDelay=c.retryDelay,this.loadInternal()},d.loadInternal=function(){var n=this.config,c=this.context;if(!n)return;var u=this.loader=new self.XMLHttpRequest,o=this.stats;o.loading.first=0,o.loaded=0;var h=this.xhrSetup;try{if(h)try{h(u,c.url)}catch(r){u.open("GET",c.url,!0),h(u,c.url)}u.readyState||u.open("GET",c.url,!0);var m=this.context.headers;if(m)for(var s in m)u.setRequestHeader(s,m[s])}catch(r){this.callbacks.onError({code:u.status,text:r.message},c,u);return}c.rangeEnd&&u.setRequestHeader("Range","bytes="+c.rangeStart+"-"+(c.rangeEnd-1)),u.onreadystatechange=this.readystatechange.bind(this),u.onprogress=this.loadprogress.bind(this),u.responseType=c.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),u.send()},d.readystatechange=function(){var n=this.context,c=this.loader,u=this.stats;if(!n||!c)return;var o=c.readyState,h=this.config;if(u.aborted)return;if(o>=2)if(self.clearTimeout(this.requestTimeout),u.loading.first===0&&(u.loading.first=Math.max(self.performance.now(),u.loading.start)),o===4){c.onreadystatechange=null,c.onprogress=null;var m=c.status;if(m>=200&&m<300){u.loading.end=Math.max(self.performance.now(),u.loading.first);var s,r;if(n.responseType==="arraybuffer"?(s=c.response,r=s.byteLength):(s=c.responseText,r=s.length),u.loaded=u.total=r,!this.callbacks)return;var a=this.callbacks.onProgress;if(a&&a(u,n,s,c),!this.callbacks)return;var t={url:c.responseURL,data:s};this.callbacks.onSuccess(t,u,n,c)}else u.retry>=h.maxRetry||m>=400&&m<499?(P.logger.error(m+" while loading "+n.url),this.callbacks.onError({code:m,text:c.statusText},n,c)):(P.logger.warn(m+" while loading "+n.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,h.maxRetryDelay),u.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),h.timeout)},d.loadtimeout=function(){P.logger.warn("timeout while loading "+this.context.url);var n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))},d.loadprogress=function(n){var c=this.stats;c.loaded=n.loaded,n.lengthComputable&&(c.total=n.total)},d.getCacheAge=function(){var n=null;if(this.loader&&v.test(this.loader.getAllResponseHeaders())){var c=this.loader.getResponseHeader("age");n=c?parseFloat(c):null}return n},b}();g.default=S}}).default})},vHTk:function(j,Y,D){j.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.StreamCipher,p=g.algo,v=p.RC4=P.extend({_doReset:function(){for(var d=this._key,l=d.words,n=d.sigBytes,c=this._S=[],u=0;u<256;u++)c[u]=u;for(var u=0,o=0;u<256;u++){var h=u%n,m=l[h>>>2]>>>24-h%4*8&255;o=(o+c[u]+m)%256;var s=c[u];c[u]=c[o],c[o]=s}this._i=this._j=0},_doProcessBlock:function(d,l){d[l]^=S.call(this)},keySize:256/32,ivSize:0});function S(){for(var d=this._S,l=this._i,n=this._j,c=0,u=0;u<4;u++){l=(l+1)%256,n=(n+d[l])%256;var o=d[l];d[l]=d[n],d[n]=o,c|=d[(d[l]+d[n])%256]<<24-u*8}return this._i=l,this._j=n,c}g.RC4=P._createHelper(v);var b=p.RC4Drop=v.extend({cfg:v.cfg.extend({drop:192}),_doReset:function(){v._doReset.call(this);for(var d=this.cfg.drop;d>0;d--)S.call(this)}});g.RC4Drop=P._createHelper(b)}(),L.RC4})},wCXF:function(j,Y,D){"use strict";D.d(Y,"a",function(){return nt});var L=D("rePB"),g=D("VTBJ"),T=D("KQm4"),P=D("U8pU"),p=D("ODXe"),v=D("q1tI"),S=D("TSYQ"),b=D.n(S),d=D("Gytx"),l=D.n(d),n=D("Kwbf"),c=D("t23M"),u=D("qx4F"),o=D("6eGT"),h=D("IBYe"),m=D("Ff2n"),s=D("c+Xe"),r=D("fyJ8"),a=D("biw7");function t(He,Re,tt,ft,Qe){var lt=tt[He]||{},Ue=tt[Re]||{},Le,Ie;lt.fixed==="left"?Le=ft.left[He]:Ue.fixed==="right"&&(Ie=ft.right[Re]);var Ce=!1,Se=!1,ke=!1,Ne=!1,et=tt[Re+1],$e=tt[He-1];if(Qe==="rtl"){if(Le!==void 0){var bt=$e&&$e.fixed==="left";Ne=!bt}else if(Ie!==void 0){var gt=et&&et.fixed==="right";ke=!gt}}else if(Le!==void 0){var Ut=et&&et.fixed==="left";Ce=!Ut}else if(Ie!==void 0){var Nt=$e&&$e.fixed==="right";Se=!Nt}return{fixLeft:Le,fixRight:Ie,lastFixLeft:Ce,firstFixRight:Se,lastFixRight:ke,firstFixLeft:Ne,isSticky:ft.isSticky}}var w=D("sR1s");function E(He){var Re=He.cells,tt=He.stickyOffsets,ft=He.flattenColumns,Qe=He.rowComponent,lt=He.cellComponent,Ue=He.onHeaderRow,Le=He.index,Ie=v.useContext(a.a),Ce=Ie.prefixCls,Se=Ie.direction,ke;Ue&&(ke=Ue(Re.map(function(et){return et.column}),Le));var Ne=Object(w.a)(Re.map(function(et){return et.column}));return v.createElement(Qe,Object.assign({},ke),Re.map(function(et,$e){var bt=et.column,gt=t(et.colStart,et.colEnd,ft,tt,Se),Ut;return bt&&bt.onHeaderCell&&(Ut=et.column.onHeaderCell(bt)),v.createElement(r.a,Object.assign({},et,{ellipsis:bt.ellipsis,align:bt.align,component:lt,prefixCls:Ce,key:Ne[$e]},gt,{additionalProps:Ut,rowType:"header"}))}))}E.displayName="HeaderRow";var f=E;function k(He){var Re=[];function tt(Ue,Le){var Ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Re[Ie]=Re[Ie]||[];var Ce=Le,Se=Ue.filter(Boolean).map(function(ke){var Ne={key:ke.key,className:ke.className||"",children:ke.title,column:ke,colStart:Ce},et=1,$e=ke.children;return $e&&$e.length>0&&(et=tt($e,Ce,Ie+1).reduce(function(bt,gt){return bt+gt},0),Ne.hasSubColumns=!0),"colSpan"in ke&&(et=ke.colSpan),"rowSpan"in ke&&(Ne.rowSpan=ke.rowSpan),Ne.colSpan=et,Ne.colEnd=Ne.colStart+et-1,Re[Ie].push(Ne),Ce+=et,et});return Se}tt(He,0);for(var ft=Re.length,Qe=function(Le){Re[Le].forEach(function(Ie){!("rowSpan"in Ie)&&!Ie.hasSubColumns&&(Ie.rowSpan=ft-Le)})},lt=0;lt<ft;lt+=1)Qe(lt);return Re}function O(He){var Re=He.stickyOffsets,tt=He.columns,ft=He.flattenColumns,Qe=He.onHeaderRow,lt=v.useContext(a.a),Ue=lt.prefixCls,Le=lt.getComponent,Ie=v.useMemo(function(){return k(tt)},[tt]),Ce=Le(["header","wrapper"],"thead"),Se=Le(["header","row"],"tr"),ke=Le(["header","cell"],"th");return v.createElement(Ce,{className:"".concat(Ue,"-thead")},Ie.map(function(Ne,et){var $e=v.createElement(f,{key:et,flattenColumns:ft,cells:Ne,stickyOffsets:Re,rowComponent:Se,cellComponent:ke,onHeaderRow:Qe,index:et});return $e}))}var C=O,x=D("hW8S");function y(He){for(var Re=He.colWidths,tt=He.columns,ft=He.columCount,Qe=[],lt=ft||tt.length,Ue=!1,Le=lt-1;Le>=0;Le-=1){var Ie=Re[Le],Ce=tt&&tt[Le],Se=Ce&&Ce[x.a];(Ie||Se||Ue)&&(Qe.unshift(v.createElement("col",Object.assign({key:Le,style:{width:Ie,minWidth:Ie}},Se))),Ue=!0)}return v.createElement("colgroup",null,Qe)}var _=y;function M(He,Re){return Object(v.useMemo)(function(){for(var tt=[],ft=0;ft<Re;ft+=1){var Qe=He[ft];if(Qe!==void 0)tt[ft]=Qe;else return null}return tt},[He.join("_"),Re])}var I=v.forwardRef(function(He,Re){var tt=He.noData,ft=He.columns,Qe=He.flattenColumns,lt=He.colWidths,Ue=He.columCount,Le=He.stickyOffsets,Ie=He.direction,Ce=He.fixHeader,Se=He.offsetHeader,ke=He.stickyClassName,Ne=He.onScroll,et=Object(m.a)(He,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),$e=v.useContext(a.a),bt=$e.prefixCls,gt=$e.scrollbarSize,Ut=$e.isSticky,Nt=Ut&&!Ce?0:gt,hr=v.useRef(null),mr=v.useCallback(function(vn){Object(s.b)(Re,vn),Object(s.b)(hr,vn)},[]);v.useEffect(function(){var vn;function mn(Kt){var or=Kt.currentTarget,Xt=Kt.deltaX;Xt&&(Ne({currentTarget:or,scrollLeft:or.scrollLeft+Xt}),Kt.preventDefault())}return(vn=hr.current)===null||vn===void 0||vn.addEventListener("wheel",mn),function(){var Kt;(Kt=hr.current)===null||Kt===void 0||Kt.removeEventListener("wheel",mn)}},[]);var St=Qe[Qe.length-1],Yr={fixed:St?St.fixed:null,onHeaderCell:function(){return{className:"".concat(bt,"-cell-scrollbar")}}},Jr=Object(v.useMemo)(function(){return Nt?[].concat(Object(T.a)(ft),[Yr]):ft},[Nt,ft]),Hr=Object(v.useMemo)(function(){return Nt?[].concat(Object(T.a)(Qe),[Yr]):Qe},[Nt,Qe]),un=Object(v.useMemo)(function(){var vn=Le.right,mn=Le.left;return Object(g.a)(Object(g.a)({},Le),{},{left:Ie==="rtl"?[].concat(Object(T.a)(mn.map(function(Kt){return Kt+Nt})),[0]):mn,right:Ie==="rtl"?vn:[].concat(Object(T.a)(vn.map(function(Kt){return Kt+Nt})),[0]),isSticky:Ut})},[Nt,Le,Ut]),Ar=M(lt,Ue);return v.createElement("div",{style:Object(g.a)({overflow:"hidden"},Ut?{top:Se}:{}),ref:mr,className:b()("".concat(bt,"-header"),Object(L.a)({},ke,!!ke))},v.createElement("table",{style:{tableLayout:"fixed",visibility:tt||Ar?null:"hidden"}},v.createElement(_,{colWidths:Ar?[].concat(Object(T.a)(Ar),[Nt]):[],columCount:Ue+1,columns:Hr}),v.createElement(C,Object.assign({},et,{stickyOffsets:un,columns:Jr,flattenColumns:Hr}))))});I.displayName="FixedHeader";var N=I,G=v.createContext(null),H=G;function B(He){var Re=He.prefixCls,tt=He.children,ft=He.component,Qe=He.cellComponent,lt=He.fixHeader,Ue=He.fixColumn,Le=He.horizonScroll,Ie=He.className,Ce=He.expanded,Se=He.componentWidth,ke=He.colSpan,Ne=v.useContext(a.a),et=Ne.scrollbarSize;return v.useMemo(function(){var $e=tt;return Ue&&($e=v.createElement("div",{style:{width:Se-(lt?et:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Re,"-expanded-row-fixed")},$e)),v.createElement(ft,{className:Ie,style:{display:Ce?null:"none"}},v.createElement(r.a,{component:Qe,prefixCls:Re,colSpan:ke},$e))},[tt,ft,lt,Le,Ie,Ce,Se,ke,et])}var K=B;function U(He){var Re=He.className,tt=He.style,ft=He.record,Qe=He.index,lt=He.rowKey,Ue=He.getRowKey,Le=He.rowExpandable,Ie=He.expandedKeys,Ce=He.onRow,Se=He.indent,ke=Se===void 0?0:Se,Ne=He.rowComponent,et=He.cellComponent,$e=He.childrenColumnName,bt=v.useContext(a.a),gt=bt.prefixCls,Ut=bt.fixedInfoList,Nt=v.useContext(H),hr=Nt.fixHeader,mr=Nt.fixColumn,St=Nt.horizonScroll,Yr=Nt.componentWidth,Jr=Nt.flattenColumns,Hr=Nt.expandableType,un=Nt.expandRowByClick,Ar=Nt.onTriggerExpand,vn=Nt.rowClassName,mn=Nt.expandedRowClassName,Kt=Nt.indentSize,or=Nt.expandIcon,Xt=Nt.expandedRowRender,gr=Nt.expandIconColumnIndex,Xr=v.useState(!1),kn=Object(p.a)(Xr,2),Ln=kn[0],tn=kn[1],ur=Ie&&Ie.has(He.recordKey);v.useEffect(function(){ur&&tn(!0)},[ur]);var Xn=Hr==="row"&&(!Le||Le(ft)),hi=Hr==="nest",$n=$e&&ft&&ft[$e],Zr=Xn||hi,Bn;Ce&&(Bn=Ce(ft,Qe));var si=function(z){if(un&&Zr&&Ar(ft,z),Bn&&Bn.onClick){for(var $,ie=arguments.length,de=new Array(ie>1?ie-1:0),se=1;se<ie;se++)de[se-1]=arguments[se];($=Bn).onClick.apply($,[z].concat(de))}},li;typeof vn=="string"?li=vn:typeof vn=="function"&&(li=vn(ft,Qe,ke));var wt=Object(w.a)(Jr),$t=v.createElement(Ne,Object.assign({},Bn,{"data-row-key":lt,className:b()(Re,"".concat(gt,"-row"),"".concat(gt,"-row-level-").concat(ke),li,Bn&&Bn.className),style:Object(g.a)(Object(g.a)({},tt),Bn?Bn.style:null),onClick:si}),Jr.map(function(ae,z){var $=ae.render,ie=ae.dataIndex,de=ae.className,se=wt[z],Ke=Ut[z],Rt;z===(gr||0)&&hi&&(Rt=v.createElement(v.Fragment,null,v.createElement("span",{style:{paddingLeft:"".concat(Kt*ke,"px")},className:"".concat(gt,"-row-indent indent-level-").concat(ke)}),or({prefixCls:gt,expanded:ur,expandable:$n,record:ft,onExpand:Ar})));var Vt;return ae.onCell&&(Vt=ae.onCell(ft,Qe)),v.createElement(r.a,Object.assign({className:de,ellipsis:ae.ellipsis,align:ae.align,component:et,prefixCls:gt,key:se,record:ft,index:Qe,dataIndex:ie,render:$,shouldCellUpdate:ae.shouldCellUpdate},Ke,{appendNode:Rt,additionalProps:Vt}))})),en;if(Xn&&(Ln||ur)){var Cn=Xt(ft,Qe,ke+1,ur),_n=mn&&mn(ft,Qe,ke);en=v.createElement(K,{expanded:ur,className:b()("".concat(gt,"-expanded-row"),"".concat(gt,"-expanded-row-level-").concat(ke+1),_n),prefixCls:gt,fixHeader:hr,fixColumn:mr,horizonScroll:St,component:Ne,componentWidth:Yr,cellComponent:et,colSpan:Jr.length},Cn)}var On;return $n&&ur&&(On=(ft[$e]||[]).map(function(ae,z){var $=Ue(ae,z);return v.createElement(U,Object.assign({},He,{key:$,rowKey:$,record:ae,recordKey:$,index:z,indent:ke+1}))})),v.createElement(v.Fragment,null,$t,en,On)}U.displayName="BodyRow";var W=U,X=v.createContext(null),ne=X;function fe(He){var Re=He.columnKey,tt=He.onColumnResize,ft=v.useRef();return v.useEffect(function(){ft.current&&tt(Re,ft.current.offsetWidth)},[]),v.createElement(c.a,{onResize:function(lt){var Ue=lt.offsetWidth;tt(Re,Ue)}},v.createElement("td",{ref:ft,style:{padding:0,border:0,height:0}},v.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function me(He){var Re=He.data,tt=He.getRowKey,ft=He.measureColumnWidth,Qe=He.expandedKeys,lt=He.onRow,Ue=He.rowExpandable,Le=He.emptyNode,Ie=He.childrenColumnName,Ce=v.useContext(ne),Se=Ce.onColumnResize,ke=v.useContext(a.a),Ne=ke.prefixCls,et=ke.getComponent,$e=v.useContext(H),bt=$e.fixHeader,gt=$e.horizonScroll,Ut=$e.flattenColumns,Nt=$e.componentWidth;return v.useMemo(function(){var hr=et(["body","wrapper"],"tbody"),mr=et(["body","row"],"tr"),St=et(["body","cell"],"td"),Yr;Re.length?Yr=Re.map(function(Hr,un){var Ar=tt(Hr,un);return v.createElement(W,{key:Ar,rowKey:Ar,record:Hr,recordKey:Ar,index:un,rowComponent:mr,cellComponent:St,expandedKeys:Qe,onRow:lt,getRowKey:tt,rowExpandable:Ue,childrenColumnName:Ie})}):Yr=v.createElement(K,{expanded:!0,className:"".concat(Ne,"-placeholder"),prefixCls:Ne,fixHeader:bt,fixColumn:gt,horizonScroll:gt,component:mr,componentWidth:Nt,cellComponent:St,colSpan:Ut.length},Le);var Jr=Object(w.a)(Ut);return v.createElement(hr,{className:"".concat(Ne,"-tbody")},ft&&v.createElement("tr",{"aria-hidden":"true",className:"".concat(Ne,"-measure-row"),style:{height:0}},Jr.map(function(Hr){return v.createElement(fe,{key:Hr,columnKey:Hr,onColumnResize:Se})})),Yr)},[Re,Ne,lt,ft,Qe,tt,et,Nt,Le,Ut])}var Ae=v.memo(me);Ae.displayName="Body";var De=Ae,ye=D("wRmb"),Oe=D("xEkU"),xe=D.n(Oe);function ue(He){var Re=Object(v.useRef)(He),tt=Object(v.useState)({}),ft=Object(p.a)(tt,2),Qe=ft[1],lt=Object(v.useRef)(null),Ue=Object(v.useRef)([]);function Le(Ie){lt.current===null&&(Ue.current=[],lt.current=xe()(function(){Ue.current.forEach(function(Ce){Re.current=Ce(Re.current)}),lt.current=null,Qe({})})),Ue.current.push(Ie)}return Object(v.useEffect)(function(){return function(){xe.a.cancel(lt.current)}},[]),[Re.current,Le]}function le(He){var Re=Object(v.useRef)(He),tt=Object(v.useRef)(null);function ft(){window.clearTimeout(tt.current)}function Qe(Ue){Re.current=Ue,ft(),tt.current=window.setTimeout(function(){Re.current=null,tt.current=null},100)}function lt(){return Re.current}return Object(v.useEffect)(function(){return ft},[]),[Qe,lt]}function re(He,Re,tt){var ft=Object(v.useMemo)(function(){for(var Qe=[],lt=[],Ue=0,Le=0,Ie=0;Ie<Re;Ie+=1)if(tt==="rtl"){lt[Ie]=Le,Le+=He[Ie]||0;var Ce=Re-Ie-1;Qe[Ce]=Ue,Ue+=He[Ce]||0}else{Qe[Ie]=Ue,Ue+=He[Ie]||0;var Se=Re-Ie-1;lt[Se]=Le,Le+=He[Se]||0}return{left:Qe,right:lt}},[He,Re,tt]);return ft}var pe=re;function ee(He){var Re=He.className,tt=He.children;return v.createElement("div",{className:Re},tt)}var te=ee,ce=D("n6Qo");function q(He){var Re,tt=He.prefixCls,ft=He.record,Qe=He.onExpand,lt=He.expanded,Ue=He.expandable,Le="".concat(tt,"-row-expand-icon");if(!Ue)return v.createElement("span",{className:b()(Le,"".concat(tt,"-row-spaced"))});var Ie=function(Se){Qe(ft,Se),Se.stopPropagation()};return v.createElement("span",{className:b()(Le,(Re={},Object(L.a)(Re,"".concat(tt,"-row-expanded"),lt),Object(L.a)(Re,"".concat(tt,"-row-collapsed"),!lt),Re)),onClick:Ie})}function Q(He,Re,tt){var ft=[];function Qe(lt){(lt||[]).forEach(function(Ue,Le){ft.push(Re(Ue,Le)),Qe(Ue[tt])})}return Qe(He),ft}var V=D("zT1h"),Z=D("y0+3"),be=function(Re,tt){var ft,Qe,lt=Re.scrollBodyRef,Ue=Re.onScroll,Le=Re.offsetScroll,Ie=v.useContext(a.a),Ce=Ie.prefixCls,Se=((ft=lt.current)===null||ft===void 0?void 0:ft.scrollWidth)||0,ke=((Qe=lt.current)===null||Qe===void 0?void 0:Qe.clientWidth)||0,Ne=Se&&ke*(ke/Se),et=v.useRef(),$e=ue({scrollLeft:0,isHiddenScrollBar:!1}),bt=Object(p.a)($e,2),gt=bt[0],Ut=bt[1],Nt=v.useRef({delta:0,x:0}),hr=v.useState(!1),mr=Object(p.a)(hr,2),St=mr[0],Yr=mr[1],Jr=function(){Yr(!1)},Hr=function(Kt){Kt.persist(),Nt.current.delta=Kt.pageX-gt.scrollLeft,Nt.current.x=0,Yr(!0),Kt.preventDefault()},un=function(Kt){var or,Xt=Kt||((or=window)===null||or===void 0?void 0:or.event),gr=Xt.buttons;if(!St||gr===0){St&&Yr(!1);return}var Xr=Nt.current.x+Kt.pageX-Nt.current.x-Nt.current.delta;Xr<=0&&(Xr=0),Xr+Ne>=ke&&(Xr=ke-Ne),Ue({scrollLeft:Xr/ke*(Se+2)}),Nt.current.x=Kt.pageX},Ar=function(){var Kt=Object(Z.b)(lt.current).top,or=Kt+lt.current.offsetHeight,Xt=document.documentElement.scrollTop+window.innerHeight;or-Object(u.a)()<=Xt||Kt>=Xt-Le?Ut(function(gr){return Object(g.a)(Object(g.a)({},gr),{},{isHiddenScrollBar:!0})}):Ut(function(gr){return Object(g.a)(Object(g.a)({},gr),{},{isHiddenScrollBar:!1})})},vn=function(Kt){Ut(function(or){return Object(g.a)(Object(g.a)({},or),{},{scrollLeft:Kt/Se*ke||0})})};return v.useImperativeHandle(tt,function(){return{setScrollLeft:vn}}),v.useEffect(function(){var mn=Object(V.a)(document.body,"mouseup",Jr,!1),Kt=Object(V.a)(document.body,"mousemove",un,!1);return Ar(),function(){mn.remove(),Kt.remove()}},[Ne,St]),v.useEffect(function(){var mn=Object(V.a)(window,"scroll",Ar,!1),Kt=Object(V.a)(window,"resize",Ar,!1);return function(){mn.remove(),Kt.remove()}},[]),v.useEffect(function(){gt.isHiddenScrollBar||Ut(function(mn){var Kt,or;return Object(g.a)(Object(g.a)({},mn),{},{scrollLeft:lt.current.scrollLeft/((Kt=lt.current)===null||Kt===void 0?void 0:Kt.scrollWidth)*((or=lt.current)===null||or===void 0?void 0:or.clientWidth)})})},[gt.isHiddenScrollBar]),Se<=ke||!Ne||gt.isHiddenScrollBar?null:v.createElement("div",{style:{height:Object(u.a)(),width:ke,bottom:Le},className:"".concat(Ce,"-sticky-scroll")},v.createElement("div",{onMouseDown:Hr,ref:et,className:b()("".concat(Ce,"-sticky-scroll-bar"),Object(L.a)({},"".concat(Ce,"-sticky-scroll-bar-active"),St)),style:{width:"".concat(Ne,"px"),transform:"translate3d(".concat(gt.scrollLeft,"px, 0, 0)")}}))},ge=v.forwardRef(be);function Te(He,Re){return v.useMemo(function(){var tt=!!He;return{isSticky:tt,stickyClassName:tt?"".concat(Re,"-sticky-header"):"",offsetHeader:Object(P.a)(He)==="object"&&He.offsetHeader||0,offsetScroll:Object(P.a)(He)==="object"&&He.offsetScroll||0}},[He,Re])}var Je=[],rt={},nt="rc-table-internal-hook",at=v.memo(function(He){var Re=He.children;return Re},function(He,Re){return l()(He.props,Re.props)?He.pingLeft!==Re.pingLeft||He.pingRight!==Re.pingRight:!1});function ct(He){var Re,tt=He.prefixCls,ft=He.className,Qe=He.rowClassName,lt=He.style,Ue=He.data,Le=He.rowKey,Ie=He.scroll,Ce=He.tableLayout,Se=He.direction,ke=He.title,Ne=He.footer,et=He.summary,$e=He.id,bt=He.showHeader,gt=He.components,Ut=He.emptyText,Nt=He.onRow,hr=He.onHeaderRow,mr=He.internalHooks,St=He.transformColumns,Yr=He.internalRefs,Jr=He.sticky,Hr=Ue||Je,un=!!Hr.length,Ar=v.useState(0),vn=Object(p.a)(Ar,2),mn=vn[0],Kt=vn[1];v.useEffect(function(){Kt(Object(u.a)())});var or=v.useMemo(function(){return Object(w.c)(gt,{})},[gt]),Xt=v.useCallback(function(Pr,Ft){return Object(w.b)(or,Pr)||Ft},[or]),gr=v.useMemo(function(){return typeof Le=="function"?Le:function(Pr){var Ft=Pr&&Pr[Le];return Ft}},[Le]),Xr=Object(x.c)(He),kn=Xr.expandIcon,Ln=Xr.expandedRowKeys,tn=Xr.defaultExpandedRowKeys,ur=Xr.defaultExpandAllRows,Xn=Xr.expandedRowRender,hi=Xr.onExpand,$n=Xr.onExpandedRowsChange,Zr=Xr.expandRowByClick,Bn=Xr.rowExpandable,si=Xr.expandIconColumnIndex,li=Xr.expandedRowClassName,wt=Xr.childrenColumnName,$t=Xr.indentSize,en=kn||q,Cn=wt||"children",_n=v.useMemo(function(){return Xn?"row":He.expandable&&mr===nt&&He.expandable.__PARENT_RENDER_ICON__||Hr.some(function(Pr){return Pr&&Object(P.a)(Pr)==="object"&&Pr[Cn]})?"nest":!1},[!!Xn,Hr]),On=v.useState(function(){return tn||(ur?Q(Hr,gr,Cn):[])}),ae=Object(p.a)(On,2),z=ae[0],$=ae[1],ie=v.useMemo(function(){return new Set(Ln||z||[])},[Ln,z]),de=v.useCallback(function(Pr){var Ft=gr(Pr,Hr.indexOf(Pr)),Zt,wr=ie.has(Ft);wr?(ie.delete(Ft),Zt=Object(T.a)(ie)):Zt=[].concat(Object(T.a)(ie),[Ft]),$(Zt),hi&&hi(!wr,Pr),$n&&$n(Zt)},[gr,ie,Hr,hi,$n]),se=v.useState(0),Ke=Object(p.a)(se,2),Rt=Ke[0],Vt=Ke[1],Er=Object(ye.b)(Object(g.a)(Object(g.a)(Object(g.a)({},He),Xr),{},{expandable:!!Xn,expandedKeys:ie,getRowKey:gr,onTriggerExpand:de,expandIcon:en,expandIconColumnIndex:si,direction:Se}),mr===nt?St:null),Lt=Object(p.a)(Er,2),zr=Lt[0],Br=Lt[1],En=v.useMemo(function(){return{columns:zr,flattenColumns:Br}},[zr,Br]),ui=v.useRef(),Ei=v.useRef(),In=v.useRef(),Li=v.useState(!1),qi=Object(p.a)(Li,2),ni=qi[0],Ti=qi[1],xi=v.useState(!1),Fi=Object(p.a)(xi,2),Ci=Fi[0],Gi=Fi[1],Mi=ue(new Map),oa=Object(p.a)(Mi,2),sa=oa[0],Ii=oa[1],qn=Object(w.a)(Br),Vi=qn.map(function(Pr){return sa.get(Pr)}),ta=v.useMemo(function(){return Vi},[Vi.join("_")]),Tt=pe(ta,Br.length,Se),it=Ie&&Object(w.d)(Ie.y),mt=Ie&&Object(w.d)(Ie.x),Ct=mt&&Br.some(function(Pr){var Ft=Pr.fixed;return Ft}),It=v.useRef(),Pt=Te(Jr,tt),Ht=Pt.isSticky,Wt=Pt.offsetHeader,dt=Pt.offsetScroll,At=Pt.stickyClassName,Dt,yr,tr;it&&(yr={overflowY:"scroll",maxHeight:Ie.y}),mt&&(Dt={overflowX:"auto"},it||(yr={overflowY:"hidden"}),tr={width:Ie.x===!0?"auto":Ie.x,minWidth:"100%"});var qt=v.useCallback(function(Pr,Ft){Ii(function(Zt){var wr=new Map(Zt);return wr.set(Pr,Ft),wr})},[]),Gt=le(null),nr=Object(p.a)(Gt,2),cr=nr[0],st=nr[1];function Lr(Pr,Ft){if(!Ft)return;typeof Ft=="function"?Ft(Pr):Ft.scrollLeft!==Pr&&(Ft.scrollLeft=Pr)}var Fr=function(Ft){var Zt=Ft.currentTarget,wr=Ft.scrollLeft,er=typeof wr=="number"?wr:Zt.scrollLeft,vt=Zt||rt;if(!st()||st()===vt){var yt;cr(vt),Lr(er,Ei.current),Lr(er,In.current),Lr(er,(yt=It.current)===null||yt===void 0?void 0:yt.setScrollLeft)}if(Zt){var zt=Zt.scrollWidth,Mt=Zt.clientWidth;Ti(er>0),Gi(er<zt-Mt)}},Cr=function(){In.current&&Fr({currentTarget:In.current})},rr=function(Ft){var Zt=Ft.width;Cr(),Vt(ui.current?ui.current.offsetWidth:Zt)};v.useEffect(function(){return Cr},[]),v.useEffect(function(){mt&&Cr()},[mt]),v.useEffect(function(){mr===nt&&Yr&&(Yr.body.current=In.current)});var Et=Xt(["table"],"table"),_t=v.useMemo(function(){return Ce||(Ct?Ie.x==="max-content"?"auto":"fixed":it||Br.some(function(Pr){var Ft=Pr.ellipsis;return Ft})?"fixed":"auto")},[it,Ct,Br,Ce]),xt,Jt={colWidths:ta,columCount:Br.length,stickyOffsets:Tt,onHeaderRow:hr,fixHeader:it},pr=v.useMemo(function(){return un?null:typeof Ut=="function"?Ut():Ut},[un,Ut]),dr=v.createElement(De,{data:Hr,measureColumnWidth:it||mt||Ht,expandedKeys:ie,rowExpandable:Bn,getRowKey:gr,onRow:Nt,emptyNode:pr,childrenColumnName:Cn}),fr=v.createElement(_,{colWidths:Br.map(function(Pr){var Ft=Pr.width;return Ft}),columns:Br}),Dr=et&&v.createElement(ce.b,null,et(Hr)),an=Xt(["body"]);if(it||Ht){var qe;typeof an=="function"?(qe=an(Hr,{scrollbarSize:mn,ref:In,onScroll:Fr}),Jt.colWidths=Br.map(function(Pr,Ft){var Zt=Pr.width,wr=Ft===zr.length-1?Zt-mn:Zt;return typeof wr=="number"&&!Number.isNaN(wr)?wr:(Object(n.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):qe=v.createElement("div",{style:Object(g.a)(Object(g.a)({},Dt),yr),onScroll:Fr,ref:In,className:b()("".concat(tt,"-body"))},v.createElement(Et,{style:Object(g.a)(Object(g.a)({},tr),{},{tableLayout:_t})},fr,dr,Dr),Ht&&v.createElement(ge,{ref:It,offsetScroll:dt,scrollBodyRef:In,onScroll:Fr})),xt=v.createElement(v.Fragment,null,bt!==!1&&v.createElement(N,Object.assign({noData:!Hr.length},Jt,En,{direction:Se,offsetHeader:Wt,stickyClassName:At,ref:Ei,onScroll:Fr})),qe)}else xt=v.createElement("div",{style:Object(g.a)(Object(g.a)({},Dt),yr),className:b()("".concat(tt,"-content")),onScroll:Fr,ref:In},v.createElement(Et,{style:Object(g.a)(Object(g.a)({},tr),{},{tableLayout:_t})},fr,bt!==!1&&v.createElement(C,Object.assign({},Jt,En)),dr,Dr));var sr=Object(x.b)(He),Nr=v.createElement("div",Object.assign({className:b()(tt,ft,(Re={},Object(L.a)(Re,"".concat(tt,"-rtl"),Se==="rtl"),Object(L.a)(Re,"".concat(tt,"-ping-left"),ni),Object(L.a)(Re,"".concat(tt,"-ping-right"),Ci),Object(L.a)(Re,"".concat(tt,"-layout-fixed"),Ce==="fixed"),Object(L.a)(Re,"".concat(tt,"-fixed-header"),it),Object(L.a)(Re,"".concat(tt,"-fixed-column"),Ct),Object(L.a)(Re,"".concat(tt,"-scroll-horizontal"),mt),Object(L.a)(Re,"".concat(tt,"-has-fix-left"),Br[0]&&Br[0].fixed),Object(L.a)(Re,"".concat(tt,"-has-fix-right"),Br[Br.length-1]&&Br[Br.length-1].fixed==="right"),Re)),style:lt,id:$e,ref:ui},sr),v.createElement(at,{pingLeft:ni,pingRight:Ci,props:Object(g.a)(Object(g.a)({},He),{},{stickyOffsets:Tt,mergedExpandedKeys:ie})},ke&&v.createElement(te,{className:"".concat(tt,"-title")},ke(Hr)),v.createElement("div",{className:"".concat(tt,"-container")},xt),Ne&&v.createElement(te,{className:"".concat(tt,"-footer")},Ne(Hr))));mt&&(Nr=v.createElement(c.a,{onResize:rr},Nr));var rn=v.useMemo(function(){return{prefixCls:tt,getComponent:Xt,scrollbarSize:mn,direction:Se,fixedInfoList:Br.map(function(Pr,Ft){return t(Ft,Ft,Br,Tt,Se)}),isSticky:Ht}},[tt,Xt,mn,Se,Br,Tt,Se,Ht]),xr=v.useMemo(function(){return Object(g.a)(Object(g.a)({},En),{},{tableLayout:_t,rowClassName:Qe,expandedRowClassName:li,componentWidth:Rt,fixHeader:it,fixColumn:Ct,horizonScroll:mt,expandIcon:en,expandableType:_n,expandRowByClick:Zr,expandedRowRender:Xn,onTriggerExpand:de,expandIconColumnIndex:si,indentSize:$t})},[En,_t,Qe,li,Rt,it,Ct,mt,en,_n,Zr,Xn,de,si,$t]),br=v.useMemo(function(){return{onColumnResize:qt}},[qt]);return v.createElement(a.a.Provider,{value:rn},v.createElement(H.Provider,{value:xr},v.createElement(ne.Provider,{value:br},Nr)))}ct.Column=h.a,ct.ColumnGroup=o.a,ct.Summary=ce.a,ct.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var ht=Y.b=ct},wRmb:function(j,Y,D){"use strict";D.d(Y,"a",function(){return l});var L=D("rePB"),g=D("KQm4"),T=D("VTBJ"),P=D("Ff2n"),p=D("q1tI"),v=D.n(p),S=D("Kwbf"),b=D("Zm9Q"),d=D("hW8S");function l(h){return Object(b.a)(h).filter(function(m){return p.isValidElement(m)}).map(function(m){var s=m.key,r=m.props,a=r.children,t=Object(P.a)(r,["children"]),w=Object(T.a)({key:s},t);return a&&(w.children=l(a)),w})}function n(h){return h.reduce(function(m,s){var r=s.fixed,a=r===!0?"left":r,t=s.children;return t&&t.length>0?[].concat(Object(g.a)(m),Object(g.a)(n(t).map(function(w){return Object(T.a)({fixed:a},w)}))):[].concat(Object(g.a)(m),[Object(T.a)(Object(T.a)({},s),{},{fixed:a})])},[])}function c(h){for(var m=!0,s=0;s<h.length;s+=1){var r=h[s];if(m&&r.fixed!=="left")m=!1;else if(!m&&r.fixed==="left"){Object(S.a)(!1,"Index ".concat(s-1," of `columns` missing `fixed='left'` prop."));break}}for(var a=!0,t=h.length-1;t>=0;t-=1){var w=h[t];if(a&&w.fixed!=="right")a=!1;else if(!a&&w.fixed==="right"){Object(S.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function u(h){return h.map(function(m){var s=m.fixed,r=Object(P.a)(m,["fixed"]),a=s;return s==="left"?a="right":s==="right"&&(a="left"),Object(T.a)({fixed:a},r)})}function o(h,m){var s=h.prefixCls,r=h.columns,a=h.children,t=h.expandable,w=h.expandedKeys,E=h.getRowKey,f=h.onTriggerExpand,k=h.expandIcon,O=h.rowExpandable,C=h.expandIconColumnIndex,x=h.direction,y=h.expandRowByClick,_=p.useMemo(function(){return r||l(a)},[r,a]),M=p.useMemo(function(){if(t){var G,H=C||0,B=_[H],K=(G={},Object(L.a)(G,d.a,{className:"".concat(s,"-expand-icon-col")}),Object(L.a)(G,"title",""),Object(L.a)(G,"fixed",B?B.fixed:null),Object(L.a)(G,"className","".concat(s,"-row-expand-icon-cell")),Object(L.a)(G,"render",function(X,ne,fe){var me=E(ne,fe),Ae=w.has(me),De=O?O(ne):!0,ye=k({prefixCls:s,expanded:Ae,expandable:De,record:ne,onExpand:f});return y?p.createElement("span",{onClick:function(xe){return xe.stopPropagation()}},ye):ye}),G),U=_.slice();return H>=0&&U.splice(H,0,K),U}return _},[t,_,E,w,k,x]),I=p.useMemo(function(){var G=M;return m&&(G=m(G)),G.length||(G=[{render:function(){return null}}]),G},[m,M,x]),N=p.useMemo(function(){return x==="rtl"?u(n(I)):n(I)},[I,x]);return[I,N]}Y.b=o},wZgz:function(j,Y,D){(function(L,g,T){j.exports=Y=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.BlockCipher,p=g.algo,v=[],S=[],b=[],d=[],l=[],n=[],c=[],u=[],o=[],h=[];(function(){for(var r=[],a=0;a<256;a++)a<128?r[a]=a<<1:r[a]=a<<1^283;for(var t=0,w=0,a=0;a<256;a++){var E=w^w<<1^w<<2^w<<3^w<<4;E=E>>>8^E&255^99,v[t]=E,S[E]=t;var f=r[t],k=r[f],O=r[k],C=r[E]*257^E*16843008;b[t]=C<<24|C>>>8,d[t]=C<<16|C>>>16,l[t]=C<<8|C>>>24,n[t]=C;var C=O*16843009^k*65537^f*257^t*16843008;c[E]=C<<24|C>>>8,u[E]=C<<16|C>>>16,o[E]=C<<8|C>>>24,h[E]=C,t?(t=f^r[r[r[O^f]]],w^=r[r[w]]):t=w=1}})();var m=[0,1,2,4,8,16,32,64,128,27,54],s=p.AES=P.extend({_doReset:function(){var r;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var a=this._keyPriorReset=this._key,t=a.words,w=a.sigBytes/4,E=this._nRounds=w+6,f=(E+1)*4,k=this._keySchedule=[],O=0;O<f;O++)O<w?k[O]=t[O]:(r=k[O-1],O%w?w>6&&O%w==4&&(r=v[r>>>24]<<24|v[r>>>16&255]<<16|v[r>>>8&255]<<8|v[r&255]):(r=r<<8|r>>>24,r=v[r>>>24]<<24|v[r>>>16&255]<<16|v[r>>>8&255]<<8|v[r&255],r^=m[O/w|0]<<24),k[O]=k[O-w]^r);for(var C=this._invKeySchedule=[],x=0;x<f;x++){var O=f-x;if(x%4)var r=k[O];else var r=k[O-4];x<4||O<=4?C[x]=r:C[x]=c[v[r>>>24]]^u[v[r>>>16&255]]^o[v[r>>>8&255]]^h[v[r&255]]}},encryptBlock:function(r,a){this._doCryptBlock(r,a,this._keySchedule,b,d,l,n,v)},decryptBlock:function(r,a){var t=r[a+1];r[a+1]=r[a+3],r[a+3]=t,this._doCryptBlock(r,a,this._invKeySchedule,c,u,o,h,S);var t=r[a+1];r[a+1]=r[a+3],r[a+3]=t},_doCryptBlock:function(r,a,t,w,E,f,k,O){for(var C=this._nRounds,x=r[a]^t[0],y=r[a+1]^t[1],_=r[a+2]^t[2],M=r[a+3]^t[3],I=4,N=1;N<C;N++){var G=w[x>>>24]^E[y>>>16&255]^f[_>>>8&255]^k[M&255]^t[I++],H=w[y>>>24]^E[_>>>16&255]^f[M>>>8&255]^k[x&255]^t[I++],B=w[_>>>24]^E[M>>>16&255]^f[x>>>8&255]^k[y&255]^t[I++],K=w[M>>>24]^E[x>>>16&255]^f[y>>>8&255]^k[_&255]^t[I++];x=G,y=H,_=B,M=K}var G=(O[x>>>24]<<24|O[y>>>16&255]<<16|O[_>>>8&255]<<8|O[M&255])^t[I++],H=(O[y>>>24]<<24|O[_>>>16&255]<<16|O[M>>>8&255]<<8|O[x&255])^t[I++],B=(O[_>>>24]<<24|O[M>>>16&255]<<16|O[x>>>8&255]<<8|O[y&255])^t[I++],K=(O[M>>>24]<<24|O[x>>>16&255]<<16|O[y>>>8&255]<<8|O[_&255])^t[I++];r[a]=G,r[a+1]=H,r[a+2]=B,r[a+3]=K},keySize:256/32});g.AES=P._createHelper(s)}(),L.AES})},wbyO:function(j,Y,D){(function(L,g){j.exports=Y=g(D("Ib8C"))})(this,function(L){return function(){var g=L,T=g.lib,P=T.WordArray,p=g.enc,v=p.Base64url={stringify:function(b,d=!0){var l=b.words,n=b.sigBytes,c=d?this._safe_map:this._map;b.clamp();for(var u=[],o=0;o<n;o+=3)for(var h=l[o>>>2]>>>24-o%4*8&255,m=l[o+1>>>2]>>>24-(o+1)%4*8&255,s=l[o+2>>>2]>>>24-(o+2)%4*8&255,r=h<<16|m<<8|s,a=0;a<4&&o+a*.75<n;a++)u.push(c.charAt(r>>>6*(3-a)&63));var t=c.charAt(64);if(t)for(;u.length%4;)u.push(t);return u.join("")},parse:function(b,d=!0){var l=b.length,n=d?this._safe_map:this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var u=0;u<n.length;u++)c[n.charCodeAt(u)]=u}var o=n.charAt(64);if(o){var h=b.indexOf(o);h!==-1&&(l=h)}return S(b,l,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function S(b,d,l){for(var n=[],c=0,u=0;u<d;u++)if(u%4){var o=l[b.charCodeAt(u-1)]<<u%4*2,h=l[b.charCodeAt(u)]>>>6-u%4*2,m=o|h;n[c>>>2]|=m<<24-c%4*8,c++}return P.create(n,c)}}(),L.enc.Base64url})},"y0+3":function(j,Y,D){"use strict";D.d(Y,"a",function(){return n}),D.d(Y,"b",function(){return u});var L=/margin|padding|width|height|max|min|offset/,g={left:!0,top:!0},T={cssFloat:1,styleFloat:1,float:1};function P(o){return o.nodeType===1?o.ownerDocument.defaultView.getComputedStyle(o,null):{}}function p(o,h,m){if(h=h.toLowerCase(),m==="auto"){if(h==="height")return o.offsetHeight;if(h==="width")return o.offsetWidth}return h in g||(g[h]=L.test(h)),g[h]?parseFloat(m)||0:m}function v(o,h){var m=arguments.length,s=P(o);return h=T[h]?"cssFloat"in o.style?"cssFloat":"styleFloat":h,m===1?s:p(o,h,s[h]||o.style[h])}function S(o,h,m){var s=arguments.length;if(h=T[h]?"cssFloat"in o.style?"cssFloat":"styleFloat":h,s===3)return typeof m=="number"&&L.test(h)&&(m="".concat(m,"px")),o.style[h]=m,m;for(var r in h)h.hasOwnProperty(r)&&S(o,r,h[r]);return P(o)}function b(o){return o===document.body?document.documentElement.clientWidth:o.offsetWidth}function d(o){return o===document.body?window.innerHeight||document.documentElement.clientHeight:o.offsetHeight}function l(){var o=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),h=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:o,height:h}}function n(){var o=document.documentElement.clientWidth,h=window.innerHeight||document.documentElement.clientHeight;return{width:o,height:h}}function c(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function u(o){var h=o.getBoundingClientRect(),m=document.documentElement;return{left:h.left+(window.pageXOffset||m.scrollLeft)-(m.clientLeft||document.body.clientLeft||0),top:h.top+(window.pageYOffset||m.scrollTop)-(m.clientTop||document.body.clientTop||0)}}},zrhs:function(j,Y,D){"use strict";var L=D("2qtc"),g=D("kLXV"),T=D("PpiC"),P=D("q1tI"),p=D.n(P),v=D("9kvl"),S=function(d){var l=d.shixunsDetail,n=d.globalSetting,c=d.loading,u=d.dispatch,o=Object(T.a)(d,["shixunsDetail","globalSetting","loading","dispatch"]);return p.a.createElement(g.a,{centered:!0,keyboard:!1,closable:!1,zIndex:6666,title:"\u63D0\u793A",visible:l.actionTabs.key==="Banner-Auth",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){u({type:"shixunsDetail/setActionTabs",payload:{}}),window.location.href="/account/certification"},onCancel:function(){u({type:"shixunsDetail/setActionTabs",payload:{}})}},p.a.createElement("p",{className:"tc font16"},"\u5F53\u524D\u7ADE\u8D5B\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\uFF0C\u8BF7\u5148\u5B8C\u6210\u5B9E\u540D\u8BA4\u8BC1\u540E\u518D\u62A5\u540D\u53C2\u8D5B",p.a.createElement("br",null),"\u8BF7\u95EE\u662F\u5426\u524D\u5F80\u8FDB\u884C\u8BA4\u8BC1\uFF1F"))};Y.a=Object(v.a)(function(b){var d=b.shixunsDetail,l=b.loading,n=b.globalSetting;return{shixunsDetail:d,globalSetting:n,loading:l.models.index}})(S)}}]);
|