|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[136,5,6,7,8,9,12,16,21],{"+NIl":function(W,q,D){(function(P){P(D("VrN/"))})(function(P){"use strict";P.defineMode("stex",function(v,C){"use strict";function N(n,s){n.cmdState.push(s)}function g(n){return n.cmdState.length>0?n.cmdState[n.cmdState.length-1]:null}function m(n){var s=n.cmdState.pop();s&&s.closeBracket()}function S(n){for(var s=n.cmdState,h=s.length-1;h>=0;h--){var f=s[h];if(f.name=="DEFAULT")continue;return f}return{styleIdentifier:function(){return null}}}function _(n,s,h){return function(){this.name=n,this.bracketNo=0,this.style=s,this.styles=h,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var t={};t.importmodule=_("importmodule","tag",["string","builtin"]),t.documentclass=_("documentclass","tag",["","atom"]),t.usepackage=_("usepackage","tag",["atom"]),t.begin=_("begin","tag",["atom"]),t.end=_("end","tag",["atom"]),t.label=_("label","tag",["atom"]),t.ref=_("ref","tag",["atom"]),t.eqref=_("eqref","tag",["atom"]),t.cite=_("cite","tag",["atom"]),t.bibitem=_("bibitem","tag",["atom"]),t.Bibitem=_("Bibitem","tag",["atom"]),t.RBibitem=_("RBibitem","tag",["atom"]),t.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function d(n,s){n.f=s}function i(n,s){var h;if(n.match(/^\\[a-zA-Z@]+/)){var f=n.current().slice(1);return h=t.hasOwnProperty(f)?t[f]:t.DEFAULT,h=new h,N(s,h),d(s,o),h.style}if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/\\]/))return"tag";if(n.match("\\["))return d(s,function(a,r){return c(a,r,"\\]")}),"keyword";if(n.match("\\("))return d(s,function(a,r){return c(a,r,"\\)")}),"keyword";if(n.match("$$"))return d(s,function(a,r){return c(a,r,"$$")}),"keyword";if(n.match("$"))return d(s,function(a,r){return c(a,r,"$")}),"keyword";var l=n.next();if(l=="%")return n.skipToEnd(),"comment";if(l=="}"||l=="]"){if(h=g(s),h)h.closeBracket(l),d(s,o);else return"error";return"bracket"}else return l=="{"||l=="["?(h=t.DEFAULT,h=new h,N(s,h),"bracket"):/\d/.test(l)?(n.eatWhile(/[\w.%]/),"atom"):(n.eatWhile(/[\w\-_]/),h=S(s),h.name=="begin"&&(h.argument=n.current()),h.styleIdentifier())}function c(n,s,h){if(n.eatSpace())return null;if(h&&n.match(h))return d(s,i),"keyword";if(n.match(/^\\[a-zA-Z@]+/))return"tag";if(n.match(/^[a-zA-Z]+/))return"variable-2";if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/]/))return"tag";if(n.match(/^[\^_&]/))return"tag";if(n.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(n.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var f=n.next();return f=="{"||f=="}"||f=="["||f=="]"||f=="("||f==")"?"bracket":f=="%"?(n.skipToEnd(),"comment"):"error"}function o(n,s){var h=n.peek(),f;return h=="{"||h=="["?(f=g(s),f.openBracket(h),n.eat(h),d(s,i),"bracket"):/[ \t\r]/.test(h)?(n.eat(h),null):(d(s,i),m(s),i(n,s))}return{startState:function(){var n=C.inMathMode?function(s,h){return c(s,h)}:i;return{cmdState:[],f:n}},copyState:function(n){return{cmdState:n.cmdState.slice(),f:n.f}},token:function(n,s){return s.f(n,s)},blankLine:function(n){n.f=i,n.cmdState.length=0},lineComment:"%"}}),P.defineMIME("text/x-stex","stex"),P.defineMIME("text/x-latex","stex")})},"+ua5":function(W,q,D){},"/cxE":function(W,q,D){"use strict";D.d(q,"f",function(){return C}),D.d(q,"g",function(){return N}),D.d(q,"h",function(){return g}),D.d(q,"e",function(){return S}),D.d(q,"b",function(){return _}),D.d(q,"c",function(){return t}),D.d(q,"d",function(){return d}),D.d(q,"a",function(){return i});class P{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(c){setTimeout(()=>{throw c.stack?new Error(c.message+`
|
|
|
|
|
|
`+c.stack):c},0)}}emit(c){this.listeners.forEach(o=>{o(c)})}onUnexpectedError(c){this.unexpectedErrorHandler(c),this.emit(c)}onUnexpectedExternalError(c){this.unexpectedErrorHandler(c)}}const v=new P;function C(c){S(c)||v.onUnexpectedError(c);return}function N(c){S(c)||v.onUnexpectedExternalError(c);return}function g(c){if(c instanceof Error){let{name:o,message:n}=c;const s=c.stacktrace||c.stack;return{$isError:!0,name:o,message:n,stack:s}}return c}const m="Canceled";function S(c){return c instanceof Error&&c.name===m&&c.message===m}function _(){const c=new Error(m);return c.name=c.message,c}function t(c){return c?new Error(`Illegal argument: ${c}`):new Error("Illegal argument")}function d(c){return c?new Error(`Illegal state: ${c}`):new Error("Illegal state")}class i extends Error{constructor(c){super("NotSupported");c&&(this.message=c)}}},"19Vz":function(W,q,D){(function(P){P(D("VrN/"))})(function(P){P.defineOption("placeholder","",function(_,t,d){var i=d&&d!=P.Init;if(t&&!i)_.on("blur",g),_.on("change",m),_.on("swapDoc",m),P.on(_.getInputField(),"compositionupdate",_.state.placeholderCompose=function(){N(_)}),m(_);else if(!t&&i){_.off("blur",g),_.off("change",m),_.off("swapDoc",m),P.off(_.getInputField(),"compositionupdate",_.state.placeholderCompose),v(_);var c=_.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}t&&!_.hasFocus()&&g(_)});function v(_){_.state.placeholder&&(_.state.placeholder.parentNode.removeChild(_.state.placeholder),_.state.placeholder=null)}function C(_){v(_);var t=_.state.placeholder=document.createElement("pre");t.style.cssText="height: 0; overflow: visible",t.style.direction=_.getOption("direction"),t.className="CodeMirror-placeholder CodeMirror-line-like";var d=_.getOption("placeholder");typeof d=="string"&&(d=document.createTextNode(d)),t.appendChild(d),_.display.lineSpace.insertBefore(t,_.display.lineSpace.firstChild)}function N(_){setTimeout(function(){var t=!1,d=_.getInputField();d.nodeName=="TEXTAREA"?t=!d.value:_.lineCount()==1&&(t=!/[^\u200b]/.test(d.querySelector(".CodeMirror-line").textContent)),t?C(_):v(_)},20)}function g(_){S(_)&&C(_)}function m(_){var t=_.getWrapperElement(),d=S(_);t.className=t.className.replace(" CodeMirror-empty","")+(d?" CodeMirror-empty":""),d?C(_):v(_)}function S(_){return _.lineCount()===1&&_.getLine(0)===""}})},"1eCo":function(W,q,D){(function(P){P(D("VrN/"))})(function(P){"use strict";var v={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},C={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};P.defineMode("xml",function(N,g){var m=N.indentUnit,S={},_=g.htmlMode?v:C;for(var t in _)S[t]=_[t];for(var t in g)S[t]=g[t];var d,i;function c(T,F){function M(K){return F.tokenize=K,K(T,F)}var L=T.next();if(L=="<")return T.eat("!")?T.eat("[")?T.match("CDATA[")?M(s("atom","]]>")):null:T.match("--")?M(s("comment","-->")):T.match("DOCTYPE",!0,!0)?(T.eatWhile(/[\w\._\-]/),M(h(1))):null:T.eat("?")?(T.eatWhile(/[\w\._\-]/),F.tokenize=s("meta","?>"),"meta"):(d=T.eat("/")?"closeTag":"openTag",F.tokenize=o,"tag bracket");if(L=="&"){var Y;return T.eat("#")?T.eat("x")?Y=T.eatWhile(/[a-fA-F\d]/)&&T.eat(";"):Y=T.eatWhile(/[\d]/)&&T.eat(";"):Y=T.eatWhile(/[\w\.\-:]/)&&T.eat(";"),Y?"atom":"error"}else return T.eatWhile(/[^&<]/),null}c.isInText=!0;function o(T,F){var M=T.next();if(M==">"||M=="/"&&T.eat(">"))return F.tokenize=c,d=M==">"?"endTag":"selfcloseTag","tag bracket";if(M=="=")return d="equals",null;if(M=="<"){F.tokenize=c,F.state=r,F.tagName=F.tagStart=null;var L=F.tokenize(T,F);return L?L+" tag error":"tag error"}else return/[\'\"]/.test(M)?(F.tokenize=n(M),F.stringStartCol=T.column(),F.tokenize(T,F)):(T.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function n(T){var F=function(M,L){for(;!M.eol();)if(M.next()==T){L.tokenize=o;break}return"string"};return F.isInAttribute=!0,F}function s(T,F){return function(M,L){for(;!M.eol();){if(M.match(F)){L.tokenize=c;break}M.next()}return T}}function h(T){return function(F,M){for(var L;(L=F.next())!=null;){if(L=="<")return M.tokenize=h(T+1),M.tokenize(F,M);if(L==">")if(T==1){M.tokenize=c;break}else return M.tokenize=h(T-1),M.tokenize(F,M)}return"meta"}}function f(T,F,M){this.prev=T.context,this.tagName=F,this.indent=T.indented,this.startOfLine=M,(S.doNotIndent.hasOwnProperty(F)||T.context&&T.context.noIndent)&&(this.noIndent=!0)}function l(T){T.context&&(T.context=T.context.prev)}function a(T,F){for(var M;;){if(!T.context)return;if(M=T.context.tagName,!S.contextGrabbers.hasOwnProperty(M)||!S.contextGrabbers[M].hasOwnProperty(F))return;l(T)}}function r(T,F,M){return T=="openTag"?(M.tagStart=F.column(),x):T=="closeTag"?y:r}function x(T,F,M){return T=="word"?(M.tagName=F.current(),i="tag",O):S.allowMissingTagName&&T=="endTag"?(i="tag bracket",O(T,F,M)):(i="error",x)}function y(T,F,M){if(T=="word"){var L=F.current();return M.context&&M.context.tagName!=L&&S.implicitlyClosed.hasOwnProperty(M.context.tagName)&&l(M),M.context&&M.context.tagName==L||S.matchClosing===!1?(i="tag",p):(i="tag error",R)}else return S.allowMissingTagName&&T=="endTag"?(i="tag bracket",p(T,F,M)):(i="error",R)}function p(T,F,M){return T!="endTag"?(i="error",p):(l(M),r)}function R(T,F,M){return i="error",p(T,F,M)}function O(T,F,M){if(T=="word")return i="attribute",b;if(T=="endTag"||T=="selfcloseTag"){var L=M.tagName,Y=M.tagStart;return M.tagName=M.tagStart=null,T=="selfcloseTag"||S.autoSelfClosers.hasOwnProperty(L)?a(M,L):(a(M,L),M.context=new f(M,L,Y==M.indented)),r}return i="error",O}function b(T,F,M){return T=="equals"?E:(S.allowMissing||(i="error"),O(T,F,M))}function E(T,F,M){return T=="string"?w:T=="word"&&S.allowUnquoted?(i="string",O):(i="error",O(T,F,M))}function w(T,F,M){return T=="string"?w:O(T,F,M)}return{startState:function(T){var F={tokenize:c,state:r,indented:T||0,tagName:null,tagStart:null,context:null};return T!=null&&(F.baseIndent=T),F},token:function(T,F){if(!F.tagName&&T.sol()&&(F.indented=T.indentation()),T.eatSpace())return null;d=null;var M=F.tokenize(T,F);return(M||d)&&M!="comment"&&(i=null,F.state=F.state(d||M,T,F),i&&(M=i=="error"?M+" error":i)),M},indent:function(T,F,M){var L=T.context;if(T.tokenize.isInAttribute)return T.tagStart==T.indented?T.stringStartCol+1:T.indented+m;if(L&&L.noIndent)return P.Pass;if(T.tokenize!=o&&T.tokenize!=c)return M?M.match(/^(\s*)/)[0].length:0;if(T.tagName)return S.multilineTagIndentPastTag!==!1?T.tagStart+T.tagName.length+2:T.tagStart+m*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/<!\[CDATA\[/.test(F))return 0;var Y=F&&/^<(\/)?([\w_:\.-]*)/.exec(F);if(Y&&Y[1])for(;L;)if(L.tagName==Y[2]){L=L.prev;break}else if(S.implicitlyClosed.hasOwnProperty(L.tagName))L=L.prev;else break;else if(Y)for(;L;){var K=S.contextGrabbers[L.tagName];if(K&&K.hasOwnProperty(Y[2]))L=L.prev;else break}for(;L&&L.prev&&!L.startOfLine;)L=L.prev;return L?L.indent+m:T.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(T){T.state==E&&(T.state=O)},xmlCurrentTag:function(T){return T.tagName?{name:T.tagName,close:T.type=="closeTag"}:null},xmlCurrentContext:function(T){for(var F=[],M=T.context;M;M=M.prev)M.tagName&&F.push(M.tagName);return F.reverse()}}}),P.defineMIME("text/xml","xml"),P.defineMIME("application/xml","xml"),P.mimeModes.hasOwnProperty("text/html")||P.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("MlIO"))})(this,function(P){return function(){var v=P,C=v.lib,N=C.Hasher,g=v.x64,m=g.Word,S=g.WordArray,_=v.algo;function t(){return m.create.apply(m,arguments)}var d=[t(1116352408,3609767458),t(1899447441,602891725),t(3049323471,3964484399),t(3921009573,2173295548),t(961987163,4081628472),t(1508970993,3053834265),t(2453635748,2937671579),t(2870763221,3664609560),t(3624381080,2734883394),t(310598401,1164996542),t(607225278,1323610764),t(1426881987,3590304994),t(1925078388,4068182383),t(2162078206,991336113),t(2614888103,633803317),t(3248222580,3479774868),t(3835390401,2666613458),t(4022224774,944711139),t(264347078,2341262773),t(604807628,2007800933),t(770255983,1495990901),t(1249150122,1856431235),t(1555081692,3175218132),t(1996064986,2198950837),t(2554220882,3999719339),t(2821834349,766784016),t(2952996808,2566594879),t(3210313671,3203337956),t(3336571891,1034457026),t(3584528711,2466948901),t(113926993,3758326383),t(338241895,168717936),t(666307205,1188179964),t(773529912,1546045734),t(1294757372,1522805485),t(1396182291,2643833823),t(1695183700,2343527390),t(1986661051,1014477480),t(2177026350,1206759142),t(2456956037,344077627),t(2730485921,1290863460),t(2820302411,3158454273),t(3259730800,3505952657),t(3345764771,106217008),t(3516065817,3606008344),t(3600352804,1432725776),t(4094571909,1467031594),t(275423344,851169720),t(430227734,3100823752),t(506948616,1363258195),t(659060556,3750685593),t(883997877,3785050280),t(958139571,3318307427),t(1322822218,3812723403),t(1537002063,2003034995),t(1747873779,3602036899),t(1955562222,1575990012),t(2024104815,1125592928),t(2227730452,2716904306),t(2361852424,442776044),t(2428436474,593698344),t(2756734187,3733110249),t(3204031479,2999351573),t(3329325298,3815920427),t(3391569614,3928383900),t(3515267271,566280711),t(3940187606,3454069534),t(4118630271,4000239992),t(116418474,1914138554),t(174292421,2731055270),t(289380356,3203993006),t(460393269,320620315),t(685471733,587496836),t(852142971,1086792851),t(1017036298,365543100),t(1126000580,2618297676),t(1288033470,3409855158),t(1501505948,4234509866),t(1607167915,987167468),t(1816402316,1246189591)],i=[];(function(){for(var o=0;o<80;o++)i[o]=t()})();var c=_.SHA512=N.extend({_doReset:function(){this._hash=new S.init([new m.init(1779033703,4089235720),new m.init(3144134277,2227873595),new m.init(1013904242,4271175723),new m.init(2773480762,1595750129),new m.init(1359893119,2917565137),new m.init(2600822924,725511199),new m.init(528734635,4215389547),new m.init(1541459225,327033209)])},_doProcessBlock:function(o,n){for(var s=this._hash.words,h=s[0],f=s[1],l=s[2],a=s[3],r=s[4],x=s[5],y=s[6],p=s[7],R=h.high,O=h.low,b=f.high,E=f.low,w=l.high,T=l.low,F=a.high,M=a.low,L=r.high,Y=r.low,K=x.high,A=x.low,H=y.high,U=y.low,I=p.high,G=p.low,ne=R,oe=O,de=b,Oe=E,Ae=w,pe=T,Se=F,be=M,se=L,ee=Y,B=K,V=A,X=H,Q=U,Z=I,ie=G,re=0;re<80;re++){var $,J,le=i[re];if(re<16)J=le.high=o[n+re*2]|0,$=le.low=o[n+re*2+1]|0;else{var ue=i[re-15],xe=ue.high,Me=ue.low,Xe=(xe>>>1|Me<<31)^(xe>>>8|Me<<24)^xe>>>7,$e=(Me>>>1|xe<<31)^(Me>>>8|xe<<24)^(Me>>>7|xe<<25),Je=i[re-2],rt=Je.high,it=Je.low,je=(rt>>>19|it<<13)^(rt<<3|it>>>29)^rt>>>6,Ie=(it>>>19|rt<<13)^(it<<3|rt>>>29)^(it>>>6|rt<<26),qe=i[re-7],st=qe.high,Ee=qe.low,ce=i[re-16],fe=ce.high,ve=ce.low;$=$e+Ee,J=Xe+st+($>>>0<$e>>>0?1:0),$=$+Ie,J=J+je+($>>>0<Ie>>>0?1:0),$=$+ve,J=J+fe+($>>>0<ve>>>0?1:0),le.high=J,le.low=$}var Ce=se&B^~se&X,ge=ee&V^~ee&Q,ye=ne&de^ne&Ae^de&Ae,Re=oe&Oe^oe&pe^Oe&pe,De=(ne>>>28|oe<<4)^(ne<<30|oe>>>2)^(ne<<25|oe>>>7),Pe=(oe>>>28|ne<<4)^(oe<<30|ne>>>2)^(oe<<25|ne>>>7),ze=(se>>>14|ee<<18)^(se>>>18|ee<<14)^(se<<23|ee>>>9),at=(ee>>>14|se<<18)^(ee>>>18|se<<14)^(ee<<23|se>>>9),lt=d[re],St=lt.high,Ot=lt.low,ir=ie+at,Gt=Z+ze+(ir>>>0<ie>>>0?1:0),ir=ir+ge,Gt=Gt+Ce+(ir>>>0<ge>>>0?1:0),ir=ir+Ot,Gt=Gt+St+(ir>>>0<Ot>>>0?1:0),ir=ir+$,Gt=Gt+J+(ir>>>0<$>>>0?1:0),yt=Pe+Re,Fr=De+ye+(yt>>>0<Pe>>>0?1:0);Z=X,ie=Q,X=B,Q=V,B=se,V=ee,ee=be+ir|0,se=Se+Gt+(ee>>>0<be>>>0?1:0)|0,Se=Ae,be=pe,Ae=de,pe=Oe,de=ne,Oe=oe,oe=ir+yt|0,ne=Gt+Fr+(oe>>>0<ir>>>0?1:0)|0}O=h.low=O+oe,h.high=R+ne+(O>>>0<oe>>>0?1:0),E=f.low=E+Oe,f.high=b+de+(E>>>0<Oe>>>0?1:0),T=l.low=T+pe,l.high=w+Ae+(T>>>0<pe>>>0?1:0),M=a.low=M+be,a.high=F+Se+(M>>>0<be>>>0?1:0),Y=r.low=Y+ee,r.high=L+se+(Y>>>0<ee>>>0?1:0),A=x.low=A+V,x.high=K+B+(A>>>0<V>>>0?1:0),U=y.low=U+Q,y.high=H+X+(U>>>0<Q>>>0?1:0),G=p.low=G+ie,p.high=I+Z+(G>>>0<ie>>>0?1:0)},_doFinalize:function(){var o=this._data,n=o.words,s=this._nDataBytes*8,h=o.sigBytes*8;n[h>>>5]|=128<<24-h%32,n[(h+128>>>10<<5)+30]=Math.floor(s/4294967296),n[(h+128>>>10<<5)+31]=s,o.sigBytes=n.length*4,this._process();var f=this._hash.toX32();return f},clone:function(){var o=N.clone.call(this);return o._hash=this._hash.clone(),o},blockSize:1024/32});v.SHA512=N._createHelper(c),v.HmacSHA512=N._createHmacHelper(c)}(),P.SHA512})},"24hK":function(W,q,D){"use strict";D.d(q,"a",function(){return v});class P{constructor(C){this.element=C,this.next=P.Undefined,this.prev=P.Undefined}}P.Undefined=new P(void 0);class v{constructor(){this._first=P.Undefined,this._last=P.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===P.Undefined}clear(){let C=this._first;for(;C!==P.Undefined;){const N=C.next;C.prev=P.Undefined,C.next=P.Undefined,C=N}this._first=P.Undefined,this._last=P.Undefined,this._size=0}unshift(C){return this._insert(C,!1)}push(C){return this._insert(C,!0)}_insert(C,N){const g=new P(C);if(this._first===P.Undefined)this._first=g,this._last=g;else if(N){const S=this._last;this._last=g,g.prev=S,S.next=g}else{const S=this._first;this._first=g,g.next=S,S.prev=g}this._size+=1;let m=!1;return()=>{m||(m=!0,this._remove(g))}}shift(){if(this._first===P.Undefined)return;{const C=this._first.element;return this._remove(this._first),C}}pop(){if(this._last===P.Undefined)return;{const C=this._last.element;return this._remove(this._last),C}}_remove(C){if(C.prev!==P.Undefined&&C.next!==P.Undefined){const N=C.prev;N.next=C.next,C.next.prev=N}else C.prev===P.Undefined&&C.next===P.Undefined?(this._first=P.Undefined,this._last=P.Undefined):C.next===P.Undefined?(this._last=this._last.prev,this._last.next=P.Undefined):C.prev===P.Undefined&&(this._first=this._first.next,this._first.prev=P.Undefined);this._size-=1}*[Symbol.iterator](){let C=this._first;for(;C!==P.Undefined;)yield C.element,C=C.next}}},"3/fG":function(W,q,D){"use strict";D.d(q,"a",function(){return v});function P(C,N){let g;return N.length===0?g=C:g=C.replace(/\{(\d+)\}/g,function(m,S){const _=S[0];return typeof N[_]!="undefined"?N[_]:m}),g}function v(C,N,...g){return P(N,g)}},"3y9D":function(W,q,D){(function(P,v){W.exports=q=v(D("Ib8C"))})(this,function(P){return function(){var v=P,C=v.lib,N=C.WordArray,g=C.Hasher,m=v.algo,S=[],_=m.SHA1=g.extend({_doReset:function(){this._hash=new N.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,d){for(var i=this._hash.words,c=i[0],o=i[1],n=i[2],s=i[3],h=i[4],f=0;f<80;f++){if(f<16)S[f]=t[d+f]|0;else{var l=S[f-3]^S[f-8]^S[f-14]^S[f-16];S[f]=l<<1|l>>>31}var a=(c<<5|c>>>27)+h+S[f];f<20?a+=(o&n|~o&s)+1518500249:f<40?a+=(o^n^s)+1859775393:f<60?a+=(o&n|o&s|n&s)-1894007588:a+=(o^n^s)-899497514,h=s,s=n,n=o<<30|o>>>2,o=c,c=a}i[0]=i[0]+c|0,i[1]=i[1]+o|0,i[2]=i[2]+n|0,i[3]=i[3]+s|0,i[4]=i[4]+h|0},_doFinalize:function(){var t=this._data,d=t.words,i=this._nDataBytes*8,c=t.sigBytes*8;return d[c>>>5]|=128<<24-c%32,d[(c+64>>>9<<4)+14]=Math.floor(i/4294967296),d[(c+64>>>9<<4)+15]=i,t.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var t=g.clone.call(this);return t._hash=this._hash.clone(),t}});v.SHA1=g._createHelper(_),v.HmacSHA1=g._createHmacHelper(_)}(),P.SHA1})},4:function(W,q){},"55Ip":function(W,q,D){"use strict";D.d(q,"a",function(){return a});var P=D("Ty5D"),v=D("dI71"),C=D("q1tI"),N=D.n(C),g=D("YS25"),m=D("17x9"),S=D.n(m),_=D("wx14"),t=D("zLVn"),d=D("9R94"),i=function(E){Object(v.a)(w,E);function w(){for(var F,M=arguments.length,L=new Array(M),Y=0;Y<M;Y++)L[Y]=arguments[Y];return F=E.call.apply(E,[this].concat(L))||this,F.history=Object(g.a)(F.props),F}var T=w.prototype;return T.render=function(){return N.a.createElement(P.c,{history:this.history,children:this.props.children})},w}(N.a.Component),c=function(E){Object(v.a)(w,E);function w(){for(var F,M=arguments.length,L=new Array(M),Y=0;Y<M;Y++)L[Y]=arguments[Y];return F=E.call.apply(E,[this].concat(L))||this,F.history=Object(g.b)(F.props),F}var T=w.prototype;return T.render=function(){return N.a.createElement(P.c,{history:this.history,children:this.props.children})},w}(N.a.Component),o=function(w,T){return typeof w=="function"?w(T):w},n=function(w,T){return typeof w=="string"?Object(g.c)(w,null,null,T):w},s=function(w){return w},h=N.a.forwardRef;typeof h=="undefined"&&(h=s);function f(E){return!!(E.metaKey||E.altKey||E.ctrlKey||E.shiftKey)}var l=h(function(E,w){var T=E.innerRef,F=E.navigate,M=E.onClick,L=Object(t.a)(E,["innerRef","navigate","onClick"]),Y=L.target,K=Object(_.a)({},L,{onClick:function(H){try{M&&M(H)}catch(U){throw H.preventDefault(),U}!H.defaultPrevented&&H.button===0&&(!Y||Y==="_self")&&!f(H)&&(H.preventDefault(),F())}});return s!==h?K.ref=w||T:K.ref=T,N.a.createElement("a",K)}),a=h(function(E,w){var T=E.component,F=T===void 0?l:T,M=E.replace,L=E.to,Y=E.innerRef,K=Object(t.a)(E,["component","replace","to","innerRef"]);return N.a.createElement(P.e.Consumer,null,function(A){A||Object(d.a)(!1);var H=A.history,U=n(o(L,A.location),A.location),I=U?H.createHref(U):"",G=Object(_.a)({},K,{href:I,navigate:function(){var oe=o(L,A.location),de=M?H.replace:H.push;de(oe)}});return s!==h?G.ref=w||Y:G.innerRef=Y,N.a.createElement(F,G)})});if(!1)var r,x;var y=function(w){return w},p=N.a.forwardRef;typeof p=="undefined"&&(p=y);function R(){for(var E=arguments.length,w=new Array(E),T=0;T<E;T++)w[T]=arguments[T];return w.filter(function(F){return F}).join(" ")}var O=p(function(E,w){var T=E["aria-current"],F=T===void 0?"page":T,M=E.activeClassName,L=M===void 0?"active":M,Y=E.activeStyle,K=E.className,A=E.exact,H=E.isActive,U=E.location,I=E.sensitive,G=E.strict,ne=E.style,oe=E.to,de=E.innerRef,Oe=Object(t.a)(E,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return N.a.createElement(P.e.Consumer,null,function(Ae){Ae||Object(d.a)(!1);var pe=U||Ae.location,Se=n(o(oe,pe),pe),be=Se.pathname,se=be&&be.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),ee=se?Object(P.f)(pe.pathname,{path:se,exact:A,sensitive:I,strict:G}):null,B=!!(H?H(ee,pe):ee),V=B?R(K,L):K,X=B?Object(_.a)({},ne,{},Y):ne,Q=Object(_.a)({"aria-current":B&&F||null,className:V,style:X,to:Se},Oe);return y!==p?Q.ref=w||de:Q.innerRef=de,N.a.createElement(a,Q)})});if(!1)var b},"5VLF":function(W,q,D){"use strict";var P,v;function C(N,g,m){var S=function(_,t){return N.js_beautify(_,t)};return S.js=N.js_beautify,S.css=g.css_beautify,S.html=m.html_beautify,S.js_beautify=N.js_beautify,S.css_beautify=g.css_beautify,S.html_beautify=m.html_beautify,S}!(P=[D("6UM0"),D("TXwP"),D("psGv")],v=function(N,g,m){return C(N,g,m)}.apply(q,P),v!==void 0&&(W.exports=v))},"5Y4S":function(W,q,D){"use strict";D.d(q,"a",function(){return C});var P=D("MNsG");const v=P.b.performance&&typeof P.b.performance.now=="function";class C{constructor(N){this._highResolution=v&&N,this._startTime=this._now(),this._stopTime=-1}static create(N=!0){return new C(N)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?P.b.performance.now():Date.now()}}},"5hvy":function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("MlIO"))})(this,function(P){return function(v){var C=P,N=C.lib,g=N.WordArray,m=N.Hasher,S=C.x64,_=S.Word,t=C.algo,d=[],i=[],c=[];(function(){for(var s=1,h=0,f=0;f<24;f++){d[s+5*h]=(f+1)*(f+2)/2%64;var l=h%5,a=(2*s+3*h)%5;s=l,h=a}for(var s=0;s<5;s++)for(var h=0;h<5;h++)i[s+5*h]=h+(2*s+3*h)%5*5;for(var r=1,x=0;x<24;x++){for(var y=0,p=0,R=0;R<7;R++){if(r&1){var O=(1<<R)-1;O<32?p^=1<<O:y^=1<<O-32}r&128?r=r<<1^113:r<<=1}c[x]=_.create(y,p)}})();var o=[];(function(){for(var s=0;s<25;s++)o[s]=_.create()})();var n=t.SHA3=m.extend({cfg:m.cfg.extend({outputLength:512}),_doReset:function(){for(var s=this._state=[],h=0;h<25;h++)s[h]=new _.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(s,h){for(var f=this._state,l=this.blockSize/2,a=0;a<l;a++){var r=s[h+2*a],x=s[h+2*a+1];r=(r<<8|r>>>24)&16711935|(r<<24|r>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360;var y=f[a];y.high^=x,y.low^=r}for(var p=0;p<24;p++){for(var R=0;R<5;R++){for(var O=0,b=0,E=0;E<5;E++){var y=f[R+5*E];O^=y.high,b^=y.low}var w=o[R];w.high=O,w.low=b}for(var R=0;R<5;R++)for(var T=o[(R+4)%5],F=o[(R+1)%5],M=F.high,L=F.low,O=T.high^(M<<1|L>>>31),b=T.low^(L<<1|M>>>31),E=0;E<5;E++){var y=f[R+5*E];y.high^=O,y.low^=b}for(var Y=1;Y<25;Y++){var O,b,y=f[Y],K=y.high,A=y.low,H=d[Y];H<32?(O=K<<H|A>>>32-H,b=A<<H|K>>>32-H):(O=A<<H-32|K>>>64-H,b=K<<H-32|A>>>64-H);var U=o[i[Y]];U.high=O,U.low=b}var I=o[0],G=f[0];I.high=G.high,I.low=G.low;for(var R=0;R<5;R++)for(var E=0;E<5;E++){var Y=R+5*E,y=f[Y],ne=o[Y],oe=o[(R+1)%5+5*E],de=o[(R+2)%5+5*E];y.high=ne.high^~oe.high&de.high,y.low=ne.low^~oe.low&de.low}var y=f[0],Oe=c[p];y.high^=Oe.high,y.low^=Oe.low}},_doFinalize:function(){var s=this._data,h=s.words,f=this._nDataBytes*8,l=s.sigBytes*8,a=this.blockSize*32;h[l>>>5]|=1<<24-l%32,h[(v.ceil((l+1)/a)*a>>>5)-1]|=128,s.sigBytes=h.length*4,this._process();for(var r=this._state,x=this.cfg.outputLength/8,y=x/8,p=[],R=0;R<y;R++){var O=r[R],b=O.high,E=O.low;b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,p.push(E),p.push(b)}return new g.init(p,x)},clone:function(){for(var s=m.clone.call(this),h=s._state=this._state.slice(0),f=0;f<25;f++)h[f]=h[f].clone();return s}});C.SHA3=m._createHelper(n),C.HmacSHA3=m._createHmacHelper(n)}(Math),P.SHA3})},"6+eU":function(W,q,D){"use strict";D.d(q,"a",function(){return p});var P=D("wx14"),v=D("rePB"),C=D("VTBJ"),N=D("1OyB"),g=D("vuIU"),m=D("Ji7U"),S=D("LK+K"),_=D("q1tI"),t=D.n(_),d=D("TSYQ"),i=D.n(d),c=function(O){var b,E="".concat(O.rootPrefixCls,"-item"),w=i()(E,"".concat(E,"-").concat(O.page),(b={},Object(v.a)(b,"".concat(E,"-active"),O.active),Object(v.a)(b,O.className,!!O.className),Object(v.a)(b,"".concat(E,"-disabled"),!O.page),b)),T=function(){O.onClick(O.page)},F=function(L){O.onKeyPress(L,O.onClick,O.page)};return t.a.createElement("li",{title:O.showTitle?O.page:null,className:w,onClick:T,onKeyPress:F,tabIndex:"0"},O.itemRender(O.page,"page",t.a.createElement("a",{rel:"nofollow"},O.page)))},o=c,n={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},s=function(R){Object(m.a)(b,R);var O=Object(S.a)(b);function b(){var E;Object(N.a)(this,b);for(var w=arguments.length,T=new Array(w),F=0;F<w;F++)T[F]=arguments[F];return E=O.call.apply(O,[this].concat(T)),E.state={goInputText:""},E.buildOptionText=function(M){return"".concat(M," ").concat(E.props.locale.items_per_page)},E.changeSize=function(M){E.props.changeSize(Number(M))},E.handleChange=function(M){E.setState({goInputText:M.target.value})},E.handleBlur=function(M){var L=E.props,Y=L.goButton,K=L.quickGo,A=L.rootPrefixCls,H=E.state.goInputText;if(Y||H==="")return;if(M.relatedTarget&&(M.relatedTarget.className.indexOf("".concat(A,"-prev"))>=0||M.relatedTarget.className.indexOf("".concat(A,"-next"))>=0))return;E.setState({goInputText:""}),K(E.getValidValue())},E.go=function(M){var L=E.state.goInputText;if(L==="")return;(M.keyCode===n.ENTER||M.type==="click")&&(E.setState({goInputText:""}),E.props.quickGo(E.getValidValue()))},E}return Object(g.a)(b,[{key:"getValidValue",value:function(){var w=this.state,T=w.goInputText,F=w.current;return!T||isNaN(T)?F:Number(T)}},{key:"getPageSizeOptions",value:function(){var w=this.props,T=w.pageSize,F=w.pageSizeOptions;return F.some(function(M){return M.toString()===T.toString()})?F:F.concat([T.toString()]).sort(function(M,L){var Y=isNaN(Number(M))?0:Number(M),K=isNaN(Number(L))?0:Number(L);return Y-K})}},{key:"render",value:function(){var w=this,T=this.props,F=T.pageSize,M=T.locale,L=T.rootPrefixCls,Y=T.changeSize,K=T.quickGo,A=T.goButton,H=T.selectComponentClass,U=T.buildOptionText,I=T.selectPrefixCls,G=T.disabled,ne=this.state.goInputText,oe="".concat(L,"-options"),de=H,Oe=null,Ae=null,pe=null;if(!Y&&!K)return null;var Se=this.getPageSizeOptions();if(Y&&de){var be=Se.map(function(se,ee){return t.a.createElement(de.Option,{key:ee,value:se.toString()},(U||w.buildOptionText)(se))});Oe=t.a.createElement(de,{disabled:G,prefixCls:I,showSearch:!1,className:"".concat(oe,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(F||Se[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ee){return ee.parentNode}},be)}return K&&(A&&(pe=typeof A=="boolean"?t.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:G,className:"".concat(oe,"-quick-jumper-button")},M.jump_to_confirm):t.a.createElement("span",{onClick:this.go,onKeyUp:this.go},A)),Ae=t.a.createElement("div",{className:"".concat(oe,"-quick-jumper")},M.jump_to,t.a.createElement("input",{disabled:G,type:"text",value:ne,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),M.page,pe)),t.a.createElement("li",{className:"".concat(oe)},Oe,Ae)}}]),b}(t.a.Component);s.defaultProps={pageSizeOptions:["10","20","50","100"]};var h=s,f=D("N2Kk");function l(){}function a(R){return typeof R=="number"&&isFinite(R)&&Math.floor(R)===R}function r(R,O,b){return b}function x(R,O,b){var E=typeof R=="undefined"?O.pageSize:R;return Math.floor((b.total-1)/E)+1}var y=function(R){Object(m.a)(b,R);var O=Object(S.a)(b);function b(E){var w;Object(N.a)(this,b),w=O.call(this,E),w.getJumpPrevPage=function(){return Math.max(1,w.state.current-(w.props.showLessItems?3:5))},w.getJumpNextPage=function(){return Math.min(x(void 0,w.state,w.props),w.state.current+(w.props.showLessItems?3:5))},w.getItemIcon=function(Y,K){var A=w.props.prefixCls,H=Y||t.a.createElement("button",{type:"button","aria-label":K,className:"".concat(A,"-item-link")});return typeof Y=="function"&&(H=t.a.createElement(Y,Object(C.a)({},w.props))),H},w.savePaginationNode=function(Y){w.paginationNode=Y},w.isValid=function(Y){return a(Y)&&Y!==w.state.current},w.shouldDisplayQuickJumper=function(){var Y=w.props,K=Y.showQuickJumper,A=Y.pageSize,H=Y.total;return H<=A?!1:K},w.handleKeyDown=function(Y){(Y.keyCode===n.ARROW_UP||Y.keyCode===n.ARROW_DOWN)&&Y.preventDefault()},w.handleKeyUp=function(Y){var K=w.getValidValue(Y),A=w.state.currentInputValue;K!==A&&w.setState({currentInputValue:K}),Y.keyCode===n.ENTER?w.handleChange(K):Y.keyCode===n.ARROW_UP?w.handleChange(K-1):Y.keyCode===n.ARROW_DOWN&&w.handleChange(K+1)},w.changePageSize=function(Y){var K=w.state.current,A=x(Y,w.state,w.props);K=K>A?A:K,A===0&&(K=w.state.current),typeof Y=="number"&&("pageSize"in w.props||w.setState({pageSize:Y}),"current"in w.props||w.setState({current:K,currentInputValue:K})),w.props.onShowSizeChange(K,Y),"onChange"in w.props&&w.props.onChange&&w.props.onChange(K,Y)},w.handleChange=function(Y){var K=w.props.disabled,A=Y;if(w.isValid(A)&&!K){var H=x(void 0,w.state,w.props);A>H?A=H:A<1&&(A=1),"current"in w.props||w.setState({current:A,currentInputValue:A});var U=w.state.pageSize;return w.props.onChange(A,U),A}return w.state.current},w.prev=function(){w.hasPrev()&&w.handleChange(w.state.current-1)},w.next=function(){w.hasNext()&&w.handleChange(w.state.current+1)},w.jumpPrev=function(){w.handleChange(w.getJumpPrevPage())},w.jumpNext=function(){w.handleChange(w.getJumpNextPage())},w.hasPrev=function(){return w.state.current>1},w.hasNext=function(){return w.state.current<x(void 0,w.state,w.props)},w.runIfEnter=function(Y,K){if(Y.key==="Enter"||Y.charCode===13){for(var A=arguments.length,H=new Array(A>2?A-2:0),U=2;U<A;U++)H[U-2]=arguments[U];K.apply(void 0,H)}},w.runIfEnterPrev=function(Y){w.runIfEnter(Y,w.prev)},w.runIfEnterNext=function(Y){w.runIfEnter(Y,w.next)},w.runIfEnterJumpPrev=function(Y){w.runIfEnter(Y,w.jumpPrev)},w.runIfEnterJumpNext=function(Y){w.runIfEnter(Y,w.jumpNext)},w.handleGoTO=function(Y){(Y.keyCode===n.ENTER||Y.type==="click")&&w.handleChange(w.state.currentInputValue)};var T=E.onChange!==l,F="current"in E;F&&!T&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var M=E.defaultCurrent;"current"in E&&(M=E.current);var L=E.defaultPageSize;return"pageSize"in E&&(L=E.pageSize),M=Math.min(M,x(L,void 0,E)),w.state={current:M,currentInputValue:M,pageSize:L},w}return Object(g.a)(b,[{key:"componentDidUpdate",value:function(w,T){var F=this.props.prefixCls;if(T.current!==this.state.current&&this.paginationNode){var M=this.paginationNode.querySelector(".".concat(F,"-item-").concat(T.current));M&&document.activeElement===M&&M.blur()}}},{key:"getValidValue",value:function(w){var T=w.target.value,F=x(void 0,this.state,this.props),M=this.state.currentInputValue,L;return T===""?L=T:isNaN(Number(T))?L=M:T>=F?L=F:L=Number(T),L}},{key:"getShowSizeChanger",value:function(){var w=this.props,T=w.showSizeChanger,F=w.total,M=w.totalBoundaryShowSizeChanger;return typeof T!="undefined"?T:F>M}},{key:"renderPrev",value:function(w){var T=this.props,F=T.prevIcon,M=T.itemRender,L=M(w,"prev",this.getItemIcon(F,"prev page")),Y=!this.hasPrev();return Object(_.isValidElement)(L)?Object(_.cloneElement)(L,{disabled:Y}):L}},{key:"renderNext",value:function(w){var T=this.props,F=T.nextIcon,M=T.itemRender,L=M(w,"next",this.getItemIcon(F,"next page")),Y=!this.hasNext();return Object(_.isValidElement)(L)?Object(_.cloneElement)(L,{disabled:Y}):L}},{key:"render",value:function(){var w=this,T=this.props,F=T.prefixCls,M=T.className,L=T.style,Y=T.disabled,K=T.hideOnSinglePage,A=T.total,H=T.locale,U=T.showQuickJumper,I=T.showLessItems,G=T.showTitle,ne=T.showTotal,oe=T.simple,de=T.itemRender,Oe=T.showPrevNextJumpers,Ae=T.jumpPrevIcon,pe=T.jumpNextIcon,Se=T.selectComponentClass,be=T.selectPrefixCls,se=T.pageSizeOptions,ee=this.state,B=ee.current,V=ee.pageSize,X=ee.currentInputValue;if(K===!0&&A<=V)return null;var Q=x(void 0,this.state,this.props),Z=[],ie=null,re=null,$=null,J=null,le=null,ue=U&&U.goButton,xe=I?1:2,Me=B-1>0?B-1:0,Xe=B+1<Q?B+1:Q,$e=Object.keys(this.props).reduce(function(ge,ye){return(ye.substr(0,5)==="data-"||ye.substr(0,5)==="aria-"||ye==="role")&&(ge[ye]=w.props[ye]),ge},{});if(oe)return ue&&(typeof ue=="boolean"?le=t.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},H.jump_to_confirm):le=t.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ue),le=t.a.createElement("li",{title:G?"".concat(H.jump_to).concat(B,"/").concat(Q):null,className:"".concat(F,"-simple-pager")},le)),t.a.createElement("ul",Object(P.a)({className:i()(F,"".concat(F,"-simple"),Object(v.a)({},"".concat(F,"-disabled"),Y),M),style:L,ref:this.savePaginationNode},$e),t.a.createElement("li",{title:G?H.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:i()("".concat(F,"-prev"),Object(v.a)({},"".concat(F,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Me)),t.a.createElement("li",{title:G?"".concat(B,"/").concat(Q):null,className:"".concat(F,"-simple-pager")},t.a.createElement("input",{type:"text",value:X,disabled:Y,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),t.a.createElement("span",{className:"".concat(F,"-slash")},"/"),Q),t.a.createElement("li",{title:G?H.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:i()("".concat(F,"-next"),Object(v.a)({},"".concat(F,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Xe)),le);if(Q<=3+xe*2){var Je={locale:H,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:G,itemRender:de};Q||Z.push(t.a.createElement(o,Object(P.a)({},Je,{key:"noPager",page:Q,className:"".concat(F,"-disabled")})));for(var rt=1;rt<=Q;rt+=1){var it=B===rt;Z.push(t.a.createElement(o,Object(P.a)({},Je,{key:rt,page:rt,active:it})))}}else{var je=I?H.prev_3:H.prev_5,Ie=I?H.next_3:H.next_5;Oe&&(ie=t.a.createElement("li",{title:G?je:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:i()("".concat(F,"-jump-prev"),Object(v.a)({},"".concat(F,"-jump-prev-custom-icon"),!!Ae))},de(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Ae,"prev page"))),re=t.a.createElement("li",{title:G?Ie:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:i()("".concat(F,"-jump-next"),Object(v.a)({},"".concat(F,"-jump-next-custom-icon"),!!pe))},de(this.getJumpNextPage(),"jump-next",this.getItemIcon(pe,"next page")))),J=t.a.createElement(o,{locale:H,last:!0,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Q,page:Q,active:!1,showTitle:G,itemRender:de}),$=t.a.createElement(o,{locale:H,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:G,itemRender:de});var qe=Math.max(1,B-xe),st=Math.min(B+xe,Q);B-1<=xe&&(st=1+xe*2),Q-B<=xe&&(qe=Q-xe*2);for(var Ee=qe;Ee<=st;Ee+=1){var ce=B===Ee;Z.push(t.a.createElement(o,{locale:H,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ee,page:Ee,active:ce,showTitle:G,itemRender:de}))}B-1>=xe*2&&B!==1+2&&(Z[0]=Object(_.cloneElement)(Z[0],{className:"".concat(F,"-item-after-jump-prev")}),Z.unshift(ie)),Q-B>=xe*2&&B!==Q-2&&(Z[Z.length-1]=Object(_.cloneElement)(Z[Z.length-1],{className:"".concat(F,"-item-before-jump-next")}),Z.push(re)),qe!==1&&Z.unshift($),st!==Q&&Z.push(J)}var fe=null;ne&&(fe=t.a.createElement("li",{className:"".concat(F,"-total-text")},ne(A,[A===0?0:(B-1)*V+1,B*V>A?A:B*V])));var ve=!this.hasPrev()||!Q,Ce=!this.hasNext()||!Q;return t.a.createElement("ul",Object(P.a)({className:i()(F,M,Object(v.a)({},"".concat(F,"-disabled"),Y)),style:L,unselectable:"unselectable",ref:this.savePaginationNode},$e),fe,t.a.createElement("li",{title:G?H.prev_page:null,onClick:this.prev,tabIndex:ve?null:0,onKeyPress:this.runIfEnterPrev,className:i()("".concat(F,"-prev"),Object(v.a)({},"".concat(F,"-disabled"),ve)),"aria-disabled":ve},this.renderPrev(Me)),Z,t.a.createElement("li",{title:G?H.next_page:null,onClick:this.next,tabIndex:Ce?null:0,onKeyPress:this.runIfEnterNext,className:i()("".concat(F,"-next"),Object(v.a)({},"".concat(F,"-disabled"),Ce)),"aria-disabled":Ce},this.renderNext(Xe)),t.a.createElement(h,{disabled:Y,locale:H,rootPrefixCls:F,selectComponentClass:Se,selectPrefixCls:be,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:B,pageSize:V,pageSizeOptions:se,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ue}))}}],[{key:"getDerivedStateFromProps",value:function(w,T){var F={};if("current"in w&&(F.current=w.current,w.current!==T.current&&(F.currentInputValue=F.current)),"pageSize"in w&&w.pageSize!==T.pageSize){var M=T.current,L=x(w.pageSize,T,w);M=M>L?L:M,"current"in w||(F.current=M,F.currentInputValue=M),F.pageSize=w.pageSize}return F}}]),b}(t.a.Component);y.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:l,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:l,locale:f.a,style:{},itemRender:r,totalBoundaryShowSizeChanger:50};var p=y},"6RRn":function(W,q,D){"use strict";var P=D("wCXF"),v=D("n6Qo");D.d(q,"b",function(){return v.a});var C=D("IBYe"),N=D("6eGT"),g=D("hW8S");D.d(q,"a",function(){return g.a}),q.c=P.b},"6UM0":function(W,q,D){var P,v;(function(){var C;(function(){"use strict";var g=[function(t,d,i){var c=i(1).Beautifier,o=i(5).Options;function n(s,h){var f=new c(s,h);return f.beautify()}t.exports=n,t.exports.defaultOptions=function(){return new o}},function(t,d,i){var c=i(2).Output,o=i(3).Token,n=i(4),s=i(5).Options,h=i(7).Tokenizer,f=i(7).line_starters,l=i(7).positionable_operators,a=i(7).TOKEN;function r(I,G){return G.indexOf(I)!==-1}function x(I){return I.replace(/^\s+/g,"")}function y(I){for(var G={},ne=0;ne<I.length;ne++)G[I[ne].replace(/-/g,"_")]=I[ne];return G}function p(I,G){return I&&I.type===a.RESERVED&&I.text===G}function R(I,G){return I&&I.type===a.RESERVED&&r(I.text,G)}var O=["case","return","do","if","throw","else","await","break","continue","async"],b=["before-newline","after-newline","preserve-newline"],E=y(b),w=[E.before_newline,E.preserve_newline],T={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function F(I,G){if(G.multiline_frame||G.mode===T.ForInitializer||G.mode===T.Conditional)return;I.remove_indent(G.start_line_index)}function M(I){I=I.replace(n.allLineBreaks,`
|
|
|
`);for(var G=[],ne=I.indexOf(`
|
|
|
`);ne!==-1;)G.push(I.substring(0,ne)),I=I.substring(ne+1),ne=I.indexOf(`
|
|
|
`);return I.length&&G.push(I),G}function L(I){return I===T.ArrayLiteral}function Y(I){return r(I,[T.Expression,T.ForInitializer,T.Conditional])}function K(I,G){for(var ne=0;ne<I.length;ne++){var oe=I[ne].trim();if(oe.charAt(0)!==G)return!1}return!0}function A(I,G){for(var ne=0,oe=I.length,de;ne<oe;ne++)if(de=I[ne],de&&de.indexOf(G)!==0)return!1;return!0}function H(I,G){G=G||{},this._source_text=I||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new s(G)}H.prototype.create_flags=function(I,G){var ne=0;I&&(ne=I.indentation_level,!this._output.just_added_newline()&&I.line_indent_level>ne&&(ne=I.line_indent_level));var oe={mode:G,parent:I,last_token:I?I.last_token:new o(a.START_BLOCK,""),last_word:I?I.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:ne,alignment:0,line_indent_level:I?I.line_indent_level:ne,start_line_index:this._output.get_line_number(),ternary_depth:0};return oe},H.prototype._reset=function(I){var G=I.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new c(this._options,G),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(T.BlockStatement);var ne=new h(I,this._options);return this._tokens=ne.tokenize(),I},H.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var I,G=this._reset(this._source_text),ne=this._options.eol;this._options.eol==="auto"&&(ne=`
|
|
|
`,G&&n.lineBreak.test(G||"")&&(ne=G.match(n.lineBreak)[0]));for(var oe=this._tokens.next();oe;)this.handle_token(oe),this._last_last_text=this._flags.last_token.text,this._flags.last_token=oe,oe=this._tokens.next();return I=this._output.get_code(ne),I},H.prototype.handle_token=function(I,G){I.type===a.START_EXPR?this.handle_start_expr(I):I.type===a.END_EXPR?this.handle_end_expr(I):I.type===a.START_BLOCK?this.handle_start_block(I):I.type===a.END_BLOCK?this.handle_end_block(I):I.type===a.WORD?this.handle_word(I):I.type===a.RESERVED?this.handle_word(I):I.type===a.SEMICOLON?this.handle_semicolon(I):I.type===a.STRING?this.handle_string(I):I.type===a.EQUALS?this.handle_equals(I):I.type===a.OPERATOR?this.handle_operator(I):I.type===a.COMMA?this.handle_comma(I):I.type===a.BLOCK_COMMENT?this.handle_block_comment(I,G):I.type===a.COMMENT?this.handle_comment(I,G):I.type===a.DOT?this.handle_dot(I):I.type===a.EOF?this.handle_eof(I):I.type===a.UNKNOWN?this.handle_unknown(I,G):this.handle_unknown(I,G)},H.prototype.handle_whitespace_and_comments=function(I,G){var ne=I.newlines,oe=this._options.keep_array_indentation&&L(this._flags.mode);if(I.comments_before)for(var de=I.comments_before.next();de;)this.handle_whitespace_and_comments(de,G),this.handle_token(de,G),de=I.comments_before.next();if(oe)for(var Oe=0;Oe<ne;Oe+=1)this.print_newline(Oe>0,G);else if(this._options.max_preserve_newlines&&ne>this._options.max_preserve_newlines&&(ne=this._options.max_preserve_newlines),this._options.preserve_newlines&&ne>1){this.print_newline(!1,G);for(var Ae=1;Ae<ne;Ae+=1)this.print_newline(!0,G)}};var U=["async","break","continue","return","throw","yield"];H.prototype.allow_wrap_or_preserved_newline=function(I,G){if(G=G===void 0?!1:G,this._output.just_added_newline())return;var ne=this._options.preserve_newlines&&I.newlines||G,oe=r(this._flags.last_token.text,l)||r(I.text,l);if(oe){var de=r(this._flags.last_token.text,l)&&r(this._options.operator_position,w)||r(I.text,l);ne=ne&&de}if(ne)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(R(this._flags.last_token,U))return;this._output.set_wrap_point()}},H.prototype.print_newline=function(I,G){if(!G&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var ne=this._tokens.peek();this._flags.mode===T.Statement&&!(this._flags.if_block&&p(ne,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(I)&&(this._flags.multiline_frame=!0)},H.prototype.print_token_line_indentation=function(I){this._output.just_added_newline()&&(this._options.keep_array_indentation&&I.newlines&&(I.text==="["||L(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(I.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},H.prototype.print_token=function(I){if(this._output.raw){this._output.add_raw_token(I);return}if(this._options.comma_first&&I.previous&&I.previous.type===a.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var G=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(G),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(I),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(I),this._output.non_breaking_space=!0,this._output.add_token(I.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},H.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},H.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},H.prototype.set_mode=function(I){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,I),this._flags=this.create_flags(this._previous_flags,I),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},H.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===T.Statement&&F(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},H.prototype.start_of_object_property=function(){return this._flags.parent.mode===T.ObjectLiteral&&this._flags.mode===T.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"]))},H.prototype.start_of_statement=function(I){var G=!1;return G=G||R(this._flags.last_token,["var","let","const"])&&I.type===a.WORD,G=G||p(this._flags.last_token,"do"),G=G||!(this._flags.parent.mode===T.ObjectLiteral&&this._flags.mode===T.Statement)&&R(this._flags.last_token,U)&&!I.newlines,G=G||p(this._flags.last_token,"else")&&!(p(I,"if")&&!I.comments_before),G=G||this._flags.last_token.type===a.END_EXPR&&(this._previous_flags.mode===T.ForInitializer||this._previous_flags.mode===T.Conditional),G=G||this._flags.last_token.type===a.WORD&&this._flags.mode===T.BlockStatement&&!this._flags.in_case&&!(I.text==="--"||I.text==="++")&&this._last_last_text!=="function"&&I.type!==a.WORD&&I.type!==a.RESERVED,G=G||this._flags.mode===T.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"])),G?(this.set_mode(T.Statement),this.indent(),this.handle_whitespace_and_comments(I,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(I,R(I,["do","for","if","while"])),!0):!1},H.prototype.handle_start_expr=function(I){this.start_of_statement(I)||this.handle_whitespace_and_comments(I);var G=T.Expression;if(I.text==="["){if(this._flags.last_token.type===a.WORD||this._flags.last_token.text===")"){R(this._flags.last_token,f)&&(this._output.space_before_token=!0),this.print_token(I),this.set_mode(G),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}G=T.ArrayLiteral,L(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),r(this._flags.last_token.type,[a.START_EXPR,a.END_EXPR,a.WORD,a.OPERATOR,a.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===a.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,G=T.ForInitializer):r(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,G=T.Conditional):r(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&I.whitespace_before===""?this._output.space_before_token=!1:(r(this._flags.last_token.text,f)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(I);else if(this._flags.last_token.type===a.WORD){this._output.space_before_token=!1;var ne=this._tokens.peek(-3);if(this._options.space_after_named_function&&ne){var oe=this._tokens.peek(-4);R(ne,["async","function"])||ne.text==="*"&&R(oe,["async","function"])?this._output.space_before_token=!0:this._flags.mode===T.ObjectLiteral?(ne.text==="{"||ne.text===","||ne.text==="*"&&(oe.text==="{"||oe.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(I);(this._flags.last_token.type===a.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(r(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&r(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===a.START_BLOCK?this.print_newline():(this._flags.last_token.type===a.END_EXPR||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===a.COMMA)&&this.allow_wrap_or_preserved_newline(I,I.newlines),this.print_token(I),this.set_mode(G),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},H.prototype.handle_end_expr=function(I){for(;this._flags.mode===T.Statement;)this.restore_mode();this.handle_whitespace_and_comments(I),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(I,I.text==="]"&&L(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===a.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(I),this.restore_mode(),F(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===T.Conditional&&(this._previous_flags.mode=T.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},H.prototype.handle_start_block=function(I){this.handle_whitespace_and_comments(I);var G=this._tokens.peek(),ne=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===a.END_EXPR?(this.set_mode(T.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(T.BlockStatement):ne&&(r(ne.text,[":",","])&&r(G.type,[a.STRING,a.WORD,a.RESERVED])||r(G.text,["get","set","..."])&&r(ne.type,[a.WORD,a.RESERVED]))?r(this._last_last_text,["class","interface"])&&!r(ne.text,[":",","])?this.set_mode(T.BlockStatement):this.set_mode(T.ObjectLiteral):this._flags.last_token.type===a.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(T.BlockStatement):r(this._flags.last_token.type,[a.EQUALS,a.START_EXPR,a.COMMA,a.OPERATOR])||R(this._flags.last_token,["return","throw","import","default"])?this.set_mode(T.ObjectLiteral):this.set_mode(T.BlockStatement),this._flags.last_token&&(R(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var oe=!G.comments_before&&G.text==="}",de=oe&&this._flags.last_word==="function"&&this._flags.last_token.type===a.END_EXPR;if(this._options.brace_preserve_inline){var Oe=0,Ae=null;this._flags.inline_frame=!0;do if(Oe+=1,Ae=this._tokens.peek(Oe-1),Ae.newlines){this._flags.inline_frame=!1;break}while(Ae.type!==a.EOF&&!(Ae.type===a.END_BLOCK&&Ae.opened===I))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&I.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==a.OPERATOR&&(de||this._flags.last_token.type===a.EQUALS||R(this._flags.last_token,O)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(L(this._previous_flags.mode)&&(this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.COMMA)&&((this._flags.last_token.type===a.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(I),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==a.OPERATOR&&this._flags.last_token.type!==a.START_EXPR&&(this._flags.last_token.type===a.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(I),this.indent(),!oe&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},H.prototype.handle_end_block=function(I){for(this.handle_whitespace_and_comments(I);this._flags.mode===T.Statement;)this.restore_mode();var G=this._flags.last_token.type===a.START_BLOCK;this._flags.inline_frame&&!G?this._output.space_before_token=!0:this._options.brace_style==="expand"?G||this.print_newline():G||(L(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(I)},H.prototype.handle_word=function(I){if(I.type===a.RESERVED){if(r(I.text,["set","get"])&&this._flags.mode!==T.ObjectLiteral)I.type=a.WORD;else if(I.text==="import"&&r(this._tokens.peek().text,["(","."]))I.type=a.WORD;else if(r(I.text,["as","from"])&&!this._flags.import_block)I.type=a.WORD;else if(this._flags.mode===T.ObjectLiteral){var G=this._tokens.peek();G.text===":"&&(I.type=a.WORD)}}if(this.start_of_statement(I)?R(this._flags.last_token,["var","let","const"])&&I.type===a.WORD&&(this._flags.declaration_statement=!0):I.newlines&&!Y(this._flags.mode)&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==a.EQUALS&&(this._options.preserve_newlines||!R(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(I),this.print_newline()):this.handle_whitespace_and_comments(I),this._flags.do_block&&!this._flags.do_while)if(p(I,"while")){this._output.space_before_token=!0,this.print_token(I),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&p(I,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===T.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&R(I,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(I),this._flags.in_case=!0;return}if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(I)),p(I,"function")){(r(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(r(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===a.OPERATOR))&&(!this._output.just_added_blankline()&&!I.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD?R(this._flags.last_token,["get","set","new","export"])||R(this._flags.last_token,U)?this._output.space_before_token=!0:p(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===a.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(Y(this._flags.mode)||L(this._flags.mode))||this.print_newline(),this.print_token(I),this._flags.last_word=I.text;return}var ne="NONE";if(this._flags.last_token.type===a.END_BLOCK?this._previous_flags.inline_frame?ne="SPACE":R(I,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&I.newlines?ne="NEWLINE":(ne="SPACE",this._output.space_before_token=!0):ne="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&this._flags.mode===T.BlockStatement?ne="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&Y(this._flags.mode)?ne="SPACE":this._flags.last_token.type===a.STRING?ne="NEWLINE":this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.last_token.text==="*"&&(r(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&r(this._last_last_text,["{",","]))?ne="SPACE":this._flags.last_token.type===a.START_BLOCK?this._flags.inline_frame?ne="SPACE":ne="NEWLINE":this._flags.last_token.type===a.END_EXPR&&(this._output.space_before_token=!0,ne="NEWLINE"),R(I,f)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ne="SPACE":ne="NEWLINE"),R(I,["else","catch","finally"]))if((!(this._flags.last_token.type===a.END_BLOCK&&this._previous_flags.mode===T.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&I.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var oe=this._output.current_line;oe.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ne==="NEWLINE"?R(this._flags.last_token,O)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&R(I,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==a.END_EXPR?(this._flags.last_token.type!==a.START_EXPR||!R(I,["var","let","const"]))&&this._flags.last_token.text!==":"&&(p(I,"if")&&p(I.previous,"else")?this._output.space_before_token=!0:this.print_newline()):R(I,f)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&L(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ne==="SPACE"&&(this._output.space_before_token=!0);I.previous&&(I.previous.type===a.WORD||I.previous.type===a.RESERVED)&&(this._output.space_before_token=!0),this.print_token(I),this._flags.last_word=I.text,I.type===a.RESERVED&&(I.text==="do"?this._flags.do_block=!0:I.text==="if"?this._flags.if_block=!0:I.text==="import"?this._flags.import_block=!0:this._flags.import_block&&p(I,"from")&&(this._flags.import_block=!1))},H.prototype.handle_semicolon=function(I){this.start_of_statement(I)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(I);for(var G=this._tokens.peek();this._flags.mode===T.Statement&&!(this._flags.if_block&&p(G,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(I)},H.prototype.handle_string=function(I){I.text.startsWith("`")&&I.newlines===0&&I.whitespace_before===""&&(I.previous.text===")"||this._flags.last_token.type===a.WORD)||(this.start_of_statement(I)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(I),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(I):I.text.startsWith("`")&&this._flags.last_token.type===a.END_EXPR&&(I.previous.text==="]"||I.previous.text===")")&&I.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(I)},H.prototype.handle_equals=function(I){this.start_of_statement(I)||this.handle_whitespace_and_comments(I),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(I),this._output.space_before_token=!0},H.prototype.handle_comma=function(I){this.handle_whitespace_and_comments(I,!0),this.print_token(I),this._output.space_before_token=!0,this._flags.declaration_statement?(Y(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(I)):this._flags.mode===T.ObjectLiteral||this._flags.mode===T.Statement&&this._flags.parent.mode===T.ObjectLiteral?(this._flags.mode===T.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(I)},H.prototype.handle_operator=function(I){var G=I.text==="*"&&(R(this._flags.last_token,["function","yield"])||r(this._flags.last_token.type,[a.START_BLOCK,a.COMMA,a.END_BLOCK,a.SEMICOLON])),ne=r(I.text,["-","+"])&&(r(this._flags.last_token.type,[a.START_BLOCK,a.START_EXPR,a.EQUALS,a.OPERATOR])||r(this._flags.last_token.text,f)||this._flags.last_token.text===",");if(!this.start_of_statement(I)){var oe=!G;this.handle_whitespace_and_comments(I,oe)}if(I.text==="*"&&this._flags.last_token.type===a.DOT){this.print_token(I);return}if(I.text==="::"){this.print_token(I);return}if(this._flags.last_token.type===a.OPERATOR&&r(this._options.operator_position,w)&&this.allow_wrap_or_preserved_newline(I),I.text===":"&&this._flags.in_case){this.print_token(I),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==a.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var de=!0,Oe=!0,Ae=!1;if(I.text===":"?this._flags.ternary_depth===0?de=!1:(this._flags.ternary_depth-=1,Ae=!0):I.text==="?"&&(this._flags.ternary_depth+=1),!ne&&!G&&this._options.preserve_newlines&&r(I.text,l)){var pe=I.text===":",Se=pe&&Ae,be=pe&&!Ae;switch(this._options.operator_position){case E.before_newline:this._output.space_before_token=!be,this.print_token(I),(!pe||Se)&&this.allow_wrap_or_preserved_newline(I),this._output.space_before_token=!0;return;case E.after_newline:this._output.space_before_token=!0,!pe||Se?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(I):this._output.space_before_token=!1,this.print_token(I),this._output.space_before_token=!0;return;case E.preserve_newline:be||this.allow_wrap_or_preserved_newline(I),de=!(this._output.just_added_newline()||be),this._output.space_before_token=de,this.print_token(I),this._output.space_before_token=!0;return}}if(G){this.allow_wrap_or_preserved_newline(I),de=!1;var se=this._tokens.peek();Oe=se&&r(se.type,[a.WORD,a.RESERVED])}else if(I.text==="...")this.allow_wrap_or_preserved_newline(I),de=this._flags.last_token.type===a.START_BLOCK,Oe=!1;else if(r(I.text,["--","++","!","~"])||ne){if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR)&&this.allow_wrap_or_preserved_newline(I),de=!1,Oe=!1,I.newlines&&(I.text==="--"||I.text==="++"||I.text==="~")){var ee=R(this._flags.last_token,O)&&I.newlines;ee&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ee,!0)}this._flags.last_token.text===";"&&Y(this._flags.mode)&&(de=!0),this._flags.last_token.type===a.RESERVED?de=!0:this._flags.last_token.type===a.END_EXPR?de=!(this._flags.last_token.text==="]"&&(I.text==="--"||I.text==="++")):this._flags.last_token.type===a.OPERATOR&&(de=r(I.text,["--","-","++","+"])&&r(this._flags.last_token.text,["--","-","++","+"]),r(I.text,["+","-"])&&r(this._flags.last_token.text,["--","++"])&&(Oe=!0)),(this._flags.mode===T.BlockStatement&&!this._flags.inline_frame||this._flags.mode===T.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||de,this.print_token(I),this._output.space_before_token=Oe},H.prototype.handle_block_comment=function(I,G){if(this._output.raw){this._output.add_raw_token(I),I.directives&&I.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(I.directives){this.print_newline(!1,G),this.print_token(I),I.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!n.newline.test(I.text)&&!I.newlines){this._output.space_before_token=!0,this.print_token(I),this._output.space_before_token=!0;return}else this.print_block_commment(I,G)},H.prototype.print_block_commment=function(I,G){var ne=M(I.text),oe,de=!1,Oe=!1,Ae=I.whitespace_before,pe=Ae.length;if(this.print_newline(!1,G),this.print_token_line_indentation(I),this._output.add_token(ne[0]),this.print_newline(!1,G),ne.length>1){for(ne=ne.slice(1),de=K(ne,"*"),Oe=A(ne,Ae),de&&(this._flags.alignment=1),oe=0;oe<ne.length;oe++)de?(this.print_token_line_indentation(I),this._output.add_token(x(ne[oe]))):Oe&&ne[oe]?(this.print_token_line_indentation(I),this._output.add_token(ne[oe].substring(pe))):(this._output.current_line.set_indent(-1),this._output.add_token(ne[oe])),this.print_newline(!1,G);this._flags.alignment=0}},H.prototype.handle_comment=function(I,G){I.newlines?this.print_newline(!1,G):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(I),this.print_newline(!1,G)},H.prototype.handle_dot=function(I){this.start_of_statement(I)||this.handle_whitespace_and_comments(I,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),R(this._flags.last_token,O)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(I,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(I)},H.prototype.handle_unknown=function(I,G){this.print_token(I),I.text[I.text.length-1]===`
|
|
|
`&&this.print_newline(!1,G)},H.prototype.handle_eof=function(I){for(;this._flags.mode===T.Statement;)this.restore_mode();this.handle_whitespace_and_comments(I)},t.exports.Beautifier=H},function(t){function d(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}d.prototype.clone_empty=function(){var o=new d(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},d.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},d.prototype.has_match=function(o){for(var n=this.__items.length-1;n>=0;n--)if(this.__items[n].match(o))return!0;return!1},d.prototype.set_indent=function(o,n){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=n||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},d.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},d.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},d.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},d.prototype.is_empty=function(){return this.__items.length===0},d.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},d.prototype.push=function(o){this.__items.push(o);var n=o.lastIndexOf(`
|
|
|
`);n!==-1?this.__character_count=o.length-n:this.__character_count+=o.length},d.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},d.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},d.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},d.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},d.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function i(o,n){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),n=n||"",o.indent_level>0&&(n=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}i.prototype.get_indent_size=function(o,n){var s=this.__base_string_length;return n=n||0,o<0&&(s=0),s+=o*this.__indent_size,s+=n,s},i.prototype.get_indent_string=function(o,n){var s=this.__base_string;return n=n||0,o<0&&(o=0,s=""),n+=o*this.__indent_size,this.__ensure_cache(n),s+=this.__cache[n],s},i.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var o=this.__cache.length,n=0,s="";this.__indent_size&&o>=this.__indent_size&&(n=Math.floor(o/this.__indent_size),o-=n*this.__indent_size,s=new Array(n+1).join(this.__indent_string)),o&&(s+=new Array(o+1).join(" ")),this.__cache.push(s)};function c(o,n){this.__indent_cache=new i(o,n),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new d(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(o,n){return this.__indent_cache.get_indent_string(o,n)},c.prototype.get_indent_size=function(o,n){return this.__indent_cache.get_indent_size(o,n)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(o){this.trim(!0);var n=this.current_line.pop();n&&(n[n.length-1]===`
|
|
|
`&&(n=n.replace(/\n+$/g,"")),this.current_line.push(n)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
|
|
|
`);return o!==`
|
|
|
`&&(s=s.replace(/[\n]/g,o)),s},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(o,n){return o=o||0,n=n||0,this.next_line.set_indent(o,n),this.__lines.length>1?(this.current_line.set_indent(o,n),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(o){for(var n=0;n<o.newlines;n++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},c.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},c.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},c.prototype.remove_indent=function(o){for(var n=this.__lines.length;o<n;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},c.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},c.prototype.just_added_newline=function(){return this.current_line.is_empty()},c.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},c.prototype.ensure_empty_line_above=function(o,n){for(var s=this.__lines.length-2;s>=0;){var h=this.__lines[s];if(h.is_empty())break;if(h.item(0).indexOf(o)!==0&&h.item(-1)!==n){this.__lines.splice(s+1,0,new d(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},t.exports.Output=c},function(t){function d(i,c,o,n){this.type=i,this.text=c,this.comments_before=null,this.newlines=o||0,this.whitespace_before=n||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}t.exports.Token=d},function(t,d){var i="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",c="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",o="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",n="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",s="(?:\\\\u[0-9a-fA-F]{4}|["+i+o+"])",h="(?:\\\\u[0-9a-fA-F]{4}|["+c+o+n+"])*";d.identifier=new RegExp(s+h,"g"),d.identifierStart=new RegExp(s),d.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+c+o+n+"])+");var f=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;d.newline=/[\n\r\u2028\u2029]/,d.lineBreak=new RegExp(`\r
|
|
|
|`+d.newline.source),d.allLineBreaks=new RegExp(d.lineBreak.source,"g")},function(t,d,i){var c=i(6).Options,o=["before-newline","after-newline","preserve-newline"];function n(s){c.call(this,s,"js");var h=this.raw_options.brace_style||null;h==="expand-strict"?this.raw_options.brace_style="expand":h==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var f=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var l=0;l<f.length;l++)f[l]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=f[l];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",o),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}n.prototype=new c,t.exports.Options=n},function(t){function d(o,n){this.raw_options=i(o,n),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}d.prototype._get_array=function(o,n){var s=this.raw_options[o],h=n||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(h=s.concat()):typeof s=="string"&&(h=s.split(/[^a-zA-Z0-9_\/\-]+/)),h},d.prototype._get_boolean=function(o,n){var s=this.raw_options[o],h=s===void 0?!!n:!!s;return h},d.prototype._get_characters=function(o,n){var s=this.raw_options[o],h=n||"";return typeof s=="string"&&(h=s.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),h},d.prototype._get_number=function(o,n){var s=this.raw_options[o];n=parseInt(n,10),isNaN(n)&&(n=0);var h=parseInt(s,10);return isNaN(h)&&(h=n),h},d.prototype._get_selection=function(o,n,s){var h=this._get_selection_list(o,n,s);if(h.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
|
|
|
`+n+`
|
|
|
You passed in: '`+this.raw_options[o]+"'");return h[0]},d.prototype._get_selection_list=function(o,n,s){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[n[0]],!this._is_valid_selection(s,n))throw new Error("Invalid Default Value!");var h=this._get_array(o,s);if(!this._is_valid_selection(h,n))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
|
|
|
`+n+`
|
|
|
You passed in: '`+this.raw_options[o]+"'");return h},d.prototype._is_valid_selection=function(o,n){return o.length&&n.length&&!o.some(function(s){return n.indexOf(s)===-1})};function i(o,n){var s={};o=c(o);var h;for(h in o)h!==n&&(s[h]=o[h]);if(n&&o[n])for(h in o[n])s[h]=o[n][h];return s}function c(o){var n={},s;for(s in o){var h=s.replace(/-/g,"_");n[h]=o[s]}return n}t.exports.Options=d,t.exports.normalizeOpts=c,t.exports.mergeOpts=i},function(t,d,i){var c=i(8).InputScanner,o=i(9).Tokenizer,n=i(9).TOKEN,s=i(13).Directives,h=i(4),f=i(12).Pattern,l=i(14).TemplatablePattern;function a(K,A){return A.indexOf(K)!==-1}var r={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:n.START,RAW:n.RAW,EOF:n.EOF},x=new s(/\/\*/,/\*\//),y=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,p=/[0-9]/,R=/[^\d\.]/,O=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),b=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),b="\\?\\.(?!\\d) "+b,b=b.replace(/ /g,"|");var E=new RegExp(b),w="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),T=w.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),F=new RegExp("^(?:"+T.join("|")+")$"),M,L=function(K,A){o.call(this,K,A),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var H=new f(this._input),U=new l(this._input).read_options(this._options);this.__patterns={template:U,identifier:U.starting_with(h.identifier).matching(h.identifierMatch),number:H.matching(y),punct:H.matching(E),comment:H.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:H.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:H.matching(/<!--/),html_comment_end:H.matching(/-->/),include:H.starting_with(/#include/).until_after(h.lineBreak),shebang:H.starting_with(/#!/).until_after(h.lineBreak),xml:H.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:U.until(/['\\\n\r\u2028\u2029]/),double_quote:U.until(/["\\\n\r\u2028\u2029]/),template_text:U.until(/[`\\$]/),template_expression:U.until(/[`}\\]/)}};L.prototype=new o,L.prototype._is_comment=function(K){return K.type===r.COMMENT||K.type===r.BLOCK_COMMENT||K.type===r.UNKNOWN},L.prototype._is_opening=function(K){return K.type===r.START_BLOCK||K.type===r.START_EXPR},L.prototype._is_closing=function(K,A){return(K.type===r.END_BLOCK||K.type===r.END_EXPR)&&A&&(K.text==="]"&&A.text==="["||K.text===")"&&A.text==="("||K.text==="}"&&A.text==="{")},L.prototype._reset=function(){M=!1},L.prototype._get_next_token=function(K,A){var H=null;this._readWhitespace();var U=this._input.peek();return U===null?this._create_token(r.EOF,""):(H=H||this._read_non_javascript(U),H=H||this._read_string(U),H=H||this._read_word(K),H=H||this._read_singles(U),H=H||this._read_comment(U),H=H||this._read_regexp(U,K),H=H||this._read_xml(U,K),H=H||this._read_punctuation(),H=H||this._create_token(r.UNKNOWN,this._input.next()),H)},L.prototype._read_word=function(K){var A;if(A=this.__patterns.identifier.read(),A!=="")return A=A.replace(h.allLineBreaks,`
|
|
|
`),!(K.type===r.DOT||K.type===r.RESERVED&&(K.text==="set"||K.text==="get"))&&F.test(A)?(A==="in"||A==="of")&&(K.type===r.WORD||K.type===r.STRING)?this._create_token(r.OPERATOR,A):this._create_token(r.RESERVED,A):this._create_token(r.WORD,A);if(A=this.__patterns.number.read(),A!=="")return this._create_token(r.WORD,A)},L.prototype._read_singles=function(K){var A=null;return K==="("||K==="["?A=this._create_token(r.START_EXPR,K):K===")"||K==="]"?A=this._create_token(r.END_EXPR,K):K==="{"?A=this._create_token(r.START_BLOCK,K):K==="}"?A=this._create_token(r.END_BLOCK,K):K===";"?A=this._create_token(r.SEMICOLON,K):K==="."&&R.test(this._input.peek(1))?A=this._create_token(r.DOT,K):K===","&&(A=this._create_token(r.COMMA,K)),A&&this._input.next(),A},L.prototype._read_punctuation=function(){var K=this.__patterns.punct.read();if(K!=="")return K==="="?this._create_token(r.EQUALS,K):K==="?."?this._create_token(r.DOT,K):this._create_token(r.OPERATOR,K)},L.prototype._read_non_javascript=function(K){var A="";if(K==="#"){if(this._is_first_token()&&(A=this.__patterns.shebang.read(),A))return this._create_token(r.UNKNOWN,A.trim()+`
|
|
|
`);if(A=this.__patterns.include.read(),A)return this._create_token(r.UNKNOWN,A.trim()+`
|
|
|
`);K=this._input.next();var H="#";if(this._input.hasNext()&&this._input.testChar(p)){do K=this._input.next(),H+=K;while(this._input.hasNext()&&K!=="#"&&K!=="=");return K==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(H+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(H+="{}",this._input.next(),this._input.next())),this._create_token(r.WORD,H)}this._input.back()}else if(K==="<"&&this._is_first_token()){if(A=this.__patterns.html_comment_start.read(),A){for(;this._input.hasNext()&&!this._input.testChar(h.newline);)A+=this._input.next();return M=!0,this._create_token(r.COMMENT,A)}}else if(M&&K==="-"&&(A=this.__patterns.html_comment_end.read(),A))return M=!1,this._create_token(r.COMMENT,A);return null},L.prototype._read_comment=function(K){var A=null;if(K==="/"){var H="";if(this._input.peek(1)==="*"){H=this.__patterns.block_comment.read();var U=x.get_directives(H);U&&U.ignore==="start"&&(H+=x.readIgnored(this._input)),H=H.replace(h.allLineBreaks,`
|
|
|
`),A=this._create_token(r.BLOCK_COMMENT,H),A.directives=U}else this._input.peek(1)==="/"&&(H=this.__patterns.comment.read(),A=this._create_token(r.COMMENT,H))}return A},L.prototype._read_string=function(K){if(K==="`"||K==="'"||K==='"'){var A=this._input.next();return this.has_char_escapes=!1,K==="`"?A+=this._read_string_recursive("`",!0,"${"):A+=this._read_string_recursive(K),this.has_char_escapes&&this._options.unescape_strings&&(A=Y(A)),this._input.peek()===K&&(A+=this._input.next()),A=A.replace(h.allLineBreaks,`
|
|
|
`),this._create_token(r.STRING,A)}return null},L.prototype._allow_regexp_or_xml=function(K){return K.type===r.RESERVED&&a(K.text,["return","case","throw","else","do","typeof","yield"])||K.type===r.END_EXPR&&K.text===")"&&K.opened.previous.type===r.RESERVED&&a(K.opened.previous.text,["if","while","for"])||a(K.type,[r.COMMENT,r.START_EXPR,r.START_BLOCK,r.START,r.END_BLOCK,r.OPERATOR,r.EQUALS,r.EOF,r.SEMICOLON,r.COMMA])},L.prototype._read_regexp=function(K,A){if(K==="/"&&this._allow_regexp_or_xml(A)){for(var H=this._input.next(),U=!1,I=!1;this._input.hasNext()&&(U||I||this._input.peek()!==K)&&!this._input.testChar(h.newline);)H+=this._input.peek(),U?U=!1:(U=this._input.peek()==="\\",this._input.peek()==="["?I=!0:this._input.peek()==="]"&&(I=!1)),this._input.next();return this._input.peek()===K&&(H+=this._input.next(),H+=this._input.read(h.identifier)),this._create_token(r.STRING,H)}return null},L.prototype._read_xml=function(K,A){if(this._options.e4x&&K==="<"&&this._allow_regexp_or_xml(A)){var H="",U=this.__patterns.xml.read_match();if(U){for(var I=U[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),G=I.indexOf("{")===0,ne=0;U;){var oe=!!U[1],de=U[2],Oe=!!U[U.length-1]||de.slice(0,8)==="![CDATA[";if(!Oe&&(de===I||G&&de.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(oe?--ne:++ne),H+=U[0],ne<=0)break;U=this.__patterns.xml.read_match()}return U||(H+=this._input.match(/[\s\S]*/g)[0]),H=H.replace(h.allLineBreaks,`
|
|
|
`),this._create_token(r.STRING,H)}}return null};function Y(K){for(var A="",H=0,U=new c(K),I=null;U.hasNext();)if(I=U.match(/([\s]|[^\\]|\\\\)+/g),I&&(A+=I[0]),U.peek()==="\\"){if(U.next(),U.peek()==="x")I=U.match(/x([0-9A-Fa-f]{2})/g);else if(U.peek()==="u")I=U.match(/u([0-9A-Fa-f]{4})/g);else{A+="\\",U.hasNext()&&(A+=U.next());continue}if(!I)return K;if(H=parseInt(I[1],16),H>126&&H<=255&&I[0].indexOf("x")===0)return K;if(H>=0&&H<32){A+="\\"+I[0];continue}else H===34||H===39||H===92?A+="\\"+String.fromCharCode(H):A+=String.fromCharCode(H)}return A}L.prototype._read_string_recursive=function(K,A,H){var U,I;K==="'"?I=this.__patterns.single_quote:K==='"'?I=this.__patterns.double_quote:K==="`"?I=this.__patterns.template_text:K==="}"&&(I=this.__patterns.template_expression);for(var G=I.read(),ne="";this._input.hasNext();){if(ne=this._input.next(),ne===K||!A&&h.newline.test(ne)){this._input.back();break}else ne==="\\"&&this._input.hasNext()?(U=this._input.peek(),U==="x"||U==="u"?this.has_char_escapes=!0:U==="\r"&&this._input.peek(1)===`
|
|
|
`&&this._input.next(),ne+=this._input.next()):H&&(H==="${"&&ne==="$"&&this._input.peek()==="{"&&(ne+=this._input.next()),H===ne&&(K==="`"?ne+=this._read_string_recursive("}",A,"`"):ne+=this._read_string_recursive("`",A,"${"),this._input.hasNext()&&(ne+=this._input.next())));ne+=I.read(),G+=ne}return G},t.exports.Tokenizer=L,t.exports.TOKEN=r,t.exports.positionable_operators=O.slice(),t.exports.line_starters=w.slice()},function(t){var d=RegExp.prototype.hasOwnProperty("sticky");function i(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}i.prototype.restart=function(){this.__position=0},i.prototype.back=function(){this.__position>0&&(this.__position-=1)},i.prototype.hasNext=function(){return this.__position<this.__input_length},i.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__input.charAt(this.__position),this.__position+=1),c},i.prototype.peek=function(c){var o=null;return c=c||0,c+=this.__position,c>=0&&c<this.__input_length&&(o=this.__input.charAt(c)),o},i.prototype.__match=function(c,o){c.lastIndex=o;var n=c.exec(this.__input);return n&&!(d&&c.sticky)&&(n.index!==o&&(n=null)),n},i.prototype.test=function(c,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(c,o):!1},i.prototype.testChar=function(c,o){var n=this.peek(o);return c.lastIndex=0,n!==null&&c.test(n)},i.prototype.match=function(c){var o=this.__match(c,this.__position);return o?this.__position+=o[0].length:o=null,o},i.prototype.read=function(c,o,n){var s="",h;return c&&(h=this.match(c),h&&(s+=h[0])),o&&(h||!c)&&(s+=this.readUntil(o,n)),s},i.prototype.readUntil=function(c,o){var n="",s=this.__position;c.lastIndex=this.__position;var h=c.exec(this.__input);return h?(s=h.index,o&&(s+=h[0].length)):s=this.__input_length,n=this.__input.substring(this.__position,s),this.__position=s,n},i.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},i.prototype.get_regexp=function(c,o){var n=null,s="g";return o&&d&&(s="y"),typeof c=="string"&&c!==""?n=new RegExp(c,s):c&&(n=new RegExp(c.source,s)),n},i.prototype.get_literal_regexp=function(c){return RegExp(c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},i.prototype.peekUntilAfter=function(c){var o=this.__position,n=this.readUntilAfter(c);return this.__position=o,n},i.prototype.lookBack=function(c){var o=this.__position-1;return o>=c.length&&this.__input.substring(o-c.length,o).toLowerCase()===c},t.exports.InputScanner=i},function(t,d,i){var c=i(8).InputScanner,o=i(3).Token,n=i(10).TokenStream,s=i(11).WhitespacePattern,h={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},f=function(l,a){this._input=new c(l),this._options=a||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};f.prototype.tokenize=function(){this._input.restart(),this.__tokens=new n,this._reset();for(var l,a=new o(h.START,""),r=null,x=[],y=new n;a.type!==h.EOF;){for(l=this._get_next_token(a,r);this._is_comment(l);)y.add(l),l=this._get_next_token(a,r);y.isEmpty()||(l.comments_before=y,y=new n),l.parent=r,this._is_opening(l)?(x.push(r),r=l):r&&this._is_closing(l,r)&&(l.opened=r,r.closed=l,r=x.pop(),l.parent=r),l.previous=a,a.next=l,this.__tokens.add(l),a=l}return this.__tokens},f.prototype._is_first_token=function(){return this.__tokens.isEmpty()},f.prototype._reset=function(){},f.prototype._get_next_token=function(l,a){this._readWhitespace();var r=this._input.read(/.+/g);return r?this._create_token(h.RAW,r):this._create_token(h.EOF,"")},f.prototype._is_comment=function(l){return!1},f.prototype._is_opening=function(l){return!1},f.prototype._is_closing=function(l,a){return!1},f.prototype._create_token=function(l,a){var r=new o(l,a,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return r},f.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=f,t.exports.TOKEN=h},function(t){function d(i){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=i}d.prototype.restart=function(){this.__position=0},d.prototype.isEmpty=function(){return this.__tokens_length===0},d.prototype.hasNext=function(){return this.__position<this.__tokens_length},d.prototype.next=function(){var i=null;return this.hasNext()&&(i=this.__tokens[this.__position],this.__position+=1),i},d.prototype.peek=function(i){var c=null;return i=i||0,i+=this.__position,i>=0&&i<this.__tokens_length&&(c=this.__tokens[i]),c},d.prototype.add=function(i){this.__parent_token&&(i.parent=this.__parent_token),this.__tokens.push(i),this.__tokens_length+=1},t.exports.TokenStream=d},function(t,d,i){var c=i(12).Pattern;function o(n,s){c.call(this,n,s),s?this._line_regexp=this._input.get_regexp(s._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}o.prototype=new c,o.prototype.__set_whitespace_patterns=function(n,s){n+="\\t ",s+="\\n\\r",this._match_pattern=this._input.get_regexp("["+n+s+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+s+"]")},o.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var n=this._input.read(this._match_pattern);if(n===" ")this.whitespace_before_token=" ";else if(n){var s=this.__split(this._newline_regexp,n);this.newline_count=s.length-1,this.whitespace_before_token=s[this.newline_count]}return n},o.prototype.matching=function(n,s){var h=this._create();return h.__set_whitespace_patterns(n,s),h._update(),h},o.prototype._create=function(){return new o(this._input,this)},o.prototype.__split=function(n,s){n.lastIndex=0;for(var h=0,f=[],l=n.exec(s);l;)f.push(s.substring(h,l.index)),h=l.index+l[0].length,l=n.exec(s);return h<s.length?f.push(s.substring(h,s.length)):f.push(""),f},t.exports.WhitespacePattern=o},function(t){function d(i,c){this._input=i,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,c&&(this._starting_pattern=this._input.get_regexp(c._starting_pattern,!0),this._match_pattern=this._input.get_regexp(c._match_pattern,!0),this._until_pattern=this._input.get_regexp(c._until_pattern),this._until_after=c._until_after)}d.prototype.read=function(){var i=this._input.read(this._starting_pattern);return(!this._starting_pattern||i)&&(i+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),i},d.prototype.read_match=function(){return this._input.match(this._match_pattern)},d.prototype.until_after=function(i){var c=this._create();return c._until_after=!0,c._until_pattern=this._input.get_regexp(i),c._update(),c},d.prototype.until=function(i){var c=this._create();return c._until_after=!1,c._until_pattern=this._input.get_regexp(i),c._update(),c},d.prototype.starting_with=function(i){var c=this._create();return c._starting_pattern=this._input.get_regexp(i,!0),c._update(),c},d.prototype.matching=function(i){var c=this._create();return c._match_pattern=this._input.get_regexp(i,!0),c._update(),c},d.prototype._create=function(){return new d(this._input,this)},d.prototype._update=function(){},t.exports.Pattern=d},function(t){function d(i,c){i=typeof i=="string"?i:i.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(i+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(i+/\sbeautify\signore:end\s/.source+c,"g")}d.prototype.get_directives=function(i){if(!i.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(i);o;)c[o[1]]=o[2],o=this.__directive_pattern.exec(i);return c},d.prototype.readIgnored=function(i){return i.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=d},function(t,d,i){var c=i(12).Pattern,o={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function n(s,h){c.call(this,s,h),this.__template_pattern=null,this._disabled=Object.assign({},o),this._excluded=Object.assign({},o),h&&(this.__template_pattern=this._input.get_regexp(h.__template_pattern),this._excluded=Object.assign(this._excluded,h._excluded),this._disabled=Object.assign(this._disabled,h._disabled));var f=new c(s);this.__patterns={handlebars_comment:f.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:f.starting_with(/{{{/).until_after(/}}}/),handlebars:f.starting_with(/{{/).until_after(/}}/),php:f.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:f.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:f.starting_with(/{%/).until_after(/%}/),django_value:f.starting_with(/{{/).until_after(/}}/),django_comment:f.starting_with(/{#/).until_after(/#}/),smarty:f.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:f.starting_with(/{\*/).until_after(/\*}/),smarty_literal:f.starting_with(/{literal}/).until_after(/{\/literal}/)}}n.prototype=new c,n.prototype._create=function(){return new n(this._input,this)},n.prototype._update=function(){this.__set_templated_pattern()},n.prototype.disable=function(s){var h=this._create();return h._disabled[s]=!0,h._update(),h},n.prototype.read_options=function(s){var h=this._create();for(var f in o)h._disabled[f]=s.templating.indexOf(f)===-1;return h._update(),h},n.prototype.exclude=function(s){var h=this._create();return h._excluded[s]=!0,h._update(),h},n.prototype.read=function(){var s="";this._match_pattern?s=this._input.read(this._starting_pattern):s=this._input.read(this._starting_pattern,this.__template_pattern);for(var h=this._read_template();h;)this._match_pattern?h+=this._input.read(this._match_pattern):h+=this._input.readUntil(this.__template_pattern),s+=h,h=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},n.prototype.__set_templated_pattern=function(){var s=[];this._disabled.php||s.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||s.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||s.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(s.push(this.__patterns.django._starting_pattern.source),s.push(this.__patterns.django_value._starting_pattern.source),s.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||s.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&s.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+s.join("|")+")")},n.prototype._read_template=function(){var s="",h=this._input.peek();if(h==="<"){var f=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&f==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&f==="%"&&(s=s||this.__patterns.erb.read())}else h==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(s=s||this.__patterns.handlebars_comment.read(),s=s||this.__patterns.handlebars_unescaped.read(),s=s||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(s=s||this.__patterns.django_value.read()),this._excluded.django||(s=s||this.__patterns.django_comment.read(),s=s||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(s=s||this.__patterns.smarty_comment.read(),s=s||this.__patterns.smarty_literal.read(),s=s||this.__patterns.smarty.read()));return s},t.exports.TemplatablePattern=n}],m={};function S(t){var d=m[t];if(d!==void 0)return d.exports;var i=m[t]={exports:{}};return g[t](i,i.exports,S),i.exports}var _=S(0);C=_})();var N=C;!(P=[],v=function(){return{js_beautify:N}}.apply(q,P),v!==void 0&&(W.exports=v))})()},"6eGT":function(W,q,D){"use strict";function P(v){return null}q.a=P},"746U":function(W,q,D){"use strict";D.d(q,"f",function(){return P}),D.d(q,"l",function(){return v}),D.d(q,"k",function(){return C}),D.d(q,"j",function(){return N}),D.d(q,"g",function(){return g}),D.d(q,"m",function(){return m}),D.d(q,"h",function(){return S}),D.d(q,"n",function(){return _}),D.d(q,"c",function(){return t}),D.d(q,"a",function(){return d}),D.d(q,"i",function(){return i}),D.d(q,"o",function(){return c}),D.d(q,"e",function(){return s}),D.d(q,"d",function(){return h}),D.d(q,"p",function(){return f}),D.d(q,"b",function(){return l});function P(a){return Array.isArray(a)}function v(a){return typeof a=="string"}function C(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)&&!(a instanceof RegExp)&&!(a instanceof Date)}function N(a){return typeof a=="number"&&!isNaN(a)}function g(a){return a===!0||a===!1}function m(a){return typeof a=="undefined"}function S(a){return!_(a)}function _(a){return m(a)||a===null}function t(a,r){if(!a)throw new Error(r?`Unexpected type, expected '${r}'`:"Unexpected type")}function d(a){if(_(a))throw new Error("Assertion Failed: argument is undefined or null");return a}function i(a){return typeof a=="function"}function c(a,r){const x=Math.min(a.length,r.length);for(let y=0;y<x;y++)o(a[y],r[y])}function o(a,r){if(v(r)){if(typeof a!==r)throw new Error(`argument does not match constraint: typeof ${r}`)}else if(i(r)){try{if(a instanceof r)return}catch(x){}if(!_(a)&&a.constructor===r)return;if(r.length===1&&r.call(void 0,a)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function n(a){let r=[],x=Object.getPrototypeOf(a);for(;Object.prototype!==x;)r=r.concat(Object.getOwnPropertyNames(x)),x=Object.getPrototypeOf(x);return r}function s(a){const r=[];for(const x of n(a))typeof a[x]=="function"&&r.push(x);return r}function h(a,r){const x=p=>function(){const R=Array.prototype.slice.call(arguments,0);return r(p,R)};let y={};for(const p of a)y[p]=x(p);return y}function f(a){return a===null?void 0:a}function l(a,r="Unreachable"){throw new Error(r)}},"7Cbv":function(W,q,D){"use strict";var P=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),v=new Uint8Array(16);function C(){if(!P)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return P(v)}var N=/^(?:[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 g(o){return typeof o=="string"&&N.test(o)}for(var m=g,S=[],_=0;_<256;++_)S.push((_+256).toString(16).substr(1));function t(o){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=(S[o[n+0]]+S[o[n+1]]+S[o[n+2]]+S[o[n+3]]+"-"+S[o[n+4]]+S[o[n+5]]+"-"+S[o[n+6]]+S[o[n+7]]+"-"+S[o[n+8]]+S[o[n+9]]+"-"+S[o[n+10]]+S[o[n+11]]+S[o[n+12]]+S[o[n+13]]+S[o[n+14]]+S[o[n+15]]).toLowerCase();if(!m(s))throw TypeError("Stringified UUID is invalid");return s}var d=t;function i(o,n,s){o=o||{};var h=o.random||(o.rng||C)();if(h[6]=h[6]&15|64,h[8]=h[8]&63|128,n){s=s||0;for(var f=0;f<16;++f)n[s+f]=h[f];return n}return d(h)}var c=q.a=i},"7ahc":function(W,q,D){"use strict";D.d(q,"a",function(){return x});var P=D("k1fw"),v=D("0Owb"),C=D("+L6B"),N=D("2/Rp"),g=D("y8nQ"),m=D("Vl3Y"),S=D("tJVT"),_=D("OaEy"),t=D("2fM7"),d=D("q1tI"),i=D.n(d),c=D("VrN/"),o=D.n(c),n=D("p77/"),s=D.n(n),h=D("c5Ni"),f=D.n(h),l=t.a.Option,a={labelCol:{span:4},wrapperCol:{span:20}},r={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"]};q.b=function(y){var p=y.callback,R=y.onCancel,O=Object(d.useState)("python"),b=Object(S.a)(O,2),E=b[0],w=b[1];function T(M){w(r[M][1])}function F(M){p(M)}return i.a.createElement(m.a,Object(v.a)({},a,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:F}),i.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},i.a.createElement(t.a,{onChange:T},Object.keys(r).map(function(M){return i.a.createElement(l,{key:M,value:M},r[M][0])}))),i.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},i.a.createElement(x,{mode:E})),i.a.createElement("div",{className:"flex-container flex-end"},i.a.createElement(N.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),i.a.createElement(N.a,{type:"ghost",onClick:R},"\u53D6\u6D88")))};function x(y){var p=y.value,R=y.onChange,O=y.mode,b=y.options,E=b===void 0?{}:b,w=Object(d.useRef)(),T=Object(d.useState)(),F=Object(S.a)(T,2),M=F[0],L=F[1];return Object(d.useEffect)(function(){if(M){function Y(K){var A=K.getValue();R&&R(A)}return M.on("change",Y),function(){M.off("change",Y)}}},[M,R]),Object(d.useEffect)(function(){M&&M.setOption("mode",O)},[M,O]),Object(d.useEffect)(function(){M&&((p!==M.getValue()||p==="")&&setTimeout(function(){M.setValue(p||" ")},300))},[M,p]),Object(d.useEffect)(function(){if(w.current&&!M){var Y=o.a.fromTextArea(w.current,Object(P.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},E));L(Y)}},[w.current,M]),i.a.createElement("div",{className:"my-codemirror-container"},i.a.createElement("textarea",{ref:w}))}},"815F":function(W,q,D){"use strict";D.d(q,"e",function(){return S}),D.d(q,"c",function(){return t}),D.d(q,"d",function(){return d}),D.d(q,"a",function(){return c}),D.d(q,"f",function(){return o}),D.d(q,"b",function(){return n});var P=D("KQm4"),v=D("VTBJ"),C=D("Ff2n"),N=D("Zm9Q"),g=D("Kwbf"),m=D("OZM5");function S(s,h){return s!=null?s:h}function _(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=new Map;function f(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(l||[]).forEach(function(r){var x=r.key,y=r.children;Object(g.a)(x!=null,"Tree node must have a certain key: [".concat(a).concat(x,"]"));var p=String(x);Object(g.a)(!h.has(p)||x===null||x===void 0,"Same 'key' exist in the Tree: ".concat(p)),h.set(p,!0),f(y,"".concat(a).concat(p," > "))})}f(s)}function t(s){function h(f){var l=Object(N.a)(f);return l.map(function(a){if(!Object(m.i)(a))return Object(g.a)(!a,"Tree/TreeNode can only accept TreeNode as children."),null;var r=a.key,x=a.props,y=x.children,p=Object(C.a)(x,["children"]),R=Object(v.a)({key:r},p),O=h(y);return O.length&&(R.children=O),R}).filter(function(a){return a})}return h(s)}function d(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],f=new Set(h===!0?[]:h),l=[];function a(r){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return r.map(function(y,p){var R=Object(m.h)(x?x.pos:"0",p),O=S(y.key,R),b=Object(v.a)(Object(v.a)({},y),{},{parent:x,pos:R,children:null,data:y,isStart:[].concat(Object(P.a)(x?x.isStart:[]),[p===0]),isEnd:[].concat(Object(P.a)(x?x.isEnd:[]),[p===r.length-1])});return l.push(b),h===!0||f.has(O)?b.children=a(y.children||[],b):b.children=[],b})}return a(s),l}function i(s,h,f){var l;f?typeof f=="string"?l=function(x){return x[f]}:typeof f=="function"&&(l=function(x){return f(x)}):l=function(x,y){return S(x.key,y)};function a(r,x,y){var p=r?r.children:s,R=r?Object(m.h)(y.pos,x):"0";if(r){var O=l(r,R),b={node:r,index:x,pos:R,key:O,parentPos:y.node?y.pos:null,level:y.level+1};h(b)}p&&p.forEach(function(E,w){a(E,w,{node:r,pos:R,level:y?y.level+1:-1})})}a(null)}function c(s){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=h.initWrapper,l=h.processEntity,a=h.onProcessFinished,r=arguments.length>2?arguments[2]:void 0,x={},y={},p={posEntities:x,keyEntities:y};return f&&(p=f(p)||p),i(s,function(R){var O=R.node,b=R.index,E=R.pos,w=R.key,T=R.parentPos,F=R.level,M={node:O,index:b,key:w,pos:E,level:F},L=S(w,E);x[E]=M,y[L]=M,M.parent=x[T],M.parent&&(M.parent.children=M.parent.children||[],M.parent.children.push(M)),l&&l(M,p)},r),a&&a(p),p}function o(s,h){var f=h.expandedKeys,l=h.selectedKeys,a=h.loadedKeys,r=h.loadingKeys,x=h.checkedKeys,y=h.halfCheckedKeys,p=h.dragOverNodeKey,R=h.dropPosition,O=h.keyEntities,b=O[s],E={eventKey:s,expanded:f.indexOf(s)!==-1,selected:l.indexOf(s)!==-1,loaded:a.indexOf(s)!==-1,loading:r.indexOf(s)!==-1,checked:x.indexOf(s)!==-1,halfChecked:y.indexOf(s)!==-1,pos:String(b?b.pos:""),dragOver:p===s&&R===0,dragOverGapTop:p===s&&R===-1,dragOverGapBottom:p===s&&R===1};return E}function n(s){var h=s.data,f=s.expanded,l=s.selected,a=s.checked,r=s.loaded,x=s.loading,y=s.halfChecked,p=s.dragOver,R=s.dragOverGapTop,O=s.dragOverGapBottom,b=s.pos,E=s.active,w=Object(v.a)(Object(v.a)({},h),{},{expanded:f,selected:l,checked:a,loaded:r,loading:x,halfChecked:y,dragOver:p,dragOverGapTop:R,dragOverGapBottom:O,pos:b,active:E});return"props"in w||Object.defineProperty(w,"props",{get:function(){return Object(g.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),s}}),w}},"8EBN":function(W,q,D){(function(P){P(D("VrN/"))})(function(P){"use strict";P.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var v=0;v<P.modeInfo.length;v++){var C=P.modeInfo[v];C.mimes&&(C.mime=C.mimes[0])}P.findModeByMIME=function(N){N=N.toLowerCase();for(var g=0;g<P.modeInfo.length;g++){var m=P.modeInfo[g];if(m.mime==N)return m;if(m.mimes){for(var S=0;S<m.mimes.length;S++)if(m.mimes[S]==N)return m}}if(/\+xml$/.test(N))return P.findModeByMIME("application/xml");if(/\+json$/.test(N))return P.findModeByMIME("application/json")},P.findModeByExtension=function(N){N=N.toLowerCase();for(var g=0;g<P.modeInfo.length;g++){var m=P.modeInfo[g];if(m.ext){for(var S=0;S<m.ext.length;S++)if(m.ext[S]==N)return m}}},P.findModeByFileName=function(N){for(var g=0;g<P.modeInfo.length;g++){var m=P.modeInfo[g];if(m.file&&m.file.test(N))return m}var S=N.lastIndexOf("."),_=S>-1&&N.substring(S+1,N.length);if(_)return P.findModeByExtension(_)},P.findModeByName=function(N){N=N.toLowerCase();for(var g=0;g<P.modeInfo.length;g++){var m=P.modeInfo[g];if(m.name.toLowerCase()==N)return m;if(m.alias){for(var S=0;S<m.alias.length;S++)if(m.alias[S].toLowerCase()==N)return m}}}})},"8HAY":function(W,q,D){"use strict";D.d(q,"a",function(){return g}),D.d(q,"b",function(){return m}),D.d(q,"d",function(){return S}),D.d(q,"e",function(){return _}),D.d(q,"c",function(){return t});var P=D("MI8n"),v=D("pmY6"),C=D("3/fG"),N=function(d,i,c,o){function n(s){return s instanceof c?s:new c(function(h){h(s)})}return new(c||(c=Promise))(function(s,h){function f(r){try{a(o.next(r))}catch(x){h(x)}}function l(r){try{a(o.throw(r))}catch(x){h(x)}}function a(r){r.done?s(r.value):n(r.value).then(f,l)}a((o=o.apply(d,i||[])).next())})};class g extends v.a{constructor(d,i="",c="",o=!0,n){super();this._onDidChange=this._register(new P.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=d,this._label=i,this._cssClass=c,this._enabled=o,this._actionCallback=n}get id(){return this._id}get label(){return this._label}set label(d){this._setLabel(d)}_setLabel(d){this._label!==d&&(this._label=d,this._onDidChange.fire({label:d}))}get tooltip(){return this._tooltip||""}set tooltip(d){this._setTooltip(d)}_setTooltip(d){this._tooltip!==d&&(this._tooltip=d,this._onDidChange.fire({tooltip:d}))}get class(){return this._cssClass}set class(d){this._setClass(d)}_setClass(d){this._cssClass!==d&&(this._cssClass=d,this._onDidChange.fire({class:d}))}get enabled(){return this._enabled}set enabled(d){this._setEnabled(d)}_setEnabled(d){this._enabled!==d&&(this._enabled=d,this._onDidChange.fire({enabled:d}))}get checked(){return this._checked}set checked(d){this._setChecked(d)}_setChecked(d){this._checked!==d&&(this._checked=d,this._onDidChange.fire({checked:d}))}run(d,i){return N(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(d))})}}class m extends v.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new P.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new P.b),this.onDidRun=this._onDidRun.event}run(d,i){return N(this,void 0,void 0,function*(){if(!d.enabled)return;this._onBeforeRun.fire({action:d});let c;try{yield this.runAction(d,i)}catch(o){c=o}this._onDidRun.fire({action:d,error:c})})}runAction(d,i){return N(this,void 0,void 0,function*(){yield d.run(i)})}}class S extends g{constructor(d){super(S.ID,d,d?"separator text":"separator");this.checked=!1,this.enabled=!1}}S.ID="vs.actions.separator";class _{constructor(d,i,c,o){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=d,this.label=i,this.class=o,this._actions=c}get actions(){return this._actions}dispose(){}run(){return N(this,void 0,void 0,function*(){})}}class t extends g{constructor(){super(t.ID,C.a("submenu.empty","(empty)"),void 0,!1)}}t.ID="vs.actions.empty"},"8hTe":function(W,q,D){W.exports={button:"button___1wy9m"}},"9Bee":function(W,q,D){"use strict";var P=D("DYRE"),v=D("zeV3"),C=D("+L6B"),N=D("2/Rp"),g=D("k1fw"),m=D("9og8"),S=D("tJVT"),_=D("WmNS"),t=D.n(_),d=D("q1tI"),i=D.n(d),c=D("vg9a"),o=D("DlQD"),n=D.n(o),s=D("rUJ1");function h(Ee,ce){var fe=Ee.match(/^(\s+)(?:```)/);if(fe===null)return ce;var ve=fe[1];return ce.split(`
|
|
|
`).map(function(Ce){var ge=Ce.match(/^\s+/);if(ge===null)return Ce;var ye=Object(S.a)(ge,1),Re=ye[0];return Re.length>=ve.length?Ce.slice(ve.length):Ce}).join(`
|
|
|
`)}var f=[],l=["<ul>"],a=new n.a.Renderer,r=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function x(){f.length=0,l=["<ul>"]}var y={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function p(Ee,ce,fe,ve){if(ce>=Ee.length||Ee[ce].level<=fe)return ce;var Ce=Ee[ce];ve.push("<li><a href='#"+Ce.anchor+"'>"+Ce.text+"</a>"),ce++;var ge=[];return ce=p(Ee,ce,Ce.level,ge),ge.length>0&&(ve.push("<ul>"),ge.forEach(function(ye){ve.push(ye)}),ve.push("</ul>")),ve.push("</li>"),ce=p(Ee,ce,fe,ve),ce}function R(){return p(f,0,0,l),l.push("</ul>"),l.join("")}var O={heading:function(ce){var fe=r.exec(ce);if(fe)return{type:"heading",raw:fe[0],depth:fe[1].length,text:fe[2]}},fences:function(ce){var fe=this.rules.block.fences.exec(ce);if(fe){var ve=fe[0],Ce=h(ve,fe[3]||""),ge=fe[2]?fe[2].trim():fe[2];if(["latex","katex","math"].indexOf(ge)>=0){var ye=w(),Re=Ce;Ce=ye,T[ye]={type:"block",expression:Re}}return{type:"code",raw:ve,lang:ge,text:Ce}}}},b=/(?:\${2})([^\n`]+?)(?:\${2})/gi,E=0,w=function(){return"__special_katext_id_".concat(E++,"__")},T={};function F(){return T}function M(){E=0,T={}}function L(Ee){return Ee=Ee.replace(b,function(ce,fe){var ve=w();return T[ve]={type:"inline",expression:fe},ve}),Ee}var Y=a.listitem;a.listitem=function(Ee){return Y(L(Ee))};var K=a.paragraph;a.paragraph=function(Ee){return K(L(Ee))};var A=a.tablecell;a.tablecell=function(Ee,ce){return A(L(Ee),ce)},a.code=function(Ee,ce,fe){var ve=(ce||"").match(/\S*/)[0];return ve?["latex","katex","math"].indexOf(ve)>=0?"<p class='editormd-tex'>".concat(Ee,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(ce,'">').concat(fe?Ee:Object(s.escape)(Ee,!0),`</code></pre>
|
|
|
`):'<pre class="prettyprint linenums"><code>'+(fe?Ee:Object(s.escape)(Ee,!0))+"</code></pre>"},a.heading=function(Ee,ce,fe){var ve=this.options.headerPrefix+fe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return f.push({anchor:ve,level:ce,text:Ee}),"<h"+ce+' id="'+ve+'">'+Ee+"</h"+ce+">"},n.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),n.a.use({tokenizer:O,renderer:a});var H=n.a,U=D("SJMd"),I=D("ulZh"),G=D.n(I),ne=D("m3rI"),oe=D("Oy/b"),de=D("p5ED"),Oe=D("ErOA"),Ae=D("STEk");/* **********************************
|
|
|
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 pe=function(Ee,ce){return(pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ve){fe.__proto__=ve}||function(fe,ve){for(var Ce in ve)Object.prototype.hasOwnProperty.call(ve,Ce)&&(fe[Ce]=ve[Ce])})(Ee,ce)};function Se(Ee,ce){if(typeof ce!="function"&&ce!==null)throw new TypeError("Class extends value "+String(ce)+" is not a constructor or null");function fe(){this.constructor=Ee}pe(Ee,ce),Ee.prototype=ce===null?Object.create(ce):(fe.prototype=ce.prototype,new fe)}function be(Ee,ce,fe,ve){return new(fe||(fe=Promise))(function(Ce,ge){function ye(Pe){try{De(ve.next(Pe))}catch(ze){ge(ze)}}function Re(Pe){try{De(ve.throw(Pe))}catch(ze){ge(ze)}}function De(Pe){var ze;Pe.done?Ce(Pe.value):(ze=Pe.value,ze instanceof fe?ze:new fe(function(at){at(ze)})).then(ye,Re)}De((ve=ve.apply(Ee,ce||[])).next())})}function se(Ee,ce){var fe,ve,Ce,ge,ye={label:0,sent:function(){if(1&Ce[0])throw Ce[1];return Ce[1]},trys:[],ops:[]};return ge={next:Re(0),throw:Re(1),return:Re(2)},typeof Symbol=="function"&&(ge[Symbol.iterator]=function(){return this}),ge;function Re(De){return function(Pe){return function(ze){if(fe)throw new TypeError("Generator is already executing.");for(;ye;)try{if(fe=1,ve&&(Ce=2&ze[0]?ve.return:ze[0]?ve.throw||((Ce=ve.return)&&Ce.call(ve),0):ve.next)&&!(Ce=Ce.call(ve,ze[1])).done)return Ce;switch(ve=0,Ce&&(ze=[2&ze[0],Ce.value]),ze[0]){case 0:case 1:Ce=ze;break;case 4:return ye.label++,{value:ze[1],done:!1};case 5:ye.label++,ve=ze[1],ze=[0];continue;case 7:ze=ye.ops.pop(),ye.trys.pop();continue;default:if(!(Ce=ye.trys,(Ce=Ce.length>0&&Ce[Ce.length-1])||ze[0]!==6&&ze[0]!==2)){ye=0;continue}if(ze[0]===3&&(!Ce||ze[1]>Ce[0]&&ze[1]<Ce[3])){ye.label=ze[1];break}if(ze[0]===6&&ye.label<Ce[1]){ye.label=Ce[1],Ce=ze;break}if(Ce&&ye.label<Ce[2]){ye.label=Ce[2],ye.ops.push(ze);break}Ce[2]&&ye.ops.pop(),ye.trys.pop();continue}ze=ce.call(Ee,ye)}catch(at){ze=[6,at],ve=0}finally{fe=Ce=0}if(5&ze[0])throw ze[1];return{value:ze[0]?ze[1]:void 0,done:!0}}([De,Pe])}}}var ee=function(){function Ee(){}return Ee.addKey=function(ce){Ee.key=ce},Object.defineProperty(Ee,"isLicensed",{get:function(){return!!Ee.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Ee.key)},enumerable:!1,configurable:!0}),Ee}(),B=function(){function Ee(){}return Ee.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Ee.setAttributes=function(ce,fe){for(var ve=0,Ce=fe;ve<Ce.length;ve++){var ge=Ce[ve],ye=ge[0],Re=ge[1];ce.setAttribute(ye,Re)}},Ee.createRect=function(ce,fe,ve){var Ce=document.createElementNS("http://www.w3.org/2000/svg","rect");return Ce.setAttribute("width",ce.toString()),Ce.setAttribute("height",fe.toString()),ve&&Ee.setAttributes(Ce,ve),Ce},Ee.createLine=function(ce,fe,ve,Ce,ge){var ye=document.createElementNS("http://www.w3.org/2000/svg","line");return ye.setAttribute("x1",ce.toString()),ye.setAttribute("y1",fe.toString()),ye.setAttribute("x2",ve.toString()),ye.setAttribute("y2",Ce.toString()),ge&&Ee.setAttributes(ye,ge),ye},Ee.createPolygon=function(ce,fe){var ve=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ve.setAttribute("points",ce),fe&&Ee.setAttributes(ve,fe),ve},Ee.createCircle=function(ce,fe){var ve=document.createElementNS("http://www.w3.org/2000/svg","circle");return ve.setAttribute("cx",(ce/2).toString()),ve.setAttribute("cy",(ce/2).toString()),ve.setAttribute("r",ce.toString()),fe&&Ee.setAttributes(ve,fe),ve},Ee.createEllipse=function(ce,fe,ve){var Ce=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Ce.setAttribute("cx",(ce/2).toString()),Ce.setAttribute("cy",(fe/2).toString()),Ce.setAttribute("rx",(ce/2).toString()),Ce.setAttribute("ry",(fe/2).toString()),ve&&Ee.setAttributes(Ce,ve),Ce},Ee.createGroup=function(ce){var fe=document.createElementNS("http://www.w3.org/2000/svg","g");return ce&&Ee.setAttributes(fe,ce),fe},Ee.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Ee.createMarker=function(ce,fe,ve,Ce,ge,ye,Re){var De=document.createElementNS("http://www.w3.org/2000/svg","marker");return Ee.setAttributes(De,[["id",ce],["orient",fe],["markerWidth",ve.toString()],["markerHeight",Ce.toString()],["refX",ge.toString()],["refY",ye.toString()]]),De.appendChild(Re),De},Ee.createText=function(ce){var fe=document.createElementNS("http://www.w3.org/2000/svg","text");return fe.setAttribute("x","0"),fe.setAttribute("y","0"),ce&&Ee.setAttributes(fe,ce),fe},Ee.createTSpan=function(ce,fe){var ve=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ve.textContent=ce,fe&&Ee.setAttributes(ve,fe),ve},Ee.createImage=function(ce){var fe=document.createElementNS("http://www.w3.org/2000/svg","image");return ce&&Ee.setAttributes(fe,ce),fe},Ee.createPoint=function(ce,fe){var ve=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ve.x=ce,ve.y=fe,ve},Ee.createPath=function(ce,fe){var ve=document.createElementNS("http://www.w3.org/2000/svg","path");return ve.setAttribute("d",ce),fe&&Ee.setAttributes(ve,fe),ve},Ee.createElement=function(ce,fe){var ve=document.createElementNS("http://www.w3.org/2000/svg",ce);return fe&&Ee.setAttributes(ve,fe),ve},Ee.getHollowRectanglePath=function(ce,fe,ve,Ce,ge,ye,Re,De){return"M"+ce+","+fe+"V"+(fe+Ce)+"H"+(ce+ve)+"V"+fe+"H"+ge+"V"+ye+"H"+(ge+Re)+"V"+(ye+De)+"H"+ge+"V"+fe+"Z"},Ee}(),V=function(){function Ee(ce){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ce+"_"}return Object.defineProperty(Ee.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.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(Ee.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),Ee.prototype.addClass=function(ce){return this.styleSheet===void 0&&this.addStyleSheet(),ce.name=""+this.classNamePrefix+ce.localName,this.classes.push(ce),this.styleSheet.sheet.insertRule("."+ce.name+" {"+ce.style+"}",this.styleSheet.sheet.cssRules.length),ce},Ee.prototype.addRule=function(ce){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ce),this.styleSheet.sheet.insertRule(ce.selector+" {"+ce.style+"}",this.styleSheet.sheet.cssRules.length)},Ee.prototype.addStyleSheet=function(){var ce;this.styleSheet=document.createElement("style"),((ce=this.styleSheetRoot)!==null&&ce!==void 0?ce:document.head).appendChild(this.styleSheet),this.addRule(new X("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new X("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new X("@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;
|
|
|
`))},Ee.prototype.removeStyleSheet=function(){var ce;this.styleSheet&&(((ce=this.styleSheetRoot)!==null&&ce!==void 0?ce:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Ee}(),X=function(Ee,ce){this.selector=Ee,this.style=ce},Q=function(Ee,ce){this.localName=Ee,this.style=ce},Z=function(){function Ee(){this.blocks=[],this.display=""}return Ee.prototype.addButtonBlock=function(ce){ce.className=this.blockClassName,ce.buttonClassName=this.buttonClassName,ce.buttonColorsClassName=this.buttonColorsClassName,ce.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(ce)},Ee.prototype.addElementBlock=function(ce){ce.className===void 0&&(ce.className=this.blockClassName),this.blocks.push(ce)},Ee.prototype.getUI=function(){var ce=document.createElement("div");return ce.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,ce.style.display=this.display,this.blocks.forEach(function(fe){return ce.appendChild(fe.getUI())}),ce},Ee}(),ie=function(){function Ee(){}return Ee.prototype.getUI=function(){var ce=document.createElement("div");if(ce.className=this.className,this.minWidth!==void 0&&(ce.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":ce.style.justifyContent="flex-start";break;case"center":ce.style.justifyContent="center";break;case"end":ce.style.justifyContent="flex-end"}return ce.style.whiteSpace="nowrap",ce},Ee}(),re=function(Ee){function ce(){var fe=Ee!==null&&Ee.apply(this,arguments)||this;return fe.buttons=[],fe}return Se(ce,Ee),ce.prototype.addButton=function(fe){fe.className=this.buttonClassName,fe.colorsClassName=this.buttonColorsClassName,fe.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(fe)},ce.prototype.getUI=function(){var fe=Ee.prototype.getUI.call(this);return this.buttons.forEach(function(ve){return fe.appendChild(ve.getUI())}),fe},ce}(ie),$=function(){function Ee(ce,fe){this._isActive=!1,this._isHidden=!1,this._icon=ce,this.title=fe,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(Ee.prototype,"icon",{get:function(){return this._icon},set:function(ce){this._icon=ce,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"isActive",{get:function(){return this._isActive},set:function(ce){this._isActive=ce,this.adjustClassName()},enumerable:!1,configurable:!0}),Ee.prototype.getUI=function(){var ce=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 ce.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},Ee.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,"")))},Ee.prototype.hide=function(){this._isHidden=!0},Ee}(),J=function(Ee){function ce(){var fe=Ee!==null&&Ee.apply(this,arguments)||this;return fe.elements=[],fe}return Se(ce,Ee),ce.prototype.addElement=function(fe){this.elements.push(fe)},ce.prototype.getUI=function(){var fe=Ee.prototype.getUI.call(this);return this.elements.forEach(function(ve){return fe.appendChild(ve)}),fe},ce}(ie),le=function(){function Ee(ce,fe){this.horizontal=ce,this.vertical=fe}return Object.defineProperty(Ee.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),Ee.prototype.getVerticalLength=function(ce){return ce/this.ratio},Ee.prototype.getHorizontalLength=function(ce){return ce*this.ratio},Ee}(),ue=function(){function Ee(){}return Ee.getIcon=function(ce,fe){if(ce>0&&fe>0){var ve=new le(ce,fe),Ce=ve.ratio>=1?20:ve.getHorizontalLength(20),ge=ve.ratio<1?20:ve.getVerticalLength(20),ye=document.createElementNS("http://www.w3.org/2000/svg","svg");ye.setAttribute("xmlns","http://www.w3.org/2000/svg"),ye.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(ye);var Re=B.createDefs();ye.appendChild(Re);var De=B.createElement("clipPath",[["id","text-bg-clip"]]);Re.appendChild(De);var Pe=B.createPath(B.getHollowRectanglePath((24-Ce)/2,(24-ge)/2,Ce,ge,(24-Ce)/2+2,(24-ge)/2+2,Ce-4,ge-4));ye.appendChild(Pe);var ze=B.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);ze.appendChild(B.createTSpan(ce+":"+fe)),ye.appendChild(ze);var at=ze.getBBox();B.setAttributes(ze,[["x",((24-at.width)/2).toString()],["y",((24-at.height)/2-at.y).toString()]]);var lt=B.createPath(B.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(at.width))/2,(24-Math.ceil(at.height))/2,Math.ceil(at.width),Math.ceil(at.height)));return De.appendChild(lt),B.setAttributes(Pe,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(ye),ye.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>'},Ee}(),xe=function(Ee){function ce(fe,ve,Ce){var ge=Ee.call(this,fe,ve)||this;return ge.isDropdownOpen=!1,ge.onClick=ge.dropdownButtonClicked,ge.dropdownButtons=Ce,ge}return Se(ce,Ee),ce.prototype.setupDropdown=function(){var fe=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ve){ve.className=fe.className,ve.colorsClassName=fe.colorsClassName,fe.dropdownBlock.appendChild(ve.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},ce.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},ce.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},ce.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},ce.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},ce.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},ce}($),Me=function(){function Ee(ce,fe){this.GRIP_SIZE=10,this.color=ce,this.fillColor=fe,this.visual=B.createGroup(),this.visual.appendChild(B.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(B.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Ee.prototype.ownsTarget=function(ce){return ce===this.visual||ce===this.visual.childNodes[0]||ce===this.visual.childNodes[1]},Ee.prototype.setCenter=function(ce,fe){this.visual.childNodes.forEach(function(ve){return B.setAttributes(ve,[["cx",ce.toString()],["cy",fe.toString()]])})},Ee}(),Xe=function(){function Ee(ce,fe,ve,Ce){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=ce,this.canvasHeight=fe,this.margin=ve,this.container=Ce,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(Ee.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(ce){this._aspectRatio=ce,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ce){this._isGridVisible=ce,this.gridContainer&&B.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(ce){this._zoomFactor=ce,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Ee.prototype.open=function(){var ce=this;this.cropShadeElement=B.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=B.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var fe=0;fe<this.numberOfGridLines;fe++)this.horizontalGridLines.push(B.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(B.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(ve){return ce.gridContainer.appendChild(ve)}),this.verticalGridLines.forEach(function(ve){return ce.gridContainer.appendChild(ve)}),this.cropRectElement=B.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Me(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Me(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Me(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Me(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},Ee.prototype.setCropRectangle=function(ce){this.cropRect=ce;var fe=Object.assign({},this.cropRect);this.zoomFactor!==1&&(fe.width=this.cropRect.width*this.zoomFactor,fe.height=this.cropRect.height*this.zoomFactor,fe.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-fe.width/2,fe.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-fe.height/2),B.setAttributes(this.cropRectElement,[["x",fe.x.toString()],["y",fe.y.toString()],["width",fe.width.toString()],["height",fe.height.toString()]]);var ve=fe.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ge,ye){var Re=fe.y+ve*(ye+1);B.setAttributes(ge,[["x1",""+fe.x],["y1",""+Re],["x2",""+(fe.x+fe.width)],["y2",""+Re]])});var Ce=fe.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ge,ye){var Re=fe.x+Ce*(ye+1);B.setAttributes(ge,[["x1",""+Re],["y1",""+fe.y],["x2",""+Re],["y2",""+(fe.y+fe.height)]])}),B.setAttributes(this.cropShadeElement,[["d",B.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,fe.x,fe.y,fe.width,fe.height)]]),this.topLeftGrip.setCenter(fe.x,fe.y),this.topRightGrip.setCenter(fe.x+fe.width,fe.y),this.bottomLeftGrip.setCenter(fe.x,fe.y+fe.height),this.bottomRightGrip.setCenter(fe.x+fe.width,fe.y+fe.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},Ee.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)},Ee.prototype.clientToLocalCoordinates=function(ce,fe){var ve=this.container.getBoundingClientRect();return{x:ce-ve.left+this.margin,y:fe-ve.top+this.margin}},Ee.prototype.onPointerDown=function(ce){this.container.setPointerCapture(ce.pointerId),this.previousPoint=this.clientToLocalCoordinates(ce.clientX,ce.clientY),this.cropRectElement===ce.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(ce.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(ce.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(ce.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(ce.target)&&(this.activeGrip=this.bottomRightGrip)},Ee.prototype.onPointerMove=function(ce){if(this.isMoving)this.move(this.clientToLocalCoordinates(ce.clientX,ce.clientY));else if(this.activeGrip){var fe=this.clientToLocalCoordinates(ce.clientX,ce.clientY);this.resize(fe)}ce.preventDefault()},Ee.prototype.onPointerUp=function(ce){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(ce.pointerId)},Ee.prototype.move=function(ce){var fe=ce.x-this.previousPoint.x,ve=ce.y-this.previousPoint.y;this.zoomFactor!==1&&(fe=-fe/this.zoomFactor,ve=-ve/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+fe),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ve),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=ce},Ee.prototype.resize=function(ce){var fe=Object.assign({},this.cropRect),ve=ce.x-this.previousPoint.x,Ce=ce.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:fe.x+ve<this.margin&&(ve=this.margin-fe.x),fe.x+=ve,fe.width=this.cropRect.x+this.cropRect.width-fe.x;break;case this.bottomRightGrip:case this.topRightGrip:fe.width+ve>this.canvasWidth*this.zoomFactor&&(ve=this.canvasWidth*this.zoomFactor-fe.width),fe.width+=ve}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(fe.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ve),fe.height=this.aspectRatio.getVerticalLength(fe.width)):(fe.y+=Ce,fe.height=this.cropRect.y+this.cropRect.height-fe.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?fe.height=this.aspectRatio.getVerticalLength(fe.width):fe.height+=Ce}fe.width<10&&(fe.x=this.cropRect.x,fe.width=10),fe.height<10&&(fe.y=this.cropRect.y,fe.height=10),this.previousPoint=ce,fe.x>=this.margin&&fe.y>=this.margin&&fe.x-this.margin+fe.width<=this.canvasWidth&&fe.y-this.margin+fe.height<=this.canvasHeight&&(this.cropRect=fe,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},Ee.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var ce=this.cropRect.x+this.cropRect.width/2,fe=this.cropRect.y+this.cropRect.height/2,ve=this.aspectRatio.getHorizontalLength(this.cropRect.height),Ce=this.aspectRatio.getVerticalLength(this.cropRect.width);ve/this.canvasWidth<Ce/this.canvasHeight?this.cropRect.width=ve:this.cropRect.height=Ce,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=ce-this.cropRect.width/2,this.cropRect.y=fe-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)}},Ee.prototype.getRescaledRect=function(ce,fe,ve,Ce,ge,ye){var Re=ve/ce,De=Ce/fe;return{x:(ge.x-ye)*Re+ye,y:(ge.y-ye)*De+ye,width:ge.width*Re,height:ge.height*De}},Ee.prototype.scaleCanvas=function(ce,fe){var ve=this.getRescaledRect(this.canvasWidth,this.canvasHeight,ce,fe,this.cropRect,this.margin);this.canvasWidth=ce,this.canvasHeight=fe,this.onCropChange&&this.onCropChange(ve),this.setCropRectangle(ve)},Ee}(),$e=function(){function Ee(ce){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=ce,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(Ee.prototype,"angle",{get:function(){return this._angle},set:function(ce){this._angle=ce,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),Ee.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},Ee.prototype.onPointerDown=function(ce){this.controlContainer.setPointerCapture(ce.pointerId),this.isDragging=!0,this.previousPoint={x:ce.clientX,y:ce.clientY}},Ee.prototype.onPointerMove=function(ce){this.isDragging&&(this.onAngleChange&&this.onAngleChange((ce.clientX-this.previousPoint.x)/5),this.previousPoint.x=ce.clientX)},Ee.prototype.onPointerUp=function(ce){this.isDragging&&this.onAngleChange&&this.onAngleChange((ce.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(ce.pointerId)},Ee.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var ce=this.angleLabelText.getBBox();B.setAttributes(this.angleLabelElement,[["x",((this.width-ce.width)/2).toString()],["y",(this.height/2).toString()]])}},Ee.prototype.positionScaleShape=function(){if(this.scaleShape){var ce=this.scaleShape.transform.baseVal.getItem(0);ce.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(ce,0)}},Ee.prototype.getVisual=function(){var ce=document.createElementNS("http://www.w3.org/2000/svg","svg");ce.setAttribute("xmlns","http://www.w3.org/2000/svg"),ce.setAttribute("width",this.width+"px"),ce.setAttribute("height",this.height+"px"),ce.setAttribute("viewBox","0 0 "+this.width+" "+this.height),ce.style.flexShrink="0",document.body.appendChild(ce);for(var fe="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ve=1;ve<=this.width/5+10;ve++){var Ce=ve%5==0?this.height/3:this.height/6;fe+="h4v"+-Ce+"h1v"+Ce}fe+="v1H0Z",this.scaleShape=B.createPath(fe);var ge=B.createTransform();this.scaleShape.transform.baseVal.appendItem(ge),ce.appendChild(this.scaleShape),this.angleLabelElement=B.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=B.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var ye=B.createTSpan("");return ye.innerHTML="°",this.angleLabelElement.appendChild(ye),ce.appendChild(this.angleLabelElement),document.body.removeChild(ce),ce},Ee}(),Je=function(){function Ee(){this.naturalSize=!1,this.imageType="image/png"}return Ee.prototype.rasterize=function(ce,fe,ve,Ce,ge,ye,Re){var De=this;return new Promise(function(Pe){var ze=document.createElement("canvas");ze.width=ce.width.baseVal.value-2*Ce,ze.height=ce.height.baseVal.value-2*Ce;var at=1,lt=1;De.naturalSize===!0?(at=fe.naturalWidth/(ce.width.baseVal.value-2*Ce)/ye,lt=fe.naturalHeight/(ce.height.baseVal.value-2*Ce)/Re,ze.width=fe.naturalWidth/ye,ze.height=fe.naturalHeight/Re):De.width!==void 0&&De.height!==void 0&&(at=De.width/ve.width,lt=De.height/ve.height,ze.width*=at,ze.height*=lt);var St=ze.getContext("2d");St.translate(ze.width/2,ze.height/2),St.rotate(ge*Math.PI/180),St.scale(ye,Re),St.translate(-ze.width/2,-ze.height/2),St.drawImage(fe,0,0,ze.width,ze.height);var Ot=document.createElement("canvas");Ot.width=ve.width*at,Ot.height=ve.height*lt,Ot.getContext("2d").putImageData(St.getImageData((ve.x-Ce)*at,(ve.y-Ce)*lt,ve.width*at,ve.height*lt),0,0),Pe(Ot.toDataURL(De.imageType,De.imageQuality))})},Ee}(),rt=function(){function Ee(ce){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=Ee.instanceCounter++,this.styles=new V(this.instanceNo),this.target=ce,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(Ee.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(ce){this._zoomToCropEnabled=ce,ce?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ce){this._isGridVisible=ce,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"gridLines",{get:function(){return this._gridLines},set:function(ce){this._gridLines=ce,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(ce){this._rotationAngle=ce,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"aspectRatio",{get:function(){var ce;return(ce=this._aspectRatio)!==null&&ce!==void 0?ce:this.aspectRatios[0]},set:function(ce){this._aspectRatio=ce},enumerable:!1,configurable:!0}),Ee.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},Ee.prototype.show=function(){this.showUI(),this.open()},Ee.prototype.close=function(ce){ce===void 0&&(ce=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),ce||this.closeEventListeners.forEach(function(fe){return fe()}),this._isOpen=!1)},Ee.prototype.addRenderEventListener=function(ce){this.renderEventListeners.push(ce)},Ee.prototype.removeRenderEventListener=function(ce){this.renderEventListeners.indexOf(ce)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(ce),1)},Ee.prototype.addCloseEventListener=function(ce){this.closeEventListeners.push(ce)},Ee.prototype.removeCloseEventListener=function(ce){this.closeEventListeners.indexOf(ce)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(ce),1)},Ee.prototype.setupResizeObserver=function(){var ce=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ce.resize(ce.target.clientWidth,ce.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))},Ee.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var ce=1*this.target.clientWidth/this.target.clientHeight,fe=this.contentDiv.clientWidth/ce>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*ce:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ve=fe+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/ce;this.resize(fe,ve)}},Ee.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Ee.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",B.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},Ee.prototype.resize=function(ce,fe){this.imageWidth=Math.round(ce),this.imageHeight=Math.round(fe),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()},Ee.prototype.setEditingTarget=function(){var ce=document.createElement("canvas");ce.width=this.target.naturalWidth,ce.height=this.target.naturalHeight,ce.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var fe=ce.toDataURL();B.setAttributes(this.editingTarget,[["href",fe]]),this.setEditingTargetSize()},Ee.prototype.setTopLeft=function(){var ce=this.target.getBoundingClientRect(),fe=this.editorCanvas.getBoundingClientRect();this.left=ce.left-fe.left-this.CANVAS_MARGIN,this.top=ce.top-fe.top-this.CANVAS_MARGIN},Ee.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=B.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=B.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=B.createGroup(),this.editingTargetRotationScaleContainer=B.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var ce=B.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(ce);var fe=B.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(fe),this.editingTargetContainer=B.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)},Ee.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},Ee.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=B.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Xe(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()},Ee.prototype.zoomToCrop=function(){if(this.cropRect){var ce=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,fe=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=ce+"px "+fe+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-ce+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-fe+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},Ee.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)},Ee.prototype.cropRectChanged=function(ce){this.cropRect=ce,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},Ee.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},Ee.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"},Ee.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Ee.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 ce=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,fe=this.target.offsetTop>ce+this.CANVAS_MARGIN?this.target.offsetTop-(ce+this.CANVAS_MARGIN):0;this.coverDiv.style.top=fe+"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},Ee.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},Ee.prototype.addTopToolbar=function(){var ce=this;this.topToolbar=new Z,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 fe=new re;fe.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(fe);var ve=[];this.aspectRatios.forEach(function(lt){var St=new $(ue.getIcon(lt.horizontal,lt.vertical),lt.horizontal===0&<.vertical===0?"FREE":lt.horizontal+":"+lt.vertical);St.onClick=function(){return ce.ratioButtonClicked(lt)},ve.push(St)}),this.aspectRatioButton=new xe(ue.getIcon(0,0),"Aspect ratio",ve),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,fe.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var Ce=new $('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");Ce.isActive=this.isGridVisible,Ce.onClick=function(){ce.isGridVisible=!ce.isGridVisible,Ce.isActive=ce.isGridVisible},fe.addButton(Ce);var ge=new $('<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(ge.isActive=this.zoomToCropEnabled,ge.onClick=function(){ce.zoomToCropEnabled=!ce.zoomToCropEnabled,ge.isActive=ce.zoomToCropEnabled},fe.addButton(ge),!ee.isLicensed){var ye=new J;this.topToolbar.addElementBlock(ye);var Re=document.createElement("div");Re.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var De=document.createElement("a");De.style.color="currentColor",De.href="https://markerjs.com/products/cropro",De.target="_blank",De.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>',Re.appendChild(De),ye.addElement(Re)}var Pe=new re;Pe.minWidth=3*this.toolbarHeight+"px",Pe.contentAlign="end",this.topToolbar.addButtonBlock(Pe);var ze=new $('<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");ze.onClick=this.startRenderAndClose,Pe.addButton(ze),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(ze.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var at=new $('<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");at.onClick=this.close,Pe.addButton(at),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(at.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},Ee.prototype.addBottomToolbar=function(){var ce=this;this.bottomToolbar=new Z,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 fe=new re;fe.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(fe);var ve=new $('<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");ve.onClick=this.rotateLeftButtonClicked,fe.addButton(ve);var Ce=new $('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");Ce.onClick=this.rotateRightButtonClicked,fe.addButton(Ce);var ge=new J;ge.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ge),this.straightener=new $e("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(Pe){ce.rotateBy(Pe),ce.straightener.angle=ce.rotationAngle},ge.addElement(this.straightener.getUI());var ye=new re;ye.minWidth=2*this.toolbarHeight+"px",ye.contentAlign="end",this.bottomToolbar.addButtonBlock(ye);var Re=new $('<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");Re.onClick=this.flipHorizontallyButtonClicked,ye.addButton(Re);var De=new $('<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");De.onClick=this.flipVerticallyButtonClicked,ye.addButton(De)},Ee.prototype.ratioButtonClicked=function(ce){this.aspectRatio=ce,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},Ee.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=ue.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},Ee.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new le(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},Ee.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Ee.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},Ee.prototype.restoreState=function(ce){if(ce){var fe=this.cropLayer.getRescaledRect(ce.width,ce.height,this.imageWidth,this.imageHeight,ce.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(fe),this.cropRectChanged(fe),this.flippedHorizontally=ce.flippedHorizontally,this.flippedVertically=ce.flippedVertically,this.applyFlip(),this.rotationAngle=ce.rotationAngle,this.applyRotation()}},Ee.prototype.clientToLocalCoordinates=function(ce,fe){var ve=this.cropImage.getBoundingClientRect();return{x:ce-ve.left,y:fe-ve.top}},Ee.prototype.onWindowResize=function(){this.positionUI()},Ee.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var ce=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=ce+"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()},Ee.prototype.rotateLeftButtonClicked=function(){var ce=this.rotationAngle-90;this.rotationAngle%90!=0&&(ce+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(ce)},Ee.prototype.rotateRightButtonClicked=function(){var ce=this.rotationAngle+90;this.rotationAngle%90!=0&&(ce-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(ce)},Ee.prototype.rotateTo=function(ce){ce=(ce=ce>180?ce-360:ce)<=-180?ce+360:ce,this.rotationAngle=ce,this.applyRotation()},Ee.prototype.rotateBy=function(ce){this.rotateTo((this.rotationAngle+ce)%360)},Ee.prototype.applyRotation=function(){var ce=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var fe=this.editingTargetRotationContainer.transform.baseVal.getItem(0);fe.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(fe,0);var ve=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ve.width,this.imageHeight/ve.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=ce},Ee.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},Ee.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},Ee.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},Ee.prototype.startRenderAndClose=function(){return be(this,void 0,void 0,function(){var ce,fe;return se(this,function(ve){switch(ve.label){case 0:return[4,this.render()];case 1:return ce=ve.sent(),fe=this.getState(),this.renderEventListeners.forEach(function(Ce){return Ce(ce,fe)}),this.close(!0),[2]}})})},Ee.prototype.render=function(){return be(this,void 0,void 0,function(){var ce;return se(this,function(fe){switch(fe.label){case 0:return(ce=new Je).naturalSize=this.renderAtNaturalSize,ce.imageType=this.renderImageType,ce.imageQuality=this.renderImageQuality,ce.width=this.renderWidth,ce.height=this.renderHeight,this.unzoomFromCrop(),B.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,ce.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 fe.sent(),[4,ce.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,fe.sent()]}})})},Ee.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Q("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 Q("toolbar_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Q("toolbar-block",`
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
box-sizing: content-box;
|
|
|
`));var ce=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Q("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.toolbarHeight-2*ce)+`px;
|
|
|
height: `+(this.toolbarHeight-2*ce)+`px;
|
|
|
padding: `+ce+`px;
|
|
|
cursor: default;
|
|
|
user-select: none;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Q("toolbar_button_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Q("toolbar_active_button",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
|
`)),this.styles.addRule(new X("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new X("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Q("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 Q("toolbar_dropdown_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Q("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 Q("toolbar_straightener",`
|
|
|
display: flex;
|
|
|
overflow: hidden;
|
|
|
justify-content: center;
|
|
|
height: `+(this.toolbarHeight-2*ce)+`px;
|
|
|
padding: `+ce+`px;
|
|
|
cursor: default;
|
|
|
user-select: none;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Q("toolbar_straightener_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`))},Ee.instanceCounter=0,Ee}(),it=D("8hTe"),je=D.n(it),Ie=/<pre[^>]*>/g;function qe(Ee){var ce=document.createElement("div");return ce.innerHTML=Ee,ce.childNodes.length===0?"":ce.childNodes[0].nodeValue}var st=q.a=function(Ee){var ce=Ee.value,fe=ce===void 0?"":ce,ve=Ee.edit,Ce=ve===void 0?!1:ve,ge=Ee.className,ye=Ee.showTextOnly,Re=Ee.showLines,De=Ee.replaces,Pe=Ee.zoomImg,ze=Ee.hasMask,at=Ee.style,lt=at===void 0?{}:at,St=Ee.stylesPrev,Ot=St===void 0?{}:St,ir=String(fe),Gt=Object(d.useRef)(),yt=Object(d.useRef)(),Fr=Object(d.useState)(""),Pr=Object(S.a)(Fr,2),jr=Pr[0],un=Pr[1],xr=Object(d.useState)("office"),an=Object(S.a)(xr,2),tn=an[0],Ir=an[1],hn=function(){var Kr=new rt(yt.current);Kr.displayMode="popup",Kr.addRenderEventListener(function(){var rn=Object(m.a)(t.a.mark(function Or(Lr){var Wr;return t.a.wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:return Gt.current.style.display="none",yn.next=3,Object(Oe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Lr}});case 3:Wr=yn.sent,Wr!=null&&Wr.id&&De(yt.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(Wr==null?void 0:Wr.id,"?type=").concat(Wr.content_type));case 5:case"end":return yn.stop()}},Or)}));return function(Or){return rn.apply(this,arguments)}}()),Kr.show()},lr=function(){var Kr=new Ae.a(yt.current);Kr.settings.displayMode="popup",Kr.addEventListener("render",function(){var rn=Object(m.a)(t.a.mark(function Or(Lr){var Wr;return t.a.wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:if(Gt.current.style.display="none",!yt.current){yn.next=6;break}return yn.next=4,Object(Oe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Lr.dataUrl}});case 4:Wr=yn.sent,Wr!=null&&Wr.id&&De(yt.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(Wr==null?void 0:Wr.id,"?type=").concat(Wr.content_type));case 6:case"end":return yn.stop()}},Or)}));return function(Or){return rn.apply(this,arguments)}}()),Kr.show(),window.markerArea=Kr},Cr=Object(d.useMemo)(function(){Gt.current&&(Gt.current.style.zIndex=-1);try{var Bt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Kr=/\"\/api\/attachments\/|\"\/attachments\/download\//g,rn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;ir=ir.replace(Bt,"("+ne.a.API_SERVER+"/api/attachments/").replace(Kr,'"'+ne.a.API_SERVER+"/api/attachments/").replace(rn,'"'+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,`
|
|
|
`)}catch(Fn){}var Or=H(ir),Lr=F();if(ir.match(/\[TOC\]/)&&(Or=Or.replace("<p>[TOC]</p>",R()),x()),Or=Or.replace(/(__special_katext_id_\d+__)/g,function(Fn,yn){var Ct=Lr[yn],ur=Ct.type,oi=Ct.expression;return Object(oe.renderToString)(qe(oi)||"",{displayMode:ur==="block",throwOnError:!1,output:"html"})}),Or=Or.replace(/▁/g,"\u2581\u2581\u2581"),M(),ye){var Wr=document.createElement("div");return Wr.innerHTML=Or,Wr.innerText}return setTimeout(function(){return Wn()},500),Or},[ir]),gr=Object(d.useRef)();y.WebkitLineClamp=Re,Re&&(lt=Object(g.a)(Object(g.a)({},lt),y));function xn(Bt){var Kr=Bt.target;if(Kr.tagName.toUpperCase()==="IMG"){if(Pe){var rn=Kr.getAttribute("src");un(rn),Ir("image")}}else if(Kr.tagName.toUpperCase()==="A"){var Or=Kr.getAttribute("href");if(Or.indexOf("office")>-1)Bt.preventDefault(),un(Or),Ir("office");else if(Or.indexOf("application/pdf")>-1)Bt.preventDefault(),un(Or),Ir("pdf");else if(Or.indexOf("text/html")>-1)Bt.preventDefault(),un(Or),Ir("html");else if(Or.startsWith("#")){Bt.preventDefault();var Lr=document.getElementById(Or.replace("#",""));Lr&&Lr.scrollIntoView(!0)}}}var Wn=function(){var Kr,rn=(Kr=gr.current)===null||Kr===void 0?void 0:Kr.querySelectorAll("video");rn==null||rn.forEach(function(Or){if(Or.oncontextmenu=function(){return!1},Or.src.indexOf(".m3u8")>-1&&!Or.canPlayType("application/vnd.apple.mpegurl")){if(G.a.isSupported()){var Lr=new G.a;Lr.loadSource(Or.src),Lr.attachMedia(Or)}}})};Object(d.useEffect)(function(){if(gr.current&&Cr&&(Cr.match(Ie)&&window.PR.prettyPrint()),gr.current)return gr.current.addEventListener("click",xn),function(){gr.current.removeEventListener("click",xn),M(),x()}},[Cr,gr.current,xn]);var gn=function(Kr){if(!Ce)return;Kr.target.nodeName==="IMG"?(Gt.current.style.zIndex=1,Gt.current.style.display="flex",Gt.current.style.width=Kr.target.clientWidth+"px",Gt.current.style.height=Kr.target.clientHeight+"px",Gt.current.style.top=Kr.target.offsetTop+"px",Gt.current.style.left=Kr.target.offsetLeft+"px",yt.current.src=Kr.target.getAttribute("src")):Gt.current.style.display="none"};return i.a.createElement("div",{style:{position:"relative"}},i.a.createElement("div",{ref:gr,style:Object(g.a)({},lt),className:"".concat(ge||""," markdown-body ").concat(je.a.mdBody),onMouseOver:gn,dangerouslySetInnerHTML:{__html:Cr}}),i.a.createElement("div",{ref:Gt,className:je.a.button},i.a.createElement(v.a,null,i.a.createElement(N.a,{onClick:function(){return hn()}},"\u88C1\u526A"),i.a.createElement(N.a,{onClick:function(){return lr()}},"\u7F16\u8F91"))),i.a.createElement("img",{ref:yt,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),i.a.createElement(de.a,{close:!0,data:jr,type:jr!=null&&jr.length?tn:"",style:Object(g.a)({},Ot),onClose:function(){return un("")}}))}},"9OqN":function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("OLod"))})(this,function(P){return P.mode.CTR=function(){var v=P.lib.BlockCipherMode.extend(),C=v.Encryptor=v.extend({processBlock:function(N,g){var m=this._cipher,S=m.blockSize,_=this._iv,t=this._counter;_&&(t=this._counter=_.slice(0),this._iv=void 0);var d=t.slice(0);m.encryptBlock(d,0),t[S-1]=t[S-1]+1|0;for(var i=0;i<S;i++)N[g+i]^=d[i]}});return v.Decryptor=C,v}(),P.mode.CTR})},"9VGf":function(W,q,D){"use strict";D.d(q,"a",function(){return C});var P=D("q1tI"),v=D.n(P);function C(N,g){var m=Object(P.useRef)();Object(P.useEffect)(function(){m.current=N}),Object(P.useEffect)(function(){function S(){m.current()}if(g!==null){var _=setInterval(S,g);return function(){return clearInterval(_)}}},[g])}},ALsQ:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("OLod"))})(this,function(P){return P.mode.CFB=function(){var v=P.lib.BlockCipherMode.extend();v.Encryptor=v.extend({processBlock:function(N,g){var m=this._cipher,S=m.blockSize;C.call(this,N,g,S,m),this._prevBlock=N.slice(g,g+S)}}),v.Decryptor=v.extend({processBlock:function(N,g){var m=this._cipher,S=m.blockSize,_=N.slice(g,g+S);C.call(this,N,g,S,m),this._prevBlock=_}});function C(N,g,m,S){var _,t=this._iv;t?(_=t.slice(0),this._iv=void 0):_=this._prevBlock,S.encryptBlock(_,0);for(var d=0;d<m;d++)N[g+d]^=_[d]}return v}(),P.mode.CFB})},BJfS:function(W,q){var D=function(P){return P.replace(/[A-Z]/g,function(v){return"-"+v.toLowerCase()}).toLowerCase()};W.exports=D},BU3w:function(W,q,D){"use strict";D.d(q,"a",function(){return m});var P=D("MNnm"),v="rc-util-key";function C(S){if(S.attachTo)return S.attachTo;var _=document.querySelector("head");return _||document.body}function N(S){var _,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(P.a)())return null;var d=document.createElement("style");if((_=t.csp)===null||_===void 0?void 0:_.nonce){var i;d.nonce=(i=t.csp)===null||i===void 0?void 0:i.nonce}d.innerHTML=S;var c=C(t),o=c.firstChild;return t.prepend&&c.prepend?c.prepend(d):t.prepend&&o?c.insertBefore(d,o):c.appendChild(d),d}var g=new Map;function m(S,_){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d=C(t);if(!g.has(d)){var i=N("",t),c=i.parentNode;g.set(d,c),c.removeChild(i)}var o=Array.from(g.get(d).children).find(function(l){return l.tagName==="STYLE"&&l[v]===_});if(o){var n,s;if(((n=t.csp)===null||n===void 0?void 0:n.nonce)&&o.nonce!==((s=t.csp)===null||s===void 0?void 0:s.nonce)){var h;o.nonce=(h=t.csp)===null||h===void 0?void 0:h.nonce}return o.innerHTML!==S&&(o.innerHTML=S),o}var f=N(S,t);return f[v]=_,f}},Bd2K:function(W,q,D){(function(P){P(D("VrN/"),D("osHv"))})(function(P){P.defineOption("autoCloseTags",!1,function(t,d,i){if(i!=P.Init&&i&&t.removeKeyMap("autoCloseTags"),!d)return;var c={name:"autoCloseTags"};(typeof d!="object"||d.whenClosing!==!1)&&(c["'/'"]=function(o){return m(o)}),(typeof d!="object"||d.whenOpening!==!1)&&(c["'>'"]=function(o){return N(o)}),t.addKeyMap(c)});var v=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],C=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function N(t){if(t.getOption("disableInput"))return P.Pass;for(var d=t.listSelections(),i=[],c=t.getOption("autoCloseTags"),o=0;o<d.length;o++){if(!d[o].empty())return P.Pass;var n=d[o].head,s=t.getTokenAt(n),h=P.innerMode(t.getMode(),s.state),f=h.state,l=h.mode.xmlCurrentTag&&h.mode.xmlCurrentTag(f),a=l&&l.name;if(!a)return P.Pass;var r=h.mode.configuration=="html",x=typeof c=="object"&&c.dontCloseTags||r&&v,y=typeof c=="object"&&c.indentTags||r&&C;s.end>n.ch&&(a=a.slice(0,a.length-s.end+n.ch));var p=a.toLowerCase();if(!a||s.type=="string"&&(s.end!=n.ch||!/[\"\']/.test(s.string.charAt(s.string.length-1))||s.string.length==1)||s.type=="tag"&&l.close||s.string.indexOf("/")==n.ch-s.start-1||x&&S(x,p)>-1||_(t,h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(f)||[],a,n,!0))return P.Pass;var R=typeof c=="object"&&c.emptyTags;if(R&&S(R,a)>-1){i[o]={text:"/>",newPos:P.Pos(n.line,n.ch+2)};continue}var O=y&&S(y,p)>-1;i[o]={indent:O,text:">"+(O?`
|
|
|
|
|
|
`:"")+"</"+a+">",newPos:O?P.Pos(n.line+1,0):P.Pos(n.line,n.ch+1)}}for(var b=typeof c=="object"&&c.dontIndentOnAutoClose,o=d.length-1;o>=0;o--){var E=i[o];t.replaceRange(E.text,d[o].head,d[o].anchor,"+insert");var w=t.listSelections().slice(0);w[o]={head:E.newPos,anchor:E.newPos},t.setSelections(w),!b&&E.indent&&(t.indentLine(E.newPos.line,null,!0),t.indentLine(E.newPos.line+1,null,!0))}}function g(t,d){for(var i=t.listSelections(),c=[],o=d?"/":"</",n=t.getOption("autoCloseTags"),s=typeof n=="object"&&n.dontIndentOnSlash,h=0;h<i.length;h++){if(!i[h].empty())return P.Pass;var f=i[h].head,l=t.getTokenAt(f),a=P.innerMode(t.getMode(),l.state),r=a.state;if(d&&(l.type=="string"||l.string.charAt(0)!="<"||l.start!=f.ch-1))return P.Pass;var x,y=a.mode.name!="xml"&&t.getMode().name=="htmlmixed";if(y&&a.mode.name=="javascript")x=o+"script";else if(y&&a.mode.name=="css")x=o+"style";else{var p=a.mode.xmlCurrentContext&&a.mode.xmlCurrentContext(r);if(!p||p.length&&_(t,p,p[p.length-1],f))return P.Pass;x=o+p[p.length-1]}t.getLine(f.line).charAt(l.end)!=">"&&(x+=">"),c[h]=x}if(t.replaceSelections(c),i=t.listSelections(),!s)for(var h=0;h<i.length;h++)(h==i.length-1||i[h].head.line<i[h+1].head.line)&&t.indentLine(i[h].head.line)}function m(t){return t.getOption("disableInput")?P.Pass:g(t,!0)}P.commands.closeTag=function(t){return g(t)};function S(t,d){if(t.indexOf)return t.indexOf(d);for(var i=0,c=t.length;i<c;++i)if(t[i]==d)return i;return-1}function _(t,d,i,c,o){if(!P.scanForClosingTag)return!1;var n=Math.min(t.lastLine()+1,c.line+500),s=P.scanForClosingTag(t,c,null,n);if(!s||s.tag!=i)return!1;for(var h=o?1:0,f=d.length-1;f>=0&&d[f]==i;f--)++h;c=s.to;for(var f=1;f<h;f++){var l=P.scanForClosingTag(t,c,null,n);if(!l||l.tag!=i)return!1;c=l.to}return!0}})},BjJ7:function(W,q,D){"use strict";D.d(q,"d",function(){return v}),D.d(q,"c",function(){return C}),D.d(q,"e",function(){return N}),D.d(q,"b",function(){return g}),D.d(q,"a",function(){return S});var P=D("m3rI");function v(_){var t=!0;if(_.length>0){for(var d=0;d<_.length;d++)if(_[d].compile_success==0||!_[d].compile_success){t=!1;break}}else t=!1;return t}function C(_){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",d=[],i=0;i<_.length;i++){var c=_[i],o=t?"".concat(t,"/").concat(c.name):"".concat(c.name);d.push({title:c.name,isLeaf:!(c.type==="tree"),key:o})}return d}function N(_,t,d){for(var i=0;i<_.length;i++){var c=_[i];if(c.key===t){c.children=d;break}c.children&&N(c.children,t,d)}return _}function g(_,t,d){var i;return function(){var c=this,o=arguments,n=function(){i=null,d||_.apply(c,o)},s=d&&!i;clearTimeout(i),i=setTimeout(n,t),s&&_.apply(c,o)}}var m=!0,S=P.a.API_SERVER},"C+DQ":function(W,q,D){},"C/vA":function(W,q,D){"use strict";D.d(q,"a",function(){return P});function P(v){const C=this;let N=!1,g;return function(){return N||(N=!0,g=v.apply(C,arguments)),g}}},"Cg/j":function(W,q,D){"use strict";D.d(q,"b",function(){return P}),D.d(q,"a",function(){return v}),D.d(q,"c",function(){return N}),D.d(q,"d",function(){return g});var P;(function(m){m.serviceIds=new Map,m.DI_TARGET="$di$target",m.DI_DEPENDENCIES="$di$dependencies";function S(_){return _[m.DI_DEPENDENCIES]||[]}m.getServiceDependencies=S})(P||(P={}));const v=N("instantiationService");function C(m,S,_,t){S[P.DI_TARGET]===S?S[P.DI_DEPENDENCIES].push({id:m,index:_,optional:t}):(S[P.DI_DEPENDENCIES]=[{id:m,index:_,optional:t}],S[P.DI_TARGET]=S)}function N(m){if(P.serviceIds.has(m))return P.serviceIds.get(m);const S=function(_,t,d){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");C(S,_,d,!1)};return S.toString=()=>m,P.serviceIds.set(m,S),S}function g(m){return function(S,_,t){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");C(m,S,t,!0)}}},Dgm7:function(W,q,D){W.exports=D.p+"static/auth.ea067b42.png"},DlQD:function(W,q,D){(function(P,v){W.exports=v()})(this,function(){"use strict";function P(fe,ve){for(var Ce=0;Ce<ve.length;Ce++){var ge=ve[Ce];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(fe,ge.key,ge)}}function v(fe,ve,Ce){return ve&&P(fe.prototype,ve),Ce&&P(fe,Ce),fe}function C(fe,ve){if(!fe)return;if(typeof fe=="string")return N(fe,ve);var Ce=Object.prototype.toString.call(fe).slice(8,-1);if(Ce==="Object"&&fe.constructor&&(Ce=fe.constructor.name),Ce==="Map"||Ce==="Set")return Array.from(fe);if(Ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ce))return N(fe,ve)}function N(fe,ve){(ve==null||ve>fe.length)&&(ve=fe.length);for(var Ce=0,ge=new Array(ve);Ce<ve;Ce++)ge[Ce]=fe[Ce];return ge}function g(fe,ve){var Ce;if(typeof Symbol=="undefined"||fe[Symbol.iterator]==null){if(Array.isArray(fe)||(Ce=C(fe))||ve&&fe&&typeof fe.length=="number"){Ce&&(fe=Ce);var ge=0;return function(){return ge>=fe.length?{done:!0}:{done:!1,value:fe[ge++]}}}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 Ce=fe[Symbol.iterator](),Ce.next.bind(Ce)}function m(fe,ve){return ve={exports:{}},fe(ve,ve.exports),ve.exports}var S=m(function(fe){function ve(){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 Ce(ge){fe.exports.defaults=ge}fe.exports={defaults:ve(),getDefaults:ve,changeDefaults:Ce}}),_=S.defaults,t=S.getDefaults,d=S.changeDefaults,i=/[&<>"']/,c=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,n=/[<>"']|&(?!#?\w+;)/g,s={"&":"&","<":"<",">":">",'"':""","'":"'"},h=function(ve){return s[ve]};function f(fe,ve){if(ve){if(i.test(fe))return fe.replace(c,h)}else if(o.test(fe))return fe.replace(n,h);return fe}var l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function a(fe){return fe.replace(l,function(ve,Ce){return Ce=Ce.toLowerCase(),Ce==="colon"?":":Ce.charAt(0)==="#"?Ce.charAt(1)==="x"?String.fromCharCode(parseInt(Ce.substring(2),16)):String.fromCharCode(+Ce.substring(1)):""})}var r=/(^|[^\[])\^/g;function x(fe,ve){fe=fe.source||fe,ve=ve||"";var Ce={replace:function(ye,Re){return Re=Re.source||Re,Re=Re.replace(r,"$1"),fe=fe.replace(ye,Re),Ce},getRegex:function(){return new RegExp(fe,ve)}};return Ce}var y=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function R(fe,ve,Ce){if(fe){var ge;try{ge=decodeURIComponent(a(Ce)).replace(y,"").toLowerCase()}catch(ye){return null}if(ge.indexOf("javascript:")===0||ge.indexOf("vbscript:")===0||ge.indexOf("data:")===0)return null}ve&&!p.test(Ce)&&(Ce=T(ve,Ce));try{Ce=encodeURI(Ce).replace(/%25/g,"%")}catch(ye){return null}return Ce}var O={},b=/^[^:]+:\/*[^/]*$/,E=/^([^:]+:)[\s\S]*$/,w=/^([^:]+:\/*[^/]*)[\s\S]*$/;function T(fe,ve){O[" "+fe]||(b.test(fe)?O[" "+fe]=fe+"/":O[" "+fe]=Y(fe,"/",!0)),fe=O[" "+fe];var Ce=fe.indexOf(":")===-1;return ve.substring(0,2)==="//"?Ce?ve:fe.replace(E,"$1")+ve:ve.charAt(0)==="/"?Ce?ve:fe.replace(w,"$1")+ve:fe+ve}var F={exec:function(){}};function M(fe){for(var ve=1,Ce,ge;ve<arguments.length;ve++){Ce=arguments[ve];for(ge in Ce)Object.prototype.hasOwnProperty.call(Ce,ge)&&(fe[ge]=Ce[ge])}return fe}function L(fe,ve){var Ce=fe.replace(/\|/g,function(Re,De,Pe){for(var ze=!1,at=De;--at>=0&&Pe[at]==="\\";)ze=!ze;return ze?"|":" |"}),ge=Ce.split(/ \|/),ye=0;if(ge.length>ve)ge.splice(ve);else for(;ge.length<ve;)ge.push("");for(;ye<ge.length;ye++)ge[ye]=ge[ye].trim().replace(/\\\|/g,"|");return ge}function Y(fe,ve,Ce){var ge=fe.length;if(ge===0)return"";for(var ye=0;ye<ge;){var Re=fe.charAt(ge-ye-1);if(Re===ve&&!Ce)ye++;else if(Re!==ve&&Ce)ye++;else break}return fe.substr(0,ge-ye)}function K(fe,ve){if(fe.indexOf(ve[1])===-1)return-1;for(var Ce=fe.length,ge=0,ye=0;ye<Ce;ye++)if(fe[ye]==="\\")ye++;else if(fe[ye]===ve[0])ge++;else if(fe[ye]===ve[1]&&(ge--,ge<0))return ye;return-1}function A(fe){fe&&fe.sanitize&&!fe.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var H={escape:f,unescape:a,edit:x,cleanUrl:R,resolveUrl:T,noopTest:F,merge:M,splitCells:L,rtrim:Y,findClosingBracket:K,checkSanitizeDeprecation:A},U=S.defaults,I=H.rtrim,G=H.splitCells,ne=H.escape,oe=H.findClosingBracket;function de(fe,ve,Ce){var ge=ve.href,ye=ve.title?ne(ve.title):null,Re=fe[1].replace(/\\([\[\]])/g,"$1");return fe[0].charAt(0)!=="!"?{type:"link",raw:Ce,href:ge,title:ye,text:Re}:{type:"image",raw:Ce,href:ge,title:ye,text:ne(Re)}}function Oe(fe,ve){var Ce=fe.match(/^(\s+)(?:```)/);if(Ce===null)return ve;var ge=Ce[1];return ve.split(`
|
|
|
`).map(function(ye){var Re=ye.match(/^\s+/);if(Re===null)return ye;var De=Re[0];return De.length>=ge.length?ye.slice(ge.length):ye}).join(`
|
|
|
`)}var Ae=function(){function fe(Ce){this.options=Ce||U}var ve=fe.prototype;return ve.space=function(ge){var ye=this.rules.block.newline.exec(ge);if(ye)return ye[0].length>1?{type:"space",raw:ye[0]}:{raw:`
|
|
|
`}},ve.code=function(ge,ye){var Re=this.rules.block.code.exec(ge);if(Re){var De=ye[ye.length-1];if(De&&De.type==="paragraph")return{raw:Re[0],text:Re[0].trimRight()};var Pe=Re[0].replace(/^ {4}/gm,"");return{type:"code",raw:Re[0],codeBlockStyle:"indented",text:this.options.pedantic?Pe:I(Pe,`
|
|
|
`)}}},ve.fences=function(ge){var ye=this.rules.block.fences.exec(ge);if(ye){var Re=ye[0],De=Oe(Re,ye[3]||"");return{type:"code",raw:Re,lang:ye[2]?ye[2].trim():ye[2],text:De}}},ve.heading=function(ge){var ye=this.rules.block.heading.exec(ge);if(ye)return{type:"heading",raw:ye[0],depth:ye[1].length,text:ye[2]}},ve.nptable=function(ge){var ye=this.rules.block.nptable.exec(ge);if(ye){var Re={type:"table",header:G(ye[1].replace(/^ *| *\| *$/g,"")),align:ye[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ye[3]?ye[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:ye[0]};if(Re.header.length===Re.align.length){var De=Re.align.length,Pe;for(Pe=0;Pe<De;Pe++)/^ *-+: *$/.test(Re.align[Pe])?Re.align[Pe]="right":/^ *:-+: *$/.test(Re.align[Pe])?Re.align[Pe]="center":/^ *:-+ *$/.test(Re.align[Pe])?Re.align[Pe]="left":Re.align[Pe]=null;for(De=Re.cells.length,Pe=0;Pe<De;Pe++)Re.cells[Pe]=G(Re.cells[Pe],Re.header.length);return Re}}},ve.hr=function(ge){var ye=this.rules.block.hr.exec(ge);if(ye)return{type:"hr",raw:ye[0]}},ve.blockquote=function(ge){var ye=this.rules.block.blockquote.exec(ge);if(ye){var Re=ye[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ye[0],text:Re}}},ve.list=function(ge){var ye=this.rules.block.list.exec(ge);if(ye){for(var Re=ye[0],De=ye[2],Pe=De.length>1,ze=De[De.length-1]===")",at={type:"list",raw:Re,ordered:Pe,start:Pe?+De.slice(0,-1):"",loose:!1,items:[]},lt=ye[0].match(this.rules.block.item),St=!1,Ot,ir,Gt,yt,Fr,Pr,jr,un=lt.length,xr=0;xr<un;xr++)Ot=lt[xr],Re=Ot,ir=Ot.length,Ot=Ot.replace(/^ *([*+-]|\d+[.)]) */,""),~Ot.indexOf(`
|
|
|
`)&&(ir-=Ot.length,Ot=this.options.pedantic?Ot.replace(/^ {1,4}/gm,""):Ot.replace(new RegExp("^ {1,"+ir+"}","gm"),"")),xr!==un-1&&(Gt=this.rules.block.bullet.exec(lt[xr+1])[0],(Pe?Gt.length===1||!ze&&Gt[Gt.length-1]===")":Gt.length>1||this.options.smartLists&&Gt!==De)&&(yt=lt.slice(xr+1).join(`
|
|
|
`),at.raw=at.raw.substring(0,at.raw.length-yt.length),xr=un-1)),Fr=St||/\n\n(?!\s*$)/.test(Ot),xr!==un-1&&(St=Ot.charAt(Ot.length-1)===`
|
|
|
`,Fr||(Fr=St)),Fr&&(at.loose=!0),Pr=/^\[[ xX]\] /.test(Ot),jr=void 0,Pr&&(jr=Ot[1]!==" ",Ot=Ot.replace(/^\[[ xX]\] +/,"")),at.items.push({type:"list_item",raw:Re,task:Pr,checked:jr,loose:Fr,text:Ot});return at}},ve.html=function(ge){var ye=this.rules.block.html.exec(ge);if(ye)return{type:this.options.sanitize?"paragraph":"html",raw:ye[0],pre:!this.options.sanitizer&&(ye[1]==="pre"||ye[1]==="script"||ye[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ye[0]):ne(ye[0]):ye[0]}},ve.def=function(ge){var ye=this.rules.block.def.exec(ge);if(ye){ye[3]&&(ye[3]=ye[3].substring(1,ye[3].length-1));var Re=ye[1].toLowerCase().replace(/\s+/g," ");return{tag:Re,raw:ye[0],href:ye[2],title:ye[3]}}},ve.table=function(ge){var ye=this.rules.block.table.exec(ge);if(ye){var Re={type:"table",header:G(ye[1].replace(/^ *| *\| *$/g,"")),align:ye[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ye[3]?ye[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(Re.header.length===Re.align.length){Re.raw=ye[0];var De=Re.align.length,Pe;for(Pe=0;Pe<De;Pe++)/^ *-+: *$/.test(Re.align[Pe])?Re.align[Pe]="right":/^ *:-+: *$/.test(Re.align[Pe])?Re.align[Pe]="center":/^ *:-+ *$/.test(Re.align[Pe])?Re.align[Pe]="left":Re.align[Pe]=null;for(De=Re.cells.length,Pe=0;Pe<De;Pe++)Re.cells[Pe]=G(Re.cells[Pe].replace(/^ *\| *| *\| *$/g,""),Re.header.length);return Re}}},ve.lheading=function(ge){var ye=this.rules.block.lheading.exec(ge);if(ye)return{type:"heading",raw:ye[0],depth:ye[2].charAt(0)==="="?1:2,text:ye[1]}},ve.paragraph=function(ge){var ye=this.rules.block.paragraph.exec(ge);if(ye)return{type:"paragraph",raw:ye[0],text:ye[1].charAt(ye[1].length-1)===`
|
|
|
`?ye[1].slice(0,-1):ye[1]}},ve.text=function(ge,ye){var Re=this.rules.block.text.exec(ge);if(Re){var De=ye[ye.length-1];return De&&De.type==="text"?{raw:Re[0],text:Re[0]}:{type:"text",raw:Re[0],text:Re[0]}}},ve.escape=function(ge){var ye=this.rules.inline.escape.exec(ge);if(ye)return{type:"escape",raw:ye[0],text:ne(ye[1])}},ve.tag=function(ge,ye,Re){var De=this.rules.inline.tag.exec(ge);if(De)return!ye&&/^<a /i.test(De[0])?ye=!0:ye&&/^<\/a>/i.test(De[0])&&(ye=!1),!Re&&/^<(pre|code|kbd|script)(\s|>)/i.test(De[0])?Re=!0:Re&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(De[0])&&(Re=!1),{type:this.options.sanitize?"text":"html",raw:De[0],inLink:ye,inRawBlock:Re,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(De[0]):ne(De[0]):De[0]}},ve.link=function(ge){var ye=this.rules.inline.link.exec(ge);if(ye){var Re=oe(ye[2],"()");if(Re>-1){var De=ye[0].indexOf("!")===0?5:4,Pe=De+ye[1].length+Re;ye[2]=ye[2].substring(0,Re),ye[0]=ye[0].substring(0,Pe).trim(),ye[3]=""}var ze=ye[2],at="";if(this.options.pedantic){var lt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ze);lt?(ze=lt[1],at=lt[3]):at=""}else at=ye[3]?ye[3].slice(1,-1):"";ze=ze.trim().replace(/^<([\s\S]*)>$/,"$1");var St=de(ye,{href:ze&&ze.replace(this.rules.inline._escapes,"$1"),title:at&&at.replace(this.rules.inline._escapes,"$1")},ye[0]);return St}},ve.reflink=function(ge,ye){var Re;if((Re=this.rules.inline.reflink.exec(ge))||(Re=this.rules.inline.nolink.exec(ge))){var De=(Re[2]||Re[1]).replace(/\s+/g," ");if(De=ye[De.toLowerCase()],!De||!De.href){var Pe=Re[0].charAt(0);return{type:"text",raw:Pe,text:Pe}}var ze=de(Re,De,Re[0]);return ze}},ve.strong=function(ge,ye,Re){Re===void 0&&(Re="");var De=this.rules.inline.strong.start.exec(ge);if(De&&(!De[1]||De[1]&&(Re===""||this.rules.inline.punctuation.exec(Re)))){ye=ye.slice(-1*ge.length);var Pe=De[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Pe.lastIndex=0;for(var ze;(De=Pe.exec(ye))!=null;)if(ze=this.rules.inline.strong.middle.exec(ye.slice(0,De.index+3)),ze)return{type:"strong",raw:ge.slice(0,ze[0].length),text:ge.slice(2,ze[0].length-2)}}},ve.em=function(ge,ye,Re){Re===void 0&&(Re="");var De=this.rules.inline.em.start.exec(ge);if(De&&(!De[1]||De[1]&&(Re===""||this.rules.inline.punctuation.exec(Re)))){ye=ye.slice(-1*ge.length);var Pe=De[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Pe.lastIndex=0;for(var ze;(De=Pe.exec(ye))!=null;)if(ze=this.rules.inline.em.middle.exec(ye.slice(0,De.index+2)),ze)return{type:"em",raw:ge.slice(0,ze[0].length),text:ge.slice(1,ze[0].length-1)}}},ve.codespan=function(ge){var ye=this.rules.inline.code.exec(ge);if(ye){var Re=ye[2].replace(/\n/g," "),De=/[^ ]/.test(Re),Pe=Re.startsWith(" ")&&Re.endsWith(" ");return De&&Pe&&(Re=Re.substring(1,Re.length-1)),Re=ne(Re,!0),{type:"codespan",raw:ye[0],text:Re}}},ve.br=function(ge){var ye=this.rules.inline.br.exec(ge);if(ye)return{type:"br",raw:ye[0]}},ve.del=function(ge){var ye=this.rules.inline.del.exec(ge);if(ye)return{type:"del",raw:ye[0],text:ye[1]}},ve.autolink=function(ge,ye){var Re=this.rules.inline.autolink.exec(ge);if(Re){var De,Pe;return Re[2]==="@"?(De=ne(this.options.mangle?ye(Re[1]):Re[1]),Pe="mailto:"+De):(De=ne(Re[1]),Pe=De),{type:"link",raw:Re[0],text:De,href:Pe,tokens:[{type:"text",raw:De,text:De}]}}},ve.url=function(ge,ye){var Re;if(Re=this.rules.inline.url.exec(ge)){var De,Pe;if(Re[2]==="@")De=ne(this.options.mangle?ye(Re[0]):Re[0]),Pe="mailto:"+De;else{var ze;do ze=Re[0],Re[0]=this.rules.inline._backpedal.exec(Re[0])[0];while(ze!==Re[0]);De=ne(Re[0]),Re[1]==="www."?Pe="http://"+De:Pe=De}return{type:"link",raw:Re[0],text:De,href:Pe,tokens:[{type:"text",raw:De,text:De}]}}},ve.inlineText=function(ge,ye,Re){var De=this.rules.inline.text.exec(ge);if(De){var Pe;return ye?Pe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(De[0]):ne(De[0]):De[0]:Pe=ne(this.options.smartypants?Re(De[0]):De[0]),{type:"text",raw:De[0],text:Pe}}},fe}(),pe=H.noopTest,Se=H.edit,be=H.merge,se={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:pe,table:pe,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};se._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,se._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,se.def=Se(se.def).replace("label",se._label).replace("title",se._title).getRegex(),se.bullet=/(?:[*+-]|\d{1,9}[.)])/,se.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,se.item=Se(se.item,"gm").replace(/bull/g,se.bullet).getRegex(),se.list=Se(se.list).replace(/bull/g,se.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+se.def.source+")").getRegex(),se._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",se._comment=/<!--(?!-?>)[\s\S]*?-->/,se.html=Se(se.html,"i").replace("comment",se._comment).replace("tag",se._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),se.paragraph=Se(se._paragraph).replace("hr",se.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",se._tag).getRegex(),se.blockquote=Se(se.blockquote).replace("paragraph",se.paragraph).getRegex(),se.normal=be({},se),se.gfm=be({},se.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*|$)"}),se.gfm.nptable=Se(se.gfm.nptable).replace("hr",se.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",se._tag).getRegex(),se.gfm.table=Se(se.gfm.table).replace("hr",se.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",se._tag).getRegex(),se.pedantic=be({},se.normal,{html:Se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",se._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:pe,paragraph:Se(se.normal._paragraph).replace("hr",se.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",se.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ee={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:pe,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:pe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ee._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ee.punctuation=Se(ee.punctuation).replace(/punctuation/g,ee._punctuation).getRegex(),ee._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ee._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ee.em.start=Se(ee.em.start).replace(/punctuation/g,ee._punctuation).getRegex(),ee.em.middle=Se(ee.em.middle).replace(/punctuation/g,ee._punctuation).replace(/overlapSkip/g,ee._overlapSkip).getRegex(),ee.em.endAst=Se(ee.em.endAst,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.em.endUnd=Se(ee.em.endUnd,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.strong.start=Se(ee.strong.start).replace(/punctuation/g,ee._punctuation).getRegex(),ee.strong.middle=Se(ee.strong.middle).replace(/punctuation/g,ee._punctuation).replace(/blockSkip/g,ee._blockSkip).getRegex(),ee.strong.endAst=Se(ee.strong.endAst,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.strong.endUnd=Se(ee.strong.endUnd,"g").replace(/punctuation/g,ee._punctuation).getRegex(),ee.blockSkip=Se(ee._blockSkip,"g").getRegex(),ee.overlapSkip=Se(ee._overlapSkip,"g").getRegex(),ee._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ee._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ee._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])?)+(?![-_])/,ee.autolink=Se(ee.autolink).replace("scheme",ee._scheme).replace("email",ee._email).getRegex(),ee._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ee.tag=Se(ee.tag).replace("comment",se._comment).replace("attribute",ee._attribute).getRegex(),ee._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ee._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ee._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ee.link=Se(ee.link).replace("label",ee._label).replace("href",ee._href).replace("title",ee._title).getRegex(),ee.reflink=Se(ee.reflink).replace("label",ee._label).getRegex(),ee.reflinkSearch=Se(ee.reflinkSearch,"g").replace("reflink",ee.reflink).replace("nolink",ee.nolink).getRegex(),ee.normal=be({},ee),ee.pedantic=be({},ee.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:Se(/^!?\[(label)\]\((.*?)\)/).replace("label",ee._label).getRegex(),reflink:Se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ee._label).getRegex()}),ee.gfm=be({},ee.normal,{escape:Se(ee.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),ee.gfm.url=Se(ee.gfm.url,"i").replace("email",ee.gfm._extended_email).getRegex(),ee.breaks=be({},ee.gfm,{br:Se(ee.br).replace("{2,}","*").getRegex(),text:Se(ee.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var B={block:se,inline:ee},V=S.defaults,X=B.block,Q=B.inline;function Z(fe){return fe.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 ie(fe){var ve="",Ce,ge,ye=fe.length;for(Ce=0;Ce<ye;Ce++)ge=fe.charCodeAt(Ce),Math.random()>.5&&(ge="x"+ge.toString(16)),ve+="&#"+ge+";";return ve}var re=function(){function fe(Ce){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ce||V,this.options.tokenizer=this.options.tokenizer||new Ae,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ge={block:X.normal,inline:Q.normal};this.options.pedantic?(ge.block=X.pedantic,ge.inline=Q.pedantic):this.options.gfm&&(ge.block=X.gfm,this.options.breaks?ge.inline=Q.breaks:ge.inline=Q.gfm),this.tokenizer.rules=ge}fe.lex=function(ge,ye){var Re=new fe(ye);return Re.lex(ge)};var ve=fe.prototype;return ve.lex=function(ge){return ge=ge.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(ge,this.tokens,!0),this.inline(this.tokens),this.tokens},ve.blockTokens=function(ge,ye,Re){ye===void 0&&(ye=[]),Re===void 0&&(Re=!0),ge=ge.replace(/^ +$/gm,"");for(var De,Pe,ze,at;ge;){if(De=this.tokenizer.space(ge)){ge=ge.substring(De.raw.length),De.type&&ye.push(De);continue}if(De=this.tokenizer.code(ge,ye)){ge=ge.substring(De.raw.length),De.type?ye.push(De):(at=ye[ye.length-1],at.raw+=`
|
|
|
`+De.raw,at.text+=`
|
|
|
`+De.text);continue}if(De=this.tokenizer.fences(ge)){ge=ge.substring(De.raw.length),ye.push(De);continue}if(De=this.tokenizer.heading(ge)){ge=ge.substring(De.raw.length),ye.push(De);continue}if(De=this.tokenizer.nptable(ge)){ge=ge.substring(De.raw.length),ye.push(De);continue}if(De=this.tokenizer.hr(ge)){ge=ge.substring(De.raw.length),ye.push(De);continue}if(De=this.tokenizer.blockquote(ge)){ge=ge.substring(De.raw.length),De.tokens=this.blockTokens(De.text,[],Re),ye.push(De);continue}if(De=this.tokenizer.list(ge)){for(ge=ge.substring(De.raw.length),ze=De.items.length,Pe=0;Pe<ze;Pe++)De.items[Pe].tokens=this.blockTokens(De.items[Pe].text,[],!1);ye.push(De);continue}if(De=this.tokenizer.html(ge)){ge=ge.substring(De.raw.length),ye.push(De);continue}if(Re&&(De=this.tokenizer.def(ge))){ge=ge.substring(De.raw.length),this.tokens.links[De.tag]||(this.tokens.links[De.tag]={href:De.href,title:De.title});continue}if(De=this.tokenizer.table(ge)){ge=ge.substring(De.raw.length),ye.push(De);continue}if(De=this.tokenizer.lheading(ge)){ge=ge.substring(De.raw.length),ye.push(De);continue}if(Re&&(De=this.tokenizer.paragraph(ge))){ge=ge.substring(De.raw.length),ye.push(De);continue}if(De=this.tokenizer.text(ge,ye)){ge=ge.substring(De.raw.length),De.type?ye.push(De):(at=ye[ye.length-1],at.raw+=`
|
|
|
`+De.raw,at.text+=`
|
|
|
`+De.text);continue}if(ge){var lt="Infinite loop on byte: "+ge.charCodeAt(0);if(this.options.silent){console.error(lt);break}else throw new Error(lt)}}return ye},ve.inline=function(ge){var ye,Re,De,Pe,ze,at,lt=ge.length;for(ye=0;ye<lt;ye++){at=ge[ye];switch(at.type){case"paragraph":case"text":case"heading":{at.tokens=[],this.inlineTokens(at.text,at.tokens);break}case"table":{for(at.tokens={header:[],cells:[]},Pe=at.header.length,Re=0;Re<Pe;Re++)at.tokens.header[Re]=[],this.inlineTokens(at.header[Re],at.tokens.header[Re]);for(Pe=at.cells.length,Re=0;Re<Pe;Re++)for(ze=at.cells[Re],at.tokens.cells[Re]=[],De=0;De<ze.length;De++)at.tokens.cells[Re][De]=[],this.inlineTokens(ze[De],at.tokens.cells[Re][De]);break}case"blockquote":{this.inline(at.tokens);break}case"list":{for(Pe=at.items.length,Re=0;Re<Pe;Re++)this.inline(at.items[Re].tokens);break}}}return ge},ve.inlineTokens=function(ge,ye,Re,De,Pe){ye===void 0&&(ye=[]),Re===void 0&&(Re=!1),De===void 0&&(De=!1),Pe===void 0&&(Pe="");var ze,at=ge,lt;if(this.tokens.links){var St=Object.keys(this.tokens.links);if(St.length>0)for(;(lt=this.tokenizer.rules.inline.reflinkSearch.exec(at))!=null;)St.includes(lt[0].slice(lt[0].lastIndexOf("[")+1,-1))&&(at=at.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+at.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(lt=this.tokenizer.rules.inline.blockSkip.exec(at))!=null;)at=at.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+at.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ge;){if(ze=this.tokenizer.escape(ge)){ge=ge.substring(ze.raw.length),ye.push(ze);continue}if(ze=this.tokenizer.tag(ge,Re,De)){ge=ge.substring(ze.raw.length),Re=ze.inLink,De=ze.inRawBlock,ye.push(ze);continue}if(ze=this.tokenizer.link(ge)){ge=ge.substring(ze.raw.length),ze.type==="link"&&(ze.tokens=this.inlineTokens(ze.text,[],!0,De)),ye.push(ze);continue}if(ze=this.tokenizer.reflink(ge,this.tokens.links)){ge=ge.substring(ze.raw.length),ze.type==="link"&&(ze.tokens=this.inlineTokens(ze.text,[],!0,De)),ye.push(ze);continue}if(ze=this.tokenizer.strong(ge,at,Pe)){ge=ge.substring(ze.raw.length),ze.tokens=this.inlineTokens(ze.text,[],Re,De),ye.push(ze);continue}if(ze=this.tokenizer.em(ge,at,Pe)){ge=ge.substring(ze.raw.length),ze.tokens=this.inlineTokens(ze.text,[],Re,De),ye.push(ze);continue}if(ze=this.tokenizer.codespan(ge)){ge=ge.substring(ze.raw.length),ye.push(ze);continue}if(ze=this.tokenizer.br(ge)){ge=ge.substring(ze.raw.length),ye.push(ze);continue}if(ze=this.tokenizer.del(ge)){ge=ge.substring(ze.raw.length),ze.tokens=this.inlineTokens(ze.text,[],Re,De),ye.push(ze);continue}if(ze=this.tokenizer.autolink(ge,ie)){ge=ge.substring(ze.raw.length),ye.push(ze);continue}if(!Re&&(ze=this.tokenizer.url(ge,ie))){ge=ge.substring(ze.raw.length),ye.push(ze);continue}if(ze=this.tokenizer.inlineText(ge,De,Z)){ge=ge.substring(ze.raw.length),Pe=ze.raw.slice(-1),ye.push(ze);continue}if(ge){var Ot="Infinite loop on byte: "+ge.charCodeAt(0);if(this.options.silent){console.error(Ot);break}else throw new Error(Ot)}}return ye},v(fe,null,[{key:"rules",get:function(){return{block:X,inline:Q}}}]),fe}(),$=S.defaults,J=H.cleanUrl,le=H.escape,ue=function(){function fe(Ce){this.options=Ce||$}var ve=fe.prototype;return ve.code=function(ge,ye,Re){var De=(ye||"").match(/\S*/)[0];if(this.options.highlight){var Pe=this.options.highlight(ge,De);Pe!=null&&Pe!==ge&&(Re=!0,ge=Pe)}return De?'<pre><code class="'+this.options.langPrefix+le(De,!0)+'">'+(Re?ge:le(ge,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(Re?ge:le(ge,!0))+`</code></pre>
|
|
|
`},ve.blockquote=function(ge){return`<blockquote>
|
|
|
`+ge+`</blockquote>
|
|
|
`},ve.html=function(ge){return ge},ve.heading=function(ge,ye,Re,De){return this.options.headerIds?"<h"+ye+' id="'+this.options.headerPrefix+De.slug(Re)+'">'+ge+"</h"+ye+`>
|
|
|
`:"<h"+ye+">"+ge+"</h"+ye+`>
|
|
|
`},ve.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},ve.list=function(ge,ye,Re){var De=ye?"ol":"ul",Pe=ye&&Re!==1?' start="'+Re+'"':"";return"<"+De+Pe+`>
|
|
|
`+ge+"</"+De+`>
|
|
|
`},ve.listitem=function(ge){return"<li>"+ge+`</li>
|
|
|
`},ve.checkbox=function(ge){return"<input "+(ge?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ve.paragraph=function(ge){return"<p>"+ge+`</p>
|
|
|
`},ve.table=function(ge,ye){return ye&&(ye="<tbody>"+ye+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+ge+`</thead>
|
|
|
`+ye+`</table>
|
|
|
`},ve.tablerow=function(ge){return`<tr>
|
|
|
`+ge+`</tr>
|
|
|
`},ve.tablecell=function(ge,ye){var Re=ye.header?"th":"td",De=ye.align?"<"+Re+' align="'+ye.align+'">':"<"+Re+">";return De+ge+"</"+Re+`>
|
|
|
`},ve.strong=function(ge){return"<strong>"+ge+"</strong>"},ve.em=function(ge){return"<em>"+ge+"</em>"},ve.codespan=function(ge){return"<code>"+ge+"</code>"},ve.br=function(){return this.options.xhtml?"<br/>":"<br>"},ve.del=function(ge){return"<del>"+ge+"</del>"},ve.link=function(ge,ye,Re){if(ge=J(this.options.sanitize,this.options.baseUrl,ge),ge===null)return Re;var De='<a href="'+le(ge)+'"';return ye&&(De+=' title="'+ye+'"'),De+=">"+Re+"</a>",De},ve.image=function(ge,ye,Re){if(ge=J(this.options.sanitize,this.options.baseUrl,ge),ge===null)return Re;var De='<img src="'+ge+'" alt="'+Re+'"';return ye&&(De+=' title="'+ye+'"'),De+=this.options.xhtml?"/>":">",De},ve.text=function(ge){return ge},fe}(),xe=function(){function fe(){}var ve=fe.prototype;return ve.strong=function(ge){return ge},ve.em=function(ge){return ge},ve.codespan=function(ge){return ge},ve.del=function(ge){return ge},ve.html=function(ge){return ge},ve.text=function(ge){return ge},ve.link=function(ge,ye,Re){return""+Re},ve.image=function(ge,ye,Re){return""+Re},ve.br=function(){return""},fe}(),Me=function(){function fe(){this.seen={}}var ve=fe.prototype;return ve.slug=function(ge){var ye=ge.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ye)){var Re=ye;do this.seen[Re]++,ye=Re+"-"+this.seen[Re];while(this.seen.hasOwnProperty(ye))}return this.seen[ye]=0,ye},fe}(),Xe=S.defaults,$e=H.unescape,Je=function(){function fe(Ce){this.options=Ce||Xe,this.options.renderer=this.options.renderer||new ue,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new xe,this.slugger=new Me}fe.parse=function(ge,ye){var Re=new fe(ye);return Re.parse(ge)};var ve=fe.prototype;return ve.parse=function(ge,ye){ye===void 0&&(ye=!0);var Re="",De,Pe,ze,at,lt,St,Ot,ir,Gt,yt,Fr,Pr,jr,un,xr,an,tn,Ir,hn=ge.length;for(De=0;De<hn;De++){yt=ge[De];switch(yt.type){case"space":continue;case"hr":{Re+=this.renderer.hr();continue}case"heading":{Re+=this.renderer.heading(this.parseInline(yt.tokens),yt.depth,$e(this.parseInline(yt.tokens,this.textRenderer)),this.slugger);continue}case"code":{Re+=this.renderer.code(yt.text,yt.lang,yt.escaped);continue}case"table":{for(ir="",Ot="",at=yt.header.length,Pe=0;Pe<at;Pe++)Ot+=this.renderer.tablecell(this.parseInline(yt.tokens.header[Pe]),{header:!0,align:yt.align[Pe]});for(ir+=this.renderer.tablerow(Ot),Gt="",at=yt.cells.length,Pe=0;Pe<at;Pe++){for(St=yt.tokens.cells[Pe],Ot="",lt=St.length,ze=0;ze<lt;ze++)Ot+=this.renderer.tablecell(this.parseInline(St[ze]),{header:!1,align:yt.align[ze]});Gt+=this.renderer.tablerow(Ot)}Re+=this.renderer.table(ir,Gt);continue}case"blockquote":{Gt=this.parse(yt.tokens),Re+=this.renderer.blockquote(Gt);continue}case"list":{for(Fr=yt.ordered,Pr=yt.start,jr=yt.loose,at=yt.items.length,Gt="",Pe=0;Pe<at;Pe++)xr=yt.items[Pe],an=xr.checked,tn=xr.task,un="",xr.task&&(Ir=this.renderer.checkbox(an),jr?xr.tokens.length>0&&xr.tokens[0].type==="text"?(xr.tokens[0].text=Ir+" "+xr.tokens[0].text,xr.tokens[0].tokens&&xr.tokens[0].tokens.length>0&&xr.tokens[0].tokens[0].type==="text"&&(xr.tokens[0].tokens[0].text=Ir+" "+xr.tokens[0].tokens[0].text)):xr.tokens.unshift({type:"text",text:Ir}):un+=Ir),un+=this.parse(xr.tokens,jr),Gt+=this.renderer.listitem(un,tn,an);Re+=this.renderer.list(Gt,Fr,Pr);continue}case"html":{Re+=this.renderer.html(yt.text);continue}case"paragraph":{Re+=this.renderer.paragraph(this.parseInline(yt.tokens));continue}case"text":{for(Gt=yt.tokens?this.parseInline(yt.tokens):yt.text;De+1<hn&&ge[De+1].type==="text";)yt=ge[++De],Gt+=`
|
|
|
`+(yt.tokens?this.parseInline(yt.tokens):yt.text);Re+=ye?this.renderer.paragraph(Gt):Gt;continue}default:{var lr='Token with "'+yt.type+'" type was not found.';if(this.options.silent){console.error(lr);return}else throw new Error(lr)}}}return Re},ve.parseInline=function(ge,ye){ye=ye||this.renderer;var Re="",De,Pe,ze=ge.length;for(De=0;De<ze;De++){Pe=ge[De];switch(Pe.type){case"escape":{Re+=ye.text(Pe.text);break}case"html":{Re+=ye.html(Pe.text);break}case"link":{Re+=ye.link(Pe.href,Pe.title,this.parseInline(Pe.tokens,ye));break}case"image":{Re+=ye.image(Pe.href,Pe.title,Pe.text);break}case"strong":{Re+=ye.strong(this.parseInline(Pe.tokens,ye));break}case"em":{Re+=ye.em(this.parseInline(Pe.tokens,ye));break}case"codespan":{Re+=ye.codespan(Pe.text);break}case"br":{Re+=ye.br();break}case"del":{Re+=ye.del(this.parseInline(Pe.tokens,ye));break}case"text":{Re+=ye.text(Pe.text);break}default:{var at='Token with "'+Pe.type+'" type was not found.';if(this.options.silent){console.error(at);return}else throw new Error(at)}}}return Re},fe}(),rt=H.merge,it=H.checkSanitizeDeprecation,je=H.escape,Ie=S.getDefaults,qe=S.changeDefaults,st=S.defaults;function Ee(fe,ve,Ce){if(typeof fe=="undefined"||fe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof fe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(fe)+", string expected");if(typeof ve=="function"&&(Ce=ve,ve=null),ve=rt({},Ee.defaults,ve||{}),it(ve),Ce){var ge=ve.highlight,ye;try{ye=re.lex(fe,ve)}catch(ze){return Ce(ze)}var Re=function(at){var lt;if(!at)try{lt=Je.parse(ye,ve)}catch(St){at=St}return ve.highlight=ge,at?Ce(at):Ce(null,lt)};if(!ge||ge.length<3)return Re();if(delete ve.highlight,!ye.length)return Re();var De=0;Ee.walkTokens(ye,function(ze){ze.type==="code"&&(De++,setTimeout(function(){ge(ze.text,ze.lang,function(at,lt){if(at)return Re(at);lt!=null&<!==ze.text&&(ze.text=lt,ze.escaped=!0),De--,De===0&&Re()})},0))}),De===0&&Re();return}try{var Pe=re.lex(fe,ve);return ve.walkTokens&&Ee.walkTokens(Pe,ve.walkTokens),Je.parse(Pe,ve)}catch(ze){if(ze.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,ve.silent)return"<p>An error occurred:</p><pre>"+je(ze.message+"",!0)+"</pre>";throw ze}}Ee.options=Ee.setOptions=function(fe){return rt(Ee.defaults,fe),qe(Ee.defaults),Ee},Ee.getDefaults=Ie,Ee.defaults=st,Ee.use=function(fe){var ve=rt({},fe);if(fe.renderer&&function(){var ge=Ee.defaults.renderer||new ue,ye=function(Pe){var ze=ge[Pe];ge[Pe]=function(){for(var at=arguments.length,lt=new Array(at),St=0;St<at;St++)lt[St]=arguments[St];var Ot=fe.renderer[Pe].apply(ge,lt);return Ot===!1&&(Ot=ze.apply(ge,lt)),Ot}};for(var Re in fe.renderer)ye(Re);ve.renderer=ge}(),fe.tokenizer&&function(){var ge=Ee.defaults.tokenizer||new Ae,ye=function(Pe){var ze=ge[Pe];ge[Pe]=function(){for(var at=arguments.length,lt=new Array(at),St=0;St<at;St++)lt[St]=arguments[St];var Ot=fe.tokenizer[Pe].apply(ge,lt);return Ot===!1&&(Ot=ze.apply(ge,lt)),Ot}};for(var Re in fe.tokenizer)ye(Re);ve.tokenizer=ge}(),fe.walkTokens){var Ce=Ee.defaults.walkTokens;ve.walkTokens=function(ge){fe.walkTokens(ge),Ce&&Ce(ge)}}Ee.setOptions(ve)},Ee.walkTokens=function(fe,ve){for(var Ce=g(fe),ge;!(ge=Ce()).done;){var ye=ge.value;ve(ye);switch(ye.type){case"table":{for(var Re=g(ye.tokens.header),De;!(De=Re()).done;){var Pe=De.value;Ee.walkTokens(Pe,ve)}for(var ze=g(ye.tokens.cells),at;!(at=ze()).done;)for(var lt=at.value,St=g(lt),Ot;!(Ot=St()).done;){var ir=Ot.value;Ee.walkTokens(ir,ve)}break}case"list":{Ee.walkTokens(ye.items,ve);break}default:ye.tokens&&Ee.walkTokens(ye.tokens,ve)}}},Ee.Parser=Je,Ee.parser=Je.parse,Ee.Renderer=ue,Ee.TextRenderer=xe,Ee.Lexer=re,Ee.lexer=re.lex,Ee.Tokenizer=Ae,Ee.Slugger=Me,Ee.parse=Ee;var ce=Ee;return ce})},E4JC:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(P){return function(){var v=P,C=v.lib,N=C.StreamCipher,g=v.algo,m=[],S=[],_=[],t=g.Rabbit=N.extend({_doReset:function(){for(var i=this._key.words,c=this.cfg.iv,o=0;o<4;o++)i[o]=(i[o]<<8|i[o]>>>24)&16711935|(i[o]<<24|i[o]>>>8)&4278255360;var n=this._X=[i[0],i[3]<<16|i[2]>>>16,i[1],i[0]<<16|i[3]>>>16,i[2],i[1]<<16|i[0]>>>16,i[3],i[2]<<16|i[1]>>>16],s=this._C=[i[2]<<16|i[2]>>>16,i[0]&4294901760|i[1]&65535,i[3]<<16|i[3]>>>16,i[1]&4294901760|i[2]&65535,i[0]<<16|i[0]>>>16,i[2]&4294901760|i[3]&65535,i[1]<<16|i[1]>>>16,i[3]&4294901760|i[0]&65535];this._b=0;for(var o=0;o<4;o++)d.call(this);for(var o=0;o<8;o++)s[o]^=n[o+4&7];if(c){var h=c.words,f=h[0],l=h[1],a=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,r=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,x=a>>>16|r&4294901760,y=r<<16|a&65535;s[0]^=a,s[1]^=x,s[2]^=r,s[3]^=y,s[4]^=a,s[5]^=x,s[6]^=r,s[7]^=y;for(var o=0;o<4;o++)d.call(this)}},_doProcessBlock:function(i,c){var o=this._X;d.call(this),m[0]=o[0]^o[5]>>>16^o[3]<<16,m[1]=o[2]^o[7]>>>16^o[5]<<16,m[2]=o[4]^o[1]>>>16^o[7]<<16,m[3]=o[6]^o[3]>>>16^o[1]<<16;for(var n=0;n<4;n++)m[n]=(m[n]<<8|m[n]>>>24)&16711935|(m[n]<<24|m[n]>>>8)&4278255360,i[c+n]^=m[n]},blockSize:128/32,ivSize:64/32});function d(){for(var i=this._X,c=this._C,o=0;o<8;o++)S[o]=c[o];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 o=0;o<8;o++){var n=i[o]+c[o],s=n&65535,h=n>>>16,f=((s*s>>>17)+s*h>>>15)+h*h,l=((n&4294901760)*n|0)+((n&65535)*n|0);_[o]=f^l}i[0]=_[0]+(_[7]<<16|_[7]>>>16)+(_[6]<<16|_[6]>>>16)|0,i[1]=_[1]+(_[0]<<8|_[0]>>>24)+_[7]|0,i[2]=_[2]+(_[1]<<16|_[1]>>>16)+(_[0]<<16|_[0]>>>16)|0,i[3]=_[3]+(_[2]<<8|_[2]>>>24)+_[1]|0,i[4]=_[4]+(_[3]<<16|_[3]>>>16)+(_[2]<<16|_[2]>>>16)|0,i[5]=_[5]+(_[4]<<8|_[4]>>>24)+_[3]|0,i[6]=_[6]+(_[5]<<16|_[5]>>>16)+(_[4]<<16|_[4]>>>16)|0,i[7]=_[7]+(_[6]<<8|_[6]>>>24)+_[5]|0}v.Rabbit=N._createHelper(t)}(),P.Rabbit})},ELLl:function(W,q,D){(function(P){P(D("VrN/"))})(function(P){var v={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},C=P.Pos;P.defineOption("autoCloseBrackets",!1,function(s,h,f){f&&f!=P.Init&&(s.removeKeyMap(g),s.state.closeBrackets=null),h&&(m(N(h,"pairs")),s.state.closeBrackets=h,s.addKeyMap(g))});function N(s,h){return h=="pairs"&&typeof s=="string"?s:typeof s=="object"&&s[h]!=null?s[h]:v[h]}var g={Backspace:t,Enter:d};function m(s){for(var h=0;h<s.length;h++){var f=s.charAt(h),l="'"+f+"'";g[l]||(g[l]=S(f))}}m(v.pairs+"`");function S(s){return function(h){return c(h,s)}}function _(s){var h=s.state.closeBrackets;if(!h||h.override)return h;var f=s.getModeAt(s.getCursor());return f.closeBrackets||h}function t(s){var h=_(s);if(!h||s.getOption("disableInput"))return P.Pass;for(var f=N(h,"pairs"),l=s.listSelections(),a=0;a<l.length;a++){if(!l[a].empty())return P.Pass;var r=o(s,l[a].head);if(!r||f.indexOf(r)%2!=0)return P.Pass}for(var a=l.length-1;a>=0;a--){var x=l[a].head;s.replaceRange("",C(x.line,x.ch-1),C(x.line,x.ch+1),"+delete")}}function d(s){var h=_(s),f=h&&N(h,"explode");if(!f||s.getOption("disableInput"))return P.Pass;for(var l=s.listSelections(),a=0;a<l.length;a++){if(!l[a].empty())return P.Pass;var r=o(s,l[a].head);if(!r||f.indexOf(r)%2!=0)return P.Pass}s.operation(function(){var x=s.lineSeparator()||`
|
|
|
`;s.replaceSelection(x+x,null),s.execCommand("goCharLeft"),l=s.listSelections();for(var y=0;y<l.length;y++){var p=l[y].head.line;s.indentLine(p,null,!0),s.indentLine(p+1,null,!0)}})}function i(s){var h=P.cmpPos(s.anchor,s.head)>0;return{anchor:new C(s.anchor.line,s.anchor.ch+(h?-1:1)),head:new C(s.head.line,s.head.ch+(h?1:-1))}}function c(s,h){var f=_(s);if(!f||s.getOption("disableInput"))return P.Pass;var l=N(f,"pairs"),a=l.indexOf(h);if(a==-1)return P.Pass;for(var r=N(f,"closeBefore"),x=N(f,"triples"),y=l.charAt(a+1)==h,p=s.listSelections(),R=a%2==0,O,b=0;b<p.length;b++){var E=p[b],w=E.head,T,F=s.getRange(w,C(w.line,w.ch+1));if(R&&!E.empty())T="surround";else if((y||!R)&&F==h)y&&n(s,w)?T="both":x.indexOf(h)>=0&&s.getRange(w,C(w.line,w.ch+3))==h+h+h?T="skipThree":T="skip";else if(y&&w.ch>1&&x.indexOf(h)>=0&&s.getRange(C(w.line,w.ch-2),w)==h+h){if(w.ch>2&&/\bstring/.test(s.getTokenTypeAt(C(w.line,w.ch-2))))return P.Pass;T="addFour"}else if(y){var M=w.ch==0?" ":s.getRange(C(w.line,w.ch-1),w);if(!P.isWordChar(F)&&M!=h&&!P.isWordChar(M))T="both";else return P.Pass}else if(R&&(F.length===0||/\s/.test(F)||r.indexOf(F)>-1))T="both";else return P.Pass;if(!O)O=T;else if(O!=T)return P.Pass}var L=a%2?l.charAt(a-1):h,Y=a%2?h:l.charAt(a+1);s.operation(function(){if(O=="skip")s.execCommand("goCharRight");else if(O=="skipThree")for(var K=0;K<3;K++)s.execCommand("goCharRight");else if(O=="surround"){for(var A=s.getSelections(),K=0;K<A.length;K++)A[K]=L+A[K]+Y;s.replaceSelections(A,"around"),A=s.listSelections().slice();for(var K=0;K<A.length;K++)A[K]=i(A[K]);s.setSelections(A)}else O=="both"?(s.replaceSelection(L+Y,null),s.triggerElectric(L+Y),s.execCommand("goCharLeft")):O=="addFour"&&(s.replaceSelection(L+L+L+L,"before"),s.execCommand("goCharRight"))})}function o(s,h){var f=s.getRange(C(h.line,h.ch-1),C(h.line,h.ch+1));return f.length==2?f:null}function n(s,h){var f=s.getTokenAt(C(h.line,h.ch+1));return/\bstring/.test(f.type)&&f.start==h.ch&&(h.ch==0||!/\bstring/.test(s.getTokenTypeAt(h)))}})},ELcG:function(W,q,D){(function(P,v){W.exports=q=v(D("Ib8C"))})(this,function(P){/** @preserve
|
|
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
|
|
|
|
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
|
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
*/return function(v){var C=P,N=C.lib,g=N.WordArray,m=N.Hasher,S=C.algo,_=g.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]),t=g.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]),d=g.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]),i=g.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=g.create([0,1518500249,1859775393,2400959708,2840853838]),o=g.create([1352829926,1548603684,1836072691,2053994217,0]),n=S.RIPEMD160=m.extend({_doReset:function(){this._hash=g.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(x,y){for(var p=0;p<16;p++){var R=y+p,O=x[R];x[R]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}var b=this._hash.words,E=c.words,w=o.words,T=_.words,F=t.words,M=d.words,L=i.words,Y,K,A,H,U,I,G,ne,oe,de;I=Y=b[0],G=K=b[1],ne=A=b[2],oe=H=b[3],de=U=b[4];for(var Oe,p=0;p<80;p+=1)Oe=Y+x[y+T[p]]|0,p<16?Oe+=s(K,A,H)+E[0]:p<32?Oe+=h(K,A,H)+E[1]:p<48?Oe+=f(K,A,H)+E[2]:p<64?Oe+=l(K,A,H)+E[3]:Oe+=a(K,A,H)+E[4],Oe=Oe|0,Oe=r(Oe,M[p]),Oe=Oe+U|0,Y=U,U=H,H=r(A,10),A=K,K=Oe,Oe=I+x[y+F[p]]|0,p<16?Oe+=a(G,ne,oe)+w[0]:p<32?Oe+=l(G,ne,oe)+w[1]:p<48?Oe+=f(G,ne,oe)+w[2]:p<64?Oe+=h(G,ne,oe)+w[3]:Oe+=s(G,ne,oe)+w[4],Oe=Oe|0,Oe=r(Oe,L[p]),Oe=Oe+de|0,I=de,de=oe,oe=r(ne,10),ne=G,G=Oe;Oe=b[1]+A+oe|0,b[1]=b[2]+H+de|0,b[2]=b[3]+U+I|0,b[3]=b[4]+Y+G|0,b[4]=b[0]+K+ne|0,b[0]=Oe},_doFinalize:function(){var x=this._data,y=x.words,p=this._nDataBytes*8,R=x.sigBytes*8;y[R>>>5]|=128<<24-R%32,y[(R+64>>>9<<4)+14]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,x.sigBytes=(y.length+1)*4,this._process();for(var O=this._hash,b=O.words,E=0;E<5;E++){var w=b[E];b[E]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}return O},clone:function(){var x=m.clone.call(this);return x._hash=this._hash.clone(),x}});function s(x,y,p){return x^y^p}function h(x,y,p){return x&y|~x&p}function f(x,y,p){return(x|~y)^p}function l(x,y,p){return x&p|y&~p}function a(x,y,p){return x^(y|~p)}function r(x,y){return x<<y|x>>>32-y}C.RIPEMD160=m._createHelper(n),C.HmacRIPEMD160=m._createHmacHelper(n)}(Math),P.RIPEMD160})},ETIr:function(W,q,D){(function(P,v){W.exports=q=v(D("Ib8C"))})(this,function(P){return function(){var v=P,C=v.lib,N=C.WordArray,g=v.enc,m=g.Base64={stringify:function(_){var t=_.words,d=_.sigBytes,i=this._map;_.clamp();for(var c=[],o=0;o<d;o+=3)for(var n=t[o>>>2]>>>24-o%4*8&255,s=t[o+1>>>2]>>>24-(o+1)%4*8&255,h=t[o+2>>>2]>>>24-(o+2)%4*8&255,f=n<<16|s<<8|h,l=0;l<4&&o+l*.75<d;l++)c.push(i.charAt(f>>>6*(3-l)&63));var a=i.charAt(64);if(a)for(;c.length%4;)c.push(a);return c.join("")},parse:function(_){var t=_.length,d=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var c=0;c<d.length;c++)i[d.charCodeAt(c)]=c}var o=d.charAt(64);if(o){var n=_.indexOf(o);n!==-1&&(t=n)}return S(_,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function S(_,t,d){for(var i=[],c=0,o=0;o<t;o++)if(o%4){var n=d[_.charCodeAt(o-1)]<<o%4*2,s=d[_.charCodeAt(o)]>>>6-o%4*2,h=n|s;i[c>>>2]|=h<<24-c%4*8,c++}return N.create(i,c)}}(),P.enc.Base64})},"F+F2":function(W,q,D){(function(P,v){W.exports=q=v(D("Ib8C"))})(this,function(P){return function(){if(typeof ArrayBuffer!="function")return;var v=P,C=v.lib,N=C.WordArray,g=N.init,m=N.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 _=S.byteLength,t=[],d=0;d<_;d++)t[d>>>2]|=S[d]<<24-d%4*8;g.call(this,t,_)}else g.apply(this,arguments)};m.prototype=N}(),P.lib.WordArray})},FWmy:function(W,q,D){"use strict";D.d(q,"a",function(){return P});function P(v,C){if(!v)throw new Error(C?`Assertion failed (${C})`:"Assertion Failed")}},GRO8:function(W,q,D){"use strict";D.r(q);var P=D("k1fw"),v=D("2qtc"),C=D("kLXV"),N=D("lUTK"),g=D("BvKs"),m=D("+L6B"),S=D("2/Rp"),_=D("T2oS"),t=D("W9HT"),d=D("sPJy"),i=D("bE4q"),c=D("miYZ"),o=D("tsqr"),n=D("9og8"),s=D("tJVT"),h=D("PpiC"),f=D("WmNS"),l=D.n(f),a=D("q1tI"),r=D.n(a),x=D("Ty5D"),y=D("55Ip"),p=D("9kvl"),R=D("KeDT"),O=D.n(R),b=D("zrhs"),E=D("DZo9"),w=D("8z0m"),T=D("LtfV"),F=D("KhGG"),M=w.a.Dragger,L=function(tt){var pt=tt.user,Et=tt.dispatch,Ut=tt.classroomList,Dt=tt.shixunsDetail,Xt=tt.getResults,Pt=Object(x.i)(),ut=Object(a.useState)(),vt=Object(s.a)(ut,2),bt=vt[0],tr=vt[1],Qt=Object(a.useState)([]),Wt=Object(s.a)(Qt,2),jt=Wt[0],Yt=Wt[1],qt=Object(a.useState)(!1),et=Object(s.a)(qt,2),vr=et[0],Ar=et[1],cr={onRemove:function(){Yt([])},beforeUpload:function(_t){if(console.log(_t),(_t==null?void 0:_t.size)>1024*1024*500)return o.b.info("\u6587\u4EF6\u8D85\u8FC7500M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var ft=[];return ft.push(_t),Yt([].concat(ft)),!1},fileList:jt};return r.a.createElement(C.a,{title:"\u63D0\u4EA4\u6587\u4EF6",visible:Dt.actionTabs.key==="md-tab",confirmLoading:vr,onOk:Object(n.a)(l.a.mark(function ht(){var _t,ft,Tt;return l.a.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:if(!((jt==null?void 0:jt.length)<=0)){rr.next=3;break}return o.b.info("\u8BF7\u5148\u9009\u62E9\u6587\u4EF6"),rr.abrupt("return");case 3:return Ar(!0),rr.next=6,Object(F.c)(jt[0],{login:(_t=pt.userInfo)===null||_t===void 0?void 0:_t.login,container_type:"Competition",container_id:Dt.actionTabs.params.id,stage_type:Dt.actionTabs.params.value,file_name:(ft=jt[0])===null||ft===void 0?void 0:ft.name});case 6:Tt=rr.sent,(Tt==null?void 0:Tt.status)===0?(o.b.info("\u63D0\u4EA4\u6210\u529F"),Et({type:"shixunsDetail/setActionTabs",payload:{key:""}}),Ar(!1),Yt([]),Xt(Dt.actionTabs.params.value)):(Ar(!1),o.b.info("\u63D0\u4EA4\u5931\u8D25"));case 8:case"end":return rr.stop()}},ht)})),onCancel:function(){Yt([]),Et({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},r.a.createElement(M,cr,r.a.createElement("p",{className:"ant-upload-drag-icon"},r.a.createElement(T.a,null)),r.a.createElement("p",{className:"ant-upload-hint"},"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20")))},Y=Object(p.a)(function(mt){var tt=mt.user,pt=mt.classroomList,Et=mt.shixunsDetail;return{user:tt,classroomList:pt,shixunsDetail:Et}})(L),K=D("14J3"),A=D("BMrR"),H=D("5NDa"),U=D("5rEg"),I=D("9Bee"),G=D("m3rI"),ne=D("ErOA"),oe=D("NLgs"),de=D("fV52"),Oe=D("3I+P"),Ae=D("OaEy"),pe=D("2fM7"),Se=D("5bA4"),be=D("UESt"),se=pe.a.Option;function ee(mt){var tt=mt.rewarddata,pt=mt.getlistdatas,Et=mt.is_signed,Ut=mt.dispatch,Dt=mt.userlist,Xt=Object(a.useRef)(null),Pt=Object(a.useState)(!1),ut=Object(s.a)(Pt,2),vt=ut[0],bt=ut[1],tr=Object(a.useState)(void 0),Qt=Object(s.a)(tr,2),Wt=Qt[0],jt=Qt[1],Yt=Object(a.useState)(""),qt=Object(s.a)(Yt,2),et=qt[0],vr=qt[1],Ar=Object(a.useState)(void 0),cr=Object(s.a)(Ar,2),ht=cr[0],_t=cr[1],ft=Object(a.useState)(void 0),Tt=Object(s.a)(ft,2),zt=Tt[0],rr=Tt[1],Kt=Object(a.useState)(void 0),yr=Object(s.a)(Kt,2),kr=yr[0],sr=yr[1];function Ze(nr){return kt.apply(this,arguments)}function kt(){return kt=Object(n.a)(l.a.mark(function nr(br){var Tr;return l.a.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(!br.user_received){Ht.next=3;break}return window.open(br.click_info),Ht.abrupt("return");case 3:if(Object(oe.f)(Ut)){Ht.next=5;break}return Ht.abrupt("return");case 5:if(!(Et===!1)){Ht.next=8;break}return o.b.info("\u60A8\u5C1A\u672A\u62A5\u540D\u53C2\u8D5B\uFF0C\u8BF7\u62A5\u540D\u53C2\u8D5B\u540E\u9886\u53D6"),Ht.abrupt("return");case 8:if(!(br.click_event==="Pop")){Ht.next=14;break}return vr(br.id),bt(!0),Ht.abrupt("return");case 14:jt(void 0);case 15:return Ht.next=17,Ut({type:"competitions/Reward",payload:{competition_module_setting_id:br.id}});case 17:Tr=Ht.sent,Tr&&Tr.status===0&&(pt(),br.click_event==="Link"?(o.b.info("\u9886\u53D6\u6210\u529F"),window.open(br.click_info)):o.b.info(br.click_info));case 19:case"end":return Ht.stop()}},nr)})),kt.apply(this,arguments)}function Zr(){return Vr.apply(this,arguments)}function Vr(){return Vr=Object(n.a)(l.a.mark(function nr(){var br;return l.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:if(!(Dt&&!Dt.real_name)){Rt.next=4;break}if(ht){Rt.next=4;break}return o.b.info("\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"),Rt.abrupt("return");case 4:if(!(Dt&&!Dt.email)){Rt.next=8;break}if(zt){Rt.next=8;break}return o.b.info("\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A"),Rt.abrupt("return");case 8:if(!(Dt&&!Dt.phone)){Rt.next=12;break}if(kr){Rt.next=12;break}return o.b.info("\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A"),Rt.abrupt("return");case 12:if(Wt){Rt.next=15;break}return o.b.info("\u8BF7\u9009\u62E9\u4F60\u7684\u5E74\u7EA7"),Rt.abrupt("return");case 15:return Rt.next=17,Ut({type:"competitions/Reward",payload:{competition_module_setting_id:et,className:Wt,name:ht,mail:zt,phone:kr}});case 17:br=Rt.sent,br&&br.status===0&&(bt(!1),pt(),o.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 Rt.stop()}},nr)})),Vr.apply(this,arguments)}return r.a.createElement("div",null,r.a.createElement(C.a,{visible:vt,title:"\u5B8C\u5584\u4FE1\u606F",onCancel:function(){return bt(!1)},onOk:function(){Zr()}},r.a.createElement("p",null,"\u60A8\u7684\u59D3\u540D\uFF1A",r.a.createElement(U.a,{className:Dt&&Dt.real_name?"":O.a.bkfff,style:{width:"300px",marginLeft:"14px",background:Dt&&Dt.phone?"":"#ffffff!important"},value:Dt&&Dt.real_name||ht,disabled:Dt&&Dt.real_name||!1,onChange:function(br){return _t(br.target.value)}})),r.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u90AE\u7BB1\uFF1A",r.a.createElement(U.a,{className:Dt&&Dt.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:Dt&&Dt.phone?"":"#ffffff!important"},value:Dt&&Dt.email||zt,disabled:Dt&&Dt.email||!1,onChange:function(br){return rr(br.target.value)}})),r.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u624B\u673A\u53F7\uFF1A",r.a.createElement(U.a,{style:{width:"300px"},className:Dt&&Dt.phone?"":"bkfff",value:Dt&&Dt.phone||kr,disabled:Dt&&Dt.phone||!1,onChange:function(br){return sr(br.target.value)}})),"\u60A8\u7684\u5E74\u7EA7\uFF1A",r.a.createElement(pe.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(br){jt(br)}},r.a.createElement(se,{value:"\u5927\u4E00"},"\u5927\u4E00"),r.a.createElement(se,{value:"\u5927\u4E8C"},"\u5927\u4E8C"),r.a.createElement(se,{value:"\u5927\u4E09"},"\u5927\u4E09"),r.a.createElement(se,{value:"\u5927\u56DB"},"\u5927\u56DB"),r.a.createElement(se,{value:"\u5927\u4E94"},"\u5927\u4E94"),r.a.createElement(se,{value:"\u7855\u4E00"},"\u7855\u4E00"),r.a.createElement(se,{value:"\u7855\u4E8C"},"\u7855\u4E8C"),r.a.createElement(se,{value:"\u7855\u4E09"},"\u7855\u4E09"),r.a.createElement(se,{value:"\u535A\u4E00"},"\u535A\u4E00"),r.a.createElement(se,{value:"\u535A\u4E8C"},"\u535A\u4E8C"),r.a.createElement(se,{value:"\u535A\u4E09"},"\u535A\u4E09"),r.a.createElement(se,{value:"\u535A\u56DB"},"\u535A\u56DB"),r.a.createElement(se,{value:"\u535A\u4E94"},"\u535A\u4E94")),r.a.createElement("p",{style:{marginTop:"1em"}},"\u63D0\u9192\uFF1A\u5982\u65E0\u534E\u4E3A\u4E91\u8D26\u53F7\uFF0C\u8BF7\u5C3D\u5FEB\u6CE8\u518C\u534E\u4E3A\u4E91\uFF01")),tt&&tt.length>3?r.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},r.a.createElement("span",{className:O.a.spanprev,onClick:function(){Xt.current.prev()}},r.a.createElement(Se.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),r.a.createElement(Oe.a,{ref:Xt,className:O.a.divwidth,slidesToShow:3,slidesToScroll:1},tt&&tt.map(function(nr,br){return r.a.createElement("div",{style:{textAlign:"center",position:"relative"}},r.a.createElement("img",{src:G.a.IMG_SERVER+"/".concat(nr.image_url)}),nr.user_received===!1||nr.click_event==="Link"?r.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return Ze(nr)}},"\u70B9\u51FB\u9886\u53D6"):r.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})),r.a.createElement("span",{className:O.a.spannext,onClick:function(){Xt.current.next()}},r.a.createElement(be.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):r.a.createElement("div",{className:O.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},tt&&tt.map(function(nr,br){return r.a.createElement("div",{style:{textAlign:"center",position:"relative"}},r.a.createElement("img",{src:G.a.IMG_SERVER+"/".concat(nr.image_url)}),nr.user_received===!1||nr.click_event==="Link"?r.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return Ze(nr)}},"\u70B9\u51FB\u9886\u53D6"):r.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})))}var B=ee,V=function(tt,pt){var Et=tt.StaffDetail,Ut=tt.HeaderDetail,Dt=tt.ItemData,Xt=tt.setIssee,Pt=tt.ModelType,ut=tt.dispatch,vt=tt.userinfo,bt=tt.Editable,tr=Object(a.useState)(!1),Qt=Object(s.a)(tr,2),Wt=Qt[0],jt=Qt[1],Yt=Object(a.useState)([]),qt=Object(s.a)(Yt,2),et=qt[0],vr=qt[1],Ar=Object(a.useState)(""),cr=Object(s.a)(Ar,2),ht=cr[0],_t=cr[1],ft=Object(a.useState)(""),Tt=Object(s.a)(ft,2),zt=Tt[0],rr=Tt[1],Kt=Object(a.useState)(!1),yr=Object(s.a)(Kt,2),kr=yr[0],sr=yr[1],Ze=Object(x.i)(),kt=Ze.identifier,Zr=Object(a.useRef)(null),Vr=Object(a.useRef)(null);Zr.current=Et==null?void 0:Et.enrolled,Object(a.useEffect)(function(){var Rt;return(Rt=Vr.current)===null||Rt===void 0||Rt.addEventListener("click",nr),function(){var Ht;(Ht=Vr.current)===null||Ht===void 0||Ht.removeEventListener("click",nr)}},[]);var nr=function(Ht){var ar;if((Ht==null||((ar=Ht.target)===null||ar===void 0)?void 0:ar.id)==="modal-upload"){if(!Object(oe.e)(ut))return;if(!Zr.current){C.a.info({title:"\u63D0\u793A",centered:!0,okText:"\u6211\u77E5\u9053\u4E86",content:"\u8BF7\u5148\u62A5\u540D\uFF0C\u518D\u63D0\u4EA4\u4F5C\u54C1"});return}jt(!0)}};Object(a.useEffect)(function(){if(Ut!=null&&Ut.upload_file){var Rt,Ht,ar;vr([{name:Ut==null||((Rt=Ut.upload_file)===null||Rt===void 0)?void 0:Rt.title,status:"done",uid:"123456789"}]),rr(Ut==null?void 0:Ut.upload_file_url),_t(Ut==null||((Ht=Ut.upload_file)===null||Ht===void 0||((ar=Ht.url)===null||ar===void 0))?void 0:ar.split("/")[3])}},[Ut==null?void 0:Ut.upload_file]);var br={name:"file",multiple:!1,withCredentials:!0,action:G.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:et,onChange:function(Ht){var ar=Ht.file.status,Vt=[Object(P.a)({},Ht.file)];if(vr(Vt),Ht.file.status==="uploading"&&sr(!0),ar==="done"){var ct,dt;_t((ct=Vt[0])===null||ct===void 0||((dt=ct.response)===null||dt===void 0)?void 0:dt.id),sr(!1)}ar==="error"&&(vr([]),sr(!1))},beforeUpload:function(Ht){var ar=Ht.size/1024/1024<1e3;return ar?Promise.resolve():(o.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E1000MB"),Promise.reject())}},Tr=function(){jt(!0)};return Object(a.useImperativeHandle)(pt,function(){return{handleVisible:Tr}}),r.a.createElement("div",{ref:Vr},Pt==="reward"?r.a.createElement(B,{userlist:vt,dispatch:ut,rewarddata:Dt.reward_setting,is_signed:Dt.is_signed}):null,r.a.createElement("div",{style:{textAlign:"right"}},((vt==null?void 0:vt.admin)||(vt==null?void 0:vt.business)||bt)&&r.a.createElement(S.a,{onClick:function(){return Xt(!1)}},"\u7F16\u8F91")),r.a.createElement(I.a,{value:Dt.md_content}),Dt&&Dt.attachments&&Dt.attachments.map(function(Rt,Ht){return r.a.createElement("div",null,r.a.createElement("a",{href:(G.a===null||G.a===void 0?void 0:G.a.API_SERVER)+Rt.url,target:"_self",download:Rt.title},r.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),r.a.createElement("span",{style:{color:"#000000"}},Rt.title),r.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},Rt.filesize)))}),r.a.createElement(C.a,{centered:!0,title:"\u4E0A\u4F20\u4F5C\u54C1",visible:Wt,okText:"\u63D0\u4EA4\u4F5C\u54C1",cancelText:"\u53D6\u6D88",confirmLoading:kr,onCancel:function(){return jt(!1)},onOk:Object(n.a)(l.a.mark(function Rt(){var Ht;return l.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:if(!(!ht&&!zt)){Vt.next=3;break}return jt(!1),Vt.abrupt("return");case 3:return sr(!0),Vt.next=6,Object(ne.a)("/api/competitions/".concat(kt,"/upload_file.json"),{method:"post",body:{attachment_id:ht,upload_file_url:zt}});case 6:Ht=Vt.sent,Ht.status===0&&(jt(!1),sr(!1));case 8:case"end":return Vt.stop()}},Rt)}))},r.a.createElement("div",null,r.a.createElement(A.a,{align:"middle",className:"mb20"},r.a.createElement("span",null,"\u4F5C\u54C1\u94FE\u63A5\uFF1A"),r.a.createElement(U.a,{style:{width:416},value:zt,onChange:function(Ht){var ar;return rr((ar=Ht.target)===null||ar===void 0?void 0:ar.value)}})),r.a.createElement(A.a,{align:"top"},r.a.createElement("span",{style:{lineHeight:"28px"}},"\u4F5C\u54C1\u6587\u4EF6\uFF1A"),r.a.createElement(w.a,br,r.a.createElement(S.a,{type:"primary",className:"mb10"},"\u4E0A\u4F20\u4F5C\u54C1"))))))},X=Object(a.forwardRef)(V),Q=D("Ot1p"),Z=D("hJwl");function ie(mt){var tt=mt.ItemData,pt=mt.setIssee,Et=mt.MenuItem,Ut=mt.dispatch,Dt=mt.identifier,Xt=mt.ModelType,Pt=mt.userinfo,ut=mt.getrightdatas,vt=Object(a.useState)([]),bt=Object(s.a)(vt,2),tr=bt[0],Qt=bt[1],Wt=Object(a.useState)(tt.md_content),jt=Object(s.a)(Wt,2),Yt=jt[0],qt=jt[1];Object(a.useEffect)(function(){var _t,ft=[];tt==null||((_t=tt.attachments)===null||_t===void 0)||_t.map(function(Tt){var zt={uid:Tt.id,name:Tt.title,response:{id:Tt.id}};ft.push(zt)}),Qt(ft)},[tt==null?void 0:tt.attachments]);function et(){var _t,ft=[];return tt==null||((_t=tt.attachments)===null||_t===void 0)||_t.map(function(Tt){var zt={uid:Tt==null?void 0:Tt.id,name:Tt.title,response:{id:Tt.id}};ft.push(zt)}),ft}var vr={name:"file",multiple:!0,withCredentials:!0,action:G.a.API_SERVER+"/api/attachments.json",defaultFileList:et(),onRemove:function(ft){Object(Z.t)({id:ft.uid})},onChange:function(ft){var Tt=ft.file.status;Tt!=="uploading",Tt==="removed"&&Qt(ft.fileList),Tt==="done"?(Qt(ft.fileList),o.b.success("".concat(ft.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))):Tt==="error"&&o.b.error("".concat(ft.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(ft){var Tt=ft.size/1024/1024<150;return Tt||o.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),Tt}};console.log(vr);function Ar(){return cr.apply(this,arguments)}function cr(){return cr=Object(n.a)(l.a.mark(function _t(){var ft;return l.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return zt.next=2,Ut({type:"competitions/updateMdContent",payload:{attachment_ids:ht(tr),competition_module_id:tt.id,md_content_id:tt.md_id,content:Yt,identifier:Dt}});case 2:ft=zt.sent,ft&&(o.b.info("\u63D0\u4EA4\u6210\u529F"),pt(!0),ut(Et));case 4:case"end":return zt.stop()}},_t)})),cr.apply(this,arguments)}function ht(_t){var ft=[];return _t&&_t.map(function(Tt){ft.push(Tt.response.id)}),ft}return r.a.createElement("div",null,Xt==="reward"?r.a.createElement(B,{userlist:Pt,dispatch:Ut,rewarddata:tt.reward_setting,is_signed:tt.is_signed}):null,r.a.createElement(Q.a,{defaultValue:Yt,onChange:function(ft){return qt(ft)}}),r.a.createElement(w.a,vr,r.a.createElement(S.a,{className:"uploadBtn"},"\u4E0A\u4F20\u9644\u4EF6"),"(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(S.a,{style:{width:"90px"},type:"primary",onClick:function(){return Ar()}},"\u63D0\u4EA4"),r.a.createElement(S.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return pt(!0)}},"\u53D6\u6D88")))}var re=ie,$=D("g9YV"),J=D("wCAj"),le=D("Znn+"),ue=D("ZTPi");function xe(){return r.a.createElement("div",null,r.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),r.a.createElement("div",{style:{textAlign:"center"}},r.a.createElement("img",{src:G.a.IMG_SERVER+"/images/educoder/competitions/trophy.png"}),r.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 Me=xe,Xe=D("5Dmo"),$e=D("3S7+"),Je=D("jCWc"),rt=D("kPKH"),it=D("IzEo"),je=D("bx4M");function Ie(mt){var tt=mt.oneItem,pt=mt.towItem,Et=mt.threeItem;return r.a.createElement("div",{style:{textAlign:"center"}},r.a.createElement(A.a,{gutter:16,style:{justifyContent:"center"}},r.a.createElement(rt.a,{span:6,style:{marginTop:"30px",marginRight:"20px"}},r.a.createElement(je.a,{title:r.a.createElement("div",{className:O.a.towtop},r.a.createElement("img",{style:{marginTop:"20px"},src:G.a.IMG_SERVER+"/images/educoder/huangguan-two.png"}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(y.a,{to:"/users/".concat(pt==null?void 0:pt.user_login,"/classrooms")},r.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(pt==null?void 0:pt.user_image)}),(pt==null?void 0:pt.competition_prize)&&r.a.createElement("p",{className:O.a.prize},pt==null?void 0:pt.competition_prize),r.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},pt==null?void 0:pt.record_user_name)))),className:O.a.towdiv,bordered:!1},r.a.createElement("p",{style:{fontSize:"14px"}},pt==null?void 0:pt.school_name),r.a.createElement("p",{style:{fontSize:"18px"}},pt==null?void 0:pt.spend_time),r.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(pt==null?void 0:pt.extra_score)+parseFloat(pt==null?void 0:pt.score),"\u5206"))),r.a.createElement(rt.a,{span:6},r.a.createElement(je.a,{title:r.a.createElement("div",{className:O.a.onetop},r.a.createElement("img",{style:{marginTop:"20px"},src:G.a.IMG_SERVER+"/images/educoder/huangguan.png"}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(y.a,{to:"/users/".concat(tt==null?void 0:tt.user_login,"/classrooms")},r.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(tt==null?void 0:tt.user_image)}),(tt==null?void 0:tt.competition_prize)&&r.a.createElement("p",{className:O.a.prize},tt==null?void 0:tt.competition_prize),r.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},tt==null?void 0:tt.record_user_name)))),className:O.a.onediv,bordered:!1},r.a.createElement("p",{style:{fontSize:"14px"}},tt==null?void 0:tt.school_name),r.a.createElement("p",{style:{fontSize:"18px"}},tt==null?void 0:tt.spend_time),r.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(tt==null?void 0:tt.extra_score)+parseFloat(tt==null?void 0:tt.score),"\u5206"))),r.a.createElement(rt.a,{span:6,style:{marginTop:"40px",marginLeft:"20px"}},r.a.createElement(je.a,{title:r.a.createElement("div",{className:O.a.threetop},r.a.createElement("img",{style:{marginTop:"20px"},src:G.a.IMG_SERVER+"/images/educoder/huangguan-three.png"}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(y.a,{to:"/users/".concat(Et==null?void 0:Et.user_login,"/classrooms")},r.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(Et==null?void 0:Et.user_image)}),(Et==null?void 0:Et.competition_prize)&&r.a.createElement("p",{className:O.a.prize},Et==null?void 0:Et.competition_prize),r.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},Et==null?void 0:Et.record_user_name)))),className:O.a.threediv,bordered:!1},r.a.createElement("p",{style:{fontSize:"14px"}},Et==null?void 0:Et.school_name),r.a.createElement("p",{style:{fontSize:"18px"}},Et==null?void 0:Et.spend_time),r.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(Et==null?void 0:Et.extra_score)+parseFloat(Et==null?void 0:Et.score),"\u5206")))))}var qe=Ie;function st(mt){var tt,pt,Et,Ut,Dt,Xt,Pt,ut,vt,bt,tr,Qt,Wt,jt,Yt,qt,et,vr,Ar,cr,ht,_t,ft,Tt,zt,rr,Kt,yr,kr,sr,Ze=mt.ItemData;return r.a.createElement("div",null,r.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),r.a.createElement(qe,{oneItem:Ze==null?void 0:Ze.teams[0],towItem:Ze==null?void 0:Ze.teams[1],threeItem:Ze==null?void 0:Ze.teams[2]}),(Ze==null||((tt=Ze.user_ranks)===null||tt===void 0)?void 0:tt.length)>0&&r.a.createElement("div",{className:O.a.myTeam},(Ze==null||((pt=Ze.user_ranks)===null||pt===void 0||((Et=pt[0])===null||Et===void 0))?void 0:Et.success)===!1?r.a.createElement("span",{style:{marginRight:"70px",padding:"10px"}},r.a.createElement("p",{style:{marginBottom:"0px"}}," ","\u662F\u5426\u664B\u7EA7\uFF1A",r.a.createElement("span",{style:{color:(Ze==null||((Ut=Ze.user_ranks)===null||Ut===void 0||((Dt=Ut[0])===null||Dt===void 0))?void 0:Dt.success)===!1?"red":"green"}},(Ze==null||((Xt=Ze.user_ranks)===null||Xt===void 0||((Pt=Xt[0])===null||Pt===void 0))?void 0:Pt.success)===!1?"\u5426":Ze!=null&&(ut=Ze.user_ranks)!==null&&ut!==void 0&&(vt=ut[0])!==null&&vt!==void 0&&vt.success?"\u662F":"")),(Ze==null||((bt=Ze.user_ranks)===null||bt===void 0||((tr=bt[0])===null||tr===void 0))?void 0:tr.awards)&&r.a.createElement("p",{style:{marginBottom:"0px"}}," ","\u662F\u5426\u83B7\u5956\uFF1A",r.a.createElement("span",null,(Ze==null||((Qt=Ze.user_ranks)===null||Qt===void 0||((Wt=Qt[0])===null||Wt===void 0))?void 0:Wt.awards)==="percent_20"?"\u4E8C\u7B49\u5956":(Ze==null||((jt=Ze.user_ranks)===null||jt===void 0||((Yt=jt[0])===null||Yt===void 0))?void 0:Yt.awards)==="percent_30"?"\u4E09\u7B49\u5956":"\u6CA1\u6709\u83B7\u5F97\u5956\u9879"))):r.a.createElement("span",{style:{marginRight:"70px"}},"\u6211\u7684\u6392\u540D\uFF1A",Ze==null||((qt=Ze.user_ranks)===null||qt===void 0||((et=qt[0])===null||et===void 0))?void 0:et.rank),r.a.createElement("span",{style:{flex:1}},r.a.createElement($e.a,{title:"\u6218\u961F\u540D"},Ze==null||((vr=Ze.user_ranks)===null||vr===void 0||((Ar=vr[0])===null||Ar===void 0))?void 0:Ar.team_name)),r.a.createElement("span",{style:{flex:1}},r.a.createElement($e.a,{title:"\u65F6\u95F4"},Ze==null||((cr=Ze.user_ranks)===null||cr===void 0||((ht=cr[0])===null||ht===void 0))?void 0:ht.cost_time)),r.a.createElement("span",{style:{flex:1,textAlign:"center"}},r.a.createElement($e.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},Ze==null||((_t=Ze.user_ranks)===null||_t===void 0||((ft=_t[0])===null||ft===void 0))?void 0:ft.extra_score)),r.a.createElement("span",{style:{flex:1}},r.a.createElement($e.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},Ze==null||((Tt=Ze.user_ranks)===null||Tt===void 0||((zt=Tt[0])===null||zt===void 0))?void 0:zt.score)),r.a.createElement("span",null,r.a.createElement($e.a,{title:"\u603B\u5206"},parseFloat(Ze==null||((rr=Ze.user_ranks)===null||rr===void 0||((Kt=rr[0])===null||Kt===void 0))?void 0:Kt.extra_score)+parseFloat(Ze==null||((yr=Ze.user_ranks)===null||yr===void 0||((kr=yr[0])===null||kr===void 0))?void 0:kr.score)||0))),Ze==null||((sr=Ze.teams)===null||sr===void 0)?void 0:sr.map(function(kt,Zr){return r.a.createElement("div",{className:O.a.bottomItem},r.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},Zr+1),r.a.createElement(y.a,{to:"/users/".concat(kt==null?void 0:kt.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},r.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(kt==null?void 0:kt.user_image)}),(kt==null?void 0:kt.competition_prize)&&r.a.createElement("span",{className:O.a.spanrightradius},kt==null?void 0:kt.competition_prize)),r.a.createElement("span",{style:{flex:1}},r.a.createElement($e.a,{title:"\u6218\u961F\u540D"},kt==null?void 0:kt.team_name)),r.a.createElement("span",{style:{flex:1}},r.a.createElement($e.a,{title:"\u5355\u4F4D/\u5B66\u6821\u540D"},kt.school_name)),r.a.createElement("span",{style:{flex:1,textAlign:"center"}},r.a.createElement($e.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},kt.extra_score)),r.a.createElement("span",{style:{flex:1}},r.a.createElement($e.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},kt.score)),r.a.createElement("span",{style:{color:"#0152d9"}},r.a.createElement($e.a,{title:"\u603B\u5206"},parseFloat(kt.extra_score)+parseFloat(kt.score))))}))}var Ee=st,ce=ue.a.TabPane;function fe(mt){var tt,pt,Et,Ut,Dt,Xt,Pt=mt.ChartRules,ut=mt.ItemData,vt=mt.getCharts,bt=mt.Selectkey,tr=mt.getChartRules,Qt=mt.userinfo,Wt=mt.Editable,jt=mt.HeaderDetail,Yt=Object(a.useState)(!1),qt=Object(s.a)(Yt,2),et=qt[0],vr=qt[1],Ar=Object(a.useState)(""),cr=Object(s.a)(Ar,2),ht=cr[0],_t=cr[1],ft=Object(a.useState)(!0),Tt=Object(s.a)(ft,2),zt=Tt[0],rr=Tt[1],Kt=Object(a.useState)(),yr=Object(s.a)(Kt,2),kr=yr[0],sr=yr[1],Ze=Object(a.useState)(),kt=Object(s.a)(Ze,2),Zr=kt[0],Vr=kt[1],nr=Object(x.i)(),br=nr.identifier;Object(a.useEffect)(function(){if(zt){var ar,Vt=Pt==null||((ar=Pt.stages)===null||ar===void 0)?void 0:ar[0];if(sr(Vt),Vt!=null&&Vt.id){var ct,dt,Mt;((jt==null?void 0:jt.task)==="mAP"||(jt==null?void 0:jt.task)==="dog")&&vt(Vt==null?void 0:Vt.id),_t(((ct=Pt.rule_contents)===null||ct===void 0||((dt=ct.filter(function(qr){return parseInt(qr.competition_stage_id)===parseInt(Vt==null?void 0:Vt.id)}))===null||dt===void 0||((Mt=dt[0])===null||Mt===void 0))?void 0:Mt.content)||"")}else{var wt,_r,Jr;(jt==null?void 0:jt.task)==="mAP"||(jt==null?void 0:jt.task)==="dog",_t(((wt=Pt.rule_contents)===null||wt===void 0||((_r=wt.filter(function(qr){return parseInt(qr.competition_stage_id)===0}))===null||_r===void 0||((Jr=_r[0])===null||Jr===void 0))?void 0:Jr.content)||"")}}},[Pt]);function Tr(){return Rt.apply(this,arguments)}function Rt(){return Rt=Object(n.a)(l.a.mark(function ar(){var Vt,ct,dt,Mt,wt,_r,Jr,qr,mr;return l.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:if(ht){Rr.next=3;break}return o.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Rr.abrupt("return");case 3:if(rr(!1),Vt=kr==null?void 0:kr.id,!Vt){Rr.next=12;break}return Rr.next=8,Object(ne.a)("/api/competitions/".concat(br,"/update_md_content.json"),{method:"post",body:{competition_module_id:bt,content:ht,md_content_id:(ct=Pt.rule_contents)===null||ct===void 0||((dt=ct.filter(function(on){return parseInt(on.competition_stage_id)===parseInt(Vt)}))===null||dt===void 0||((Mt=dt[0])===null||Mt===void 0))?void 0:Mt.id,stage_id:kr==null?void 0:kr.id}});case 8:wt=Rr.sent,wt.status===0&&(o.b.info("\u66F4\u65B0\u6210\u529F"),vr(!1),tr()),Rr.next=16;break;case 12:return Rr.next=14,Object(ne.a)("/api/competitions/".concat(br,"/update_md_content.json"),{method:"post",body:{competition_module_id:bt,content:ht,md_content_id:(_r=Pt.rule_contents)===null||_r===void 0||((Jr=_r.filter(function(on){return parseInt(on.competition_stage_id)===0}))===null||Jr===void 0||((qr=Jr[0])===null||qr===void 0))?void 0:qr.id,stage_id:kr==null?void 0:kr.id}});case 14:mr=Rr.sent,mr.status===0&&(o.b.info("\u66F4\u65B0\u6210\u529F"),vr(!1),tr());case 16:case"end":return Rr.stop()}},ar)})),Rt.apply(this,arguments)}var Ht=[{title:"\u6392\u540D",dataIndex:"name",align:"center",key:"name",render:function(Vt,ct,dt){return r.a.createElement("span",null,dt+1)}},{title:"\u5934\u50CF",dataIndex:"user_image",align:"center",key:"user_image",render:function(Vt){return r.a.createElement("img",{className:O.a.imgradius,src:G.a.IMG_SERVER+"/images/".concat(Vt)})}},{title:"\u6218\u961F\u540D\u79F0",dataIndex:"team_name",key:"team_name",render:function(Vt){return r.a.createElement("span",{title:Vt},Vt&&(Vt==null?void 0:Vt.length)>=15?(Vt==null?void 0:Vt.substr(0,15))+"...":Vt||"--")}},{title:"\u5355\u4F4D",dataIndex:"school_name",key:"school_name",align:"center",render:function(Vt){return r.a.createElement("span",null,Vt||"--")}},{title:(jt==null?void 0:jt.task)==="mAP"?"mAP\u6307\u6807":(jt==null?void 0:jt.task)==="Jittor-3"?"\u603B\u5206":"top1\u6307\u6807",dataIndex:"score",key:"score",render:function(Vt){return r.a.createElement("span",null,Vt||"--")}}];return r.a.createElement("div",null,(Pt==null||((tt=Pt.stages)===null||tt===void 0)?void 0:tt.length)>0?null:r.a.createElement(Me,null),(Pt==null||((pt=Pt.stages)===null||pt===void 0)?void 0:pt.length)>0&&r.a.createElement(ue.a,{animated:!0,tabBarExtraContent:((Qt==null?void 0:Qt.admin)||(Qt==null?void 0:Qt.business)||Wt)&&r.a.createElement(S.a,{onClick:function(){vr(!0)}},"\u7F16\u8F91"),onChange:function(Vt){var ct,dt,Mt,wt,_r;vr(!1);var Jr=Pt==null||((ct=Pt.stages)===null||ct===void 0)?void 0:ct.filter(function(mr){return parseInt(Vt)===parseInt(mr==null?void 0:mr.id)})[0];sr(Jr);var qr=Jr==null||((dt=Jr.children)===null||dt===void 0)?void 0:dt[0];Vr(qr),_t(((Mt=Pt.rule_contents)===null||Mt===void 0||((wt=Mt.filter(function(mr){return parseInt(mr.competition_stage_id)===parseInt(Jr==null?void 0:Jr.id)}))===null||wt===void 0||((_r=wt[0])===null||_r===void 0))?void 0:_r.content)||""),vt((qr==null?void 0:qr.id)||Vt)}},Pt&&Pt.stages.map(function(ar,Vt){return r.a.createElement(ce,{tab:ar.name,key:ar.id===null?0:ar.id},et===!1&&Pt&&Pt.rule_contents.map(function(ct,dt){if(ar.id===ct.competition_stage_id)return r.a.createElement(I.a,{key:dt,value:ct.content===void 0||ct.content===null?"":ct.content});if(ar.id===null&&ct.competition_stage_id===0)return r.a.createElement(I.a,{key:dt,value:ct.content===void 0||ct.content===null?"":ct.content})}))})),(kr==null||((Et=kr.children)===null||Et===void 0)?void 0:Et.length)>0&&r.a.createElement(ue.a,{activeKey:(Zr==null?void 0:Zr.id)+"",onChange:function(Vt){var ct,dt=kr==null||((ct=kr.children)===null||ct===void 0)?void 0:ct.filter(function(Mt){return parseInt(Vt)===parseInt(Mt==null?void 0:Mt.id)})[0];Vr(dt),vt(Vt)}},kr==null||((Ut=kr.children)===null||Ut===void 0)?void 0:Ut.map(function(ar,Vt){return r.a.createElement(ce,{tab:ar.name,key:ar.id===null?0:ar.id})})),et&&r.a.createElement("div",null,r.a.createElement(Q.a,{defaultValue:ht,onChange:function(Vt){_t(Vt)}}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(S.a,{style:{width:"90px"},type:"primary",onClick:function(){return Tr()}},"\u63D0\u4EA4"),r.a.createElement(S.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return vr(!1)}},"\u53D6\u6D88"))),(ut==null||((Dt=ut.teams)===null||Dt===void 0)?void 0:Dt.length)>0&&((jt==null?void 0:jt.task)==="mAP"||(jt==null?void 0:jt.task)==="dog"||(jt==null?void 0:jt.task)==="Jittor-3")?r.a.createElement(J.a,{dataSource:ut==null?void 0:ut.teams,columns:Ht,pagination:!1}):(ut==null||((Xt=ut.teams)===null||Xt===void 0)?void 0:Xt.length)>0&&r.a.createElement(Ee,{ItemData:ut}))}var ve=fe,Ce=D("/zsF"),ge=D("PArb");function ye(mt){var tt,pt,Et,Ut,Dt,Xt,Pt,ut=mt.Prize,vt=Object(x.i)(),bt=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"}]),tr=Object(s.a)(bt,2),Qt=tr[0],Wt=tr[1],jt=function(){var Yt=Object(n.a)(l.a.mark(function qt(et){var vr;return l.a.wrap(function(cr){for(;;)switch(cr.prev=cr.next){case 0:return cr.next=2,Object(Z.u)({type:et.type,id:vt.identifier});case 2:vr=cr.sent,(vr==null?void 0:vr.status)===0&&(location.href="/competitions/exports?id=".concat(vt.identifier,"&type=").concat(et.type));case 4:case"end":return cr.stop()}},qt)}));return function(et){return Yt.apply(this,arguments)}}();return r.a.createElement("div",null,r.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"),r.a.createElement("p",{style:{marginTop:"30px",fontSize:"16px",color:"#000"}},"\u8BC1\u4E66\u60C5\u51B5"),(ut==null||((tt=ut.personal_certifications)===null||tt===void 0)?void 0:tt.length)>0?r.a.createElement("p",null,r.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A"),r.a.createElement("img",{src:G.a.IMG_SERVER+"/images/educoder/pdfs.png"}),r.a.createElement("a",{style:{marginLeft:"5px"},href:G.a.API_SERVER+"".concat(ut==null||((pt=ut.personal_certifications[0])===null||pt===void 0)?void 0:pt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):r.a.createElement("p",null,r.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A")," ",r.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210"),r.a.createElement("span",{style:{marginLeft:"20px"}},"\u539F\u56E0\uFF1A")," ",r.a.createElement("span",{style:{color:"#000"}},"\u7EC4\u59D4\u4F1A\u672A\u5B8C\u6210\u8BC1\u4E66\u5BA1\u6279\uFF0C\u8BF7\u7A0D\u540E")),(ut==null||((Et=ut.team_certifications)===null||Et===void 0)?void 0:Et.length)>0?r.a.createElement("p",null,r.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A"),r.a.createElement("img",{src:G.a.IMG_SERVER+"/images/educoder/pdfs.png"}),r.a.createElement("a",{style:{marginLeft:"5px"},href:G.a.API_SERVER+"".concat(ut==null||((Ut=ut.team_certifications[0])===null||Ut===void 0)?void 0:Ut.url)},"\u7ACB\u5373\u4E0B\u8F7D")):r.a.createElement("p",null,r.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A")," ",r.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210")),r.a.createElement(ge.a,null),(ut==null||((Dt=ut.teams)===null||Dt===void 0)?void 0:Dt.length)>0?r.a.createElement("div",null,r.a.createElement("p",null,(ut==null?void 0:ut.teams)&&(ut==null||((Xt=ut.teams[0])===null||Xt===void 0)?void 0:Xt.name),"\u6218\u961F\u4FE1\u606F\u586B\u62A5\u6982\u51B5"),r.a.createElement("p",{style:{display:"flex",height:"50px",background:"#f5f5f5",alignItems:"center",justifyContent:"space-around"}},r.a.createElement("span",{style:{width:"5%"}},"\u89D2\u8272"),r.a.createElement("span",{style:{width:"5%"}},"\u59D3\u540D"),r.a.createElement("span",{style:{width:"10%"}},"\u5B9E\u540D\u8BA4\u8BC1"),r.a.createElement("span",{style:{width:"10%"}},"\u804C\u4E1A\u8BA4\u8BC1"),r.a.createElement("span",{style:{width:"10%"}},"\u624B\u673A\u7ED1\u5B9A"),r.a.createElement("span",{style:{width:"10%"}},"\u90AE\u7BB1\u7ED1\u5B9A"),r.a.createElement("span",{style:{width:"50%",textAlign:"center"}},"\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7\u4FE1\u606F\uFF08\u961F\u957F\u586B\u5199\uFF09")),(ut==null?void 0:ut.teams)&&(ut==null||((Pt=ut.teams[0])===null||Pt===void 0)?void 0:Pt.team_members.map(function(Yt,qt){var et,vr,Ar,cr,ht,_t;return r.a.createElement("p",{className:O.a.teamItem},r.a.createElement("span",{style:{width:"5%"}},Yt==null?void 0:Yt.role),r.a.createElement("span",{style:{width:"5%"}},Yt==null?void 0:Yt.name),r.a.createElement("span",{style:{width:"10%"}},(Yt==null?void 0:Yt.real_name_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(Yt==null?void 0:Yt.real_name_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),r.a.createElement("span",{style:{width:"10%"}},(Yt==null?void 0:Yt.professional_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(Yt==null?void 0:Yt.professional_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),r.a.createElement("span",{style:{width:"10%"}},Yt!=null&&Yt.phone_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),r.a.createElement("span",{style:{width:"10%"}},Yt!=null&&Yt.email_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),(Yt==null?void 0:Yt.role)==="\u961F\u957F"?r.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(ut==null?void 0:ut.teams)&&(ut==null||((et=ut.teams[0])===null||et===void 0||((vr=et.bank_account)===null||vr===void 0))?void 0:vr.bank),(ut==null?void 0:ut.teams)&&(ut==null||((Ar=ut.teams[0])===null||Ar===void 0||((cr=Ar.bank_account)===null||cr===void 0))?void 0:cr.second_bank),(ut==null?void 0:ut.teams)&&(ut==null||((ht=ut.teams[0])===null||ht===void 0||((_t=ht.bank_account)===null||_t===void 0))?void 0:_t.card_no)):r.a.createElement("span",{style:{width:"50%"}}))}))):null,r.a.createElement(A.a,{gutter:[20,20]},Qt.map(function(Yt,qt){return r.a.createElement(rt.a,{key:qt},r.a.createElement(S.a,{type:"primary",onClick:function(){return jt(Yt)}},Yt.name))})))}var Re=ye,De=D("0Owb"),Pe=D("7Kak"),ze=D("9yH6"),at=D("y8nQ"),lt=D("Vl3Y"),St=D("1vsH"),Ot=D("Dgm7"),ir=D.n(Ot),Gt=D("NnUe"),yt=D.n(Gt),Fr=w.a.Dragger,Pr=10,jr=function(tt){var pt=tt.user,Et=tt.account,Ut=tt.globalSetting,Dt=tt.loading,Xt=tt.dispatch,Pt=Object(h.a)(tt,["user","account","globalSetting","loading","dispatch"]),ut=lt.a.useForm(),vt=Object(s.a)(ut,1),bt=vt[0],tr=Object(a.useState)({}),Qt=Object(s.a)(tr,2),Wt=Qt[0],jt=Qt[1],Yt=Object(a.useState)(!0),qt=Object(s.a)(Yt,2),et=qt[0],vr=qt[1],Ar=Object(a.useState)(),cr=Object(s.a)(Ar,2),ht=cr[0],_t=cr[1],ft=Object(a.useState)(),Tt=Object(s.a)(ft,2),zt=Tt[0],rr=Tt[1],Kt=Object(a.useState)(),yr=Object(s.a)(Kt,2),kr=yr[0],sr=yr[1],Ze=Object(a.useState)(),kt=Object(s.a)(Ze,2),Zr=kt[0],Vr=kt[1];Object(a.useEffect)(function(){if(!Et.basicInfo)return;var Vt=Et.basicInfo,ct={name:Vt.show_realname?Vt.name:Object(St.H)(Vt.name),gender:Vt.gender};_t(Vt.name),vr(Vt.show_realname),bt.setFieldsValue(ct),jt(ct)},[Et.basicInfo]);var nr=function(ct){if(ct.file.status==="uploading"){Vr(!0);return}if(ct.file.status==="done"){var dt;console.log(ct.file,ct.file.response),sr((dt=ct.file.response)===null||dt===void 0?void 0:dt.id),Object(St.D)(ct.file.originFileObj,function(Mt){rr(Mt),Vr(!1)})}},br=function(ct){jt(Object(P.a)({},bt.getFieldsValue())),"name"in ct&&_t(ct.name)},Tr=function(){var ct=!et;vr(ct);var dt=ct?ht:Object(St.H)(ht);bt.setFieldsValue({name:dt})},Rt=function(){var Vt=Object(n.a)(l.a.mark(function ct(dt){var Mt,wt,_r,Jr,qr,mr,Xr,Rr;return l.a.wrap(function(Ur){for(;;)switch(Ur.prev=Ur.next){case 0:if(_r=dt||{},Jr=_r.name,qr=_r.gender,mr=_r.idNumber,zt){Ur.next=4;break}return o.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),Ur.abrupt("return");case 4:return Ur.next=6,Xt({type:"account/applyRealNameAuth",payload:{id:((Mt=Et.basicInfo)===null||Mt===void 0?void 0:Mt.id)||((wt=pt.userInfo)===null||wt===void 0?void 0:wt.login),name:Jr,gender:qr,id_number:mr,show_realname:et,attachment_ids:[kr]}});case 6:Xr=Ur.sent,Ht(),Xr&&(o.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),Xt({type:"account/getBasicInfo",payload:{login:(Rr=pt.userInfo)===null||Rr===void 0?void 0:Rr.login}}));case 9:case"end":return Ur.stop()}},ct)}));return function(dt){return Vt.apply(this,arguments)}}(),Ht=function(){Xt({type:"account/setActionTabs",payload:{}})},ar={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(G.a.API_SERVER,"/api/attachments.json"),className:yt.a.uploader,onChange:nr,beforeUpload:function(ct){var dt=ct.type==="image/jpeg"||ct.type==="image/png"||ct.type==="image/jpg"||ct.type==="image/bmp";return dt||o.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),dt}};return r.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Et.actionTabs.key==="Account-RealNameAuth",title:"\u4FEE\u6539\u5B9E\u540D\u4FE1\u606F",width:"600px",footer:null},r.a.createElement(t.a,{spinning:!!Zr},r.a.createElement(lt.a,{className:yt.a.formWrap,form:bt,layout:"horizontal",onValuesChange:br,onFinish:Rt},r.a.createElement(lt.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(Pr,"\u4E2A\u5B57\u7B26")},{validator:St.K}],extra:r.a.createElement("span",null,et?"\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")},r.a.createElement(U.a,{disabled:!et,placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Pr,"\u4E2A\u5B57\u7B26"),maxLength:Pr,addonAfter:r.a.createElement("i",{className:"iconfont ".concat(et?"icon-xianshi":"icon-yincang"," font18 ").concat(yt.a.color0152d9),onClick:Tr})})),r.a.createElement(lt.a.Item,{label:"\u6027\u522B\uFF1A",name:"gender",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6027\u522B"}]},r.a.createElement(ze.a.Group,null,r.a.createElement(ze.a,{value:0},"\u7537"),r.a.createElement(ze.a,{value:1},"\u5973"))),r.a.createElement(lt.a.Item,{label:"\u8BC1\u4EF6\u53F7\uFF1A",labelCol:{span:3},name:"idNumber",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"}]},r.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"})),r.a.createElement(lt.a.Item,{label:"\u8EAB\u4EFD\u8BC1\u4E0A\u4F20",labelCol:{span:3}},r.a.createElement("div",{className:yt.a.flexRow},r.a.createElement("div",{className:"".concat(yt.a.flexColumn," ").concat(yt.a.example)},r.a.createElement("span",{className:yt.a.exampleImg},r.a.createElement("img",{src:ir.a})),r.a.createElement("span",{className:"tc"},r.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),r.a.createElement("p",{className:"".concat(yt.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),r.a.createElement("div",{className:yt.a.flexColumn},r.a.createElement(Fr,Object(De.a)({},ar,{accept:".png,.jpg,.bmp,.jpeg"}),zt?r.a.createElement("img",{src:zt,className:yt.a.uploadImg}):r.a.createElement("div",{className:yt.a.imageTip},r.a.createElement("p",null,r.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(yt.a.uploadTipIcon)})),r.a.createElement("p",{className:yt.a.uploadTip},r.a.createElement("a",{className:yt.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),r.a.createElement("span",{className:"tc"},r.a.createElement("p",{className:yt.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),r.a.createElement("div",{className:yt.a.footerWrap},r.a.createElement(lt.a.Item,null,r.a.createElement(S.a,{className:"mr5",size:"large",onClick:Ht},"\u53D6\u6D88"),r.a.createElement(S.a,{size:"large",type:"primary",htmlType:"submit",loading:Dt["account/applyRealNameAuth"]},"\u4FDD\u5B58"))),r.a.createElement("div",{className:yt.a.note},r.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),r.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"),r.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"),r.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"),r.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"),r.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"),r.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"),r.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(p.a)(function(mt){var tt=mt.user,pt=mt.account,Et=mt.loading,Ut=mt.globalSetting;return{user:tt,account:pt,globalSetting:Ut,loading:Et.effects}})(jr),xr=D("O3gP"),an=D("lrIw"),tn=D("KXlV"),Ir=D.n(tn),hn=D("Sjjz"),lr=D.n(hn),Cr=U.a.TextArea,gr=function(tt){var pt=tt.account,Et=tt.globalSetting,Ut=tt.loading,Dt=tt.dispatch,Xt=tt.schoolName,Pt=tt.departmentName,ut=tt.visible,vt=tt.onClose,bt=vt===void 0?function(){}:vt,tr=tt.onSuccess,Qt=tr===void 0?function(){}:tr,Wt=Object(h.a)(tt,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),jt=lt.a.useForm(),Yt=Object(s.a)(jt,1),qt=Yt[0],et=Object(a.useRef)();Object(a.useEffect)(function(){et.current=Wt.schoolId},[Wt.schoolId]),Object(a.useEffect)(function(){qt.setFieldsValue({department:Pt})},[Pt]);var vr=function(){var Ar=Object(n.a)(l.a.mark(function cr(ht){var _t,ft,Tt,zt;return l.a.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:return _t=ht||{},ft=_t.department,Tt=_t.remarks,Kt.next=3,Dt({type:"account/appplyDepartment",payload:{school_id:et.current,name:ft,remarks:Tt}});case 3:zt=Kt.sent,bt(),zt&&(o.b.success("\u65B0\u589E\u9662\u7CFB/\u90E8\u95E8\u6210\u529F\uFF01"),Qt(ft));case 6:case"end":return Kt.stop()}},cr)}));return function(ht){return Ar.apply(this,arguments)}}();return r.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:ut,title:"\u7533\u8BF7\u6DFB\u52A0\u5B50\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},r.a.createElement(lt.a,{className:lr.a.formWrap,form:qt,labelCol:{span:4},wrapperCol:{span:20},onFinish:vr},r.a.createElement(lt.a.Item,{label:"\u5355\u4F4D\u540D\u79F0\uFF1A"},Xt),r.a.createElement(lt.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"}]},r.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"})),r.a.createElement(lt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},r.a.createElement(Cr,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),r.a.createElement("div",{className:lr.a.footerWrap},r.a.createElement(lt.a.Item,null,r.a.createElement(S.a,{className:"mr5",size:"large",onClick:function(){bt()}},"\u53D6\u6D88"),r.a.createElement(S.a,{size:"large",type:"primary",htmlType:"submit",loading:Ut["account/appplyDepartment"]},"\u4FDD\u5B58")))))},xn=Object(p.a)(function(mt){var tt=mt.account,pt=mt.loading,Et=mt.globalSetting;return{account:tt,globalSetting:Et,loading:pt.effects}})(gr),Wn=D("6UJt"),gn=D("DFOY"),Bt=D("jO45"),Kr=D("jN4g"),rn=D("gJ3r"),Or=D("jwmR"),Lr=D.n(Or),Wr=function(tt,pt){return pt.some(function(Et){return Et.label.toLowerCase().indexOf(tt.toLowerCase())>-1})},Fn=U.a.TextArea,yn=function(tt){var pt=tt.account,Et=tt.globalSetting,Ut=tt.loading,Dt=tt.dispatch,Xt=tt.schoolName,Pt=tt.visible,ut=tt.onClose,vt=ut===void 0?function(){}:ut,bt=tt.onSuccess,tr=bt===void 0?function(){}:bt,Qt=Object(h.a)(tt,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),Wt=lt.a.useForm(),jt=Object(s.a)(Wt,1),Yt=jt[0];Object(a.useEffect)(function(){Yt.setFieldsValue({name:Xt})},[Xt]);var qt=function(){var et=Object(n.a)(l.a.mark(function vr(Ar){var cr,ht,_t,ft,Tt,zt,rr;return l.a.wrap(function(yr){for(;;)switch(yr.prev=yr.next){case 0:return cr=Ar||{},ht=cr.name,_t=cr.city,ft=_t===void 0?[]:_t,Tt=cr.address,zt=cr.remarks,yr.next=3,Dt({type:"account/appplySchool",payload:{name:ht,province:ft[0],city:ft[1],address:Tt,remarks:zt}});case 3:rr=yr.sent,vt(),rr&&(o.b.success("\u65B0\u589E\u5B66\u6821/\u5355\u4F4D\u6210\u529F\uFF01"),tr(ht));case 6:case"end":return yr.stop()}},vr)}));return function(Ar){return et.apply(this,arguments)}}();return r.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Pt,title:"\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},r.a.createElement(lt.a,{className:Lr.a.formWrap,form:Yt,labelCol:{span:4},wrapperCol:{span:20},onFinish:qt},r.a.createElement(lt.a.Item,{label:"\u5355\u4F4D\u5168\u79F0\uFF1A",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"}]},r.a.createElement(U.a,{placeholder:"\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"})),r.a.createElement("div",{className:"".concat(Lr.a.flexRow," ").concat(Lr.a.example)},r.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),r.a.createElement("div",{className:Lr.a.flexColumn},r.a.createElement("div",null,r.a.createElement(Bt.a,{style:{color:"rgb(82, 196, 26)"}}),r.a.createElement("span",{className:"font14 ml5"},"\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784")),r.a.createElement("div",null,r.a.createElement(Kr.a,{style:{color:"red"}}),r.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625")))),r.a.createElement(lt.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},r.a.createElement(gn.a,{allowClear:!0,size:"large",options:rn.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:Wr}})),r.a.createElement(lt.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},r.a.createElement(U.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),r.a.createElement(lt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},r.a.createElement(Fn,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),r.a.createElement("div",{className:Lr.a.footerWrap},r.a.createElement(lt.a.Item,null,r.a.createElement(S.a,{className:"mr5",size:"large",onClick:function(){vt()}},"\u53D6\u6D88"),r.a.createElement(S.a,{size:"large",type:"primary",htmlType:"submit",loading:Ut["account/appplySchool"]},"\u4FDD\u5B58")))))},Ct=Object(p.a)(function(mt){var tt=mt.account,pt=mt.loading,Et=mt.globalSetting;return{account:tt,globalSetting:Et,loading:pt.effects}})(yn),ur=pe.a.Option,oi=w.a.Dragger,wi=function(tt){var pt,Et,Ut=tt.user,Dt=tt.account,Xt=tt.globalSetting,Pt=tt.loading,ut=tt.dispatch,vt=tt.Scoid,bt=Object(h.a)(tt,["user","account","globalSetting","loading","dispatch","Scoid"]),tr=lt.a.useForm(),Qt=Object(s.a)(tr,1),Wt=Qt[0],jt=Object(a.useState)({}),Yt=Object(s.a)(jt,2),qt=Yt[0],et=Yt[1],vr=Object(a.useState)([]),Ar=Object(s.a)(vr,2),cr=Ar[0],ht=Ar[1],_t=Object(a.useState)([]),ft=Object(s.a)(_t,2),Tt=ft[0],zt=ft[1],rr=Object(a.useState)([]),Kt=Object(s.a)(rr,2),yr=Kt[0],kr=Kt[1],sr=Object(a.useState)([]),Ze=Object(s.a)(sr,2),kt=Ze[0],Zr=Ze[1],Vr=Object(a.useState)(),nr=Object(s.a)(Vr,2),br=nr[0],Tr=nr[1],Rt=Object(a.useState)(),Ht=Object(s.a)(Rt,2),ar=Ht[0],Vt=Ht[1],ct=Object(a.useState)(),dt=Object(s.a)(ct,2),Mt=dt[0],wt=dt[1],_r=Object(a.useState)(),Jr=Object(s.a)(_r,2),qr=Jr[0],mr=Jr[1],Xr=Object(a.useState)(),Rr=Object(s.a)(Xr,2),on=Rr[0],Ur=Rr[1];Object(a.useEffect)(function(){sn()},[]),Object(a.useEffect)(function(){Object(n.a)(l.a.mark(function Ke(){var Be;return l.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:if(vt){ot.next=2;break}return ot.abrupt("return");case 2:return ot.next=4,Hn(vt);case 4:Be=ot.sent,kr(Be==null?void 0:Be.departments);case 6:case"end":return ot.stop()}},Ke)}))()},[vt]);var sn=function(){var Ke=Object(n.a)(l.a.mark(function Be(){var Ye;return l.a.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:return xt.next=2,ut({type:"account/getSchoolOption"});case 2:Ye=xt.sent,ht(Ye==null?void 0:Ye.schools);case 4:case"end":return xt.stop()}},Be)}));return function(){return Ke.apply(this,arguments)}}(),Hn=function(Be){return ut({type:"account/getDepartmentOption",payload:{id:Be}})};Object(a.useEffect)(function(){if(!Dt.basicInfo)return;var Ke=Dt.basicInfo,Be={identity:Ke.identity,school:Ke.school_name,department:Ke.department_name,studentNo:Ke.student_id,jobTitle:Ke.identity=="teacher"?Ke.technical_title:"\u6559\u6388",manager:Ke.identity=="professional"?Ke.technical_title:"\u4F01\u4E1A\u7BA1\u7406\u8005"};Wt.setFieldsValue(Be),et(Be)},[Dt.basicInfo]);var ke=function(){mr(!0)},We=function(){if(!cr.find(function(Be){return Be.name===qt.school})){o.b.info("\u8BF7\u5148\u9009\u62E9\u6B63\u786E\u7684\u5355\u4F4D\u6216\u8005\u5B66\u6821\uFF01");return}Ur(!0)},Ve=function(Be){if(et(Object(P.a)({},Wt.getFieldsValue())),"school"in Be){zt(cr.filter(function(ot){return ot.name.includes(Be.school)}));var Ye=(cr.find(function(ot){return ot.name===Be.school})||{}).id;Ye?Fe(Be.school):(Wt.setFieldsValue({department:""}),et(Object(P.a)(Object(P.a)({},qt),{school:Be.school,department:""})))}},Fe=function(){var Ke=Object(n.a)(l.a.mark(function Be(Ye,ot){var xt,At,Nt,Er,Hr,Br;return l.a.wrap(function(Mr){for(;;)switch(Mr.prev=Mr.next){case 0:return Er=(xt=cr.find(function(Yr){return Yr.name===Ye}))===null||xt===void 0?void 0:xt.id,Mr.next=3,Hn(Er);case 3:if(Mr.t0=Mr.sent,Mr.t0){Mr.next=6;break}Mr.t0={};case 6:Hr=Mr.t0,kr(Hr==null?void 0:Hr.departments),Br=ot||(Hr==null||((At=Hr.departments)===null||At===void 0||((Nt=At[0])===null||Nt===void 0))?void 0:Nt.name),Wt.setFieldsValue({department:Br}),et(Object(P.a)(Object(P.a)({},qt),{school:Ye,department:Br}));case 11:case"end":return Mr.stop()}},Be)}));return function(Ye,ot){return Ke.apply(this,arguments)}}(),_e=function(){var Ke=Object(n.a)(l.a.mark(function Be(Ye){return l.a.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:return xt.next=2,sn();case 2:Wt.setFieldsValue({school:Ye,department:""}),et(Object(P.a)(Object(P.a)({},qt),{school:Ye,department:""}));case 4:case"end":return xt.stop()}},Be)}));return function(Ye){return Ke.apply(this,arguments)}}(),Le=function(Be){if(Be.file.status==="uploading"){wt(!0);return}if(Be.file.status==="done"){var Ye;console.log(Be.file,Be.file.response),Vt((Ye=Be.file.response)===null||Ye===void 0?void 0:Ye.id),Object(St.D)(Be.file.originFileObj,function(ot){Tr(ot),wt(!1)})}},Te=function(){var Ke=Object(n.a)(l.a.mark(function Be(Ye){var ot,xt,At,Nt,Er,Hr,Br,Gr,Mr,Yr,$r,cn,en,Tn,nn,Sr;return l.a.wrap(function(Qr){for(;;)switch(Qr.prev=Qr.next){case 0:if(Er=Ye||{},Hr=Er.school,Br=Er.department,Gr=Er.identity,Mr=Er.studentNo,Yr=Er.jobTitle,$r=Er.manager,br){Qr.next=4;break}return o.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),Qr.abrupt("return");case 4:return cn=(ot=cr.find(function(ln){return ln.name===Hr}))===null||ot===void 0?void 0:ot.id,en=(xt=yr.find(function(ln){return ln.name===Br}))===null||xt===void 0?void 0:xt.id,Gr==="student"?Tn=Mr:Gr==="teacher"?Tn=Yr:Tn=$r,Qr.next=9,ut({type:"account/applyProfessionalAuth",payload:{id:((At=Dt.basicInfo)===null||At===void 0?void 0:At.id)||((Nt=Ut.userInfo)===null||Nt===void 0?void 0:Nt.login),school_id:cn,department_id:en,identity:Gr,extra:Tn,attachment_ids:[ar]}});case 9:nn=Qr.sent,Ne(),nn&&(o.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),ut({type:"account/getBasicInfo",payload:{login:(Sr=Ut.userInfo)===null||Sr===void 0?void 0:Sr.login}}));case 12:case"end":return Qr.stop()}},Be)}));return function(Ye){return Ke.apply(this,arguments)}}(),Ne=function(){ut({type:"account/setActionTabs",payload:{}})},He={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(G.a.API_SERVER,"/api/attachments.json"),className:yt.a.uploader,onChange:Le,beforeUpload:function(Be){var Ye=Be.type==="image/jpeg"||Be.type==="image/png"||Be.type==="image/jpg"||Be.type==="image/bmp";return Ye||o.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),Ye}};return r.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:yt.a.modal,visible:Dt.actionTabs.key==="Account-ProfessionalAuth",title:r.a.createElement("div",null,r.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(yt.a.colorBlue)}),"\u804C\u4E1A\u8BA4\u8BC1"),width:"660px",footer:null},r.a.createElement(t.a,{spinning:!!Mt},r.a.createElement(lt.a,{className:yt.a.formWrap,form:Wt,layout:"horizontal",onValuesChange:Ve,onFinish:Te},r.a.createElement(A.a,{gutter:[10,0]},r.a.createElement(rt.a,{flex:"300px"},r.a.createElement(lt.a.Item,{label:"\u804C\u4E1A",name:"identity",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u4E1A"}]},r.a.createElement(pe.a,null,r.a.createElement(ur,{value:"teacher"},"\u6559\u5E08"),r.a.createElement(ur,{value:"student"},"\u5B66\u751F"),r.a.createElement(ur,{value:"professional"},"\u4E13\u4E1A\u4EBA\u58EB")))),qt.identity==="student"&&r.a.createElement(rt.a,{flex:"200px"},r.a.createElement(lt.a.Item,{initialValue:qt.studentNo,name:"studentNo",rules:[{required:!0,message:"\u8BF7\u5148\u8F93\u5165\u5B66\u53F7"}]},r.a.createElement(U.a,{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5B66\u53F7"}))),qt.identity==="teacher"&&r.a.createElement(rt.a,{flex:"200px"},r.a.createElement(lt.a.Item,{initialValue:qt.jobTitle,name:"jobTitle",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},r.a.createElement(pe.a,null,r.a.createElement(ur,{value:"\u6559\u6388"},"\u6559\u6388"),r.a.createElement(ur,{value:"\u526F\u6559\u6388"},"\u526F\u6559\u6388"),r.a.createElement(ur,{value:"\u8BB2\u5E08"},"\u8BB2\u5E08"),r.a.createElement(ur,{value:"\u52A9\u6559"},"\u52A9\u6559")))),qt.identity==="professional"&&r.a.createElement(rt.a,{flex:"200px"},r.a.createElement(lt.a.Item,{initialValue:qt.manager,name:"manager",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},r.a.createElement(pe.a,null,r.a.createElement(ur,{value:"\u4F01\u4E1A\u7BA1\u7406\u8005"},"\u4F01\u4E1A\u7BA1\u7406\u8005"),r.a.createElement(ur,{value:"\u90E8\u95E8\u7BA1\u7406\u8005"},"\u90E8\u95E8\u7BA1\u7406\u8005"),r.a.createElement(ur,{value:"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"},"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"),r.a.createElement(ur,{value:"\u5DE5\u7A0B\u5E08"},"\u5DE5\u7A0B\u5E08"),r.a.createElement(ur,{value:"\u52A9\u7406\u5DE5\u7A0B\u5E08"},"\u52A9\u7406\u5DE5\u7A0B\u5E08"))))),r.a.createElement(lt.a.Item,{label:"\u9662\u7CFB/\u90E8\u95E8",name:"department",extra:qt.department&&!(yr!=null&&yr.find(function(Ke){return Ke.name===qt.department}))&&r.a.createElement("div",{className:yt.a.schoolHintWrap},r.a.createElement("span",{className:yt.a.colorCDCDCD},qt.department?"\u672A\u627E\u5230\u5305\u542B\u201C".concat(qt.department,"\u201D\u7684\u9AD8\u6821\uFF0C"):"\u672A\u627E\u5230\u9662\u7CFB\uFF0C"),r.a.createElement("span",{className:"".concat(yt.a.color0152d9," current"),onClick:We},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u9662\u7CFB/\u90E8\u95E8"}]},r.a.createElement(an.a,{showSearch:!0,onChange:function(Be){return Zr(yr.filter(function(Ye){return Ye.name.includes(Be)}))},options:kt==null?void 0:kt.map(function(Ke){return{value:Ke.name}})})),r.a.createElement(lt.a.Item,{label:"\u804C\u4E1A\u8BC1\u4E0A\u4F20"},r.a.createElement("div",{className:yt.a.flexRow},r.a.createElement("div",{className:"".concat(yt.a.flexColumn," ").concat(yt.a.example)},r.a.createElement("span",{className:yt.a.exampleImg},r.a.createElement("img",{src:Ir.a})),r.a.createElement("span",{className:"tc"},r.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),r.a.createElement("p",{className:"".concat(yt.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),r.a.createElement("div",{className:yt.a.flexColumn},r.a.createElement(oi,Object(De.a)({},He,{accept:".png,.jpg,.bmp,.jpeg"}),br?r.a.createElement("img",{src:br,className:yt.a.uploadImg}):r.a.createElement("div",{className:yt.a.imageTip},r.a.createElement("p",null,r.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(yt.a.uploadTipIcon)})),r.a.createElement("p",{className:yt.a.uploadTip},r.a.createElement("a",{className:yt.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),r.a.createElement("span",{className:"tc"},r.a.createElement("p",{className:yt.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),r.a.createElement("div",{className:yt.a.footerWrap},r.a.createElement(lt.a.Item,null,r.a.createElement(S.a,{className:"mr5",size:"large",onClick:Ne},"\u53D6\u6D88"),r.a.createElement(S.a,{size:"large",type:"primary",htmlType:"submit",loading:Pt["account/applyProfessionalAuth"]},"\u4FDD\u5B58"))),r.a.createElement("div",{className:yt.a.note},r.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),r.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"),r.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"),r.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"),r.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"),r.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"),r.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",!(Xt!=null&&(pt=Xt.setting)!==null&&pt!==void 0&&pt.is_local)&&"EduCoder","\u8D26\u53F7\u3002"),r.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")))),r.a.createElement(Ct,{visible:qr,onClose:function(){return mr(!1)},schoolName:qt.school,onSuccess:_e}),r.a.createElement(xn,{visible:on,onClose:function(){return Ur(!1)},schoolId:(Et=cr.find(function(Ke){return Ke.name===qt.school}))===null||Et===void 0?void 0:Et.id,schoolName:qt.school,departmentName:qt.department,onSuccess:function(Be){return Fe(qt.school,Be)}}))},Pi=Object(p.a)(function(mt){var tt=mt.user,pt=mt.account,Et=mt.loading,Ut=mt.globalSetting;return{user:tt,account:pt,globalSetting:Ut,loading:Et.effects}})(wi),vi=D("aCH8"),Un=D.n(vi);function wr(mt){var tt=mt.type,pt=mt.dispatch,Et=mt.userid,Ut=mt.isshow,Dt=mt.setPhoneshow,Xt=mt.setEmailshow,Pt="79e33abd4b6588941ab7622aed1e67e8",ut=Object(a.useState)(""),vt=Object(s.a)(ut,2),bt=vt[0],tr=vt[1],Qt=Object(a.useState)("\u83B7\u53D6\u9A8C\u8BC1\u7801"),Wt=Object(s.a)(Qt,2),jt=Wt[0],Yt=Wt[1],qt=Object(a.useState)(60),et=Object(s.a)(qt,2),vr=et[0],Ar=et[1],cr=Object(a.useState)(!1),ht=Object(s.a)(cr,2),_t=ht[0],ft=ht[1],Tt=Object(a.useState)(""),zt=Object(s.a)(Tt,2),rr=zt[0],Kt=zt[1];function yr(){return kr.apply(this,arguments)}function kr(){return kr=Object(n.a)(l.a.mark(function nr(){var br;return l.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:if(bt){Rt.next=3;break}return tt===3?o.b.info("\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A"):o.b.info("\u90AE\u7BB1\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A"),Rt.abrupt("return");case 3:return Rt.next=5,pt({type:"competitions/getVerification",payload:{type:tt,login:bt,smscode:Un()(Pt+bt)}});case 5:br=Rt.sent,br.status===1&&(o.b.info("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F"),sr(),ft(!0));case 7:case"end":return Rt.stop()}},nr)})),kr.apply(this,arguments)}function sr(){Ar(60);var nr=setInterval(function(){--vr,vr>-1?Ar(vr):(clearInterval(nr),ft(!1))},1e3)}function Ze(){return kt.apply(this,arguments)}function kt(){return kt=Object(n.a)(l.a.mark(function nr(){var br;return l.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:return Rt.next=2,pt({type:"competitions/PhoneBind",payload:{userid:Et,code:rr,phone:bt}});case 2:br=Rt.sent,br.status===0&&(o.b.info("\u7ED1\u5B9A\u6210\u529F"),Dt("none"));case 4:case"end":return Rt.stop()}},nr)})),kt.apply(this,arguments)}function Zr(){return Vr.apply(this,arguments)}function Vr(){return Vr=Object(n.a)(l.a.mark(function nr(){var br;return l.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:return Rt.next=2,pt({type:"competitions/EmailBind",payload:{userid:Et,code:rr,email:bt}});case 2:br=Rt.sent,br.status===0&&(o.b.info("\u7ED1\u5B9A\u6210\u529F"),Xt("none"));case 4:case"end":return Rt.stop()}},nr)})),Vr.apply(this,arguments)}return r.a.createElement("div",{style:{display:Ut}},r.a.createElement("p",null,r.a.createElement(U.a,{value:bt,onChange:function(br){return tr(br.target.value)},placeholder:tt===3?"\u8BF7\u8F93\u5165\u624B\u673A\u53F7":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740",style:{width:"370px"}})),r.a.createElement("span",null,r.a.createElement(U.a,{value:rr,onChange:function(br){return Kt(br.target.value)},placeholder:tt===3?"\u8BF7\u8F93\u5165\u624B\u673A\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801",style:{width:"250px"}}))," ",r.a.createElement(S.a,{disabled:_t,onClick:function(){return yr()},type:"primary",style:{marginLeft:"20px",width:"100px"}},_t?"\u91CD\u65B0\u53D1\u9001".concat(vr,"s"):jt),r.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},r.a.createElement(S.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){if(!rr){o.b.info("\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}tt===3?Ze():Zr()}},"\u786E\u8BA4"),r.a.createElement(S.a,{style:{marginLeft:"20px"},onClick:function(){tt===3?Dt("none"):Xt("none")}},"\u53D6\u6D88")))}var si=wr;function It(mt){var tt=mt.dispatch,pt=mt.userid,Et={wrapperCol:{offset:3,span:21}},Ut=lt.a.useForm(),Dt=Object(s.a)(Ut,1),Xt=Dt[0],Pt=Object(x.i)(),ut=Pt.identifier;return r.a.createElement("div",{style:{width:"500px"}},r.a.createElement(lt.a,{form:Xt,name:"basic"},r.a.createElement(lt.a.Item,Object(De.a)({},Et,{label:r.a.createElement("div",{style:{width:"30px"}},"\u5F00\u6237\u884C"),name:"bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5F00\u6237\u884C"}]}),r.a.createElement(U.a,null)),r.a.createElement(lt.a.Item,Object(De.a)({},Et,{label:r.a.createElement("div",{style:{width:"30px"}},"\u652F\u884C"),name:"second_bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u652F\u884C"}]}),r.a.createElement(U.a,null)),r.a.createElement(lt.a.Item,Object(De.a)({},Et,{label:r.a.createElement("div",{style:{width:"30px"}},"\u8D26\u53F7"),name:"card_no",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7"}]}),r.a.createElement(U.a,null)),r.a.createElement(lt.a.Item,null,r.a.createElement(S.a,{type:"primary",htmlType:"submit",onClick:Object(n.a)(l.a.mark(function vt(){return l.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:Xt.validateFields().then(function(){var Qt=Object(n.a)(l.a.mark(function Wt(jt){var Yt;return l.a.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:return et.next=2,tt({type:"competitions/setleader",payload:Object(P.a)({identifier:ut,user_id:pt},jt)});case 2:Yt=et.sent,Yt.status===0&&o.b.info("\u63D0\u4EA4\u6210\u529F");case 4:case"end":return et.stop()}},Wt)}));return function(Wt){return Qt.apply(this,arguments)}}());case 1:case"end":return tr.stop()}},vt)}))},"\u63D0\u4EA4"))))}var Zn=It,Bn={teacher:"\u6559\u5E08",student:"\u5B66\u751F",professional:"\u4E13\u4E1A\u4EBA\u58EB"};function zi(mt){var tt,pt,Et,Ut,Dt,Xt,Pt,ut,vt=mt.Prize,bt=mt.Accounts,tr=mt.dispatch,Qt=mt.userid,Wt=Object(a.useState)("none"),jt=Object(s.a)(Wt,2),Yt=jt[0],qt=jt[1],et=Object(a.useState)("none"),vr=Object(s.a)(et,2),Ar=vr[0],cr=vr[1];function ht(ft){return _t.apply(this,arguments)}function _t(){return _t=Object(n.a)(l.a.mark(function ft(Tt){var zt;return l.a.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:if(!(Tt==="1")){Kt.next=6;break}return Kt.next=3,tr({type:"competitions/Authentication"});case 3:zt=Kt.sent,Kt.next=9;break;case 6:return Kt.next=8,tr({type:"competitions/Professional"});case 8:zt=Kt.sent;case 9:zt.status===0&&o.b.info("\u64A4\u9500\u6210\u529F");case 10:case"end":return Kt.stop()}},ft)})),_t.apply(this,arguments)}return r.a.createElement("div",null,r.a.createElement("p",null,r.a.createElement("span",{style:{color:"red"}},"*"),r.a.createElement("span",{style:{fontSize:"16px"}},"\u5B9E\u540D\u4FE1\u606F"),(bt==null?void 0:bt.authentication)==="uncertified"?r.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(bt==null?void 0:bt.authentication)==="uncertified"?r.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){tr({type:"account/setActionTabs",payload:{key:"Account-RealNameAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),r.a.createElement("div",{style:{padding:"20px"}},r.a.createElement("p",null,"\u59D3\u540D\uFF1A",r.a.createElement("span",null,bt==null?void 0:bt.name),(bt==null?void 0:bt.authentication)==="uncertified"?null:(bt==null?void 0:bt.authentication)==="applying"?r.a.createElement("span",null,r.a.createElement("span",null,"\u5F85\u5BA1\u6838"),r.a.createElement(S.a,{type:"primary",onClick:function(){return ht("1")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):r.a.createElement("span",{style:{color:"#6ec76e"}},r.a.createElement("span",{className:"iconfont icon-wancheng font-14 ml20"})," ","\u5DF2\u8BA4\u8BC1")),r.a.createElement("p",null,"\u6027\u522B\uFF1A",r.a.createElement("span",null,(bt==null?void 0:bt.gender)===0?"\u7537":"\u5973"))),r.a.createElement("p",null,r.a.createElement("span",{style:{color:"red"}},"*"),r.a.createElement("span",{style:{fontSize:"16px"}},"\u804C\u4E1A\u4FE1\u606F"),(bt==null?void 0:bt.authentication)==="uncertified"?r.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(bt==null?void 0:bt.authentication)==="uncertified"?r.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){tr({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),r.a.createElement("div",{style:{padding:"20px"}},r.a.createElement("p",null,"\u804C\u4E1A\uFF1A",r.a.createElement("span",null,bt&&bt.identity&&Bn[bt.identity]),(bt==null?void 0:bt.authentication)==="uncertified"?null:(bt==null?void 0:bt.authentication)==="applying"?r.a.createElement("span",null,r.a.createElement("span",null,"\u5F85\u5BA1\u6838"),r.a.createElement(S.a,{type:"primary",onClick:function(){return ht("2")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):r.a.createElement("span",{style:{color:"#6ec76e"}},r.a.createElement("span",{className:"iconfont icon-wancheng font-12 ml20"}),r.a.createElement("span",null,"\u5DF2\u8BA4\u8BC1"),r.a.createElement(S.a,{type:"primary",onClick:function(){tr({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})},ghost:!0,style:{marginLeft:"20px"}},"\u91CD\u65B0\u8BA4\u8BC1"))),r.a.createElement("p",null,"\u5B66\u53F7\uFF1A",r.a.createElement("span",null,(bt==null?void 0:bt.student_id)||"--")),r.a.createElement("p",null,"\u5B66\u6821\uFF1A",r.a.createElement("span",null,(bt==null?void 0:bt.school_name)||"--")),r.a.createElement("p",null,"\u9662\u7CFB\uFF1A",r.a.createElement("span",null,(bt==null?void 0:bt.department_name)||"--"))),r.a.createElement("p",null,r.a.createElement("span",{style:{color:"red"}},"*"),r.a.createElement("span",{style:{fontSize:"16px"}},"\u8054\u7CFB\u65B9\u5F0F")),r.a.createElement("div",{style:{padding:"20px"}},r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u624B\u673A\u53F7\uFF1A"),r.a.createElement("span",{style:{width:"150px"}},(bt==null?void 0:bt.phone)||"--"),Yt==="none"?r.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){qt("block")}},"\u66F4\u6362"):null),r.a.createElement(si,{type:3,dispatch:tr,userid:bt==null?void 0:bt.id,isshow:Yt,setPhoneshow:qt,setEmailshow:cr}),r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"Email\uFF1A"),r.a.createElement("span",{style:{width:"150px"}},(bt==null?void 0:bt.mail)||"--"),Ar==="none"?r.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){cr("block")}},"\u66F4\u6362"):null),r.a.createElement(si,{type:4,dispatch:tr,userid:bt==null?void 0:bt.id,isshow:Ar,setEmailshow:cr,setPhoneshow:qt})),vt!=null&&vt.leader&&vt!==null&&vt!==void 0&&vt.teams&&vt!==null&&vt!==void 0&&(tt=vt.teams[0])!==null&&tt!==void 0&&(pt=tt.bank_account)!==null&&pt!==void 0&&pt.bank?r.a.createElement("p",null,r.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),r.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")):r.a.createElement("div",null,r.a.createElement("p",null,r.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),r.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")),r.a.createElement(Zn,{dispatch:tr,userid:Qt})),vt!=null&&vt.leader?r.a.createElement("div",{style:{padding:"20px"}},r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u5F00\u6237\u884C\uFF1A"),r.a.createElement("span",null,(vt==null?void 0:vt.teams)&&(vt==null||((Et=vt.teams[0])===null||Et===void 0||((Ut=Et.bank_account)===null||Ut===void 0))?void 0:Ut.bank)||"--")),r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u652F\u884C\uFF1A"),r.a.createElement("span",null,(vt==null?void 0:vt.teams)&&(vt==null||((Dt=vt.teams[0])===null||Dt===void 0||((Xt=Dt.bank_account)===null||Xt===void 0))?void 0:Xt.second_bank)||"--")),r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u8D26\u53F7\uFF1A"),r.a.createElement("span",null,(vt==null?void 0:vt.teams)&&(vt==null||((Pt=vt.teams[0])===null||Pt===void 0||((ut=Pt.bank_account)===null||ut===void 0))?void 0:ut.card_no)||"--"))):null,r.a.createElement(Pi,{Scoid:bt==null?void 0:bt.school_id}),r.a.createElement(un,null))}var Ti=zi,ri=ue.a.TabPane;function Qi(mt){var tt=mt.Prize,pt=mt.Accounts,Et=mt.getAccounts,Ut=mt.dispatch,Dt=mt.userid;return r.a.createElement("div",{className:"fr"},r.a.createElement("div",{className:"mb100 "},r.a.createElement(ue.a,{defaultActiveKey:"1",onChange:function(Pt){Pt==="2"&&Et()}},r.a.createElement(ri,{tab:"\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D",key:"1"},r.a.createElement(Re,{Prize:tt})),r.a.createElement(ri,{tab:"\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F",key:"2"},r.a.createElement(Ti,{userid:Dt,dispatch:Ut,Prize:tt,Accounts:pt})))))}var Zi=Qi,li=D("xKgJ"),In=D("wd/R"),ui=D.n(In),Mi=ue.a.TabPane;function yi(mt){var tt,pt,Et,Ut,Dt,Xt,Pt=mt.ChartRules,ut=mt.ItemData,vt=mt.getCharts,bt=mt.Selectkey,tr=mt.HeaderDetail,Qt=mt.getChartRules,Wt=mt.userinfo,jt=mt.Editable,Yt=mt.dispatch,qt=mt.StaffDetail,et=Object(a.useState)(!1),vr=Object(s.a)(et,2),Ar=vr[0],cr=vr[1],ht=Object(a.useState)(""),_t=Object(s.a)(ht,2),ft=_t[0],Tt=_t[1],zt=Object(a.useState)(!0),rr=Object(s.a)(zt,2),Kt=rr[0],yr=rr[1],kr=Object(a.useState)(),sr=Object(s.a)(kr,2),Ze=sr[0],kt=sr[1],Zr=Object(a.useState)(),Vr=Object(s.a)(Zr,2),nr=Vr[0],br=Vr[1],Tr=Object(x.i)(),Rt=Tr.identifier;Object(a.useEffect)(function(){if(Kt){var ct,dt,Mt,wt,_r=Pt==null||((ct=Pt.stages)===null||ct===void 0)?void 0:ct[0];kt(_r);var Jr=Pt==null||((dt=Pt.stages)===null||dt===void 0||((Mt=dt[0])===null||Mt===void 0||((wt=Mt.children)===null||wt===void 0)))?void 0:wt[0];if(br(Jr),_r!=null&&_r.id){var qr,mr,Xr;vt(_r==null?void 0:_r.id),Tt(((qr=Pt.rule_contents)===null||qr===void 0||((mr=qr.filter(function(sn){return parseInt(sn.competition_stage_id)===parseInt(_r==null?void 0:_r.id)}))===null||mr===void 0||((Xr=mr[0])===null||Xr===void 0))?void 0:Xr.content)||"")}else{var Rr,on,Ur;vt(0),Tt(((Rr=Pt.rule_contents)===null||Rr===void 0||((on=Rr.filter(function(sn){return parseInt(sn.competition_stage_id)===0}))===null||on===void 0||((Ur=on[0])===null||Ur===void 0))?void 0:Ur.content)||"")}}},[Pt]);function Ht(){return ar.apply(this,arguments)}function ar(){return ar=Object(n.a)(l.a.mark(function ct(){var dt,Mt,wt,_r,Jr,qr,mr,Xr,Rr;return l.a.wrap(function(Ur){for(;;)switch(Ur.prev=Ur.next){case 0:if(ft){Ur.next=3;break}return o.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Ur.abrupt("return");case 3:if(yr(!1),dt=Ze==null?void 0:Ze.id,!dt){Ur.next=12;break}return Ur.next=8,Object(ne.a)("/api/competitions/".concat(Rt,"/update_md_content.json"),{method:"post",body:{competition_module_id:bt,content:ft,md_content_id:(Mt=Pt.rule_contents)===null||Mt===void 0||((wt=Mt.filter(function(sn){return parseInt(sn.competition_stage_id)===parseInt(dt)}))===null||wt===void 0||((_r=wt[0])===null||_r===void 0))?void 0:_r.id,stage_id:Ze==null?void 0:Ze.id}});case 8:Jr=Ur.sent,Jr.status===0&&(o.b.info("\u66F4\u65B0\u6210\u529F"),cr(!1),Qt()),Ur.next=16;break;case 12:return Ur.next=14,Object(ne.a)("/api/competitions/".concat(Rt,"/update_md_content.json"),{method:"post",body:{competition_module_id:bt,content:ft,md_content_id:(qr=Pt.rule_contents)===null||qr===void 0||((mr=qr.filter(function(sn){return parseInt(sn.competition_stage_id)===0}))===null||mr===void 0||((Xr=mr[0])===null||Xr===void 0))?void 0:Xr.id,stage_id:Ze==null?void 0:Ze.id}});case 14:Rr=Ur.sent,Rr.status===0&&(o.b.info("\u66F4\u65B0\u6210\u529F"),cr(!1),Qt());case 16:case"end":return Ur.stop()}},ct)})),ar.apply(this,arguments)}var Vt=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(dt,Mt,wt){return r.a.createElement("span",null,dt)}},{title:"\u9644\u4EF6",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(dt){return r.a.createElement($e.a,{title:dt},r.a.createElement("span",{title:dt},dt&&(dt==null?void 0:dt.length)>=10?(dt==null?void 0:dt.substr(0,10))+"...":dt||"--"))}},{title:"\u63D0\u4EA4\u4EBA",dataIndex:"user_name",key:"user_name",width:100,render:function(dt){return r.a.createElement("span",{title:dt},dt&&(dt==null?void 0:dt.length)>=6?(dt==null?void 0:dt.substr(0,6))+"...":dt||"--")}},{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center"},{title:"\u72B6\u6001",dataIndex:"status",key:"status",width:50,render:function(dt){return r.a.createElement("span",null,dt===1?"\u8BA1\u7B97\u4E2D":dt===2?"\u5B8C\u6210":dt===0?"\u5F85\u8BA1\u7B97":dt===3&&"\u9519\u8BEF")}},!(Ze!=null&&Ze.display_four_indicators)&&(Ze==null?void 0:Ze.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68071",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(dt){return r.a.createElement("span",null,dt||"--")}},!(Ze!=null&&Ze.display_four_indicators)&&(Ze==null?void 0:Ze.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68072",dataIndex:"data_other",key:"data_other",align:"left",render:function(dt){return(dt==null?void 0:dt.length)>0?dt==null?void 0:dt.map(function(Mt,wt){return r.a.createElement("span",null,Mt==null?void 0:Mt.name,"\uFF1A",Mt==null?void 0:Mt.value," ",r.a.createElement("br",null))}):r.a.createElement("span",null,"--")}},(Ze==null?void 0:Ze.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(dt){return r.a.createElement("span",null,dt||"--")}},(Ze==null?void 0:Ze.display_four_indicators)&&{title:"\u7F8E\u5B66\u8BC4\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(dt){var Mt;return r.a.createElement("span",null,(dt==null||((Mt=dt.find(function(wt){return(wt==null?void 0:wt.name)==="score"}))===null||Mt===void 0)?void 0:Mt.value)||"--")}},(Ze==null?void 0:Ze.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(dt){var Mt;return r.a.createElement("span",null,(dt==null||((Mt=dt.find(function(wt){return(wt==null?void 0:wt.name)==="fid"}))===null||Mt===void 0)?void 0:Mt.value)||"--")}},(Ze==null?void 0:Ze.display_four_indicators)&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(dt){var Mt;return r.a.createElement("span",null,(dt==null||((Mt=dt.find(function(wt){return(wt==null?void 0:wt.name)==="total_score"}))===null||Mt===void 0)?void 0:Mt.value)||"--")}},!(Ze!=null&&Ze.display_four_indicators)&&(Ze==null?void 0:Ze.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Car",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(dt){return r.a.createElement("span",null,dt||"--")}},!(Ze!=null&&Ze.display_four_indicators)&&(Ze==null?void 0:Ze.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Coffee",dataIndex:"data_other",key:"data_other",align:"center",render:function(dt){var Mt;return r.a.createElement("span",null,(dt==null||((Mt=dt.find(function(wt){return(wt==null?void 0:wt.name)==="Coffee"}))===null||Mt===void 0)?void 0:Mt.value)||"--")}},!(Ze!=null&&Ze.display_four_indicators)&&(Ze==null?void 0:Ze.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Easyship",dataIndex:"data_other",key:"data_other",align:"center",render:function(dt){var Mt;return r.a.createElement("span",null,(dt==null||((Mt=dt.find(function(wt){return(wt==null?void 0:wt.name)==="Easyship"}))===null||Mt===void 0)?void 0:Mt.value)||"--")}},!(Ze!=null&&Ze.display_four_indicators)&&(Ze==null?void 0:Ze.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scar",dataIndex:"data_other",key:"data_other",align:"center",render:function(dt){var Mt;return r.a.createElement("span",null,(dt==null||((Mt=dt.find(function(wt){return(wt==null?void 0:wt.name)==="Scar"}))===null||Mt===void 0)?void 0:Mt.value)||"--")}},!(Ze!=null&&Ze.display_four_indicators)&&(Ze==null?void 0:Ze.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scarf",dataIndex:"data_other",key:"data_other",align:"center",render:function(dt){var Mt;return r.a.createElement("span",null,(dt==null||((Mt=dt.find(function(wt){return(wt==null?void 0:wt.name)==="Scarf"}))===null||Mt===void 0)?void 0:Mt.value)||"--")}},!(Ze!=null&&Ze.display_four_indicators)&&(Ze==null?void 0:Ze.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"center",render:function(dt){var Mt;return r.a.createElement("span",null,(dt==null||((Mt=dt.find(function(wt){return(wt==null?void 0:wt.name)==="Total"}))===null||Mt===void 0)?void 0:Mt.value)||"--")}},{title:"\u64CD\u4F5C",dataIndex:"result_url",width:50,key:"result_url",render:function(dt){return r.a.createElement("a",{href:dt,target:"_blank",download:"\u9644\u4EF6"},"\u4E0B\u8F7D")}}].filter(function(ct){return!!ct});return r.a.createElement("div",null,(Pt==null||((tt=Pt.stages)===null||tt===void 0)?void 0:tt.length)>0?null:r.a.createElement(Me,null),(Pt==null||((pt=Pt.stages)===null||pt===void 0)?void 0:pt.length)>0&&r.a.createElement(ue.a,{animated:!0,tabBarExtraContent:Wt!=null&&Wt.admin||Wt!=null&&Wt.business||jt?r.a.createElement(S.a,{onClick:function(){cr(!0)}},"\u7F16\u8F91"):qt.enrolled&&(Ze==null?void 0:Ze.start_time)&&(Ze==null?void 0:Ze.end_time)&&r.a.createElement("span",null,"\u63D0\u4EA4\u65F6\u95F4\uFF1A",ui()(Ze==null?void 0:Ze.start_time).format("YYYY-MM-DD HH:mm:ss"),"\u81F3",ui()(Ze==null?void 0:Ze.end_time).format("YYYY-MM-DD HH:mm:ss"),r.a.createElement(S.a,{style:{marginLeft:"20px"},disabled:ui()(Ze==null?void 0:Ze.start_time).unix()>ui()(ui()().format("YYYY-MM-DD HH:mm:s")).unix()||ui()(ui()().format("YYYY-MM-DD HH:mm:s")).unix()>ui()(Ze==null?void 0:Ze.end_time).unix(),onClick:function(){Yt({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(nr==null?void 0:nr.id)||(Ze==null?void 0:Ze.id),id:tr==null?void 0:tr.id}}})}},"\u63D0\u4EA4\u7ED3\u679C")),onChange:function(dt){var Mt,wt,_r,Jr,qr;cr(!1);var mr=Pt==null||((Mt=Pt.stages)===null||Mt===void 0)?void 0:Mt.filter(function(Rr){return parseInt(dt)===parseInt(Rr==null?void 0:Rr.id)})[0],Xr=mr==null||((wt=mr.children)===null||wt===void 0)?void 0:wt[0];br(Xr),kt(mr),Tt(((_r=Pt.rule_contents)===null||_r===void 0||((Jr=_r.filter(function(Rr){return parseInt(Rr.competition_stage_id)===parseInt(mr==null?void 0:mr.id)}))===null||Jr===void 0||((qr=Jr[0])===null||qr===void 0))?void 0:qr.content)||""),vt((Xr==null?void 0:Xr.id)||dt)}},Pt&&Pt.stages.map(function(ct,dt){return r.a.createElement(Mi,{tab:ct.name,key:ct.id===null?0:ct.id},Ar===!1&&Pt&&Pt.rule_contents.map(function(Mt,wt){if(ct.id===Mt.competition_stage_id)return r.a.createElement(I.a,{key:wt,value:Mt.content===void 0||Mt.content===null?"":Mt.content});if(ct.id===null&&Mt.competition_stage_id===0)return r.a.createElement(I.a,{key:wt,value:Mt.content===void 0||Mt.content===null?"":Mt.content})}))})),(Ze==null||((Et=Ze.children)===null||Et===void 0)?void 0:Et.length)>0&&r.a.createElement(ue.a,{activeKey:(nr==null?void 0:nr.id)+"",onChange:function(dt){var Mt,wt=Ze==null||((Mt=Ze.children)===null||Mt===void 0)?void 0:Mt.filter(function(_r){return parseInt(dt)===parseInt(_r==null?void 0:_r.id)})[0];br(wt),vt(dt)}},Ze==null||((Ut=Ze.children)===null||Ut===void 0)?void 0:Ut.map(function(ct,dt){return r.a.createElement(Mi,{tab:ct.name,key:ct.id===null?0:ct.id})})),Ar&&r.a.createElement("div",null,r.a.createElement(Q.a,{defaultValue:ft,onChange:function(dt){Tt(dt)}}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(S.a,{style:{width:"90px"},type:"primary",onClick:function(){return Ht()}},"\u63D0\u4EA4"),r.a.createElement(S.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return cr(!1)}},"\u53D6\u6D88"))),((Dt=tr.competition_modules.filter(function(ct){return ct.id===bt}))===null||Dt===void 0||((Xt=Dt[0])===null||Xt===void 0)?void 0:Xt.show_leaderboard)&&r.a.createElement(J.a,{dataSource:ut==null?void 0:ut.results,columns:Vt}))}var bi=yi,Da=D("DjyN"),Vi=D("NUBc"),zn=ue.a.TabPane;function Gi(mt){var tt,pt,Et,Ut,Dt,Xt,Pt=mt.loading,ut=mt.ChartRules,vt=mt.ItemData,bt=mt.getCharts,tr=mt.Selectkey,Qt=mt.HeaderDetail,Wt=mt.getChartRules,jt=mt.userinfo,Yt=mt.Editable,qt=mt.dispatch,et=mt.StaffDetail,vr=Object(a.useState)(!1),Ar=Object(s.a)(vr,2),cr=Ar[0],ht=Ar[1],_t=Object(a.useState)(""),ft=Object(s.a)(_t,2),Tt=ft[0],zt=ft[1],rr=Object(a.useState)(!0),Kt=Object(s.a)(rr,2),yr=Kt[0],kr=Kt[1],sr=Object(a.useState)(),Ze=Object(s.a)(sr,2),kt=Ze[0],Zr=Ze[1],Vr=Object(a.useState)(),nr=Object(s.a)(Vr,2),br=nr[0],Tr=nr[1],Rt=Object(x.i)(),Ht=Rt.identifier,ar=Object(a.useState)({page:1,limit:10,sort:"desc"}),Vt=Object(s.a)(ar,2),ct=Vt[0],dt=Vt[1];Object(a.useEffect)(function(){var wt;yr&&ut!==null&&ut!==void 0&&(wt=ut.stages)!==null&&wt!==void 0&&wt[0]&&Mt()},[ut==null||((tt=ut.stages)===null||tt===void 0)?void 0:tt[0]]);var Mt=function(){var wt=Object(n.a)(l.a.mark(function _r(){var Jr,qr,mr,Xr,Rr,on;return l.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return Rr=ut==null||((Jr=ut.stages)===null||Jr===void 0)?void 0:Jr[0],Zr(Rr),on=ut==null||((qr=ut.stages)===null||qr===void 0||((mr=qr[0])===null||mr===void 0||((Xr=mr.children)===null||Xr===void 0)))?void 0:Xr[0],Tr(on),ct.id=(on==null?void 0:on.id)||(Rr==null?void 0:Rr.id),dt(Object(P.a)({},ct)),sn.next=7,bt(Object(P.a)(Object(P.a)({},ct),{},{stage_id:ct.id}));case 7:case"end":return sn.stop()}},_r)}));return function(){return wt.apply(this,arguments)}}();return r.a.createElement("div",null,(ut==null||((pt=ut.stages)===null||pt===void 0)?void 0:pt.length)>0?null:r.a.createElement(Me,null),(ut==null||((Et=ut.stages)===null||Et===void 0)?void 0:Et.length)>0&&r.a.createElement(ue.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var wt=Object(n.a)(l.a.mark(function _r(Jr){var qr,mr,Xr,Rr,on,Ur,sn;return l.a.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return ht(!1),Ur=ut==null||((qr=ut.stages)===null||qr===void 0)?void 0:qr.filter(function(We){return parseInt(Jr)===parseInt(We==null?void 0:We.id)})[0],sn=Ur==null||((mr=Ur.children)===null||mr===void 0)?void 0:mr[0],Tr(sn),Zr(Ur),zt(((Xr=ut.rule_contents)===null||Xr===void 0||((Rr=Xr.filter(function(We){return parseInt(We.competition_stage_id)===parseInt(Ur==null?void 0:Ur.id)}))===null||Rr===void 0||((on=Rr[0])===null||on===void 0))?void 0:on.content)||""),ct.page=1,ct.limit=10,ct.id=(sn==null?void 0:sn.id)||Jr,dt(Object(P.a)({},ct)),ke.next=9,bt(Object(P.a)({},ct));case 9:case"end":return ke.stop()}},_r)}));return function(_r){return wt.apply(this,arguments)}}()},ut&&ut.stages.map(function(wt,_r){return r.a.createElement(zn,{tab:wt.name,key:wt.id===null?0:wt.id})})),(kt==null||((Ut=kt.children)===null||Ut===void 0)?void 0:Ut.length)>0&&r.a.createElement(ue.a,{activeKey:(br==null?void 0:br.id)+"",onChange:function(){var wt=Object(n.a)(l.a.mark(function _r(Jr){var qr,mr;return l.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:return mr=kt==null||((qr=kt.children)===null||qr===void 0)?void 0:qr.filter(function(on){return parseInt(Jr)===parseInt(on==null?void 0:on.id)})[0],Tr(mr),ct.page=1,ct.limit=10,ct.id=Jr,dt(Object(P.a)({},ct)),Rr.next=5,bt(Object(P.a)({},ct));case 5:case"end":return Rr.stop()}},_r)}));return function(_r){return wt.apply(this,arguments)}}()},kt==null||((Dt=kt.children)===null||Dt===void 0)?void 0:Dt.map(function(wt,_r){return r.a.createElement(zn,{tab:wt.name,key:wt.id===null?0:wt.id})})),r.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),r.a.createElement("div",{style:{padding:"20px 30px"}},r.a.createElement("span",{style:{cursor:"pointer",marginRight:20},onClick:function(){ct.page=1,ct.sort=ct.sort==="desc"?"asc":"desc",dt(Object(P.a)({},ct)),bt(Object(P.a)({},ct))}},"\u6309\u63D0\u4EA4\u65F6\u95F4",ct.sort==="asc"?"\u6B63":"\u5012","\u5E8F\u6392\u5E8F"," ",r.a.createElement("i",{className:"iconfont font14 ".concat(ct.sort==="asc"?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",r.a.createElement(U.a.Search,{onSearch:function(_r){ct.page=1,ct.search=_r,dt(Object(P.a)({},ct)),bt(Object(P.a)({},ct))},style:{width:"82%"},placeholder:"\u8F93\u5165\u4EBA\u5458/\u6218\u961F\u540D\u79F0\u8FDB\u884C\u641C\u7D22"}),r.a.createElement(t.a,{spinning:Pt},vt==null||((Xt=vt.results)===null||Xt===void 0)?void 0:Xt.map(function(wt,_r){return r.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:_r===0?14:30}},r.a.createElement("div",{style:{height:60,padding:10,display:"flex",alignItems:"center"}},r.a.createElement("img",{src:G.a.IMG_SERVER+"/images/"+(wt==null?void 0:wt.image_url),style:{width:40,height:40,borderRadius:"50%"}}),r.a.createElement("div",{style:{marginLeft:10}},r.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},wt==null?void 0:wt.user_name),r.a.createElement("span",{style:{color:"#999999",fontWeight:400,fontSize:"14px",marginLeft:60}},"\u6240\u5C5E\u6218\u961F",r.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(wt==null?void 0:wt.team_name)||"- -")),r.a.createElement("span",{style:{color:"#333333",fontWeight:400,fontSize:"14px",marginLeft:40}},"\u5B66\u6821"," ",r.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(wt==null?void 0:wt.school_name)||"- -")))),r.a.createElement("div",{style:{background:"#EEF2F8",height:40,borderRadius:"0px 0px 2px 2px",paddingLeft:60,paddingRight:40,display:"flex",alignItems:"center",justifyContent:"space-between"}},r.a.createElement("div",null,r.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u63D0\u4EA4\u65F6\u95F4\uFF1A",wt==null?void 0:wt.created_at),r.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"\u6D88\u8017\u5185\u5B58\uFF1A",(wt==null?void 0:wt.ts_mem)||"- -","MB"),r.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u4EE3\u7801\u6267\u884C\u65F6\u95F4\uFF1A",(wt==null?void 0:wt.ts_time)||"- -","\u79D2")),r.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(wt==null?void 0:wt.game_identifier),target:"_blank"},r.a.createElement("i",{className:"iconfont icon-chakandaima",style:{marginRight:4}}),r.a.createElement("span",{style:{lineHeight:"14px"}},"\u67E5\u770B\u4EE3\u7801"))))})),r.a.createElement(Vi.a,{total:vt==null?void 0:vt.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:ct.page,onChange:function(_r,Jr){ct.page=_r,dt(Object(P.a)({},ct)),bt(Object(P.a)({},ct))}})))}var _a=Gi,Ni=function(tt){var pt=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],Et=["","\u5341","\u767E","\u5343","\u4E07"];tt=parseInt(tt);var Ut=function(ut){for(var vt=ut.toString().split("").reverse(),bt="",tr=0;tr<vt.length;tr++)bt=(tr==0&&vt[tr]==0||tr>0&&vt[tr]==0&&vt[tr-1]==0?"":pt[vt[tr]]+(vt[tr]==0?Et[0]:Et[tr]))+bt;return bt},Dt=Math.floor(tt/1e4),Xt=tt%1e4;return Xt.toString().length<4&&(Xt="0"+Xt),Dt?Ut(Dt)+"\u4E07"+Ut(Xt):Ut(tt)};function ci(mt){var tt,pt=mt.item,Et=mt.index,Ut=mt.StaffDetail,Dt=Object(a.useState)(!0),Xt=Object(s.a)(Dt,2),Pt=Xt[0],ut=Xt[1],vt=Object(a.useState)(!0),bt=Object(s.a)(vt,2),tr=bt[0],Qt=bt[1],Wt=Object(a.useRef)();return r.a.createElement("div",{style:{border:"1px solid #E3EFFC",borderRadius:"2px",marginTop:20}},r.a.createElement("div",{style:{padding:10,display:"flex",position:"relative"}},r.a.createElement("img",{src:G.a.IMG_SERVER+"/"+(pt==null?void 0:pt.pic),style:{width:220,height:130,borderRadius:"4px"}}),r.a.createElement("div",{style:{marginLeft:20,width:"75%"}},r.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},r.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},"\u4EFB\u52A1",Ni(Et+1),"\uFF1A",r.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},pt==null?void 0:pt.name)),r.a.createElement("span",{style:{color:"#9096A3"}},"\u5173\u5361",r.a.createElement("span",{style:{color:"#333333",marginLeft:5}},pt==null?void 0:pt.challenges_count)," ")),r.a.createElement("div",{ref:Wt},r.a.createElement(I.a,{style:{maxHeight:Pt&&100},value:pt==null?void 0:pt.description})),r.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){ut(!Pt)}},Pt?"\u9605\u8BFB\u5168\u6587 ":"\u6536\u8D77\u5168\u6587 ",r.a.createElement("i",{className:"iconfont font14 ".concat(Pt?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),r.a.createElement("div",{style:{marginTop:14,maxHeight:tr&&58,overflow:"hidden"}},pt==null||((tt=pt.challenges)===null||tt===void 0)?void 0:tt.map(function(jt,Yt){return r.a.createElement("div",{style:{marginTop:Yt===0?0:12}},r.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),r.a.createElement("span",{style:{marginLeft:10}},"\u7B2C",Yt+1,"\u5173",jt==null?void 0:jt.name))})),r.a.createElement("div",{style:{position:"absolute",bottom:14,right:10,color:"#145DFF",cursor:"pointer"}},r.a.createElement("span",{onClick:function(){Qt(!tr)}},tr?"\u5C55\u5F00":"\u6536\u8D77"," ",r.a.createElement("i",{className:"iconfont font14 ".concat(tr?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(Ut==null?void 0:Ut.enrolled)&&r.a.createElement(S.a,{onClick:function(){window.open("/shixuns/".concat(pt==null?void 0:pt.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"\u5F00\u542F\u6311\u6218")))))}var oa=ci,pa=ue.a.TabPane;function sa(mt){var tt,pt,Et,Ut,Dt,Xt,Pt=mt.loading,ut=mt.ChartRules,vt=mt.ItemData,bt=mt.getCharts,tr=mt.Selectkey,Qt=mt.HeaderDetail,Wt=mt.getChartRules,jt=mt.userinfo,Yt=mt.Editable,qt=mt.dispatch,et=mt.StaffDetail,vr=Object(a.useState)(!1),Ar=Object(s.a)(vr,2),cr=Ar[0],ht=Ar[1],_t=Object(a.useState)(""),ft=Object(s.a)(_t,2),Tt=ft[0],zt=ft[1],rr=Object(a.useState)(!0),Kt=Object(s.a)(rr,2),yr=Kt[0],kr=Kt[1],sr=Object(a.useState)(),Ze=Object(s.a)(sr,2),kt=Ze[0],Zr=Ze[1],Vr=Object(a.useState)(),nr=Object(s.a)(Vr,2),br=nr[0],Tr=nr[1],Rt=Object(x.i)(),Ht=Rt.identifier,ar=Object(a.useState)({page:1,limit:10}),Vt=Object(s.a)(ar,2),ct=Vt[0],dt=Vt[1],Mt=Object(a.useState)(),wt=Object(s.a)(Mt,2),_r=wt[0],Jr=wt[1];Object(a.useEffect)(function(){var mr;yr&&ut!==null&&ut!==void 0&&(mr=ut.stages)!==null&&mr!==void 0&&mr[0]&&qr()},[ut==null||((tt=ut.stages)===null||tt===void 0)?void 0:tt[0]]);var qr=function(){var mr=Object(n.a)(l.a.mark(function Xr(){var Rr,on,Ur,sn,Hn,ke;return l.a.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return Hn=ut==null||((Rr=ut.stages)===null||Rr===void 0)?void 0:Rr[0],Zr(Hn),ke=ut==null||((on=ut.stages)===null||on===void 0||((Ur=on[0])===null||Ur===void 0||((sn=Ur.children)===null||sn===void 0)))?void 0:sn[0],Tr(ke),ct.id=(ke==null?void 0:ke.id)||(Hn==null?void 0:Hn.id),dt(Object(P.a)({},ct)),Ve.next=7,bt(Object(P.a)(Object(P.a)({},ct),{},{stage_id:ct.id}));case 7:case"end":return Ve.stop()}},Xr)}));return function(){return mr.apply(this,arguments)}}();return r.a.createElement("div",null,(ut==null||((pt=ut.stages)===null||pt===void 0)?void 0:pt.length)>0?null:r.a.createElement(Me,null),(ut==null||((Et=ut.stages)===null||Et===void 0)?void 0:Et.length)>0&&r.a.createElement(ue.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var mr=Object(n.a)(l.a.mark(function Xr(Rr){var on,Ur,sn,Hn,ke,We,Ve;return l.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:return ht(!1),We=ut==null||((on=ut.stages)===null||on===void 0)?void 0:on.filter(function(Le){return parseInt(Rr)===parseInt(Le==null?void 0:Le.id)})[0],Ve=We==null||((Ur=We.children)===null||Ur===void 0)?void 0:Ur[0],Tr(Ve),Zr(We),zt(((sn=ut.rule_contents)===null||sn===void 0||((Hn=sn.filter(function(Le){return parseInt(Le.competition_stage_id)===parseInt(We==null?void 0:We.id)}))===null||Hn===void 0||((ke=Hn[0])===null||ke===void 0))?void 0:ke.content)||""),ct.page=1,ct.limit=10,ct.id=(Ve==null?void 0:Ve.id)||Rr,dt(Object(P.a)({},ct)),_e.next=9,bt(Object(P.a)({},ct));case 9:case"end":return _e.stop()}},Xr)}));return function(Xr){return mr.apply(this,arguments)}}()},ut&&ut.stages.map(function(mr,Xr){return r.a.createElement(pa,{tab:mr.name,key:mr.id===null?0:mr.id})})),(kt==null||((Ut=kt.children)===null||Ut===void 0)?void 0:Ut.length)>0&&r.a.createElement(ue.a,{activeKey:(br==null?void 0:br.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var mr=Object(n.a)(l.a.mark(function Xr(Rr){var on,Ur;return l.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:return Ur=kt==null||((on=kt.children)===null||on===void 0)?void 0:on.filter(function(ke){return parseInt(Rr)===parseInt(ke==null?void 0:ke.id)})[0],Tr(Ur),ct.page=1,ct.limit=10,ct.id=Rr,dt(Object(P.a)({},ct)),Hn.next=5,bt(Object(P.a)({},ct));case 5:case"end":return Hn.stop()}},Xr)}));return function(Xr){return mr.apply(this,arguments)}}()},kt==null||((Dt=kt.children)===null||Dt===void 0)?void 0:Dt.map(function(mr,Xr){return r.a.createElement(pa,{tab:mr.name,key:mr.id===null?0:mr.id})})),r.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),r.a.createElement("div",{style:{padding:"20px 30px"}},r.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},r.a.createElement("span",{style:{color:"#9096A3"}},"\u4F5C\u54C1\u63D0\u4EA4\u65F6\u95F4",r.a.createElement("span",{style:{color:"#333333",marginLeft:5}},vt==null?void 0:vt.start_time,"~",vt==null?void 0:vt.end_time)),r.a.createElement("span",{style:{color:"#9096A3"}},"\u6210\u7EE9\u6765\u6E90",r.a.createElement("span",{style:{color:"#333333",marginLeft:5}},(vt==null?void 0:vt.score_source)===0?"\u7ECF\u9A8C\u503C":"\u9884\u6D4B\u51C6\u786E\u7387")," ")),r.a.createElement(t.a,{spinning:Pt},vt==null||((Xt=vt.results)===null||Xt===void 0)?void 0:Xt.map(function(mr,Xr){return r.a.createElement(oa,{StaffDetail:et,item:mr,index:Xr})})),r.a.createElement(Vi.a,{total:vt==null?void 0:vt.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:ct.page,onChange:function(Xr,Rr){ct.page=Xr,dt(Object(P.a)({},ct)),bt(Object(P.a)({},ct))}})))}var ma=sa,qi=D("UfjD"),Si=D("qHvr"),ea=function(tt){var pt,Et,Ut,Dt,Xt,Pt,ut,vt,bt=tt.globalSetting,tr=tt.loading,Qt=tt.dispatch,Wt=tt.user,jt=Object(h.a)(tt,["globalSetting","loading","dispatch","user"]),Yt=Object(a.useState)({avatar_url:""}),qt=Object(s.a)(Yt,2),et=qt[0],vr=qt[1],Ar=Object(a.useState)([]),cr=Object(s.a)(Ar,2),ht=cr[0],_t=cr[1],ft=Object(x.i)(),Tt=ft.identifier,zt=Object(a.useState)([]),rr=Object(s.a)(zt,2),Kt=rr[0],yr=rr[1],kr=Object(a.useState)(!0),sr=Object(s.a)(kr,2),Ze=sr[0],kt=sr[1],Zr=Object(a.useState)([]),Vr=Object(s.a)(Zr,2),nr=Vr[0],br=Vr[1],Tr=Object(a.useState)([]),Rt=Object(s.a)(Tr,2),Ht=Rt[0],ar=Rt[1],Vt=Object(a.useState)(!1),ct=Object(s.a)(Vt,2),dt=ct[0],Mt=ct[1],wt=Object(a.useState)(!1),_r=Object(s.a)(wt,2),Jr=_r[0],qr=_r[1],mr=Object(a.useState)(!1),Xr=Object(s.a)(mr,2),Rr=Xr[0],on=Xr[1],Ur=Object(a.useState)([]),sn=Object(s.a)(Ur,2),Hn=sn[0],ke=sn[1],We=Object(a.useState)([]),Ve=Object(s.a)(We,2),Fe=Ve[0],_e=Ve[1],Le=Object(a.useState)([]),Te=Object(s.a)(Le,2),Ne=Te[0],He=Te[1],Ke=Object(a.useState)(!1),Be=Object(s.a)(Ke,2),Ye=Be[0],ot=Be[1],xt=Object(a.useState)([]),At=Object(s.a)(xt,2),Nt=At[0],Er=At[1],Hr=Object(a.useState)(),Br=Object(s.a)(Hr,2),Gr=Br[0],Mr=Br[1],Yr=Object(a.useState)(!0),$r=Object(s.a)(Yr,2),cn=$r[0],en=$r[1],Tn=Object(a.useState)(!1),nn=Object(s.a)(Tn,2),Sr=nn[0],Dr=nn[1],Qr=Object(a.useState)(!1),ln=Object(s.a)(Qr,2),hr=ln[0],fn=ln[1],Pn=Object(a.useState)(!1),vn=Object(s.a)(Pn,2),On=vn[0],bn=vn[1],Gn=Object(a.useState)(!1),$n=Object(s.a)(Gn,2),Mn=$n[0],ni=$n[1],ji=Object(a.useState)(!1),pi=Object(s.a)(ji,2),Jn=pi[0],An=pi[1],Rn=Object(a.useState)(!0),Nn=Object(s.a)(Rn,2),kn=Nn[0],Vn=Nn[1],_i=Object(x.h)(),Xi=Object(a.useRef)(null);Object(a.useEffect)(function(){Tt&&En(),Object(St.X)("\u7ADE\u8D5B")},[Tt]);function En(){return Ai.apply(this,arguments)}function Ai(){return Ai=Object(n.a)(l.a.mark(function dr(){var fr;return l.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:return pn.t0=_t,pn.next=3,Qt({type:"competitions/getStaff",payload:{identifier:Tt}});case 3:return pn.t1=pn.sent,(0,pn.t0)(pn.t1),pn.next=7,Qt({type:"competitions/getHeader",payload:{identifier:Tt}});case 7:fr=pn.sent,vr(fr),Object(St.X)((fr==null?void 0:fr.name)||"\u7ADE\u8D5B");case 10:case"end":return pn.stop()}},dr)})),Ai.apply(this,arguments)}Object(a.useEffect)(function(){var dr;Mr(parseInt(_i==null||((dr=_i.query)===null||dr===void 0)?void 0:dr.type)===1)},[_i]),Object(a.useEffect)(function(){var dr;if((et==null||((dr=et.competition_modules)===null||dr===void 0)?void 0:dr.length)>0){var fr,Zt;if((_i==null||((fr=_i.query)===null||fr===void 0)?void 0:fr.active)==="\u8D5B\u9898\u53D1\u5E03"){var pn,er=et==null||((pn=et.competition_modules)===null||pn===void 0)?void 0:pn.find(function(ua){return ua.name==="\u8D5B\u9898\u53D1\u5E03"});if(er){Ri(er);return}}Ri(et==null||((Zt=et.competition_modules)===null||Zt===void 0)?void 0:Zt[0])}},[et]);function Ri(dr){return Sn.apply(this,arguments)}function Sn(){return Sn=Object(n.a)(l.a.mark(function dr(fr){var Zt;return l.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(He(fr.id),Ne=fr.id,br(fr),!(fr.module_type==="entrance")){er.next=9;break}return er.next=6,Qt({type:"competitions/getItem",payload:{url:fr.module_url,module_type:"entrance"}});case 6:Zt=er.sent,er.next=12;break;case 9:return er.next=11,Qt({type:"competitions/getItem",payload:{url:fr.module_url}});case 11:Zt=er.sent;case 12:Mt(!1),on(!1),ot(!1),yr(Zt),Dr(!1),fn(!1),ar(fr.module_type),fr.module_type==="chart"?(Mt(!0),kt(!1),Ba()):fr.module_type==="certificate"?(on(!0),Mt(!1),kt(!1),ga()):fr.module_type==="md_tab"?(ot(!0),kt(!1),localStorage.setItem("issee","2"),Mt(!1),on(!1),na()):fr.module_type==="md_shixun"?(Dr(!0),kt(!1),na()):fr.module_type==="entrance"?(fn(!0),kt(!1),na()):(kt(!0),localStorage.setItem("issee","1"));case 20:case"end":return er.stop()}},dr)})),Sn.apply(this,arguments)}function _n(dr,fr,Zt){return Xn.apply(this,arguments)}function Xn(){return Xn=Object(n.a)(l.a.mark(function dr(fr,Zt,pn){var er,ua;return l.a.wrap(function(Dn){for(;;)switch(Dn.prev=Dn.next){case 0:if(fr.stopPropagation(),Object(oe.e)(Qt)){Dn.next=3;break}return Dn.abrupt("return");case 3:if(!(et!=null&&et.is_authentication&&!(Wt!=null&&(er=Wt.userInfo)!==null&&er!==void 0&&er.authentication))){Dn.next=6;break}return Qt({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),Dn.abrupt("return");case 6:if(!(et!=null&&et.enroll_url)){Dn.next=9;break}return Object(St.S)(et==null?void 0:et.enroll_url),Dn.abrupt("return");case 9:if(!(pn==="ismodel")){Dn.next=23;break}if(!(Zt.member_of_course===!0)){Dn.next=14;break}Object(St.S)("/classrooms/".concat(Zt.course_id)),Dn.next=21;break;case 14:if(Zt.invite_code){Dn.next=17;break}return o.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"),Dn.abrupt("return");case 17:return Dn.next=19,Qt({type:"competitions/addApplytojoincourse",payload:{invite_code:Zt.invite_code,student:1}});case 19:ua=Dn.sent,ua.status===0&&Object(St.S)("/classrooms/".concat(Zt.course_id));case 21:Dn.next=27;break;case 23:if(!(ht.enrolled===!0)){Dn.next=26;break}return Object(St.S)(pn),Dn.abrupt("return");case 26:bn(!0);case 27:case"end":return Dn.stop()}},dr)})),Xn.apply(this,arguments)}function Ba(){return xa.apply(this,arguments)}function xa(){return xa=Object(n.a)(l.a.mark(function dr(){return l.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Zt.t0=qr,Zt.next=3,Qt({type:"competitions/ChartRules",payload:{identifier:Tt}});case 3:return Zt.t1=Zt.sent,Zt.next=6,(0,Zt.t0)(Zt.t1);case 6:case"end":return Zt.stop()}},dr)})),xa.apply(this,arguments)}function ta(dr){return ra.apply(this,arguments)}function ra(){return ra=Object(n.a)(l.a.mark(function dr(fr){var Zt;return l.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return er.next=2,Qt({type:"competitions/Charts",payload:{identifier:Tt,stage_id:fr}});case 2:Zt=er.sent,yr(Zt);case 4:case"end":return er.stop()}},dr)})),ra.apply(this,arguments)}function La(dr){return wa.apply(this,arguments)}function wa(){return wa=Object(n.a)(l.a.mark(function dr(fr){var Zt;return l.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return en(!0),er.next=3,Qt({type:"competitions/Results",payload:Object(P.a)({identifier:Tt,stage_id:fr==null?void 0:fr.id},fr)});case 3:Zt=er.sent,yr(Zt),en(!1);case 6:case"end":return er.stop()}},dr)})),wa.apply(this,arguments)}function ka(dr){return Ha.apply(this,arguments)}function Ha(){return Ha=Object(n.a)(l.a.mark(function dr(fr){var Zt;return l.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return en(!0),er.next=3,Qt({type:"competitions/Results",payload:Object(P.a)({identifier:Tt,stage_id:fr==null?void 0:fr.id,module_type:"entrance"},fr)});case 3:Zt=er.sent,yr(Zt),en(!1);case 6:case"end":return er.stop()}},dr)})),Ha.apply(this,arguments)}function Xa(dr){return Pa.apply(this,arguments)}function Pa(){return Pa=Object(n.a)(l.a.mark(function dr(fr){var Zt;return l.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return er.next=2,Qt({type:"competitions/Results",payload:{identifier:Tt,stage_id:fr}});case 2:if(Zt=er.sent,!(localStorage.getItem("issee")==="1")){er.next=5;break}return er.abrupt("return");case 5:yr(Zt);case 6:case"end":return er.stop()}},dr)})),Pa.apply(this,arguments)}function na(){return Ta.apply(this,arguments)}function Ta(){return Ta=Object(n.a)(l.a.mark(function dr(){return l.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Zt.t0=Er,Zt.next=3,Qt({type:"competitions/TabResults",payload:{identifier:Tt,competition_module_id:Ne}});case 3:Zt.t1=Zt.sent,(0,Zt.t0)(Zt.t1);case 5:case"end":return Zt.stop()}},dr)})),Ta.apply(this,arguments)}function ga(){return ia.apply(this,arguments)}function ia(){return ia=Object(n.a)(l.a.mark(function dr(){var fr,Zt;return l.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return er.next=2,Qt({type:"competitions/Prize",payload:{identifier:Tt,user_id:Wt==null||((fr=Wt.userInfo)===null||fr===void 0)?void 0:fr.user_id}});case 2:Zt=er.sent,ke(Zt);case 4:case"end":return er.stop()}},dr)})),ia.apply(this,arguments)}function co(){return va.apply(this,arguments)}function va(){return va=Object(n.a)(l.a.mark(function dr(){var fr,Zt;return l.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return er.next=2,Qt({type:"competitions/Accounts",payload:{id:Wt==null||((fr=Wt.userInfo)===null||fr===void 0)?void 0:fr.user_id}});case 2:Zt=er.sent,_e(Zt);case 4:case"end":return er.stop()}},dr)})),va.apply(this,arguments)}function Sa(dr){return aa.apply(this,arguments)}function aa(){return aa=Object(n.a)(l.a.mark(function dr(fr){var Zt;return l.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(kn){er.next=2;break}return er.abrupt("return");case 2:if(Vn(!1),!la()){er.next=5;break}return er.abrupt("return");case 5:return er.next=7,Qt({type:"competitions/AddTeam",payload:{identifier:Tt,name:fr}});case 7:Zt=er.sent,Zt&&Zt.status===0?(o.b.info("\u521B\u5EFA\u6218\u961F\u6210\u529F"),En(),ni(!1)):Vn(!0);case 9:case"end":return er.stop()}},dr)})),aa.apply(this,arguments)}function la(){var dr,fr;if(Wt!=null&&(dr=Wt.userInfo)!==null&&dr!==void 0&&dr.is_teacher){var Zt;if(ht!=null&&(Zt=ht.teacher_staff)!==null&&Zt!==void 0&&Zt.mutiple_limited&&(ht!=null&&ht.enrolled))return o.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Vn(!0),!0}else{var pn;if(ht!=null&&(pn=ht.member_staff)!==null&&pn!==void 0&&pn.mutiple_limited&&(ht!=null&&ht.enrolled))return o.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Vn(!0),!0}if(ht!=null&&ht.enroll_ended)return o.b.info("\u62A5\u540D\u5DF2\u622A\u6B62\uFF0C\u65E0\u9700\u62A5\u540D"),Vn(!0),!0;if(Wt!=null&&(fr=Wt.userInfo)!==null&&fr!==void 0&&fr.is_teacher){if(!ht.teacher_staff)return o.b.info("\u5DF2\u7981\u6B62\u8001\u5E08\u62A5\u540D"),Vn(!0),!0}else if(!(ht!=null&&ht.member_staff))return o.b.info("\u5DF2\u7981\u6B62\u5B66\u751F\u62A5\u540D"),Vn(!0),!0}function Fi(dr){return Yi.apply(this,arguments)}function Yi(){return Yi=Object(n.a)(l.a.mark(function dr(fr){var Zt;return l.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(kn){er.next=2;break}return er.abrupt("return");case 2:if(!la()){er.next=4;break}return er.abrupt("return");case 4:return Vn(!1),er.next=7,Qt({type:"competitions/JoinTeam",payload:{identifier:Tt,invite_code:fr}});case 7:Zt=er.sent,Zt&&Zt.status===0?(o.b.info("\u52A0\u5165\u6218\u961F\u6210\u529F"),An(!1),Vn(!0),En()):Vn(!0);case 9:case"end":return er.stop()}},dr)})),Yi.apply(this,arguments)}return r.a.createElement("div",{className:"edu-container minH500"},r.a.createElement(i.a,{className:"mt10",separator:">"},r.a.createElement(i.a.Item,null,r.a.createElement(y.a,{to:"/competitions/index"},"\u5728\u7EBF\u7ADE\u8D5B")),r.a.createElement(i.a.Item,null,et.name,et.sub_title?"-"+et.sub_title:null)),r.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},r.a.createElement(t.a,{spinning:tr.effects["competitions/getHeader"]},r.a.createElement("div",{style:{height:"355px",width:"800px"}},(et==null?void 0:et.avatar_url)&&(et==null?void 0:et.avatar_url)!==null&&r.a.createElement("img",{style:{height:"355px",width:"800px"},src:G.a.IMG_SERVER+"/"+(et==null?void 0:et.avatar_url)}),!(et!=null&&et.avatar_url)&&(et==null?void 0:et.avatar_url)==null&&r.a.createElement("img",{style:{height:"355px",width:"800px"},src:G.a.IMG_SERVER+"/images/educoder/competitions/mainbanner.jpg"}))),r.a.createElement("div",{style:{marginLeft:"20px",width:"400px"}},r.a.createElement("p",{className:"".concat(O.a.titlesize)},et.name,et.sub_title?"-"+et.sub_title:null),r.a.createElement("p",{style:{display:"flex",justifyContent:"space-between",marginRight:18}},r.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},r.a.createElement("span",null,"\u5956\u91D1"),et!=null&&et.bonus?r.a.createElement("span",{style:{fontSize:"24px"}},"\xA5",parseInt(et&&et.bonus).toLocaleString()):r.a.createElement("span",{style:{fontSize:"24px"}},"\u6682\u65E0")),r.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},r.a.createElement("span",null,"\u6D4F\u89C8"),r.a.createElement("span",{style:{fontSize:"24px"}},parseInt(et&&et.visits_count).toLocaleString())),r.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},r.a.createElement("span",null,"\u62A5\u540D"),r.a.createElement("span",{style:{fontSize:"24px"}},parseInt(et&&et.member_count).toLocaleString()))),r.a.createElement("p",{className:O.a.timesize,style:{marginTop:30}},r.a.createElement("span",{style:{color:"#9b9b9b",marginTop:"30px"}},"\u7ADE\u8D5B\u65F6\u95F4\uFF1A"),et.start_time,"~",et.end_time),r.a.createElement("p",{className:O.a.timesize},r.a.createElement("span",{style:{color:"#9b9b9b"}},"\u62A5\u540D\u622A\u6B62\uFF1A"),et.enroll_end_time),et.competition_status==="ended"?r.a.createElement("p",{className:O.a.timesize},r.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u5DF2\u7ED3\u675F"):null,et.competition_status==="nearly_published"?r.a.createElement("p",{className:O.a.timesize},r.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u672A\u53D1\u5E03"):null,et.competition_status==="progressing"?r.a.createElement("p",{className:O.a.timesize},r.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u8FDB\u884C\u4E2D"):null,r.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},(et==null?void 0:et.mode)<=2&&ht.enrolled&&r.a.createElement(S.a,{onClick:function(fr){if((et==null?void 0:et.mode)===1){var Zt;Ri((Zt=et.competition_modules)===null||Zt===void 0?void 0:Zt.find(function(pn){return pn.module_type==="entrance"}))}else _n(fr,et,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:(et==null?void 0:et.mode)===2||(et==null?void 0:et.mode)===1&&((pt=et.competition_modules)===null||pt===void 0||((Et=pt.filter(function(dr){return dr.module_type==="entrance"}))===null||Et===void 0)?void 0:Et.length)>0?"":"none"},className:O.a.buttonsize},(et==null?void 0:et.mode)===1&&"\u8D5B\u9898\u5165\u53E3",(et==null?void 0:et.mode)===2&&"\u8FDB\u5165\u8BFE\u5802"),et.competition_status==="ended"?r.a.createElement(S.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u5DF2\u7ED3\u675F"):null,et.competition_status==="nearly_published"?r.a.createElement(S.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u672A\u53D1\u5E03"):null,et.competition_status!=="nearly_published"&&et.enroll_end&&et.competition_status!=="ended"?r.a.createElement(S.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u62A5\u540D\u622A\u6B62"):null,et.competition_status==="progressing"&&et.enroll_end!=!0?r.a.createElement(S.a,{type:"primary",disabled:ht.enrolled&&!et.need_attachment,className:O.a.buttonsize,onClick:function(fr){if(ht.enrolled&&et.need_attachment){var Zt;(Zt=Xi.current)===null||Zt===void 0||Zt.handleVisible();return}_n(fr,et,et.mode===2?"ismodel":et.personal?"personal":"/competitions/index/".concat(et.identifier,"/enroll"))}},ht.enrolled?et.need_attachment?"\u4E0A\u4F20\u4F5C\u54C1":"\u5DF2\u62A5\u540D":et!=null&&et.enroll_url?"\u524D\u5F80\u5927\u8D5B\u5B98\u7F51\u62A5\u540D":"\u7ACB\u5373\u62A5\u540D"):null),Wt.userInfo.real_name!="\u6E38\u5BA2"&&!(et!=null&&et.enroll_url)&&r.a.createElement("span",{onClick:function(fr){return _n(fr,et,et.mode===2?"ismodel":et.personal?"personal":"/competitions/index/".concat(et.identifier,"/enroll"))},className:O.a.myteam},Object(li.v)()?"\u53C2\u8D5B\u6218\u961F>>":"\u6211\u7684\u6218\u961F>>"))),r.a.createElement("div",{className:O.a.bootmdetail},r.a.createElement("div",{className:O.a.flex1},r.a.createElement(g.a,{selectedKeys:["".concat(Ne)]},et&&et.competition_modules&&et.competition_modules.map(function(dr,fr){if(dr.module_type!="enroll")return r.a.createElement(g.a.Item,{className:O.a.menuItem,onClick:function(){if(dr!=null&&dr.is_authentication){if(!Object(oe.e)(Qt))return;o.b.info("\u52A0\u5165\u6218\u961F\u624D\u80FD\u67E5\u770B");return}Ri(dr)},key:dr.id},dr.name)}))),r.a.createElement("div",{className:O.a.flex6,style:{padding:(Sr||hr)&&0}},Rr?r.a.createElement(Zi,{dispatch:Qt,userid:Wt==null||((Ut=Wt.userInfo)===null||Ut===void 0)?void 0:Ut.user_id,Prize:Hn,Accounts:Fe,getAccounts:co}):null,dt?r.a.createElement(ve,{HeaderDetail:et,userinfo:Wt.userInfo,Editable:et==null||((Dt=et.permission)===null||Dt===void 0)?void 0:Dt.editable,getCharts:ta,getChartRules:Ba,Selectkey:Ne,ChartRules:Jr,ItemData:Kt}):null,Ze?r.a.createElement(X,{ref:Xi,StaffDetail:ht,HeaderDetail:et,userinfo:Wt.userInfo,Editable:et==null||((Xt=et.permission)===null||Xt===void 0)?void 0:Xt.editable,ItemData:Kt,setIssee:kt,ModelType:Ht,dispatch:Qt}):null,!Ze&&!Sr&&!hr&&!dt&&!Rr&&!Ye?r.a.createElement(re,{userinfo:Wt.userInfo,ModelType:Ht,getrightdatas:Ri,dispatch:Qt,MenuItem:nr,setIssee:kt,identifier:Tt,ItemData:Kt}):null,Ye&&r.a.createElement(bi,{dispatch:Qt,StaffDetail:ht,userinfo:Wt.userInfo,HeaderDetail:et,Editable:et==null||((Pt=et.permission)===null||Pt===void 0)?void 0:Pt.editable,getCharts:Xa,getChartRules:na,Selectkey:Ne,ChartRules:Nt,ItemData:Kt}),Sr&&r.a.createElement(_a,{loading:cn,dispatch:Qt,StaffDetail:ht,userinfo:Wt.userInfo,HeaderDetail:et,Editable:et==null||((ut=et.permission)===null||ut===void 0)?void 0:ut.editable,getCharts:La,getChartRules:na,Selectkey:Ne,ChartRules:Nt,ItemData:Kt}),hr&&r.a.createElement(ma,{loading:cn,dispatch:Qt,StaffDetail:ht,userinfo:Wt.userInfo,HeaderDetail:et,Editable:et==null||((vt=et.permission)===null||vt===void 0)?void 0:vt.editable,getCharts:ka,getChartRules:na,Selectkey:Ne,ChartRules:Nt,ItemData:Kt}))),r.a.createElement(b.a,null),r.a.createElement(Y,{getResults:Xa}),r.a.createElement(C.a,{visible:Gr,footer:null,width:720,title:"\u63D0\u793A",centered:!0,onCancel:function(){return Mr(!1)}},r.a.createElement("div",{className:O.a.modal},r.a.createElement("div",null,"\u534E\u4E3A\u6A21\u578B\u738B\u8005\u6311\u6218\u8D5B\u9EC4\u91D1\u8D5B\u6B63\u5F0F\u5F00\u542F\u5566"),r.a.createElement("div",null,"\u672C\u8D5B\u6BB5\u603B\u5956\u91D1\u9AD8\u8FBE",r.a.createElement("span",{style:{color:"#FF8C29"}},"300,000"),"\u5143"),r.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"),r.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"),r.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"),r.a.createElement("div",null,"\u5FC3\u52A8\u5427\uFF0C\u90A3\u5C31\u5FEB\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u62A5\u540D\u53C2\u8D5B"),r.a.createElement(S.a,{type:"primary",onClick:function(){return Object(St.S)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"\u524D\u5F80\u62A5\u540D\u53C2\u8D5B"))),r.a.createElement(C.a,{title:"\u9009\u62E9\u53C2\u8D5B\u65B9\u5F0F",visible:On,onCancel:function(){bn(!1)},footer:!1},r.a.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},r.a.createElement(S.a,{type:"primary",style:{height:40},onClick:function(){An(!0),bn(!1)}},"\u52A0\u5165\u6218\u961F\u53C2\u8D5B"),r.a.createElement(S.a,{style:{height:40},onClick:function(){ni(!0),bn(!1)}},"\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B"))),Jn?r.a.createElement(qi.a,{isjoin:Jn,setJoin:An,JoinTeams:Fi}):null,Mn?r.a.createElement(Si.a,{isAddmodle:Mn,setIsAdd:ni,createTeam:Sa}):null)},Ea=q.default=Object(p.a)(function(mt){var tt=mt.loading,pt=mt.globalSetting,Et=mt.user;return{globalSetting:pt,loading:tt,user:Et}})(ea)},GRuw:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("lPiR"))})(this,function(P){return function(){var v=P,C=v.lib,N=C.WordArray,g=v.algo,m=g.SHA256,S=g.SHA224=m.extend({_doReset:function(){this._hash=new N.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var _=m._doFinalize.call(this);return _.sigBytes-=4,_}});v.SHA224=m._createHelper(S),v.HmacSHA224=m._createHmacHelper(S)}(),P.SHA224})},GfqC:function(W,q,D){"use strict";var P=D("q1tI"),v=D.n(P),C=D("TSYQ"),N=D.n(C);function g(H,U){var I="cannot "+H.method+" "+H.action+" "+U.status+"'",G=new Error(I);return G.status=U.status,G.method=H.method,G.url=H.action,G}function m(H){var U=H.responseText||H.response;if(!U)return U;try{return JSON.parse(U)}catch(I){return U}}function S(H){var U=new XMLHttpRequest;H.onProgress&&U.upload&&(U.upload.onprogress=function(oe){oe.total>0&&(oe.percent=oe.loaded/oe.total*100),H.onProgress(oe)});var I=new FormData;H.data&&Object.keys(H.data).forEach(function(ne){var oe=H.data[ne];if(Array.isArray(oe)){oe.forEach(function(de){I.append(ne+"[]",de)});return}I.append(ne,H.data[ne])}),H.file instanceof Blob?I.append(H.filename,H.file,H.file.name):I.append(H.filename,H.file),U.onerror=function(oe){H.onError(oe)},U.onload=function(){return U.status<200||U.status>=300?H.onError(g(H,U),m(U)):H.onSuccess(m(U),U)},U.open(H.method,H.action,!0),H.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var G=H.headers||{};return G["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(G).forEach(function(ne){G[ne]!==null&&U.setRequestHeader(ne,G[ne])}),U.send(I),{abort:function(){U.abort()}}}var _=+new Date,t=0;function d(){return"rc-upload-"+_+"-"+ ++t}function i(H,U){return H.indexOf(U,H.length-U.length)!==-1}var c=function(H,U){if(H&&U){var I=Array.isArray(U)?U:U.split(","),G=H.name||"",ne=H.type||"",oe=ne.replace(/\/.*$/,"");return I.some(function(de){var Oe=de.trim();return Oe.charAt(0)==="."?i(G.toLowerCase(),Oe.toLowerCase()):/\/\*$/.test(Oe)?oe===Oe.replace(/\/.*$/,""):ne===Oe})}return!0};function o(H,U){var I=H.createReader(),G=[];function ne(){I.readEntries(function(oe){var de=Array.prototype.slice.apply(oe);G=G.concat(de);var Oe=!de.length;Oe?U(G):ne()})}ne()}var n=function(U,I,G){var ne=function oe(de,Oe){Oe=Oe||"",de.isFile?de.file(function(Ae){G(Ae)&&(de.fullPath&&!Ae.webkitRelativePath&&(Object.defineProperties(Ae,{webkitRelativePath:{writable:!0}}),Ae.webkitRelativePath=de.fullPath.replace(/^\//,""),Object.defineProperties(Ae,{webkitRelativePath:{writable:!1}})),I([Ae]))}):de.isDirectory&&o(de,function(Ae){Ae.forEach(function(pe){oe(pe,""+Oe+de.name+"/")})})};U.forEach(function(oe){ne(oe.webkitGetAsEntry())})},s=n,h=Object.assign||function(H){for(var U=1;U<arguments.length;U++){var I=arguments[U];for(var G in I)Object.prototype.hasOwnProperty.call(I,G)&&(H[G]=I[G])}return H},f=function(){function H(U,I){var G=[],ne=!0,oe=!1,de=void 0;try{for(var Oe=U[Symbol.iterator](),Ae;!(ne=(Ae=Oe.next()).done)&&!(G.push(Ae.value),I&&G.length===I);ne=!0);}catch(pe){oe=!0,de=pe}finally{try{!ne&&Oe.return&&Oe.return()}finally{if(oe)throw de}}return G}return function(U,I){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return H(U,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function H(U,I){for(var G=0;G<I.length;G++){var ne=I[G];ne.enumerable=ne.enumerable||!1,ne.configurable=!0,"value"in ne&&(ne.writable=!0),Object.defineProperty(U,ne.key,ne)}}return function(U,I,G){return I&&H(U.prototype,I),G&&H(U,G),U}}();function a(H,U,I){return U in H?Object.defineProperty(H,U,{value:I,enumerable:!0,configurable:!0,writable:!0}):H[U]=I,H}function r(H,U){var I={};for(var G in H){if(U.indexOf(G)>=0)continue;if(!Object.prototype.hasOwnProperty.call(H,G))continue;I[G]=H[G]}return I}function x(H,U){if(!(H instanceof U))throw new TypeError("Cannot call a class as a function")}function y(H,U){if(!H)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:H}function p(H,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);H.prototype=Object.create(U&&U.prototype,{constructor:{value:H,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(H,U):H.__proto__=U)}var R=function(U){return Object.keys(U).reduce(function(I,G){return(G.substr(0,5)==="data-"||G.substr(0,5)==="aria-"||G==="role")&&(I[G]=U[G]),I},{})},O=function(H){p(U,H);function U(){var I,G,ne,oe;x(this,U);for(var de=arguments.length,Oe=Array(de),Ae=0;Ae<de;Ae++)Oe[Ae]=arguments[Ae];return oe=(G=(ne=y(this,(I=U.__proto__||Object.getPrototypeOf(U)).call.apply(I,[this].concat(Oe))),ne),ne.state={uid:d()},ne.reqs={},ne.onChange=function(pe){var Se=pe.target.files;ne.uploadFiles(Se),ne.reset()},ne.onClick=function(pe){var Se=ne.fileInput;if(!Se)return;var be=ne.props,se=be.children,ee=be.onClick;se&&se.type==="button"&&(Se.parentNode.focus(),Se.parentNode.querySelector("button").blur()),Se.click(),ee&&ee(pe)},ne.onKeyDown=function(pe){pe.key==="Enter"&&ne.onClick()},ne.onFileDrop=function(pe){var Se=ne.props.multiple;if(pe.preventDefault(),pe.type==="dragover")return;if(ne.props.directory)s(Array.prototype.slice.call(pe.dataTransfer.items),ne.uploadFiles,function(se){return c(se,ne.props.accept)});else{var be=Array.prototype.slice.call(pe.dataTransfer.files).filter(function(se){return c(se,ne.props.accept)});Se===!1&&(be=be.slice(0,1)),ne.uploadFiles(be)}},ne.uploadFiles=function(pe){var Se=Array.prototype.slice.call(pe);Se.map(function(be){return be.uid=d(),be}).forEach(function(be){ne.upload(be,Se)})},ne.saveFileInput=function(pe){ne.fileInput=pe},G),y(ne,oe)}return l(U,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(G,ne){var oe=this,de=this.props;if(!de.beforeUpload)return setTimeout(function(){return oe.post(G)},0);var Oe=de.beforeUpload(G,ne);Oe&&Oe.then?Oe.then(function(Ae){var pe=Object.prototype.toString.call(Ae);return pe==="[object File]"||pe==="[object Blob]"?oe.post(Ae):oe.post(G)}).catch(function(Ae){console.log(Ae)}):Oe!==!1&&setTimeout(function(){return oe.post(G)},0);return}},{key:"post",value:function(G){var ne=this;if(!this._isMounted)return;var oe=this.props,de=oe.onStart,Oe=oe.onProgress,Ae=oe.transformFile,pe=Ae===void 0?function(Se){return Se}:Ae;new Promise(function(Se){var be=oe.action;return typeof be=="function"&&(be=be(G)),Se(be)}).then(function(Se){var be=G.uid,se=oe.customRequest||S,ee=Promise.resolve(pe(G)).then(function(B){var V=oe.data;return typeof V=="function"&&(V=V(B)),Promise.all([B,V])}).catch(function(B){console.error(B)});ee.then(function(B){var V=f(B,2),X=V[0],Q=V[1],Z={action:Se,filename:oe.name,data:Q,file:X,headers:oe.headers,withCredentials:oe.withCredentials,method:oe.method||"post",onProgress:Oe?function(ie){Oe(ie,G)}:null,onSuccess:function(re,$){delete ne.reqs[be],oe.onSuccess(re,G,$)},onError:function(re,$){delete ne.reqs[be],oe.onError(re,$,G)}};de(G),ne.reqs[be]=se(Z)})})}},{key:"reset",value:function(){this.setState({uid:d()})}},{key:"abort",value:function(G){var ne=this.reqs;if(G){var oe=G;G&&G.uid&&(oe=G.uid),ne[oe]&&ne[oe].abort&&ne[oe].abort(),delete ne[oe]}else Object.keys(ne).forEach(function(de){ne[de]&&ne[de].abort&&ne[de].abort(),delete ne[de]})}},{key:"render",value:function(){var G,ne=this.props,oe=ne.component,de=ne.prefixCls,Oe=ne.className,Ae=ne.disabled,pe=ne.id,Se=ne.style,be=ne.multiple,se=ne.accept,ee=ne.children,B=ne.directory,V=ne.openFileDialogOnClick,X=ne.onMouseEnter,Q=ne.onMouseLeave,Z=r(ne,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),ie=N()((G={},a(G,de,!0),a(G,de+"-disabled",Ae),a(G,Oe,Oe),G)),re=Ae?{}:{onClick:V?this.onClick:function(){},onKeyDown:V?this.onKeyDown:function(){},onMouseEnter:X,onMouseLeave:Q,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return v.a.createElement(oe,h({},re,{className:ie,role:"button",style:Se}),v.a.createElement("input",h({},R(Z),{id:pe,type:"file",ref:this.saveFileInput,onClick:function(J){return J.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:se,directory:B?"directory":null,webkitdirectory:B?"webkitdirectory":null,multiple:be,onChange:this.onChange})),ee)}}]),U}(P.Component),b=O,E=Object.assign||function(H){for(var U=1;U<arguments.length;U++){var I=arguments[U];for(var G in I)Object.prototype.hasOwnProperty.call(I,G)&&(H[G]=I[G])}return H},w=function(){function H(U,I){for(var G=0;G<I.length;G++){var ne=I[G];ne.enumerable=ne.enumerable||!1,ne.configurable=!0,"value"in ne&&(ne.writable=!0),Object.defineProperty(U,ne.key,ne)}}return function(U,I,G){return I&&H(U.prototype,I),G&&H(U,G),U}}();function T(H,U){if(!(H instanceof U))throw new TypeError("Cannot call a class as a function")}function F(H,U){if(!H)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:H}function M(H,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);H.prototype=Object.create(U&&U.prototype,{constructor:{value:H,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(H,U):H.__proto__=U)}function L(){}var Y=function(H){M(U,H);function U(){var I,G,ne,oe;T(this,U);for(var de=arguments.length,Oe=Array(de),Ae=0;Ae<de;Ae++)Oe[Ae]=arguments[Ae];return oe=(G=(ne=F(this,(I=U.__proto__||Object.getPrototypeOf(U)).call.apply(I,[this].concat(Oe))),ne),ne.saveUploader=function(pe){ne.uploader=pe},G),F(ne,oe)}return w(U,[{key:"abort",value:function(G){this.uploader.abort(G)}},{key:"render",value:function(){return v.a.createElement(b,E({},this.props,{ref:this.saveUploader}))}}]),U}(P.Component);Y.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:L,onError:L,onSuccess:L,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var K=Y,A=q.a=K},HmJG:function(W,q,D){},IBYe:function(W,q,D){"use strict";function P(v){return null}q.a=P},Ib8C:function(W,q,D){(function(P){(function(v,C){W.exports=q=C()})(this,function(){var v=v||function(C,N){var g;if(typeof window!="undefined"&&window.crypto&&(g=window.crypto),typeof self!="undefined"&&self.crypto&&(g=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(g=globalThis.crypto),!g&&typeof window!="undefined"&&window.msCrypto&&(g=window.msCrypto),!g&&typeof P!="undefined"&&P.crypto&&(g=P.crypto),!g&&!0)try{g=D(4)}catch(a){}var m=function(){if(g){if(typeof g.getRandomValues=="function")try{return g.getRandomValues(new Uint32Array(1))[0]}catch(a){}if(typeof g.randomBytes=="function")try{return g.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(r){var x;return a.prototype=r,x=new a,a.prototype=null,x}}(),_={},t=_.lib={},d=t.Base=function(){return{extend:function(a){var r=S(this);return a&&r.mixIn(a),(!r.hasOwnProperty("init")||this.init===r.init)&&(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var r in a)a.hasOwnProperty(r)&&(this[r]=a[r]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),i=t.WordArray=d.extend({init:function(a,r){a=this.words=a||[],r!=N?this.sigBytes=r:this.sigBytes=a.length*4},toString:function(a){return(a||o).stringify(this)},concat:function(a){var r=this.words,x=a.words,y=this.sigBytes,p=a.sigBytes;if(this.clamp(),y%4)for(var R=0;R<p;R++){var O=x[R>>>2]>>>24-R%4*8&255;r[y+R>>>2]|=O<<24-(y+R)%4*8}else for(var b=0;b<p;b+=4)r[y+b>>>2]=x[b>>>2];return this.sigBytes+=p,this},clamp:function(){var a=this.words,r=this.sigBytes;a[r>>>2]&=4294967295<<32-r%4*8,a.length=C.ceil(r/4)},clone:function(){var a=d.clone.call(this);return a.words=this.words.slice(0),a},random:function(a){for(var r=[],x=0;x<a;x+=4)r.push(m());return new i.init(r,a)}}),c=_.enc={},o=c.Hex={stringify:function(a){for(var r=a.words,x=a.sigBytes,y=[],p=0;p<x;p++){var R=r[p>>>2]>>>24-p%4*8&255;y.push((R>>>4).toString(16)),y.push((R&15).toString(16))}return y.join("")},parse:function(a){for(var r=a.length,x=[],y=0;y<r;y+=2)x[y>>>3]|=parseInt(a.substr(y,2),16)<<24-y%8*4;return new i.init(x,r/2)}},n=c.Latin1={stringify:function(a){for(var r=a.words,x=a.sigBytes,y=[],p=0;p<x;p++){var R=r[p>>>2]>>>24-p%4*8&255;y.push(String.fromCharCode(R))}return y.join("")},parse:function(a){for(var r=a.length,x=[],y=0;y<r;y++)x[y>>>2]|=(a.charCodeAt(y)&255)<<24-y%4*8;return new i.init(x,r)}},s=c.Utf8={stringify:function(a){try{return decodeURIComponent(escape(n.stringify(a)))}catch(r){throw new Error("Malformed UTF-8 data")}},parse:function(a){return n.parse(unescape(encodeURIComponent(a)))}},h=t.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new i.init,this._nDataBytes=0},_append:function(a){typeof a=="string"&&(a=s.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(a){var r,x=this._data,y=x.words,p=x.sigBytes,R=this.blockSize,O=R*4,b=p/O;a?b=C.ceil(b):b=C.max((b|0)-this._minBufferSize,0);var E=b*R,w=C.min(E*4,p);if(E){for(var T=0;T<E;T+=R)this._doProcessBlock(y,T);r=y.splice(0,E),x.sigBytes-=w}return new i.init(r,w)},clone:function(){var a=d.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0}),f=t.Hasher=h.extend({cfg:d.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){a&&this._append(a);var r=this._doFinalize();return r},blockSize:512/32,_createHelper:function(a){return function(r,x){return new a.init(x).finalize(r)}},_createHmacHelper:function(a){return function(r,x){return new l.HMAC.init(a,x).finalize(r)}}}),l=_.algo={};return _}(Math);return v})}).call(this,D("IyRk"))},JYp7:function(W,q,D){"use strict";D.d(q,"a",function(){return P});var P;(function(v){function C(r){return r&&typeof r=="object"&&typeof r[Symbol.iterator]=="function"}v.is=C;const N=Object.freeze([]);function g(){return N}v.empty=g;function*m(r){yield r}v.single=m;function S(r){return r||N}v.from=S;function _(r){return!r||r[Symbol.iterator]().next().done===!0}v.isEmpty=_;function t(r){return r[Symbol.iterator]().next().value}v.first=t;function d(r,x){for(const y of r)if(x(y))return!0;return!1}v.some=d;function i(r,x){for(const y of r)if(x(y))return y;return}v.find=i;function*c(r,x){for(const y of r)x(y)&&(yield y)}v.filter=c;function*o(r,x){let y=0;for(const p of r)yield x(p,y++)}v.map=o;function*n(...r){for(const x of r)for(const y of x)yield y}v.concat=n;function*s(r){for(const x of r)for(const y of x)yield y}v.concatNested=s;function h(r,x,y){let p=y;for(const R of r)p=x(p,R);return p}v.reduce=h;function*f(r,x,y=r.length){for(x<0&&(x+=r.length),y<0?y+=r.length:y>r.length&&(y=r.length);x<y;x++)yield r[x]}v.slice=f;function l(r,x=Number.POSITIVE_INFINITY){const y=[];if(x===0)return[y,r];const p=r[Symbol.iterator]();for(let R=0;R<x;R++){const O=p.next();if(O.done)return[y,v.empty()];y.push(O.value)}return[y,{[Symbol.iterator](){return p}}]}v.consume=l;function a(r,x,y=(p,R)=>p===R){const p=r[Symbol.iterator](),R=x[Symbol.iterator]();for(;;){const O=p.next(),b=R.next();if(O.done!==b.done)return!1;if(O.done)return!0;if(!y(O.value,b.value))return!1}}v.equals=a})(P||(P={}))},K3mO:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("3y9D"),D("WYAk"))})(this,function(P){return function(){var v=P,C=v.lib,N=C.Base,g=C.WordArray,m=v.algo,S=m.MD5,_=m.EvpKDF=N.extend({cfg:N.extend({keySize:128/32,hasher:S,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,d){for(var i,c=this.cfg,o=c.hasher.create(),n=g.create(),s=n.words,h=c.keySize,f=c.iterations;s.length<h;){i&&o.update(i),i=o.update(t).finalize(d),o.reset();for(var l=1;l<f;l++)i=o.finalize(i),o.reset();n.concat(i)}return n.sigBytes=h*4,n}});v.EvpKDF=function(t,d,i){return _.create(i).compute(t,d)}}(),P.EvpKDF})},KXlV:function(W,q,D){W.exports=D.p+"static/job.65c6034f.png"},KeDT:function(W,q,D){W.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(W,q,D){"use strict";D.d(q,"a",function(){return p}),D.d(q,"c",function(){return b});var P=D("0Owb"),v=D("miYZ"),C=D("tsqr"),N=D("oBTY"),g=D("tJVT"),m=D("PpiC"),S=D("k1fw"),_=D("9og8"),t=D("DZo9"),d=D("8z0m"),i=D("WmNS"),c=D.n(i),o=D("q1tI"),n=D.n(o),s=D("ErOA"),h=D("NFKh"),f=D.n(h),l=D("7Cbv"),a=D("9kvl"),r=D("mxV5"),x=D.n(r),y=d.a.Dragger,p=function(T){var F="bf3c199c2470cb477d907b1e0917c17b",M="5183666c72eec9e4",L=f.a.enc.Utf8.parse(F),Y=f.a.enc.Utf8.parse(M),K=f.a.AES.decrypt(T,L,{iv:Y,mode:f.a.mode.CBC});return K.toString(f.a.enc.Utf8)},R,O=function(){var w=Object(_.a)(c.a.mark(function T(F){var M,L,Y,K,A,H,U,I,G,ne,oe;return c.a.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return U=F.identifier,I=F.oldFilename,G=F.newFilename,Oe.next=3,Object(s.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 3:return ne=Oe.sent,ne.data=JSON.parse(p(ne.data)),oe=new x.a({endpoint:ne==null||((M=ne.data)===null||M===void 0)?void 0:M.end_point,region:ne==null||((L=ne.data)===null||L===void 0)?void 0:L.region,accessKeyId:ne==null||((Y=ne.data)===null||Y===void 0)?void 0:Y.access_key_id,accessKeySecret:ne==null||((K=ne.data)===null||K===void 0)?void 0:K.access_key_secret,bucket:ne==null||((A=ne.data)===null||A===void 0)?void 0:A.bucket,stsToken:ne==null||((H=ne.data)===null||H===void 0)?void 0:H.security_token}),Oe.abrupt("return",new Promise(function(Ae,pe){console.log(11111,"".concat(U,"/").concat(I),"".concat(U,"/").concat(G),ne.data),oe.copy("/".concat(U,"/").concat(I),"/".concat(U,"/").concat(G)).then(function(Se){console.log("\u62F7\u8D1D\u6210\u529F",Se)}).catch(function(Se){console.log(Se)})}));case 7:case"end":return Oe.stop()}},T)}));return function(F){return w.apply(this,arguments)}}(),b=function(){var w=Object(_.a)(c.a.mark(function T(F,M,L){var Y,K,A,H,U,I,G,ne,oe,de;return c.a.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return M.file_name=F.name,Ae.next=3,Object(s.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return G=Ae.sent,console.log("decrypt(res.data):",p(G.data)),G.data=JSON.parse(p(G.data)),ne=F.name.split("."),ne.pop(),oe=M.realFileName?ne:Object(l.a)(),de=new x.a({endpoint:G==null||((Y=G.data)===null||Y===void 0)?void 0:Y.end_point,region:G==null||((K=G.data)===null||K===void 0)?void 0:K.region,accessKeyId:G==null||((A=G.data)===null||A===void 0)?void 0:A.access_key_id,accessKeySecret:G==null||((H=G.data)===null||H===void 0)?void 0:H.access_key_secret,bucket:G==null||((U=G.data)===null||U===void 0)?void 0:U.bucket,stsToken:G==null||((I=G.data)===null||I===void 0)?void 0:I.security_token}),Ae.abrupt("return",new Promise(function(pe,Se){var be;de.multipartUpload("".concat(oe),new Blob([F],{type:F.type}),Object(S.a)(Object(S.a)({timeout:200*1e3,partSize:102400},L),{},{callback:{url:G==null||((be=G.data)===null||be===void 0)?void 0:be.callback_url,host:G==null?void 0:G.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(s.e)(M)}})).then(function(se){var ee;F.response=(ee=se.data)===null||ee===void 0?void 0:ee.data,pe(se==null?void 0:se.data)}).catch(function(se){Se(se),console.log("err:",se)})}));case 11:case"end":return Ae.stop()}},T)}));return function(F,M,L){return w.apply(this,arguments)}}(),E=function(T){var F=T.user,M=T.cancelUpload,L=Object(m.a)(T,["user","cancelUpload"]),Y=Object(o.useState)([]),K=Object(g.a)(Y,2),A=K[0],H=K[1],U=Object(o.useState)(),I=Object(g.a)(U,2),G=I[0],ne=I[1],oe={onRemove:function(Ae){H(Object(N.a)(A.filter(function(pe){return pe.name!==Ae.name}))),L.onChange(A.filter(function(pe){return pe.name!==Ae.name}))},disabled:L.disabled,multiple:!0,fileList:A==null?void 0:A.map(function(Oe){return Oe.file}),customRequest:function(){},beforeUpload:function(){var Oe=Object(_.a)(c.a.mark(function pe(Se){var be;return c.a.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(be=L.maxSize||1024*1024*1024*1,!A.filter(function(B){return B.name===Se.name}).length){ee.next=4;break}return C.b.info("".concat(Se.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),ee.abrupt("return");case 4:if(!((Se==null?void 0:Se.size)>be)){ee.next=7;break}return C.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(be/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ee.abrupt("return",!1);case 7:return A.push({name:Se.name,file:Se}),H(Object(N.a)(A)),L.onChange(A),ee.abrupt("return",!1);case 11:case"end":return ee.stop()}},pe)}));function Ae(pe){return Oe.apply(this,arguments)}return Ae}()},de=function(){var Oe=Object(_.a)(c.a.mark(function Ae(pe,Se){var be,se,ee,B,V,X,Q,Z,ie,re;return c.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return Se.file_name=pe.name,Q=pe.name,J.next=4,Object(s.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(Z=J.sent,Z.data=JSON.parse(p(Z.data)),!((Z==null?void 0:Z.status)!==0)){J.next=12;break}return A[A.findIndex(function(le){return le.name===Q})].status="error",A[A.findIndex(function(le){return le.name===Q})].file.status="error",L.onChange(A),C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),J.abrupt("return");case 12:return G=new x.a({endpoint:Z==null||((be=Z.data)===null||be===void 0)?void 0:be.end_point,region:Z==null||((se=Z.data)===null||se===void 0)?void 0:se.region,accessKeyId:Z==null||((ee=Z.data)===null||ee===void 0)?void 0:ee.access_key_id,accessKeySecret:Z==null||((B=Z.data)===null||B===void 0)?void 0:B.access_key_secret,bucket:Z==null||((V=Z.data)===null||V===void 0)?void 0:V.bucket,stsToken:Z==null||((X=Z.data)===null||X===void 0)?void 0:X.security_token}),console.log(pe,"file"),ne(G),ie=pe.name.split("."),ie.pop(),re=Se.realFileName?ie:Object(l.a)(),J.abrupt("return",new Promise(function(le,ue){try{var xe;G.multipartUpload("".concat(L.identifier,"/").concat(re).concat(Q.indexOf(".")>-1?"."+Q.split(".").pop():""),new Blob([pe.file],{type:pe.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Xe,$e,Je){try{console.log("\u8FDB\u5EA6",Xe,$e,Je);var rt=A.findIndex(function(it){return it.name===Q});A[rt].file.percent=Xe*100,A[rt].tempCheckpoint=$e,H(Object(N.a)(A))}catch(it){}},checkpoint:A[A.findIndex(function(Me){return Me.name===Q})].tempCheckpoint,callback:{customValue:{id:Q+""},url:Z==null||((xe=Z.data)===null||xe===void 0)?void 0:xe.callback_url,host:Z==null?void 0:Z.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(s.e)(Se)}}).then(function(Me){var Xe,$e=A.findIndex(function(Ie){return Ie.name===Q}),Je="done";if(((Xe=Me.data)===null||Xe===void 0?void 0:Xe.status)===0){var rt;pe.response=(rt=Me.data)===null||rt===void 0?void 0:rt.data;var it=A.findIndex(function(Ie){return Ie.name===Q});A[it].status="done",A[it].file.status="done"}else{var je;C.b.warn((je=Me.data)===null||je===void 0?void 0:je.message),Je="error"}A[$e].status=Je,A[$e].file.status=Je,L.onChange(A),le(Me==null?void 0:Me.data)}).catch(function(Me){A[A.findIndex(function(Xe){return Xe.name===Q})].status="error",A[A.findIndex(function(Xe){return Xe.name===Q})].file.status="error",C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),H(Object(N.a)(A)),L.onChange(A),ue(Me),console.log("err:",Me)})}catch(Me){}}));case 19:case"end":return J.stop()}},Ae)}));return function(pe,Se){return Oe.apply(this,arguments)}}();return Object(o.useEffect)(function(){A.every(function(Oe){return Oe==="done"||Oe==="error"})&&L.onComplete(A)},[A]),Object(o.useEffect)(function(){if(M){var Oe;(Oe=G)===null||Oe===void 0||Oe.cancel()}},[M]),Object(o.useEffect)(function(){L.uploading&&A.map(function(){var Oe=Object(_.a)(c.a.mark(function Ae(pe){var Se,be;return c.a.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(!((!pe.status||pe.status==="error")&&!M)){ee.next=6;break}return pe.status="uploading",pe.file.status="uploading",ee.next=5,de(pe,{login:F==null||((Se=F.userInfo)===null||Se===void 0)?void 0:Se.login,container_type:L.container_type,container_id:L.container_id,description:L.description,realFileName:L.realFileName});case 5:be=ee.sent;case 6:case"end":return ee.stop()}},Ae)}));return function(Ae){return Oe.apply(this,arguments)}}())},[L.uploading]),n.a.createElement(y,Object(P.a)({},oe,{height:L.height,className:L.className}),n.a.createElement("p",{className:"ant-upload-hint"},L.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};q.b=Object(a.a)(function(w){var T=w.loading,F=w.globalSetting,M=w.user;return{globalSetting:F,loading:T.models.competitions,user:M}})(E)},KmYQ:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("OLod"))})(this,function(P){return P.pad.ZeroPadding={pad:function(v,C){var N=C*4;v.clamp(),v.sigBytes+=N-(v.sigBytes%N||N)},unpad:function(v){for(var C=v.words,N=v.sigBytes-1,N=v.sigBytes-1;N>=0;N--)if(C[N>>>2]>>>24-N%4*8&255){v.sigBytes=N+1;break}}},P.pad.ZeroPadding})},LdHM:function(W,q,D){"use strict";D.d(q,"b",function(){return r}),D.d(q,"a",function(){return y});var P=D("1OyB"),v=D("vuIU"),C=D("Ji7U"),N=D("LK+K"),g=D("q1tI"),m=D("rePB"),S=D("Ff2n"),_=D("ODXe"),t=D("4IlW"),d=D("bX4T"),i=D("YrtM"),c=D("TSYQ"),o=D.n(c),n=D("+nKL"),s=D("8OUc"),h=function(G,ne){var oe=G.prefixCls,de=G.id,Oe=G.flattenOptions,Ae=G.childrenAsData,pe=G.values,Se=G.searchValue,be=G.multiple,se=G.defaultActiveFirstOption,ee=G.height,B=G.itemHeight,V=G.notFoundContent,X=G.open,Q=G.menuItemSelectedIcon,Z=G.virtual,ie=G.onSelect,re=G.onToggleOpen,$=G.onActiveValue,J=G.onScroll,le=G.onMouseEnter,ue="".concat(oe,"-item"),xe=Object(i.a)(function(){return Oe},[X,Oe],function(ce,fe){return fe[0]&&ce[1]!==fe[1]}),Me=g.useRef(null),Xe=function(fe){fe.preventDefault()},$e=function(fe){Me.current&&Me.current.scrollTo({index:fe})},Je=function(fe){for(var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ce=xe.length,ge=0;ge<Ce;ge+=1){var ye=(fe+ge*ve+Ce)%Ce,Re=xe[ye],De=Re.group,Pe=Re.data;if(!De&&!Pe.disabled)return ye}return-1},rt=g.useState(function(){return Je(0)}),it=Object(_.a)(rt,2),je=it[0],Ie=it[1],qe=function(fe){Ie(fe);var ve=xe[fe];if(!ve){$(null,-1);return}$(ve.data.value,fe)};g.useEffect(function(){qe(se!==!1?Je(0):-1)},[xe.length,Se]),g.useEffect(function(){var ce=setTimeout(function(){if(!be&&X&&pe.size===1){var fe=Array.from(pe)[0],ve=xe.findIndex(function(Ce){var ge=Ce.data;return ge.value===fe});qe(ve),$e(ve)}});return function(){return clearTimeout(ce)}},[X]);var st=function(fe){fe!==void 0&&ie(fe,{selected:!pe.has(fe)}),be||re(!1)};if(g.useImperativeHandle(ne,function(){return{onKeyDown:function(fe){var ve=fe.which;switch(ve){case t.a.UP:case t.a.DOWN:{var Ce=0;if(ve===t.a.UP?Ce=-1:ve===t.a.DOWN&&(Ce=1),Ce!==0){var ge=Je(je+Ce,Ce);$e(ge),qe(ge)}break}case t.a.ENTER:{var ye=xe[je];ye&&!ye.data.disabled?st(ye.data.value):st(void 0),X&&fe.preventDefault();break}case t.a.ESC:re(!1)}},onKeyUp:function(){},scrollTo:function(fe){$e(fe)}}}),xe.length===0)return g.createElement("div",{role:"listbox",id:"".concat(de,"_list"),className:"".concat(ue,"-empty"),onMouseDown:Xe},V);function Ee(ce){var fe=xe[ce];if(!fe)return null;var ve=fe.data||{},Ce=ve.value,ge=ve.label,ye=ve.children,Re=Object(d.a)(ve,!0),De=Ae?ye:ge;return fe?g.createElement("div",Object.assign({"aria-label":typeof De=="string"?De:null},Re,{key:ce,role:"option",id:"".concat(de,"_list_").concat(ce),"aria-selected":pe.has(Ce)}),Ce):null}return g.createElement(g.Fragment,null,g.createElement("div",{role:"listbox",id:"".concat(de,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ee(je-1),Ee(je),Ee(je+1)),g.createElement(n.a,{itemKey:"key",ref:Me,data:xe,height:ee,itemHeight:B,fullHeight:!1,onMouseDown:Xe,onScroll:J,virtual:Z,onMouseEnter:le},function(ce,fe){var ve,Ce=ce.group,ge=ce.groupOption,ye=ce.data,Re=ye.label,De=ye.key;if(Ce)return g.createElement("div",{className:o()(ue,"".concat(ue,"-group"))},Re!==void 0?Re:De);var Pe=ye.disabled,ze=ye.value,at=ye.title,lt=ye.children,St=ye.style,Ot=ye.className,ir=Object(S.a)(ye,["disabled","value","title","children","style","className"]),Gt=pe.has(ze),yt="".concat(ue,"-option"),Fr=o()(ue,yt,Ot,(ve={},Object(m.a)(ve,"".concat(yt,"-grouped"),ge),Object(m.a)(ve,"".concat(yt,"-active"),je===fe&&!Pe),Object(m.a)(ve,"".concat(yt,"-disabled"),Pe),Object(m.a)(ve,"".concat(yt,"-selected"),Gt),ve)),Pr=Ae?lt:Re,jr=!Q||typeof Q=="function"||Gt;return g.createElement("div",Object.assign({},ir,{"aria-selected":Gt,className:Fr,title:at,onMouseMove:function(){if(je===fe||Pe)return;qe(fe)},onClick:function(){Pe||st(ze)},style:St}),g.createElement("div",{className:"".concat(yt,"-content")},Pr||ze),g.isValidElement(Q)||Gt,jr&&g.createElement(s.a,{className:"".concat(ue,"-option-state"),customizeIcon:Q,customizeIconProps:{isSelected:Gt}},Gt?"\u2713":null))}))},f=g.forwardRef(h);f.displayName="OptionList";var l=f,a=function(){return null};a.isSelectOption=!0;var r=a,x=function(){return null};x.isSelectOptGroup=!0;var y=x,p=D("VTBJ"),R=D("Zm9Q");function O(I){var G=I.key,ne=I.props,oe=ne.children,de=ne.value,Oe=Object(S.a)(ne,["children","value"]);return Object(p.a)({key:G,value:de!==void 0?de:G,children:oe},Oe)}function b(I){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(R.a)(I).map(function(ne,oe){if(!g.isValidElement(ne)||!ne.type)return null;var de=ne.type.isSelectOptGroup,Oe=ne.key,Ae=ne.props,pe=Ae.children,Se=Object(S.a)(Ae,["children"]);return G||!de?O(ne):Object(p.a)(Object(p.a)({key:"__RC_SELECT_GRP__".concat(Oe===null?oe:Oe,"__"),label:Oe},Se),{},{options:b(pe)})}).filter(function(ne){return ne})}var E=D("2Qr1"),w=D("qNPg"),T=D("U8pU"),F=D("Kwbf"),M=D("WKfj");function L(I){var G=I.mode,ne=I.options,oe=I.children,de=I.backfill,Oe=I.allowClear,Ae=I.placeholder,pe=I.getInputElement,Se=I.showSearch,be=I.onSearch,se=I.defaultOpen,ee=I.autoFocus,B=I.labelInValue,V=I.value,X=I.inputValue,Q=I.optionLabelProp,Z=G==="multiple"||G==="tags",ie=Se!==void 0?Se:Z||G==="combobox",re=ne||b(oe);if(Object(F.a)(G!=="tags"||re.every(function(ue){return!ue.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),G==="tags"||G==="combobox"){var $=re.some(function(ue){return ue.options?ue.options.some(function(xe){return typeof("value"in xe?xe.value:xe.key)=="number"}):typeof("value"in ue?ue.value:ue.key)=="number"});Object(F.a)(!$,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(F.a)(G!=="combobox"||!Q,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(F.a)(G==="combobox"||!de,"`backfill` only works with `combobox` mode."),Object(F.a)(G==="combobox"||!pe,"`getInputElement` only work with `combobox` mode."),Object(F.b)(G!=="combobox"||!pe||!Oe||!Ae,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),be&&!ie&&G!=="combobox"&&G!=="tags"&&Object(F.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(F.b)(!se||ee,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),V!=null){var J=Object(M.d)(V);Object(F.a)(!B||J.every(function(ue){return Object(T.a)(ue)==="object"&&("key"in ue||"value"in ue)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(F.a)(!Z||Array.isArray(V),"`value` should be array when `mode` is `multiple` or `tags`")}if(oe){var le=null;Object(R.a)(oe).some(function(ue){if(!g.isValidElement(ue)||!ue.type)return!1;var xe=ue.type;if(xe.isSelectOption)return!1;if(xe.isSelectOptGroup){var Me=Object(R.a)(ue.props.children).every(function(Xe){return!g.isValidElement(Xe)||!ue.type||Xe.type.isSelectOption?!0:(le=Xe.type,!1)});return!Me}return le=xe,!0}),le&&Object(F.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(le.displayName||le.name||le,"`.")),Object(F.a)(X===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var Y=L,K=Object(w.a)({prefixCls:"rc-select",components:{optionList:l},convertChildrenToData:b,flattenOptions:E.d,getLabeledValue:E.e,filterOptions:E.b,isValueDisabled:E.g,findValueOption:E.c,warningProps:Y,fillOptionsWithMissingValue:E.a}),A=function(I){Object(C.a)(ne,I);var G=Object(N.a)(ne);function ne(){var oe;return Object(P.a)(this,ne),oe=G.apply(this,arguments),oe.selectRef=g.createRef(),oe.focus=function(){oe.selectRef.current.focus()},oe.blur=function(){oe.selectRef.current.blur()},oe}return Object(v.a)(ne,[{key:"render",value:function(){return g.createElement(K,Object.assign({ref:this.selectRef},this.props))}}]),ne}(g.Component);A.Option=r,A.OptGroup=y;var H=A,U=q.c=H},M8RZ:function(W,q,D){"use strict";D.d(q,"a",function(){return t});var P=D("fWQN"),v=D("mtLc"),C=D("yKVA"),N=D("879j"),g=D("q1tI"),m=D.n(g),S=D("i8i4"),_=D.n(S),t=function(d){Object(C.a)(c,d);var i=Object(N.a)(c);function c(o){var n;Object(P.a)(this,c),n=i.call(this,o);var s=window.document;return n.node=s.createElement("div"),s.body.appendChild(n.node),n}return Object(v.a)(c,[{key:"render",value:function(){var n=this.props.children;return Object(S.createPortal)(n,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),c}(m.a.Component)},MI8n:function(W,q,D){"use strict";D.d(q,"c",function(){return g}),D.d(q,"b",function(){return t}),D.d(q,"e",function(){return d}),D.d(q,"a",function(){return i}),D.d(q,"d",function(){return c}),D.d(q,"f",function(){return o});var P=D("/cxE"),v=D("pmY6"),C=D("24hK"),N=D("5Y4S"),g;(function(n){n.None=()=>v.a.None;function s(L){return(Y,K=null,A)=>{let H=!1,U;return U=L(I=>H?void 0:(U?U.dispose():H=!0,Y.call(K,I)),null,A),H&&U.dispose(),U}}n.once=s;function h(L,Y){return y((K,A=null,H)=>L(U=>K.call(A,Y(U)),null,H))}n.map=h;function f(L,Y){return y((K,A=null,H)=>L(U=>{Y(U),K.call(A,U)},null,H))}n.forEach=f;function l(L,Y){return y((K,A=null,H)=>L(U=>Y(U)&&K.call(A,U),null,H))}n.filter=l;function a(L){return L}n.signal=a;function r(...L){return(Y,K=null,A)=>Object(v.e)(...L.map(H=>H(U=>Y.call(K,U),null,A)))}n.any=r;function x(L,Y,K){let A=K;return h(L,H=>(A=Y(A,H),A))}n.reduce=x;function y(L){let Y;const K=new t({onFirstListenerAdd(){Y=L(K.fire,K)},onLastListenerRemove(){Y.dispose()}});return K.event}function p(L,Y,K=100,A=!1,H){let U,I,G,ne=0;const oe=new t({leakWarningThreshold:H,onFirstListenerAdd(){U=L(de=>{ne++,I=Y(I,de),A&&!G&&(oe.fire(I),I=void 0),clearTimeout(G),G=setTimeout(()=>{const Oe=I;I=void 0,G=void 0,(!A||ne>1)&&oe.fire(Oe),ne=0},K)})},onLastListenerRemove(){U.dispose()}});return oe.event}n.debounce=p;function R(L,Y=(K,A)=>K===A){let K=!0,A;return l(L,H=>{const U=K||!Y(H,A);return K=!1,A=H,U})}n.latch=R;function O(L,Y){return[n.filter(L,Y),n.filter(L,K=>!Y(K))]}n.split=O;function b(L,Y=!1,K=[]){let A=K.slice(),H=L(G=>{A?A.push(G):I.fire(G)});const U=()=>{A&&A.forEach(G=>I.fire(G)),A=null},I=new t({onFirstListenerAdd(){H||(H=L(G=>I.fire(G)))},onFirstListenerDidAdd(){A&&(Y?setTimeout(U):U())},onLastListenerRemove(){H&&H.dispose(),H=null}});return I.event}n.buffer=b;class E{constructor(L){this.event=L}map(L){return new E(h(this.event,L))}forEach(L){return new E(f(this.event,L))}filter(L){return new E(l(this.event,L))}reduce(L,Y){return new E(x(this.event,L,Y))}latch(){return new E(R(this.event))}debounce(L,Y=100,K=!1,A){return new E(p(this.event,L,Y,K,A))}on(L,Y,K){return this.event(L,Y,K)}once(L,Y,K){return s(this.event)(L,Y,K)}}function w(L){return new E(L)}n.chain=w;function T(L,Y,K=A=>A){const A=(...G)=>I.fire(K(...G)),H=()=>L.on(Y,A),U=()=>L.removeListener(Y,A),I=new t({onFirstListenerAdd:H,onLastListenerRemove:U});return I.event}n.fromNodeEventEmitter=T;function F(L,Y,K=A=>A){const A=(...G)=>I.fire(K(...G)),H=()=>L.addEventListener(Y,A),U=()=>L.removeEventListener(Y,A),I=new t({onFirstListenerAdd:H,onLastListenerRemove:U});return I.event}n.fromDOMEventEmitter=F;function M(L){return new Promise(Y=>s(L)(Y))}n.toPromise=M})(g||(g={}));class m{constructor(n){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${n}_${m._idPool++}`}start(n){this._stopWatch=new N.a(!0),this._listenerCount=n}stop(){if(this._stopWatch){const n=this._stopWatch.elapsed();this._elapsedOverall+=n,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${n.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}m._idPool=0;let S=-1;class _{constructor(n,s=Math.random().toString(18).slice(2,5)){this.customThreshold=n,this.name=s,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(n){let s=S;if(typeof this.customThreshold=="number"&&(s=this.customThreshold),s<=0||n<s)return;this._stacks||(this._stacks=new Map);const h=new Error().stack.split(`
|
|
|
`).slice(3).join(`
|
|
|
`),f=this._stacks.get(h)||0;if(this._stacks.set(h,f+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;let l,a=0;for(const[r,x]of this._stacks)(!l||a<x)&&(l=r,a=x);console.warn(`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${a}):`),console.warn(l)}return()=>{const l=this._stacks.get(h)||0;this._stacks.set(h,l-1)}}}class t{constructor(n){var s;this._disposed=!1,this._options=n,this._leakageMon=S>0?new _(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((s=this._options)===null||s===void 0?void 0:s._profName)?new m(this._options._profName):void 0}get event(){return this._event||(this._event=(n,s,h)=>{var f;this._listeners||(this._listeners=new C.a);const l=this._listeners.isEmpty();l&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(s?[n,s]:n);l&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,n,s);const r=(f=this._leakageMon)===null||f===void 0?void 0:f.check(this._listeners.size),x=Object(v.i)(()=>{if(r&&r(),!this._disposed&&(a(),this._options&&this._options.onLastListenerRemove)){const y=this._listeners&&!this._listeners.isEmpty();y||this._options.onLastListenerRemove(this)}});return h instanceof v.b?h.add(x):Array.isArray(h)&&h.push(x),x}),this._event}fire(n){var s,h;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new C.a);for(let f of this._listeners)this._deliveryQueue.push([f,n]);for((s=this._perfMon)===null||s===void 0||s.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[f,l]=this._deliveryQueue.shift();try{typeof f=="function"?f.call(void 0,l):f[0].call(f[1],l)}catch(a){Object(P.f)(a)}}(h=this._perfMon)===null||h===void 0||h.stop()}}dispose(){var n,s,h,f,l;this._disposed||(this._disposed=!0,(n=this._listeners)===null||n===void 0||n.clear(),(s=this._deliveryQueue)===null||s===void 0||s.clear(),(f=(h=this._options)===null||h===void 0?void 0:h.onLastListenerRemove)===null||f===void 0||f.call(h),(l=this._leakageMon)===null||l===void 0||l.dispose())}}class d extends t{constructor(n){super(n);this._isPaused=0,this._eventQueue=new C.a,this._mergeFn=n==null?void 0:n.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const n=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(n))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(n){this._listeners&&(this._isPaused!==0?this._eventQueue.push(n):super.fire(n))}}class i extends d{constructor(n){var s;super(n);this._delay=(s=n.delay)!==null&&s!==void 0?s:100}fire(n){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(n)}}class c{constructor(){this.buffers=[]}wrapEvent(n){return(s,h,f)=>n(l=>{const a=this.buffers[this.buffers.length-1];a?a.push(()=>s.call(h,l)):s.call(h,l)},void 0,f)}bufferEvents(n){const s=[];this.buffers.push(s);const h=n();return this.buffers.pop(),s.forEach(f=>f()),h}}class o{constructor(){this.listening=!1,this.inputEvent=g.None,this.inputEventListener=v.a.None,this.emitter=new t({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(n){this.inputEvent=n,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=n(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(W,q,D){"use strict";(function(P,v){D.d(q,"b",function(){return h}),D.d(q,"i",function(){return r}),D.d(q,"f",function(){return x}),D.d(q,"d",function(){return y}),D.d(q,"g",function(){return p}),D.d(q,"h",function(){return R}),D.d(q,"c",function(){return O}),D.d(q,"k",function(){return b}),D.d(q,"j",function(){return E}),D.d(q,"a",function(){return w}),D.d(q,"e",function(){return M});var C;const N="en";let g=!1,m=!1,S=!1,_=!1,t=!1,d=!1,i=!1,c,o=N,n,s;const h=typeof self=="object"?self:typeof P=="object"?P:{};let f;typeof h.vscode!="undefined"&&typeof h.vscode.process!="undefined"?f=h.vscode.process:typeof v!="undefined"&&(f=v);const l=typeof((C=f==null?void 0:f.versions)===null||C===void 0?void 0:C.electron)=="string"&&f.type==="renderer";if(typeof navigator=="object"&&!l)s=navigator.userAgent,g=s.indexOf("Windows")>=0,m=s.indexOf("Macintosh")>=0,i=(s.indexOf("Macintosh")>=0||s.indexOf("iPad")>=0||s.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,S=s.indexOf("Linux")>=0,d=!0,c=navigator.language,o=c;else if(typeof f=="object"){g=f.platform==="win32",m=f.platform==="darwin",S=f.platform==="linux",_=S&&!!f.env.SNAP&&!!f.env.SNAP_REVISION,c=N,o=N;const L=f.env.VSCODE_NLS_CONFIG;if(L)try{const Y=JSON.parse(L),K=Y.availableLanguages["*"];c=Y.locale,o=K||N,n=Y._translationsConfigFile}catch(Y){}t=!0}else console.error("Unable to resolve platform.");let a=0;m?a=1:g?a=3:S&&(a=2);const r=g,x=m,y=S,p=t,R=d,O=i,b=s,E=function(){if(h.setImmediate)return h.setImmediate.bind(h);if(typeof h.postMessage=="function"&&!h.importScripts){let K=[];h.addEventListener("message",H=>{if(H.data&&H.data.vscodeSetImmediateId)for(let U=0,I=K.length;U<I;U++){const G=K[U];if(G.id===H.data.vscodeSetImmediateId){K.splice(U,1),G.callback();return}}});let A=0;return H=>{const U=++A;K.push({id:U,callback:H}),h.postMessage({vscodeSetImmediateId:U},"*")}}if(typeof(f==null?void 0:f.nextTick)=="function")return f.nextTick.bind(f);const Y=Promise.resolve();return K=>Y.then(K)}(),w=m||i?2:g?1:3;let T=!0,F=!1;function M(){if(!F){F=!0;const L=new Uint8Array(2);L[0]=1,L[1]=2;const Y=new Uint16Array(L.buffer);T=Y[0]===(2<<8)+1}return T}}).call(this,D("IyRk"),D("Q2Ig"))},MlIO:function(W,q,D){(function(P,v){W.exports=q=v(D("Ib8C"))})(this,function(P){return function(v){var C=P,N=C.lib,g=N.Base,m=N.WordArray,S=C.x64={},_=S.Word=g.extend({init:function(d,i){this.high=d,this.low=i}}),t=S.WordArray=g.extend({init:function(d,i){d=this.words=d||[],i!=v?this.sigBytes=i:this.sigBytes=d.length*8},toX32:function(){for(var d=this.words,i=d.length,c=[],o=0;o<i;o++){var n=d[o];c.push(n.high),c.push(n.low)}return m.create(c,this.sigBytes)},clone:function(){for(var d=g.clone.call(this),i=d.words=this.words.slice(0),c=i.length,o=0;o<c;o++)i[o]=i[o].clone();return d}})}(),P})},N0LK:function(W,q,D){"use strict";D.d(q,"C",function(){return P}),D.d(q,"v",function(){return C}),D.d(q,"s",function(){return N}),D.d(q,"t",function(){return g}),D.d(q,"U",function(){return m}),D.d(q,"J",function(){return S}),D.d(q,"O",function(){return _}),D.d(q,"p",function(){return t}),D.d(q,"T",function(){return d}),D.d(q,"q",function(){return i}),D.d(q,"N",function(){return c}),D.d(q,"M",function(){return o}),D.d(q,"Q",function(){return n}),D.d(q,"u",function(){return s}),D.d(q,"x",function(){return h}),D.d(q,"I",function(){return f}),D.d(q,"f",function(){return l}),D.d(q,"h",function(){return a}),D.d(q,"g",function(){return r}),D.d(q,"i",function(){return x}),D.d(q,"G",function(){return y}),D.d(q,"H",function(){return p}),D.d(q,"r",function(){return R}),D.d(q,"R",function(){return O}),D.d(q,"d",function(){return b}),D.d(q,"e",function(){return E}),D.d(q,"E",function(){return w}),D.d(q,"F",function(){return T}),D.d(q,"j",function(){return F}),D.d(q,"z",function(){return M}),D.d(q,"K",function(){return Y}),D.d(q,"L",function(){return K}),D.d(q,"m",function(){return H}),D.d(q,"k",function(){return I}),D.d(q,"A",function(){return ne}),D.d(q,"a",function(){return oe}),D.d(q,"n",function(){return de}),D.d(q,"l",function(){return Oe}),D.d(q,"D",function(){return Ae}),D.d(q,"B",function(){return pe}),D.d(q,"b",function(){return Se}),D.d(q,"S",function(){return be}),D.d(q,"o",function(){return se}),D.d(q,"P",function(){return ee}),D.d(q,"w",function(){return B}),D.d(q,"c",function(){return V}),D.d(q,"y",function(){return Z});function P(J){return!J||typeof J!="string"?!0:J.trim().length===0}const v=/{(\d+)}/g;function C(J,...le){return le.length===0?J:J.replace(v,function(ue,xe){const Me=parseInt(xe,10);return isNaN(Me)||Me<0||Me>=le.length?ue:le[Me]})}function N(J){return J.replace(/[<>&]/g,function(le){switch(le){case"<":return"<";case">":return">";case"&":return"&";default:return le}})}function g(J){return J.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function m(J,le=" "){const ue=S(J,le);return _(ue,le)}function S(J,le){if(!J||!le)return J;const ue=le.length;if(ue===0||J.length===0)return J;let xe=0;for(;J.indexOf(le,xe)===xe;)xe=xe+ue;return J.substring(xe)}function _(J,le){if(!J||!le)return J;const ue=le.length,xe=J.length;if(ue===0||xe===0)return J;let Me=xe,Xe=-1;for(;!(Xe=J.lastIndexOf(le,Me-1),Xe===-1||Xe+ue!==Me);){if(Xe===0)return"";Me=Xe}return J.substring(0,Me)}function t(J){return J.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function d(J){return J.replace(/\*/g,"")}function i(J,le,ue={}){if(!J)throw new Error("Cannot create regex from empty string");le||(J=g(J)),ue.wholeWord&&(/\B/.test(J.charAt(0))||(J="\\b"+J),/\B/.test(J.charAt(J.length-1))||(J=J+"\\b"));let xe="";return ue.global&&(xe+="g"),ue.matchCase||(xe+="i"),ue.multiline&&(xe+="m"),ue.unicode&&(xe+="u"),new RegExp(J,xe)}function c(J){if(J.source==="^"||J.source==="^$"||J.source==="$"||J.source==="^\\s*$")return!1;const le=J.exec("");return!!(le&&J.lastIndex===0)}function o(J){return(J.global?"g":"")+(J.ignoreCase?"i":"")+(J.multiline?"m":"")+(J.unicode?"u":"")}function n(J){return J.split(/\r\n|\r|\n/)}function s(J){for(let le=0,ue=J.length;le<ue;le++){const xe=J.charCodeAt(le);if(xe!==32&&xe!==9)return le}return-1}function h(J,le=0,ue=J.length){for(let xe=le;xe<ue;xe++){const Me=J.charCodeAt(xe);if(Me!==32&&Me!==9)return J.substring(le,xe)}return J.substring(le,ue)}function f(J,le=J.length-1){for(let ue=le;ue>=0;ue--){const xe=J.charCodeAt(ue);if(xe!==32&&xe!==9)return ue}return-1}function l(J,le){return J<le?-1:J>le?1:0}function a(J,le,ue=0,xe=J.length,Me=0,Xe=le.length){for(;ue<xe&&Me<Xe;ue++,Me++){let rt=J.charCodeAt(ue),it=le.charCodeAt(Me);if(rt<it)return-1;if(rt>it)return 1}const $e=xe-ue,Je=Xe-Me;return $e<Je?-1:$e>Je?1:0}function r(J,le){return x(J,le,0,J.length,0,le.length)}function x(J,le,ue=0,xe=J.length,Me=0,Xe=le.length){for(;ue<xe&&Me<Xe;ue++,Me++){let rt=J.charCodeAt(ue),it=le.charCodeAt(Me);if(rt===it)continue;if(rt>=128||it>=128)return a(J.toLowerCase(),le.toLowerCase(),ue,xe,Me,Xe);y(rt)&&(rt-=32),y(it)&&(it-=32);const je=rt-it;if(je===0)continue;return je}const $e=xe-ue,Je=Xe-Me;return $e<Je?-1:$e>Je?1:0}function y(J){return J>=97&&J<=122}function p(J){return J>=65&&J<=90}function R(J,le){return J.length===le.length&&x(J,le)===0}function O(J,le){const ue=le.length;return le.length>J.length?!1:x(J,le,0,ue)===0}function b(J,le){let ue,xe=Math.min(J.length,le.length);for(ue=0;ue<xe;ue++)if(J.charCodeAt(ue)!==le.charCodeAt(ue))return ue;return xe}function E(J,le){let ue,xe=Math.min(J.length,le.length);const Me=J.length-1,Xe=le.length-1;for(ue=0;ue<xe;ue++)if(J.charCodeAt(Me-ue)!==le.charCodeAt(Xe-ue))return ue;return xe}function w(J){return 55296<=J&&J<=56319}function T(J){return 56320<=J&&J<=57343}function F(J,le){return(J-55296<<10)+(le-56320)+65536}function M(J,le,ue){const xe=J.charCodeAt(ue);if(w(xe)&&ue+1<le){const Me=J.charCodeAt(ue+1);if(T(Me))return F(xe,Me)}return xe}function L(J,le){const ue=J.charCodeAt(le-1);if(T(ue)&&le>1){const xe=J.charCodeAt(le-2);if(w(xe))return F(xe,ue)}return ue}function Y(J,le){const ue=X.getInstance(),xe=le,Me=J.length,Xe=M(J,Me,le);le+=Xe>=65536?2:1;let $e=ue.getGraphemeBreakType(Xe);for(;le<Me;){const Je=M(J,Me,le),rt=ue.getGraphemeBreakType(Je);if(V($e,rt))break;le+=Je>=65536?2:1,$e=rt}return le-xe}function K(J,le){const ue=X.getInstance(),xe=le,Me=L(J,le);le-=Me>=65536?2:1;let Xe=ue.getGraphemeBreakType(Me);for(;le>0;){const $e=L(J,le),Je=ue.getGraphemeBreakType($e);if(V(Je,Xe))break;le-=$e>=65536?2:1,Xe=Je}return xe-le}const A=/(?:[\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 H(J){return A.test(J)}const 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-\uDED6])/;function I(J){return U.test(J)}const G=/^[\t\n\r\x20-\x7E]*$/;function ne(J){return G.test(J)}const oe=/[\u2028\u2029]/;function de(J){return oe.test(J)}function Oe(J){for(let le=0,ue=J.length;le<ue;le++)if(Ae(J.charCodeAt(le)))return!0;return!1}function Ae(J){return J=+J,J>=11904&&J<=55215||J>=63744&&J<=64255||J>=65281&&J<=65374}function pe(J){return J>=127462&&J<=127487||J===8986||J===8987||J===9200||J===9203||J>=9728&&J<=10175||J===11088||J===11093||J>=127744&&J<=128591||J>=128640&&J<=128764||J>=128992&&J<=129003||J>=129280&&J<=129535||J>=129648&&J<=129750}const Se=String.fromCharCode(65279);function be(J){return!!(J&&J.length>0&&J.charCodeAt(0)===65279)}function se(J,le=!1){return J?(le&&(J=J.replace(/\\./g,"")),J.toLowerCase()!==J):!1}function ee(J){const le=90-65+1;return J=J%(2*le),J<le?String.fromCharCode(97+J):String.fromCharCode(65+J-le)}function B(J){const le=X.getInstance();return le.getGraphemeBreakType(J)}function V(J,le){return J===0?le!==5&&le!==7:J===2&&le===3?!1:J===4||J===2||J===3||(le===4||le===2||le===3)?!0:J===8&&(le===8||le===9||le===11||le===12)||((J===11||J===9)&&(le===9||le===10)||((J===12||J===10)&&le===10||(le===5||le===13||(le===7||(J===1||J===13&&le===14)))))?!1:!(J===6&&le===6)}class X{constructor(){this._data=Q()}static getInstance(){return X._INSTANCE||(X._INSTANCE=new X),X._INSTANCE}getGraphemeBreakType(J){if(J<32)return J===10?3:J===13?2:4;if(J<127)return 0;const le=this._data,ue=le.length/3;let xe=1;for(;xe<=ue;)if(J<le[3*xe])xe=2*xe;else if(J>le[3*xe+1])xe=2*xe+1;else return le[3*xe+2];return 0}}X._INSTANCE=null;function Q(){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]")}function Z(J,le){if(J===0)return 0;const ue=ie(J,le);if(ue!==void 0)return ue;const xe=L(le,J);return J-=re(xe),J}function ie(J,le){let ue=L(le,J);for(J-=re(ue);$(ue)||ue===65039||ue===8419;){if(J===0)return;ue=L(le,J),J-=re(ue)}if(!pe(ue))return;if(J>=0){const xe=L(le,J);xe===8205&&(J-=re(xe))}return J}function re(J){return J>=65536?2:1}function $(J){return 127995<=J&&J<=127999}},NFKh:function(W,q,D){(function(P,v,C){W.exports=q=v(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(P){return P})},NLgs:function(W,q,D){"use strict";D.d(q,"e",function(){return f}),D.d(q,"f",function(){return l}),D.d(q,"d",function(){return r}),D.d(q,"c",function(){return x}),D.d(q,"a",function(){return y}),D.d(q,"b",function(){return p});var P=D("miYZ"),v=D("tsqr"),C=D("9og8"),N=D("2qtc"),g=D("kLXV"),m=D("WmNS"),S=D.n(m),_=D("q1tI"),t=D.n(_),d=D("9kvl"),i=D("xKgJ"),c=D("1vsH"),o=D("RCxd"),n=D("yTi+"),s=D.n(n),h=D("m3rI"),f=function(O){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(l(O)&&a(b))},l=function(O){return Object(i.p)()?!0:(O({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},a=function(){var O,b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,E=Object(d.c)()._store.getState(),w=E.user;return(O=w.userInfo)!==null&&O!==void 0&&O.profile_completed?!0:(g.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:b?"\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(){d.d.push("/account/profile/edit")}}),!1)},r=function(){var O,b=Object(d.c)()._store.getState(),E=b.user;return(O=E.userInfo)!==null&&O!==void 0&&O.professional_certification?!0:(g.a.confirm({title:"\u63D0\u793A",centered:!0,content:t.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.S)("/account/certification")}}),!1)},x=function(){var O;if(Object(i.a)())return!0;var b=Object(d.c)()._store.getState(),E=b.user,w=b.globalSetting;return g.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:t.a.createElement("div",{className:"tc",style:{marginLeft:-38}},t.a.createElement("p",null,"\u626B\u7801\u6DFB\u52A0\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),t.a.createElement("img",{src:h.a.IMG_SERVER+(w==null||((O=w.setting)===null||O===void 0)?void 0:O.authority_qrcode_url),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1},y=function(O,b){var E;if(O)return!0;var w=Object(d.c)()._store.getState(),T=w.user,F=w.globalSetting;return g.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:t.a.createElement("div",null,t.a.createElement("p",null,b||"\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"),t.a.createElement("div",{style:{marginLeft:"110px"}},t.a.createElement("img",{src:h.a.IMG_SERVER+(F==null||((E=F.setting)===null||E===void 0)?void 0:E.authority_qrcode_url),width:200}),t.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(c.S)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1},p=function(O){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",E=Object(d.c)()._store.getState(),w=E.shixunsDetail.detail;return(w==null?void 0:w.public)===2||(w==null?void 0:w.public)===1||(w==null?void 0:w.shixun_status)===3?(g.a.info({centered:!0,icon:t.a.createElement(o.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:t.a.createElement("div",{className:"tc",style:{marginLeft:-38}},t.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},t.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(w==null?void 0:w.public)===2?"\u5DF2\u516C\u5F00":(w==null?void 0:w.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",b,"\u3002"),t.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),t.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:s.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(w==null?void 0:w.shixun_status)===2?(g.a.confirm({centered:!0,icon:t.a.createElement(o.a,null),title:"\u63D0\u793A",content:t.a.createElement("div",null,t.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",b,"\u3002"),t.a.createElement("br",null),t.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(){g.a.confirm({width:440,centered:!0,icon:t.a.createElement(o.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 F=Object(C.a)(S.a.mark(function L(){var Y;return S.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,O({type:"shixunsDetail/cancelRelease",payload:{id:w==null?void 0:w.identifier}});case 2:Y=A.sent,Y.status!==401&&(v.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),O({type:"shixunsDetail/getShixunsDetail",payload:{id:w==null?void 0:w.identifier}}),O({type:"practiceSetting/getCommonData",payload:{id:w==null?void 0:w.identifier}}));case 4:case"end":return A.stop()}},L)}));function M(){return F.apply(this,arguments)}return M}()})}}),!0):!1}},NnUe:function(W,q,D){W.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(W,q,D){"use strict";D.d(q,"a",function(){return m});var P=D("Kwbf");function v(S,_){var t=new Set;return S.forEach(function(d){_.has(d)||t.add(d)}),t}function C(S){var _=S||{},t=_.disabled,d=_.disableCheckbox,i=_.checkable;return!!(t||d)||i===!1}function N(S,_,t,d){for(var i=new Set(S),c=new Set,o=0;o<=t;o+=1){var n=_.get(o)||new Set;n.forEach(function(l){var a=l.key,r=l.node,x=l.children,y=x===void 0?[]:x;i.has(a)&&!d(r)&&y.filter(function(p){return!d(p.node)}).forEach(function(p){i.add(p.key)})})}for(var s=new Set,h=t;h>=0;h-=1){var f=_.get(h)||new Set;f.forEach(function(l){var a=l.parent,r=l.node;if(d(r)||!l.parent||s.has(l.parent.key))return;if(d(l.parent.node)){s.add(a.key);return}var x=!0,y=!1;(a.children||[]).filter(function(p){return!d(p.node)}).forEach(function(p){var R=p.key,O=i.has(R);x&&!O&&(x=!1),!y&&(O||c.has(R))&&(y=!0)}),x&&i.add(a.key),y&&c.add(a.key),s.add(a.key)})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(v(c,i))}}function g(S,_,t,d,i){for(var c=new Set(S),o=new Set(_),n=0;n<=d;n+=1){var s=t.get(n)||new Set;s.forEach(function(a){var r=a.key,x=a.node,y=a.children,p=y===void 0?[]:y;!c.has(r)&&!o.has(r)&&!i(x)&&p.filter(function(R){return!i(R.node)}).forEach(function(R){c.delete(R.key)})})}o=new Set;for(var h=new Set,f=d;f>=0;f-=1){var l=t.get(f)||new Set;l.forEach(function(a){var r=a.parent,x=a.node;if(i(x)||!a.parent||h.has(a.parent.key))return;if(i(a.parent.node)){h.add(r.key);return}var y=!0,p=!1;(r.children||[]).filter(function(R){return!i(R.node)}).forEach(function(R){var O=R.key,b=c.has(O);y&&!b&&(y=!1),!p&&(b||o.has(O))&&(p=!0)}),y||c.delete(r.key),p&&o.add(r.key),h.add(r.key)})}return{checkedKeys:Array.from(c),halfCheckedKeys:Array.from(v(o,c))}}function m(S,_,t,d){var i=[],c;d?c=d:c=C;var o=new Set(S.filter(function(f){var l=!!t[f];return l||i.push(f),l})),n=new Map,s=0;Object.keys(t).forEach(function(f){var l=t[f],a=l.level,r=n.get(a);r||(r=new Set,n.set(a,r)),r.add(l),s=Math.max(s,a)}),Object(P.a)(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map(function(f){return"'".concat(f,"'")}).join(", ")));var h;return _===!0?h=N(o,n,s,c):h=g(o,_.halfCheckedKeys,n,s,c),h}},OLod:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("K3mO"))})(this,function(P){P.lib.Cipher||function(v){var C=P,N=C.lib,g=N.Base,m=N.WordArray,S=N.BufferedBlockAlgorithm,_=C.enc,t=_.Utf8,d=_.Base64,i=C.algo,c=i.EvpKDF,o=N.Cipher=S.extend({cfg:g.extend(),createEncryptor:function(w,T){return this.create(this._ENC_XFORM_MODE,w,T)},createDecryptor:function(w,T){return this.create(this._DEC_XFORM_MODE,w,T)},init:function(w,T,F){this.cfg=this.cfg.extend(F),this._xformMode=w,this._key=T,this.reset()},reset:function(){S.reset.call(this),this._doReset()},process:function(w){return this._append(w),this._process()},finalize:function(w){w&&this._append(w);var T=this._doFinalize();return T},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function w(T){return typeof T=="string"?E:R}return function(T){return{encrypt:function(F,M,L){return w(M).encrypt(T,F,M,L)},decrypt:function(F,M,L){return w(M).decrypt(T,F,M,L)}}}}()}),n=N.StreamCipher=o.extend({_doFinalize:function(){var w=this._process(!0);return w},blockSize:1}),s=C.mode={},h=N.BlockCipherMode=g.extend({createEncryptor:function(w,T){return this.Encryptor.create(w,T)},createDecryptor:function(w,T){return this.Decryptor.create(w,T)},init:function(w,T){this._cipher=w,this._iv=T}}),f=s.CBC=function(){var w=h.extend();w.Encryptor=w.extend({processBlock:function(F,M){var L=this._cipher,Y=L.blockSize;T.call(this,F,M,Y),L.encryptBlock(F,M),this._prevBlock=F.slice(M,M+Y)}}),w.Decryptor=w.extend({processBlock:function(F,M){var L=this._cipher,Y=L.blockSize,K=F.slice(M,M+Y);L.decryptBlock(F,M),T.call(this,F,M,Y),this._prevBlock=K}});function T(F,M,L){var Y,K=this._iv;K?(Y=K,this._iv=v):Y=this._prevBlock;for(var A=0;A<L;A++)F[M+A]^=Y[A]}return w}(),l=C.pad={},a=l.Pkcs7={pad:function(w,T){for(var F=T*4,M=F-w.sigBytes%F,L=M<<24|M<<16|M<<8|M,Y=[],K=0;K<M;K+=4)Y.push(L);var A=m.create(Y,M);w.concat(A)},unpad:function(w){var T=w.words[w.sigBytes-1>>>2]&255;w.sigBytes-=T}},r=N.BlockCipher=o.extend({cfg:o.cfg.extend({mode:f,padding:a}),reset:function(){var w;o.reset.call(this);var T=this.cfg,F=T.iv,M=T.mode;this._xformMode==this._ENC_XFORM_MODE?w=M.createEncryptor:(w=M.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==w?this._mode.init(this,F&&F.words):(this._mode=w.call(M,this,F&&F.words),this._mode.__creator=w)},_doProcessBlock:function(w,T){this._mode.processBlock(w,T)},_doFinalize:function(){var w,T=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(T.pad(this._data,this.blockSize),w=this._process(!0)):(w=this._process(!0),T.unpad(w)),w},blockSize:128/32}),x=N.CipherParams=g.extend({init:function(w){this.mixIn(w)},toString:function(w){return(w||this.formatter).stringify(this)}}),y=C.format={},p=y.OpenSSL={stringify:function(w){var T,F=w.ciphertext,M=w.salt;return M?T=m.create([1398893684,1701076831]).concat(M).concat(F):T=F,T.toString(d)},parse:function(w){var T,F=d.parse(w),M=F.words;return M[0]==1398893684&&M[1]==1701076831&&(T=m.create(M.slice(2,4)),M.splice(0,4),F.sigBytes-=16),x.create({ciphertext:F,salt:T})}},R=N.SerializableCipher=g.extend({cfg:g.extend({format:p}),encrypt:function(w,T,F,M){M=this.cfg.extend(M);var L=w.createEncryptor(F,M),Y=L.finalize(T),K=L.cfg;return x.create({ciphertext:Y,key:F,iv:K.iv,algorithm:w,mode:K.mode,padding:K.padding,blockSize:w.blockSize,formatter:M.format})},decrypt:function(w,T,F,M){M=this.cfg.extend(M),T=this._parse(T,M.format);var L=w.createDecryptor(F,M).finalize(T.ciphertext);return L},_parse:function(w,T){return typeof w=="string"?T.parse(w,this):w}}),O=C.kdf={},b=O.OpenSSL={execute:function(w,T,F,M){M||(M=m.random(64/8));var L=c.create({keySize:T+F}).compute(w,M),Y=m.create(L.words.slice(T),F*4);return L.sigBytes=T*4,x.create({key:L,iv:Y,salt:M})}},E=N.PasswordBasedCipher=R.extend({cfg:R.cfg.extend({kdf:b}),encrypt:function(w,T,F,M){M=this.cfg.extend(M);var L=M.kdf.execute(F,w.keySize,w.ivSize);M.iv=L.iv;var Y=R.encrypt.call(this,w,T,L.key,M);return Y.mixIn(L),Y},decrypt:function(w,T,F,M){M=this.cfg.extend(M),T=this._parse(T,M.format);var L=M.kdf.execute(F,w.keySize,w.ivSize,T.salt);M.iv=L.iv;var Y=R.decrypt.call(this,w,T,L.key,M);return Y}})}()})},OZM5:function(W,q,D){"use strict";D.d(q,"b",function(){return d}),D.d(q,"a",function(){return i}),D.d(q,"k",function(){return c}),D.d(q,"h",function(){return o}),D.d(q,"i",function(){return n}),D.d(q,"g",function(){return s}),D.d(q,"c",function(){return h}),D.d(q,"d",function(){return f}),D.d(q,"j",function(){return r}),D.d(q,"e",function(){return x}),D.d(q,"f",function(){return y});var P=D("KQm4"),v=D("U8pU"),C=D("Ff2n"),N=D("q1tI"),g=D.n(N),m=D("Kwbf"),S=D("WaYH"),_=.25,t=2;function d(p,R){var O=p.slice(),b=O.indexOf(R);return b>=0&&O.splice(b,1),O}function i(p,R){var O=p.slice();return O.indexOf(R)===-1&&O.push(R),O}function c(p){return p.split("-")}function o(p,R){return"".concat(p,"-").concat(R)}function n(p){return p&&p.type&&p.type.isTreeNode}function s(p,R){var O=[p],b=R[p];function E(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];w.forEach(function(T){var F=T.key,M=T.children;O.push(F),E(M)})}return E(b.children),O}function h(p,R){var O=p.clientY,b=R.selectHandle.getBoundingClientRect(),E=b.top,w=b.bottom,T=b.height,F=Math.max(T*_,t);return O<=E+F?-1:O>=w-F?1:0}function f(p,R){if(!p)return;var O=R.multiple;return O?p.slice():p.length?[p[0]]:p}var l=function(R){return R};function a(p,R){if(!p)return[];var O=R||{},b=O.processProps,E=b===void 0?l:b,w=Array.isArray(p)?p:[p];return w.map(function(T){var F=T.children,M=Object(C.a)(T,["children"]),L=a(F,R);return g.a.createElement(S.a,Object.assign({},E(M)),L)})}function r(p){if(!p)return null;var R;if(Array.isArray(p))R={checkedKeys:p,halfCheckedKeys:void 0};else if(Object(v.a)(p)==="object")R={checkedKeys:p.checked||void 0,halfCheckedKeys:p.halfChecked||void 0};else return Object(m.a)(!1,"`checkedKeys` is not an array or an object"),null;return R}function x(p,R){var O=new Set;function b(E){if(O.has(E))return;var w=R[E];if(!w)return;O.add(E);var T=w.parent,F=w.node;if(F.disabled)return;T&&b(T.key)}return(p||[]).forEach(function(E){b(E)}),Object(P.a)(O)}function y(p){var R={};return Object.keys(p).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(R[O]=p[O])}),R}},Ot1p:function(W,q,D){"use strict";var P=D("2qtc"),v=D("kLXV"),C=D("rAM+"),N=D("miYZ"),g=D("tsqr"),m=D("9og8"),S=D("tJVT"),_=D("jrin"),t=D("WmNS"),d=D.n(t),i=D("q1tI"),c=D.n(i),o=D("VrN/"),n=D.n(o),s=D("bdgK"),h=D("p77/"),f=D("Bd2K"),l=D("ELLl"),a=D("19Vz"),r=D("lZu9"),x=D("+NIl"),y=D("kSUc"),p=D("9Bee"),R=function(Pe){var ze=Pe.value,at=ze===void 0?"":ze,lt=Pe.className,St=Pe.showTextOnly,Ot=Pe.showLines,ir=Pe.style,Gt=ir===void 0?{}:ir,yt=Object(i.useMemo)(function(){return""},[at]);return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{dangerouslySetInnerHTML:{__html:yt}}))},O=D("0Owb"),b=D("dejd"),E=D("C+DQ"),w=D("1vsH"),T=D("m3rI"),F=[{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 M(Pe){var ze=Pe.onActionCallback,at=Pe.title,lt=Pe.icon,St=Pe.actionName,Ot=Pe.className,ir=Ot===void 0?"":Ot,Gt=Pe.children;function yt(){ze(St)}return c.a.createElement("a",{title:at,className:ir,onClick:yt},c.a.createElement("i",{className:"md-iconfont ".concat(lt)}),Gt)}var L=function(Pe){var ze=Pe.watch,at=Pe.showNullButton,lt=Pe.onActionCallback,St=Pe.fullScreen,Ot=Pe.insertTemp,ir=Pe.hidetoolBar,Gt=Pe.uuid,yt=Pe.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(w.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(w.F)("_educoder_session"),"&key=").concat(Gt,"&api=").concat(encodeURIComponent(T.a.PROXY_SERVER)));var Fr=[].concat(F,[{title:"".concat(ze?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(ze?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return c.a.createElement("ul",{className:"markdown-toolbar-container"},!ir&&Fr.map(function(Pr,jr){return c.a.createElement("li",{key:jr},Pr.actionName?c.a.createElement(M,Object(O.a)({},Pr,{onActionCallback:lt})):c.a.createElement("span",{className:"v-line"}))}),at?c.a.createElement("li",null,c.a.createElement(M,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:lt},c.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ot&&c.a.createElement("li",null,c.a.createElement(M,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ot),onActionCallback:lt},c.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),c.a.createElement("li",{className:"btn-full-screen"},c.a.createElement(M,{icon:"".concat(St?"icon-shrink":"icon-enlarge"),title:St?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:lt})))},Y=D("M8RZ"),K=D("+L6B"),A=D("2/Rp"),H=D("y8nQ"),U=D("Vl3Y"),I=D("5NDa"),G=D("5rEg"),ne={labelCol:{span:4},wrapperCol:{span:20}},oe=function(Pe){var ze=Pe.callback,at=Pe.onCancel;function lt(St){ze(St)}return c.a.createElement(U.a,Object(O.a)({},ne,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:lt}),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(G.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(G.a,null)),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(A.a,{type:"ghost",onClick:at},"\u53D6\u6D88")))},de=D("7ahc"),Oe=D("HmJG"),Ae=D("BjJ7"),pe=U.a.useForm,Se={width:280,marginRight:10},be={labelCol:{span:5},wrapperCol:{span:19}},se=function(Pe){var ze=Pe.callback,at=Pe.onCancel,lt=pe(),St=Object(S.a)(lt,1),Ot=St[0];function ir(Fr){ze(Fr)}function Gt(Fr,Pr){if(Fr.status===-1){g.b.error(Fr.message);return}Ot.setFieldsValue({src:"/api/attachments/".concat(Fr.id),type:Pr.type})}function yt(Fr){var Pr=Fr.target.files[0];B(Pr,Gt)}return c.a.createElement(U.a,Object(O.a)({form:Ot},be,{className:"upload-image-panel",onFinish:ir}),c.a.createElement(U.a.Item,{label:"\u56FE\u7247\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\u56FE\u7247\u5730\u5740"}]},c.a.createElement(G.a,{style:Se})),c.a.createElement(ee,{onFileChange:yt}))),c.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},c.a.createElement(G.a,{style:{width:264}})),c.a.createElement(U.a.Item,{style:{textAlign:"right"}},c.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(A.a,{type:"ghost",onClick:at},"\u53D6\u6D88")))};function ee(Pe){var ze=Pe.onFileChange;return c.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",c.a.createElement("input",{type:"file",onChange:ze}))}function B(Pe,ze){if(!Pe)throw new String("\u6CA1\u6709\u6587\u4EF6");var at=new FormData;at.append("editormd-image-file",Pe),at.append("file_param_name","editormd-image-file"),at.append("byxhr","true");var lt=new window.XMLHttpRequest;lt.withCredentials=!0,lt.addEventListener("load",function(St){ze(JSON.parse(St.target.responseText),Pe)},!1),lt.addEventListener("error",function(St){console.error(St)},!1),lt.open("POST","".concat(Ae.a,"/api/attachments.json")),lt.send(at)}var V=D("giR+"),X=D("fyUT"),Q=D("7Kak"),Z=D("9yH6"),ie=Z.a.Group,re={margin:"0 8px"},$=function(Pe){var ze=Pe.callback,at=Pe.onCancel;function lt(St){ze(St)}return c.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:lt},c.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},c.a.createElement("span",{style:re},"\u5355\u5143\u683C\u6570\uFF1A"),c.a.createElement("span",{style:re},"\u884C\u6570"),c.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},c.a.createElement(X.a,null)),c.a.createElement("span",{style:re},"\u5217\u6570"),c.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},c.a.createElement(X.a,null))),c.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},c.a.createElement("span",{style:re},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),c.a.createElement(U.a.Item,{name:"align"},c.a.createElement(ie,null,c.a.createElement(Z.a,{value:"default"},c.a.createElement("i",{className:"fa fa-align-justify"})),c.a.createElement(Z.a,{value:"left"},c.a.createElement("i",{className:"fa fa-align-left"})),c.a.createElement(Z.a,{value:"center"},c.a.createElement("i",{className:"fa fa-align-center"})),c.a.createElement(Z.a,{value:"right"},c.a.createElement("i",{className:"fa fa-align-right"}))))),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(A.a,{type:"ghost",onClick:at},"\u53D6\u6D88")))},J=D("ErOA"),le=D("7Cbv"),ue="link",xe="upload-image",Me="code-block",Xe="add-table",$e="------------",Je={default:$e,left:":".concat($e),center:":".concat($e,":"),right:"".concat($e,":")},rt=D("9VGf"),it,je;function Ie(){}var qe=0,st=1e4,Ee="\u2581",ce=`
|
|
|
**\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 fe(Pe){return/^\d+$/.test(Pe)?"".concat(Pe,"px"):Pe}var ve=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ce=ve?"Cmd":"Ctrl",ge=["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"],ye=(it={},Object(_.a)(it,Ce+"-B","bold"),Object(_.a)(it,Ce+"-I","italic"),it),Re=(je={},Object(_.a)(je,ue,"\u6DFB\u52A0\u94FE\u63A5"),Object(_.a)(je,Me,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(_.a)(je,xe,"\u6DFB\u52A0\u6587\u4EF6"),Object(_.a)(je,Xe,"\u6DFB\u52A0\u8868\u683C"),je),De=q.a=function(Pe){var ze=Pe.defaultValue,at=ze===void 0?"":ze,lt=Pe.onChange,St=Pe.width,Ot=St===void 0?"100%":St,ir=Pe.height,Gt=ir===void 0?400:ir,yt=Pe.miniToolbar,Fr=yt===void 0?!1:yt,Pr=Pe.isFocus,jr=Pr===void 0?!1:Pr,un=Pe.watch,xr=Pe.insertTemp,an=Pe.mode,tn=an===void 0?"markdown":an,Ir=Pe.id,hn=Ir===void 0?"markdown-editor-id":Ir,lr=Pe.showResizeBar,Cr=lr===void 0?!1:lr,gr=Pe.noStorage,xn=gr===void 0?!1:gr,Wn=Pe.showNullButton,gn=Wn===void 0?!1:Wn,Bt=Pe.hidetoolBar,Kr=Bt===void 0?!1:Bt,rn=Pe.fullScreen,Or=rn===void 0?!1:rn,Lr=Pe.onBlur,Wr=Pe.onCMBeforeChange,Fn=Pe.onFullScreen,yn=Pe.className,Ct=yn===void 0?"":yn,ur=Pe.disablePaste,oi=ur===void 0?!1:ur,wi=Pe.placeholder,Pi=wi===void 0?"":wi,vi=Pe.values,Un=vi===void 0?"":vi,wr=Object(i.useState)(null),si=Object(S.a)(wr,2),It=si[0],Zn=si[1],Bn=Object(i.useState)(at),zi=Object(S.a)(Bn,2),Ti=zi[0],ri=zi[1],Qi=Object(i.useState)(un),Zi=Object(S.a)(Qi,2),li=Zi[0],In=Zi[1],ui=Object(i.useState)(Or),Mi=Object(S.a)(ui,2),yi=Mi[0],bi=Mi[1],Da=Object(i.useState)(""),Vi=Object(S.a)(Da,2),zn=Vi[0],Gi=Vi[1],_a=Object(i.useState)(0),Ni=Object(S.a)(_a,2),ci=Ni[0],oa=Ni[1],pa=Object(i.useState)(Gt),sa=Object(S.a)(pa,2),ma=sa[0],qi=sa[1],Si=Object(i.useState)(!1),ea=Object(S.a)(Si,2),Ea=ea[0],mt=ea[1],tt=Object(i.useRef)(Object(le.a)()),pt=Object(i.useRef)(!1),Et=Object(i.useRef)(),Ut=Object(i.useRef)(),Dt=Object(i.useRef)(),Xt=Object(i.useRef)(),Pt=Object(i.useRef)(),ut=function(){var ht=Object(m.a)(d.a.mark(function _t(){var ft,Tt;return d.a.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return rr.next=2,Object(J.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:tt.current}});case 2:Tt=rr.sent,Tt!=null&&(ft=Tt.attachments)!==null&&ft!==void 0&&ft.length&&(console.log("cm:",It,Ut),Tt.attachments.map(function(Kt){Kt.content_type.indexOf("image")>-1?It.replaceSelection(".concat(Kt.content_type,")")):Kt.content_type.indexOf("video")>-1?It.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Kt.content_type.indexOf("pdf")>-1?It.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Kt.id,"?type=").concat(Kt.content_type,'&disposition=inline" target="_blank">').concat(Kt.name,"</a>")):It.replaceSelection("[".concat(Kt.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Kt.id,"?type=").concat(Kt.content_type,")"))}));case 4:case"end":return rr.stop()}},_t)}));return function(){return ht.apply(this,arguments)}}();Object(i.useEffect)(function(){ri(Un),It==null||It.setValue(Un)},[Un]),Object(i.useEffect)(function(){Fn==null||Fn(yi)},[yi]),Object(i.useEffect)(function(){if(Ut.current){var ht=n.a.fromTextArea(Ut.current,{mode:tn,lineNumbers:!Fr,lineWrapping:!0,value:at,autoCloseTags:!0,autoCloseBrackets:!0});jr&&ht.focus();function _t(ft,Tt){if(oi){Tt.preventDefault();return}var zt=Tt.clipboardData;if(zt){var rr=zt.types.toString(),Kt=zt.items;if(rr==="Files"||zt.types.indexOf("Files")>-1){if(Tt.preventDefault(),tn=="stex")return;try{var yr,kr=Kt[1];((yr=Kt[0])===null||yr===void 0?void 0:yr.kind)==="file"&&(kr=Kt[0]);var sr=kr.getAsFile(),Ze=sr.name.split(".").pop();B(sr,function(kt){if(kt.id){var Zr,Vr,nr;(sr==null||((Zr=sr.type)===null||Zr===void 0)?void 0:Zr.indexOf("image"))>-1?ht.replaceSelection(".concat(kt.content_type,")")):(sr==null||((Vr=sr.type)===null||Vr===void 0)?void 0:Vr.indexOf("video"))>-1?ht.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(kt.id,'"></video>')):(sr==null||((nr=sr.type)===null||nr===void 0)?void 0:nr.indexOf("pdf"))>-1?ht.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(kt.id,"?type=").concat(sr.type,'&disposition=inline" target="_blank">').concat(sr.name,"</a>")):ge.includes(Ze)?ht.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(kt.id,'?type=office&disposition=inline" target="_blank">').concat(sr.name,"</a>")):ht.replaceSelection("[".concat(sr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(kt.id,"?type=").concat(kt.content_type,")"))}else(kt==null?void 0:kt.status)===401&&(document.location.href="/user/login")})}catch(kt){g.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return ht.on("paste",_t),ht.on("dragleave",function(ft,Tt){Dt.current.classList.remove("mouse-hover-md")}),ht.on("dragover",function(ft,Tt){Dt.current.classList.add("mouse-hover-md")}),ht.on("drop",function(ft,Tt){Dt.current.classList.add("mouse-hover-md");var zt;if(zt=Tt.dataTransfer.files,zt.length>0){Tt.preventDefault(),Tt.stopPropagation();for(var rr=function(kr){var sr=zt[kr],Ze=sr.name.split(".").pop();B(sr,function(kt){if(kt.id){var Zr,Vr,nr;(sr==null||((Zr=sr.type)===null||Zr===void 0)?void 0:Zr.indexOf("image"))>-1?ht.replaceSelection(".concat(kt.content_type,")")):(sr==null||((Vr=sr.type)===null||Vr===void 0)?void 0:Vr.indexOf("video"))>-1?ht.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(kt.id,'"></video>')):(sr==null||((nr=sr.type)===null||nr===void 0)?void 0:nr.indexOf("pdf"))>-1?ht.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(kt.id,"?type=").concat(sr.type,'&disposition=inline" target="_blank">').concat(sr.name,"</a>")):ge.includes(Ze)?ht.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(kt.id,'?type=office&disposition=inline" target="_blank">').concat(sr.name,"</a>")):ht.replaceSelection("[".concat(sr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(kt.id,"?type=").concat(kt.content_type,")"))}else(kt==null?void 0:kt.status)===401&&(document.location.href="/user/login")})},Kt=0;Kt<zt.length;Kt++)rr(Kt)}}),Zn(ht),function(){ht.off("paste",_t)}}},[]);var vt=Object(i.useCallback)(function(){if(Dt.current)try{}catch(ht){console.log(ht,"---- to set md editor body height")}},[ma,Dt,yi]);Object(i.useEffect)(function(){function ht(){var ft=new s.default(function(Tt){var zt=Object(C.a)(Tt),rr;try{for(zt.s();!(rr=zt.n()).done;){var Kt=rr.value;(Kt.target.offsetHeight>0||Kt.target.offsetWidth>0)&&(vt(),It.setSize("100%","100%"),It.refresh())}}catch(yr){zt.e(yr)}finally{zt.f()}});return ft.observe(Ut.current.parentElement),ft}if(It){var _t=ht();return function(){_t.unobserve(Ut.current.parentElement)}}},[It,vt]),Object(i.useEffect)(function(){if(It){for(var ht=[],_t=function(){var Kt=Tt[ft];zt=Object(S.a)(Kt,2);var yr=zt[0],kr=zt[1],sr=Object(_.a)({},yr,function(){bt(kr)});ht.push(sr),It.addKeyMap(sr)},ft=0,Tt=Object.entries(ye);ft<Tt.length;ft++){var zt;_t()}return Et.current=setInterval(function(){pt.current&&ut()},4e3),function(){clearInterval(Et.current);var rr=Object(C.a)(ht),Kt;try{for(rr.s();!(Kt=rr.n()).done;){var yr=Kt.value;It.removeKeyMap(yr)}}catch(kr){rr.e(kr)}finally{rr.f()}}}},[It]),Object(i.useEffect)(function(){Or!==yi&&bi(Or)},[Or]),Object(rt.a)(function(){if(!xn&&ci>0){var ht=new Date().getTime(),_t=window.sessionStorage.getItem(hn);ht>=ci+st&&(!_t||_t!==Ti)&&(window.sessionStorage.setItem(hn,Ti),mt(!0))}},st),Object(i.useEffect)(function(){In(un)},[It,un]),Object(i.useEffect)(function(){It&&(jr&&It.focus())},[It,jr]),Object(i.useEffect)(function(){if(li&&It){var ht=It.getScrollerElement();function _t(ft){var Tt=ft.target;if(Pt.current){var zt=Tt.scrollTop/Tt.scrollHeight;Pt.current.scrollTop=Pt.current.scrollHeight*zt}}return ht.addEventListener("scroll",_t),function(){ht.removeEventListener("scroll",_t)}}},[It,li]),Object(i.useEffect)(function(){if(It&&Wr){function ht(_t,ft){Wr(_t,ft)}return It.on("beforeChange",ht),function(){It.off("beforeChange",ht)}}},[It,Wr]),Object(i.useEffect)(function(){if(It&&Lr){function ht(){Lr(It.getValue())}return It.on("blur",ht),function(){It.off("blur",ht)}}},[It,Lr]),Object(i.useEffect)(function(){if(It){function ht(_t){var ft=_t.getValue();ri(ft),oa(new Date().getTime()),_t.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),lt&<(ft)}return It.on("change",ht),function(){It.off("change",ht)}}},[It,lt]),Object(i.useEffect)(function(){It&&(at==null?(It.setValue(""),ri("")):at!==It.getValue()&&(It.setValue(at),ri(at),It.setCursor(It.lineCount(),0)))},[It,at]);var bt=Object(i.useCallback)(function(ht){var _t=It.getCursor(),ft=It.getSelection(),Tt=ft.split(`
|
|
|
`);switch(ht){case"bold":return It.replaceSelection("**"+ft+"**"),ft===""&&It.setCursor(_t.line,_t.ch+2),It.focus();case"italic":return It.replaceSelection("*"+ft+"*"),ft===""&&It.setCursor(_t.line,_t.ch+1),It.focus();case"code":return It.replaceSelection("`"+ft+"`"),ft===""&&It.setCursor(_t.line,_t.ch+1),It.focus();case"inline-latex":return It.replaceSelection("`$$"+ft+"$$`"),ft===""&&It.setCursor(_t.line,_t.ch+3),It.focus();case"latex":return It.replaceSelection("```latex\n"+ft+"\n```"),It.setCursor(_t.line+1,ft.length+1),It.focus();case"line-break":return It.replaceSelection(`<br/>
|
|
|
`),It.focus();case"list-ul":return ft===""?It.replaceSelection("- "+ft):It.replaceSelection(Tt.map(function(zt){return zt===""?"":"- ".concat(zt)}).join(`
|
|
|
`)),It.focus();case"list-ol":return ft===""?It.replaceSelection("1. "+ft):It.replaceSelection(Tt.map(function(zt,rr){return zt===""?"":"".concat(rr+1,". ").concat(zt)}).join(`
|
|
|
`)),It.focus();case"add-null-ch":return ft===""&&It.setCursor(_t.line,_t.ch+1),It.replaceSelection(Ee),It.focus();case"inster-template-1":return ft===""&&It.setCursor(_t.line,_t.ch),It.replaceSelection(ce),It.focus();case"eraser":return It.setValue(""),It.focus();case"trigger-watch":return In(!li),It.focus();case"trigger-full-screen":return bi(!yi),It.focus();case ue:Gi(ue);return;case Me:Gi(Me);return;case xe:Gi(xe);return;case Xe:Gi(Xe);return;default:throw new Error}},[It,li,yi]),tr=Object(i.useCallback)(function(ht){Gi("");switch(zn){case ue:var _t=ht.title,ft=ht.link;return It.replaceSelection("[".concat(_t,"](").concat(ft,")")),It.focus();case Me:var Tt=ht.language,zt=ht.content;return It.replaceSelection(["```"+Tt,zt,"```"].join(`
|
|
|
`)),It.focus();case xe:var rr=ht.src,Kt=ht.alt;return Kt?It.replaceSelection(".concat(rr,' "').concat(Kt,'" )')):It.replaceSelection("")),It.focus();case Xe:for(var yr=ht.row,kr=ht.col,sr=ht.align,Ze=`
|
|
|
`,kt=0;kt<yr;kt++){for(var Zr=[],Vr=[],nr=0;nr<kr;nr++)kt===1&&Vr.push(Je[sr]),Zr.push(" ");kt===1&&(Ze+="| ".concat(Vr.join(" | "),` |
|
|
|
`)),Ze+="| ".concat(Zr.join(kr===1?"":" | "),` |
|
|
|
`)}return It.replaceSelection(Ze+`
|
|
|
`),It.focus();default:throw new Error}},[It,zn]),Qt=Object(i.useMemo)(function(){switch(zn){case ue:return c.a.createElement(oe,{callback:tr,onCancel:Wt});case Me:return c.a.createElement(de.b,{callback:tr,onCancel:Wt});case xe:return c.a.createElement(se,{callback:tr,onCancel:Wt});case Xe:return c.a.createElement($,{callback:tr,onCancel:Wt});default:return null}},[zn]);function Wt(){Gi("")}Object(i.useEffect)(function(){if(Xt.current){var ht=Xt.current,_t=!1,ft=0;function Tt(Kt){_t=!0,ft=Kt.pageY}function zt(){_t=!1}function rr(Kt){if(_t){var yr=Kt.pageY-ft;yr<0&&(yr=0),yr>300&&(yr=300);var kr=Gt+yr+"px";qi(kr)}}return ht.addEventListener("mousedown",Tt),document.addEventListener("mousemove",rr),document.addEventListener("mouseup",zt),function(){ht.removeEventListener("mousedown",Tt),document.removeEventListener("mousemove",rr),document.removeEventListener("mouseup",zt)}}},[It,Xt]),Object(i.useEffect)(function(){qi(Gt)},[Gt]);var jt=fe(Ot),Yt=fe(ma),qt={width:jt,height:Yt},et=Object(i.useMemo)(function(){if(ci){var ht=new Date(ci),_t=ht.getHours(),ft=ht.getMinutes(),Tt=ht.getSeconds();return _t=_t<10?"0"+_t:_t,ft=ft<10?"0"+ft:ft,Tt=Tt<10?"0"+Tt:Tt,"".concat(_t,":").concat(ft,":").concat(Tt)}return 0},[ci]);function vr(){window.sessionStorage.removeItem(hn),mt(!1),oa(0)}function Ar(){mt(!1),oa(0),It.setValue(window.sessionStorage.getItem(hn))}function cr(ht,_t){var ft=It.getValue();ft=ft.replace(ht,_t),ri(ft),It==null||It.setValue(ft)}return c.a.createElement(i.Fragment,null,c.a.createElement("div",{className:"markdown-editor-wrapper",ref:Dt},c.a.createElement("div",{className:"markdown-editor-container ".concat(Ct," ").concat(li?"on-preview":""," ").concat(Fr?"mini":""," ").concat(yi?"full-screen":""),style:qt},c.a.createElement(L,{insertTemp:xr,watch:li,fullScreen:yi,showNullButton:gn,onActionCallback:bt,hidetoolBar:Kr,uuid:tt.current,setOpenPhones:function(){pt.current=!0}}),c.a.createElement("div",{className:"markdown-editor-body"},c.a.createElement("div",{className:"codemirror-container"},c.a.createElement("textarea",{ref:Ut,placeholder:Pi})),li?c.a.createElement("div",{ref:Pt,className:"preview-container"},tn==="stex"&&c.a.createElement(R,{value:Ti}),tn!=="stex"&&c.a.createElement(p.a,{edit:!0,value:Ti,replaces:cr})):null))),Cr?c.a.createElement("a",{ref:Xt,className:"editor-resize"}):null,c.a.createElement(Y.a,null,Re[zn]?c.a.createElement(v.a,{centered:!0,title:Re[zn],visible:!0,onCancel:Wt,footer:null,className:"markdown-popup-form"},Qt):null))}},PVpz:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(P){return function(){var v=P,C=v.lib,N=C.StreamCipher,g=v.algo,m=[],S=[],_=[],t=g.RabbitLegacy=N.extend({_doReset:function(){var i=this._key.words,c=this.cfg.iv,o=this._X=[i[0],i[3]<<16|i[2]>>>16,i[1],i[0]<<16|i[3]>>>16,i[2],i[1]<<16|i[0]>>>16,i[3],i[2]<<16|i[1]>>>16],n=this._C=[i[2]<<16|i[2]>>>16,i[0]&4294901760|i[1]&65535,i[3]<<16|i[3]>>>16,i[1]&4294901760|i[2]&65535,i[0]<<16|i[0]>>>16,i[2]&4294901760|i[3]&65535,i[1]<<16|i[1]>>>16,i[3]&4294901760|i[0]&65535];this._b=0;for(var s=0;s<4;s++)d.call(this);for(var s=0;s<8;s++)n[s]^=o[s+4&7];if(c){var h=c.words,f=h[0],l=h[1],a=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,r=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,x=a>>>16|r&4294901760,y=r<<16|a&65535;n[0]^=a,n[1]^=x,n[2]^=r,n[3]^=y,n[4]^=a,n[5]^=x,n[6]^=r,n[7]^=y;for(var s=0;s<4;s++)d.call(this)}},_doProcessBlock:function(i,c){var o=this._X;d.call(this),m[0]=o[0]^o[5]>>>16^o[3]<<16,m[1]=o[2]^o[7]>>>16^o[5]<<16,m[2]=o[4]^o[1]>>>16^o[7]<<16,m[3]=o[6]^o[3]>>>16^o[1]<<16;for(var n=0;n<4;n++)m[n]=(m[n]<<8|m[n]>>>24)&16711935|(m[n]<<24|m[n]>>>8)&4278255360,i[c+n]^=m[n]},blockSize:128/32,ivSize:64/32});function d(){for(var i=this._X,c=this._C,o=0;o<8;o++)S[o]=c[o];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 o=0;o<8;o++){var n=i[o]+c[o],s=n&65535,h=n>>>16,f=((s*s>>>17)+s*h>>>15)+h*h,l=((n&4294901760)*n|0)+((n&65535)*n|0);_[o]=f^l}i[0]=_[0]+(_[7]<<16|_[7]>>>16)+(_[6]<<16|_[6]>>>16)|0,i[1]=_[1]+(_[0]<<8|_[0]>>>24)+_[7]|0,i[2]=_[2]+(_[1]<<16|_[1]>>>16)+(_[0]<<16|_[0]>>>16)|0,i[3]=_[3]+(_[2]<<8|_[2]>>>24)+_[1]|0,i[4]=_[4]+(_[3]<<16|_[3]>>>16)+(_[2]<<16|_[2]>>>16)|0,i[5]=_[5]+(_[4]<<8|_[4]>>>24)+_[3]|0,i[6]=_[6]+(_[5]<<16|_[5]>>>16)+(_[4]<<16|_[4]>>>16)|0,i[7]=_[7]+(_[6]<<8|_[6]>>>24)+_[5]|0}v.RabbitLegacy=N._createHelper(t)}(),P.RabbitLegacy})},RxwV:function(W,q,D){"use strict";var P=D("q1tI"),v=D("uciX"),C=D("2W6z"),N=D.n(C),g=D("4IlW"),m=D("uK0f"),S=D.n(m);function _(Se,be){if(Se===be)return!0;if(!Se||!be)return!1;var se=Se.length;if(be.length!==se)return!1;for(var ee=0;ee<se;ee++)if(Se[ee]!==be[ee])return!1;return!0}function t(Se){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(se){return typeof se}:t=function(se){return se&&typeof Symbol=="function"&&se.constructor===Symbol&&se!==Symbol.prototype?"symbol":typeof se},t(Se)}function d(Se,be){if(!(Se instanceof be))throw new TypeError("Cannot call a class as a function")}function i(Se,be){for(var se=0;se<be.length;se++){var ee=be[se];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(Se,ee.key,ee)}}function c(Se,be,se){return be&&i(Se.prototype,be),se&&i(Se,se),Se}function o(Se,be){if(typeof be!="function"&&be!==null)throw new TypeError("Super expression must either be null or a function");Se.prototype=Object.create(be&&be.prototype,{constructor:{value:Se,writable:!0,configurable:!0}}),be&&n(Se,be)}function n(Se,be){return n=Object.setPrototypeOf||function(ee,B){return ee.__proto__=B,ee},n(Se,be)}function s(Se){var be=l();return function(){var se=a(Se),ee;if(be){var B=a(this).constructor;ee=Reflect.construct(se,arguments,B)}else ee=se.apply(this,arguments);return h(this,ee)}}function h(Se,be){return be&&(t(be)==="object"||typeof be=="function")?be:f(Se)}function f(Se){if(Se===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Se}function l(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(Se){return!1}}function a(Se){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(se){return se.__proto__||Object.getPrototypeOf(se)},a(Se)}var r=function(){var Se=function(be){o(ee,be);var se=s(ee);function ee(){var B;return d(this,ee),B=se.apply(this,arguments),B.menuItems={},B.saveMenuItem=function(V){return function(X){B.menuItems[V]=X}},B}return c(ee,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(V){!V.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(V){var X=this.props,Q=X.fieldNames,Z=X.defaultFieldNames;return Q[V]||Z[V]}},{key:"getOption",value:function(V,X){var Q=this.props,Z=Q.prefixCls,ie=Q.expandTrigger,re=Q.expandIcon,$=Q.loadingIcon,J=this.props.onSelect.bind(this,V,X),le=this.props.onItemDoubleClick.bind(this,V,X),ue={onClick:J,onDoubleClick:le},xe="".concat(Z,"-menu-item"),Me=null,Xe=V[this.getFieldName("children")]&&V[this.getFieldName("children")].length>0;(Xe||V.isLeaf===!1)&&(xe+=" ".concat(Z,"-menu-item-expand"),V.loading||(Me=P.createElement("span",{className:"".concat(Z,"-menu-item-expand-icon")},re))),ie==="hover"&&(Xe||V.isLeaf===!1)&&(ue={onMouseEnter:this.delayOnSelect.bind(this,J),onMouseLeave:this.delayOnSelect.bind(this),onClick:J}),this.isActiveOption(V,X)&&(xe+=" ".concat(Z,"-menu-item-active"),ue.ref=this.saveMenuItem(X)),V.disabled&&(xe+=" ".concat(Z,"-menu-item-disabled"));var $e=null;V.loading&&(xe+=" ".concat(Z,"-menu-item-loading"),$e=$||null);var Je="";return"title"in V?Je=V.title:typeof V[this.getFieldName("label")]=="string"&&(Je=V[this.getFieldName("label")]),P.createElement("li",Object.assign({key:V[this.getFieldName("value")],className:xe,title:Je},ue,{role:"menuitem",onMouseDown:function(it){return it.preventDefault()}}),V[this.getFieldName("label")],Me,$e)}},{key:"getActiveOptions",value:function(V){var X=this,Q=this.props.options,Z=V||this.props.activeValue;return S()(Q,function(ie,re){return ie[X.getFieldName("value")]===Z[re]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var V=this,X=this.props.options,Q=this.getActiveOptions().map(function(Z){return Z[V.getFieldName("children")]}).filter(function(Z){return!!Z});return Q.unshift(X),Q}},{key:"delayOnSelect",value:function(V){for(var X=this,Q=arguments.length,Z=new Array(Q>1?Q-1:0),ie=1;ie<Q;ie++)Z[ie-1]=arguments[ie];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof V=="function"&&(this.delayTimer=window.setTimeout(function(){V(Z),X.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var V=this.getShowOptions().length,X=0;X<V;X++){var Q=this.menuItems[X];Q&&Q.parentElement&&(Q.parentElement.scrollTop=Q.offsetTop)}}},{key:"isActiveOption",value:function(V,X){var Q=this.props.activeValue,Z=Q===void 0?[]:Q;return Z[X]===V[this.getFieldName("value")]}},{key:"render",value:function(){var V=this,X=this.props,Q=X.prefixCls,Z=X.dropdownMenuColumnStyle;return P.createElement("div",null,this.getShowOptions().map(function(ie,re){return P.createElement("ul",{className:"".concat(Q,"-menu"),key:re,style:Z},ie.map(function($){return V.getOption($,re)}))}))}}]),ee}(P.Component);return Se.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},Se}(),x=r,y={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}}},p=y;function R(Se){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R=function(se){return typeof se}:R=function(se){return se&&typeof Symbol=="function"&&se.constructor===Symbol&&se!==Symbol.prototype?"symbol":typeof se},R(Se)}function O(Se,be){if(Se==null)return{};var se=b(Se,be),ee,B;if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(Se);for(B=0;B<V.length;B++){if(ee=V[B],be.indexOf(ee)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(Se,ee))continue;se[ee]=Se[ee]}}return se}function b(Se,be){if(Se==null)return{};var se={},ee=Object.keys(Se),B,V;for(V=0;V<ee.length;V++){if(B=ee[V],be.indexOf(B)>=0)continue;se[B]=Se[B]}return se}function E(Se){return M(Se)||F(Se)||T(Se)||w()}function w(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T(Se,be){if(!Se)return;if(typeof Se=="string")return L(Se,be);var se=Object.prototype.toString.call(Se).slice(8,-1);if(se==="Object"&&Se.constructor&&(se=Se.constructor.name),se==="Map"||se==="Set")return Array.from(Se);if(se==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(se))return L(Se,be)}function F(Se){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(Se))return Array.from(Se)}function M(Se){if(Array.isArray(Se))return L(Se)}function L(Se,be){(be==null||be>Se.length)&&(be=Se.length);for(var se=0,ee=new Array(be);se<be;se++)ee[se]=Se[se];return ee}function Y(Se,be){if(!(Se instanceof be))throw new TypeError("Cannot call a class as a function")}function K(Se,be){for(var se=0;se<be.length;se++){var ee=be[se];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(Se,ee.key,ee)}}function A(Se,be,se){return be&&K(Se.prototype,be),se&&K(Se,se),Se}function H(Se,be){if(typeof be!="function"&&be!==null)throw new TypeError("Super expression must either be null or a function");Se.prototype=Object.create(be&&be.prototype,{constructor:{value:Se,writable:!0,configurable:!0}}),be&&U(Se,be)}function U(Se,be){return U=Object.setPrototypeOf||function(ee,B){return ee.__proto__=B,ee},U(Se,be)}function I(Se){var be=oe();return function(){var se=de(Se),ee;if(be){var B=de(this).constructor;ee=Reflect.construct(se,arguments,B)}else ee=se.apply(this,arguments);return G(this,ee)}}function G(Se,be){return be&&(R(be)==="object"||typeof be=="function")?be:ne(Se)}function ne(Se){if(Se===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Se}function oe(){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(Se){return!1}}function de(Se){return de=Object.setPrototypeOf?Object.getPrototypeOf:function(se){return se.__proto__||Object.getPrototypeOf(se)},de(Se)}var Oe=function(){var Se=function(be){H(ee,be);var se=I(ee);function ee(B){var V;Y(this,ee),V=se.call(this,B),V.setPopupVisible=function(Q){var Z=V.state.value;"popupVisible"in V.props||V.setState({popupVisible:Q}),Q&&!V.state.popupVisible&&V.setState({activeValue:Z}),V.props.onPopupVisibleChange(Q)},V.handleChange=function(Q,Z,ie){var re=Z.visible;(ie.type!=="keydown"||ie.keyCode===g.a.ENTER)&&(V.props.onChange(Q.map(function($){return $[V.getFieldName("value")]}),Q),V.setPopupVisible(re))},V.handlePopupVisibleChange=function(Q){V.setPopupVisible(Q)},V.handleMenuSelect=function(Q,Z,ie){var re=V.trigger.getRootDomNode();re&&re.focus&&re.focus();var $=V.props,J=$.changeOnSelect,le=$.loadData,ue=$.expandTrigger;if(!Q||Q.disabled)return;var xe=V.state.activeValue;xe=xe.slice(0,Z+1),xe[Z]=Q[V.getFieldName("value")];var Me=V.getActiveOptions(xe);if(Q.isLeaf===!1&&!Q[V.getFieldName("children")]&&le){J&&V.handleChange(Me,{visible:!0},ie),V.setState({activeValue:xe}),le(Me);return}var Xe={};!Q[V.getFieldName("children")]||!Q[V.getFieldName("children")].length?(V.handleChange(Me,{visible:!1},ie),Xe.value=xe):J&&(ie.type==="click"||ie.type==="keydown")&&(ue==="hover"?V.handleChange(Me,{visible:!1},ie):V.handleChange(Me,{visible:!0},ie),Xe.value=xe),Xe.activeValue=xe,("value"in V.props||ie.type==="keydown"&&ie.keyCode!==g.a.ENTER)&&delete Xe.value,V.setState(Xe)},V.handleItemDoubleClick=function(){var Q=V.props.changeOnSelect;Q&&V.setPopupVisible(!1)},V.handleKeyDown=function(Q){var Z=V.props.children;if(Z&&Z.props.onKeyDown){Z.props.onKeyDown(Q);return}var ie=E(V.state.activeValue),re=ie.length-1<0?0:ie.length-1,$=V.getCurrentLevelOptions(),J=$.map(function(Me){return Me[V.getFieldName("value")]}).indexOf(ie[re]);if(Q.keyCode!==g.a.DOWN&&Q.keyCode!==g.a.UP&&Q.keyCode!==g.a.LEFT&&Q.keyCode!==g.a.RIGHT&&Q.keyCode!==g.a.ENTER&&Q.keyCode!==g.a.SPACE&&Q.keyCode!==g.a.BACKSPACE&&Q.keyCode!==g.a.ESC&&Q.keyCode!==g.a.TAB)return;if(!V.state.popupVisible&&Q.keyCode!==g.a.BACKSPACE&&Q.keyCode!==g.a.LEFT&&Q.keyCode!==g.a.RIGHT&&Q.keyCode!==g.a.ESC&&Q.keyCode!==g.a.TAB){V.setPopupVisible(!0);return}if(Q.keyCode===g.a.DOWN||Q.keyCode===g.a.UP){Q.preventDefault();var le=J;le!==-1?Q.keyCode===g.a.DOWN?(le+=1,le=le>=$.length?0:le):(le-=1,le=le<0?$.length-1:le):le=0,ie[re]=$[le][V.getFieldName("value")]}else if(Q.keyCode===g.a.LEFT||Q.keyCode===g.a.BACKSPACE)Q.preventDefault(),ie.splice(ie.length-1,1);else if(Q.keyCode===g.a.RIGHT)Q.preventDefault(),$[J]&&$[J][V.getFieldName("children")]&&ie.push($[J][V.getFieldName("children")][0][V.getFieldName("value")]);else if(Q.keyCode===g.a.ESC||Q.keyCode===g.a.TAB){V.setPopupVisible(!1);return}(!ie||ie.length===0)&&V.setPopupVisible(!1);var ue=V.getActiveOptions(ie),xe=ue[ue.length-1];V.handleMenuSelect(xe,ue.length-1,Q),V.props.onKeyDown&&V.props.onKeyDown(Q)},V.saveTrigger=function(Q){V.trigger=Q};var X=[];return"value"in B?X=B.value||[]:"defaultValue"in B&&(X=B.defaultValue||[]),N()(!("filedNames"in B),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),V.state={popupVisible:B.popupVisible,activeValue:X,value:X,prevProps:B},V.defaultFieldNames={label:"label",value:"value",children:"children"},V}return A(ee,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(V){var X=this.defaultFieldNames,Q=this.props,Z=Q.fieldNames,ie=Q.filedNames;return"filedNames"in this.props?ie[V]||X[V]:Z[V]||X[V]}},{key:"getFieldNames",value:function(){var V=this.props,X=V.fieldNames,Q=V.filedNames;return"filedNames"in this.props?Q:X}},{key:"getCurrentLevelOptions",value:function(){var V=this,X=this.props.options,Q=X===void 0?[]:X,Z=this.state.activeValue,ie=Z===void 0?[]:Z,re=S()(Q,function($,J){return $[V.getFieldName("value")]===ie[J]},{childrenKeyName:this.getFieldName("children")});return re[re.length-2]?re[re.length-2][this.getFieldName("children")]:E(Q).filter(function($){return!$.disabled})}},{key:"getActiveOptions",value:function(V){var X=this;return S()(this.props.options||[],function(Q,Z){return Q[X.getFieldName("value")]===V[Z]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var V=this.props,X=V.prefixCls,Q=V.transitionName,Z=V.popupClassName,ie=V.options,re=ie===void 0?[]:ie,$=V.disabled,J=V.builtinPlacements,le=V.popupPlacement,ue=V.children,xe=V.dropdownRender,Me=O(V,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),Xe=P.createElement("div",null),$e="";re&&re.length>0?Xe=P.createElement(x,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):$e=" ".concat(X,"-menus-empty");var Je=Xe;return xe&&(Je=xe(Xe)),P.createElement(v.a,Object.assign({ref:this.saveTrigger},Me,{popupPlacement:le,builtinPlacements:J,popupTransitionName:Q,action:$?[]:["click"],popupVisible:$?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(X,"-menus"),popupClassName:Z+$e,popup:Je}),P.cloneElement(ue,{onKeyDown:this.handleKeyDown,tabIndex:$?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(V,X){var Q=X.prevProps,Z=Q===void 0?{}:Q,ie={prevProps:V};return"value"in V&&!_(Z.value,V.value)&&(ie.value=V.value||[],"loadData"in V||(ie.activeValue=V.value||[])),"popupVisible"in V&&(ie.popupVisible=V.popupVisible),ie}}]),ee}(P.Component);return Se.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:p,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},Se}(),Ae=Oe,pe=q.a=Ae},S6kV:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("OLod"))})(this,function(P){return P.mode.OFB=function(){var v=P.lib.BlockCipherMode.extend(),C=v.Encryptor=v.extend({processBlock:function(N,g){var m=this._cipher,S=m.blockSize,_=this._iv,t=this._keystream;_&&(t=this._keystream=_.slice(0),this._iv=void 0),m.encryptBlock(t,0);for(var d=0;d<S;d++)N[g+d]^=t[d]}});return v.Decryptor=C,v}(),P.mode.OFB})},"SA+Z":function(W,q,D){var P=D("wTVA"),v=D("EbDI"),C=D("ZhPi"),N=D("wkBT");function g(m){return P(m)||v(m)||C(m)||N()}W.exports=g,W.exports.__esModule=!0,W.exports.default=W.exports},SJMd:function(W,q){/**
|
|
|
* @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,P,v,C=!1,N,g;window.PR_SHOULD_USE_CONTINUATION=!0;var m,S;(function(){var _=window,t=["break,continue,do,else,for,if,return,while"],d=[t,"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"],i=[d,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],c=[i,"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"],o=[i,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],n=[i,"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"],s="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",h=[i,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],f="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",l=[t,"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=[t,"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"],r=[t,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],x=[c,n,o,h,f,l,a,r],y=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,p="str",R="kwd",O="com",b="typ",E="lit",w="pun",T="pln",F="tag",M="dec",L="src",Y="atn",K="atv",A="nocode",H="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(ie){for(var re=0,$=!1,J=!1,le=0,ue=ie.length;le<ue;++le){var xe=ie[le];if(xe.ignoreCase)J=!0;else if(/[a-z]/i.test(xe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){$=!0,J=!1;break}}var Me={b:8,t:9,n:10,v:11,f:12,r:13};function Xe(je){var Ie=je.charCodeAt(0);if(Ie!==92)return Ie;var qe=je.charAt(1);return Ie=Me[qe],Ie||("0"<=qe&&qe<="7"?parseInt(je.substring(1),8):qe==="u"||qe==="x"?parseInt(je.substring(2),16):je.charCodeAt(1))}function $e(je){if(je<32)return(je<16?"\\x0":"\\x")+je.toString(16);var Ie=String.fromCharCode(je);return Ie==="\\"||Ie==="-"||Ie==="]"||Ie==="^"?"\\"+Ie:Ie}function Je(je){var Ie=je.substring(1,je.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")),qe=[],st=Ie[0]==="^",Ee=["["];st&&Ee.push("^");for(var ce=st?1:0,fe=Ie.length;ce<fe;++ce){var ve=Ie[ce];if(/\\[bdsw]/i.test(ve))Ee.push(ve);else{var Ce=Xe(ve),ge;ce+2<fe&&Ie[ce+1]==="-"?(ge=Xe(Ie[ce+2]),ce+=2):ge=Ce,qe.push([Ce,ge]),ge<65||Ce>122||(ge<65||Ce>90||qe.push([Math.max(65,Ce)|32,Math.min(ge,90)|32]),ge<97||Ce>122||qe.push([Math.max(97,Ce)&~32,Math.min(ge,122)&~32]))}}qe.sort(function(Pe,ze){return Pe[0]-ze[0]||ze[1]-Pe[1]});for(var ye=[],Re=[],ce=0;ce<qe.length;++ce){var De=qe[ce];De[0]<=Re[1]+1?Re[1]=Math.max(Re[1],De[1]):ye.push(Re=De)}for(var ce=0;ce<ye.length;++ce){var De=ye[ce];Ee.push($e(De[0])),De[1]>De[0]&&(De[1]+1>De[0]&&Ee.push("-"),Ee.push($e(De[1])))}return Ee.push("]"),Ee.join("")}function rt(je){for(var Ie=je.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")),qe=Ie.length,st=[],Ee=0,ce=0;Ee<qe;++Ee){var fe=Ie[Ee];if(fe==="(")++ce;else if(fe.charAt(0)==="\\"){var ve=+fe.substring(1);ve&&(ve<=ce?st[ve]=-1:Ie[Ee]=$e(ve))}}for(var Ee=1;Ee<st.length;++Ee)st[Ee]===-1&&(st[Ee]=++re);for(var Ee=0,ce=0;Ee<qe;++Ee){var fe=Ie[Ee];if(fe==="(")++ce,st[ce]||(Ie[Ee]="(?:");else if(fe.charAt(0)==="\\"){var ve=+fe.substring(1);ve&&ve<=ce&&(Ie[Ee]="\\"+st[ve])}}for(var Ee=0;Ee<qe;++Ee)Ie[Ee]==="^"&&Ie[Ee+1]!=="^"&&(Ie[Ee]="");if(je.ignoreCase&&$)for(var Ee=0;Ee<qe;++Ee){var fe=Ie[Ee],Ce=fe.charAt(0);fe.length>=2&&Ce==="["?Ie[Ee]=Je(fe):Ce!=="\\"&&(Ie[Ee]=fe.replace(/[a-zA-Z]/g,function(Re){var De=Re.charCodeAt(0);return"["+String.fromCharCode(De&~32,De|32)+"]"}))}return Ie.join("")}for(var it=[],le=0,ue=ie.length;le<ue;++le){var xe=ie[le];if(xe.global||xe.multiline)throw new Error(""+xe);it.push("(?:"+rt(xe)+")")}return new RegExp(it.join("|"),J?"gi":"g")}function I(ie,re){var $=/(?:^|\s)nocode(?:\s|$)/,J=[],le=0,ue=[],xe=0;function Me(Xe){var $e=Xe.nodeType;if($e==1){if($.test(Xe.className))return;for(var Je=Xe.firstChild;Je;Je=Je.nextSibling)Me(Je);var rt=Xe.nodeName.toLowerCase();(rt==="br"||rt==="li")&&(J[xe]=`
|
|
|
`,ue[xe<<1]=le++,ue[xe++<<1|1]=Xe)}else if($e==3||$e==4){var it=Xe.nodeValue;it.length&&(re?it=it.replace(/\r\n?/g,`
|
|
|
`):it=it.replace(/[ \t\r\n]+/g," "),J[xe]=it,ue[xe<<1]=le,le+=it.length,ue[xe++<<1|1]=Xe)}}return Me(ie),{sourceCode:J.join("").replace(/\n$/,""),spans:ue}}function G(ie,re,$,J,le){if(!$)return;var ue={sourceNode:ie,pre:1,langExtension:null,numberLines:null,sourceCode:$,spans:null,basePos:re,decorations:null};J(ue),le.push.apply(le,ue.decorations)}var ne=/\S/;function oe(ie){for(var re=void 0,$=ie.firstChild;$;$=$.nextSibling){var J=$.nodeType;re=J===1?re?ie:$:J===3&&ne.test($.nodeValue)?ie:re}return re===ie?void 0:re}function de(ie,re){var $={},J;(function(){for(var xe=ie.concat(re),Me=[],Xe={},$e=0,Je=xe.length;$e<Je;++$e){var rt=xe[$e],it=rt[3];if(it)for(var je=it.length;--je>=0;)$[it.charAt(je)]=rt;var Ie=rt[1],qe=""+Ie;Xe.hasOwnProperty(qe)||(Me.push(Ie),Xe[qe]=null)}Me.push(/[\0-\uffff]/),J=U(Me)})();var le=re.length,ue=function(xe){for(var Me=xe.sourceCode,Xe=xe.basePos,$e=xe.sourceNode,Je=[Xe,T],rt=0,it=Me.match(J)||[],je={},Ie=0,qe=it.length;Ie<qe;++Ie){var st=it[Ie],Ee=je[st],ce=void 0,fe;if(typeof Ee=="string")fe=!1;else{var ve=$[st.charAt(0)];if(ve)ce=st.match(ve[1]),Ee=ve[0];else{for(var Ce=0;Ce<le;++Ce)if(ve=re[Ce],ce=st.match(ve[1]),ce){Ee=ve[0];break}ce||(Ee=T)}fe=Ee.length>=5&&Ee.substring(0,5)==="lang-",fe&&!(ce&&typeof ce[1]=="string")&&(fe=!1,Ee=L),fe||(je[st]=Ee)}var ge=rt;if(rt+=st.length,!fe)Je.push(Xe+ge,Ee);else{var ye=ce[1],Re=st.indexOf(ye),De=Re+ye.length;ce[2]&&(De=st.length-ce[2].length,Re=De-ye.length);var Pe=Ee.substring(5);G($e,Xe+ge,st.substring(0,Re),ue,Je),G($e,Xe+ge+Re,ye,ee(Pe,ye),Je),G($e,Xe+ge+De,st.substring(De),ue,Je)}}xe.decorations=Je};return ue}function Oe(ie){var re=[],$=[];ie.tripleQuotedStrings?re.push([p,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ie.multiLineStrings?re.push([p,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):re.push([p,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ie.verbatimStrings&&$.push([p,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var J=ie.hashComments;J&&(ie.cStyleComments?(J>1?re.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):re.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),$.push([p,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):re.push([O,/^#[^\r\n]*/,null,"#"])),ie.cStyleComments&&($.push([O,/^\/\/[^\r\n]*/,null]),$.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var le=ie.regexLiterals;if(le){var ue=le>1?"":`
|
|
|
\r`,xe=ue?".":"[\\S\\s]",Me="/(?=[^/*"+ue+"])(?:[^/\\x5B\\x5C"+ue+"]|\\x5C"+xe+"|\\x5B(?:[^\\x5C\\x5D"+ue+"]|\\x5C"+xe+")*(?:\\x5D|$))+/";$.push(["lang-regex",RegExp("^"+H+"("+Me+")")])}var Xe=ie.types;Xe&&$.push([b,Xe]);var $e=(""+ie.keywords).replace(/^ | $/g,"");$e.length&&$.push([R,new RegExp("^(?:"+$e.replace(/[\s,]+/g,"|")+")\\b"),null]),re.push([T,/^\s+/,null,` \r
|
|
|
\xA0`]);var Je="^.[^\\s\\w.$@'\"`/\\\\]*";return ie.regexLiterals&&(Je+="(?!s*/)"),$.push([E,/^@[a-z_$][a-z_$@0-9]*/i,null],[b,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[T,/^[a-z_$][a-z_$@0-9]*/i,null],[E,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[T,/^\\[\s\S]?/,null],[w,new RegExp(Je),null]),de(re,$)}var Ae=Oe({keywords:x,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function pe(ie,re,$){for(var J=/(?:^|\s)nocode(?:\s|$)/,le=/\r\n?|\n/,ue=ie.ownerDocument,xe=ue.createElement("li");ie.firstChild;)xe.appendChild(ie.firstChild);var Me=[xe];function Xe(Ie){var qe=Ie.nodeType;if(qe==1&&!J.test(Ie.className))if(Ie.nodeName==="br")$e(Ie),Ie.parentNode&&Ie.parentNode.removeChild(Ie);else for(var st=Ie.firstChild;st;st=st.nextSibling)Xe(st);else if((qe==3||qe==4)&&$){var Ee=Ie.nodeValue,ce=Ee.match(le);if(ce){var fe=Ee.substring(0,ce.index);Ie.nodeValue=fe;var ve=Ee.substring(ce.index+ce[0].length);if(ve){var Ce=Ie.parentNode;Ce.insertBefore(ue.createTextNode(ve),Ie.nextSibling)}$e(Ie),fe||Ie.parentNode.removeChild(Ie)}}}function $e(Ie){for(;!Ie.nextSibling;)if(Ie=Ie.parentNode,!Ie)return;function qe(ce,fe){var ve=fe?ce.cloneNode(!1):ce,Ce=ce.parentNode;if(Ce){var ge=qe(Ce,1),ye=ce.nextSibling;ge.appendChild(ve);for(var Re=ye;Re;Re=ye)ye=Re.nextSibling,ge.appendChild(Re)}return ve}for(var st=qe(Ie.nextSibling,0),Ee;(Ee=st.parentNode)&&Ee.nodeType===1;)st=Ee;Me.push(st)}for(var Je=0;Je<Me.length;++Je)Xe(Me[Je]);re===(re|0)&&Me[0].setAttribute("value",re);var rt=ue.createElement("ol");rt.className="linenums";for(var it=Math.max(0,re-1|0)||0,Je=0,je=Me.length;Je<je;++Je)xe=Me[Je],xe.className="L"+(Je+it)%10,xe.firstChild||xe.appendChild(ue.createTextNode("\xA0")),rt.appendChild(xe);ie.appendChild(rt)}function Se(ie){var re=/\bMSIE\s(\d+)/.exec(navigator.userAgent);re=re&&+re[1]<=8;var $=/\n/g,J=ie.sourceCode,le=J.length,ue=0,xe=ie.spans,Me=xe.length,Xe=0,$e=ie.decorations,Je=$e.length,rt=0;$e[Je]=le;var it,je;for(je=it=0;je<Je;)$e[je]!==$e[je+2]?($e[it++]=$e[je++],$e[it++]=$e[je++]):je+=2;for(Je=it,je=it=0;je<Je;){for(var Ie=$e[je],qe=$e[je+1],st=je+2;st+2<=Je&&$e[st+1]===qe;)st+=2;$e[it++]=Ie,$e[it++]=qe,je=st}Je=$e.length=it;var Ee=ie.sourceNode,ce="";Ee&&(ce=Ee.style.display,Ee.style.display="none");try{for(var fe=null;Xe<Me;){var ve=xe[Xe],Ce=xe[Xe+2]||le,ge=$e[rt+2]||le,st=Math.min(Ce,ge),ye=xe[Xe+1],Re;if(ye.nodeType!==1&&(Re=J.substring(ue,st))){re&&(Re=Re.replace($,"\r")),ye.nodeValue=Re;var De=ye.ownerDocument,Pe=De.createElement("span");Pe.className=$e[rt+1];var ze=ye.parentNode;ze.replaceChild(Pe,ye),Pe.appendChild(ye),ue<Ce&&(xe[Xe+1]=ye=De.createTextNode(J.substring(st,Ce)),ze.insertBefore(ye,Pe.nextSibling))}ue=st,ue>=Ce&&(Xe+=2),ue>=ge&&(rt+=2)}}finally{Ee&&(Ee.style.display=ce)}}var be={};function se(ie,re){for(var $=re.length;--$>=0;){var J=re[$];be.hasOwnProperty(J)?_.console&&console.warn("cannot override language handler %s",J):be[J]=ie}}function ee(ie,re){return ie&&be.hasOwnProperty(ie)||(ie=/^\s*</.test(re)?"default-markup":"default-code"),be[ie]}se(Ae,["default-code"]),se(de([],[[T,/^[^<?]+/],[M,/^<!\w[^>]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[w,/^(?:<[%?]|[%?]>)/],["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"]),se(de([[T,/^[\s]+/,null,` \r
|
|
|
`],[K,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[F,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[Y,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[w,/^[=<>\/]+/],["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"]),se(de([],[[K,/^[\s\S]+/]]),["uq.val"]),se(Oe({keywords:c,hashComments:!0,cStyleComments:!0,types:y}),["c","cc","cpp","cxx","cyc","m"]),se(Oe({keywords:"null,true,false"}),["json"]),se(Oe({keywords:n,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:y}),["cs"]),se(Oe({keywords:o,cStyleComments:!0}),["java"]),se(Oe({keywords:r,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),se(Oe({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),se(Oe({keywords:f,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),se(Oe({keywords:a,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),se(Oe({keywords:h,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),se(Oe({keywords:s,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),se(de([],[[p,/^[\s\S]+/]]),["regex"]);function B(ie){var re=ie.langExtension;try{var $=I(ie.sourceNode,ie.pre),J=$.sourceCode;ie.sourceCode=J,ie.spans=$.spans,ie.basePos=0,ee(re,J)(ie),Se(ie)}catch(le){_.console&&console.log(le&&le.stack||le)}}function V(ie,re,$){var J=$||!1,le=re||null,ue=document.createElement("div");ue.innerHTML="<pre>"+ie+"</pre>",ue=ue.firstChild,J&&pe(ue,J,!0);var xe={langExtension:le,numberLines:J,sourceNode:ue,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return B(xe),ue.innerHTML}function X(ie,re){var $=re||document.body,J=$.ownerDocument||document;function le(ve){return $.getElementsByTagName(ve)}for(var ue=[le("pre"),le("code"),le("xmp")],xe=[],Me=0;Me<ue.length;++Me)for(var Xe=0,$e=ue[Me].length;Xe<$e;++Xe)xe.push(ue[Me][Xe]);ue=null;var Je=Date;Je.now||(Je={now:function(){return+new Date}});var rt=0,it=/\blang(?:uage)?-([\w.]+)(?!\S)/,je=/\bprettyprint\b/,Ie=/\bprettyprinted\b/,qe=/pre|xmp/i,st=/^code$/i,Ee=/^(?:pre|code|xmp)$/i,ce={};function fe(){for(var ve=_.PR_SHOULD_USE_CONTINUATION?Je.now()+250:Infinity;rt<xe.length&&Je.now()<ve;rt++){for(var Ce=xe[rt],ge=ce,ye=Ce;ye=ye.previousSibling;){var Re=ye.nodeType,De=(Re===7||Re===8)&&ye.nodeValue;if(De?!/^\??prettify\b/.test(De):Re!==3||/\S/.test(ye.nodeValue))break;if(De){ge={},De.replace(/\b(\w+)=([\w:.%+-]+)/g,function(un,xr,an){ge[xr]=an});break}}var Pe=Ce.className;if((ge!==ce||je.test(Pe))&&!Ie.test(Pe)){for(var ze=!1,at=Ce.parentNode;at;at=at.parentNode){var lt=at.tagName;if(Ee.test(lt)&&at.className&&je.test(at.className)){ze=!0;break}}if(!ze){Ce.className+=" prettyprinted";var St=ge.lang;if(!St){St=Pe.match(it);var Ot;!St&&(Ot=oe(Ce))&&st.test(Ot.tagName)&&(St=Ot.className.match(it)),St&&(St=St[1])}var ir;if(qe.test(Ce.tagName))ir=1;else{var Gt=Ce.currentStyle,yt=J.defaultView,Fr=Gt?Gt.whiteSpace:yt&&yt.getComputedStyle?yt.getComputedStyle(Ce,null).getPropertyValue("white-space"):0;ir=Fr&&Fr.substring(0,3)==="pre"}var Pr=ge.linenums;(Pr=Pr==="true"||+Pr)||(Pr=Pe.match(/\blinenums\b(?::(\d+))?/),Pr=Pr?Pr[1]&&Pr[1].length?+Pr[1]:!0:!1),Pr&&pe(Ce,Pr,ir);var jr={langExtension:St,sourceNode:Ce,numberLines:Pr,pre:ir,sourceCode:null,basePos:null,spans:null,decorations:null};B(jr)}}}rt<xe.length?_.setTimeout(fe,250):typeof ie=="function"&&ie()}fe()}var Q=_.PR={createSimpleLexer:de,registerLangHandler:se,sourceDecorator:Oe,PR_ATTRIB_NAME:Y,PR_ATTRIB_VALUE:K,PR_COMMENT:O,PR_DECLARATION:M,PR_KEYWORD:R,PR_LITERAL:E,PR_NOCODE:A,PR_PLAIN:T,PR_PUNCTUATION:w,PR_SOURCE:L,PR_STRING:p,PR_TAG:F,PR_TYPE:b,prettyPrintOne:C?_.prettyPrintOne=V:m=V,prettyPrint:S=C?_.prettyPrint=X:S=X},Z=_.define;typeof Z=="function"&&Z.amd&&Z("google-code-prettify",[],function(){return Q})})()},STEk:function(W,q,D){"use strict";D.d(q,"a",function(){return se});/*! *****************************************************************************
|
|
|
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 P=function(ee,B){return(P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(V,X){V.__proto__=X}||function(V,X){for(var Q in X)Object.prototype.hasOwnProperty.call(X,Q)&&(V[Q]=X[Q])})(ee,B)};function v(ee,B){function V(){this.constructor=ee}P(ee,B),ee.prototype=B===null?Object.create(B):(V.prototype=B.prototype,new V)}function C(ee,B,V,X){return new(V||(V=Promise))(function(Q,Z){function ie(J){try{$(X.next(J))}catch(le){Z(le)}}function re(J){try{$(X.throw(J))}catch(le){Z(le)}}function $(J){var le;J.done?Q(J.value):(le=J.value,le instanceof V?le:new V(function(ue){ue(le)})).then(ie,re)}$((X=X.apply(ee,B||[])).next())})}function N(ee,B){var V,X,Q,Z,ie={label:0,sent:function(){if(1&Q[0])throw Q[1];return Q[1]},trys:[],ops:[]};return Z={next:re(0),throw:re(1),return:re(2)},typeof Symbol=="function"&&(Z[Symbol.iterator]=function(){return this}),Z;function re($){return function(J){return function(le){if(V)throw new TypeError("Generator is already executing.");for(;ie;)try{if(V=1,X&&(Q=2&le[0]?X.return:le[0]?X.throw||((Q=X.return)&&Q.call(X),0):X.next)&&!(Q=Q.call(X,le[1])).done)return Q;switch(X=0,Q&&(le=[2&le[0],Q.value]),le[0]){case 0:case 1:Q=le;break;case 4:return ie.label++,{value:le[1],done:!1};case 5:ie.label++,X=le[1],le=[0];continue;case 7:le=ie.ops.pop(),ie.trys.pop();continue;default:if(!(Q=ie.trys,(Q=Q.length>0&&Q[Q.length-1])||le[0]!==6&&le[0]!==2)){ie=0;continue}if(le[0]===3&&(!Q||le[1]>Q[0]&&le[1]<Q[3])){ie.label=le[1];break}if(le[0]===6&&ie.label<Q[1]){ie.label=Q[1],Q=le;break}if(Q&&ie.label<Q[2]){ie.label=Q[2],ie.ops.push(le);break}Q[2]&&ie.ops.pop(),ie.trys.pop();continue}le=B.call(ee,ie)}catch(ue){le=[6,ue],X=0}finally{V=Q=0}if(5&le[0])throw le[1];return{value:le[0]?le[1]:void 0,done:!0}}([$,J])}}}function g(){for(var ee=0,B=0,V=arguments.length;B<V;B++)ee+=arguments[B].length;var X=Array(ee),Q=0;for(B=0;B<V;B++)for(var Z=arguments[B],ie=0,re=Z.length;ie<re;ie++,Q++)X[Q]=Z[ie];return X}var m=function(){function ee(){}return ee.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ee.setAttributes=function(B,V){for(var X=0,Q=V;X<Q.length;X++){var Z=Q[X],ie=Z[0],re=Z[1];B.setAttribute(ie,re)}},ee.createRect=function(B,V,X){var Q=document.createElementNS("http://www.w3.org/2000/svg","rect");return Q.setAttribute("width",B.toString()),Q.setAttribute("height",V.toString()),X&&ee.setAttributes(Q,X),Q},ee.createLine=function(B,V,X,Q,Z){var ie=document.createElementNS("http://www.w3.org/2000/svg","line");return ie.setAttribute("x1",B.toString()),ie.setAttribute("y1",V.toString()),ie.setAttribute("x2",X.toString()),ie.setAttribute("y2",Q.toString()),Z&&ee.setAttributes(ie,Z),ie},ee.createPolygon=function(B,V){var X=document.createElementNS("http://www.w3.org/2000/svg","polygon");return X.setAttribute("points",B),V&&ee.setAttributes(X,V),X},ee.createCircle=function(B,V){var X=document.createElementNS("http://www.w3.org/2000/svg","circle");return X.setAttribute("cx",(B/2).toString()),X.setAttribute("cy",(B/2).toString()),X.setAttribute("r",B.toString()),V&&ee.setAttributes(X,V),X},ee.createEllipse=function(B,V,X){var Q=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Q.setAttribute("cx",(B/2).toString()),Q.setAttribute("cy",(V/2).toString()),Q.setAttribute("rx",(B/2).toString()),Q.setAttribute("ry",(V/2).toString()),X&&ee.setAttributes(Q,X),Q},ee.createGroup=function(B){var V=document.createElementNS("http://www.w3.org/2000/svg","g");return B&&ee.setAttributes(V,B),V},ee.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ee.createMarker=function(B,V,X,Q,Z,ie,re){var $=document.createElementNS("http://www.w3.org/2000/svg","marker");return ee.setAttributes($,[["id",B],["orient",V],["markerWidth",X.toString()],["markerHeight",Q.toString()],["refX",Z.toString()],["refY",ie.toString()]]),$.appendChild(re),$},ee.createText=function(B){var V=document.createElementNS("http://www.w3.org/2000/svg","text");return V.setAttribute("x","0"),V.setAttribute("y","0"),B&&ee.setAttributes(V,B),V},ee.createTSpan=function(B,V){var X=document.createElementNS("http://www.w3.org/2000/svg","tspan");return X.textContent=B,V&&ee.setAttributes(X,V),X},ee.createImage=function(B){var V=document.createElementNS("http://www.w3.org/2000/svg","image");return B&&ee.setAttributes(V,B),V},ee.createPoint=function(B,V){var X=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return X.x=B,X.y=V,X},ee.createPath=function(B,V){var X=document.createElementNS("http://www.w3.org/2000/svg","path");return X.setAttribute("d",B),V&&ee.setAttributes(X,V),X},ee}(),S=function(){function ee(){}return ee.addKey=function(B){ee.key=B},Object.defineProperty(ee,"isLicensed",{get:function(){return!!ee.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ee.key)},enumerable:!1,configurable:!0}),ee}(),_=function(){function ee(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ee.prototype.rasterize=function(B,V,X){var Q=this;return new Promise(function(Z){var ie=X!==void 0?X:document.createElement("canvas");B===null&&(Q.markersOnly=!0,Q.naturalSize=!1);var re=document.createElementNS("http://www.w3.org/2000/svg","svg");re.setAttribute("xmlns","http://www.w3.org/2000/svg"),re.setAttribute("width",V.width.baseVal.valueAsString),re.setAttribute("height",V.height.baseVal.valueAsString),re.setAttribute("viewBox","0 0 "+V.viewBox.baseVal.width.toString()+" "+V.viewBox.baseVal.height.toString()),re.innerHTML=V.innerHTML,Q.naturalSize===!0?(re.width.baseVal.value=B.naturalWidth,re.height.baseVal.value=B.naturalHeight):Q.width!==void 0&&Q.height!==void 0&&(re.width.baseVal.value=Q.width,re.height.baseVal.value=Q.height),ie.width=re.width.baseVal.value,ie.height=re.height.baseVal.value;var $=re.outerHTML,J=ie.getContext("2d");Q.markersOnly!==!0&&J.drawImage(B,0,0,ie.width,ie.height);var le=window.URL,ue=new Image(ie.width,ie.height);ue.setAttribute("crossOrigin","anonymous");var xe=new Blob([$],{type:"image/svg+xml"}),Me=le.createObjectURL(xe);ue.onload=function(){J.drawImage(ue,0,0),le.revokeObjectURL(Me);var Xe=ie.toDataURL(Q.imageType,Q.imageQuality);Z(Xe)},ue.src=Me})},ee}(),t=function(){},d=function(){function ee(B){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+B+"_"}return Object.defineProperty(ee.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ee.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(ee.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ee.prototype.addClass=function(B){return this.styleSheet===void 0&&this.addStyleSheet(),B.name=""+this.classNamePrefix+B.localName,this.classes.push(B),this.styleSheet.sheet.insertRule("."+B.name+" {"+B.style+"}",this.styleSheet.sheet.cssRules.length),B},ee.prototype.addRule=function(B){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(B),this.styleSheet.sheet.insertRule(B.selector+" {"+B.style+"}",this.styleSheet.sheet.cssRules.length)},ee.prototype.addStyleSheet=function(){var B;this.styleSheet=document.createElement("style"),((B=this.styleSheetRoot)!==null&&B!==void 0?B:document.head).appendChild(this.styleSheet),this.addRule(new i("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new i("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new i("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new c("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new c("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},ee.prototype.removeStyleSheet=function(){var B;this.styleSheet&&(((B=this.styleSheetRoot)!==null&&B!==void 0?B:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ee}(),i=function(ee,B){this.selector=ee,this.style=B},c=function(ee,B){this.localName=ee,this.style=B},o=function(){function ee(B,V,X,Q,Z){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=B,this.displayMode=V,this.markerItems=X,this.uiStyleSettings=Q,this.styles=Z,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ee.prototype.show=function(B){var V=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=B,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var X=document.createElement("div");X.className=this.toolbarBlockStyleClass.name,X.style.whiteSpace="nowrap",this.uiContainer.appendChild(X),this.addActionButton(X,'<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(X,'<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(X,'<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(X,'<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(X,'<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(X,'<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(X,'<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(X,'<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(Z){var ie=document.createElement("div");ie.className=""+V.toolbarButtonStyleClass.name,ie.setAttribute("data-type-name",Z.typeName),ie.innerHTML=Z.icon,ie.addEventListener("click",function(){V.markerToolbarButtonClicked(ie,Z)}),V.buttons.push(ie),V.markerButtons.push(ie)}),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 Q=document.createElement("div");Q.className=this.toolbarBlockStyleClass.name,Q.style.whiteSpace="nowrap",Q.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Q),this.addActionButton(Q,'<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(Q,'<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()},ee.prototype.addButtonClickListener=function(B){this.buttonClickListeners.push(B)},ee.prototype.removeButtonClickListener=function(B){this.buttonClickListeners.indexOf(B)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(B),1)},ee.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ee.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var B=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var V=0;V<this.markerButtons.length;V++)V<B||V===B&&this.markerButtons.length-1===B?this.markerButtonBlock.appendChild(this.markerButtons[V]):(V===B&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[V]))}},ee.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")},ee.prototype.resetButtonStyles=function(){var B=this;this.buttons.forEach(function(V){V.className=V.className.replace(B.uiStyleSettings.toolbarButtonStyleColorsClassName?B.uiStyleSettings.toolbarButtonStyleColorsClassName:B.toolbarButtonStyleColorsClass.name,"").trim(),V.className=V.className.replace(B.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?B.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:B.toolbarActiveButtonStyleColorsClass.name,"").trim(),V.className+=" "+(B.uiStyleSettings.toolbarButtonStyleColorsClassName?B.uiStyleSettings.toolbarButtonStyleColorsClassName:B.toolbarButtonStyleColorsClass.name)})},ee.prototype.addActionButton=function(B,V,X){var Q=this,Z=document.createElement("div");switch(Z.className=""+this.toolbarButtonStyleClass.name,Z.innerHTML=V,Z.setAttribute("data-action",X),Z.addEventListener("click",function(){Q.actionToolbarButtonClicked(Z,X)}),X){case"select":Z.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Z.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Z.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Z.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Z.style.fill=this.uiStyleSettings.closeButtonColor}B.appendChild(Z),this.buttons.push(Z)},ee.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new c("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 c("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new c("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new c("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 c("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var B=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new c("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*B)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*B)+`px;
|
|
|
padding: `+B+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new c("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new c("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new i("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new i("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},ee.prototype.markerToolbarButtonClicked=function(B,V){this.setActiveButton(B),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(X){return X("marker",V)}),this.markerButtonOverflowBlock.style.display="none"},ee.prototype.actionToolbarButtonClicked=function(B,V){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(X){return X("action",V)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ee.prototype.setActiveButton=function(B){this.resetButtonStyles(),B.className=B.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),B.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ee.prototype.setActiveMarkerButton=function(B){var V=this.markerButtons.find(function(X){return X.getAttribute("data-type-name")===B});V&&this.setActiveButton(V)},ee.prototype.setCurrentMarker=function(B){var V=this;this.currentMarker=B,this.buttons.filter(function(X){return/delete|notes/.test(X.getAttribute("data-action"))}).forEach(function(X){V.currentMarker===void 0?(X.style.fillOpacity="0.4",X.style.pointerEvents="none"):(X.style.fillOpacity="1",X.style.pointerEvents="all")})},ee}(),n=function(){function ee(B,V,X,Q){this.panels=[],this.panelButtons=[],this.markerjsContainer=B,this.displayMode=V,this.uiStyleSettings=X,this.styles=Q,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ee.prototype.addStyles=function(){var B;this.toolboxStyleClass=this.styles.addClass(new c("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 c("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var V=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new c("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new c("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new c("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 c("toolbox-panel-row_colors",`
|
|
|
background-color: `+((B=this.uiStyleSettings.toolboxBackgroundColor)!==null&&B!==void 0?B:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new c("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*V)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*V)+`px;
|
|
|
padding: `+V+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new c("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new c("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new i("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new i("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},ee.prototype.show=function(B){var V;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=B,this.uiContainer.className=this.toolboxStyleClass.name+" "+((V=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&V!==void 0?V:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ee.prototype.setPanelButtons=function(B){var V,X,Q=this;this.panels=B,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((V=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&V!==void 0?V:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((X=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&X!==void 0?X:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Z){var ie;Z.uiStyleSettings=Q.uiStyleSettings;var re=document.createElement("div");re.className=Q.toolboxButtonStyleClass.name+" "+((ie=Q.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ie!==void 0?ie:Q.toolboxButtonStyleColorsClass.name),re.innerHTML=Z.icon,re.title=Z.title,re.addEventListener("click",function(){Q.panelButtonClick(Z)}),Q.panelButtons.push(re),Q.buttonRow.appendChild(re)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ee.prototype.panelButtonClick=function(B){var V=this,X=-1;if(B!==this.activePanel){X=this.panels.indexOf(B),this.panelRow.innerHTML="";var Q=B.getUi();Q.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Q),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=B}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){V.displayMode==="inline"?V.panelRow.style.display="none":V.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Z,ie){var re,$;Z.className=V.toolboxButtonStyleClass.name+" "+(ie===X?""+((re=V.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&re!==void 0?re:V.toolboxActiveButtonStyleColorsClass.name):""+(($=V.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&$!==void 0?$:V.toolboxButtonStyleColorsClass.name))})},ee}(),s=function(ee,B){this.title=ee,this.icon=B},h=function(ee){function B(V,X,Q,Z){var ie=ee.call(this,V,Z||'<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 ie.colors=[],ie.addTransparent=!1,ie.colorBoxes=[],ie.colors=X,ie.currentColor=Q,ie.setCurrentColor=ie.setCurrentColor.bind(ie),ie.getColorBox=ie.getColorBox.bind(ie),ie}return v(B,ee),B.prototype.getUi=function(){var V=this,X=document.createElement("div");return X.style.overflow="hidden",X.style.whiteSpace="nowrap",this.colors.forEach(function(Q){var Z=V.getColorBox(Q);X.appendChild(Z),V.colorBoxes.push(Z)}),X},B.prototype.getColorBox=function(V){var X=this,Q=this.uiStyleSettings.toolbarHeight/4,Z=this.uiStyleSettings.toolbarHeight-Q,ie=document.createElement("div");ie.style.display="inline-block",ie.style.boxSizing="content-box",ie.style.width=Z-2+"px",ie.style.height=Z-2+"px",ie.style.padding="1px",ie.style.marginRight="2px",ie.style.marginBottom="2px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderRadius=(Z+2)/2+"px",ie.style.borderColor=V===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){X.setCurrentColor(V,ie)});var re=document.createElement("div");return re.style.display="inline-block",re.style.width=Z-2+"px",re.style.height=Z-2+"px",re.style.backgroundColor=V,re.style.borderRadius=Z/2+"px",V==="transparent"&&(re.style.fill=this.uiStyleSettings.toolboxAccentColor,re.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>`),ie.appendChild(re),ie},B.prototype.setCurrentColor=function(V,X){var Q=this;this.currentColor=V,this.colorBoxes.forEach(function(Z){Z.style.borderColor=Z===X?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(V)},B}(s),f=function(){function ee(B,V,X){this._state="new",this._isSelected=!1,this._container=B,this._overlayContainer=V,this.globalSettings=X,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ee.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ee.prototype.ownsTarget=function(B){return!1},Object.defineProperty(ee.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ee.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ee.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ee.prototype.pointerDown=function(B,V){},ee.prototype.dblClick=function(B,V){},ee.prototype.manipulate=function(B){},ee.prototype.pointerUp=function(B){this.stateChanged()},ee.prototype.dispose=function(){},ee.prototype.addMarkerVisualToContainer=function(B){this.container.childNodes.length>0?this.container.insertBefore(B,this.container.childNodes[0]):this.container.appendChild(B)},ee.prototype.getState=function(){return{typeName:ee.typeName,state:this.state,notes:this.notes}},ee.prototype.restoreState=function(B){this._state=B.state,this.notes=B.notes},ee.prototype.scale=function(B,V){},ee.prototype.colorChanged=function(B){this.onColorChanged&&this.onColorChanged(B),this.stateChanged()},ee.prototype.fillColorChanged=function(B){this.onFillColorChanged&&this.onFillColorChanged(B),this.stateChanged()},ee.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var B=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),B.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(B)&&this.onStateChanged(this)}},ee.typeName="MarkerBase",ee}(),l=function(){function ee(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ee.prototype.findGripByVisual=function(B){return this.topLeft.ownsTarget(B)?this.topLeft:this.topCenter.ownsTarget(B)?this.topCenter:this.topRight.ownsTarget(B)?this.topRight:this.centerLeft.ownsTarget(B)?this.centerLeft:this.centerRight.ownsTarget(B)?this.centerRight:this.bottomLeft.ownsTarget(B)?this.bottomLeft:this.bottomCenter.ownsTarget(B)?this.bottomCenter:this.bottomRight.ownsTarget(B)?this.bottomRight:void 0},ee}(),a=function(){function ee(){this.GRIP_SIZE=10,this.visual=m.createGroup(),this.visual.appendChild(m.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(m.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ee.prototype.ownsTarget=function(B){return B===this.visual||B===this.visual.childNodes[0]||B===this.visual.childNodes[1]},ee}(),r=function(){function ee(){}return ee.toITransformMatrix=function(B){return{a:B.a,b:B.b,c:B.c,d:B.d,e:B.e,f:B.f}},ee.toSVGMatrix=function(B,V){return B.a=V.a,B.b=V.b,B.c=V.c,B.d=V.d,B.e=V.e,B.f=V.f,B},ee}(),x=function(ee){function B(V,X,Q){var Z=ee.call(this,V,X,Q)||this;return Z.left=0,Z.top=0,Z.width=0,Z.height=0,Z.defaultSize={x:50,y:20},Z.offsetX=0,Z.offsetY=0,Z.rotationAngle=0,Z.CB_DISTANCE=10,Z._suppressMarkerCreateEvent=!1,Z.container.transform.baseVal.appendItem(m.createTransform()),Z.setupControlBox(),Z}return v(B,ee),Object.defineProperty(B.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"visual",{get:function(){return this._visual},set:function(V){this._visual=V;var X=m.createTransform();this._visual.transform.baseVal.appendItem(X)},enumerable:!1,configurable:!0}),B.prototype.ownsTarget=function(V){return!!ee.prototype.ownsTarget.call(this,V)||!!(this.controlGrips.findGripByVisual(V)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(V))},B.prototype.pointerDown=function(V,X){ee.prototype.pointerDown.call(this,V,X),this.state==="new"&&(this.left=V.x,this.top=V.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Q=this.unrotatePoint(V);if(this.manipulationStartX=Q.x,this.manipulationStartY=Q.y,this.offsetX=Q.x-this.left,this.offsetY=Q.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(X),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(X)){this.activeGrip=this.rotatorGrip;var Z=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Z.x-this.width/2,this.top=Z.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ie=this.container.transform.baseVal.getItem(0);ie.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ie,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},B.prototype.pointerUp=function(V){var X=this.state;ee.prototype.pointerUp.call(this,V),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(V),this._state="select",X==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},B.prototype.moveVisual=function(V){this.visual.style.transform="translate("+V.x+"px, "+V.y+"px)"},B.prototype.manipulate=function(V){var X=this.unrotatePoint(V);this.state==="creating"?this.resize(V):this.state==="move"?(this.left=this.manipulationStartLeft+(X.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(X.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(X):this.state==="rotate"&&this.rotate(V)},B.prototype.resize=function(V){var X=this.manipulationStartLeft,Q=this.manipulationStartWidth,Z=this.manipulationStartTop,ie=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:X=this.manipulationStartLeft+V.x-this.manipulationStartX,Q=this.manipulationStartWidth+this.manipulationStartLeft-X;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Q=this.manipulationStartWidth+V.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Z=this.manipulationStartTop+V.y-this.manipulationStartY,ie=this.manipulationStartHeight+this.manipulationStartTop-Z;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ie=this.manipulationStartHeight+V.y-this.manipulationStartY}Q>=0?(this.left=X,this.width=Q):(this.left=X+Q,this.width=-Q),ie>=0?(this.top=Z,this.height=ie):(this.top=Z+ie,this.height=-ie),this.setSize()},B.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},B.prototype.rotate=function(V){if(Math.abs(V.x-this.centerX)>.1){var X=Math.sign(V.x-this.centerX);this.rotationAngle=180*Math.atan((V.y-this.centerY)/(V.x-this.centerX))/Math.PI+90*X,this.applyRotation()}},B.prototype.applyRotation=function(){var V=this.container.transform.baseVal.getItem(0);V.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(V,0)},B.prototype.rotatePoint=function(V){if(this.rotationAngle===0)return V;var X=this.container.getCTM(),Q=m.createPoint(V.x,V.y);return{x:(Q=Q.matrixTransform(X)).x,y:Q.y}},B.prototype.unrotatePoint=function(V){if(this.rotationAngle===0)return V;var X=this.container.getCTM();X=X.inverse();var Q=m.createPoint(V.x,V.y);return{x:(Q=Q.matrixTransform(X)).x,y:Q.y}},B.prototype.select=function(){ee.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},B.prototype.deselect=function(){ee.prototype.deselect.call(this),this.controlBox.style.display="none"},B.prototype.setupControlBox=function(){this.controlBox=m.createGroup();var V=m.createTransform();V.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(V),this.container.appendChild(this.controlBox),this.controlRect=m.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=m.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 l,this.addControlGrips(),this.controlBox.style.display="none"},B.prototype.adjustControlBox=function(){var V=this.controlBox.transform.baseVal.getItem(0);V.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(V,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()},B.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()},B.prototype.createGrip=function(){var V=new a;return V.visual.transform.baseVal.appendItem(m.createTransform()),this.controlBox.appendChild(V.visual),V},B.prototype.positionGrips=function(){var V=this.controlGrips.topLeft.GRIP_SIZE,X=-V/2,Q=X,Z=(this.width+this.CB_DISTANCE)/2-V/2,ie=(this.height+this.CB_DISTANCE)/2-V/2,re=this.height+this.CB_DISTANCE-V/2,$=this.width+this.CB_DISTANCE-V/2;this.positionGrip(this.controlGrips.topLeft.visual,X,Q),this.positionGrip(this.controlGrips.topCenter.visual,Z,Q),this.positionGrip(this.controlGrips.topRight.visual,$,Q),this.positionGrip(this.controlGrips.centerLeft.visual,X,ie),this.positionGrip(this.controlGrips.centerRight.visual,$,ie),this.positionGrip(this.controlGrips.bottomLeft.visual,X,re),this.positionGrip(this.controlGrips.bottomCenter.visual,Z,re),this.positionGrip(this.controlGrips.bottomRight.visual,$,re),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Z,Q-3*this.CB_DISTANCE)},B.prototype.positionGrip=function(V,X,Q){var Z=V.transform.baseVal.getItem(0);Z.setTranslate(X,Q),V.transform.baseVal.replaceItem(Z,0)},B.prototype.hideControlBox=function(){this.controlBox.style.display="none"},B.prototype.showControlBox=function(){this.controlBox.style.display=""},B.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:r.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:r.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ee.prototype.getState.call(this))},B.prototype.restoreState=function(V){ee.prototype.restoreState.call(this,V);var X=V;this.left=X.left,this.top=X.top,this.width=X.width,this.height=X.height,this.rotationAngle=X.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(r.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,X.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(r.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,X.containerTransformMatrix))},B.prototype.scale=function(V,X){ee.prototype.scale.call(this,V,X);var Q=this.rotatePoint({x:this.left,y:this.top}),Z=this.unrotatePoint({x:Q.x*V,y:Q.y*X});this.left=Z.x,this.top=Z.y,this.width=this.width*V,this.height=this.height*X,this.adjustControlBox()},B}(f),y=function(ee){function B(V,X,Q){var Z=ee.call(this,V,X,Q)||this;return Z.fillColor="transparent",Z.strokeColor="transparent",Z.strokeWidth=0,Z.strokeDasharray="",Z.opacity=1,Z.setStrokeColor=Z.setStrokeColor.bind(Z),Z.setFillColor=Z.setFillColor.bind(Z),Z.setStrokeWidth=Z.setStrokeWidth.bind(Z),Z.setStrokeDasharray=Z.setStrokeDasharray.bind(Z),Z.createVisual=Z.createVisual.bind(Z),Z}return v(B,ee),B.prototype.ownsTarget=function(V){return!(!ee.prototype.ownsTarget.call(this,V)&&V!==this.visual)},B.prototype.createVisual=function(){this.visual=m.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)},B.prototype.pointerDown=function(V,X){ee.prototype.pointerDown.call(this,V,X),this.state==="new"&&(this.createVisual(),this.moveVisual(V),this._state="creating")},B.prototype.manipulate=function(V){ee.prototype.manipulate.call(this,V)},B.prototype.resize=function(V){ee.prototype.resize.call(this,V),this.setSize()},B.prototype.setSize=function(){ee.prototype.setSize.call(this),m.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},B.prototype.pointerUp=function(V){ee.prototype.pointerUp.call(this,V),this.setSize()},B.prototype.setStrokeColor=function(V){this.strokeColor=V,this.visual&&m.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(V),this.stateChanged()},B.prototype.setFillColor=function(V){this.fillColor=V,this.visual&&m.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},B.prototype.setStrokeWidth=function(V){this.strokeWidth=V,this.visual&&m.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},B.prototype.setStrokeDasharray=function(V){this.strokeDasharray=V,this.visual&&m.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},B.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ee.prototype.getState.call(this))},B.prototype.restoreState=function(V){var X=V;this.fillColor=X.fillColor,this.strokeColor=X.strokeColor,this.strokeWidth=X.strokeWidth,this.strokeDasharray=X.strokeDasharray,this.opacity=X.opacity,this.createVisual(),ee.prototype.restoreState.call(this,V),this.setSize()},B.prototype.scale=function(V,X){ee.prototype.scale.call(this,V,X),this.setSize()},B.title="Rectangle marker",B}(x),p=function(ee){function B(V,X,Q,Z){var ie=ee.call(this,V,Z||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ie.widths=[],ie.widthBoxes=[],ie.widths=X,ie.currentWidth=Q,ie.setCurrentWidth=ie.setCurrentWidth.bind(ie),ie}return v(B,ee),B.prototype.getUi=function(){var V=this,X=document.createElement("div");return X.style.display="flex",X.style.overflow="hidden",X.style.flexGrow="2",this.widths.forEach(function(Q){var Z=document.createElement("div");Z.style.display="flex",Z.style.flexGrow="2",Z.style.alignItems="center",Z.style.justifyContent="space-between",Z.style.padding="5px",Z.style.borderWidth="2px",Z.style.borderStyle="solid",Z.style.borderColor=Q===V.currentWidth?V.uiStyleSettings.toolboxAccentColor:"transparent",Z.addEventListener("click",function(){V.setCurrentWidth(Q,Z)}),X.appendChild(Z);var ie=document.createElement("div");ie.innerText=Q.toString(),ie.style.marginRight="5px",Z.appendChild(ie);var re=document.createElement("div");re.style.minHeight="20px",re.style.flexGrow="2",re.style.display="flex",re.style.alignItems="center";var $=document.createElement("hr");$.style.minWidth="20px",$.style.border="0px",$.style.borderTop=Q+"px solid "+V.uiStyleSettings.toolboxColor,$.style.flexGrow="2",re.appendChild($),Z.appendChild(re),V.widthBoxes.push(Z)}),X},B.prototype.setCurrentWidth=function(V,X){var Q=this;this.currentWidth=V,this.widthBoxes.forEach(function(Z){Z.style.borderColor=Z===X?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},B}(s),R=function(ee){function B(V,X,Q,Z){var ie=ee.call(this,V,Z||'<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 ie.styles=[],ie.styleBoxes=[],ie.styles=X,ie.currentStyle=Q,ie.setCurrentStyle=ie.setCurrentStyle.bind(ie),ie}return v(B,ee),B.prototype.getUi=function(){var V=this,X=document.createElement("div");return X.style.display="flex",X.style.overflow="hidden",X.style.flexGrow="2",this.styles.forEach(function(Q){var Z=document.createElement("div");Z.style.display="flex",Z.style.alignItems="center",Z.style.justifyContent="space-between",Z.style.padding="5px",Z.style.borderWidth="2px",Z.style.borderStyle="solid",Z.style.overflow="hidden",Z.style.maxWidth=100/V.styles.length-5+"%",Z.style.borderColor=Q===V.currentStyle?V.uiStyleSettings.toolboxAccentColor:"transparent",Z.addEventListener("click",function(){V.setCurrentStyle(Q,Z)}),X.appendChild(Z);var ie=document.createElement("div");ie.style.minHeight="20px",ie.style.flexGrow="2",ie.style.overflow="hidden";var re=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+V.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Q!==""?'stroke-dasharray="'+Q+'"':"")+` />
|
|
|
</svg>`;ie.innerHTML=re,Z.appendChild(ie),V.styleBoxes.push(Z)}),X},B.prototype.setCurrentStyle=function(V,X){var Q=this;this.currentStyle=V,this.styleBoxes.forEach(function(Z){Z.style.borderColor=Z===X?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},B}(s),O=function(ee){function B(V,X,Q){var Z=ee.call(this,V,X,Q)||this;return Z.strokeColor=Q.defaultColor,Z.strokeWidth=Q.defaultStrokeWidth,Z.strokeDasharray=Q.defaultStrokeDasharray,Z.strokePanel=new h("Line color",Q.defaultColorSet,Q.defaultColor),Z.strokePanel.onColorChanged=Z.setStrokeColor,Z.strokeWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),Z.strokeWidthPanel.onWidthChanged=Z.setStrokeWidth,Z.strokeStylePanel=new R("Line style",Q.defaultStrokeDasharrays,Q.defaultStrokeDasharray),Z.strokeStylePanel.onStyleChanged=Z.setStrokeDasharray,Z}return v(B,ee),Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var V=ee.prototype.getState.call(this);return V.typeName=B.typeName,V},B.typeName="FrameMarker",B.title="Frame marker",B.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',B}(y),b=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},E=function(ee){function B(V,X,Q){var Z=ee.call(this,V,X,Q)||this;return Z.x1=0,Z.y1=0,Z.x2=0,Z.y2=0,Z.defaultLength=50,Z.manipulationStartX=0,Z.manipulationStartY=0,Z.manipulationStartX1=0,Z.manipulationStartY1=0,Z.manipulationStartX2=0,Z.manipulationStartY2=0,Z.setupControlBox(),Z}return v(B,ee),B.prototype.ownsTarget=function(V){return!!ee.prototype.ownsTarget.call(this,V)||!(!this.grip1.ownsTarget(V)&&!this.grip2.ownsTarget(V))},B.prototype.pointerDown=function(V,X){ee.prototype.pointerDown.call(this,V,X),this.manipulationStartX=V.x,this.manipulationStartY=V.y,this.state==="new"&&(this.x1=V.x,this.y1=V.y,this.x2=V.x,this.y2=V.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(X)?this.activeGrip=this.grip1:this.grip2.ownsTarget(X)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},B.prototype.pointerUp=function(V){var X=this.state;ee.prototype.pointerUp.call(this,V),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(V),this._state="select",X==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},B.prototype.adjustVisual=function(){},B.prototype.manipulate=function(V){this.state==="creating"?this.resize(V):this.state==="move"?(this.x1=this.manipulationStartX1+V.x-this.manipulationStartX,this.y1=this.manipulationStartY1+V.y-this.manipulationStartY,this.x2=this.manipulationStartX2+V.x-this.manipulationStartX,this.y2=this.manipulationStartY2+V.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(V)},B.prototype.resize=function(V){switch(this.activeGrip){case this.grip1:this.x1=V.x,this.y1=V.y;break;case this.grip2:case void 0:this.x2=V.x,this.y2=V.y}this.adjustVisual(),this.adjustControlBox()},B.prototype.select=function(){ee.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},B.prototype.deselect=function(){ee.prototype.deselect.call(this),this.controlBox.style.display="none"},B.prototype.setupControlBox=function(){this.controlBox=m.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},B.prototype.adjustControlBox=function(){this.positionGrips()},B.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},B.prototype.createGrip=function(){var V=new a;return V.visual.transform.baseVal.appendItem(m.createTransform()),this.controlBox.appendChild(V.visual),V},B.prototype.positionGrips=function(){var V=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-V/2,this.y1-V/2),this.positionGrip(this.grip2.visual,this.x2-V/2,this.y2-V/2)},B.prototype.positionGrip=function(V,X,Q){var Z=V.transform.baseVal.getItem(0);Z.setTranslate(X,Q),V.transform.baseVal.replaceItem(Z,0)},B.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ee.prototype.getState.call(this))},B.prototype.restoreState=function(V){ee.prototype.restoreState.call(this,V);var X=V;this.x1=X.x1,this.y1=X.y1,this.x2=X.x2,this.y2=X.y2},B.prototype.scale=function(V,X){ee.prototype.scale.call(this,V,X),this.x1=this.x1*V,this.y1=this.y1*X,this.x2=this.x2*V,this.y2=this.y2*X,this.adjustVisual(),this.adjustControlBox()},B}(f),w=function(ee){function B(V,X,Q){var Z=ee.call(this,V,X,Q)||this;return Z.strokeColor="transparent",Z.strokeWidth=0,Z.strokeDasharray="",Z.setStrokeColor=Z.setStrokeColor.bind(Z),Z.setStrokeWidth=Z.setStrokeWidth.bind(Z),Z.setStrokeDasharray=Z.setStrokeDasharray.bind(Z),Z.strokeColor=Q.defaultColor,Z.strokeWidth=Q.defaultStrokeWidth,Z.strokeDasharray=Q.defaultStrokeDasharray,Z.strokePanel=new h("Line color",Q.defaultColorSet,Q.defaultColor),Z.strokePanel.onColorChanged=Z.setStrokeColor,Z.strokeWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),Z.strokeWidthPanel.onWidthChanged=Z.setStrokeWidth,Z.strokeStylePanel=new R("Line style",Q.defaultStrokeDasharrays,Q.defaultStrokeDasharray),Z.strokeStylePanel.onStyleChanged=Z.setStrokeDasharray,Z}return v(B,ee),B.prototype.ownsTarget=function(V){return!(!ee.prototype.ownsTarget.call(this,V)&&V!==this.visual&&V!==this.selectorLine&&V!==this.visibleLine)},B.prototype.createVisual=function(){this.visual=m.createGroup(),this.selectorLine=m.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=m.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)},B.prototype.pointerDown=function(V,X){ee.prototype.pointerDown.call(this,V,X),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},B.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()),m.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),m.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),m.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},B.prototype.setStrokeColor=function(V){this.strokeColor=V,this.adjustVisual(),this.colorChanged(V)},B.prototype.setStrokeWidth=function(V){this.strokeWidth=V,this.adjustVisual()},B.prototype.setStrokeDasharray=function(V){this.strokeDasharray=V,this.adjustVisual(),this.stateChanged()},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var V=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ee.prototype.getState.call(this));return V.typeName=B.typeName,V},B.prototype.restoreState=function(V){ee.prototype.restoreState.call(this,V);var X=V;this.strokeColor=X.strokeColor,this.strokeWidth=X.strokeWidth,this.strokeDasharray=X.strokeDasharray,this.createVisual(),this.adjustVisual()},B.typeName="LineMarker",B.title="Line marker",B.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',B}(E),T=function(ee){function B(V,X,Q,Z){var ie=ee.call(this,V,Z||'<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 ie.fonts=[],ie.fontBoxes=[],ie.fonts=X,ie.currentFont=Q,ie.setCurrentFont=ie.setCurrentFont.bind(ie),ie}return v(B,ee),B.prototype.getUi=function(){var V=this,X=document.createElement("div");return X.style.overflow="hidden",X.style.flexGrow="2",this.fonts.forEach(function(Q){var Z=document.createElement("div");Z.style.display="inline-block",Z.style.alignItems="center",Z.style.justifyContent="space-between",Z.style.padding="5px",Z.style.borderWidth="2px",Z.style.borderStyle="solid",Z.style.overflow="hidden",Z.style.maxWidth=100/V.fonts.length-5+"%",Z.style.borderColor=Q===V.currentFont?V.uiStyleSettings.toolboxAccentColor:"transparent",Z.addEventListener("click",function(){V.setCurrentFont(Q,Z)}),X.appendChild(Z);var ie=document.createElement("div");ie.style.display="flex",ie.style.minHeight="20px",ie.style.flexGrow="2",ie.style.fontFamily=Q,ie.style.overflow="hidden";var re=document.createElement("div");re.style.whiteSpace="nowrap",re.style.overflow="hidden",re.style.textOverflow="ellipsis",re.innerHTML="The quick brown fox jumps over the lazy dog",ie.appendChild(re),Z.appendChild(ie),V.fontBoxes.push(Z)}),X},B.prototype.setCurrentFont=function(V,X){var Q=this;this.currentFont=V,this.fontBoxes.forEach(function(Z){Z.style.borderColor=Z===X?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},B}(s),F=function(ee){function B(V,X,Q){var Z=ee.call(this,V,X,Q)||this;return Z.color="transparent",Z.padding=5,Z.DEFAULT_TEXT="your text here",Z.text=Z.DEFAULT_TEXT,Z.isMoved=!1,Z.color=Q.defaultColor,Z.fontFamily=Q.defaultFontFamily,Z.defaultSize={x:100,y:30},Z.setColor=Z.setColor.bind(Z),Z.setFont=Z.setFont.bind(Z),Z.renderText=Z.renderText.bind(Z),Z.sizeText=Z.sizeText.bind(Z),Z.textEditDivClicked=Z.textEditDivClicked.bind(Z),Z.showTextEditor=Z.showTextEditor.bind(Z),Z.setSize=Z.setSize.bind(Z),Z.positionTextEditor=Z.positionTextEditor.bind(Z),Z.colorPanel=new h("Color",Q.defaultColorSet,Q.defaultColor),Z.colorPanel.onColorChanged=Z.setColor,Z.fontFamilyPanel=new T("Font",Q.defaultFontFamilies,Q.defaultFontFamily),Z.fontFamilyPanel.onFontChanged=Z.setFont,Z}return v(B,ee),B.prototype.ownsTarget=function(V){if(ee.prototype.ownsTarget.call(this,V)||V===this.visual||V===this.textElement||V===this.bgRectangle)return!0;var X=!1;return this.textElement.childNodes.forEach(function(Q){Q===V&&(X=!0)}),X},B.prototype.createVisual=function(){this.visual=m.createGroup(),this.bgRectangle=m.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=m.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(m.createTransform()),this.textElement.transform.baseVal.appendItem(m.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},B.prototype.pointerDown=function(V,X){ee.prototype.pointerDown.call(this,V,X),this.isMoved=!1,this.pointerDownPoint=V,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(V),this._state="creating")},B.prototype.renderText=function(){var V=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(X){V.textElement.appendChild(m.createTSpan(X.trim()===""?" ":X.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},B.prototype.getTextScale=function(){var V=this.textElement.getBBox(),X=1;if(V.width>0&&V.height>0){var Q=(1*this.width-this.width*this.padding*2/100)/V.width,Z=(1*this.height-this.height*this.padding*2/100)/V.height;X=Math.min(Q,Z)}return X},B.prototype.getTextPosition=function(V){var X=this.textElement.getBBox(),Q=0,Z=0;return X.width>0&&X.height>0&&(Q=(this.width-X.width*V)/2,Z=this.height/2-X.height*V/2),{x:Q,y:Z}},B.prototype.sizeText=function(){var V=this.textElement.getBBox(),X=this.getTextScale(),Q=this.getTextPosition(X);Q.y-=V.y*X,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Q.x+"px, "+Q.y+"px) scale("+X+", "+X+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Q.x,Q.y),this.textElement.transform.baseVal.getItem(1).setScale(X,X))},B.prototype.manipulate=function(V){ee.prototype.manipulate.call(this,V),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(V.x-this.pointerDownPoint.x)>5||Math.abs(V.y-this.pointerDownPoint.y)>5)},B.prototype.resize=function(V){ee.prototype.resize.call(this,V),this.isMoved=!0,this.setSize(),this.sizeText()},B.prototype.setSize=function(){ee.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(m.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),m.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},B.prototype.pointerUp=function(V){var X=this.state;X==="creating"&&(this._suppressMarkerCreateEvent=!0),ee.prototype.pointerUp.call(this,V),this.setSize(),(X==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},B.prototype.showTextEditor=function(){var V=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(X){X.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var X=Number.parseFloat(V.textEditor.style.fontSize);V.textEditor.clientWidth>=Number.parseInt(V.textEditor.style.maxWidth)&&X>.9;)X-=.1,V.textEditor.style.fontSize=Math.max(X,.9)+"em"}),this.textEditor.addEventListener("keyup",function(X){X.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(X){if(X.clipboardData){var Q=X.clipboardData.getData("text"),Z=window.getSelection();if(!Z.rangeCount)return!1;Z.deleteFromDocument(),Z.getRangeAt(0).insertNode(document.createTextNode(Q)),X.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){V.textEditDivClicked(V.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},B.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var V=this.getTextScale(),X=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Q=this.textElement.getBBox(),Z={x:Q.width*V,y:Q.height*V};X.x-=Z.x/2,X.y-=Z.y/2,this.textEditor.style.top=X.y+"px",this.textEditor.style.left=X.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-X.x+"px",this.textEditor.style.fontSize=Math.max(16*V,12)+"px",this.textElement.style.display="none"}},B.prototype.textEditDivClicked=function(V){this.text=V.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},B.prototype.select=function(){ee.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},B.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ee.prototype.deselect.call(this)},B.prototype.dblClick=function(V,X){ee.prototype.dblClick.call(this,V,X),this.showTextEditor()},B.prototype.setColor=function(V){this.textElement&&m.setAttributes(this.textElement,[["fill",V]]),this.color=V,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(V)},B.prototype.setFont=function(V){this.textElement&&m.setAttributes(this.textElement,[["font-family",V]]),this.fontFamily=V,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},B.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},B.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var V=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ee.prototype.getState.call(this));return V.typeName=B.typeName,V},B.prototype.restoreState=function(V){var X=V;this.color=X.color,this.fontFamily=X.fontFamily,this.padding=X.padding,this.text=X.text,this.createVisual(),ee.prototype.restoreState.call(this,V),this.setSize()},B.prototype.scale=function(V,X){ee.prototype.scale.call(this,V,X),this.setSize(),this.sizeText(),this.positionTextEditor()},B.typeName="TextMarker",B.title="Text marker",B.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>',B}(x),M=function(ee){function B(V,X,Q){var Z=ee.call(this,V,X,Q)||this;return Z.color="transparent",Z.lineWidth=3,Z.drawing=!1,Z.pixelRatio=1,Z.color=Q.defaultColor,Z.lineWidth=Q.defaultStrokeWidth,Z.pixelRatio=Q.freehandPixelRatio,Z.setColor=Z.setColor.bind(Z),Z.addCanvas=Z.addCanvas.bind(Z),Z.finishCreation=Z.finishCreation.bind(Z),Z.setLineWidth=Z.setLineWidth.bind(Z),Z.colorPanel=new h("Color",Q.defaultColorSet,Q.defaultColor),Z.colorPanel.onColorChanged=Z.setColor,Z.lineWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),Z.lineWidthPanel.onWidthChanged=Z.setLineWidth,Z}return v(B,ee),B.prototype.ownsTarget=function(V){return!(!ee.prototype.ownsTarget.call(this,V)&&V!==this.visual&&V!==this.drawingImage)},B.prototype.createVisual=function(){this.visual=m.createGroup(),this.drawingImage=m.createImage(),this.visual.appendChild(this.drawingImage);var V=m.createTransform();this.visual.transform.baseVal.appendItem(V),this.addMarkerVisualToContainer(this.visual)},B.prototype.pointerDown=function(V,X){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(V.x,V.y),this.drawing=!0):ee.prototype.pointerDown.call(this,V,X)},B.prototype.manipulate=function(V){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(V.x,V.y),this.canvasContext.stroke()):ee.prototype.manipulate.call(this,V)},B.prototype.resize=function(V){ee.prototype.resize.call(this,V),m.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),m.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},B.prototype.pointerUp=function(V){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ee.prototype.pointerUp.call(this,V)},B.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)},B.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ee.prototype.select.call(this)},B.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ee.prototype.deselect.call(this)},B.prototype.finishCreation=function(){for(var V=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),X=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Q=X[0],Z=X[1],ie=X[2],re=X[3],$=!1,J=0;J<this.canvasElement.height;J++)for(var le=0;le<this.canvasElement.width;le++)V.data[J*this.canvasElement.width*4+4*le+3]>0&&($=!0,J<Z&&(Z=J),le<Q&&(Q=le),J>re&&(re=J),le>ie&&(ie=le));if($){this.left=Q/this.pixelRatio,this.top=Z/this.pixelRatio,this.width=(ie-Q)/this.pixelRatio,this.height=(re-Z)/this.pixelRatio;var ue=document.createElement("canvas");ue.width=ie-Q,ue.height=re-Z,ue.getContext("2d").putImageData(this.canvasContext.getImageData(Q,Z,ie-Q,re-Z),0,0),this.drawingImgUrl=ue.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},B.prototype.setDrawingImage=function(){m.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),m.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},B.prototype.setColor=function(V){this.color=V,this.colorChanged(V)},B.prototype.setLineWidth=function(V){this.lineWidth=V},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var V=Object.assign({drawingImgUrl:this.drawingImgUrl},ee.prototype.getState.call(this));return V.typeName=B.typeName,V},B.prototype.restoreState=function(V){this.createVisual(),ee.prototype.restoreState.call(this,V),this.drawingImgUrl=V.drawingImgUrl,this.setDrawingImage()},B.prototype.scale=function(V,X){ee.prototype.scale.call(this,V,X),this.setDrawingImage()},B.typeName="FreehandMarker",B.title="Freehand marker",B.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>',B}(x),L=function(ee){function B(V,X,Q){var Z=ee.call(this,V,Q||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Z.typeBoxes=[],Z.currentType=X,Z.setCurrentType=Z.setCurrentType.bind(Z),Z}return v(B,ee),B.prototype.getUi=function(){var V=this,X=document.createElement("div");X.style.display="flex",X.style.overflow="hidden",X.style.flexGrow="2";for(var Q=function(re){var $="both";switch(re){case 0:$="both";break;case 1:$="start";break;case 2:$="end";break;case 3:$="none"}var J=document.createElement("div");if(J.style.display="flex",J.style.flexGrow="2",J.style.alignItems="center",J.style.justifyContent="space-between",J.style.padding="5px",J.style.borderWidth="2px",J.style.borderStyle="solid",J.style.borderColor=$===Z.currentType?Z.uiStyleSettings.toolboxAccentColor:"transparent",J.addEventListener("click",function(){V.setCurrentType($,J)}),X.appendChild(J),$==="both"||$==="start"){var le=document.createElement("div");le.style.display="flex",le.style.alignItems="center",le.style.minHeight="20px",le.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="`+(Z.uiStyleSettings!==void 0?Z.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,le.style.marginLeft="5px",J.appendChild(le)}var ue=document.createElement("div");ue.style.display="flex",ue.style.alignItems="center",ue.style.minHeight="20px",ue.style.flexGrow="2";var xe=document.createElement("hr");if(xe.style.minWidth="20px",xe.style.border="0px",xe.style.borderTop="3px solid "+(Z.uiStyleSettings!==void 0?Z.uiStyleSettings.toolboxColor:"#eeeeee"),xe.style.flexGrow="2",ue.appendChild(xe),J.appendChild(ue),$==="both"||$==="end"){var Me=document.createElement("div");Me.style.display="flex",Me.style.alignItems="center",Me.style.minHeight="20px",Me.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="`+(Z.uiStyleSettings!==void 0?Z.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Me.style.marginRight="5px",J.appendChild(Me)}Z.typeBoxes.push(J)},Z=this,ie=0;ie<4;ie++)Q(ie);return X},B.prototype.setCurrentType=function(V,X){var Q=this;this.currentType=V,this.typeBoxes.forEach(function(Z){Z.style.borderColor=Z===X?Q.uiStyleSettings!==void 0?Q.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},B}(s),Y=function(ee){function B(V,X,Q){var Z=ee.call(this,V,X,Q)||this;return Z.arrowType="end",Z.arrowBaseHeight=10,Z.arrowBaseWidth=10,Z.getArrowPoints=Z.getArrowPoints.bind(Z),Z.setArrowType=Z.setArrowType.bind(Z),Z.arrowTypePanel=new L("Arrow type","end"),Z.arrowTypePanel.onArrowTypeChanged=Z.setArrowType,Z}return v(B,ee),B.prototype.ownsTarget=function(V){return!(!ee.prototype.ownsTarget.call(this,V)&&V!==this.arrow1&&V!==this.arrow2)},B.prototype.getArrowPoints=function(V,X){var Q=this.arrowBaseWidth+2*this.strokeWidth,Z=this.arrowBaseHeight+2*this.strokeWidth;return V-Q/2+","+(X+Z/2)+" "+V+","+(X-Z/2)+" "+(V+Q/2)+","+(X+Z/2)},B.prototype.createTips=function(){this.arrow1=m.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(m.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=m.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(m.createTransform()),this.visual.appendChild(this.arrow2)},B.prototype.pointerDown=function(V,X){ee.prototype.pointerDown.call(this,V,X),this.state==="creating"&&this.createTips()},B.prototype.adjustVisual=function(){if(ee.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",m.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),m.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var V=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),X=this.arrow1.transform.baseVal.getItem(0);X.setRotate(V,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(X,0);var Q=this.arrow2.transform.baseVal.getItem(0);Q.setRotate(V+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Q,0)}},B.prototype.setArrowType=function(V){this.arrowType=V,this.adjustVisual(),this.stateChanged()},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var V=Object.assign({arrowType:this.arrowType},ee.prototype.getState.call(this));return V.typeName=B.typeName,V},B.prototype.restoreState=function(V){ee.prototype.restoreState.call(this,V);var X=V;this.arrowType=X.arrowType,this.createTips(),this.adjustVisual()},B.typeName="ArrowMarker",B.title="Arrow marker",B.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',B}(w),K=function(ee){function B(V,X,Q){var Z=ee.call(this,V,X,Q)||this;return Z.fillColor=Q.defaultFillColor,Z.strokeWidth=0,Z.fillPanel=new h("Color",Q.defaultColorSet,Q.defaultFillColor),Z.fillPanel.onColorChanged=Z.setFillColor,Z}return v(B,ee),Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var V=ee.prototype.getState.call(this);return V.typeName=B.typeName,V},B.typeName="CoverMarker",B.title="Cover marker",B.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',B}(y),A=function(ee){function B(V,X,Q,Z){var ie=ee.call(this,V,Z||'<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 ie.opacities=[],ie.opacityBoxes=[],ie.opacities=X,ie.currentOpacity=Q,ie.setCurrentOpacity=ie.setCurrentOpacity.bind(ie),ie}return v(B,ee),B.prototype.getUi=function(){var V=this,X=document.createElement("div");return X.style.display="flex",X.style.overflow="hidden",X.style.flexGrow="2",X.style.justifyContent="space-between",this.opacities.forEach(function(Q){var Z=document.createElement("div");Z.style.display="flex",Z.style.alignItems="center",Z.style.justifyContent="center",Z.style.padding="5px",Z.style.borderWidth="2px",Z.style.borderStyle="solid",Z.style.borderColor=Q===V.currentOpacity?V.uiStyleSettings.toolboxAccentColor:"transparent",Z.addEventListener("click",function(){V.setCurrentOpacity(Q,Z)}),X.appendChild(Z);var ie=document.createElement("div");ie.innerText=100*Q+"%",Z.appendChild(ie),V.opacityBoxes.push(Z)}),X},B.prototype.setCurrentOpacity=function(V,X){var Q=this;this.currentOpacity=V,this.opacityBoxes.forEach(function(Z){Z.style.borderColor=Z===X?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},B}(s),H=function(ee){function B(V,X,Q){var Z=ee.call(this,V,X,Q)||this;return Z.setOpacity=Z.setOpacity.bind(Z),Z.fillColor=Q.defaultHighlightColor,Z.strokeWidth=0,Z.opacity=Q.defaultHighlightOpacity,Z.fillPanel=new h("Color",Q.defaultColorSet,Z.fillColor),Z.fillPanel.onColorChanged=Z.setFillColor,Z.opacityPanel=new A("Opacity",Q.defaultOpacitySteps,Z.opacity),Z.opacityPanel.onOpacityChanged=Z.setOpacity,Z}return v(B,ee),B.prototype.setOpacity=function(V){this.opacity=V,this.visual&&m.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var V=ee.prototype.getState.call(this);return V.typeName=B.typeName,V},B.typeName="HighlightMarker",B.title="Highlight marker",B.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>',B}(K),U='<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>',I=function(ee){function B(V,X,Q){var Z=ee.call(this,V,X,Q)||this;return Z.bgColor="transparent",Z.tipPosition={x:0,y:0},Z.tipBase1Position={x:0,y:0},Z.tipBase2Position={x:0,y:0},Z.tipMoving=!1,Z.color=Q.defaultStrokeColor,Z.bgColor=Q.defaultFillColor,Z.fontFamily=Q.defaultFontFamily,Z.defaultSize={x:100,y:30},Z.setBgColor=Z.setBgColor.bind(Z),Z.getTipPoints=Z.getTipPoints.bind(Z),Z.positionTip=Z.positionTip.bind(Z),Z.setTipPoints=Z.setTipPoints.bind(Z),Z.colorPanel=new h("Text color",Q.defaultColorSet,Z.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>'),Z.colorPanel.onColorChanged=Z.setColor,Z.bgColorPanel=new h("Fill color",Q.defaultColorSet,Z.bgColor,U),Z.bgColorPanel.onColorChanged=Z.setBgColor,Z.fontFamilyPanel=new T("Font",Q.defaultFontFamilies,Q.defaultFontFamily),Z.fontFamilyPanel.onFontChanged=Z.setFont,Z.tipGrip=new a,Z.tipGrip.visual.transform.baseVal.appendItem(m.createTransform()),Z.controlBox.appendChild(Z.tipGrip.visual),Z}return v(B,ee),B.prototype.ownsTarget=function(V){return ee.prototype.ownsTarget.call(this,V)||this.tipGrip.ownsTarget(V)||this.tip===V},B.prototype.createTip=function(){m.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=m.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},B.prototype.pointerDown=function(V,X){this.state==="new"&&ee.prototype.pointerDown.call(this,V,X),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(X)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ee.prototype.pointerDown.call(this,V,X)},B.prototype.pointerUp=function(V){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ee.prototype.pointerUp.call(this,V);else{var X=this.state==="creating";ee.prototype.pointerUp.call(this,V),this.setTipPoints(X),this.positionTip()}},B.prototype.manipulate=function(V){if(this.tipMoving){var X=this.unrotatePoint(V);this.tipPosition={x:X.x-this.manipulationStartLeft,y:X.y-this.manipulationStartTop},this.positionTip()}else ee.prototype.manipulate.call(this,V)},B.prototype.setBgColor=function(V){this.bgRectangle&&this.tip&&(m.setAttributes(this.bgRectangle,[["fill",V]]),m.setAttributes(this.tip,[["fill",V]])),this.bgColor=V,this.fillColorChanged(V)},B.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},B.prototype.setTipPoints=function(V){V===void 0&&(V=!1);var X=Math.min(this.height/2,15),Q=this.height/5;V&&(this.tipPosition={x:X+Q/2,y:this.height+20});var Z=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Z<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Q=this.width/5,X=Math.min(this.width/2,15),this.tipBase1Position={x:X,y:0},this.tipBase2Position={x:X+Q,y:0}):(this.tipBase1Position={x:0,y:X},this.tipBase2Position={x:0,y:X+Q}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Z<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Q=this.width/5,X=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-X-Q,y:0},this.tipBase2Position={x:this.width-X,y:0}):(this.tipBase1Position={x:this.width,y:X},this.tipBase2Position={x:this.width,y:X+Q}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Z<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Q=this.width/5,X=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-X-Q,y:this.height},this.tipBase2Position={x:this.width-X,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-X-Q},this.tipBase2Position={x:this.width,y:this.height-X}):Z<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Q=this.width/5,X=Math.min(this.width/2,15),this.tipBase1Position={x:X,y:this.height},this.tipBase2Position={x:X+Q,y:this.height}):(this.tipBase1Position={x:0,y:this.height-X},this.tipBase2Position={x:0,y:this.height-X-Q})},B.prototype.resize=function(V){ee.prototype.resize.call(this,V),this.positionTip()},B.prototype.positionTip=function(){m.setAttributes(this.tip,[["points",this.getTipPoints()]]);var V=this.tipGrip.visual.transform.baseVal.getItem(0);V.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(V,0)},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),B.prototype.select=function(){this.positionTip(),ee.prototype.select.call(this)},B.prototype.getState=function(){var V=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ee.prototype.getState.call(this));return V.typeName=B.typeName,V},B.prototype.restoreState=function(V){var X=V;this.bgColor=X.bgColor,this.tipPosition=X.tipPosition,ee.prototype.restoreState.call(this,V),this.createTip(),this.setTipPoints()},B.prototype.scale=function(V,X){ee.prototype.scale.call(this,V,X),this.tipPosition={x:this.tipPosition.x*V,y:this.tipPosition.y*X},this.positionTip()},B.typeName="CalloutMarker",B.title="Callout marker",B.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>',B}(F),G=function(ee){function B(V,X,Q){var Z=ee.call(this,V,X,Q)||this;return Z.fillColor="transparent",Z.strokeColor="transparent",Z.strokeWidth=0,Z.strokeDasharray="",Z.opacity=1,Z.strokeColor=Q.defaultColor,Z.strokeWidth=Q.defaultStrokeWidth,Z.strokeDasharray=Q.defaultStrokeDasharray,Z.fillColor=Q.defaultFillColor,Z.setStrokeColor=Z.setStrokeColor.bind(Z),Z.setFillColor=Z.setFillColor.bind(Z),Z.setStrokeWidth=Z.setStrokeWidth.bind(Z),Z.setStrokeDasharray=Z.setStrokeDasharray.bind(Z),Z.setOpacity=Z.setOpacity.bind(Z),Z.createVisual=Z.createVisual.bind(Z),Z.strokePanel=new h("Line color",g(Q.defaultColorSet,["transparent"]),Q.defaultColor),Z.strokePanel.onColorChanged=Z.setStrokeColor,Z.fillPanel=new h("Fill color",g(Q.defaultColorSet,["transparent"]),Z.fillColor,U),Z.fillPanel.onColorChanged=Z.setFillColor,Z.strokeWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),Z.strokeWidthPanel.onWidthChanged=Z.setStrokeWidth,Z.strokeStylePanel=new R("Line style",Q.defaultStrokeDasharrays,Q.defaultStrokeDasharray),Z.strokeStylePanel.onStyleChanged=Z.setStrokeDasharray,Z.opacityPanel=new A("Opacity",Q.defaultOpacitySteps,Z.opacity),Z.opacityPanel.onOpacityChanged=Z.setOpacity,Z}return v(B,ee),B.prototype.ownsTarget=function(V){return!(!ee.prototype.ownsTarget.call(this,V)&&V!==this.visual)},B.prototype.createVisual=function(){this.visual=m.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)},B.prototype.pointerDown=function(V,X){ee.prototype.pointerDown.call(this,V,X),this.state==="new"&&(this.createVisual(),this.moveVisual(V),this._state="creating")},B.prototype.manipulate=function(V){ee.prototype.manipulate.call(this,V)},B.prototype.resize=function(V){ee.prototype.resize.call(this,V),this.setSize()},B.prototype.setSize=function(){ee.prototype.setSize.call(this),m.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},B.prototype.pointerUp=function(V){ee.prototype.pointerUp.call(this,V),this.setSize()},B.prototype.setStrokeColor=function(V){this.strokeColor=V,this.visual&&m.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(V),this.stateChanged()},B.prototype.setFillColor=function(V){this.fillColor=V,this.visual&&m.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(V),this.stateChanged()},B.prototype.setStrokeWidth=function(V){this.strokeWidth=V,this.visual&&m.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},B.prototype.setStrokeDasharray=function(V){this.strokeDasharray=V,this.visual&&m.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},B.prototype.setOpacity=function(V){this.opacity=V,this.visual&&m.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var V=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ee.prototype.getState.call(this));return V.typeName=B.typeName,V},B.prototype.restoreState=function(V){var X=V;this.fillColor=X.fillColor,this.strokeColor=X.strokeColor,this.strokeWidth=X.strokeWidth,this.strokeDasharray=X.strokeDasharray,this.opacity=X.opacity,this.createVisual(),ee.prototype.restoreState.call(this,V),this.setSize()},B.prototype.scale=function(V,X){ee.prototype.scale.call(this,V,X),this.setSize()},B.typeName="EllipseMarker",B.title="Ellipse marker",B.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>',B}(x),ne=function(ee){function B(V,X,Q){return ee.call(this,V,X,Q)||this}return v(B,ee),Object.defineProperty(B.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),B.prototype.ownsTarget=function(V){return!(!ee.prototype.ownsTarget.call(this,V)&&V!==this.tip1&&V!==this.tip2)},B.prototype.createTips=function(){this.tip1=m.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(m.createTransform()),this.visual.appendChild(this.tip1),this.tip2=m.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(m.createTransform()),this.visual.appendChild(this.tip2)},B.prototype.pointerDown=function(V,X){ee.prototype.pointerDown.call(this,V,X),this.state==="creating"&&this.createTips()},B.prototype.adjustVisual=function(){if(ee.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(m.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()]]),m.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 V=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),X=this.tip1.transform.baseVal.getItem(0);X.setRotate(V,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(X,0);var Q=this.tip2.transform.baseVal.getItem(0);Q.setRotate(V+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Q,0)}},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var V=ee.prototype.getState.call(this);return V.typeName=B.typeName,V},B.prototype.restoreState=function(V){ee.prototype.restoreState.call(this,V),this.createTips(),this.adjustVisual()},B.typeName="MeasurementMarker",B.title="Measurement marker",B.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>',B}(w),oe=function(ee){function B(V,X,Q){var Z=ee.call(this,V,X,Q)||this;return Z.strokePanel.colors=Q.defaultColorSet,Z.fillColor="transparent",Z}return v(B,ee),Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var V=ee.prototype.getState.call(this);return V.typeName=B.typeName,V},B.typeName="EllipseFrameMarker",B.title="Ellipse frame marker",B.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>',B}(G),de=function(){function ee(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ee.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ee.prototype.addUndoStep=function(B){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(B)||(this.undoStack.push(B),JSON.stringify(this.lastRedoStep)!==JSON.stringify(B)&&this.redoStack.splice(0,this.redoStack.length))},ee.prototype.replaceLastUndoStep=function(B){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=B)},ee.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ee.prototype.undo=function(){if(this.undoStack.length>1){var B=this.undoStack.pop();return B!==void 0&&this.redoStack.push(B),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ee.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ee}(),Oe=function(ee){function B(V,X,Q){var Z=ee.call(this,V,X,Q)||this;return Z.strokeColor="transparent",Z.strokeWidth=0,Z.strokeDasharray="",Z.curveX=0,Z.curveY=0,Z.manipulationStartCurveX=0,Z.manipulationStartCurveY=0,Z.setStrokeColor=Z.setStrokeColor.bind(Z),Z.setStrokeWidth=Z.setStrokeWidth.bind(Z),Z.setStrokeDasharray=Z.setStrokeDasharray.bind(Z),Z.positionGrips=Z.positionGrips.bind(Z),Z.addControlGrips=Z.addControlGrips.bind(Z),Z.adjustVisual=Z.adjustVisual.bind(Z),Z.setupControlBox=Z.setupControlBox.bind(Z),Z.resize=Z.resize.bind(Z),Z.strokeColor=Q.defaultColor,Z.strokeWidth=Q.defaultStrokeWidth,Z.strokeDasharray=Q.defaultStrokeDasharray,Z.strokePanel=new h("Line color",Q.defaultColorSet,Q.defaultColor),Z.strokePanel.onColorChanged=Z.setStrokeColor,Z.strokeWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),Z.strokeWidthPanel.onWidthChanged=Z.setStrokeWidth,Z.strokeStylePanel=new R("Line style",Q.defaultStrokeDasharrays,Q.defaultStrokeDasharray),Z.strokeStylePanel.onStyleChanged=Z.setStrokeDasharray,Z}return v(B,ee),B.prototype.ownsTarget=function(V){return!(!ee.prototype.ownsTarget.call(this,V)&&V!==this.visual&&V!==this.selectorCurve&&V!==this.visibleCurve&&!this.curveGrip.ownsTarget(V))},B.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},B.prototype.createVisual=function(){this.visual=m.createGroup(),this.selectorCurve=m.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=m.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)},B.prototype.pointerDown=function(V,X){ee.prototype.pointerDown.call(this,V,X),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=V.x,this.curveY=V.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(X)&&(this.activeGrip=this.curveGrip,this._state="resize")},B.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),m.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),m.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),m.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},B.prototype.setupControlBox=function(){ee.prototype.setupControlBox.call(this),this.curveControlLine1=m.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=m.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)},B.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ee.prototype.addControlGrips.call(this)},B.prototype.positionGrips=function(){ee.prototype.positionGrips.call(this);var V=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-V/2,this.curveY-V/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()))},B.prototype.manipulate=function(V){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+V.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+V.y-this.manipulationStartY),ee.prototype.manipulate.call(this,V)},B.prototype.resize=function(V){this.activeGrip===this.curveGrip&&(this.curveX=V.x,this.curveY=V.y),ee.prototype.resize.call(this,V),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},B.prototype.setStrokeColor=function(V){this.strokeColor=V,this.adjustVisual(),this.colorChanged(V)},B.prototype.setStrokeWidth=function(V){this.strokeWidth=V,this.adjustVisual()},B.prototype.setStrokeDasharray=function(V){this.strokeDasharray=V,this.adjustVisual()},B.prototype.scale=function(V,X){this.curveX=this.curveX*V,this.curveY=this.curveY*X,ee.prototype.scale.call(this,V,X)},Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),B.prototype.getState=function(){var V=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ee.prototype.getState.call(this));return V.typeName=B.typeName,V},B.prototype.restoreState=function(V){ee.prototype.restoreState.call(this,V);var X=V;this.strokeColor=X.strokeColor,this.strokeWidth=X.strokeWidth,this.strokeDasharray=X.strokeDasharray,this.curveX=X.curveX,this.curveY=X.curveY,this.createVisual(),this.adjustVisual()},B.typeName="CurveMarker",B.title="Curve marker",B.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>',B}(E),Ae=function(){function ee(B,V){V===void 0&&(V=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=B,this.cancelable=V}return Object.defineProperty(ee.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ee.prototype.preventDefault=function(){this._defaultPrevented=!0},ee}(),pe=function(ee){function B(V,X,Q){var Z=ee.call(this,V,!1)||this;return Z.dataUrl=X,Z.state=Q,Z}return v(B,ee),B}(Ae),Se=function(ee){function B(V,X,Q){Q===void 0&&(Q=!1);var Z=ee.call(this,V,Q)||this;return Z.marker=X,Z}return v(B,ee),B}(Ae),be=function(){function ee(){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 ee.prototype.addEventListener=function(B,V){this[B].push(V)},ee.prototype.removeEventListener=function(B,V){var X=this[B].indexOf(V);X>-1&&this[B].splice(X,1)},ee}(),se=function(){function ee(B){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new b,this._isOpen=!1,this.undoRedoManager=new de,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 be,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ee.instanceCounter++,this.styles=new d(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=B,this.targetRoot=document.body,this.width=B.clientWidth,this.height=B.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(ee.prototype,"ALL_MARKER_TYPES",{get:function(){return[O,M,Y,F,oe,G,H,I,ne,K,w,Oe]},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[O,M,Y,F,G,H,I]},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"BASIC_MARKER_TYPES",{get:function(){return[O,M,Y,F,H]},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(B){var V=this;this._availableMarkerTypes.splice(0),B.forEach(function(X){if(typeof X=="string"){var Q=V.ALL_MARKER_TYPES.find(function(Z){return Z.typeName===X});Q!==void 0&&V._availableMarkerTypes.push(Q)}else V._availableMarkerTypes.push(X)})},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(B){this._zoomLevel=B,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(ee.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ee.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),S.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ee.prototype.show=function(){var B=this;this.styles.styleSheetRoot===void 0&&t.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=t.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(V){return V(new Ae(B))})},ee.prototype.render=function(){return C(this,void 0,void 0,function(){var B;return N(this,function(V){switch(V.label){case 0:return this.setCurrentMarker(),(B=new _).naturalSize=this.renderAtNaturalSize,B.imageType=this.renderImageType,B.imageQuality=this.renderImageQuality,B.markersOnly=this.renderMarkersOnly,B.width=this.renderWidth,B.height=this.renderHeight,[4,B.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return V.sent(),[4,B.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,V.sent()]}})})},ee.prototype.close=function(B){var V=this;if(B===void 0&&(B=!1),this.isOpen){var X=!1;B||this.eventListeners.beforeclose.forEach(function(Q){var Z=new Ae(V,!0);Q(Z),Z.defaultPrevented&&(X=!0)}),X||(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(Q){return Q(new Ae(V))}),this.detachEvents(),this._isOpen=!1)}},ee.prototype.addMarkersToToolbar=function(){for(var B,V=[],X=0;X<arguments.length;X++)V[X]=arguments[X];(B=this._availableMarkerTypes).push.apply(B,V)},ee.prototype.addRenderEventListener=function(B){this.addEventListener("render",function(V){B(V.dataUrl,V.state)})},ee.prototype.removeRenderEventListener=function(B){},ee.prototype.addCloseEventListener=function(B){this.addEventListener("close",function(){B()})},ee.prototype.removeCloseEventListener=function(B){},ee.prototype.setupResizeObserver=function(){var B=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){B.resize(B.target.clientWidth,B.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return B.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ee.prototype.onPopupTargetResize=function(){var B=1*this.target.clientWidth/this.target.clientHeight,V=this.editorCanvas.clientWidth/B>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*B:this.editorCanvas.clientWidth,X=V<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/B;this.resize(V,X)},ee.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ee.prototype.resize=function(B,V){this._isResizing=!0;var X=B/this.imageWidth,Q=V/this.imageHeight;this.imageWidth=Math.round(B),this.imageHeight=Math.round(V),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(X,Q),this._isResizing=!1},ee.prototype.scaleMarkers=function(B,V){var X,Q=this;this._currentMarker&&this._currentMarker instanceof F?this._currentMarker.scale(B,V):(X=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Z){Z!==Q._currentMarker&&Z.scale(B,V)}),X!==void 0&&this.setCurrentMarker(X)},ee.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"},ee.prototype.setTopLeft=function(){var B=this.editingTarget.getBoundingClientRect(),V=this.editorCanvas.getBoundingClientRect();this.left=B.left-V.left,this.top=B.top-V.top},ee.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)},ee.prototype.addDefs=function(){for(var B,V=[],X=0;X<arguments.length;X++)V[X]=arguments[X];this.defs=m.createDefs(),this.addDefsToImage(),(B=this.defs).append.apply(B,V)},ee.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ee.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)},ee.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ee.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ee.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)},ee.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ee.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)},ee.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 B=document.createElement("a");B.href="https://markerjs.com/",B.target="_blank",B.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>',B.title="Powered by marker.js",B.style.display="grid",B.style.alignItems="center",B.style.justifyItems="center",B.style.padding="3px",B.style.width="20px",B.style.height="20px",this.logoUI.appendChild(B),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ee.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")},ee.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"},ee.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ee.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 B=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=B+"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 o(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 n(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ee.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ee.prototype.removeMarker=function(B){this.markerImage.removeChild(B.container),this.markers.indexOf(B)>-1&&this.markers.splice(this.markers.indexOf(B),1),B.dispose()},ee.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())},ee.prototype.toolbarButtonClicked=function(B,V){if(B==="marker"&&V!==void 0)this.createNewMarker(V);else if(B==="action")switch(V){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()}},ee.prototype.deleteSelectedMarker=function(){var B=this;if(this._currentMarker!==void 0){var V=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Q){var Z=new Se(B,B._currentMarker,!0);Q(Z),Z.defaultPrevented&&(V=!0)}),!V){var X=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(Q){return Q(new Se(B,X))})}}},ee.prototype.clear=function(){var B=this,V=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ie){var re=new Se(B,void 0,!0);ie(re),re.defaultPrevented&&(V=!0)}),!V)){this.setCurrentMarker();for(var X=function(ie){var re=Q.markers[ie];Q.setCurrentMarker(Q.markers[ie]),Q._currentMarker.dispose(),Q.markerImage.removeChild(Q._currentMarker.container),Q.markers.splice(Q.markers.indexOf(Q._currentMarker),1),Q.eventListeners.markerdelete.forEach(function($){return $(new Se(B,re))})},Q=this,Z=this.markers.length-1;Z>=0;Z--)X(Z);this.addUndoStep()}},Object.defineProperty(ee.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ee.prototype.showNotesEditor=function(){var B;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=(B=this._currentMarker.notes)!==null&&B!==void 0?B:"",this.overlayContainer.appendChild(this.notesArea))},ee.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)},ee.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ee.prototype.addUndoStep=function(){var B=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var V=this.getState(),X=this.undoRedoManager.getLastUndoStep();if(!X||X.width===V.width&&X.height===V.height){var Q=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(V),Q<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Z){return Z(new Ae(B))})}else this.undoRedoManager.replaceLastUndoStep(V),this.eventListeners.statechange.forEach(function(Z){return Z(new Ae(B))})}},ee.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ee.prototype.undoStep=function(){var B=this,V=this.undoRedoManager.undo();V!==void 0&&(this.restoreState(V),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(X){return X(new Ae(B))}))},ee.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ee.prototype.redoStep=function(){var B=this,V=this.undoRedoManager.redo();V!==void 0&&(this.restoreState(V),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(X){return X(new Ae(B))}))},ee.prototype.stepZoom=function(){var B=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=B<this.zoomSteps.length-1?this.zoomSteps[B+1]:this.zoomSteps[0]},ee.prototype.panTo=function(B){this.contentDiv.scrollBy({left:this.prevPanPoint.x-B.x,top:this.prevPanPoint.y-B.y}),this.prevPanPoint=B},ee.prototype.startRenderAndClose=function(){return C(this,void 0,void 0,function(){var B,V,X=this;return N(this,function(Q){switch(Q.label){case 0:return[4,this.render()];case 1:return B=Q.sent(),V=this.getState(),this.eventListeners.render.forEach(function(Z){return Z(new pe(X,B,V))}),this.close(!0),[2]}})})},ee.prototype.getState=function(B){B===!0&&this.setCurrentMarker();var V={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(X){return V.markers.push(X.getState())}),V},ee.prototype.restoreState=function(B){var V=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);B.markers.forEach(function(X){var Q=V._availableMarkerTypes.find(function(ie){return ie.typeName===X.typeName});if(Q!==void 0){var Z=V.addNewMarker(Q);Z.restoreState(X),V.markers.push(Z)}}),B.width&&B.height&&(B.width!==this.imageWidth||B.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/B.width,this.imageHeight/B.height),this.eventListeners.restorestate.forEach(function(X){return X(new Ae(V))})},ee.prototype.addNewMarker=function(B){var V=m.createGroup();return this.markerImage.appendChild(V),new B(V,this.overlayContainer,this.settings)},ee.prototype.createNewMarker=function(B){var V,X=this;(V=typeof B=="string"?this._availableMarkerTypes.find(function(Q){return Q.typeName===B}):B)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(V),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(V.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Q){return Q(new Se(X,X._currentMarker))}))},ee.prototype.markerCreated=function(B){var V=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(B),this.setCurrentMarker(B),B instanceof M&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(M):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(X){return X(new Se(V,V._currentMarker))})},ee.prototype.colorChanged=function(B){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=B,this.settings.defaultStrokeColor=B)},ee.prototype.fillColorChanged=function(B){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=B)},ee.prototype.markerStateChanged=function(B){var V=this;this.eventListeners.markerchange.forEach(function(X){return X(new Se(V,B))})},ee.prototype.setCurrentMarker=function(B){var V=this;this._currentMarker!==B&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(X){return X(new Se(V,V._currentMarker))})),this._currentMarker=B,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(X){return X(new Se(V,V._currentMarker))}))},ee.prototype.onPointerDown=function(B){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||B.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var V=this.markers.find(function(X){return X.ownsTarget(B.target)});V!==void 0?(this.setCurrentMarker(V),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(B.clientX,B.clientY),B.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:B.clientX,y:B.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(B.clientX,B.clientY))},ee.prototype.onDblClick=function(B){if(this._isFocused||this.focus(),this.mode==="select"){var V=this.markers.find(function(X){return X.ownsTarget(B.target)});V!==void 0&&V!==this._currentMarker&&this.setCurrentMarker(V),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(B.clientX,B.clientY),B.target):this.setCurrentMarker()}},ee.prototype.onPointerMove=function(B){this.touchPoints!==1&&B.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||B.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(B.clientX,B.clientY)):this.zoomLevel>1&&this.panTo({x:B.clientX,y:B.clientY}))},ee.prototype.onPointerUp=function(B){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(B.clientX,B.clientY)),this.isDragging=!1,this.addUndoStep()},ee.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ee.prototype.onKeyUp=function(B){this._currentMarker===void 0||this.notesArea!==void 0||B.key!=="Delete"&&B.key!=="Backspace"||this.deleteSelectedMarker()},ee.prototype.clientToLocalCoordinates=function(B,V){var X=this.markerImage.getBoundingClientRect();return{x:(B-X.left)/this.zoomLevel,y:(V-X.top)/this.zoomLevel}},ee.prototype.onWindowResize=function(){this.positionUI()},ee.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var B=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=B+"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()},ee.prototype.addLicenseKey=function(B){S.addKey(B)},ee.prototype.addEventListener=function(B,V){this.eventListeners.addEventListener(B,V)},ee.prototype.removeEventListener=function(B,V){this.eventListeners.removeEventListener(B,V)},ee.prototype.renderState=function(B){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(B),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ee.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ee.prototype.focus=function(){var B=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(V){return V(new Ae(B))}))},ee.prototype.blur=function(){var B=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(V){return V(new Ae(B))}))},ee.instanceCounter=0,ee}()},Sjjz:function(W,q,D){W.exports={flexRow:"flexRow___1u_bL",flexColumn:"flexColumn___1kaUk",formWrap:"formWrap___31wys",example:"example___Cqoob",footerWrap:"footerWrap___2syNI"}},T8No:function(W,q,D){"use strict";D.d(q,"a",function(){return S}),D.d(q,"e",function(){return _}),D.d(q,"c",function(){return w}),D.d(q,"b",function(){return T}),D.d(q,"d",function(){return F}),D.d(q,"f",function(){return Y});var P=D("MNsG"),v=D("N0LK"),C=D("Cg/j");let N=P.k||"";const g=new Map;g.set("false",!1),g.set("true",!0),g.set("isMac",P.f),g.set("isLinux",P.d),g.set("isWindows",P.i),g.set("isWeb",P.h),g.set("isMacNative",P.f&&!P.h),g.set("isEdge",N.indexOf("Edg/")>=0),g.set("isFirefox",N.indexOf("Firefox")>=0),g.set("isChrome",N.indexOf("Chrome")>=0),g.set("isSafari",N.indexOf("Safari")>=0);const m=Object.prototype.hasOwnProperty;class S{static has(A){return c.create(A)}static equals(A,H){return o.create(A,H)}static regex(A,H){return p.create(A,H)}static not(A){return f.create(A)}static and(...A){return b.create(A,null)}static or(...A){return E.create(A,null,!0)}static deserialize(A,H=!1){return A?this._deserializeOrExpression(A,H):void 0}static _deserializeOrExpression(A,H){let U=A.split("||");return E.create(U.map(I=>this._deserializeAndExpression(I,H)),null,!0)}static _deserializeAndExpression(A,H){let U=A.split("&&");return b.create(U.map(I=>this._deserializeOne(I,H)),null)}static _deserializeOne(A,H){if(A=A.trim(),A.indexOf("!=")>=0){let U=A.split("!=");return h.create(U[0].trim(),this._deserializeValue(U[1],H))}if(A.indexOf("==")>=0){let U=A.split("==");return o.create(U[0].trim(),this._deserializeValue(U[1],H))}if(A.indexOf("=~")>=0){let U=A.split("=~");return p.create(U[0].trim(),this._deserializeRegexValue(U[1],H))}if(A.indexOf(" in ")>=0){let U=A.split(" in ");return n.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(A)){const U=A.split(">=");return r.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(A)){const U=A.split(">");return a.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(A)){const U=A.split("<=");return y.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(A)){const U=A.split("<");return x.create(U[0].trim(),U[1].trim())}return/^\!\s*/.test(A)?f.create(A.substr(1).trim()):c.create(A)}static _deserializeValue(A,H){if(A=A.trim(),A==="true")return!0;if(A==="false")return!1;let U=/^'([^']*)'$/.exec(A);return U?U[1].trim():A}static _deserializeRegexValue(A,H){if(Object(v.C)(A)){if(H)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let U=A.indexOf("/"),I=A.lastIndexOf("/");if(U===I||U<0){if(H)throw new Error(`bad regexp-value '${A}', missing /-enclosure`);return console.warn(`bad regexp-value '${A}', missing /-enclosure`),null}let G=A.slice(U+1,I),ne=A[I+1]==="i"?"i":"";try{return new RegExp(G,ne)}catch(oe){if(H)throw new Error(`bad regexp-value '${A}', parse error: ${oe}`);return console.warn(`bad regexp-value '${A}', parse error: ${oe}`),null}}}function _(A,H){const U=A?A.substituteConstants():void 0,I=H?H.substituteConstants():void 0;return!U&&!I?!0:!U||!I?!1:U.equals(I)}function t(A,H){return A.cmp(H)}class d{constructor(){this.type=0}cmp(A){return this.type-A.type}equals(A){return A.type===this.type}substituteConstants(){return this}evaluate(A){return!1}serialize(){return"false"}keys(){return[]}negate(){return i.INSTANCE}}d.INSTANCE=new d;class i{constructor(){this.type=1}cmp(A){return this.type-A.type}equals(A){return A.type===this.type}substituteConstants(){return this}evaluate(A){return!0}serialize(){return"true"}keys(){return[]}negate(){return d.INSTANCE}}i.INSTANCE=new i;class c{constructor(A,H){this.key=A,this.negated=H,this.type=2}static create(A,H=null){const U=g.get(A);return typeof U=="boolean"?U?i.INSTANCE:d.INSTANCE:new c(A,H)}cmp(A){return A.type!==this.type?this.type-A.type:M(this.key,A.key)}equals(A){return A.type===this.type?this.key===A.key:!1}substituteConstants(){const A=g.get(this.key);return typeof A=="boolean"?A?i.INSTANCE:d.INSTANCE:this}evaluate(A){return!!A.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this)),this.negated}}class o{constructor(A,H,U){this.key=A,this.value=H,this.negated=U,this.type=4}static create(A,H,U=null){if(typeof H=="boolean")return H?c.create(A,U):f.create(A,U);const I=g.get(A);if(typeof I=="boolean"){const G=I?"true":"false";return H===G?i.INSTANCE:d.INSTANCE}return new o(A,H,U)}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){const A=g.get(this.key);if(typeof A=="boolean"){const H=A?"true":"false";return this.value===H?i.INSTANCE:d.INSTANCE}return this}evaluate(A){return A.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this.value,this)),this.negated}}class n{constructor(A,H){this.key=A,this.valueKey=H,this.type=10,this.negated=null}static create(A,H){return new n(A,H)}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.valueKey,A.key,A.valueKey)}equals(A){return A.type===this.type?this.key===A.key&&this.valueKey===A.valueKey:!1}substituteConstants(){return this}evaluate(A){const H=A.getValue(this.valueKey),U=A.getValue(this.key);return Array.isArray(H)?H.indexOf(U)>=0:typeof U=="string"&&typeof H=="object"&&H!==null?m.call(H,U):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=s.create(this)),this.negated}}class s{constructor(A){this._actual=A,this.type=11}static create(A){return new s(A)}cmp(A){return A.type!==this.type?this.type-A.type:this._actual.cmp(A._actual)}equals(A){return A.type===this.type?this._actual.equals(A._actual):!1}substituteConstants(){return this}evaluate(A){return!this._actual.evaluate(A)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class h{constructor(A,H,U){this.key=A,this.value=H,this.negated=U,this.type=5}static create(A,H,U=null){if(typeof H=="boolean")return H?f.create(A,U):c.create(A,U);const I=g.get(A);if(typeof I=="boolean"){const G=I?"true":"false";return H===G?d.INSTANCE:i.INSTANCE}return new h(A,H,U)}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){const A=g.get(this.key);if(typeof A=="boolean"){const H=A?"true":"false";return this.value===H?d.INSTANCE:i.INSTANCE}return this}evaluate(A){return A.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this.value,this)),this.negated}}class f{constructor(A,H){this.key=A,this.negated=H,this.type=3}static create(A,H=null){const U=g.get(A);return typeof U=="boolean"?U?d.INSTANCE:i.INSTANCE:new f(A,H)}cmp(A){return A.type!==this.type?this.type-A.type:M(this.key,A.key)}equals(A){return A.type===this.type?this.key===A.key:!1}substituteConstants(){const A=g.get(this.key);return typeof A=="boolean"?A?d.INSTANCE:i.INSTANCE:this}evaluate(A){return!A.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=c.create(this.key,this)),this.negated}}function l(A,H){if(typeof A=="string"){const U=parseFloat(A);isNaN(U)||(A=U)}return typeof A=="string"||typeof A=="number"?H(A):d.INSTANCE}class a{constructor(A,H,U){this.key=A,this.value=H,this.negated=U,this.type=12}static create(A,H,U=null){return l(H,I=>new a(A,I,U))}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=y.create(this.key,this.value,this)),this.negated}}class r{constructor(A,H,U){this.key=A,this.value=H,this.negated=U,this.type=13}static create(A,H,U=null){return l(H,I=>new r(A,I,U))}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=x.create(this.key,this.value,this)),this.negated}}class x{constructor(A,H,U){this.key=A,this.value=H,this.negated=U,this.type=14}static create(A,H,U=null){return l(H,I=>new x(A,I,U))}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=r.create(this.key,this.value,this)),this.negated}}class y{constructor(A,H,U){this.key=A,this.value=H,this.negated=U,this.type=15}static create(A,H,U=null){return l(H,I=>new y(A,I,U))}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=a.create(this.key,this.value,this)),this.negated}}class p{constructor(A,H){this.key=A,this.regexp=H,this.type=7,this.negated=null}static create(A,H){return new p(A,H)}cmp(A){if(A.type!==this.type)return this.type-A.type;if(this.key<A.key)return-1;if(this.key>A.key)return 1;const H=this.regexp?this.regexp.source:"",U=A.regexp?A.regexp.source:"";return H<U?-1:H>U?1:0}equals(A){if(A.type===this.type){const H=this.regexp?this.regexp.source:"",U=A.regexp?A.regexp.source:"";return this.key===A.key&&H===U}return!1}substituteConstants(){return this}evaluate(A){let H=A.getValue(this.key);return this.regexp?this.regexp.test(H):!1}serialize(){const A=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${A}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this)),this.negated}}class R{constructor(A){this._actual=A,this.type=8}static create(A){return new R(A)}cmp(A){return A.type!==this.type?this.type-A.type:this._actual.cmp(A._actual)}equals(A){return A.type===this.type?this._actual.equals(A._actual):!1}substituteConstants(){return this}evaluate(A){return!this._actual.evaluate(A)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function O(A){let H=null;for(let U=0,I=A.length;U<I;U++){const G=A[U].substituteConstants();if(A[U]!==G&&H===null){H=[];for(let ne=0;ne<U;ne++)H[ne]=A[ne]}H!==null&&(H[U]=G)}return H===null?A:H}class b{constructor(A,H){this.expr=A,this.negated=H,this.type=6}static create(A,H){return b._normalizeArr(A,H)}cmp(A){if(A.type!==this.type)return this.type-A.type;if(this.expr.length<A.expr.length)return-1;if(this.expr.length>A.expr.length)return 1;for(let H=0,U=this.expr.length;H<U;H++){const I=t(this.expr[H],A.expr[H]);if(I!==0)return I}return 0}equals(A){if(A.type===this.type){if(this.expr.length!==A.expr.length)return!1;for(let H=0,U=this.expr.length;H<U;H++)if(!this.expr[H].equals(A.expr[H]))return!1;return!0}return!1}substituteConstants(){const A=O(this.expr);return A===this.expr?this:b.create(A,this.negated)}evaluate(A){for(let H=0,U=this.expr.length;H<U;H++)if(!this.expr[H].evaluate(A))return!1;return!0}static _normalizeArr(A,H){const U=[];let I=!1;for(const G of A){if(!G)continue;if(G.type===1){I=!0;continue}if(G.type===0)return d.INSTANCE;if(G.type===6){U.push(...G.expr);continue}U.push(G)}if(U.length===0&&I)return i.INSTANCE;if(U.length===0)return;if(U.length===1)return U[0];U.sort(t);for(let G=1;G<U.length;G++)U[G-1].equals(U[G])&&(U.splice(G,1),G--);if(U.length===1)return U[0];for(;U.length>1;){const G=U[U.length-1];if(G.type!==9)break;U.pop();const ne=U.pop(),oe=U.length===0,de=E.create(G.expr.map(Oe=>b.create([Oe,ne],null)),null,oe);de&&(U.push(de),U.sort(t))}return U.length===1?U[0]:new b(U,H)}serialize(){return this.expr.map(A=>A.serialize()).join(" && ")}keys(){const A=[];for(let H of this.expr)A.push(...H.keys());return A}negate(){if(!this.negated){const A=[];for(let H of this.expr)A.push(H.negate());this.negated=E.create(A,this,!0)}return this.negated}}class E{constructor(A,H){this.expr=A,this.negated=H,this.type=9}static create(A,H,U){return E._normalizeArr(A,H,U)}cmp(A){if(A.type!==this.type)return this.type-A.type;if(this.expr.length<A.expr.length)return-1;if(this.expr.length>A.expr.length)return 1;for(let H=0,U=this.expr.length;H<U;H++){const I=t(this.expr[H],A.expr[H]);if(I!==0)return I}return 0}equals(A){if(A.type===this.type){if(this.expr.length!==A.expr.length)return!1;for(let H=0,U=this.expr.length;H<U;H++)if(!this.expr[H].equals(A.expr[H]))return!1;return!0}return!1}substituteConstants(){const A=O(this.expr);return A===this.expr?this:E.create(A,this.negated,!1)}evaluate(A){for(let H=0,U=this.expr.length;H<U;H++)if(this.expr[H].evaluate(A))return!0;return!1}static _normalizeArr(A,H,U){let I=[],G=!1;if(A){for(let ne=0,oe=A.length;ne<oe;ne++){const de=A[ne];if(!de)continue;if(de.type===0){G=!0;continue}if(de.type===1)return i.INSTANCE;if(de.type===9){I=I.concat(de.expr);continue}I.push(de)}if(I.length===0&&G)return d.INSTANCE;I.sort(t)}if(I.length===0)return;if(I.length===1)return I[0];for(let ne=1;ne<I.length;ne++)I[ne-1].equals(I[ne])&&(I.splice(ne,1),ne--);if(I.length===1)return I[0];if(U){for(let ne=0;ne<I.length;ne++)for(let oe=ne+1;oe<I.length;oe++)Y(I[ne],I[oe])&&(I.splice(oe,1),oe--);if(I.length===1)return I[0]}return new E(I,H)}serialize(){return this.expr.map(A=>A.serialize()).join(" || ")}keys(){const A=[];for(let H of this.expr)A.push(...H.keys());return A}negate(){if(!this.negated){let A=[];for(let H of this.expr)A.push(H.negate());for(;A.length>1;){const H=A.shift(),U=A.shift(),I=[];for(const ne of K(H))for(const oe of K(U))I.push(b.create([ne,oe],null));const G=A.length===0;A.unshift(E.create(I,null,G))}this.negated=A[0]}return this.negated}}class w extends c{constructor(A,H,U){super(A,null);this._defaultValue=H,typeof U=="object"?w._info.push(Object.assign(Object.assign({},U),{key:A})):U!==!0&&w._info.push({key:A,description:U,type:H!=null?typeof H:void 0})}static all(){return w._info.values()}bindTo(A){return A.createKey(this.key,this._defaultValue)}getValue(A){return A.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(A){return o.create(this.key,A)}}w._info=[];const T=Object(C.c)("contextKeyService"),F="setContext";function M(A,H){return A<H?-1:A>H?1:0}function L(A,H,U,I){return A<U?-1:A>U?1:H<I?-1:H>I?1:0}function Y(A,H){if(H.type===6&&A.type!==9&&A.type!==6){for(const G of H.expr)if(A.equals(G))return!0}const U=A.negate(),I=K(U).concat(K(H));I.sort(t);for(let G=0;G<I.length;G++){const ne=I[G],oe=ne.negate();for(let de=G+1;de<I.length;de++){const Oe=I[de];if(oe.equals(Oe))return!0}}return!1}function K(A){return A.type===9?A.expr:[A]}},TXwP:function(W,q,D){var P,v;(function(){var C;(function(){"use strict";var g=[,,function(t){function d(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}d.prototype.clone_empty=function(){var o=new d(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},d.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},d.prototype.has_match=function(o){for(var n=this.__items.length-1;n>=0;n--)if(this.__items[n].match(o))return!0;return!1},d.prototype.set_indent=function(o,n){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=n||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},d.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},d.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},d.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},d.prototype.is_empty=function(){return this.__items.length===0},d.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},d.prototype.push=function(o){this.__items.push(o);var n=o.lastIndexOf(`
|
|
|
`);n!==-1?this.__character_count=o.length-n:this.__character_count+=o.length},d.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},d.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},d.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},d.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},d.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function i(o,n){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),n=n||"",o.indent_level>0&&(n=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}i.prototype.get_indent_size=function(o,n){var s=this.__base_string_length;return n=n||0,o<0&&(s=0),s+=o*this.__indent_size,s+=n,s},i.prototype.get_indent_string=function(o,n){var s=this.__base_string;return n=n||0,o<0&&(o=0,s=""),n+=o*this.__indent_size,this.__ensure_cache(n),s+=this.__cache[n],s},i.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var o=this.__cache.length,n=0,s="";this.__indent_size&&o>=this.__indent_size&&(n=Math.floor(o/this.__indent_size),o-=n*this.__indent_size,s=new Array(n+1).join(this.__indent_string)),o&&(s+=new Array(o+1).join(" ")),this.__cache.push(s)};function c(o,n){this.__indent_cache=new i(o,n),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new d(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(o,n){return this.__indent_cache.get_indent_string(o,n)},c.prototype.get_indent_size=function(o,n){return this.__indent_cache.get_indent_size(o,n)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(o){this.trim(!0);var n=this.current_line.pop();n&&(n[n.length-1]===`
|
|
|
`&&(n=n.replace(/\n+$/g,"")),this.current_line.push(n)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
|
|
|
`);return o!==`
|
|
|
`&&(s=s.replace(/[\n]/g,o)),s},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(o,n){return o=o||0,n=n||0,this.next_line.set_indent(o,n),this.__lines.length>1?(this.current_line.set_indent(o,n),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(o){for(var n=0;n<o.newlines;n++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},c.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},c.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},c.prototype.remove_indent=function(o){for(var n=this.__lines.length;o<n;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},c.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},c.prototype.just_added_newline=function(){return this.current_line.is_empty()},c.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},c.prototype.ensure_empty_line_above=function(o,n){for(var s=this.__lines.length-2;s>=0;){var h=this.__lines[s];if(h.is_empty())break;if(h.item(0).indexOf(o)!==0&&h.item(-1)!==n){this.__lines.splice(s+1,0,new d(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},t.exports.Output=c},,,,function(t){function d(o,n){this.raw_options=i(o,n),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}d.prototype._get_array=function(o,n){var s=this.raw_options[o],h=n||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(h=s.concat()):typeof s=="string"&&(h=s.split(/[^a-zA-Z0-9_\/\-]+/)),h},d.prototype._get_boolean=function(o,n){var s=this.raw_options[o],h=s===void 0?!!n:!!s;return h},d.prototype._get_characters=function(o,n){var s=this.raw_options[o],h=n||"";return typeof s=="string"&&(h=s.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),h},d.prototype._get_number=function(o,n){var s=this.raw_options[o];n=parseInt(n,10),isNaN(n)&&(n=0);var h=parseInt(s,10);return isNaN(h)&&(h=n),h},d.prototype._get_selection=function(o,n,s){var h=this._get_selection_list(o,n,s);if(h.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
|
|
|
`+n+`
|
|
|
You passed in: '`+this.raw_options[o]+"'");return h[0]},d.prototype._get_selection_list=function(o,n,s){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[n[0]],!this._is_valid_selection(s,n))throw new Error("Invalid Default Value!");var h=this._get_array(o,s);if(!this._is_valid_selection(h,n))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
|
|
|
`+n+`
|
|
|
You passed in: '`+this.raw_options[o]+"'");return h},d.prototype._is_valid_selection=function(o,n){return o.length&&n.length&&!o.some(function(s){return n.indexOf(s)===-1})};function i(o,n){var s={};o=c(o);var h;for(h in o)h!==n&&(s[h]=o[h]);if(n&&o[n])for(h in o[n])s[h]=o[n][h];return s}function c(o){var n={},s;for(s in o){var h=s.replace(/-/g,"_");n[h]=o[s]}return n}t.exports.Options=d,t.exports.normalizeOpts=c,t.exports.mergeOpts=i},,function(t){var d=RegExp.prototype.hasOwnProperty("sticky");function i(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}i.prototype.restart=function(){this.__position=0},i.prototype.back=function(){this.__position>0&&(this.__position-=1)},i.prototype.hasNext=function(){return this.__position<this.__input_length},i.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__input.charAt(this.__position),this.__position+=1),c},i.prototype.peek=function(c){var o=null;return c=c||0,c+=this.__position,c>=0&&c<this.__input_length&&(o=this.__input.charAt(c)),o},i.prototype.__match=function(c,o){c.lastIndex=o;var n=c.exec(this.__input);return n&&!(d&&c.sticky)&&(n.index!==o&&(n=null)),n},i.prototype.test=function(c,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(c,o):!1},i.prototype.testChar=function(c,o){var n=this.peek(o);return c.lastIndex=0,n!==null&&c.test(n)},i.prototype.match=function(c){var o=this.__match(c,this.__position);return o?this.__position+=o[0].length:o=null,o},i.prototype.read=function(c,o,n){var s="",h;return c&&(h=this.match(c),h&&(s+=h[0])),o&&(h||!c)&&(s+=this.readUntil(o,n)),s},i.prototype.readUntil=function(c,o){var n="",s=this.__position;c.lastIndex=this.__position;var h=c.exec(this.__input);return h?(s=h.index,o&&(s+=h[0].length)):s=this.__input_length,n=this.__input.substring(this.__position,s),this.__position=s,n},i.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},i.prototype.get_regexp=function(c,o){var n=null,s="g";return o&&d&&(s="y"),typeof c=="string"&&c!==""?n=new RegExp(c,s):c&&(n=new RegExp(c.source,s)),n},i.prototype.get_literal_regexp=function(c){return RegExp(c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},i.prototype.peekUntilAfter=function(c){var o=this.__position,n=this.readUntilAfter(c);return this.__position=o,n},i.prototype.lookBack=function(c){var o=this.__position-1;return o>=c.length&&this.__input.substring(o-c.length,o).toLowerCase()===c},t.exports.InputScanner=i},,,,,function(t){function d(i,c){i=typeof i=="string"?i:i.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(i+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(i+/\sbeautify\signore:end\s/.source+c,"g")}d.prototype.get_directives=function(i){if(!i.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(i);o;)c[o[1]]=o[2],o=this.__directive_pattern.exec(i);return c},d.prototype.readIgnored=function(i){return i.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=d},,function(t,d,i){var c=i(16).Beautifier,o=i(17).Options;function n(s,h){var f=new c(s,h);return f.beautify()}t.exports=n,t.exports.defaultOptions=function(){return new o}},function(t,d,i){var c=i(17).Options,o=i(2).Output,n=i(8).InputScanner,s=i(13).Directives,h=new s(/\/\*/,/\*\//),f=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,a=/\s/,r=/(?:\s|\n)+/g,x=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,y=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function p(R,O){this._source_text=R||"",this._options=new c(O),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}p.prototype.eatString=function(R){var O="";for(this._ch=this._input.next();this._ch;){if(O+=this._ch,this._ch==="\\")O+=this._input.next();else if(R.indexOf(this._ch)!==-1||this._ch===`
|
|
|
`)break;this._ch=this._input.next()}return O},p.prototype.eatWhitespace=function(R){for(var O=a.test(this._input.peek()),b=0;a.test(this._input.peek());)this._ch=this._input.next(),R&&this._ch===`
|
|
|
`&&((b===0||b<this._options.max_preserve_newlines)&&(b++,this._output.add_new_line(!0)));return O},p.prototype.foundNestedPseudoClass=function(){for(var R=0,O=1,b=this._input.peek(O);b;){if(b==="{")return!0;if(b==="(")R+=1;else if(b===")"){if(R===0)return!1;R-=1}else if(b===";"||b==="}")return!1;O++,b=this._input.peek(O)}return!1},p.prototype.print_string=function(R){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(R)},p.prototype.preserveSingleSpace=function(R){R&&(this._output.space_before_token=!0)},p.prototype.indent=function(){this._indentLevel++},p.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},p.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var R=this._source_text,O=this._options.eol;O==="auto"&&(O=`
|
|
|
`,R&&f.test(R||"")&&(O=R.match(f)[0])),R=R.replace(l,`
|
|
|
`);var b=R.match(/^[\t ]*/)[0];this._output=new o(this._options,b),this._input=new n(R),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var E=0,w=!1,T=!1,F=!1,M=!1,L=!1,Y=!1,K=this._ch,A=!1,H,U,I;H=this._input.read(r),U=H!=="",I=K,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),K=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var G=this._input.read(x),ne=h.get_directives(G);ne&&ne.ignore==="start"&&(G+=h.readIgnored(this._input)),this.print_string(G),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(y)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(U),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var oe=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);oe.match(/[ :]$/)&&(oe=this.eatString(": ").replace(/\s$/,""),this.print_string(oe),this._output.space_before_token=!0),oe=oe.replace(/\s$/,""),oe==="extend"?M=!0:oe==="import"&&(L=!0),oe in this.NESTED_AT_RULE?(this._nestedLevel+=1,oe in this.CONDITIONAL_GROUP_RULE&&(F=!0)):!w&&E===0&&oe.indexOf(":")!==-1&&(T=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(U),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")T&&(T=!1,this.outdent()),F?(F=!1,w=this._indentLevel>=this._nestedLevel):w=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&w&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(I==="("?this._output.space_before_token=!1:I!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),I==="{"&&this._output.trim(!0),L=!1,M=!1,T&&(this.outdent(),T=!1),this.print_string(this._ch),w=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var de=0;de<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;de++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[de])){A=!0;break}(w||F)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!M&&E===0?(this.print_string(":"),T||(T=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var Oe=I==='"'||I==="'";this.preserveSingleSpace(Oe||U),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")A=!1,E===0?(T&&(this.outdent(),T=!1),M=!1,L=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),E++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),E&&(E--,this.outdent()));else{var Ae=!1;this._input.lookBack("with")&&(Ae=!0),this.preserveSingleSpace(U||Ae),this.print_string(this._ch),T&&I==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),Y=!0):(this.eatWhitespace(),E++,this.indent())}else if(this._ch===")")E&&(E--,this.outdent()),Y&&this._input.peek()===";"&&this._options.selector_separator_newline&&(Y=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!T||Y)&&E===0&&!L&&!M?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!T&&E===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&a.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(U),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),a.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var pe=I==='"'||I==="'";this.preserveSingleSpace(pe||U),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
|
`&&A&&this._output.add_new_line()}var Se=this._output.get_code(O);return Se},t.exports.Beautifier=p},function(t,d,i){var c=i(6).Options;function o(n){c.call(this,n,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var s=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||s;var h=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var f=0;f<h.length;f++)h[f]!=="expand"?this.brace_style="collapse":this.brace_style=h[f]}o.prototype=new c,t.exports.Options=o}],m={};function S(t){var d=m[t];if(d!==void 0)return d.exports;var i=m[t]={exports:{}};return g[t](i,i.exports,S),i.exports}var _=S(15);C=_})();var N=C;!(P=[],v=function(){return{css_beautify:N}}.apply(q,P),v!==void 0&&(W.exports=v))})()},UfjD:function(W,q,D){"use strict";var P=D("2qtc"),v=D("kLXV"),C=D("5NDa"),N=D("5rEg"),g=D("miYZ"),m=D("tsqr"),S=D("tJVT"),_=D("q1tI"),t=D.n(_),d=D("4i/N");function i(c){var o=c.isjoin,n=c.setJoin,s=c.JoinTeams,h=Object(_.useState)(""),f=Object(S.a)(h,2),l=f[0],a=f[1];return t.a.createElement(v.a,{centered:!0,title:t.a.createElement("div",{style:{alignItems:"center",display:"flex"}},t.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u52A0\u5165\u6218\u961F"),t.a.createElement(d.a,{onClick:function(){return n(!1)},style:{cursor:"porint"}})),visible:o,closable:!1,destroyOnClose:!0,onOk:function(){if(!l){m.b.info("\u9080\u8BF7\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}s(l)},onCancel:function(){return n(!1)}},t.a.createElement("div",null,t.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px",display:"flex",alignItems:"center"}},t.a.createElement("span",{style:{flex:"none"}},"\u9080\u8BF7\u7801\uFF1A")," ",t.a.createElement(N.a,{placeholder:"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801",value:l,maxLength:60,addonAfter:String(l&&l.length||0)+"/60",onChange:function(x){return a(x.target.value)}}))))}q.a=i},Vhoy:function(W,q,D){"use strict";D.d(q,"d",function(){return N}),D.d(q,"e",function(){return g}),D.d(q,"c",function(){return m}),D.d(q,"b",function(){return S}),D.d(q,"a",function(){return _});var P=D("MI8n");class v{constructor(){this._icons=new Map,this._onDidRegister=new P.b}add(t){const d=this._icons.get(t.id);d?t.description?d.description=t.description:console.error(`Duplicate registration of codicon ${t.id}`):(this._icons.set(t.id,t),this._onDidRegister.fire(t))}get(t){return this._icons.get(t)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const C=new v,N=C;function g(t,d){return new S(t,d)}function m(t){return t?t.replace(/\$\((.*?)\)/g,(d,i)=>` ${i} `).trim():""}class S{constructor(t,d,i){this.id=t,this.definition=d,this.description=i,C.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var _;(function(t){t.iconNameSegment="[A-Za-z0-9]+",t.iconNameExpression="[A-Za-z0-9\\-]+",t.iconModifierExpression="~[A-Za-z]+";const d=new RegExp(`^(${t.iconNameExpression})(${t.iconModifierExpression})?$`);function i(n){if(n instanceof S)return["codicon","codicon-"+n.id];const s=d.exec(n.id);if(!s)return i(S.error);let[,h,f]=s;const l=["codicon","codicon-"+h];return f&&l.push("codicon-modifier-"+f.substr(1)),l}t.asClassNameArray=i;function c(n){return i(n).join(" ")}t.asClassName=c;function o(n){return"."+i(n).join(".")}t.asCSSSelector=o})(_||(_={})),function(t){t.add=new t("add",{fontCharacter:"\\ea60"}),t.plus=new t("plus",t.add.definition),t.gistNew=new t("gist-new",t.add.definition),t.repoCreate=new t("repo-create",t.add.definition),t.lightbulb=new t("lightbulb",{fontCharacter:"\\ea61"}),t.lightBulb=new t("light-bulb",{fontCharacter:"\\ea61"}),t.repo=new t("repo",{fontCharacter:"\\ea62"}),t.repoDelete=new t("repo-delete",{fontCharacter:"\\ea62"}),t.gistFork=new t("gist-fork",{fontCharacter:"\\ea63"}),t.repoForked=new t("repo-forked",{fontCharacter:"\\ea63"}),t.gitPullRequest=new t("git-pull-request",{fontCharacter:"\\ea64"}),t.gitPullRequestAbandoned=new t("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),t.recordKeys=new t("record-keys",{fontCharacter:"\\ea65"}),t.keyboard=new t("keyboard",{fontCharacter:"\\ea65"}),t.tag=new t("tag",{fontCharacter:"\\ea66"}),t.tagAdd=new t("tag-add",{fontCharacter:"\\ea66"}),t.tagRemove=new t("tag-remove",{fontCharacter:"\\ea66"}),t.person=new t("person",{fontCharacter:"\\ea67"}),t.personFollow=new t("person-follow",{fontCharacter:"\\ea67"}),t.personOutline=new t("person-outline",{fontCharacter:"\\ea67"}),t.personFilled=new t("person-filled",{fontCharacter:"\\ea67"}),t.gitBranch=new t("git-branch",{fontCharacter:"\\ea68"}),t.gitBranchCreate=new t("git-branch-create",{fontCharacter:"\\ea68"}),t.gitBranchDelete=new t("git-branch-delete",{fontCharacter:"\\ea68"}),t.sourceControl=new t("source-control",{fontCharacter:"\\ea68"}),t.mirror=new t("mirror",{fontCharacter:"\\ea69"}),t.mirrorPublic=new t("mirror-public",{fontCharacter:"\\ea69"}),t.star=new t("star",{fontCharacter:"\\ea6a"}),t.starAdd=new t("star-add",{fontCharacter:"\\ea6a"}),t.starDelete=new t("star-delete",{fontCharacter:"\\ea6a"}),t.starEmpty=new t("star-empty",{fontCharacter:"\\ea6a"}),t.comment=new t("comment",{fontCharacter:"\\ea6b"}),t.commentAdd=new t("comment-add",{fontCharacter:"\\ea6b"}),t.alert=new t("alert",{fontCharacter:"\\ea6c"}),t.warning=new t("warning",{fontCharacter:"\\ea6c"}),t.search=new t("search",{fontCharacter:"\\ea6d"}),t.searchSave=new t("search-save",{fontCharacter:"\\ea6d"}),t.logOut=new t("log-out",{fontCharacter:"\\ea6e"}),t.signOut=new t("sign-out",{fontCharacter:"\\ea6e"}),t.logIn=new t("log-in",{fontCharacter:"\\ea6f"}),t.signIn=new t("sign-in",{fontCharacter:"\\ea6f"}),t.eye=new t("eye",{fontCharacter:"\\ea70"}),t.eyeUnwatch=new t("eye-unwatch",{fontCharacter:"\\ea70"}),t.eyeWatch=new t("eye-watch",{fontCharacter:"\\ea70"}),t.circleFilled=new t("circle-filled",{fontCharacter:"\\ea71"}),t.primitiveDot=new t("primitive-dot",{fontCharacter:"\\ea71"}),t.closeDirty=new t("close-dirty",{fontCharacter:"\\ea71"}),t.debugBreakpoint=new t("debug-breakpoint",{fontCharacter:"\\ea71"}),t.debugBreakpointDisabled=new t("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),t.debugHint=new t("debug-hint",{fontCharacter:"\\ea71"}),t.primitiveSquare=new t("primitive-square",{fontCharacter:"\\ea72"}),t.edit=new t("edit",{fontCharacter:"\\ea73"}),t.pencil=new t("pencil",{fontCharacter:"\\ea73"}),t.info=new t("info",{fontCharacter:"\\ea74"}),t.issueOpened=new t("issue-opened",{fontCharacter:"\\ea74"}),t.gistPrivate=new t("gist-private",{fontCharacter:"\\ea75"}),t.gitForkPrivate=new t("git-fork-private",{fontCharacter:"\\ea75"}),t.lock=new t("lock",{fontCharacter:"\\ea75"}),t.mirrorPrivate=new t("mirror-private",{fontCharacter:"\\ea75"}),t.close=new t("close",{fontCharacter:"\\ea76"}),t.removeClose=new t("remove-close",{fontCharacter:"\\ea76"}),t.x=new t("x",{fontCharacter:"\\ea76"}),t.repoSync=new t("repo-sync",{fontCharacter:"\\ea77"}),t.sync=new t("sync",{fontCharacter:"\\ea77"}),t.clone=new t("clone",{fontCharacter:"\\ea78"}),t.desktopDownload=new t("desktop-download",{fontCharacter:"\\ea78"}),t.beaker=new t("beaker",{fontCharacter:"\\ea79"}),t.microscope=new t("microscope",{fontCharacter:"\\ea79"}),t.vm=new t("vm",{fontCharacter:"\\ea7a"}),t.deviceDesktop=new t("device-desktop",{fontCharacter:"\\ea7a"}),t.file=new t("file",{fontCharacter:"\\ea7b"}),t.fileText=new t("file-text",{fontCharacter:"\\ea7b"}),t.more=new t("more",{fontCharacter:"\\ea7c"}),t.ellipsis=new t("ellipsis",{fontCharacter:"\\ea7c"}),t.kebabHorizontal=new t("kebab-horizontal",{fontCharacter:"\\ea7c"}),t.mailReply=new t("mail-reply",{fontCharacter:"\\ea7d"}),t.reply=new t("reply",{fontCharacter:"\\ea7d"}),t.organization=new t("organization",{fontCharacter:"\\ea7e"}),t.organizationFilled=new t("organization-filled",{fontCharacter:"\\ea7e"}),t.organizationOutline=new t("organization-outline",{fontCharacter:"\\ea7e"}),t.newFile=new t("new-file",{fontCharacter:"\\ea7f"}),t.fileAdd=new t("file-add",{fontCharacter:"\\ea7f"}),t.newFolder=new t("new-folder",{fontCharacter:"\\ea80"}),t.fileDirectoryCreate=new t("file-directory-create",{fontCharacter:"\\ea80"}),t.trash=new t("trash",{fontCharacter:"\\ea81"}),t.trashcan=new t("trashcan",{fontCharacter:"\\ea81"}),t.history=new t("history",{fontCharacter:"\\ea82"}),t.clock=new t("clock",{fontCharacter:"\\ea82"}),t.folder=new t("folder",{fontCharacter:"\\ea83"}),t.fileDirectory=new t("file-directory",{fontCharacter:"\\ea83"}),t.symbolFolder=new t("symbol-folder",{fontCharacter:"\\ea83"}),t.logoGithub=new t("logo-github",{fontCharacter:"\\ea84"}),t.markGithub=new t("mark-github",{fontCharacter:"\\ea84"}),t.github=new t("github",{fontCharacter:"\\ea84"}),t.terminal=new t("terminal",{fontCharacter:"\\ea85"}),t.console=new t("console",{fontCharacter:"\\ea85"}),t.repl=new t("repl",{fontCharacter:"\\ea85"}),t.zap=new t("zap",{fontCharacter:"\\ea86"}),t.symbolEvent=new t("symbol-event",{fontCharacter:"\\ea86"}),t.error=new t("error",{fontCharacter:"\\ea87"}),t.stop=new t("stop",{fontCharacter:"\\ea87"}),t.variable=new t("variable",{fontCharacter:"\\ea88"}),t.symbolVariable=new t("symbol-variable",{fontCharacter:"\\ea88"}),t.array=new t("array",{fontCharacter:"\\ea8a"}),t.symbolArray=new t("symbol-array",{fontCharacter:"\\ea8a"}),t.symbolModule=new t("symbol-module",{fontCharacter:"\\ea8b"}),t.symbolPackage=new t("symbol-package",{fontCharacter:"\\ea8b"}),t.symbolNamespace=new t("symbol-namespace",{fontCharacter:"\\ea8b"}),t.symbolObject=new t("symbol-object",{fontCharacter:"\\ea8b"}),t.symbolMethod=new t("symbol-method",{fontCharacter:"\\ea8c"}),t.symbolFunction=new t("symbol-function",{fontCharacter:"\\ea8c"}),t.symbolConstructor=new t("symbol-constructor",{fontCharacter:"\\ea8c"}),t.symbolBoolean=new t("symbol-boolean",{fontCharacter:"\\ea8f"}),t.symbolNull=new t("symbol-null",{fontCharacter:"\\ea8f"}),t.symbolNumeric=new t("symbol-numeric",{fontCharacter:"\\ea90"}),t.symbolNumber=new t("symbol-number",{fontCharacter:"\\ea90"}),t.symbolStructure=new t("symbol-structure",{fontCharacter:"\\ea91"}),t.symbolStruct=new t("symbol-struct",{fontCharacter:"\\ea91"}),t.symbolParameter=new t("symbol-parameter",{fontCharacter:"\\ea92"}),t.symbolTypeParameter=new t("symbol-type-parameter",{fontCharacter:"\\ea92"}),t.symbolKey=new t("symbol-key",{fontCharacter:"\\ea93"}),t.symbolText=new t("symbol-text",{fontCharacter:"\\ea93"}),t.symbolReference=new t("symbol-reference",{fontCharacter:"\\ea94"}),t.goToFile=new t("go-to-file",{fontCharacter:"\\ea94"}),t.symbolEnum=new t("symbol-enum",{fontCharacter:"\\ea95"}),t.symbolValue=new t("symbol-value",{fontCharacter:"\\ea95"}),t.symbolRuler=new t("symbol-ruler",{fontCharacter:"\\ea96"}),t.symbolUnit=new t("symbol-unit",{fontCharacter:"\\ea96"}),t.activateBreakpoints=new t("activate-breakpoints",{fontCharacter:"\\ea97"}),t.archive=new t("archive",{fontCharacter:"\\ea98"}),t.arrowBoth=new t("arrow-both",{fontCharacter:"\\ea99"}),t.arrowDown=new t("arrow-down",{fontCharacter:"\\ea9a"}),t.arrowLeft=new t("arrow-left",{fontCharacter:"\\ea9b"}),t.arrowRight=new t("arrow-right",{fontCharacter:"\\ea9c"}),t.arrowSmallDown=new t("arrow-small-down",{fontCharacter:"\\ea9d"}),t.arrowSmallLeft=new t("arrow-small-left",{fontCharacter:"\\ea9e"}),t.arrowSmallRight=new t("arrow-small-right",{fontCharacter:"\\ea9f"}),t.arrowSmallUp=new t("arrow-small-up",{fontCharacter:"\\eaa0"}),t.arrowUp=new t("arrow-up",{fontCharacter:"\\eaa1"}),t.bell=new t("bell",{fontCharacter:"\\eaa2"}),t.bold=new t("bold",{fontCharacter:"\\eaa3"}),t.book=new t("book",{fontCharacter:"\\eaa4"}),t.bookmark=new t("bookmark",{fontCharacter:"\\eaa5"}),t.debugBreakpointConditionalUnverified=new t("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),t.debugBreakpointConditional=new t("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),t.debugBreakpointConditionalDisabled=new t("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),t.debugBreakpointDataUnverified=new t("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),t.debugBreakpointData=new t("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),t.debugBreakpointDataDisabled=new t("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),t.debugBreakpointLogUnverified=new t("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),t.debugBreakpointLog=new t("debug-breakpoint-log",{fontCharacter:"\\eaab"}),t.debugBreakpointLogDisabled=new t("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),t.briefcase=new t("briefcase",{fontCharacter:"\\eaac"}),t.broadcast=new t("broadcast",{fontCharacter:"\\eaad"}),t.browser=new t("browser",{fontCharacter:"\\eaae"}),t.bug=new t("bug",{fontCharacter:"\\eaaf"}),t.calendar=new t("calendar",{fontCharacter:"\\eab0"}),t.caseSensitive=new t("case-sensitive",{fontCharacter:"\\eab1"}),t.check=new t("check",{fontCharacter:"\\eab2"}),t.checklist=new t("checklist",{fontCharacter:"\\eab3"}),t.chevronDown=new t("chevron-down",{fontCharacter:"\\eab4"}),t.dropDownButton=new t("drop-down-button",t.chevronDown.definition),t.chevronLeft=new t("chevron-left",{fontCharacter:"\\eab5"}),t.chevronRight=new t("chevron-right",{fontCharacter:"\\eab6"}),t.chevronUp=new t("chevron-up",{fontCharacter:"\\eab7"}),t.chromeClose=new t("chrome-close",{fontCharacter:"\\eab8"}),t.chromeMaximize=new t("chrome-maximize",{fontCharacter:"\\eab9"}),t.chromeMinimize=new t("chrome-minimize",{fontCharacter:"\\eaba"}),t.chromeRestore=new t("chrome-restore",{fontCharacter:"\\eabb"}),t.circleOutline=new t("circle-outline",{fontCharacter:"\\eabc"}),t.debugBreakpointUnverified=new t("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),t.circleSlash=new t("circle-slash",{fontCharacter:"\\eabd"}),t.circuitBoard=new t("circuit-board",{fontCharacter:"\\eabe"}),t.clearAll=new t("clear-all",{fontCharacter:"\\eabf"}),t.clippy=new t("clippy",{fontCharacter:"\\eac0"}),t.closeAll=new t("close-all",{fontCharacter:"\\eac1"}),t.cloudDownload=new t("cloud-download",{fontCharacter:"\\eac2"}),t.cloudUpload=new t("cloud-upload",{fontCharacter:"\\eac3"}),t.code=new t("code",{fontCharacter:"\\eac4"}),t.collapseAll=new t("collapse-all",{fontCharacter:"\\eac5"}),t.colorMode=new t("color-mode",{fontCharacter:"\\eac6"}),t.commentDiscussion=new t("comment-discussion",{fontCharacter:"\\eac7"}),t.compareChanges=new t("compare-changes",{fontCharacter:"\\eafd"}),t.creditCard=new t("credit-card",{fontCharacter:"\\eac9"}),t.dash=new t("dash",{fontCharacter:"\\eacc"}),t.dashboard=new t("dashboard",{fontCharacter:"\\eacd"}),t.database=new t("database",{fontCharacter:"\\eace"}),t.debugContinue=new t("debug-continue",{fontCharacter:"\\eacf"}),t.debugDisconnect=new t("debug-disconnect",{fontCharacter:"\\ead0"}),t.debugPause=new t("debug-pause",{fontCharacter:"\\ead1"}),t.debugRestart=new t("debug-restart",{fontCharacter:"\\ead2"}),t.debugStart=new t("debug-start",{fontCharacter:"\\ead3"}),t.debugStepInto=new t("debug-step-into",{fontCharacter:"\\ead4"}),t.debugStepOut=new t("debug-step-out",{fontCharacter:"\\ead5"}),t.debugStepOver=new t("debug-step-over",{fontCharacter:"\\ead6"}),t.debugStop=new t("debug-stop",{fontCharacter:"\\ead7"}),t.debug=new t("debug",{fontCharacter:"\\ead8"}),t.deviceCameraVideo=new t("device-camera-video",{fontCharacter:"\\ead9"}),t.deviceCamera=new t("device-camera",{fontCharacter:"\\eada"}),t.deviceMobile=new t("device-mobile",{fontCharacter:"\\eadb"}),t.diffAdded=new t("diff-added",{fontCharacter:"\\eadc"}),t.diffIgnored=new t("diff-ignored",{fontCharacter:"\\eadd"}),t.diffModified=new t("diff-modified",{fontCharacter:"\\eade"}),t.diffRemoved=new t("diff-removed",{fontCharacter:"\\eadf"}),t.diffRenamed=new t("diff-renamed",{fontCharacter:"\\eae0"}),t.diff=new t("diff",{fontCharacter:"\\eae1"}),t.discard=new t("discard",{fontCharacter:"\\eae2"}),t.editorLayout=new t("editor-layout",{fontCharacter:"\\eae3"}),t.emptyWindow=new t("empty-window",{fontCharacter:"\\eae4"}),t.exclude=new t("exclude",{fontCharacter:"\\eae5"}),t.extensions=new t("extensions",{fontCharacter:"\\eae6"}),t.eyeClosed=new t("eye-closed",{fontCharacter:"\\eae7"}),t.fileBinary=new t("file-binary",{fontCharacter:"\\eae8"}),t.fileCode=new t("file-code",{fontCharacter:"\\eae9"}),t.fileMedia=new t("file-media",{fontCharacter:"\\eaea"}),t.filePdf=new t("file-pdf",{fontCharacter:"\\eaeb"}),t.fileSubmodule=new t("file-submodule",{fontCharacter:"\\eaec"}),t.fileSymlinkDirectory=new t("file-symlink-directory",{fontCharacter:"\\eaed"}),t.fileSymlinkFile=new t("file-symlink-file",{fontCharacter:"\\eaee"}),t.fileZip=new t("file-zip",{fontCharacter:"\\eaef"}),t.files=new t("files",{fontCharacter:"\\eaf0"}),t.filter=new t("filter",{fontCharacter:"\\eaf1"}),t.flame=new t("flame",{fontCharacter:"\\eaf2"}),t.foldDown=new t("fold-down",{fontCharacter:"\\eaf3"}),t.foldUp=new t("fold-up",{fontCharacter:"\\eaf4"}),t.fold=new t("fold",{fontCharacter:"\\eaf5"}),t.folderActive=new t("folder-active",{fontCharacter:"\\eaf6"}),t.folderOpened=new t("folder-opened",{fontCharacter:"\\eaf7"}),t.gear=new t("gear",{fontCharacter:"\\eaf8"}),t.gift=new t("gift",{fontCharacter:"\\eaf9"}),t.gistSecret=new t("gist-secret",{fontCharacter:"\\eafa"}),t.gist=new t("gist",{fontCharacter:"\\eafb"}),t.gitCommit=new t("git-commit",{fontCharacter:"\\eafc"}),t.gitCompare=new t("git-compare",{fontCharacter:"\\eafd"}),t.gitMerge=new t("git-merge",{fontCharacter:"\\eafe"}),t.githubAction=new t("github-action",{fontCharacter:"\\eaff"}),t.githubAlt=new t("github-alt",{fontCharacter:"\\eb00"}),t.globe=new t("globe",{fontCharacter:"\\eb01"}),t.grabber=new t("grabber",{fontCharacter:"\\eb02"}),t.graph=new t("graph",{fontCharacter:"\\eb03"}),t.gripper=new t("gripper",{fontCharacter:"\\eb04"}),t.heart=new t("heart",{fontCharacter:"\\eb05"}),t.home=new t("home",{fontCharacter:"\\eb06"}),t.horizontalRule=new t("horizontal-rule",{fontCharacter:"\\eb07"}),t.hubot=new t("hubot",{fontCharacter:"\\eb08"}),t.inbox=new t("inbox",{fontCharacter:"\\eb09"}),t.issueClosed=new t("issue-closed",{fontCharacter:"\\eba4"}),t.issueReopened=new t("issue-reopened",{fontCharacter:"\\eb0b"}),t.issues=new t("issues",{fontCharacter:"\\eb0c"}),t.italic=new t("italic",{fontCharacter:"\\eb0d"}),t.jersey=new t("jersey",{fontCharacter:"\\eb0e"}),t.json=new t("json",{fontCharacter:"\\eb0f"}),t.kebabVertical=new t("kebab-vertical",{fontCharacter:"\\eb10"}),t.key=new t("key",{fontCharacter:"\\eb11"}),t.law=new t("law",{fontCharacter:"\\eb12"}),t.lightbulbAutofix=new t("lightbulb-autofix",{fontCharacter:"\\eb13"}),t.linkExternal=new t("link-external",{fontCharacter:"\\eb14"}),t.link=new t("link",{fontCharacter:"\\eb15"}),t.listOrdered=new t("list-ordered",{fontCharacter:"\\eb16"}),t.listUnordered=new t("list-unordered",{fontCharacter:"\\eb17"}),t.liveShare=new t("live-share",{fontCharacter:"\\eb18"}),t.loading=new t("loading",{fontCharacter:"\\eb19"}),t.location=new t("location",{fontCharacter:"\\eb1a"}),t.mailRead=new t("mail-read",{fontCharacter:"\\eb1b"}),t.mail=new t("mail",{fontCharacter:"\\eb1c"}),t.markdown=new t("markdown",{fontCharacter:"\\eb1d"}),t.megaphone=new t("megaphone",{fontCharacter:"\\eb1e"}),t.mention=new t("mention",{fontCharacter:"\\eb1f"}),t.milestone=new t("milestone",{fontCharacter:"\\eb20"}),t.mortarBoard=new t("mortar-board",{fontCharacter:"\\eb21"}),t.move=new t("move",{fontCharacter:"\\eb22"}),t.multipleWindows=new t("multiple-windows",{fontCharacter:"\\eb23"}),t.mute=new t("mute",{fontCharacter:"\\eb24"}),t.noNewline=new t("no-newline",{fontCharacter:"\\eb25"}),t.note=new t("note",{fontCharacter:"\\eb26"}),t.octoface=new t("octoface",{fontCharacter:"\\eb27"}),t.openPreview=new t("open-preview",{fontCharacter:"\\eb28"}),t.package_=new t("package",{fontCharacter:"\\eb29"}),t.paintcan=new t("paintcan",{fontCharacter:"\\eb2a"}),t.pin=new t("pin",{fontCharacter:"\\eb2b"}),t.play=new t("play",{fontCharacter:"\\eb2c"}),t.run=new t("run",{fontCharacter:"\\eb2c"}),t.plug=new t("plug",{fontCharacter:"\\eb2d"}),t.preserveCase=new t("preserve-case",{fontCharacter:"\\eb2e"}),t.preview=new t("preview",{fontCharacter:"\\eb2f"}),t.project=new t("project",{fontCharacter:"\\eb30"}),t.pulse=new t("pulse",{fontCharacter:"\\eb31"}),t.question=new t("question",{fontCharacter:"\\eb32"}),t.quote=new t("quote",{fontCharacter:"\\eb33"}),t.radioTower=new t("radio-tower",{fontCharacter:"\\eb34"}),t.reactions=new t("reactions",{fontCharacter:"\\eb35"}),t.references=new t("references",{fontCharacter:"\\eb36"}),t.refresh=new t("refresh",{fontCharacter:"\\eb37"}),t.regex=new t("regex",{fontCharacter:"\\eb38"}),t.remoteExplorer=new t("remote-explorer",{fontCharacter:"\\eb39"}),t.remote=new t("remote",{fontCharacter:"\\eb3a"}),t.remove=new t("remove",{fontCharacter:"\\eb3b"}),t.replaceAll=new t("replace-all",{fontCharacter:"\\eb3c"}),t.replace=new t("replace",{fontCharacter:"\\eb3d"}),t.repoClone=new t("repo-clone",{fontCharacter:"\\eb3e"}),t.repoForcePush=new t("repo-force-push",{fontCharacter:"\\eb3f"}),t.repoPull=new t("repo-pull",{fontCharacter:"\\eb40"}),t.repoPush=new t("repo-push",{fontCharacter:"\\eb41"}),t.report=new t("report",{fontCharacter:"\\eb42"}),t.requestChanges=new t("request-changes",{fontCharacter:"\\eb43"}),t.rocket=new t("rocket",{fontCharacter:"\\eb44"}),t.rootFolderOpened=new t("root-folder-opened",{fontCharacter:"\\eb45"}),t.rootFolder=new t("root-folder",{fontCharacter:"\\eb46"}),t.rss=new t("rss",{fontCharacter:"\\eb47"}),t.ruby=new t("ruby",{fontCharacter:"\\eb48"}),t.saveAll=new t("save-all",{fontCharacter:"\\eb49"}),t.saveAs=new t("save-as",{fontCharacter:"\\eb4a"}),t.save=new t("save",{fontCharacter:"\\eb4b"}),t.screenFull=new t("screen-full",{fontCharacter:"\\eb4c"}),t.screenNormal=new t("screen-normal",{fontCharacter:"\\eb4d"}),t.searchStop=new t("search-stop",{fontCharacter:"\\eb4e"}),t.server=new t("server",{fontCharacter:"\\eb50"}),t.settingsGear=new t("settings-gear",{fontCharacter:"\\eb51"}),t.settings=new t("settings",{fontCharacter:"\\eb52"}),t.shield=new t("shield",{fontCharacter:"\\eb53"}),t.smiley=new t("smiley",{fontCharacter:"\\eb54"}),t.sortPrecedence=new t("sort-precedence",{fontCharacter:"\\eb55"}),t.splitHorizontal=new t("split-horizontal",{fontCharacter:"\\eb56"}),t.splitVertical=new t("split-vertical",{fontCharacter:"\\eb57"}),t.squirrel=new t("squirrel",{fontCharacter:"\\eb58"}),t.starFull=new t("star-full",{fontCharacter:"\\eb59"}),t.starHalf=new t("star-half",{fontCharacter:"\\eb5a"}),t.symbolClass=new t("symbol-class",{fontCharacter:"\\eb5b"}),t.symbolColor=new t("symbol-color",{fontCharacter:"\\eb5c"}),t.symbolConstant=new t("symbol-constant",{fontCharacter:"\\eb5d"}),t.symbolEnumMember=new t("symbol-enum-member",{fontCharacter:"\\eb5e"}),t.symbolField=new t("symbol-field",{fontCharacter:"\\eb5f"}),t.symbolFile=new t("symbol-file",{fontCharacter:"\\eb60"}),t.symbolInterface=new t("symbol-interface",{fontCharacter:"\\eb61"}),t.symbolKeyword=new t("symbol-keyword",{fontCharacter:"\\eb62"}),t.symbolMisc=new t("symbol-misc",{fontCharacter:"\\eb63"}),t.symbolOperator=new t("symbol-operator",{fontCharacter:"\\eb64"}),t.symbolProperty=new t("symbol-property",{fontCharacter:"\\eb65"}),t.wrench=new t("wrench",{fontCharacter:"\\eb65"}),t.wrenchSubaction=new t("wrench-subaction",{fontCharacter:"\\eb65"}),t.symbolSnippet=new t("symbol-snippet",{fontCharacter:"\\eb66"}),t.tasklist=new t("tasklist",{fontCharacter:"\\eb67"}),t.telescope=new t("telescope",{fontCharacter:"\\eb68"}),t.textSize=new t("text-size",{fontCharacter:"\\eb69"}),t.threeBars=new t("three-bars",{fontCharacter:"\\eb6a"}),t.thumbsdown=new t("thumbsdown",{fontCharacter:"\\eb6b"}),t.thumbsup=new t("thumbsup",{fontCharacter:"\\eb6c"}),t.tools=new t("tools",{fontCharacter:"\\eb6d"}),t.triangleDown=new t("triangle-down",{fontCharacter:"\\eb6e"}),t.triangleLeft=new t("triangle-left",{fontCharacter:"\\eb6f"}),t.triangleRight=new t("triangle-right",{fontCharacter:"\\eb70"}),t.triangleUp=new t("triangle-up",{fontCharacter:"\\eb71"}),t.twitter=new t("twitter",{fontCharacter:"\\eb72"}),t.unfold=new t("unfold",{fontCharacter:"\\eb73"}),t.unlock=new t("unlock",{fontCharacter:"\\eb74"}),t.unmute=new t("unmute",{fontCharacter:"\\eb75"}),t.unverified=new t("unverified",{fontCharacter:"\\eb76"}),t.verified=new t("verified",{fontCharacter:"\\eb77"}),t.versions=new t("versions",{fontCharacter:"\\eb78"}),t.vmActive=new t("vm-active",{fontCharacter:"\\eb79"}),t.vmOutline=new t("vm-outline",{fontCharacter:"\\eb7a"}),t.vmRunning=new t("vm-running",{fontCharacter:"\\eb7b"}),t.watch=new t("watch",{fontCharacter:"\\eb7c"}),t.whitespace=new t("whitespace",{fontCharacter:"\\eb7d"}),t.wholeWord=new t("whole-word",{fontCharacter:"\\eb7e"}),t.window=new t("window",{fontCharacter:"\\eb7f"}),t.wordWrap=new t("word-wrap",{fontCharacter:"\\eb80"}),t.zoomIn=new t("zoom-in",{fontCharacter:"\\eb81"}),t.zoomOut=new t("zoom-out",{fontCharacter:"\\eb82"}),t.listFilter=new t("list-filter",{fontCharacter:"\\eb83"}),t.listFlat=new t("list-flat",{fontCharacter:"\\eb84"}),t.listSelection=new t("list-selection",{fontCharacter:"\\eb85"}),t.selection=new t("selection",{fontCharacter:"\\eb85"}),t.listTree=new t("list-tree",{fontCharacter:"\\eb86"}),t.debugBreakpointFunctionUnverified=new t("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),t.debugBreakpointFunction=new t("debug-breakpoint-function",{fontCharacter:"\\eb88"}),t.debugBreakpointFunctionDisabled=new t("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),t.debugStackframeActive=new t("debug-stackframe-active",{fontCharacter:"\\eb89"}),t.debugStackframeDot=new t("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),t.debugStackframe=new t("debug-stackframe",{fontCharacter:"\\eb8b"}),t.debugStackframeFocused=new t("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),t.debugBreakpointUnsupported=new t("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),t.symbolString=new t("symbol-string",{fontCharacter:"\\eb8d"}),t.debugReverseContinue=new t("debug-reverse-continue",{fontCharacter:"\\eb8e"}),t.debugStepBack=new t("debug-step-back",{fontCharacter:"\\eb8f"}),t.debugRestartFrame=new t("debug-restart-frame",{fontCharacter:"\\eb90"}),t.callIncoming=new t("call-incoming",{fontCharacter:"\\eb92"}),t.callOutgoing=new t("call-outgoing",{fontCharacter:"\\eb93"}),t.menu=new t("menu",{fontCharacter:"\\eb94"}),t.expandAll=new t("expand-all",{fontCharacter:"\\eb95"}),t.feedback=new t("feedback",{fontCharacter:"\\eb96"}),t.groupByRefType=new t("group-by-ref-type",{fontCharacter:"\\eb97"}),t.ungroupByRefType=new t("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),t.account=new t("account",{fontCharacter:"\\eb99"}),t.bellDot=new t("bell-dot",{fontCharacter:"\\eb9a"}),t.debugConsole=new t("debug-console",{fontCharacter:"\\eb9b"}),t.library=new t("library",{fontCharacter:"\\eb9c"}),t.output=new t("output",{fontCharacter:"\\eb9d"}),t.runAll=new t("run-all",{fontCharacter:"\\eb9e"}),t.syncIgnored=new t("sync-ignored",{fontCharacter:"\\eb9f"}),t.pinned=new t("pinned",{fontCharacter:"\\eba0"}),t.githubInverted=new t("github-inverted",{fontCharacter:"\\eba1"}),t.debugAlt=new t("debug-alt",{fontCharacter:"\\eb91"}),t.serverProcess=new t("server-process",{fontCharacter:"\\eba2"}),t.serverEnvironment=new t("server-environment",{fontCharacter:"\\eba3"}),t.pass=new t("pass",{fontCharacter:"\\eba4"}),t.stopCircle=new t("stop-circle",{fontCharacter:"\\eba5"}),t.playCircle=new t("play-circle",{fontCharacter:"\\eba6"}),t.record=new t("record",{fontCharacter:"\\eba7"}),t.debugAltSmall=new t("debug-alt-small",{fontCharacter:"\\eba8"}),t.vmConnect=new t("vm-connect",{fontCharacter:"\\eba9"}),t.cloud=new t("cloud",{fontCharacter:"\\ebaa"}),t.merge=new t("merge",{fontCharacter:"\\ebab"}),t.exportIcon=new t("export",{fontCharacter:"\\ebac"}),t.graphLeft=new t("graph-left",{fontCharacter:"\\ebad"}),t.magnet=new t("magnet",{fontCharacter:"\\ebae"}),t.notebook=new t("notebook",{fontCharacter:"\\ebaf"}),t.redo=new t("redo",{fontCharacter:"\\ebb0"}),t.checkAll=new t("check-all",{fontCharacter:"\\ebb1"}),t.pinnedDirty=new t("pinned-dirty",{fontCharacter:"\\ebb2"}),t.passFilled=new t("pass-filled",{fontCharacter:"\\ebb3"}),t.circleLargeFilled=new t("circle-large-filled",{fontCharacter:"\\ebb4"}),t.circleLargeOutline=new t("circle-large-outline",{fontCharacter:"\\ebb5"}),t.combine=new t("combine",{fontCharacter:"\\ebb6"}),t.gather=new t("gather",{fontCharacter:"\\ebb6"}),t.table=new t("table",{fontCharacter:"\\ebb7"}),t.variableGroup=new t("variable-group",{fontCharacter:"\\ebb8"}),t.typeHierarchy=new t("type-hierarchy",{fontCharacter:"\\ebb9"}),t.typeHierarchySub=new t("type-hierarchy-sub",{fontCharacter:"\\ebba"}),t.typeHierarchySuper=new t("type-hierarchy-super",{fontCharacter:"\\ebbb"}),t.gitPullRequestCreate=new t("git-pull-request-create",{fontCharacter:"\\ebbc"}),t.runAbove=new t("run-above",{fontCharacter:"\\ebbd"}),t.runBelow=new t("run-below",{fontCharacter:"\\ebbe"}),t.notebookTemplate=new t("notebook-template",{fontCharacter:"\\ebbf"}),t.debugRerun=new t("debug-rerun",{fontCharacter:"\\ebc0"}),t.workspaceTrusted=new t("workspace-trusted",{fontCharacter:"\\ebc1"}),t.workspaceUntrusted=new t("workspace-untrusted",{fontCharacter:"\\ebc2"}),t.workspaceUnspecified=new t("workspace-unspecified",{fontCharacter:"\\ebc3"}),t.terminalCmd=new t("terminal-cmd",{fontCharacter:"\\ebc4"}),t.terminalDebian=new t("terminal-debian",{fontCharacter:"\\ebc5"}),t.terminalLinux=new t("terminal-linux",{fontCharacter:"\\ebc6"}),t.terminalPowershell=new t("terminal-powershell",{fontCharacter:"\\ebc7"}),t.terminalTmux=new t("terminal-tmux",{fontCharacter:"\\ebc8"}),t.terminalUbuntu=new t("terminal-ubuntu",{fontCharacter:"\\ebc9"}),t.terminalBash=new t("terminal-bash",{fontCharacter:"\\ebca"}),t.arrowSwap=new t("arrow-swap",{fontCharacter:"\\ebcb"}),t.copy=new t("copy",{fontCharacter:"\\ebcc"}),t.personAdd=new t("person-add",{fontCharacter:"\\ebcd"}),t.filterFilled=new t("filter-filled",{fontCharacter:"\\ebce"}),t.wand=new t("wand",{fontCharacter:"\\ebcf"}),t.debugLineByLine=new t("debug-line-by-line",{fontCharacter:"\\ebd0"}),t.inspect=new t("inspect",{fontCharacter:"\\ebd1"}),t.layers=new t("layers",{fontCharacter:"\\ebd2"}),t.layersDot=new t("layers-dot",{fontCharacter:"\\ebd3"}),t.layersActive=new t("layers-active",{fontCharacter:"\\ebd4"}),t.compass=new t("compass",{fontCharacter:"\\ebd5"}),t.compassDot=new t("compass-dot",{fontCharacter:"\\ebd6"}),t.compassActive=new t("compass-active",{fontCharacter:"\\ebd7"}),t.azure=new t("azure",{fontCharacter:"\\ebd8"}),t.issueDraft=new t("issue-draft",{fontCharacter:"\\ebd9"}),t.gitPullRequestClosed=new t("git-pull-request-closed",{fontCharacter:"\\ebda"}),t.gitPullRequestDraft=new t("git-pull-request-draft",{fontCharacter:"\\ebdb"}),t.debugAll=new t("debug-all",{fontCharacter:"\\ebdc"}),t.debugCoverage=new t("debug-coverage",{fontCharacter:"\\ebdd"}),t.runErrors=new t("run-errors",{fontCharacter:"\\ebde"}),t.folderLibrary=new t("folder-library",{fontCharacter:"\\ebdf"}),t.debugContinueSmall=new t("debug-continue-small",{fontCharacter:"\\ebe0"}),t.beakerStop=new t("beaker-stop",{fontCharacter:"\\ebe1"}),t.graphLine=new t("graph-line",{fontCharacter:"\\ebe2"}),t.graphScatter=new t("graph-scatter",{fontCharacter:"\\ebe3"}),t.pieChart=new t("pie-chart",{fontCharacter:"\\ebe4"}),t.bracket=new t("bracket",t.json.definition),t.bracketDot=new t("bracket-dot",{fontCharacter:"\\ebe5"}),t.bracketError=new t("bracket-error",{fontCharacter:"\\ebe6"}),t.lockSmall=new t("lock-small",{fontCharacter:"\\ebe7"}),t.azureDevops=new t("azure-devops",{fontCharacter:"\\ebe8"}),t.verifiedFilled=new t("verified-filled",{fontCharacter:"\\ebe9"})}(S||(S={}))},"VrN/":function(W,q,D){(function(P,v){W.exports=v()})(this,function(){"use strict";var P=navigator.userAgent,v=navigator.platform,C=/gecko\/\d/i.test(P),N=/MSIE \d/.test(P),g=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(P),m=/Edge\/(\d+)/.exec(P),S=N||g||m,_=S&&(N?document.documentMode||6:+(m||g)[1]),t=!m&&/WebKit\//.test(P),d=t&&/Qt\/\d+\.\d+/.test(P),i=!m&&/Chrome\//.test(P),c=/Opera\//.test(P),o=/Apple Computer/.test(navigator.vendor),n=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(P),s=/PhantomJS/.test(P),h=!m&&/AppleWebKit/.test(P)&&/Mobile\/\w+/.test(P),f=/Android/.test(P),l=h||f||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(P),a=h||/Mac/.test(v),r=/\bCrOS\b/.test(P),x=/win/i.test(v),y=c&&P.match(/Version\/(\d*\.\d*)/);y&&(y=Number(y[1])),y&&y>=15&&(c=!1,t=!0);var p=a&&(d||c&&(y==null||y<12.11)),R=C||S&&_>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var b=function(e,u){var j=e.className,k=O(u).exec(j);if(k){var z=j.slice(k.index+k[0].length);e.className=j.slice(0,k.index)+(z?k[1]+z:"")}};function E(e){for(var u=e.childNodes.length;u>0;--u)e.removeChild(e.firstChild);return e}function w(e,u){return E(e).appendChild(u)}function T(e,u,j,k){var z=document.createElement(e);if(j&&(z.className=j),k&&(z.style.cssText=k),typeof u=="string")z.appendChild(document.createTextNode(u));else if(u)for(var te=0;te<u.length;++te)z.appendChild(u[te]);return z}function F(e,u,j,k){var z=T(e,u,j,k);return z.setAttribute("role","presentation"),z}var M;document.createRange?M=function(e,u,j,k){var z=document.createRange();return z.setEnd(k||e,j),z.setStart(e,u),z}:M=function(e,u,j){var k=document.body.createTextRange();try{k.moveToElementText(e.parentNode)}catch(z){return k}return k.collapse(!0),k.moveEnd("character",j),k.moveStart("character",u),k};function L(e,u){if(u.nodeType==3&&(u=u.parentNode),e.contains)return e.contains(u);do if(u.nodeType==11&&(u=u.host),u==e)return!0;while(u=u.parentNode)}function Y(){var e;try{e=document.activeElement}catch(u){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function K(e,u){var j=e.className;O(u).test(j)||(e.className+=(j?" ":"")+u)}function A(e,u){for(var j=e.split(" "),k=0;k<j.length;k++)j[k]&&!O(j[k]).test(u)&&(u+=" "+j[k]);return u}var H=function(e){e.select()};h?H=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:S&&(H=function(e){try{e.select()}catch(u){}});function U(e){var u=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,u)}}function I(e,u,j){u||(u={});for(var k in e)e.hasOwnProperty(k)&&(j!==!1||!u.hasOwnProperty(k))&&(u[k]=e[k]);return u}function G(e,u,j,k,z){u==null&&(u=e.search(/[^\s\u00a0]/),u==-1&&(u=e.length));for(var te=k||0,ae=z||0;;){var he=e.indexOf(" ",te);if(he<0||he>=u)return ae+(u-te);ae+=he-te,ae+=j-ae%j,te=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,u){this.f=u;var j=+new Date+e;(!this.id||j<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=j)};function oe(e,u){for(var j=0;j<e.length;++j)if(e[j]==u)return j;return-1}var de=50,Oe={toString:function(){return"CodeMirror.Pass"}},Ae={scroll:!1},pe={origin:"*mouse"},Se={origin:"+move"};function be(e,u,j){for(var k=0,z=0;;){var te=e.indexOf(" ",k);te==-1&&(te=e.length);var ae=te-k;if(te==e.length||z+ae>=u)return k+Math.min(ae,u-z);if(z+=te-k,z+=j-z%j,k=te+1,z>=u)return k}}var se=[""];function ee(e){for(;se.length<=e;)se.push(B(se)+" ");return se[e]}function B(e){return e[e.length-1]}function V(e,u){for(var j=[],k=0;k<e.length;k++)j[k]=u(e[k],k);return j}function X(e,u,j){for(var k=0,z=j(u);k<e.length&&j(e[k])<=z;)k++;e.splice(k,0,u)}function Q(){}function Z(e,u){var j;return Object.create?j=Object.create(e):(Q.prototype=e,j=new Q),u&&I(u,j),j}var ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function re(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ie.test(e))}function $(e,u){return u?u.source.indexOf("\\w")>-1&&re(e)?!0:u.test(e):re(e)}function J(e){for(var u in e)if(e.hasOwnProperty(u)&&e[u])return!1;return!0}var le=/[\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 ue(e){return e.charCodeAt(0)>=768&&le.test(e)}function xe(e,u,j){for(;(j<0?u>0:u<e.length)&&ue(e.charAt(u));)u+=j;return u}function Me(e,u,j){for(var k=u>j?-1:1;;){if(u==j)return u;var z=(u+j)/2,te=k<0?Math.ceil(z):Math.floor(z);if(te==u)return e(te)?u:j;e(te)?j=te:u=te+k}}function Xe(e,u,j,k){if(!e)return k(u,j,"ltr",0);for(var z=!1,te=0;te<e.length;++te){var ae=e[te];(ae.from<j&&ae.to>u||u==j&&ae.to==u)&&(k(Math.max(ae.from,u),Math.min(ae.to,j),ae.level==1?"rtl":"ltr",te),z=!0)}z||k(u,j,"ltr")}var $e=null;function Je(e,u,j){var k;$e=null;for(var z=0;z<e.length;++z){var te=e[z];if(te.from<u&&te.to>u)return z;te.to==u&&(te.from!=te.to&&j=="before"?k=z:$e=z),te.from==u&&(te.from!=te.to&&j!="before"?k=z:$e=z)}return k!=null?k:$e}var rt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",u="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function j(we){return we<=247?e.charAt(we):1424<=we&&we<=1524?"R":1536<=we&&we<=1785?u.charAt(we-1536):1774<=we&&we<=2220?"r":8192<=we&&we<=8203?"w":we==8204?"b":"L"}var k=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,z=/[stwN]/,te=/[LRr]/,ae=/[Lb1n]/,he=/[1n]/;function me(we,Ue,Ge){this.level=we,this.from=Ue,this.to=Ge}return function(we,Ue){var Ge=Ue=="ltr"?"L":"R";if(we.length==0||Ue=="ltr"&&!k.test(we))return!1;for(var nt=we.length,Qe=[],gt=0;gt<nt;++gt)Qe.push(j(we.charCodeAt(gt)));for(var Lt=0,Ft=Ge;Lt<nt;++Lt){var $t=Qe[Lt];$t=="m"?Qe[Lt]=Ft:Ft=$t}for(var or=0,Jt=Ge;or<nt;++or){var pr=Qe[or];pr=="1"&&Jt=="r"?Qe[or]="n":te.test(pr)&&(Jt=pr,pr=="r"&&(Qe[or]="R"))}for(var zr=1,Nr=Qe[0];zr<nt-1;++zr){var dn=Qe[zr];dn=="+"&&Nr=="1"&&Qe[zr+1]=="1"?Qe[zr]="1":dn==","&&Nr==Qe[zr+1]&&(Nr=="1"||Nr=="n")&&(Qe[zr]=Nr),Nr=dn}for(var jn=0;jn<nt;++jn){var mi=Qe[jn];if(mi==",")Qe[jn]="N";else if(mi=="%"){var Yn=void 0;for(Yn=jn+1;Yn<nt&&Qe[Yn]=="%";++Yn);for(var Ki=jn&&Qe[jn-1]=="!"||Yn<nt&&Qe[Yn]=="1"?"1":"N",Bi=jn;Bi<Yn;++Bi)Qe[Bi]=Ki;jn=Yn-1}}for(var ii=0,Hi=Ge;ii<nt;++ii){var xi=Qe[ii];Hi=="L"&&xi=="1"?Qe[ii]="L":te.test(xi)&&(Hi=xi)}for(var fi=0;fi<nt;++fi)if(z.test(Qe[fi])){var ai=void 0;for(ai=fi+1;ai<nt&&z.test(Qe[ai]);++ai);for(var Qn=(fi?Qe[fi-1]:Ge)=="L",Wi=(ai<nt?Qe[ai]:Ge)=="L",lo=Qn==Wi?Qn?"L":"R":Ge,Ua=fi;Ua<ai;++Ua)Qe[Ua]=lo;fi=ai-1}for(var Oi=[],ba,gi=0;gi<nt;)if(ae.test(Qe[gi])){var ps=gi;for(++gi;gi<nt&&ae.test(Qe[gi]);++gi);Oi.push(new me(0,ps,gi))}else{var Ia=gi,Ka=Oi.length,Va=Ue=="rtl"?1:0;for(++gi;gi<nt&&Qe[gi]!="L";++gi);for(var ki=Ia;ki<gi;)if(he.test(Qe[ki])){Ia<ki&&(Oi.splice(Ka,0,new me(1,Ia,ki)),Ka+=Va);var uo=ki;for(++ki;ki<gi&&he.test(Qe[ki]);++ki);Oi.splice(Ka,0,new me(2,uo,ki)),Ka+=Va,Ia=ki}else++ki;Ia<gi&&Oi.splice(Ka,0,new me(1,Ia,gi))}return Ue=="ltr"&&(Oi[0].level==1&&(ba=we.match(/^\s+/))&&(Oi[0].from=ba[0].length,Oi.unshift(new me(0,0,ba[0].length))),B(Oi).level==1&&(ba=we.match(/\s+$/))&&(B(Oi).to-=ba[0].length,Oi.push(new me(0,nt-ba[0].length,nt)))),Ue=="rtl"?Oi.reverse():Oi}}();function it(e,u){var j=e.order;return j==null&&(j=e.order=rt(e.text,u)),j}var je=[],Ie=function(e,u,j){if(e.addEventListener)e.addEventListener(u,j,!1);else if(e.attachEvent)e.attachEvent("on"+u,j);else{var k=e._handlers||(e._handlers={});k[u]=(k[u]||je).concat(j)}};function qe(e,u){return e._handlers&&e._handlers[u]||je}function st(e,u,j){if(e.removeEventListener)e.removeEventListener(u,j,!1);else if(e.detachEvent)e.detachEvent("on"+u,j);else{var k=e._handlers,z=k&&k[u];if(z){var te=oe(z,j);te>-1&&(k[u]=z.slice(0,te).concat(z.slice(te+1)))}}}function Ee(e,u){var j=qe(e,u);if(!j.length)return;for(var k=Array.prototype.slice.call(arguments,2),z=0;z<j.length;++z)j[z].apply(null,k)}function ce(e,u,j){return typeof u=="string"&&(u={type:u,preventDefault:function(){this.defaultPrevented=!0}}),Ee(e,j||u.type,e,u),Re(u)||u.codemirrorIgnore}function fe(e){var u=e._handlers&&e._handlers.cursorActivity;if(!u)return;for(var j=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),k=0;k<u.length;++k)oe(j,u[k])==-1&&j.push(u[k])}function ve(e,u){return qe(e,u).length>0}function Ce(e){e.prototype.on=function(u,j){Ie(this,u,j)},e.prototype.off=function(u,j){st(this,u,j)}}function ge(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ye(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Re(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function De(e){ge(e),ye(e)}function Pe(e){return e.target||e.srcElement}function ze(e){var u=e.which;return u==null&&(e.button&1?u=1:e.button&2?u=3:e.button&4&&(u=2)),a&&e.ctrlKey&&u==1&&(u=3),u}var at=function(){if(S&&_<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}(),lt;function St(e){if(lt==null){var u=T("span","\u200B");w(e,T("span",[u,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(lt=u.offsetWidth<=1&&u.offsetHeight>2&&!(S&&_<8))}var j=lt?T("span","\u200B"):T("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return j.setAttribute("cm-text",""),j}var Ot;function ir(e){if(Ot!=null)return Ot;var u=w(e,document.createTextNode("A\u062EA")),j=M(u,0,1).getBoundingClientRect(),k=M(u,1,2).getBoundingClientRect();return E(e),!j||j.left==j.right?!1:Ot=k.right-j.right<3}var Gt=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var u=0,j=[],k=e.length;u<=k;){var z=e.indexOf(`
|
|
|
`,u);z==-1&&(z=e.length);var te=e.slice(u,e.charAt(z-1)=="\r"?z-1:z),ae=te.indexOf("\r");ae!=-1?(j.push(te.slice(0,ae)),u+=ae+1):(j.push(te),u=z+1)}return j}:function(e){return e.split(/\r\n?|\n/)},yt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(u){return!1}}:function(e){var u;try{u=e.ownerDocument.selection.createRange()}catch(j){}return!u||u.parentElement()!=e?!1:u.compareEndPoints("StartToEnd",u)!=0},Fr=function(){var e=T("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Pr=null;function jr(e){if(Pr!=null)return Pr;var u=w(e,T("span","x")),j=u.getBoundingClientRect(),k=M(u,0,1).getBoundingClientRect();return Pr=Math.abs(j.left-k.left)>1}var un={},xr={};function an(e,u){arguments.length>2&&(u.dependencies=Array.prototype.slice.call(arguments,2)),un[e]=u}function tn(e,u){xr[e]=u}function Ir(e){if(typeof e=="string"&&xr.hasOwnProperty(e))e=xr[e];else if(e&&typeof e.name=="string"&&xr.hasOwnProperty(e.name)){var u=xr[e.name];typeof u=="string"&&(u={name:u}),e=Z(u,e),e.name=u.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ir("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ir("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function hn(e,u){u=Ir(u);var j=un[u.name];if(!j)return hn(e,"text/plain");var k=j(e,u);if(lr.hasOwnProperty(u.name)){var z=lr[u.name];for(var te in z){if(!z.hasOwnProperty(te))continue;k.hasOwnProperty(te)&&(k["_"+te]=k[te]),k[te]=z[te]}}if(k.name=u.name,u.helperType&&(k.helperType=u.helperType),u.modeProps)for(var ae in u.modeProps)k[ae]=u.modeProps[ae];return k}var lr={};function Cr(e,u){var j=lr.hasOwnProperty(e)?lr[e]:lr[e]={};I(u,j)}function gr(e,u){if(u===!0)return u;if(e.copyState)return e.copyState(u);var j={};for(var k in u){var z=u[k];z instanceof Array&&(z=z.concat([])),j[k]=z}return j}function xn(e,u){for(var j;e.innerMode&&!(j=e.innerMode(u),!j||j.mode==e);)u=j.state,e=j.mode;return j||{mode:e,state:u}}function Wn(e,u,j){return e.startState?e.startState(u,j):!0}var gn=function(e,u,j){this.pos=this.start=0,this.string=e,this.tabSize=u||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=j};gn.prototype.eol=function(){return this.pos>=this.string.length},gn.prototype.sol=function(){return this.pos==this.lineStart},gn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},gn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},gn.prototype.eat=function(e){var u=this.string.charAt(this.pos),j;if(typeof e=="string"?j=u==e:j=u&&(e.test?e.test(u):e(u)),j)return++this.pos,u},gn.prototype.eatWhile=function(e){for(var u=this.pos;this.eat(e););return this.pos>u},gn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},gn.prototype.skipToEnd=function(){this.pos=this.string.length},gn.prototype.skipTo=function(e){var u=this.string.indexOf(e,this.pos);if(u>-1)return this.pos=u,!0},gn.prototype.backUp=function(e){this.pos-=e},gn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=G(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?G(this.string,this.lineStart,this.tabSize):0)},gn.prototype.indentation=function(){return G(this.string,null,this.tabSize)-(this.lineStart?G(this.string,this.lineStart,this.tabSize):0)},gn.prototype.match=function(e,u,j){if(typeof e=="string"){var k=function(ae){return j?ae.toLowerCase():ae},z=this.string.substr(this.pos,e.length);if(k(z)==k(e))return u!==!1&&(this.pos+=e.length),!0}else{var te=this.string.slice(this.pos).match(e);return te&&te.index>0?null:(te&&u!==!1&&(this.pos+=te[0].length),te)}},gn.prototype.current=function(){return this.string.slice(this.start,this.pos)},gn.prototype.hideFirstChars=function(e,u){this.lineStart+=e;try{return u()}finally{this.lineStart-=e}},gn.prototype.lookAhead=function(e){var u=this.lineOracle;return u&&u.lookAhead(e)},gn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Bt(e,u){if(u-=e.first,u<0||u>=e.size)throw new Error("There is no line "+(u+e.first)+" in the document.");for(var j=e;!j.lines;)for(var k=0;;++k){var z=j.children[k],te=z.chunkSize();if(u<te){j=z;break}u-=te}return j.lines[u]}function Kr(e,u,j){var k=[],z=u.line;return e.iter(u.line,j.line+1,function(te){var ae=te.text;z==j.line&&(ae=ae.slice(0,j.ch)),z==u.line&&(ae=ae.slice(u.ch)),k.push(ae),++z}),k}function rn(e,u,j){var k=[];return e.iter(u,j,function(z){k.push(z.text)}),k}function Or(e,u){var j=u-e.height;if(j)for(var k=e;k;k=k.parent)k.height+=j}function Lr(e){if(e.parent==null)return null;for(var u=e.parent,j=oe(u.lines,e),k=u.parent;k;u=k,k=k.parent)for(var z=0;!(k.children[z]==u);++z)j+=k.children[z].chunkSize();return j+u.first}function Wr(e,u){var j=e.first;e:do{for(var k=0;k<e.children.length;++k){var z=e.children[k],te=z.height;if(u<te){e=z;continue e}u-=te,j+=z.chunkSize()}return j}while(!e.lines);for(var ae=0;ae<e.lines.length;++ae){var he=e.lines[ae],me=he.height;if(u<me)break;u-=me}return j+ae}function Fn(e,u){return u>=e.first&&u<e.first+e.size}function yn(e,u){return String(e.lineNumberFormatter(u+e.firstLineNumber))}function Ct(e,u,j){if(j===void 0&&(j=null),!(this instanceof Ct))return new Ct(e,u,j);this.line=e,this.ch=u,this.sticky=j}function ur(e,u){return e.line-u.line||e.ch-u.ch}function oi(e,u){return e.sticky==u.sticky&&ur(e,u)==0}function wi(e){return Ct(e.line,e.ch)}function Pi(e,u){return ur(e,u)<0?u:e}function vi(e,u){return ur(e,u)<0?e:u}function Un(e,u){return Math.max(e.first,Math.min(u,e.first+e.size-1))}function wr(e,u){if(u.line<e.first)return Ct(e.first,0);var j=e.first+e.size-1;return u.line>j?Ct(j,Bt(e,j).text.length):si(u,Bt(e,u.line).text.length)}function si(e,u){var j=e.ch;return j==null||j>u?Ct(e.line,u):j<0?Ct(e.line,0):e}function It(e,u){for(var j=[],k=0;k<u.length;k++)j[k]=wr(e,u[k]);return j}var Zn=function(e,u){this.state=e,this.lookAhead=u},Bn=function(e,u,j,k){this.state=u,this.doc=e,this.line=j,this.maxLookAhead=k||0,this.baseTokens=null,this.baseTokenPos=1};Bn.prototype.lookAhead=function(e){var u=this.doc.getLine(this.line+e);return u!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),u},Bn.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var u=this.baseTokens[this.baseTokenPos+1];return{type:u&&u.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Bn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Bn.fromSaved=function(e,u,j){return u instanceof Zn?new Bn(e,gr(e.mode,u.state),j,u.lookAhead):new Bn(e,gr(e.mode,u),j)},Bn.prototype.save=function(e){var u=e!==!1?gr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Zn(u,this.maxLookAhead):u};function zi(e,u,j,k){var z=[e.state.modeGen],te={};yi(e,u.text,e.doc.mode,j,function(we,Ue){return z.push(we,Ue)},te,k);for(var ae=j.state,he=function(we){j.baseTokens=z;var Ue=e.state.overlays[we],Ge=1,nt=0;j.state=!0,yi(e,u.text,Ue.mode,j,function(Qe,gt){for(var Lt=Ge;nt<Qe;){var Ft=z[Ge];Ft>Qe&&z.splice(Ge,1,Qe,z[Ge+1],Ft),Ge+=2,nt=Math.min(Qe,Ft)}if(!gt)return;if(Ue.opaque)z.splice(Lt,Ge-Lt,Qe,"overlay "+gt),Ge=Lt+2;else for(;Lt<Ge;Lt+=2){var $t=z[Lt+1];z[Lt+1]=($t?$t+" ":"")+"overlay "+gt}},te),j.state=ae,j.baseTokens=null,j.baseTokenPos=1},me=0;me<e.state.overlays.length;++me)he(me);return{styles:z,classes:te.bgClass||te.textClass?te:null}}function Ti(e,u,j){if(!u.styles||u.styles[0]!=e.state.modeGen){var k=ri(e,Lr(u)),z=u.text.length>e.options.maxHighlightLength&&gr(e.doc.mode,k.state),te=zi(e,u,k);z&&(k.state=z),u.stateAfter=k.save(!z),u.styles=te.styles,te.classes?u.styleClasses=te.classes:u.styleClasses&&(u.styleClasses=null),j===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return u.styles}function ri(e,u,j){var k=e.doc,z=e.display;if(!k.mode.startState)return new Bn(k,!0,u);var te=bi(e,u,j),ae=te>k.first&&Bt(k,te-1).stateAfter,he=ae?Bn.fromSaved(k,ae,te):new Bn(k,Wn(k.mode),te);return k.iter(te,u,function(me){Qi(e,me.text,he);var we=he.line;me.stateAfter=we==u-1||we%5==0||we>=z.viewFrom&&we<z.viewTo?he.save():null,he.nextLine()}),j&&(k.modeFrontier=he.line),he}function Qi(e,u,j,k){var z=e.doc.mode,te=new gn(u,e.options.tabSize,j);for(te.start=te.pos=k||0,u==""&&Zi(z,j.state);!te.eol();)li(z,te,j.state),te.start=te.pos}function Zi(e,u){if(e.blankLine)return e.blankLine(u);if(!e.innerMode)return;var j=xn(e,u);if(j.mode.blankLine)return j.mode.blankLine(j.state)}function li(e,u,j,k){for(var z=0;z<10;z++){k&&(k[0]=xn(e,j).mode);var te=e.token(u,j);if(u.pos>u.start)return te}throw new Error("Mode "+e.name+" failed to advance stream.")}var In=function(e,u,j){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=u||null,this.state=j};function ui(e,u,j,k){var z=e.doc,te=z.mode,ae;u=wr(z,u);var he=Bt(z,u.line),me=ri(e,u.line,j),we=new gn(he.text,e.options.tabSize,me),Ue;for(k&&(Ue=[]);(k||we.pos<u.ch)&&!we.eol();)we.start=we.pos,ae=li(te,we,me.state),k&&Ue.push(new In(we,ae,gr(z.mode,me.state)));return k?Ue:new In(we,ae,me.state)}function Mi(e,u){if(e)for(;;){var j=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!j)break;e=e.slice(0,j.index)+e.slice(j.index+j[0].length);var k=j[1]?"bgClass":"textClass";u[k]==null?u[k]=j[2]:new RegExp("(?:^|\\s)"+j[2]+"(?:$|\\s)").test(u[k])||(u[k]+=" "+j[2])}return e}function yi(e,u,j,k,z,te,ae){var he=j.flattenSpans;he==null&&(he=e.options.flattenSpans);var me=0,we=null,Ue=new gn(u,e.options.tabSize,k),Ge,nt=e.options.addModeClass&&[null];for(u==""&&Mi(Zi(j,k.state),te);!Ue.eol();){if(Ue.pos>e.options.maxHighlightLength?(he=!1,ae&&Qi(e,u,k,Ue.pos),Ue.pos=u.length,Ge=null):Ge=Mi(li(j,Ue,k.state,nt),te),nt){var Qe=nt[0].name;Qe&&(Ge="m-"+(Ge?Qe+" "+Ge:Qe))}if(!he||we!=Ge){for(;me<Ue.start;)me=Math.min(Ue.start,me+5e3),z(me,we);we=Ge}Ue.start=Ue.pos}for(;me<Ue.pos;){var gt=Math.min(Ue.pos,me+5e3);z(gt,we),me=gt}}function bi(e,u,j){for(var k,z,te=e.doc,ae=j?-1:u-(e.doc.mode.innerMode?1e3:100),he=u;he>ae;--he){if(he<=te.first)return te.first;var me=Bt(te,he-1),we=me.stateAfter;if(we&&(!j||he+(we instanceof Zn?we.lookAhead:0)<=te.modeFrontier))return he;var Ue=G(me.text,null,e.options.tabSize);(z==null||k>Ue)&&(z=he-1,k=Ue)}return z}function Da(e,u){if(e.modeFrontier=Math.min(e.modeFrontier,u),e.highlightFrontier<u-10)return;for(var j=e.first,k=u-1;k>j;k--){var z=Bt(e,k).stateAfter;if(z&&(!(z instanceof Zn)||k+z.lookAhead<u)){j=k+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,j)}var Vi=!1,zn=!1;function Gi(){Vi=!0}function _a(){zn=!0}function Ni(e,u,j){this.marker=e,this.from=u,this.to=j}function ci(e,u){if(e)for(var j=0;j<e.length;++j){var k=e[j];if(k.marker==u)return k}}function oa(e,u){for(var j,k=0;k<e.length;++k)e[k]!=u&&(j||(j=[])).push(e[k]);return j}function pa(e,u){e.markedSpans=e.markedSpans?e.markedSpans.concat([u]):[u],u.marker.attachLine(e)}function sa(e,u,j){var k;if(e)for(var z=0;z<e.length;++z){var te=e[z],ae=te.marker,he=te.from==null||(ae.inclusiveLeft?te.from<=u:te.from<u);if(he||te.from==u&&ae.type=="bookmark"&&(!j||!te.marker.insertLeft)){var me=te.to==null||(ae.inclusiveRight?te.to>=u:te.to>u);(k||(k=[])).push(new Ni(ae,te.from,me?null:te.to))}}return k}function ma(e,u,j){var k;if(e)for(var z=0;z<e.length;++z){var te=e[z],ae=te.marker,he=te.to==null||(ae.inclusiveRight?te.to>=u:te.to>u);if(he||te.from==u&&ae.type=="bookmark"&&(!j||te.marker.insertLeft)){var me=te.from==null||(ae.inclusiveLeft?te.from<=u:te.from<u);(k||(k=[])).push(new Ni(ae,me?null:te.from-u,te.to==null?null:te.to-u))}}return k}function qi(e,u){if(u.full)return null;var j=Fn(e,u.from.line)&&Bt(e,u.from.line).markedSpans,k=Fn(e,u.to.line)&&Bt(e,u.to.line).markedSpans;if(!j&&!k)return null;var z=u.from.ch,te=u.to.ch,ae=ur(u.from,u.to)==0,he=sa(j,z,ae),me=ma(k,te,ae),we=u.text.length==1,Ue=B(u.text).length+(we?z:0);if(he)for(var Ge=0;Ge<he.length;++Ge){var nt=he[Ge];if(nt.to==null){var Qe=ci(me,nt.marker);Qe?we&&(nt.to=Qe.to==null?null:Qe.to+Ue):nt.to=z}}if(me)for(var gt=0;gt<me.length;++gt){var Lt=me[gt];if(Lt.to!=null&&(Lt.to+=Ue),Lt.from==null){var Ft=ci(he,Lt.marker);Ft||(Lt.from=Ue,we&&(he||(he=[])).push(Lt))}else Lt.from+=Ue,we&&(he||(he=[])).push(Lt)}he&&(he=Si(he)),me&&me!=he&&(me=Si(me));var $t=[he];if(!we){var or=u.text.length-2,Jt;if(or>0&&he)for(var pr=0;pr<he.length;++pr)he[pr].to==null&&(Jt||(Jt=[])).push(new Ni(he[pr].marker,null,null));for(var zr=0;zr<or;++zr)$t.push(Jt);$t.push(me)}return $t}function Si(e){for(var u=0;u<e.length;++u){var j=e[u];j.from!=null&&j.from==j.to&&j.marker.clearWhenEmpty!==!1&&e.splice(u--,1)}return e.length?e:null}function ea(e,u,j){var k=null;if(e.iter(u.line,j.line+1,function(Qe){if(Qe.markedSpans)for(var gt=0;gt<Qe.markedSpans.length;++gt){var Lt=Qe.markedSpans[gt].marker;Lt.readOnly&&(!k||oe(k,Lt)==-1)&&(k||(k=[])).push(Lt)}}),!k)return null;for(var z=[{from:u,to:j}],te=0;te<k.length;++te)for(var ae=k[te],he=ae.find(0),me=0;me<z.length;++me){var we=z[me];if(ur(we.to,he.from)<0||ur(we.from,he.to)>0)continue;var Ue=[me,1],Ge=ur(we.from,he.from),nt=ur(we.to,he.to);(Ge<0||!ae.inclusiveLeft&&!Ge)&&Ue.push({from:we.from,to:he.from}),(nt>0||!ae.inclusiveRight&&!nt)&&Ue.push({from:he.to,to:we.to}),z.splice.apply(z,Ue),me+=Ue.length-3}return z}function Ea(e){var u=e.markedSpans;if(!u)return;for(var j=0;j<u.length;++j)u[j].marker.detachLine(e);e.markedSpans=null}function mt(e,u){if(!u)return;for(var j=0;j<u.length;++j)u[j].marker.attachLine(e);e.markedSpans=u}function tt(e){return e.inclusiveLeft?-1:0}function pt(e){return e.inclusiveRight?1:0}function Et(e,u){var j=e.lines.length-u.lines.length;if(j!=0)return j;var k=e.find(),z=u.find(),te=ur(k.from,z.from)||tt(e)-tt(u);if(te)return-te;var ae=ur(k.to,z.to)||pt(e)-pt(u);return ae||u.id-e.id}function Ut(e,u){var j=zn&&e.markedSpans,k;if(j)for(var z=void 0,te=0;te<j.length;++te)z=j[te],z.marker.collapsed&&(u?z.from:z.to)==null&&(!k||Et(k,z.marker)<0)&&(k=z.marker);return k}function Dt(e){return Ut(e,!0)}function Xt(e){return Ut(e,!1)}function Pt(e,u){var j=zn&&e.markedSpans,k;if(j)for(var z=0;z<j.length;++z){var te=j[z];te.marker.collapsed&&(te.from==null||te.from<u)&&(te.to==null||te.to>u)&&(!k||Et(k,te.marker)<0)&&(k=te.marker)}return k}function ut(e,u,j,k,z){var te=Bt(e,u),ae=zn&&te.markedSpans;if(ae)for(var he=0;he<ae.length;++he){var me=ae[he];if(!me.marker.collapsed)continue;var we=me.marker.find(0),Ue=ur(we.from,j)||tt(me.marker)-tt(z),Ge=ur(we.to,k)||pt(me.marker)-pt(z);if(Ue>=0&&Ge<=0||Ue<=0&&Ge>=0)continue;if(Ue<=0&&(me.marker.inclusiveRight&&z.inclusiveLeft?ur(we.to,j)>=0:ur(we.to,j)>0)||Ue>=0&&(me.marker.inclusiveRight&&z.inclusiveLeft?ur(we.from,k)<=0:ur(we.from,k)<0))return!0}}function vt(e){for(var u;u=Dt(e);)e=u.find(-1,!0).line;return e}function bt(e){for(var u;u=Xt(e);)e=u.find(1,!0).line;return e}function tr(e){for(var u,j;u=Xt(e);)e=u.find(1,!0).line,(j||(j=[])).push(e);return j}function Qt(e,u){var j=Bt(e,u),k=vt(j);return j==k?u:Lr(k)}function Wt(e,u){if(u>e.lastLine())return u;var j=Bt(e,u),k;if(!jt(e,j))return u;for(;k=Xt(j);)j=k.find(1,!0).line;return Lr(j)+1}function jt(e,u){var j=zn&&u.markedSpans;if(j)for(var k=void 0,z=0;z<j.length;++z){if(k=j[z],!k.marker.collapsed)continue;if(k.from==null)return!0;if(k.marker.widgetNode)continue;if(k.from==0&&k.marker.inclusiveLeft&&Yt(e,u,k))return!0}}function Yt(e,u,j){if(j.to==null){var k=j.marker.find(1,!0);return Yt(e,k.line,ci(k.line.markedSpans,j.marker))}if(j.marker.inclusiveRight&&j.to==u.text.length)return!0;for(var z=void 0,te=0;te<u.markedSpans.length;++te)if(z=u.markedSpans[te],z.marker.collapsed&&!z.marker.widgetNode&&z.from==j.to&&(z.to==null||z.to!=j.from)&&(z.marker.inclusiveLeft||j.marker.inclusiveRight)&&Yt(e,u,z))return!0}function qt(e){e=vt(e);for(var u=0,j=e.parent,k=0;k<j.lines.length;++k){var z=j.lines[k];if(z==e)break;u+=z.height}for(var te=j.parent;te;j=te,te=j.parent)for(var ae=0;ae<te.children.length;++ae){var he=te.children[ae];if(he==j)break;u+=he.height}return u}function et(e){if(e.height==0)return 0;for(var u=e.text.length,j,k=e;j=Dt(k);){var z=j.find(0,!0);k=z.from.line,u+=z.from.ch-z.to.ch}for(k=e;j=Xt(k);){var te=j.find(0,!0);u-=k.text.length-te.from.ch,k=te.to.line,u+=k.text.length-te.to.ch}return u}function vr(e){var u=e.display,j=e.doc;u.maxLine=Bt(j,j.first),u.maxLineLength=et(u.maxLine),u.maxLineChanged=!0,j.iter(function(k){var z=et(k);z>u.maxLineLength&&(u.maxLineLength=z,u.maxLine=k)})}var Ar=function(e,u,j){this.text=e,mt(this,u),this.height=j?j(this):1};Ar.prototype.lineNo=function(){return Lr(this)},Ce(Ar);function cr(e,u,j,k){e.text=u,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Ea(e),mt(e,j);var z=k?k(e):1;z!=e.height&&Or(e,z)}function ht(e){e.parent=null,Ea(e)}var _t={},ft={};function Tt(e,u){if(!e||/^\s*$/.test(e))return null;var j=u.addModeClass?ft:_t;return j[e]||(j[e]=e.replace(/\S+/g,"cm-$&"))}function zt(e,u){var j=F("span",null,null,t?"padding-right: .1px":null),k={pre:F("pre",[j],"CodeMirror-line"),content:j,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};u.measure={};for(var z=0;z<=(u.rest?u.rest.length:0);z++){var te=z?u.rest[z-1]:u.line,ae=void 0;k.pos=0,k.addToken=Kt,ir(e.display.measure)&&(ae=it(te,e.doc.direction))&&(k.addToken=kr(k.addToken,ae)),k.map=[];var he=u!=e.display.externalMeasured&&Lr(te);Ze(te,k,Ti(e,te,he)),te.styleClasses&&(te.styleClasses.bgClass&&(k.bgClass=A(te.styleClasses.bgClass,k.bgClass||"")),te.styleClasses.textClass&&(k.textClass=A(te.styleClasses.textClass,k.textClass||""))),k.map.length==0&&k.map.push(0,0,k.content.appendChild(St(e.display.measure))),z==0?(u.measure.map=k.map,u.measure.cache={}):((u.measure.maps||(u.measure.maps=[])).push(k.map),(u.measure.caches||(u.measure.caches=[])).push({}))}if(t){var me=k.content.lastChild;(/\bcm-tab\b/.test(me.className)||me.querySelector&&me.querySelector(".cm-tab"))&&(k.content.className="cm-tab-wrap-hack")}return Ee(e,"renderLine",e,u.line,k.pre),k.pre.className&&(k.textClass=A(k.pre.className,k.textClass||"")),k}function rr(e){var u=T("span","\u2022","cm-invalidchar");return u.title="\\u"+e.charCodeAt(0).toString(16),u.setAttribute("aria-label",u.title),u}function Kt(e,u,j,k,z,te,ae){if(!u)return;var he=e.splitSpaces?yr(u,e.trailingSpace):u,me=e.cm.state.specialChars,we=!1,Ue;if(!me.test(u))e.col+=u.length,Ue=document.createTextNode(he),e.map.push(e.pos,e.pos+u.length,Ue),S&&_<9&&(we=!0),e.pos+=u.length;else{Ue=document.createDocumentFragment();for(var Ge=0;;){me.lastIndex=Ge;var nt=me.exec(u),Qe=nt?nt.index-Ge:u.length-Ge;if(Qe){var gt=document.createTextNode(he.slice(Ge,Ge+Qe));S&&_<9?Ue.appendChild(T("span",[gt])):Ue.appendChild(gt),e.map.push(e.pos,e.pos+Qe,gt),e.col+=Qe,e.pos+=Qe}if(!nt)break;Ge+=Qe+1;var Lt=void 0;if(nt[0]==" "){var Ft=e.cm.options.tabSize,$t=Ft-e.col%Ft;Lt=Ue.appendChild(T("span",ee($t),"cm-tab")),Lt.setAttribute("role","presentation"),Lt.setAttribute("cm-text"," "),e.col+=$t}else nt[0]=="\r"||nt[0]==`
|
|
|
`?(Lt=Ue.appendChild(T("span",nt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Lt.setAttribute("cm-text",nt[0]),e.col+=1):(Lt=e.cm.options.specialCharPlaceholder(nt[0]),Lt.setAttribute("cm-text",nt[0]),S&&_<9?Ue.appendChild(T("span",[Lt])):Ue.appendChild(Lt),e.col+=1);e.map.push(e.pos,e.pos+1,Lt),e.pos++}}if(e.trailingSpace=he.charCodeAt(u.length-1)==32,j||k||z||we||te||ae){var or=j||"";k&&(or+=k),z&&(or+=z);var Jt=T("span",[Ue],or,te);if(ae)for(var pr in ae)ae.hasOwnProperty(pr)&&pr!="style"&&pr!="class"&&Jt.setAttribute(pr,ae[pr]);return e.content.appendChild(Jt)}e.content.appendChild(Ue)}function yr(e,u){if(e.length>1&&!/ /.test(e))return e;for(var j=u,k="",z=0;z<e.length;z++){var te=e.charAt(z);te==" "&&j&&(z==e.length-1||e.charCodeAt(z+1)==32)&&(te="\xA0"),k+=te,j=te==" "}return k}function kr(e,u){return function(j,k,z,te,ae,he,me){z=z?z+" cm-force-border":"cm-force-border";for(var we=j.pos,Ue=we+k.length;;){for(var Ge=void 0,nt=0;nt<u.length&&!(Ge=u[nt],Ge.to>we&&Ge.from<=we);nt++);if(Ge.to>=Ue)return e(j,k,z,te,ae,he,me);e(j,k.slice(0,Ge.to-we),z,te,null,he,me),te=null,k=k.slice(Ge.to-we),we=Ge.to}}}function sr(e,u,j,k){var z=!k&&j.widgetNode;z&&e.map.push(e.pos,e.pos+u,z),!k&&e.cm.display.input.needsContentAttribute&&(z||(z=e.content.appendChild(document.createElement("span"))),z.setAttribute("cm-marker",j.id)),z&&(e.cm.display.input.setUneditable(z),e.content.appendChild(z)),e.pos+=u,e.trailingSpace=!1}function Ze(e,u,j){var k=e.markedSpans,z=e.text,te=0;if(!k){for(var ae=1;ae<j.length;ae+=2)u.addToken(u,z.slice(te,te=j[ae]),Tt(j[ae+1],u.cm.options));return}for(var he=z.length,me=0,we=1,Ue="",Ge,nt,Qe=0,gt,Lt,Ft,$t,or;;){if(Qe==me){gt=Lt=Ft=nt="",or=null,$t=null,Qe=Infinity;for(var Jt=[],pr=void 0,zr=0;zr<k.length;++zr){var Nr=k[zr],dn=Nr.marker;if(dn.type=="bookmark"&&Nr.from==me&&dn.widgetNode)Jt.push(dn);else if(Nr.from<=me&&(Nr.to==null||Nr.to>me||dn.collapsed&&Nr.to==me&&Nr.from==me)){if(Nr.to!=null&&Nr.to!=me&&Qe>Nr.to&&(Qe=Nr.to,Lt=""),dn.className&&(gt+=" "+dn.className),dn.css&&(nt=(nt?nt+";":"")+dn.css),dn.startStyle&&Nr.from==me&&(Ft+=" "+dn.startStyle),dn.endStyle&&Nr.to==Qe&&(pr||(pr=[])).push(dn.endStyle,Nr.to),dn.title&&((or||(or={})).title=dn.title),dn.attributes)for(var jn in dn.attributes)(or||(or={}))[jn]=dn.attributes[jn];dn.collapsed&&(!$t||Et($t.marker,dn)<0)&&($t=Nr)}else Nr.from>me&&Qe>Nr.from&&(Qe=Nr.from)}if(pr)for(var mi=0;mi<pr.length;mi+=2)pr[mi+1]==Qe&&(Lt+=" "+pr[mi]);if(!$t||$t.from==me)for(var Yn=0;Yn<Jt.length;++Yn)sr(u,0,Jt[Yn]);if($t&&($t.from||0)==me){if(sr(u,($t.to==null?he+1:$t.to)-me,$t.marker,$t.from==null),$t.to==null)return;$t.to==me&&($t=!1)}}if(me>=he)break;for(var Ki=Math.min(he,Qe);;){if(Ue){var Bi=me+Ue.length;if(!$t){var ii=Bi>Ki?Ue.slice(0,Ki-me):Ue;u.addToken(u,ii,Ge?Ge+gt:gt,Ft,me+ii.length==Qe?Lt:"",nt,or)}if(Bi>=Ki){Ue=Ue.slice(Ki-me),me=Ki;break}me=Bi,Ft=""}Ue=z.slice(te,te=j[we++]),Ge=Tt(j[we++],u.cm.options)}}}function kt(e,u,j){this.line=u,this.rest=tr(u),this.size=this.rest?Lr(B(this.rest))-j+1:1,this.node=this.text=null,this.hidden=jt(e,u)}function Zr(e,u,j){for(var k=[],z,te=u;te<j;te=z){var ae=new kt(e.doc,Bt(e.doc,te),te);z=te+ae.size,k.push(ae)}return k}var Vr=null;function nr(e){Vr?Vr.ops.push(e):e.ownsGroup=Vr={ops:[e],delayedCallbacks:[]}}function br(e){var u=e.delayedCallbacks,j=0;do{for(;j<u.length;j++)u[j].call(null);for(var k=0;k<e.ops.length;k++){var z=e.ops[k];if(z.cursorActivityHandlers)for(;z.cursorActivityCalled<z.cursorActivityHandlers.length;)z.cursorActivityHandlers[z.cursorActivityCalled++].call(null,z.cm)}}while(j<u.length)}function Tr(e,u){var j=e.ownsGroup;if(!j)return;try{br(j)}finally{Vr=null,u(j)}}var Rt=null;function Ht(e,u){var j=qe(e,u);if(!j.length)return;var k=Array.prototype.slice.call(arguments,2),z;Vr?z=Vr.delayedCallbacks:Rt?z=Rt:(z=Rt=[],setTimeout(ar,0));for(var te=function(he){z.push(function(){return j[he].apply(null,k)})},ae=0;ae<j.length;++ae)te(ae)}function ar(){var e=Rt;Rt=null;for(var u=0;u<e.length;++u)e[u]()}function Vt(e,u,j,k){for(var z=0;z<u.changes.length;z++){var te=u.changes[z];te=="text"?wt(e,u):te=="gutter"?Jr(e,u,j,k):te=="class"?_r(e,u):te=="widget"&&qr(e,u,k)}u.changes=null}function ct(e){return e.node==e.text&&(e.node=T("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),S&&_<8&&(e.node.style.zIndex=2)),e.node}function dt(e,u){var j=u.bgClass?u.bgClass+" "+(u.line.bgClass||""):u.line.bgClass;if(j&&(j+=" CodeMirror-linebackground"),u.background)j?u.background.className=j:(u.background.parentNode.removeChild(u.background),u.background=null);else if(j){var k=ct(u);u.background=k.insertBefore(T("div",null,j),k.firstChild),e.display.input.setUneditable(u.background)}}function Mt(e,u){var j=e.display.externalMeasured;return j&&j.line==u.line?(e.display.externalMeasured=null,u.measure=j.measure,j.built):zt(e,u)}function wt(e,u){var j=u.text.className,k=Mt(e,u);u.text==u.node&&(u.node=k.pre),u.text.parentNode.replaceChild(k.pre,u.text),u.text=k.pre,k.bgClass!=u.bgClass||k.textClass!=u.textClass?(u.bgClass=k.bgClass,u.textClass=k.textClass,_r(e,u)):j&&(u.text.className=j)}function _r(e,u){dt(e,u),u.line.wrapClass?ct(u).className=u.line.wrapClass:u.node!=u.text&&(u.node.className="");var j=u.textClass?u.textClass+" "+(u.line.textClass||""):u.line.textClass;u.text.className=j||""}function Jr(e,u,j,k){if(u.gutter&&(u.node.removeChild(u.gutter),u.gutter=null),u.gutterBackground&&(u.node.removeChild(u.gutterBackground),u.gutterBackground=null),u.line.gutterClass){var z=ct(u);u.gutterBackground=T("div",null,"CodeMirror-gutter-background "+u.line.gutterClass,"left: "+(e.options.fixedGutter?k.fixedPos:-k.gutterTotalWidth)+"px; width: "+k.gutterTotalWidth+"px"),e.display.input.setUneditable(u.gutterBackground),z.insertBefore(u.gutterBackground,u.text)}var te=u.line.gutterMarkers;if(e.options.lineNumbers||te){var ae=ct(u),he=u.gutter=T("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?k.fixedPos:-k.gutterTotalWidth)+"px");if(e.display.input.setUneditable(he),ae.insertBefore(he,u.text),u.line.gutterClass&&(he.className+=" "+u.line.gutterClass),e.options.lineNumbers&&(!te||!te["CodeMirror-linenumbers"])&&(u.lineNumber=he.appendChild(T("div",yn(e.options,j),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+k.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),te)for(var me=0;me<e.display.gutterSpecs.length;++me){var we=e.display.gutterSpecs[me].className,Ue=te.hasOwnProperty(we)&&te[we];Ue&&he.appendChild(T("div",[Ue],"CodeMirror-gutter-elt","left: "+k.gutterLeft[we]+"px; width: "+k.gutterWidth[we]+"px"))}}}function qr(e,u,j){u.alignable&&(u.alignable=null);for(var k=O("CodeMirror-linewidget"),z=u.node.firstChild,te=void 0;z;z=te)te=z.nextSibling,k.test(z.className)&&u.node.removeChild(z);Xr(e,u,j)}function mr(e,u,j,k){var z=Mt(e,u);return u.text=u.node=z.pre,z.bgClass&&(u.bgClass=z.bgClass),z.textClass&&(u.textClass=z.textClass),_r(e,u),Jr(e,u,j,k),Xr(e,u,k),u.node}function Xr(e,u,j){if(Rr(e,u.line,u,j,!0),u.rest)for(var k=0;k<u.rest.length;k++)Rr(e,u.rest[k],u,j,!1)}function Rr(e,u,j,k,z){if(!u.widgets)return;for(var te=ct(j),ae=0,he=u.widgets;ae<he.length;++ae){var me=he[ae],we=T("div",[me.node],"CodeMirror-linewidget"+(me.className?" "+me.className:""));me.handleMouseEvents||we.setAttribute("cm-ignore-events","true"),on(me,we,j,k),e.display.input.setUneditable(we),z&&me.above?te.insertBefore(we,j.gutter||j.text):te.appendChild(we),Ht(me,"redraw")}}function on(e,u,j,k){if(e.noHScroll){(j.alignable||(j.alignable=[])).push(u);var z=k.wrapperWidth;u.style.left=k.fixedPos+"px",e.coverGutter||(z-=k.gutterTotalWidth,u.style.paddingLeft=k.gutterTotalWidth+"px"),u.style.width=z+"px"}e.coverGutter&&(u.style.zIndex=5,u.style.position="relative",e.noHScroll||(u.style.marginLeft=-k.gutterTotalWidth+"px"))}function Ur(e){if(e.height!=null)return e.height;var u=e.doc.cm;if(!u)return 0;if(!L(document.body,e.node)){var j="position: relative;";e.coverGutter&&(j+="margin-left: -"+u.display.gutters.offsetWidth+"px;"),e.noHScroll&&(j+="width: "+u.display.wrapper.clientWidth+"px;"),w(u.display.measure,T("div",[e.node],null,j))}return e.height=e.node.parentNode.offsetHeight}function sn(e,u){for(var j=Pe(u);j!=e.wrapper;j=j.parentNode)if(!j||j.nodeType==1&&j.getAttribute("cm-ignore-events")=="true"||j.parentNode==e.sizer&&j!=e.mover)return!0}function Hn(e){return e.lineSpace.offsetTop}function ke(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function We(e){if(e.cachedPaddingH)return e.cachedPaddingH;var u=w(e.measure,T("pre","x","CodeMirror-line-like")),j=window.getComputedStyle?window.getComputedStyle(u):u.currentStyle,k={left:parseInt(j.paddingLeft),right:parseInt(j.paddingRight)};return!isNaN(k.left)&&!isNaN(k.right)&&(e.cachedPaddingH=k),k}function Ve(e){return de-e.display.nativeBarWidth}function Fe(e){return e.display.scroller.clientWidth-Ve(e)-e.display.barWidth}function _e(e){return e.display.scroller.clientHeight-Ve(e)-e.display.barHeight}function Le(e,u,j){var k=e.options.lineWrapping,z=k&&Fe(e);if(!u.measure.heights||k&&u.measure.width!=z){var te=u.measure.heights=[];if(k){u.measure.width=z;for(var ae=u.text.firstChild.getClientRects(),he=0;he<ae.length-1;he++){var me=ae[he],we=ae[he+1];Math.abs(me.bottom-we.bottom)>2&&te.push((me.bottom+we.top)/2-j.top)}}te.push(j.bottom-j.top)}}function Te(e,u,j){if(e.line==u)return{map:e.measure.map,cache:e.measure.cache};for(var k=0;k<e.rest.length;k++)if(e.rest[k]==u)return{map:e.measure.maps[k],cache:e.measure.caches[k]};for(var z=0;z<e.rest.length;z++)if(Lr(e.rest[z])>j)return{map:e.measure.maps[z],cache:e.measure.caches[z],before:!0}}function Ne(e,u){u=vt(u);var j=Lr(u),k=e.display.externalMeasured=new kt(e.doc,u,j);k.lineN=j;var z=k.built=zt(e,k);return k.text=z.pre,w(e.display.lineMeasure,z.pre),k}function He(e,u,j,k){return Ye(e,Be(e,u),j,k)}function Ke(e,u){if(u>=e.display.viewFrom&&u<e.display.viewTo)return e.display.view[An(e,u)];var j=e.display.externalMeasured;if(j&&u>=j.lineN&&u<j.lineN+j.size)return j}function Be(e,u){var j=Lr(u),k=Ke(e,j);k&&!k.text?k=null:k&&k.changes&&(Vt(e,k,j,Mn(e)),e.curOp.forceUpdate=!0),k||(k=Ne(e,u));var z=Te(k,u,j);return{line:u,view:k,rect:null,map:z.map,cache:z.cache,before:z.before,hasHeights:!1}}function Ye(e,u,j,k,z){u.before&&(j=-1);var te=j+(k||""),ae;return u.cache.hasOwnProperty(te)?ae=u.cache[te]:(u.rect||(u.rect=u.view.text.getBoundingClientRect()),u.hasHeights||(Le(e,u.view,u.rect),u.hasHeights=!0),ae=Nt(e,u,j,k),ae.bogus||(u.cache[te]=ae)),{left:ae.left,right:ae.right,top:z?ae.rtop:ae.top,bottom:z?ae.rbottom:ae.bottom}}var ot={left:0,right:0,top:0,bottom:0};function xt(e,u,j){for(var k,z,te,ae,he,me,we=0;we<e.length;we+=3)if(he=e[we],me=e[we+1],u<he?(z=0,te=1,ae="left"):u<me?(z=u-he,te=z+1):(we==e.length-3||u==me&&e[we+3]>u)&&(te=me-he,z=te-1,u>=me&&(ae="right")),z!=null){if(k=e[we+2],he==me&&j==(k.insertLeft?"left":"right")&&(ae=j),j=="left"&&z==0)for(;we&&e[we-2]==e[we-3]&&e[we-1].insertLeft;)k=e[(we-=3)+2],ae="left";if(j=="right"&&z==me-he)for(;we<e.length-3&&e[we+3]==e[we+4]&&!e[we+5].insertLeft;)k=e[(we+=3)+2],ae="right";break}return{node:k,start:z,end:te,collapse:ae,coverStart:he,coverEnd:me}}function At(e,u){var j=ot;if(u=="left")for(var k=0;k<e.length&&!((j=e[k]).left!=j.right);k++);else for(var z=e.length-1;z>=0&&!((j=e[z]).left!=j.right);z--);return j}function Nt(e,u,j,k){var z=xt(u.map,j,k),te=z.node,ae=z.start,he=z.end,me=z.collapse,we;if(te.nodeType==3){for(var Ue=0;Ue<4;Ue++){for(;ae&&ue(u.line.text.charAt(z.coverStart+ae));)--ae;for(;z.coverStart+he<z.coverEnd&&ue(u.line.text.charAt(z.coverStart+he));)++he;if(S&&_<9&&ae==0&&he==z.coverEnd-z.coverStart?we=te.parentNode.getBoundingClientRect():we=At(M(te,ae,he).getClientRects(),k),we.left||we.right||ae==0)break;he=ae,ae=ae-1,me="right"}S&&_<11&&(we=Er(e.display.measure,we))}else{ae>0&&(me=k="right");var Ge;e.options.lineWrapping&&(Ge=te.getClientRects()).length>1?we=Ge[k=="right"?Ge.length-1:0]:we=te.getBoundingClientRect()}if(S&&_<9&&!ae&&(!we||!we.left&&!we.right)){var nt=te.parentNode.getClientRects()[0];nt?we={left:nt.left,right:nt.left+$n(e.display),top:nt.top,bottom:nt.bottom}:we=ot}for(var Qe=we.top-u.rect.top,gt=we.bottom-u.rect.top,Lt=(Qe+gt)/2,Ft=u.view.measure.heights,$t=0;$t<Ft.length-1&&!(Lt<Ft[$t]);$t++);var or=$t?Ft[$t-1]:0,Jt=Ft[$t],pr={left:(me=="right"?we.right:we.left)-u.rect.left,right:(me=="left"?we.left:we.right)-u.rect.left,top:or,bottom:Jt};return!we.left&&!we.right&&(pr.bogus=!0),e.options.singleCursorHeightPerLine||(pr.rtop=Qe,pr.rbottom=gt),pr}function Er(e,u){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!jr(e))return u;var j=screen.logicalXDPI/screen.deviceXDPI,k=screen.logicalYDPI/screen.deviceYDPI;return{left:u.left*j,right:u.right*j,top:u.top*k,bottom:u.bottom*k}}function Hr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var u=0;u<e.rest.length;u++)e.measure.caches[u]={}}function Br(e){e.display.externalMeasure=null,E(e.display.lineMeasure);for(var u=0;u<e.display.view.length;u++)Hr(e.display.view[u])}function Gr(e){Br(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Mr(){return i&&f?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Yr(){return i&&f?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function $r(e){var u=0;if(e.widgets)for(var j=0;j<e.widgets.length;++j)e.widgets[j].above&&(u+=Ur(e.widgets[j]));return u}function cn(e,u,j,k,z){if(!z){var te=$r(u);j.top+=te,j.bottom+=te}if(k=="line")return j;k||(k="local");var ae=qt(u);if(k=="local"?ae+=Hn(e.display):ae-=e.display.viewOffset,k=="page"||k=="window"){var he=e.display.lineSpace.getBoundingClientRect();ae+=he.top+(k=="window"?0:Yr());var me=he.left+(k=="window"?0:Mr());j.left+=me,j.right+=me}return j.top+=ae,j.bottom+=ae,j}function en(e,u,j){if(j=="div")return u;var k=u.left,z=u.top;if(j=="page")k-=Mr(),z-=Yr();else if(j=="local"||!j){var te=e.display.sizer.getBoundingClientRect();k+=te.left,z+=te.top}var ae=e.display.lineSpace.getBoundingClientRect();return{left:k-ae.left,top:z-ae.top}}function Tn(e,u,j,k,z){return k||(k=Bt(e.doc,u.line)),cn(e,k,He(e,k,u.ch,z),j)}function nn(e,u,j,k,z,te){k=k||Bt(e.doc,u.line),z||(z=Be(e,k));function ae(gt,Lt){var Ft=Ye(e,z,gt,Lt?"right":"left",te);return Lt?Ft.left=Ft.right:Ft.right=Ft.left,cn(e,k,Ft,j)}var he=it(k,e.doc.direction),me=u.ch,we=u.sticky;if(me>=k.text.length?(me=k.text.length,we="before"):me<=0&&(me=0,we="after"),!he)return ae(we=="before"?me-1:me,we=="before");function Ue(gt,Lt,Ft){var $t=he[Lt],or=$t.level==1;return ae(Ft?gt-1:gt,or!=Ft)}var Ge=Je(he,me,we),nt=$e,Qe=Ue(me,Ge,we=="before");return nt!=null&&(Qe.other=Ue(me,nt,we!="before")),Qe}function Sr(e,u){var j=0;u=wr(e.doc,u),e.options.lineWrapping||(j=$n(e.display)*u.ch);var k=Bt(e.doc,u.line),z=qt(k)+Hn(e.display);return{left:j,right:j,top:z,bottom:z+k.height}}function Dr(e,u,j,k,z){var te=Ct(e,u,j);return te.xRel=z,k&&(te.outside=k),te}function Qr(e,u,j){var k=e.doc;if(j+=e.display.viewOffset,j<0)return Dr(k.first,0,null,-1,-1);var z=Wr(k,j),te=k.first+k.size-1;if(z>te)return Dr(k.first+k.size-1,Bt(k,te).text.length,null,1,1);u<0&&(u=0);for(var ae=Bt(k,z);;){var he=Pn(e,ae,z,u,j),me=Pt(ae,he.ch+(he.xRel>0||he.outside>0?1:0));if(!me)return he;var we=me.find(1);if(we.line==z)return we;ae=Bt(k,z=we.line)}}function ln(e,u,j,k){k-=$r(u);var z=u.text.length,te=Me(function(ae){return Ye(e,j,ae-1).bottom<=k},z,0);return z=Me(function(ae){return Ye(e,j,ae).top>k},te,z),{begin:te,end:z}}function hr(e,u,j,k){j||(j=Be(e,u));var z=cn(e,u,Ye(e,j,k),"line").top;return ln(e,u,j,z)}function fn(e,u,j,k){return e.bottom<=j?!1:e.top>j?!0:(k?e.left:e.right)>u}function Pn(e,u,j,k,z){z-=qt(u);var te=Be(e,u),ae=$r(u),he=0,me=u.text.length,we=!0,Ue=it(u,e.doc.direction);if(Ue){var Ge=(e.options.lineWrapping?On:vn)(e,u,j,te,Ue,k,z);we=Ge.level!=1,he=we?Ge.from:Ge.to-1,me=we?Ge.to:Ge.from-1}var nt=null,Qe=null,gt=Me(function(zr){var Nr=Ye(e,te,zr);return Nr.top+=ae,Nr.bottom+=ae,fn(Nr,k,z,!1)?(Nr.top<=z&&Nr.left<=k&&(nt=zr,Qe=Nr),!0):!1},he,me),Lt,Ft,$t=!1;if(Qe){var or=k-Qe.left<Qe.right-k,Jt=or==we;gt=nt+(Jt?0:1),Ft=Jt?"after":"before",Lt=or?Qe.left:Qe.right}else{!we&&(gt==me||gt==he)&>++,Ft=gt==0?"after":gt==u.text.length?"before":Ye(e,te,gt-(we?1:0)).bottom+ae<=z==we?"after":"before";var pr=nn(e,Ct(j,gt,Ft),"line",u,te);Lt=pr.left,$t=z<pr.top?-1:z>=pr.bottom?1:0}return gt=xe(u.text,gt,1),Dr(j,gt,Ft,$t,k-Lt)}function vn(e,u,j,k,z,te,ae){var he=Me(function(Ge){var nt=z[Ge],Qe=nt.level!=1;return fn(nn(e,Ct(j,Qe?nt.to:nt.from,Qe?"before":"after"),"line",u,k),te,ae,!0)},0,z.length-1),me=z[he];if(he>0){var we=me.level!=1,Ue=nn(e,Ct(j,we?me.from:me.to,we?"after":"before"),"line",u,k);fn(Ue,te,ae,!0)&&Ue.top>ae&&(me=z[he-1])}return me}function On(e,u,j,k,z,te,ae){var he=ln(e,u,k,ae),me=he.begin,we=he.end;/\s/.test(u.text.charAt(we-1))&&we--;for(var Ue=null,Ge=null,nt=0;nt<z.length;nt++){var Qe=z[nt];if(Qe.from>=we||Qe.to<=me)continue;var gt=Qe.level!=1,Lt=Ye(e,k,gt?Math.min(we,Qe.to)-1:Math.max(me,Qe.from)).right,Ft=Lt<te?te-Lt+1e9:Lt-te;(!Ue||Ge>Ft)&&(Ue=Qe,Ge=Ft)}return Ue||(Ue=z[z.length-1]),Ue.from<me&&(Ue={from:me,to:Ue.to,level:Ue.level}),Ue.to>we&&(Ue={from:Ue.from,to:we,level:Ue.level}),Ue}var bn;function Gn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(bn==null){bn=T("pre",null,"CodeMirror-line-like");for(var u=0;u<49;++u)bn.appendChild(document.createTextNode("x")),bn.appendChild(T("br"));bn.appendChild(document.createTextNode("x"))}w(e.measure,bn);var j=bn.offsetHeight/50;return j>3&&(e.cachedTextHeight=j),E(e.measure),j||1}function $n(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var u=T("span","xxxxxxxxxx"),j=T("pre",[u],"CodeMirror-line-like");w(e.measure,j);var k=u.getBoundingClientRect(),z=(k.right-k.left)/10;return z>2&&(e.cachedCharWidth=z),z||10}function Mn(e){for(var u=e.display,j={},k={},z=u.gutters.clientLeft,te=u.gutters.firstChild,ae=0;te;te=te.nextSibling,++ae){var he=e.display.gutterSpecs[ae].className;j[he]=te.offsetLeft+te.clientLeft+z,k[he]=te.clientWidth}return{fixedPos:ni(u),gutterTotalWidth:u.gutters.offsetWidth,gutterLeft:j,gutterWidth:k,wrapperWidth:u.wrapper.clientWidth}}function ni(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ji(e){var u=Gn(e.display),j=e.options.lineWrapping,k=j&&Math.max(5,e.display.scroller.clientWidth/$n(e.display)-3);return function(z){if(jt(e.doc,z))return 0;var te=0;if(z.widgets)for(var ae=0;ae<z.widgets.length;ae++)z.widgets[ae].height&&(te+=z.widgets[ae].height);return j?te+(Math.ceil(z.text.length/k)||1)*u:te+u}}function pi(e){var u=e.doc,j=ji(e);u.iter(function(k){var z=j(k);z!=k.height&&Or(k,z)})}function Jn(e,u,j,k){var z=e.display;if(!j&&Pe(u).getAttribute("cm-not-content")=="true")return null;var te,ae,he=z.lineSpace.getBoundingClientRect();try{te=u.clientX-he.left,ae=u.clientY-he.top}catch(Ge){return null}var me=Qr(e,te,ae),we;if(k&&me.xRel>0&&(we=Bt(e.doc,me.line).text).length==me.ch){var Ue=G(we,we.length,e.options.tabSize)-we.length;me=Ct(me.line,Math.max(0,Math.round((te-We(e.display).left)/$n(e.display))-Ue))}return me}function An(e,u){if(u>=e.display.viewTo)return null;if(u-=e.display.viewFrom,u<0)return null;for(var j=e.display.view,k=0;k<j.length;k++)if(u-=j[k].size,u<0)return k}function Rn(e,u,j,k){u==null&&(u=e.doc.first),j==null&&(j=e.doc.first+e.doc.size),k||(k=0);var z=e.display;if(k&&j<z.viewTo&&(z.updateLineNumbers==null||z.updateLineNumbers>u)&&(z.updateLineNumbers=u),e.curOp.viewChanged=!0,u>=z.viewTo)zn&&Qt(e.doc,u)<z.viewTo&&kn(e);else if(j<=z.viewFrom)zn&&Wt(e.doc,j+k)>z.viewFrom?kn(e):(z.viewFrom+=k,z.viewTo+=k);else if(u<=z.viewFrom&&j>=z.viewTo)kn(e);else if(u<=z.viewFrom){var te=Vn(e,j,j+k,1);te?(z.view=z.view.slice(te.index),z.viewFrom=te.lineN,z.viewTo+=k):kn(e)}else if(j>=z.viewTo){var ae=Vn(e,u,u,-1);ae?(z.view=z.view.slice(0,ae.index),z.viewTo=ae.lineN):kn(e)}else{var he=Vn(e,u,u,-1),me=Vn(e,j,j+k,1);he&&me?(z.view=z.view.slice(0,he.index).concat(Zr(e,he.lineN,me.lineN)).concat(z.view.slice(me.index)),z.viewTo+=k):kn(e)}var we=z.externalMeasured;we&&(j<we.lineN?we.lineN+=k:u<we.lineN+we.size&&(z.externalMeasured=null))}function Nn(e,u,j){e.curOp.viewChanged=!0;var k=e.display,z=e.display.externalMeasured;if(z&&u>=z.lineN&&u<z.lineN+z.size&&(k.externalMeasured=null),u<k.viewFrom||u>=k.viewTo)return;var te=k.view[An(e,u)];if(te.node==null)return;var ae=te.changes||(te.changes=[]);oe(ae,j)==-1&&ae.push(j)}function kn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Vn(e,u,j,k){var z=An(e,u),te,ae=e.display.view;if(!zn||j==e.doc.first+e.doc.size)return{index:z,lineN:j};for(var he=e.display.viewFrom,me=0;me<z;me++)he+=ae[me].size;if(he!=u){if(k>0){if(z==ae.length-1)return null;te=he+ae[z].size-u,z++}else te=he-u;u+=te,j+=te}for(;Qt(e.doc,j)!=j;){if(z==(k<0?0:ae.length-1))return null;j+=k*ae[z-(k<0?1:0)].size,z+=k}return{index:z,lineN:j}}function _i(e,u,j){var k=e.display,z=k.view;z.length==0||u>=k.viewTo||j<=k.viewFrom?(k.view=Zr(e,u,j),k.viewFrom=u):(k.viewFrom>u?k.view=Zr(e,u,k.viewFrom).concat(k.view):k.viewFrom<u&&(k.view=k.view.slice(An(e,u))),k.viewFrom=u,k.viewTo<j?k.view=k.view.concat(Zr(e,k.viewTo,j)):k.viewTo>j&&(k.view=k.view.slice(0,An(e,j)))),k.viewTo=j}function Xi(e){for(var u=e.display.view,j=0,k=0;k<u.length;k++){var z=u[k];!z.hidden&&(!z.node||z.changes)&&++j}return j}function En(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ai(e,u){u===void 0&&(u=!0);for(var j=e.doc,k={},z=k.cursors=document.createDocumentFragment(),te=k.selection=document.createDocumentFragment(),ae=0;ae<j.sel.ranges.length;ae++){if(!u&&ae==j.sel.primIndex)continue;var he=j.sel.ranges[ae];if(he.from().line>=e.display.viewTo||he.to().line<e.display.viewFrom)continue;var me=he.empty();(me||e.options.showCursorWhenSelecting)&&Ri(e,he.head,z),me||_n(e,he,te)}return k}function Ri(e,u,j){var k=nn(e,u,"div",null,null,!e.options.singleCursorHeightPerLine),z=j.appendChild(T("div","\xA0","CodeMirror-cursor"));if(z.style.left=k.left+"px",z.style.top=k.top+"px",z.style.height=Math.max(0,k.bottom-k.top)*e.options.cursorHeight+"px",k.other){var te=j.appendChild(T("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));te.style.display="",te.style.left=k.other.left+"px",te.style.top=k.other.top+"px",te.style.height=(k.other.bottom-k.other.top)*.85+"px"}}function Sn(e,u){return e.top-u.top||e.left-u.left}function _n(e,u,j){var k=e.display,z=e.doc,te=document.createDocumentFragment(),ae=We(e.display),he=ae.left,me=Math.max(k.sizerWidth,Fe(e)-k.sizer.offsetLeft)-ae.right,we=z.direction=="ltr";function Ue(Jt,pr,zr,Nr){pr<0&&(pr=0),pr=Math.round(pr),Nr=Math.round(Nr),te.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+Jt+`px;
|
|
|
top: `+pr+"px; width: "+(zr==null?me-Jt:zr)+`px;
|
|
|
height: `+(Nr-pr)+"px"))}function Ge(Jt,pr,zr){var Nr=Bt(z,Jt),dn=Nr.text.length,jn,mi;function Yn(ii,Hi){return Tn(e,Ct(Jt,ii),"div",Nr,Hi)}function Ki(ii,Hi,xi){var fi=hr(e,Nr,null,ii),ai=Hi=="ltr"==(xi=="after")?"left":"right",Qn=xi=="after"?fi.begin:fi.end-(/\s/.test(Nr.text.charAt(fi.end-1))?2:1);return Yn(Qn,ai)[ai]}var Bi=it(Nr,z.direction);return Xe(Bi,pr||0,zr==null?dn:zr,function(ii,Hi,xi,fi){var ai=xi=="ltr",Qn=Yn(ii,ai?"left":"right"),Wi=Yn(Hi-1,ai?"right":"left"),lo=pr==null&&ii==0,Ua=zr==null&&Hi==dn,Oi=fi==0,ba=!Bi||fi==Bi.length-1;if(Wi.top-Qn.top<=3){var gi=(we?lo:Ua)&&Oi,ps=(we?Ua:lo)&&ba,Ia=gi?he:(ai?Qn:Wi).left,Ka=ps?me:(ai?Wi:Qn).right;Ue(Ia,Qn.top,Ka-Ia,Qn.bottom)}else{var Va,ki,uo,ms;ai?(Va=we&&lo&&Oi?he:Qn.left,ki=we?me:Ki(ii,xi,"before"),uo=we?he:Ki(Hi,xi,"after"),ms=we&&Ua&&ba?me:Wi.right):(Va=we?Ki(ii,xi,"before"):he,ki=!we&&lo&&Oi?me:Qn.right,uo=!we&&Ua&&ba?he:Wi.left,ms=we?Ki(Hi,xi,"after"):me),Ue(Va,Qn.top,ki-Va,Qn.bottom),Qn.bottom<Wi.top&&Ue(he,Qn.bottom,null,Wi.top),Ue(uo,Wi.top,ms-uo,Wi.bottom)}(!jn||Sn(Qn,jn)<0)&&(jn=Qn),Sn(Wi,jn)<0&&(jn=Wi),(!mi||Sn(Qn,mi)<0)&&(mi=Qn),Sn(Wi,mi)<0&&(mi=Wi)}),{start:jn,end:mi}}var nt=u.from(),Qe=u.to();if(nt.line==Qe.line)Ge(nt.line,nt.ch,Qe.ch);else{var gt=Bt(z,nt.line),Lt=Bt(z,Qe.line),Ft=vt(gt)==vt(Lt),$t=Ge(nt.line,nt.ch,Ft?gt.text.length+1:null).end,or=Ge(Qe.line,Ft?0:null,Qe.ch).start;Ft&&($t.top<or.top-2?(Ue($t.right,$t.top,null,$t.bottom),Ue(he,or.top,or.left,or.bottom)):Ue($t.right,$t.top,or.left-$t.right,$t.bottom)),$t.bottom<or.top&&Ue(he,$t.bottom,null,or.top)}j.appendChild(te)}function Xn(e){if(!e.state.focused)return;var u=e.display;clearInterval(u.blinker);var j=!0;u.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?u.blinker=setInterval(function(){e.hasFocus()||ra(e),u.cursorDiv.style.visibility=(j=!j)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(u.cursorDiv.style.visibility="hidden")}function Ba(e){e.state.focused||(e.display.input.focus(),ta(e))}function xa(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ra(e))},100)}function ta(e,u){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ee(e,"focus",e,u),e.state.focused=!0,K(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),t&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Xn(e)}function ra(e,u){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ee(e,"blur",e,u),e.state.focused=!1,b(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function La(e){for(var u=e.display,j=u.lineDiv.offsetTop,k=0;k<u.view.length;k++){var z=u.view[k],te=e.options.lineWrapping,ae=void 0,he=0;if(z.hidden)continue;if(S&&_<8){var me=z.node.offsetTop+z.node.offsetHeight;ae=me-j,j=me}else{var we=z.node.getBoundingClientRect();ae=we.bottom-we.top,!te&&z.text.firstChild&&(he=z.text.firstChild.getBoundingClientRect().right-we.left-1)}var Ue=z.line.height-ae;if((Ue>.005||Ue<-.005)&&(Or(z.line,ae),wa(z.line),z.rest))for(var Ge=0;Ge<z.rest.length;Ge++)wa(z.rest[Ge]);if(he>e.display.sizerWidth){var nt=Math.ceil(he/$n(e.display));nt>e.display.maxLineLength&&(e.display.maxLineLength=nt,e.display.maxLine=z.line,e.display.maxLineChanged=!0)}}}function wa(e){if(e.widgets)for(var u=0;u<e.widgets.length;++u){var j=e.widgets[u],k=j.node.parentNode;k&&(j.height=k.offsetHeight)}}function ka(e,u,j){var k=j&&j.top!=null?Math.max(0,j.top):e.scroller.scrollTop;k=Math.floor(k-Hn(e));var z=j&&j.bottom!=null?j.bottom:k+e.wrapper.clientHeight,te=Wr(u,k),ae=Wr(u,z);if(j&&j.ensure){var he=j.ensure.from.line,me=j.ensure.to.line;he<te?(te=he,ae=Wr(u,qt(Bt(u,he))+e.wrapper.clientHeight)):Math.min(me,u.lastLine())>=ae&&(te=Wr(u,qt(Bt(u,me))-e.wrapper.clientHeight),ae=me)}return{from:te,to:Math.max(ae,te+1)}}function Ha(e,u){if(ce(e,"scrollCursorIntoView"))return;var j=e.display,k=j.sizer.getBoundingClientRect(),z=null;if(u.top+k.top<0?z=!0:u.bottom+k.top>(window.innerHeight||document.documentElement.clientHeight)&&(z=!1),z!=null&&!s){var te=T("div","\u200B",null,`position: absolute;
|
|
|
top: `+(u.top-j.viewOffset-Hn(e.display))+`px;
|
|
|
height: `+(u.bottom-u.top+Ve(e)+j.barHeight)+`px;
|
|
|
left: `+u.left+"px; width: "+Math.max(2,u.right-u.left)+"px;");e.display.lineSpace.appendChild(te),te.scrollIntoView(z),e.display.lineSpace.removeChild(te)}}function Xa(e,u,j,k){k==null&&(k=0);var z;!e.options.lineWrapping&&u==j&&(u=u.ch?Ct(u.line,u.sticky=="before"?u.ch-1:u.ch,"after"):u,j=u.sticky=="before"?Ct(u.line,u.ch+1,"before"):u);for(var te=0;te<5;te++){var ae=!1,he=nn(e,u),me=!j||j==u?he:nn(e,j);z={left:Math.min(he.left,me.left),top:Math.min(he.top,me.top)-k,right:Math.max(he.left,me.left),bottom:Math.max(he.bottom,me.bottom)+k};var we=na(e,z),Ue=e.doc.scrollTop,Ge=e.doc.scrollLeft;if(we.scrollTop!=null&&(aa(e,we.scrollTop),Math.abs(e.doc.scrollTop-Ue)>1&&(ae=!0)),we.scrollLeft!=null&&(Fi(e,we.scrollLeft),Math.abs(e.doc.scrollLeft-Ge)>1&&(ae=!0)),!ae)break}return z}function Pa(e,u){var j=na(e,u);j.scrollTop!=null&&aa(e,j.scrollTop),j.scrollLeft!=null&&Fi(e,j.scrollLeft)}function na(e,u){var j=e.display,k=Gn(e.display);u.top<0&&(u.top=0);var z=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:j.scroller.scrollTop,te=_e(e),ae={};u.bottom-u.top>te&&(u.bottom=u.top+te);var he=e.doc.height+ke(j),me=u.top<k,we=u.bottom>he-k;if(u.top<z)ae.scrollTop=me?0:u.top;else if(u.bottom>z+te){var Ue=Math.min(u.top,(we?he:u.bottom)-te);Ue!=z&&(ae.scrollTop=Ue)}var Ge=e.options.fixedGutter?0:j.gutters.offsetWidth,nt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:j.scroller.scrollLeft-Ge,Qe=Fe(e)-j.gutters.offsetWidth,gt=u.right-u.left>Qe;return gt&&(u.right=u.left+Qe),u.left<10?ae.scrollLeft=0:u.left<nt?ae.scrollLeft=Math.max(0,u.left+Ge-(gt?0:10)):u.right>Qe+nt-3&&(ae.scrollLeft=u.right+(gt?0:10)-Qe),ae}function Ta(e,u){if(u==null)return;va(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+u}function ga(e){va(e);var u=e.getCursor();e.curOp.scrollToPos={from:u,to:u,margin:e.options.cursorScrollMargin}}function ia(e,u,j){(u!=null||j!=null)&&va(e),u!=null&&(e.curOp.scrollLeft=u),j!=null&&(e.curOp.scrollTop=j)}function co(e,u){va(e),e.curOp.scrollToPos=u}function va(e){var u=e.curOp.scrollToPos;if(u){e.curOp.scrollToPos=null;var j=Sr(e,u.from),k=Sr(e,u.to);Sa(e,j,k,u.margin)}}function Sa(e,u,j,k){var z=na(e,{left:Math.min(u.left,j.left),top:Math.min(u.top,j.top)-k,right:Math.max(u.right,j.right),bottom:Math.max(u.bottom,j.bottom)+k});ia(e,z.scrollLeft,z.scrollTop)}function aa(e,u){if(Math.abs(e.doc.scrollTop-u)<2)return;C||za(e,{top:u}),la(e,u,!0),C&&za(e),Wa(e,100)}function la(e,u,j){if(u=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,u)),e.display.scroller.scrollTop==u&&!j)return;e.doc.scrollTop=u,e.display.scrollbars.setScrollTop(u),e.display.scroller.scrollTop!=u&&(e.display.scroller.scrollTop=u)}function Fi(e,u,j,k){if(u=Math.max(0,Math.min(u,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(j?u==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-u)<2)&&!k)return;e.doc.scrollLeft=u,mn(e),e.display.scroller.scrollLeft!=u&&(e.display.scroller.scrollLeft=u),e.display.scrollbars.setScrollLeft(u)}function Yi(e){var u=e.display,j=u.gutters.offsetWidth,k=Math.round(e.doc.height+ke(e.display));return{clientHeight:u.scroller.clientHeight,viewHeight:u.wrapper.clientHeight,scrollWidth:u.scroller.scrollWidth,clientWidth:u.scroller.clientWidth,viewWidth:u.wrapper.clientWidth,barLeft:e.options.fixedGutter?j:0,docHeight:k,scrollHeight:k+Ve(e)+u.barHeight,nativeBarWidth:u.nativeBarWidth,gutterWidth:j}}var dr=function(e,u,j){this.cm=j;var k=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),z=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");k.tabIndex=z.tabIndex=-1,e(k),e(z),Ie(k,"scroll",function(){k.clientHeight&&u(k.scrollTop,"vertical")}),Ie(z,"scroll",function(){z.clientWidth&&u(z.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,S&&_<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};dr.prototype.update=function(e){var u=e.scrollWidth>e.clientWidth+1,j=e.scrollHeight>e.clientHeight+1,k=e.nativeBarWidth;if(j){this.vert.style.display="block",this.vert.style.bottom=u?k+"px":"0";var z=e.viewHeight-(u?k:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+z)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(u){this.horiz.style.display="block",this.horiz.style.right=j?k+"px":"0",this.horiz.style.left=e.barLeft+"px";var te=e.viewWidth-e.barLeft-(j?k:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+te)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(k==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:j?k:0,bottom:u?k:0}},dr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},dr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},dr.prototype.zeroWidthHack=function(){var e=a&&!n?"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},dr.prototype.enableZeroWidthBar=function(e,u,j){e.style.pointerEvents="auto";function k(){var z=e.getBoundingClientRect(),te=j=="vert"?document.elementFromPoint(z.right-1,(z.top+z.bottom)/2):document.elementFromPoint((z.right+z.left)/2,z.bottom-1);te!=e?e.style.pointerEvents="none":u.set(1e3,k)}u.set(1e3,k)},dr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var fr=function(){};fr.prototype.update=function(){return{bottom:0,right:0}},fr.prototype.setScrollLeft=function(){},fr.prototype.setScrollTop=function(){},fr.prototype.clear=function(){};function Zt(e,u){u||(u=Yi(e));var j=e.display.barWidth,k=e.display.barHeight;pn(e,u);for(var z=0;z<4&&j!=e.display.barWidth||k!=e.display.barHeight;z++)j!=e.display.barWidth&&e.options.lineWrapping&&La(e),pn(e,Yi(e)),j=e.display.barWidth,k=e.display.barHeight}function pn(e,u){var j=e.display,k=j.scrollbars.update(u);j.sizer.style.paddingRight=(j.barWidth=k.right)+"px",j.sizer.style.paddingBottom=(j.barHeight=k.bottom)+"px",j.heightForcer.style.borderBottom=k.bottom+"px solid transparent",k.right&&k.bottom?(j.scrollbarFiller.style.display="block",j.scrollbarFiller.style.height=k.bottom+"px",j.scrollbarFiller.style.width=k.right+"px"):j.scrollbarFiller.style.display="",k.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(j.gutterFiller.style.display="block",j.gutterFiller.style.height=k.bottom+"px",j.gutterFiller.style.width=u.gutterWidth+"px"):j.gutterFiller.style.display=""}var er={native:dr,null:fr};function ua(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&b(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new er[e.options.scrollbarStyle](function(u){e.display.wrapper.insertBefore(u,e.display.scrollbarFiller),Ie(u,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),u.setAttribute("cm-not-content","true")},function(u,j){j=="horizontal"?Fi(e,u):aa(e,u)},e),e.display.scrollbars.addClass&&K(e.display.wrapper,e.display.scrollbars.addClass)}var Ya=0;function Dn(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:++Ya},nr(e.curOp)}function Ca(e){var u=e.curOp;u&&Tr(u,function(j){for(var k=0;k<j.ops.length;k++)j.ops[k].cm.curOp=null;Io(j)})}function Io(e){for(var u=e.ops,j=0;j<u.length;j++)Jo(u[j]);for(var k=0;k<u.length;k++)Qo(u[k]);for(var z=0;z<u.length;z++)Zo(u[z]);for(var te=0;te<u.length;te++)ho(u[te]);for(var ae=0;ae<u.length;ae++)qo(u[ae])}function Jo(e){var u=e.cm,j=u.display;Do(u),e.updateMaxLine&&vr(u),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<j.viewFrom||e.scrollToPos.to.line>=j.viewTo)||j.maxLineChanged&&u.options.lineWrapping,e.update=e.mustUpdate&&new $i(u,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&Oa(e.cm,e.update)}function Zo(e){var u=e.cm,j=u.display;e.updatedDisplay&&La(u),e.barMeasure=Yi(u),j.maxLineChanged&&!u.options.lineWrapping&&(e.adjustWidthTo=He(u,j.maxLine,j.maxLine.text.length).left+3,u.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(j.scroller.clientWidth,j.sizer.offsetLeft+e.adjustWidthTo+Ve(u)+u.display.barWidth),e.maxScrollLeft=Math.max(0,j.sizer.offsetLeft+e.adjustWidthTo-Fe(u))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=j.input.prepareSelection())}function ho(e){var u=e.cm;e.adjustWidthTo!=null&&(u.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<u.doc.scrollLeft&&Fi(u,Math.min(u.display.scroller.scrollLeft,e.maxScrollLeft),!0),u.display.maxLineChanged=!1);var j=e.focus&&e.focus==Y();e.preparedSelection&&u.display.input.showSelection(e.preparedSelection,j),(e.updatedDisplay||e.startHeight!=u.doc.height)&&Zt(u,e.barMeasure),e.updatedDisplay&&Cn(u,e.barMeasure),e.selectionChanged&&Xn(u),u.state.focused&&e.updateInput&&u.display.input.reset(e.typing),j&&Ba(e.cm)}function qo(e){var u=e.cm,j=u.display,k=u.doc;if(e.updatedDisplay&&$a(u,e.update),j.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(j.wheelStartX=j.wheelStartY=null),e.scrollTop!=null&&la(u,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Fi(u,e.scrollLeft,!0,!0),e.scrollToPos){var z=Xa(u,wr(k,e.scrollToPos.from),wr(k,e.scrollToPos.to),e.scrollToPos.margin);Ha(u,z)}var te=e.maybeHiddenMarkers,ae=e.maybeUnhiddenMarkers;if(te)for(var he=0;he<te.length;++he)te[he].lines.length||Ee(te[he],"hide");if(ae)for(var me=0;me<ae.length;++me)ae[me].lines.length&&Ee(ae[me],"unhide");j.wrapper.offsetHeight&&(k.scrollTop=u.display.scroller.scrollTop),e.changeObjs&&Ee(u,"changes",u,e.changeObjs),e.update&&e.update.finish()}function Ii(e,u){if(e.curOp)return u();Dn(e);try{return u()}finally{Ca(e)}}function qn(e,u){return function(){if(e.curOp)return u.apply(e,arguments);Dn(e);try{return u.apply(e,arguments)}finally{Ca(e)}}}function Ei(e){return function(){if(this.curOp)return e.apply(this,arguments);Dn(this);try{return e.apply(this,arguments)}finally{Ca(this)}}}function ei(e){return function(){var u=this.cm;if(!u||u.curOp)return e.apply(this,arguments);Dn(u);try{return e.apply(this,arguments)}finally{Ca(u)}}}function Wa(e,u){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(u,U(es,e))}function es(e){var u=e.doc;if(u.highlightFrontier>=e.display.viewTo)return;var j=+new Date+e.options.workTime,k=ri(e,u.highlightFrontier),z=[];u.iter(k.line,Math.min(u.first+u.size,e.display.viewTo+500),function(te){if(k.line>=e.display.viewFrom){var ae=te.styles,he=te.text.length>e.options.maxHighlightLength?gr(u.mode,k.state):null,me=zi(e,te,k,!0);he&&(k.state=he),te.styles=me.styles;var we=te.styleClasses,Ue=me.classes;Ue?te.styleClasses=Ue:we&&(te.styleClasses=null);for(var Ge=!ae||ae.length!=te.styles.length||we!=Ue&&(!we||!Ue||we.bgClass!=Ue.bgClass||we.textClass!=Ue.textClass),nt=0;!Ge&&nt<ae.length;++nt)Ge=ae[nt]!=te.styles[nt];Ge&&z.push(k.line),te.stateAfter=k.save(),k.nextLine()}else te.text.length<=e.options.maxHighlightLength&&Qi(e,te.text,k),te.stateAfter=k.line%5==0?k.save():null,k.nextLine();if(+new Date>j)return Wa(e,e.options.workDelay),!0}),u.highlightFrontier=k.line,u.modeFrontier=Math.max(u.modeFrontier,k.line),z.length&&Ii(e,function(){for(var te=0;te<z.length;te++)Nn(e,z[te],"text")})}var $i=function(e,u,j){var k=e.display;this.viewport=u,this.visible=ka(k,e.doc,u),this.editorIsHidden=!k.wrapper.offsetWidth,this.wrapperHeight=k.wrapper.clientHeight,this.wrapperWidth=k.wrapper.clientWidth,this.oldDisplayWidth=Fe(e),this.force=j,this.dims=Mn(e),this.events=[]};$i.prototype.signal=function(e,u){ve(e,u)&&this.events.push(arguments)},$i.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ee.apply(null,this.events[e])};function Do(e){var u=e.display;!u.scrollbarsClipped&&u.scroller.offsetWidth&&(u.nativeBarWidth=u.scroller.offsetWidth-u.scroller.clientWidth,u.heightForcer.style.height=Ve(e)+"px",u.sizer.style.marginBottom=-u.nativeBarWidth+"px",u.sizer.style.borderRightWidth=Ve(e)+"px",u.scrollbarsClipped=!0)}function Lo(e){if(e.hasFocus())return null;var u=Y();if(!u||!L(e.display.lineDiv,u))return null;var j={activeElt:u};if(window.getSelection){var k=window.getSelection();k.anchorNode&&k.extend&&L(e.display.lineDiv,k.anchorNode)&&(j.anchorNode=k.anchorNode,j.anchorOffset=k.anchorOffset,j.focusNode=k.focusNode,j.focusOffset=k.focusOffset)}return j}function ko(e){if(!e||!e.activeElt||e.activeElt==Y())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&L(document.body,e.anchorNode)&&L(document.body,e.focusNode)){var u=window.getSelection(),j=document.createRange();j.setEnd(e.anchorNode,e.anchorOffset),j.collapse(!1),u.removeAllRanges(),u.addRange(j),u.extend(e.focusNode,e.focusOffset)}}function Oa(e,u){var j=e.display,k=e.doc;if(u.editorIsHidden)return kn(e),!1;if(!u.force&&u.visible.from>=j.viewFrom&&u.visible.to<=j.viewTo&&(j.updateLineNumbers==null||j.updateLineNumbers>=j.viewTo)&&j.renderedView==j.view&&Xi(e)==0)return!1;di(e)&&(kn(e),u.dims=Mn(e));var z=k.first+k.size,te=Math.max(u.visible.from-e.options.viewportMargin,k.first),ae=Math.min(z,u.visible.to+e.options.viewportMargin);j.viewFrom<te&&te-j.viewFrom<20&&(te=Math.max(k.first,j.viewFrom)),j.viewTo>ae&&j.viewTo-ae<20&&(ae=Math.min(z,j.viewTo)),zn&&(te=Qt(e.doc,te),ae=Wt(e.doc,ae));var he=te!=j.viewFrom||ae!=j.viewTo||j.lastWrapHeight!=u.wrapperHeight||j.lastWrapWidth!=u.wrapperWidth;_i(e,te,ae),j.viewOffset=qt(Bt(e.doc,j.viewFrom)),e.display.mover.style.top=j.viewOffset+"px";var me=Xi(e);if(!he&&me==0&&!u.force&&j.renderedView==j.view&&(j.updateLineNumbers==null||j.updateLineNumbers>=j.viewTo))return!1;var we=Lo(e);return me>4&&(j.lineDiv.style.display="none"),Po(e,j.updateLineNumbers,u.dims),me>4&&(j.lineDiv.style.display=""),j.renderedView=j.view,ko(we),E(j.cursorDiv),E(j.selectionDiv),j.gutters.style.height=j.sizer.style.minHeight=0,he&&(j.lastWrapHeight=u.wrapperHeight,j.lastWrapWidth=u.wrapperWidth,Wa(e,400)),j.updateLineNumbers=null,!0}function $a(e,u){for(var j=u.viewport,k=!0;;k=!1){if(!k||!e.options.lineWrapping||u.oldDisplayWidth==Fe(e)){if(j&&j.top!=null&&(j={top:Math.min(e.doc.height+ke(e.display)-_e(e),j.top)}),u.visible=ka(e.display,e.doc,j),u.visible.from>=e.display.viewFrom&&u.visible.to<=e.display.viewTo)break}else k&&(u.visible=ka(e.display,e.doc,j));if(!Oa(e,u))break;La(e);var z=Yi(e);En(e),Zt(e,z),Cn(e,z),u.force=!1}u.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(u.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,u){var j=new $i(e,u);if(Oa(e,j)){La(e),$a(e,j);var k=Yi(e);En(e),Zt(e,k),Cn(e,k),j.finish()}}function Po(e,u,j){var k=e.display,z=e.options.lineNumbers,te=k.lineDiv,ae=te.firstChild;function he(gt){var Lt=gt.nextSibling;return t&&a&&e.display.currentWheelTarget==gt?gt.style.display="none":gt.parentNode.removeChild(gt),Lt}for(var me=k.view,we=k.viewFrom,Ue=0;Ue<me.length;Ue++){var Ge=me[Ue];if(!Ge.hidden)if(!Ge.node||Ge.node.parentNode!=te){var nt=mr(e,Ge,we,j);te.insertBefore(nt,ae)}else{for(;ae!=Ge.node;)ae=he(ae);var Qe=z&&u!=null&&u<=we&&Ge.lineNumber;Ge.changes&&(oe(Ge.changes,"gutter")>-1&&(Qe=!1),Vt(e,Ge,we,j)),Qe&&(E(Ge.lineNumber),Ge.lineNumber.appendChild(document.createTextNode(yn(e.options,we)))),ae=Ge.node.nextSibling}we+=Ge.size}for(;ae;)ae=he(ae)}function Ja(e){var u=e.gutters.offsetWidth;e.sizer.style.marginLeft=u+"px"}function Cn(e,u){e.display.sizer.style.minHeight=u.docHeight+"px",e.display.heightForcer.style.top=u.docHeight+"px",e.display.gutters.style.height=u.docHeight+e.display.barHeight+Ve(e)+"px"}function mn(e){var u=e.display,j=u.view;if(!u.alignWidgets&&(!u.gutters.firstChild||!e.options.fixedGutter))return;for(var k=ni(u)-u.scroller.scrollLeft+e.doc.scrollLeft,z=u.gutters.offsetWidth,te=k+"px",ae=0;ae<j.length;ae++)if(!j[ae].hidden){e.options.fixedGutter&&(j[ae].gutter&&(j[ae].gutter.style.left=te),j[ae].gutterBackground&&(j[ae].gutterBackground.style.left=te));var he=j[ae].alignable;if(he)for(var me=0;me<he.length;me++)he[me].style.left=te}e.options.fixedGutter&&(u.gutters.style.left=k+z+"px")}function di(e){if(!e.options.lineNumbers)return!1;var u=e.doc,j=yn(e.options,u.first+u.size-1),k=e.display;if(j.length!=k.lineNumChars){var z=k.measure.appendChild(T("div",[T("div",j)],"CodeMirror-linenumber CodeMirror-gutter-elt")),te=z.firstChild.offsetWidth,ae=z.offsetWidth-te;return k.lineGutter.style.width="",k.lineNumInnerWidth=Math.max(te,k.lineGutter.offsetWidth-ae)+1,k.lineNumWidth=k.lineNumInnerWidth+ae,k.lineNumChars=k.lineNumInnerWidth?j.length:-1,k.lineGutter.style.width=k.lineNumWidth+"px",Ja(e.display),!0}return!1}function Di(e,u){for(var j=[],k=!1,z=0;z<e.length;z++){var te=e[z],ae=null;if(typeof te!="string"&&(ae=te.style,te=te.className),te=="CodeMirror-linenumbers")if(u)k=!0;else continue;j.push({className:te,style:ae})}return u&&!k&&j.push({className:"CodeMirror-linenumbers",style:null}),j}function Ma(e){var u=e.gutters,j=e.gutterSpecs;E(u),e.lineGutter=null;for(var k=0;k<j.length;++k){var z=j[k],te=z.className,ae=z.style,he=u.appendChild(T("div",null,"CodeMirror-gutter "+te));ae&&(he.style.cssText=ae),te=="CodeMirror-linenumbers"&&(e.lineGutter=he,he.style.width=(e.lineNumWidth||1)+"px")}u.style.display=j.length?"":"none",Ja(e)}function ca(e){Ma(e.display),Rn(e),mn(e)}function Ga(e,u,j,k){var z=this;this.input=j,z.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),z.scrollbarFiller.setAttribute("cm-not-content","true"),z.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),z.gutterFiller.setAttribute("cm-not-content","true"),z.lineDiv=F("div",null,"CodeMirror-code"),z.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),z.cursorDiv=T("div",null,"CodeMirror-cursors"),z.measure=T("div",null,"CodeMirror-measure"),z.lineMeasure=T("div",null,"CodeMirror-measure"),z.lineSpace=F("div",[z.measure,z.lineMeasure,z.selectionDiv,z.cursorDiv,z.lineDiv],null,"position: relative; outline: none");var te=F("div",[z.lineSpace],"CodeMirror-lines");z.mover=T("div",[te],null,"position: relative"),z.sizer=T("div",[z.mover],"CodeMirror-sizer"),z.sizerWidth=null,z.heightForcer=T("div",null,null,"position: absolute; height: "+de+"px; width: 1px;"),z.gutters=T("div",null,"CodeMirror-gutters"),z.lineGutter=null,z.scroller=T("div",[z.sizer,z.heightForcer,z.gutters],"CodeMirror-scroll"),z.scroller.setAttribute("tabIndex","-1"),z.wrapper=T("div",[z.scrollbarFiller,z.gutterFiller,z.scroller],"CodeMirror"),S&&_<8&&(z.gutters.style.zIndex=-1,z.scroller.style.paddingRight=0),!t&&!(C&&l)&&(z.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(z.wrapper):e(z.wrapper)),z.viewFrom=z.viewTo=u.first,z.reportedViewFrom=z.reportedViewTo=u.first,z.view=[],z.renderedView=null,z.externalMeasured=null,z.viewOffset=0,z.lastWrapHeight=z.lastWrapWidth=0,z.updateLineNumbers=null,z.nativeBarWidth=z.barHeight=z.barWidth=0,z.scrollbarsClipped=!1,z.lineNumWidth=z.lineNumInnerWidth=z.lineNumChars=null,z.alignWidgets=!1,z.cachedCharWidth=z.cachedTextHeight=z.cachedPaddingH=null,z.maxLine=null,z.maxLineLength=0,z.maxLineChanged=!1,z.wheelDX=z.wheelDY=z.wheelStartX=z.wheelStartY=null,z.shift=!1,z.selForContextMenu=null,z.activeTouch=null,z.gutterSpecs=Di(k.gutters,k.lineNumbers),Ma(z),j.init(z)}var ya=0,hi=null;S?hi=-.53:C?hi=15:i?hi=-.7:o&&(hi=-1/3);function Qa(e){var u=e.wheelDeltaX,j=e.wheelDeltaY;return u==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(u=e.detail),j==null&&e.detail&&e.axis==e.VERTICAL_AXIS?j=e.detail:j==null&&(j=e.wheelDelta),{x:u,y:j}}function fo(e){var u=Qa(e);return u.x*=hi,u.y*=hi,u}function po(e,u){var j=Qa(u),k=j.x,z=j.y,te=e.display,ae=te.scroller,he=ae.scrollWidth>ae.clientWidth,me=ae.scrollHeight>ae.clientHeight;if(!(k&&he||z&&me))return;if(z&&a&&t){e:for(var we=u.target,Ue=te.view;we!=ae;we=we.parentNode)for(var Ge=0;Ge<Ue.length;Ge++)if(Ue[Ge].node==we){e.display.currentWheelTarget=we;break e}}if(k&&!C&&!c&&hi!=null){z&&me&&aa(e,Math.max(0,ae.scrollTop+z*hi)),Fi(e,Math.max(0,ae.scrollLeft+k*hi)),(!z||z&&me)&&ge(u),te.wheelStartX=null;return}if(z&&hi!=null){var nt=z*hi,Qe=e.doc.scrollTop,gt=Qe+te.wrapper.clientHeight;nt<0?Qe=Math.max(0,Qe+nt-50):gt=Math.min(e.doc.height,gt+nt+50),za(e,{top:Qe,bottom:gt})}ya<20&&(te.wheelStartX==null?(te.wheelStartX=ae.scrollLeft,te.wheelStartY=ae.scrollTop,te.wheelDX=k,te.wheelDY=z,setTimeout(function(){if(te.wheelStartX==null)return;var Lt=ae.scrollLeft-te.wheelStartX,Ft=ae.scrollTop-te.wheelStartY,$t=Ft&&te.wheelDY&&Ft/te.wheelDY||Lt&&te.wheelDX&&Lt/te.wheelDX;if(te.wheelStartX=te.wheelStartY=null,!$t)return;hi=(hi*ya+$t)/(ya+1),++ya},200)):(te.wheelDX+=k,te.wheelDY+=z))}var Li=function(e,u){this.ranges=e,this.primIndex=u};Li.prototype.primary=function(){return this.ranges[this.primIndex]},Li.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var u=0;u<this.ranges.length;u++){var j=this.ranges[u],k=e.ranges[u];if(!oi(j.anchor,k.anchor)||!oi(j.head,k.head))return!1}return!0},Li.prototype.deepCopy=function(){for(var e=[],u=0;u<this.ranges.length;u++)e[u]=new wn(wi(this.ranges[u].anchor),wi(this.ranges[u].head));return new Li(e,this.primIndex)},Li.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Li.prototype.contains=function(e,u){u||(u=e);for(var j=0;j<this.ranges.length;j++){var k=this.ranges[j];if(ur(u,k.from())>=0&&ur(e,k.to())<=0)return j}return-1};var wn=function(e,u){this.anchor=e,this.head=u};wn.prototype.from=function(){return vi(this.anchor,this.head)},wn.prototype.to=function(){return Pi(this.anchor,this.head)},wn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ji(e,u,j){var k=e&&e.options.selectionsMayTouch,z=u[j];u.sort(function(nt,Qe){return ur(nt.from(),Qe.from())}),j=oe(u,z);for(var te=1;te<u.length;te++){var ae=u[te],he=u[te-1],me=ur(he.to(),ae.from());if(k&&!ae.empty()?me>0:me>=0){var we=vi(he.from(),ae.from()),Ue=Pi(he.to(),ae.to()),Ge=he.empty()?ae.from()==ae.head:he.from()==he.head;te<=j&&--j,u.splice(--te,2,new wn(Ge?Ue:we,Ge?we:Ue))}}return new Li(u,j)}function da(e,u){return new Li([new wn(e,u||e)],0)}function ha(e){return e.text?Ct(e.from.line+e.text.length-1,B(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function mo(e,u){if(ur(e,u.from)<0)return e;if(ur(e,u.to)<=0)return ha(u);var j=e.line+u.text.length-(u.to.line-u.from.line)-1,k=e.ch;return e.line==u.to.line&&(k+=ha(u).ch-u.to.ch),Ct(j,k)}function Za(e,u){for(var j=[],k=0;k<e.sel.ranges.length;k++){var z=e.sel.ranges[k];j.push(new wn(mo(z.anchor,u),mo(z.head,u)))}return Ji(e.cm,j,e.sel.primIndex)}function Mo(e,u,j){return e.line==u.line?Ct(j.line,e.ch-u.ch+j.ch):Ct(j.line+(e.line-u.line),e.ch)}function No(e,u,j){for(var k=[],z=Ct(e.first,0),te=z,ae=0;ae<u.length;ae++){var he=u[ae],me=Mo(he.from,z,te),we=Mo(ha(he),z,te);if(z=he.to,te=we,j=="around"){var Ue=e.sel.ranges[ae],Ge=ur(Ue.head,Ue.anchor)<0;k[ae]=new wn(Ge?we:me,Ge?me:we)}else k[ae]=new wn(me,me)}return new Li(k,e.sel.primIndex)}function Aa(e){e.doc.mode=hn(e.options,e.doc.modeOption),go(e)}function go(e){e.doc.iter(function(u){u.stateAfter&&(u.stateAfter=null),u.styles&&(u.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Wa(e,100),e.state.modeGen++,e.curOp&&Rn(e)}function gs(e,u){return u.from.ch==0&&u.to.ch==0&&B(u.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,u,j,k){function z(or){return j?j[or]:null}function te(or,Jt,pr){cr(or,Jt,pr,k),Ht(or,"change",or,u)}function ae(or,Jt){for(var pr=[],zr=or;zr<Jt;++zr)pr.push(new Ar(we[zr],z(zr),k));return pr}var he=u.from,me=u.to,we=u.text,Ue=Bt(e,he.line),Ge=Bt(e,me.line),nt=B(we),Qe=z(we.length-1),gt=me.line-he.line;if(u.full)e.insert(0,ae(0,we.length)),e.remove(we.length,e.size-we.length);else if(gs(e,u)){var Lt=ae(0,we.length-1);te(Ge,Ge.text,Qe),gt&&e.remove(he.line,gt),Lt.length&&e.insert(he.line,Lt)}else if(Ue==Ge)if(we.length==1)te(Ue,Ue.text.slice(0,he.ch)+nt+Ue.text.slice(me.ch),Qe);else{var Ft=ae(1,we.length-1);Ft.push(new Ar(nt+Ue.text.slice(me.ch),Qe,k)),te(Ue,Ue.text.slice(0,he.ch)+we[0],z(0)),e.insert(he.line+1,Ft)}else if(we.length==1)te(Ue,Ue.text.slice(0,he.ch)+we[0]+Ge.text.slice(me.ch),z(0)),e.remove(he.line+1,gt);else{te(Ue,Ue.text.slice(0,he.ch)+we[0],z(0)),te(Ge,nt+Ge.text.slice(me.ch),Qe);var $t=ae(1,we.length-1);gt>1&&e.remove(he.line+1,gt-1),e.insert(he.line+1,$t)}Ht(e,"change",e,u)}function Na(e,u,j){function k(z,te,ae){if(z.linked)for(var he=0;he<z.linked.length;++he){var me=z.linked[he];if(me.doc==te)continue;var we=ae&&me.sharedHist;if(j&&!we)continue;u(me.doc,we),k(me.doc,z,we)}}k(e,null,!0)}function vs(e,u){if(u.cm)throw new Error("This document is already in use.");e.doc=u,u.cm=e,pi(e),Aa(e),ys(e),e.options.lineWrapping||vr(e),e.options.mode=u.modeOption,Rn(e)}function ys(e){(e.doc.direction=="rtl"?K:b)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Ii(e,function(){ys(e),Rn(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,u){var j={from:wi(u.from),to:ha(u),text:Kr(e,u.from,u.to)};return Es(e,j,u.from.line,u.to.line+1),Na(e,function(k){return Es(k,j,u.from.line,u.to.line+1)},!0),j}function bs(e){for(;e.length;){var u=B(e);if(u.ranges)e.pop();else break}}function ml(e,u){if(u)return bs(e.done),B(e.done);if(e.done.length&&!B(e.done).ranges)return B(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),B(e.done)}function _s(e,u,j,k){var z=e.history;z.undone.length=0;var te=+new Date,ae,he;if((z.lastOp==k||z.lastOrigin==u.origin&&u.origin&&(u.origin.charAt(0)=="+"&&z.lastModTime>te-(e.cm?e.cm.options.historyEventDelay:500)||u.origin.charAt(0)=="*"))&&(ae=ml(z,z.lastOp==k)))he=B(ae.changes),ur(u.from,u.to)==0&&ur(u.from,he.to)==0?he.to=ha(u):ae.changes.push(rs(e,u));else{var me=B(z.done);for((!me||!me.ranges)&&Fo(e.sel,z.done),ae={changes:[rs(e,u)],generation:z.generation},z.done.push(ae);z.done.length>z.undoDepth;)z.done.shift(),z.done[0].ranges||z.done.shift()}z.done.push(j),z.generation=++z.maxGeneration,z.lastModTime=z.lastSelTime=te,z.lastOp=z.lastSelOp=k,z.lastOrigin=z.lastSelOrigin=u.origin,he||Ee(e,"historyAdded")}function gl(e,u,j,k){var z=u.charAt(0);return z=="*"||z=="+"&&j.ranges.length==k.ranges.length&&j.somethingSelected()==k.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,u,j,k){var z=e.history,te=k&&k.origin;j==z.lastSelOp||te&&z.lastSelOrigin==te&&(z.lastModTime==z.lastSelTime&&z.lastOrigin==te||gl(e,te,B(z.done),u))?z.done[z.done.length-1]=u:Fo(u,z.done),z.lastSelTime=+new Date,z.lastSelOrigin=te,z.lastSelOp=j,k&&k.clearRedo!==!1&&bs(z.undone)}function Fo(e,u){var j=B(u);j&&j.ranges&&j.equals(e)||u.push(e)}function Es(e,u,j,k){var z=u["spans_"+e.id],te=0;e.iter(Math.max(e.first,j),Math.min(e.first+e.size,k),function(ae){ae.markedSpans&&((z||(z=u["spans_"+e.id]={}))[te]=ae.markedSpans),++te})}function yl(e){if(!e)return null;for(var u,j=0;j<e.length;++j)e[j].marker.explicitlyCleared?u||(u=e.slice(0,j)):u&&u.push(e[j]);return u?u.length?u:null:e}function bl(e,u){var j=u["spans_"+e.id];if(!j)return null;for(var k=[],z=0;z<u.text.length;++z)k.push(yl(j[z]));return k}function xs(e,u){var j=bl(e,u),k=qi(e,u);if(!j)return k;if(!k)return j;for(var z=0;z<j.length;++z){var te=j[z],ae=k[z];if(te&&ae){e:for(var he=0;he<ae.length;++he){for(var me=ae[he],we=0;we<te.length;++we)if(te[we].marker==me.marker)continue e;te.push(me)}}else ae&&(j[z]=ae)}return j}function qa(e,u,j){for(var k=[],z=0;z<e.length;++z){var te=e[z];if(te.ranges){k.push(j?Li.prototype.deepCopy.call(te):te);continue}var ae=te.changes,he=[];k.push({changes:he});for(var me=0;me<ae.length;++me){var we=ae[me],Ue=void 0;if(he.push({from:we.from,to:we.to,text:we.text}),u)for(var Ge in we)(Ue=Ge.match(/^spans_(\d+)$/))&&(oe(u,Number(Ue[1]))>-1&&(B(he)[Ge]=we[Ge],delete we[Ge]))}}return k}function ns(e,u,j,k){if(k){var z=e.anchor;if(j){var te=ur(u,z)<0;te!=ur(j,z)<0?(z=u,u=j):te!=ur(u,j)<0&&(u=j)}return new wn(z,u)}else return new wn(j||u,u)}function Uo(e,u,j,k,z){z==null&&(z=e.cm&&(e.cm.display.shift||e.extend)),Ci(e,new Li([ns(e.sel.primary(),u,j,z)],0),k)}function ws(e,u,j){for(var k=[],z=e.cm&&(e.cm.display.shift||e.extend),te=0;te<e.sel.ranges.length;te++)k[te]=ns(e.sel.ranges[te],u[te],null,z);var ae=Ji(e.cm,k,e.sel.primIndex);Ci(e,ae,j)}function is(e,u,j,k){var z=e.sel.ranges.slice(0);z[u]=j,Ci(e,Ji(e.cm,z,e.sel.primIndex),k)}function Ts(e,u,j,k){Ci(e,da(u,j),k)}function _l(e,u,j){var k={ranges:u.ranges,update:function(z){this.ranges=[];for(var te=0;te<z.length;te++)this.ranges[te]=new wn(wr(e,z[te].anchor),wr(e,z[te].head))},origin:j&&j.origin};return Ee(e,"beforeSelectionChange",e,k),e.cm&&Ee(e.cm,"beforeSelectionChange",e.cm,k),k.ranges!=u.ranges?Ji(e.cm,k.ranges,k.ranges.length-1):u}function Ss(e,u,j){var k=e.history.done,z=B(k);z&&z.ranges?(k[k.length-1]=u,Bo(e,u,j)):Ci(e,u,j)}function Ci(e,u,j){Bo(e,u,j),vl(e,e.sel,e.cm?e.cm.curOp.id:NaN,j)}function Bo(e,u,j){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(u=_l(e,u,j));var k=j&&j.bias||(ur(u.primary().head,e.sel.primary().head)<0?-1:1);Cs(e,As(e,u,k,!0)),!(j&&j.scroll===!1)&&e.cm&&ga(e.cm)}function Cs(e,u){if(u.equals(e.sel))return;e.sel=u,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,fe(e.cm)),Ht(e,"cursorActivity",e)}function Os(e){Cs(e,As(e,e.sel,null,!1))}function As(e,u,j,k){for(var z,te=0;te<u.ranges.length;te++){var ae=u.ranges[te],he=u.ranges.length==e.sel.ranges.length&&e.sel.ranges[te],me=Ho(e,ae.anchor,he&&he.anchor,j,k),we=Ho(e,ae.head,he&&he.head,j,k);(z||me!=ae.anchor||we!=ae.head)&&(z||(z=u.ranges.slice(0,te)),z[te]=new wn(me,we))}return z?Ji(e.cm,z,u.primIndex):u}function eo(e,u,j,k,z){var te=Bt(e,u.line);if(te.markedSpans)for(var ae=0;ae<te.markedSpans.length;++ae){var he=te.markedSpans[ae],me=he.marker,we="selectLeft"in me?!me.selectLeft:me.inclusiveLeft,Ue="selectRight"in me?!me.selectRight:me.inclusiveRight;if((he.from==null||(we?he.from<=u.ch:he.from<u.ch))&&(he.to==null||(Ue?he.to>=u.ch:he.to>u.ch))){if(z&&(Ee(me,"beforeCursorEnter"),me.explicitlyCleared))if(te.markedSpans){--ae;continue}else break;if(!me.atomic)continue;if(j){var Ge=me.find(k<0?1:-1),nt=void 0;if((k<0?Ue:we)&&(Ge=Rs(e,Ge,-k,Ge&&Ge.line==u.line?te:null)),Ge&&Ge.line==u.line&&(nt=ur(Ge,j))&&(k<0?nt<0:nt>0))return eo(e,Ge,u,k,z)}var Qe=me.find(k<0?-1:1);return(k<0?we:Ue)&&(Qe=Rs(e,Qe,k,Qe.line==u.line?te:null)),Qe?eo(e,Qe,u,k,z):null}}return u}function Ho(e,u,j,k,z){var te=k||1,ae=eo(e,u,j,te,z)||!z&&eo(e,u,j,te,!0)||eo(e,u,j,-te,z)||!z&&eo(e,u,j,-te,!0);return ae||(e.cantEdit=!0,Ct(e.first,0))}function Rs(e,u,j,k){return j<0&&u.ch==0?u.line>e.first?wr(e,Ct(u.line-1)):null:j>0&&u.ch==(k||Bt(e,u.line)).text.length?u.line<e.first+e.size-1?Ct(u.line+1,0):null:new Ct(u.line,u.ch+j)}function Is(e){e.setSelection(Ct(e.firstLine(),0),Ct(e.lastLine()),Ae)}function Ds(e,u,j){var k={canceled:!1,from:u.from,to:u.to,text:u.text,origin:u.origin,cancel:function(){return k.canceled=!0}};return j&&(k.update=function(z,te,ae,he){z&&(k.from=wr(e,z)),te&&(k.to=wr(e,te)),ae&&(k.text=ae),he!==void 0&&(k.origin=he)}),Ee(e,"beforeChange",e,k),e.cm&&Ee(e.cm,"beforeChange",e.cm,k),k.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:k.from,to:k.to,text:k.text,origin:k.origin}}function to(e,u,j){if(e.cm){if(!e.cm.curOp)return qn(e.cm,to)(e,u,j);if(e.cm.state.suppressEdits)return}if((ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))&&(u=Ds(e,u,!0),!u))return;var k=Vi&&!j&&ea(e,u.from,u.to);if(k)for(var z=k.length-1;z>=0;--z)Ls(e,{from:k[z].from,to:k[z].to,text:z?[""]:u.text,origin:u.origin});else Ls(e,u)}function Ls(e,u){if(u.text.length==1&&u.text[0]==""&&ur(u.from,u.to)==0)return;var j=Za(e,u);_s(e,u,j,e.cm?e.cm.curOp.id:NaN),vo(e,u,j,qi(e,u));var k=[];Na(e,function(z,te){!te&&oe(k,z.history)==-1&&(Ns(z.history,u),k.push(z.history)),vo(z,u,null,qi(z,u))})}function Wo(e,u,j){var k=e.cm&&e.cm.state.suppressEdits;if(k&&!j)return;for(var z=e.history,te,ae=e.sel,he=u=="undo"?z.done:z.undone,me=u=="undo"?z.undone:z.done,we=0;we<he.length&&!(te=he[we],j?te.ranges&&!te.equals(e.sel):!te.ranges);we++);if(we==he.length)return;for(z.lastOrigin=z.lastSelOrigin=null;;)if(te=he.pop(),te.ranges){if(Fo(te,me),j&&!te.equals(e.sel)){Ci(e,te,{clearRedo:!1});return}ae=te}else if(k){he.push(te);return}else break;var Ue=[];Fo(ae,me),me.push({changes:Ue,generation:z.generation}),z.generation=te.generation||++z.maxGeneration;for(var Ge=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),nt=function(Lt){var Ft=te.changes[Lt];if(Ft.origin=u,Ge&&!Ds(e,Ft,!1))return he.length=0,{};Ue.push(rs(e,Ft));var $t=Lt?Za(e,Ft):B(he);vo(e,Ft,$t,xs(e,Ft)),!Lt&&e.cm&&e.cm.scrollIntoView({from:Ft.from,to:ha(Ft)});var or=[];Na(e,function(Jt,pr){!pr&&oe(or,Jt.history)==-1&&(Ns(Jt.history,Ft),or.push(Jt.history)),vo(Jt,Ft,null,xs(Jt,Ft))})},Qe=te.changes.length-1;Qe>=0;--Qe){var gt=nt(Qe);if(gt)return gt.v}}function ks(e,u){if(u==0)return;if(e.first+=u,e.sel=new Li(V(e.sel.ranges,function(z){return new wn(Ct(z.anchor.line+u,z.anchor.ch),Ct(z.head.line+u,z.head.ch))}),e.sel.primIndex),e.cm){Rn(e.cm,e.first,e.first-u,u);for(var j=e.cm.display,k=j.viewFrom;k<j.viewTo;k++)Nn(e.cm,k,"gutter")}}function vo(e,u,j,k){if(e.cm&&!e.cm.curOp)return qn(e.cm,vo)(e,u,j,k);if(u.to.line<e.first){ks(e,u.text.length-1-(u.to.line-u.from.line));return}if(u.from.line>e.lastLine())return;if(u.from.line<e.first){var z=u.text.length-1-(e.first-u.from.line);ks(e,z),u={from:Ct(e.first,0),to:Ct(u.to.line+z,u.to.ch),text:[B(u.text)],origin:u.origin}}var te=e.lastLine();u.to.line>te&&(u={from:u.from,to:Ct(te,Bt(e,te).text.length),text:[u.text[0]],origin:u.origin}),u.removed=Kr(e,u.from,u.to),j||(j=Za(e,u)),e.cm?El(e.cm,u,k):ts(e,u,k),Bo(e,j,Ae),e.cantEdit&&Ho(e,Ct(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,u,j){var k=e.doc,z=e.display,te=u.from,ae=u.to,he=!1,me=te.line;e.options.lineWrapping||(me=Lr(vt(Bt(k,te.line))),k.iter(me,ae.line+1,function(Qe){if(Qe==z.maxLine)return he=!0,!0})),k.sel.contains(u.from,u.to)>-1&&fe(e),ts(k,u,j,ji(e)),e.options.lineWrapping||(k.iter(me,te.line+u.text.length,function(Qe){var gt=et(Qe);gt>z.maxLineLength&&(z.maxLine=Qe,z.maxLineLength=gt,z.maxLineChanged=!0,he=!1)}),he&&(e.curOp.updateMaxLine=!0)),Da(k,te.line),Wa(e,400);var we=u.text.length-(ae.line-te.line)-1;u.full?Rn(e):te.line==ae.line&&u.text.length==1&&!gs(e.doc,u)?Nn(e,te.line,"text"):Rn(e,te.line,ae.line+1,we);var Ue=ve(e,"changes"),Ge=ve(e,"change");if(Ge||Ue){var nt={from:te,to:ae,text:u.text,removed:u.removed,origin:u.origin};Ge&&Ht(e,"change",e,nt),Ue&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(nt)}e.display.selForContextMenu=null}function ro(e,u,j,k,z){var te;k||(k=j),ur(k,j)<0&&(te=[k,j],j=te[0],k=te[1]),typeof u=="string"&&(u=e.splitLines(u)),to(e,{from:j,to:k,text:u,origin:z})}function Ps(e,u,j,k){j<e.line?e.line+=k:u<e.line&&(e.line=u,e.ch=0)}function Ms(e,u,j,k){for(var z=0;z<e.length;++z){var te=e[z],ae=!0;if(te.ranges){te.copied||(te=e[z]=te.deepCopy(),te.copied=!0);for(var he=0;he<te.ranges.length;he++)Ps(te.ranges[he].anchor,u,j,k),Ps(te.ranges[he].head,u,j,k);continue}for(var me=0;me<te.changes.length;++me){var we=te.changes[me];if(j<we.from.line)we.from=Ct(we.from.line+k,we.from.ch),we.to=Ct(we.to.line+k,we.to.ch);else if(u<=we.to.line){ae=!1;break}}ae||(e.splice(0,z+1),z=0)}}function Ns(e,u){var j=u.from.line,k=u.to.line,z=u.text.length-(k-j)-1;Ms(e.done,j,k,z),Ms(e.undone,j,k,z)}function yo(e,u,j,k){var z=u,te=u;return typeof u=="number"?te=Bt(e,Un(e,u)):z=Lr(u),z==null?null:(k(te,z)&&e.cm&&Nn(e.cm,z,j),te)}function bo(e){this.lines=e,this.parent=null;for(var u=0,j=0;j<e.length;++j)e[j].parent=this,u+=e[j].height;this.height=u}bo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,u){for(var j=e,k=e+u;j<k;++j){var z=this.lines[j];this.height-=z.height,ht(z),Ht(z,"delete")}this.lines.splice(e,u)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,u,j){this.height+=j,this.lines=this.lines.slice(0,e).concat(u).concat(this.lines.slice(e));for(var k=0;k<u.length;++k)u[k].parent=this},iterN:function(e,u,j){for(var k=e+u;e<k;++e)if(j(this.lines[e]))return!0}};function _o(e){this.children=e;for(var u=0,j=0,k=0;k<e.length;++k){var z=e[k];u+=z.chunkSize(),j+=z.height,z.parent=this}this.size=u,this.height=j,this.parent=null}_o.prototype={chunkSize:function(){return this.size},removeInner:function(e,u){this.size-=u;for(var j=0;j<this.children.length;++j){var k=this.children[j],z=k.chunkSize();if(e<z){var te=Math.min(u,z-e),ae=k.height;if(k.removeInner(e,te),this.height-=ae-k.height,z==te&&(this.children.splice(j--,1),k.parent=null),(u-=te)==0)break;e=0}else e-=z}if(this.size-u<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 u=0;u<this.children.length;++u)this.children[u].collapse(e)},insertInner:function(e,u,j){this.size+=u.length,this.height+=j;for(var k=0;k<this.children.length;++k){var z=this.children[k],te=z.chunkSize();if(e<=te){if(z.insertInner(e,u,j),z.lines&&z.lines.length>50){for(var ae=z.lines.length%25+25,he=ae;he<z.lines.length;){var me=new bo(z.lines.slice(he,he+=25));z.height-=me.height,this.children.splice(++k,0,me),me.parent=this}z.lines=z.lines.slice(0,ae),this.maybeSpill()}break}e-=te}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var u=e.children.splice(e.children.length-5,5),j=new _o(u);if(e.parent){e.size-=j.size,e.height-=j.height;var z=oe(e.parent.children,e);e.parent.children.splice(z+1,0,j)}else{var k=new _o(e.children);k.parent=e,e.children=[k,j],e=k}j.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,u,j){for(var k=0;k<this.children.length;++k){var z=this.children[k],te=z.chunkSize();if(e<te){var ae=Math.min(u,te-e);if(z.iterN(e,ae,j))return!0;if((u-=ae)==0)break;e=0}else e-=te}}};var Eo=function(e,u,j){if(j)for(var k in j)j.hasOwnProperty(k)&&(this[k]=j[k]);this.doc=e,this.node=u};Eo.prototype.clear=function(){var e=this.doc.cm,u=this.line.widgets,j=this.line,k=Lr(j);if(k==null||!u)return;for(var z=0;z<u.length;++z)u[z]==this&&u.splice(z--,1);u.length||(j.widgets=null);var te=Ur(this);Or(j,Math.max(0,j.height-te)),e&&(Ii(e,function(){js(e,j,-te),Nn(e,k,"widget")}),Ht(e,"lineWidgetCleared",e,this,k))},Eo.prototype.changed=function(){var e=this,u=this.height,j=this.doc.cm,k=this.line;this.height=null;var z=Ur(this)-u;if(!z)return;jt(this.doc,k)||Or(k,k.height+z),j&&Ii(j,function(){j.curOp.forceUpdate=!0,js(j,k,z),Ht(j,"lineWidgetChanged",j,e,Lr(k))})},Ce(Eo);function js(e,u,j){qt(u)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ta(e,j)}function xl(e,u,j,k){var z=new Eo(e,j,k),te=e.cm;return te&&z.noHScroll&&(te.display.alignWidgets=!0),yo(e,u,"widget",function(ae){var he=ae.widgets||(ae.widgets=[]);if(z.insertAt==null?he.push(z):he.splice(Math.min(he.length-1,Math.max(0,z.insertAt)),0,z),z.line=ae,te&&!jt(e,ae)){var me=qt(ae)<e.scrollTop;Or(ae,ae.height+Ur(z)),me&&Ta(te,z.height),te.curOp.forceUpdate=!0}return!0}),te&&Ht(te,"lineWidgetAdded",te,z,typeof u=="number"?u:Lr(u)),z}var Fs=0,ja=function(e,u){this.lines=[],this.type=u,this.doc=e,this.id=++Fs};ja.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,u=e&&!e.curOp;if(u&&Dn(e),ve(this,"clear")){var j=this.find();j&&Ht(this,"clear",j.from,j.to)}for(var k=null,z=null,te=0;te<this.lines.length;++te){var ae=this.lines[te],he=ci(ae.markedSpans,this);e&&!this.collapsed?Nn(e,Lr(ae),"text"):e&&(he.to!=null&&(z=Lr(ae)),he.from!=null&&(k=Lr(ae))),ae.markedSpans=oa(ae.markedSpans,he),he.from==null&&this.collapsed&&!jt(this.doc,ae)&&e&&Or(ae,Gn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var me=0;me<this.lines.length;++me){var we=vt(this.lines[me]),Ue=et(we);Ue>e.display.maxLineLength&&(e.display.maxLine=we,e.display.maxLineLength=Ue,e.display.maxLineChanged=!0)}k!=null&&e&&this.collapsed&&Rn(e,k,z+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&Ht(e,"markerCleared",e,this,k,z),u&&Ca(e),this.parent&&this.parent.clear()},ja.prototype.find=function(e,u){e==null&&this.type=="bookmark"&&(e=1);for(var j,k,z=0;z<this.lines.length;++z){var te=this.lines[z],ae=ci(te.markedSpans,this);if(ae.from!=null&&(j=Ct(u?te:Lr(te),ae.from),e==-1))return j;if(ae.to!=null&&(k=Ct(u?te:Lr(te),ae.to),e==1))return k}return j&&{from:j,to:k}},ja.prototype.changed=function(){var e=this,u=this.find(-1,!0),j=this,k=this.doc.cm;if(!u||!k)return;Ii(k,function(){var z=u.line,te=Lr(u.line),ae=Ke(k,te);if(ae&&(Hr(ae),k.curOp.selectionChanged=k.curOp.forceUpdate=!0),k.curOp.updateMaxLine=!0,!jt(j.doc,z)&&j.height!=null){var he=j.height;j.height=null;var me=Ur(j)-he;me&&Or(z,z.height+me)}Ht(k,"markerChanged",k,e)})},ja.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var u=this.doc.cm.curOp;(!u.maybeHiddenMarkers||oe(u.maybeHiddenMarkers,this)==-1)&&(u.maybeUnhiddenMarkers||(u.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ja.prototype.detachLine=function(e){if(this.lines.splice(oe(this.lines,e),1),!this.lines.length&&this.doc.cm){var u=this.doc.cm.curOp;(u.maybeHiddenMarkers||(u.maybeHiddenMarkers=[])).push(this)}},Ce(ja);function no(e,u,j,k,z){if(k&&k.shared)return wl(e,u,j,k,z);if(e.cm&&!e.cm.curOp)return qn(e.cm,no)(e,u,j,k,z);var te=new ja(e,z),ae=ur(u,j);if(k&&I(k,te,!1),ae>0||ae==0&&te.clearWhenEmpty!==!1)return te;if(te.replacedWith&&(te.collapsed=!0,te.widgetNode=F("span",[te.replacedWith],"CodeMirror-widget"),k.handleMouseEvents||te.widgetNode.setAttribute("cm-ignore-events","true"),k.insertLeft&&(te.widgetNode.insertLeft=!0)),te.collapsed){if(ut(e,u.line,u,j,te)||u.line!=j.line&&ut(e,j.line,u,j,te))throw new Error("Inserting collapsed marker partially overlapping an existing one");_a()}te.addToHistory&&_s(e,{from:u,to:j,origin:"markText"},e.sel,NaN);var he=u.line,me=e.cm,we;if(e.iter(he,j.line+1,function(Ge){me&&te.collapsed&&!me.options.lineWrapping&&vt(Ge)==me.display.maxLine&&(we=!0),te.collapsed&&he!=u.line&&Or(Ge,0),pa(Ge,new Ni(te,he==u.line?u.ch:null,he==j.line?j.ch:null)),++he}),te.collapsed&&e.iter(u.line,j.line+1,function(Ge){jt(e,Ge)&&Or(Ge,0)}),te.clearOnEnter&&Ie(te,"beforeCursorEnter",function(){return te.clear()}),te.readOnly&&(Gi(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),te.collapsed&&(te.id=++Fs,te.atomic=!0),me){if(we&&(me.curOp.updateMaxLine=!0),te.collapsed)Rn(me,u.line,j.line+1);else if(te.className||te.startStyle||te.endStyle||te.css||te.attributes||te.title)for(var Ue=u.line;Ue<=j.line;Ue++)Nn(me,Ue,"text");te.atomic&&Os(me.doc),Ht(me,"markerAdded",me,te)}return te}var xo=function(e,u){this.markers=e,this.primary=u;for(var j=0;j<e.length;++j)e[j].parent=this};xo.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Ht(this,"clear")},xo.prototype.find=function(e,u){return this.primary.find(e,u)},Ce(xo);function wl(e,u,j,k,z){k=I(k),k.shared=!1;var te=[no(e,u,j,k,z)],ae=te[0],he=k.widgetNode;return Na(e,function(me){he&&(k.widgetNode=he.cloneNode(!0)),te.push(no(me,wr(me,u),wr(me,j),k,z));for(var we=0;we<me.linked.length;++we)if(me.linked[we].isParent)return;ae=B(te)}),new xo(te,ae)}function Us(e){return e.findMarks(Ct(e.first,0),e.clipPos(Ct(e.lastLine())),function(u){return u.parent})}function Tl(e,u){for(var j=0;j<u.length;j++){var k=u[j],z=k.find(),te=e.clipPos(z.from),ae=e.clipPos(z.to);if(ur(te,ae)){var he=no(e,te,ae,k.primary,k.primary.type);k.markers.push(he),he.parent=k}}}function Sl(e){for(var u=function(k){var z=e[k],te=[z.primary.doc];Na(z.primary.doc,function(me){return te.push(me)});for(var ae=0;ae<z.markers.length;ae++){var he=z.markers[ae];oe(te,he.doc)==-1&&(he.parent=null,z.markers.splice(ae--,1))}},j=0;j<e.length;j++)u(j)}var Cl=0,Ui=function(e,u,j,k,z){if(!(this instanceof Ui))return new Ui(e,u,j,k,z);j==null&&(j=0),_o.call(this,[new bo([new Ar("",null)])]),this.first=j,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=j;var te=Ct(j,0);this.sel=da(te),this.history=new jo(null),this.id=++Cl,this.modeOption=u,this.lineSep=k,this.direction=z=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ts(this,{from:te,to:te,text:e}),Ci(this,da(te),Ae)};Ui.prototype=Z(_o.prototype,{constructor:Ui,iter:function(e,u,j){j?this.iterN(e-this.first,u-e,j):this.iterN(this.first,this.first+this.size,e)},insert:function(e,u){for(var j=0,k=0;k<u.length;++k)j+=u[k].height;this.insertInner(e-this.first,u,j)},remove:function(e,u){this.removeInner(e-this.first,u)},getValue:function(e){var u=rn(this,this.first,this.first+this.size);return e===!1?u:u.join(e||this.lineSeparator())},setValue:ei(function(e){var u=Ct(this.first,0),j=this.first+this.size-1;to(this,{from:u,to:Ct(j,Bt(this,j).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ia(this.cm,0,0),Ci(this,da(u),Ae)}),replaceRange:function(e,u,j,k){u=wr(this,u),j=j?wr(this,j):u,ro(this,e,u,j,k)},getRange:function(e,u,j){var k=Kr(this,wr(this,e),wr(this,u));return j===!1?k:k.join(j||this.lineSeparator())},getLine:function(e){var u=this.getLineHandle(e);return u&&u.text},getLineHandle:function(e){if(Fn(this,e))return Bt(this,e)},getLineNumber:function(e){return Lr(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Bt(this,e)),vt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return wr(this,e)},getCursor:function(e){var u=this.sel.primary(),j;return e==null||e=="head"?j=u.head:e=="anchor"?j=u.anchor:e=="end"||e=="to"||e===!1?j=u.to():j=u.from(),j},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ei(function(e,u,j){Ts(this,wr(this,typeof e=="number"?Ct(e,u||0):e),null,j)}),setSelection:ei(function(e,u,j){Ts(this,wr(this,e),wr(this,u||e),j)}),extendSelection:ei(function(e,u,j){Uo(this,wr(this,e),u&&wr(this,u),j)}),extendSelections:ei(function(e,u){ws(this,It(this,e),u)}),extendSelectionsBy:ei(function(e,u){var j=V(this.sel.ranges,e);ws(this,It(this,j),u)}),setSelections:ei(function(e,u,j){if(!e.length)return;for(var k=[],z=0;z<e.length;z++)k[z]=new wn(wr(this,e[z].anchor),wr(this,e[z].head));u==null&&(u=Math.min(e.length-1,this.sel.primIndex)),Ci(this,Ji(this.cm,k,u),j)}),addSelection:ei(function(e,u,j){var k=this.sel.ranges.slice(0);k.push(new wn(wr(this,e),wr(this,u||e))),Ci(this,Ji(this.cm,k,k.length-1),j)}),getSelection:function(e){for(var u=this.sel.ranges,j,k=0;k<u.length;k++){var z=Kr(this,u[k].from(),u[k].to());j=j?j.concat(z):z}return e===!1?j:j.join(e||this.lineSeparator())},getSelections:function(e){for(var u=[],j=this.sel.ranges,k=0;k<j.length;k++){var z=Kr(this,j[k].from(),j[k].to());e!==!1&&(z=z.join(e||this.lineSeparator())),u[k]=z}return u},replaceSelection:function(e,u,j){for(var k=[],z=0;z<this.sel.ranges.length;z++)k[z]=e;this.replaceSelections(k,u,j||"+input")},replaceSelections:ei(function(e,u,j){for(var k=[],z=this.sel,te=0;te<z.ranges.length;te++){var ae=z.ranges[te];k[te]={from:ae.from(),to:ae.to(),text:this.splitLines(e[te]),origin:j}}for(var he=u&&u!="end"&&No(this,k,u),me=k.length-1;me>=0;me--)to(this,k[me]);he?Ss(this,he):this.cm&&ga(this.cm)}),undo:ei(function(){Wo(this,"undo")}),redo:ei(function(){Wo(this,"redo")}),undoSelection:ei(function(){Wo(this,"undo",!0)}),redoSelection:ei(function(){Wo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,u=0,j=0,k=0;k<e.done.length;k++)e.done[k].ranges||++u;for(var z=0;z<e.undone.length;z++)e.undone[z].ranges||++j;return{undo:u,redo:j}},clearHistory:function(){var e=this;this.history=new jo(this.history.maxGeneration),Na(this,function(u){return u.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 u=this.history=new jo(this.history.maxGeneration);u.done=qa(e.done.slice(0),null,!0),u.undone=qa(e.undone.slice(0),null,!0)},setGutterMarker:ei(function(e,u,j){return yo(this,e,"gutter",function(k){var z=k.gutterMarkers||(k.gutterMarkers={});return z[u]=j,!j&&J(z)&&(k.gutterMarkers=null),!0})}),clearGutter:ei(function(e){var u=this;this.iter(function(j){j.gutterMarkers&&j.gutterMarkers[e]&&yo(u,j,"gutter",function(){return j.gutterMarkers[e]=null,J(j.gutterMarkers)&&(j.gutterMarkers=null),!0})})}),lineInfo:function(e){var u;if(typeof e=="number"){if(!Fn(this,e))return null;if(u=e,e=Bt(this,e),!e)return null}else if(u=Lr(e),u==null)return null;return{line:u,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:ei(function(e,u,j){return yo(this,e,u=="gutter"?"gutter":"class",function(k){var z=u=="text"?"textClass":u=="background"?"bgClass":u=="gutter"?"gutterClass":"wrapClass";if(!k[z])k[z]=j;else{if(O(j).test(k[z]))return!1;k[z]+=" "+j}return!0})}),removeLineClass:ei(function(e,u,j){return yo(this,e,u=="gutter"?"gutter":"class",function(k){var z=u=="text"?"textClass":u=="background"?"bgClass":u=="gutter"?"gutterClass":"wrapClass",te=k[z];if(te)if(j==null)k[z]=null;else{var ae=te.match(O(j));if(!ae)return!1;var he=ae.index+ae[0].length;k[z]=te.slice(0,ae.index)+(!ae.index||he==te.length?"":" ")+te.slice(he)||null}else return!1;return!0})}),addLineWidget:ei(function(e,u,j){return xl(this,e,u,j)}),removeLineWidget:function(e){e.clear()},markText:function(e,u,j){return no(this,wr(this,e),wr(this,u),j,j&&j.type||"range")},setBookmark:function(e,u){var j={replacedWith:u&&(u.nodeType==null?u.widget:u),insertLeft:u&&u.insertLeft,clearWhenEmpty:!1,shared:u&&u.shared,handleMouseEvents:u&&u.handleMouseEvents};return e=wr(this,e),no(this,e,e,j,"bookmark")},findMarksAt:function(e){e=wr(this,e);var u=[],j=Bt(this,e.line).markedSpans;if(j)for(var k=0;k<j.length;++k){var z=j[k];(z.from==null||z.from<=e.ch)&&(z.to==null||z.to>=e.ch)&&u.push(z.marker.parent||z.marker)}return u},findMarks:function(e,u,j){e=wr(this,e),u=wr(this,u);var k=[],z=e.line;return this.iter(e.line,u.line+1,function(te){var ae=te.markedSpans;if(ae)for(var he=0;he<ae.length;he++){var me=ae[he];!(me.to!=null&&z==e.line&&e.ch>=me.to||me.from==null&&z!=e.line||me.from!=null&&z==u.line&&me.from>=u.ch)&&(!j||j(me.marker))&&k.push(me.marker.parent||me.marker)}++z}),k},getAllMarks:function(){var e=[];return this.iter(function(u){var j=u.markedSpans;if(j)for(var k=0;k<j.length;++k)j[k].from!=null&&e.push(j[k].marker)}),e},posFromIndex:function(e){var u,j=this.first,k=this.lineSeparator().length;return this.iter(function(z){var te=z.text.length+k;if(te>e)return u=e,!0;e-=te,++j}),wr(this,Ct(j,u))},indexFromPos:function(e){e=wr(this,e);var u=e.ch;if(e.line<this.first||e.ch<0)return 0;var j=this.lineSeparator().length;return this.iter(this.first,e.line,function(k){u+=k.text.length+j}),u},copy:function(e){var u=new Ui(rn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return u.scrollTop=this.scrollTop,u.scrollLeft=this.scrollLeft,u.sel=this.sel,u.extend=!1,e&&(u.history.undoDepth=this.history.undoDepth,u.setHistory(this.getHistory())),u},linkedDoc:function(e){e||(e={});var u=this.first,j=this.first+this.size;e.from!=null&&e.from>u&&(u=e.from),e.to!=null&&e.to<j&&(j=e.to);var k=new Ui(rn(this,u,j),e.mode||this.modeOption,u,this.lineSep,this.direction);return e.sharedHist&&(k.history=this.history),(this.linked||(this.linked=[])).push({doc:k,sharedHist:e.sharedHist}),k.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Tl(k,Us(this)),k},unlinkDoc:function(e){if(e instanceof Kn&&(e=e.doc),this.linked)for(var u=0;u<this.linked.length;++u){var j=this.linked[u];if(j.doc!=e)continue;this.linked.splice(u,1),e.unlinkDoc(this),Sl(Us(this));break}if(e.history==this.history){var k=[e.id];Na(e,function(z){return k.push(z.id)},!0),e.history=new jo(null),e.history.done=qa(this.history.done,k),e.history.undone=qa(this.history.undone,k)}},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):Gt(e)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:ei(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(u){return u.order=null}),this.cm&&pl(this.cm)})}),Ui.prototype.eachLine=Ui.prototype.iter;var Bs=0;function Ol(e){var u=this;if(Hs(u),ce(u,e)||sn(u.display,e))return;ge(e),S&&(Bs=+new Date);var j=Jn(u,e,!0),k=e.dataTransfer.files;if(!j||u.isReadOnly())return;if(k&&k.length&&window.FileReader&&window.File)for(var z=k.length,te=Array(z),ae=0,he=function(){++ae==z&&qn(u,function(){j=wr(u.doc,j);var Qe={from:j,to:j,text:u.doc.splitLines(te.filter(function(gt){return gt!=null}).join(u.doc.lineSeparator())),origin:"paste"};to(u.doc,Qe),Ss(u.doc,da(wr(u.doc,j),wr(u.doc,ha(Qe))))})()},me=function(Qe,gt){if(u.options.allowDropFileTypes&&oe(u.options.allowDropFileTypes,Qe.type)==-1){he();return}var Lt=new FileReader;Lt.onerror=function(){return he()},Lt.onload=function(){var Ft=Lt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ft)){he();return}te[gt]=Ft,he()},Lt.readAsText(Qe)},we=0;we<k.length;we++)me(k[we],we);else{if(u.state.draggingText&&u.doc.sel.contains(j)>-1){u.state.draggingText(e),setTimeout(function(){return u.display.input.focus()},20);return}try{var Ue=e.dataTransfer.getData("Text");if(Ue){var Ge;if(u.state.draggingText&&!u.state.draggingText.copy&&(Ge=u.listSelections()),Bo(u.doc,da(j,j)),Ge)for(var nt=0;nt<Ge.length;++nt)ro(u.doc,"",Ge[nt].anchor,Ge[nt].head,"drag");u.replaceSelection(Ue,"around","paste"),u.display.input.focus()}}catch(Qe){}}}function Al(e,u){if(S&&(!e.state.draggingText||+new Date-Bs<100)){De(u);return}if(ce(e,u)||sn(e.display,u))return;if(u.dataTransfer.setData("Text",e.getSelection()),u.dataTransfer.effectAllowed="copyMove",u.dataTransfer.setDragImage&&!o){var j=T("img",null,null,"position: fixed; left: 0; top: 0;");j.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",c&&(j.width=j.height=1,e.display.wrapper.appendChild(j),j._top=j.offsetTop),u.dataTransfer.setDragImage(j,0,0),c&&j.parentNode.removeChild(j)}}function Rl(e,u){var j=Jn(e,u);if(!j)return;var k=document.createDocumentFragment();Ri(e,j,k),e.display.dragCursor||(e.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),w(e.display.dragCursor,k)}function Hs(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ws(e){if(!document.getElementsByClassName)return;for(var u=document.getElementsByClassName("CodeMirror"),j=[],k=0;k<u.length;k++){var z=u[k].CodeMirror;z&&j.push(z)}j.length&&j[0].operation(function(){for(var te=0;te<j.length;te++)e(j[te])})}var zs=!1;function Il(){if(zs)return;Dl(),zs=!0}function Dl(){var e;Ie(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Ws(Ll)},100))}),Ie(window,"blur",function(){return Ws(ra)})}function Ll(e){var u=e.display;u.cachedCharWidth=u.cachedTextHeight=u.cachedPaddingH=null,u.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 To=1;To<=12;To++)Fa[To+111]=Fa[To+63235]="F"+To;var Ra={};Ra.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"},Ra.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"},Ra.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"},Ra.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"]},Ra.default=a?Ra.macDefault:Ra.pcDefault;function kl(e){var u=e.split(/-(?!$)/);e=u[u.length-1];for(var j,k,z,te,ae=0;ae<u.length-1;ae++){var he=u[ae];if(/^(cmd|meta|m)$/i.test(he))te=!0;else if(/^a(lt)?$/i.test(he))j=!0;else if(/^(c|ctrl|control)$/i.test(he))k=!0;else if(/^s(hift)?$/i.test(he))z=!0;else throw new Error("Unrecognized modifier name: "+he)}return j&&(e="Alt-"+e),k&&(e="Ctrl-"+e),te&&(e="Cmd-"+e),z&&(e="Shift-"+e),e}function Pl(e){var u={};for(var j in e)if(e.hasOwnProperty(j)){var k=e[j];if(/^(name|fallthrough|(de|at)tach)$/.test(j))continue;if(k=="..."){delete e[j];continue}for(var z=V(j.split(" "),kl),te=0;te<z.length;te++){var ae=void 0,he=void 0;te==z.length-1?(he=z.join(" "),ae=k):(he=z.slice(0,te+1).join(" "),ae="...");var me=u[he];if(!me)u[he]=ae;else if(me!=ae)throw new Error("Inconsistent bindings for "+he)}delete e[j]}for(var we in u)e[we]=u[we];return e}function io(e,u,j,k){u=Go(u);var z=u.call?u.call(e,k):u[e];if(z===!1)return"nothing";if(z==="...")return"multi";if(z!=null&&j(z))return"handled";if(u.fallthrough){if(Object.prototype.toString.call(u.fallthrough)!="[object Array]")return io(e,u.fallthrough,j,k);for(var te=0;te<u.fallthrough.length;te++){var ae=io(e,u.fallthrough[te],j,k);if(ae)return ae}}}function Gs(e){var u=typeof e=="string"?e:Fa[e.keyCode];return u=="Ctrl"||u=="Alt"||u=="Shift"||u=="Mod"}function Ks(e,u,j){var k=e;return u.altKey&&k!="Alt"&&(e="Alt-"+e),(p?u.metaKey:u.ctrlKey)&&k!="Ctrl"&&(e="Ctrl-"+e),(p?u.ctrlKey:u.metaKey)&&k!="Mod"&&(e="Cmd-"+e),!j&&u.shiftKey&&k!="Shift"&&(e="Shift-"+e),e}function Vs(e,u){if(c&&e.keyCode==34&&e.char)return!1;var j=Fa[e.keyCode];return j==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(j=e.code),Ks(j,e,u))}function Go(e){return typeof e=="string"?Ra[e]:e}function ao(e,u){for(var j=e.doc.sel.ranges,k=[],z=0;z<j.length;z++){for(var te=u(j[z]);k.length&&ur(te.from,B(k).to)<=0;){var ae=k.pop();if(ur(ae.from,te.from)<0){te.from=ae.from;break}}k.push(te)}Ii(e,function(){for(var he=k.length-1;he>=0;he--)ro(e.doc,"",k[he].from,k[he].to,"+delete");ga(e)})}function as(e,u,j){var k=xe(e.text,u+j,j);return k<0||k>e.text.length?null:k}function os(e,u,j){var k=as(e,u.ch,j);return k==null?null:new Ct(u.line,k,j<0?"after":"before")}function ss(e,u,j,k,z){if(e){u.doc.direction=="rtl"&&(z=-z);var te=it(j,u.doc.direction);if(te){var ae=z<0?B(te):te[0],he=z<0==(ae.level==1),me=he?"after":"before",we;if(ae.level>0||u.doc.direction=="rtl"){var Ue=Be(u,j);we=z<0?j.text.length-1:0;var Ge=Ye(u,Ue,we).top;we=Me(function(nt){return Ye(u,Ue,nt).top==Ge},z<0==(ae.level==1)?ae.from:ae.to-1,we),me=="before"&&(we=as(j,we,1))}else we=z<0?ae.to:ae.from;return new Ct(k,we,me)}}return new Ct(k,z<0?j.text.length:0,z<0?"before":"after")}function Ml(e,u,j,k){var z=it(u,e.doc.direction);if(!z)return os(u,j,k);j.ch>=u.text.length?(j.ch=u.text.length,j.sticky="before"):j.ch<=0&&(j.ch=0,j.sticky="after");var te=Je(z,j.ch,j.sticky),ae=z[te];if(e.doc.direction=="ltr"&&ae.level%2==0&&(k>0?ae.to>j.ch:ae.from<j.ch))return os(u,j,k);var he=function($t,or){return as(u,$t instanceof Ct?$t.ch:$t,or)},me,we=function($t){return e.options.lineWrapping?(me=me||Be(e,u),hr(e,u,me,$t)):{begin:0,end:u.text.length}},Ue=we(j.sticky=="before"?he(j,-1):j.ch);if(e.doc.direction=="rtl"||ae.level==1){var Ge=ae.level==1==k<0,nt=he(j,Ge?1:-1);if(nt!=null&&(Ge?nt<=ae.to&&nt<=Ue.end:nt>=ae.from&&nt>=Ue.begin)){var Qe=Ge?"before":"after";return new Ct(j.line,nt,Qe)}}var gt=function($t,or,Jt){for(var pr=function(jn,mi){return mi?new Ct(j.line,he(jn,1),"before"):new Ct(j.line,jn,"after")};$t>=0&&$t<z.length;$t+=or){var zr=z[$t],Nr=or>0==(zr.level!=1),dn=Nr?Jt.begin:he(Jt.end,-1);if(zr.from<=dn&&dn<zr.to)return pr(dn,Nr);if(dn=Nr?zr.from:he(zr.to,-1),Jt.begin<=dn&&dn<Jt.end)return pr(dn,Nr)}},Lt=gt(te+k,k,Ue);if(Lt)return Lt;var Ft=k>0?Ue.end:he(Ue.begin,-1);return Ft!=null&&!(k>0&&Ft==u.text.length)&&(Lt=gt(k>0?0:z.length-1,k,we(Ft)),Lt)?Lt:null}var So={selectAll:Is,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ae)},killLine:function(e){return ao(e,function(u){if(u.empty()){var j=Bt(e.doc,u.head.line).text.length;return u.head.ch==j&&u.head.line<e.lastLine()?{from:u.head,to:Ct(u.head.line+1,0)}:{from:u.head,to:Ct(u.head.line,j)}}else return{from:u.from(),to:u.to()}})},deleteLine:function(e){return ao(e,function(u){return{from:Ct(u.from().line,0),to:wr(e.doc,Ct(u.to().line+1,0))}})},delLineLeft:function(e){return ao(e,function(u){return{from:Ct(u.from().line,0),to:u.from()}})},delWrappedLineLeft:function(e){return ao(e,function(u){var j=e.charCoords(u.head,"div").top+5,k=e.coordsChar({left:0,top:j},"div");return{from:k,to:u.from()}})},delWrappedLineRight:function(e){return ao(e,function(u){var j=e.charCoords(u.head,"div").top+5,k=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:j},"div");return{from:u.from(),to:k}})},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(Ct(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Ct(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(u){return Xs(e,u.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(u){return Ys(e,u.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(u){return Nl(e,u.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(u){var j=e.cursorCoords(u.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:j},"div")},Se)},goLineLeft:function(e){return e.extendSelectionsBy(function(u){var j=e.cursorCoords(u.head,"div").top+5;return e.coordsChar({left:0,top:j},"div")},Se)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(u){var j=e.cursorCoords(u.head,"div").top+5,k=e.coordsChar({left:0,top:j},"div");return k.ch<e.getLine(k.line).search(/\S/)?Ys(e,u.head):k},Se)},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 u=[],j=e.listSelections(),k=e.options.tabSize,z=0;z<j.length;z++){var te=j[z].from(),ae=G(e.getLine(te.line),te.ch,k);u.push(ee(k-ae%k))}e.replaceSelections(u)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Ii(e,function(){for(var u=e.listSelections(),j=[],k=0;k<u.length;k++){if(!u[k].empty())continue;var z=u[k].head,te=Bt(e.doc,z.line).text;if(te){if(z.ch==te.length&&(z=new Ct(z.line,z.ch-1)),z.ch>0)z=new Ct(z.line,z.ch+1),e.replaceRange(te.charAt(z.ch-1)+te.charAt(z.ch-2),Ct(z.line,z.ch-2),z,"+transpose");else if(z.line>e.doc.first){var ae=Bt(e.doc,z.line-1).text;ae&&(z=new Ct(z.line,1),e.replaceRange(te.charAt(0)+e.doc.lineSeparator()+ae.charAt(ae.length-1),Ct(z.line-1,ae.length-1),z,"+transpose"))}}j.push(new wn(z,z))}e.setSelections(j)})},newlineAndIndent:function(e){return Ii(e,function(){for(var u=e.listSelections(),j=u.length-1;j>=0;j--)e.replaceRange(e.doc.lineSeparator(),u[j].anchor,u[j].head,"+input");u=e.listSelections();for(var k=0;k<u.length;k++)e.indentLine(u[k].from().line,null,!0);ga(e)})},openLine:function(e){return e.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Xs(e,u){var j=Bt(e.doc,u),k=vt(j);return k!=j&&(u=Lr(k)),ss(!0,e,k,u,1)}function Nl(e,u){var j=Bt(e.doc,u),k=bt(j);return k!=j&&(u=Lr(k)),ss(!0,e,j,u,-1)}function Ys(e,u){var j=Xs(e,u.line),k=Bt(e.doc,j.line),z=it(k,e.doc.direction);if(!z||z[0].level==0){var te=Math.max(j.ch,k.text.search(/\S/)),ae=u.line==j.line&&u.ch<=te&&u.ch;return Ct(j.line,ae?0:te,j.sticky)}return j}function Ko(e,u,j){if(typeof u=="string"&&(u=So[u],!u))return!1;e.display.input.ensurePolled();var k=e.display.shift,z=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),j&&(e.display.shift=!1),z=u(e)!=Oe}finally{e.display.shift=k,e.state.suppressEdits=!1}return z}function jl(e,u,j){for(var k=0;k<e.state.keyMaps.length;k++){var z=io(u,e.state.keyMaps[k],j,e);if(z)return z}return e.options.extraKeys&&io(u,e.options.extraKeys,j,e)||io(u,e.options.keyMap,j,e)}var Fl=new ne;function Co(e,u,j,k){var z=e.state.keySeq;if(z){if(Gs(u))return"handled";if(/\'$/.test(u)?e.state.keySeq=null:Fl.set(50,function(){e.state.keySeq==z&&(e.state.keySeq=null,e.display.input.reset())}),$s(e,z+" "+u,j,k))return!0}return $s(e,u,j,k)}function $s(e,u,j,k){var z=jl(e,u,k);return z=="multi"&&(e.state.keySeq=u),z=="handled"&&Ht(e,"keyHandled",e,u,j),(z=="handled"||z=="multi")&&(ge(j),Xn(e)),!!z}function Js(e,u){var j=Vs(u,!0);return j?u.shiftKey&&!e.state.keySeq?Co(e,"Shift-"+j,u,function(k){return Ko(e,k,!0)})||Co(e,j,u,function(k){if(typeof k=="string"?/^go[A-Z]/.test(k):k.motion)return Ko(e,k)}):Co(e,j,u,function(k){return Ko(e,k)}):!1}function Ul(e,u,j){return Co(e,"'"+j+"'",u,function(k){return Ko(e,k,!0)})}var ls=null;function Qs(e){var u=this;if(e.target&&e.target!=u.display.input.getField())return;if(u.curOp.focus=Y(),ce(u,e))return;S&&_<11&&e.keyCode==27&&(e.returnValue=!1);var j=e.keyCode;u.display.shift=j==16||e.shiftKey;var k=Js(u,e);c&&(ls=k?j:null,!k&&j==88&&!Fr&&(a?e.metaKey:e.ctrlKey)&&u.replaceSelection("",null,"cut")),C&&!a&&!k&&j==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),j==18&&!/\bCodeMirror-crosshair\b/.test(u.display.lineDiv.className)&&Bl(u)}function Bl(e){var u=e.display.lineDiv;K(u,"CodeMirror-crosshair");function j(k){(k.keyCode==18||!k.altKey)&&(b(u,"CodeMirror-crosshair"),st(document,"keyup",j),st(document,"mouseover",j))}Ie(document,"keyup",j),Ie(document,"mouseover",j)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),ce(this,e)}function el(e){var u=this;if(e.target&&e.target!=u.display.input.getField())return;if(sn(u.display,e)||ce(u,e)||e.ctrlKey&&!e.altKey||a&&e.metaKey)return;var j=e.keyCode,k=e.charCode;if(c&&j==ls){ls=null,ge(e);return}if(c&&(!e.which||e.which<10)&&Js(u,e))return;var z=String.fromCharCode(k==null?j:k);if(z=="\b")return;if(Ul(u,e,z))return;u.display.input.onKeyPress(e)}var Hl=400,us=function(e,u,j){this.time=e,this.pos=u,this.button=j};us.prototype.compare=function(e,u,j){return this.time+Hl>e&&ur(u,this.pos)==0&&j==this.button};var Oo,Ao;function Wl(e,u){var j=+new Date;return Ao&&Ao.compare(j,e,u)?(Oo=Ao=null,"triple"):Oo&&Oo.compare(j,e,u)?(Ao=new us(j,e,u),Oo=null,"double"):(Oo=new us(j,e,u),Ao=null,"single")}function tl(e){var u=this,j=u.display;if(ce(u,e)||j.activeTouch&&j.input.supportsTouch())return;if(j.input.ensurePolled(),j.shift=e.shiftKey,sn(j,e)){t||(j.scroller.draggable=!1,setTimeout(function(){return j.scroller.draggable=!0},100));return}if(cs(u,e))return;var k=Jn(u,e),z=ze(e),te=k?Wl(k,z):"single";if(window.focus(),z==1&&u.state.selectingText&&u.state.selectingText(e),k&&zl(u,z,k,te,e))return;z==1?k?Kl(u,k,te,e):Pe(e)==j.scroller&&ge(e):z==2?(k&&Uo(u.doc,k),setTimeout(function(){return j.input.focus()},20)):z==3&&(R?u.display.input.onContextMenu(e):xa(u))}function zl(e,u,j,k,z){var te="Click";return k=="double"?te="Double"+te:k=="triple"&&(te="Triple"+te),te=(u==1?"Left":u==2?"Middle":"Right")+te,Co(e,Ks(te,z),z,function(ae){if(typeof ae=="string"&&(ae=So[ae]),!ae)return!1;var he=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),he=ae(e,j)!=Oe}finally{e.state.suppressEdits=!1}return he})}function Gl(e,u,j){var k=e.getOption("configureMouse"),z=k?k(e,u,j):{};if(z.unit==null){var te=r?j.shiftKey&&j.metaKey:j.altKey;z.unit=te?"rectangle":u=="single"?"char":u=="double"?"word":"line"}return(z.extend==null||e.doc.extend)&&(z.extend=e.doc.extend||j.shiftKey),z.addNew==null&&(z.addNew=a?j.metaKey:j.ctrlKey),z.moveOnDrag==null&&(z.moveOnDrag=!(a?j.altKey:j.ctrlKey)),z}function Kl(e,u,j,k){S?setTimeout(U(Ba,e),0):e.curOp.focus=Y();var z=Gl(e,j,k),te=e.doc.sel,ae;e.options.dragDrop&&at&&!e.isReadOnly()&&j=="single"&&(ae=te.contains(u))>-1&&(ur((ae=te.ranges[ae]).from(),u)<0||u.xRel>0)&&(ur(ae.to(),u)>0||u.xRel<0)?Vl(e,k,u,z):Xl(e,k,u,z)}function Vl(e,u,j,k){var z=e.display,te=!1,ae=qn(e,function(we){t&&(z.scroller.draggable=!1),e.state.draggingText=!1,st(z.wrapper.ownerDocument,"mouseup",ae),st(z.wrapper.ownerDocument,"mousemove",he),st(z.scroller,"dragstart",me),st(z.scroller,"drop",ae),te||(ge(we),k.addNew||Uo(e.doc,j,null,null,k.extend),t&&!o||S&&_==9?setTimeout(function(){z.wrapper.ownerDocument.body.focus({preventScroll:!0}),z.input.focus()},20):z.input.focus())}),he=function(we){te=te||Math.abs(u.clientX-we.clientX)+Math.abs(u.clientY-we.clientY)>=10},me=function(){return te=!0};t&&(z.scroller.draggable=!0),e.state.draggingText=ae,ae.copy=!k.moveOnDrag,z.scroller.dragDrop&&z.scroller.dragDrop(),Ie(z.wrapper.ownerDocument,"mouseup",ae),Ie(z.wrapper.ownerDocument,"mousemove",he),Ie(z.scroller,"dragstart",me),Ie(z.scroller,"drop",ae),xa(e),setTimeout(function(){return z.input.focus()},20)}function rl(e,u,j){if(j=="char")return new wn(u,u);if(j=="word")return e.findWordAt(u);if(j=="line")return new wn(Ct(u.line,0),wr(e.doc,Ct(u.line+1,0)));var k=j(e,u);return new wn(k.from,k.to)}function Xl(e,u,j,k){var z=e.display,te=e.doc;ge(u);var ae,he,me=te.sel,we=me.ranges;if(k.addNew&&!k.extend?(he=te.sel.contains(j),he>-1?ae=we[he]:ae=new wn(j,j)):(ae=te.sel.primary(),he=te.sel.primIndex),k.unit=="rectangle")k.addNew||(ae=new wn(j,j)),j=Jn(e,u,!0,!0),he=-1;else{var Ue=rl(e,j,k.unit);k.extend?ae=ns(ae,Ue.anchor,Ue.head,k.extend):ae=Ue}k.addNew?he==-1?(he=we.length,Ci(te,Ji(e,we.concat([ae]),he),{scroll:!1,origin:"*mouse"})):we.length>1&&we[he].empty()&&k.unit=="char"&&!k.extend?(Ci(te,Ji(e,we.slice(0,he).concat(we.slice(he+1)),0),{scroll:!1,origin:"*mouse"}),me=te.sel):is(te,he,ae,pe):(he=0,Ci(te,new Li([ae],0),pe),me=te.sel);var Ge=j;function nt(Jt){if(ur(Ge,Jt)==0)return;if(Ge=Jt,k.unit=="rectangle"){for(var pr=[],zr=e.options.tabSize,Nr=G(Bt(te,j.line).text,j.ch,zr),dn=G(Bt(te,Jt.line).text,Jt.ch,zr),jn=Math.min(Nr,dn),mi=Math.max(Nr,dn),Yn=Math.min(j.line,Jt.line),Ki=Math.min(e.lastLine(),Math.max(j.line,Jt.line));Yn<=Ki;Yn++){var Bi=Bt(te,Yn).text,ii=be(Bi,jn,zr);jn==mi?pr.push(new wn(Ct(Yn,ii),Ct(Yn,ii))):Bi.length>ii&&pr.push(new wn(Ct(Yn,ii),Ct(Yn,be(Bi,mi,zr))))}pr.length||pr.push(new wn(j,j)),Ci(te,Ji(e,me.ranges.slice(0,he).concat(pr),he),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Jt)}else{var Hi=ae,xi=rl(e,Jt,k.unit),fi=Hi.anchor,ai;ur(xi.anchor,fi)>0?(ai=xi.head,fi=vi(Hi.from(),xi.anchor)):(ai=xi.anchor,fi=Pi(Hi.to(),xi.head));var Qn=me.ranges.slice(0);Qn[he]=Yl(e,new wn(wr(te,fi),ai)),Ci(te,Ji(e,Qn,he),pe)}}var Qe=z.wrapper.getBoundingClientRect(),gt=0;function Lt(Jt){var pr=++gt,zr=Jn(e,Jt,!0,k.unit=="rectangle");if(!zr)return;if(ur(zr,Ge)!=0){e.curOp.focus=Y(),nt(zr);var Nr=ka(z,te);(zr.line>=Nr.to||zr.line<Nr.from)&&setTimeout(qn(e,function(){gt==pr&&Lt(Jt)}),150)}else{var dn=Jt.clientY<Qe.top?-20:Jt.clientY>Qe.bottom?20:0;dn&&setTimeout(qn(e,function(){if(gt!=pr)return;z.scroller.scrollTop+=dn,Lt(Jt)}),50)}}function Ft(Jt){e.state.selectingText=!1,gt=Infinity,Jt&&(ge(Jt),z.input.focus()),st(z.wrapper.ownerDocument,"mousemove",$t),st(z.wrapper.ownerDocument,"mouseup",or),te.history.lastSelOrigin=null}var $t=qn(e,function(Jt){Jt.buttons===0||!ze(Jt)?Ft(Jt):Lt(Jt)}),or=qn(e,Ft);e.state.selectingText=or,Ie(z.wrapper.ownerDocument,"mousemove",$t),Ie(z.wrapper.ownerDocument,"mouseup",or)}function Yl(e,u){var j=u.anchor,k=u.head,z=Bt(e.doc,j.line);if(ur(j,k)==0&&j.sticky==k.sticky)return u;var te=it(z);if(!te)return u;var ae=Je(te,j.ch,j.sticky),he=te[ae];if(he.from!=j.ch&&he.to!=j.ch)return u;var me=ae+(he.from==j.ch==(he.level!=1)?0:1);if(me==0||me==te.length)return u;var we;if(k.line!=j.line)we=(k.line-j.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Ue=Je(te,k.ch,k.sticky),Ge=Ue-ae||(k.ch-j.ch)*(he.level==1?-1:1);Ue==me-1||Ue==me?we=Ge<0:we=Ge>0}var nt=te[me+(we?-1:0)],Qe=we==(nt.level==1),gt=Qe?nt.from:nt.to,Lt=Qe?"after":"before";return j.ch==gt&&j.sticky==Lt?u:new wn(new Ct(j.line,gt,Lt),k)}function nl(e,u,j,k){var z,te;if(u.touches)z=u.touches[0].clientX,te=u.touches[0].clientY;else try{z=u.clientX,te=u.clientY}catch(nt){return!1}if(z>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;k&&ge(u);var ae=e.display,he=ae.lineDiv.getBoundingClientRect();if(te>he.bottom||!ve(e,j))return Re(u);te-=he.top-ae.viewOffset;for(var me=0;me<e.display.gutterSpecs.length;++me){var we=ae.gutters.childNodes[me];if(we&&we.getBoundingClientRect().right>=z){var Ue=Wr(e.doc,te),Ge=e.display.gutterSpecs[me];return Ee(e,j,e,Ue,Ge.className,u),Re(u)}}}function cs(e,u){return nl(e,u,"gutterClick",!0)}function il(e,u){if(sn(e.display,u)||$l(e,u))return;if(ce(e,u,"contextmenu"))return;R||e.display.input.onContextMenu(u)}function $l(e,u){return ve(e,"gutterContextMenu")?nl(e,u,"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-"),Gr(e)}var oo={toString:function(){return"CodeMirror.Init"}},ol={},Vo={};function Jl(e){var u=e.optionHandlers;function j(k,z,te,ae){e.defaults[k]=z,te&&(u[k]=ae?function(he,me,we){we!=oo&&te(he,me,we)}:te)}e.defineOption=j,e.Init=oo,j("value","",function(k,z){return k.setValue(z)},!0),j("mode",null,function(k,z){k.doc.modeOption=z,Aa(k)},!0),j("indentUnit",2,Aa,!0),j("indentWithTabs",!1),j("smartIndent",!0),j("tabSize",4,function(k){go(k),Gr(k),Rn(k)},!0),j("lineSeparator",null,function(k,z){if(k.doc.lineSep=z,!z)return;var te=[],ae=k.doc.first;k.doc.iter(function(me){for(var we=0;;){var Ue=me.text.indexOf(z,we);if(Ue==-1)break;we=Ue+z.length,te.push(Ct(ae,Ue))}ae++});for(var he=te.length-1;he>=0;he--)ro(k.doc,z,te[he],Ct(te[he].line,te[he].ch+z.length))}),j("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(k,z,te){k.state.specialChars=new RegExp(z.source+(z.test(" ")?"":"| "),"g"),te!=oo&&k.refresh()}),j("specialCharPlaceholder",rr,function(k){return k.refresh()},!0),j("electricChars",!0),j("inputStyle",l?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),j("spellcheck",!1,function(k,z){return k.getInputField().spellcheck=z},!0),j("autocorrect",!1,function(k,z){return k.getInputField().autocorrect=z},!0),j("autocapitalize",!1,function(k,z){return k.getInputField().autocapitalize=z},!0),j("rtlMoveVisually",!x),j("wholeLineUpdateBefore",!0),j("theme","default",function(k){al(k),ca(k)},!0),j("keyMap","default",function(k,z,te){var ae=Go(z),he=te!=oo&&Go(te);he&&he.detach&&he.detach(k,ae),ae.attach&&ae.attach(k,he||null)}),j("extraKeys",null),j("configureMouse",null),j("lineWrapping",!1,Zl,!0),j("gutters",[],function(k,z){k.display.gutterSpecs=Di(z,k.options.lineNumbers),ca(k)},!0),j("fixedGutter",!0,function(k,z){k.display.gutters.style.left=z?ni(k.display)+"px":"0",k.refresh()},!0),j("coverGutterNextToScrollbar",!1,function(k){return Zt(k)},!0),j("scrollbarStyle","native",function(k){ua(k),Zt(k),k.display.scrollbars.setScrollTop(k.doc.scrollTop),k.display.scrollbars.setScrollLeft(k.doc.scrollLeft)},!0),j("lineNumbers",!1,function(k,z){k.display.gutterSpecs=Di(k.options.gutters,z),ca(k)},!0),j("firstLineNumber",1,ca,!0),j("lineNumberFormatter",function(k){return k},ca,!0),j("showCursorWhenSelecting",!1,En,!0),j("resetSelectionOnContextMenu",!0),j("lineWiseCopyCut",!0),j("pasteLinesPerSelection",!0),j("selectionsMayTouch",!1),j("readOnly",!1,function(k,z){z=="nocursor"&&(ra(k),k.display.input.blur()),k.display.input.readOnlyChanged(z)}),j("screenReaderLabel",null,function(k,z){z=z===""?null:z,k.display.input.screenReaderLabelChanged(z)}),j("disableInput",!1,function(k,z){z||k.display.input.reset()},!0),j("dragDrop",!0,Ql),j("allowDropFileTypes",null),j("cursorBlinkRate",530),j("cursorScrollMargin",0),j("cursorHeight",1,En,!0),j("singleCursorHeightPerLine",!0,En,!0),j("workTime",100),j("workDelay",100),j("flattenSpans",!0,go,!0),j("addModeClass",!1,go,!0),j("pollInterval",100),j("undoDepth",200,function(k,z){return k.doc.history.undoDepth=z}),j("historyEventDelay",1250),j("viewportMargin",10,function(k){return k.refresh()},!0),j("maxHighlightLength",1e4,go,!0),j("moveInputWithCursor",!0,function(k,z){z||k.display.input.resetPosition()}),j("tabindex",null,function(k,z){return k.display.input.getField().tabIndex=z||""}),j("autofocus",null),j("direction","ltr",function(k,z){return k.doc.setDirection(z)},!0),j("phrases",null)}function Ql(e,u,j){var k=j&&j!=oo;if(!u!=!k){var z=e.display.dragFunctions,te=u?Ie:st;te(e.display.scroller,"dragstart",z.start),te(e.display.scroller,"dragenter",z.enter),te(e.display.scroller,"dragover",z.over),te(e.display.scroller,"dragleave",z.leave),te(e.display.scroller,"drop",z.drop)}}function Zl(e){e.options.lineWrapping?(K(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(b(e.display.wrapper,"CodeMirror-wrap"),vr(e)),pi(e),Rn(e),Gr(e),setTimeout(function(){return Zt(e)},100)}function Kn(e,u){var j=this;if(!(this instanceof Kn))return new Kn(e,u);this.options=u=u?I(u):{},I(ol,u,!1);var k=u.value;typeof k=="string"?k=new Ui(k,u.mode,null,u.lineSeparator,u.direction):u.mode&&(k.modeOption=u.mode),this.doc=k;var z=new Kn.inputStyles[u.inputStyle](this),te=this.display=new Ga(e,k,z,u);te.wrapper.CodeMirror=this,al(this),u.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ua(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},u.autofocus&&!l&&te.input.focus(),S&&_<11&&setTimeout(function(){return j.display.input.reset(!0)},20),ql(this),Il(),Dn(this),this.curOp.forceUpdate=!0,vs(this,k),u.autofocus&&!l||this.hasFocus()?setTimeout(function(){j.hasFocus()&&!j.state.focused&&ta(j)},20):ra(this);for(var ae in Vo)Vo.hasOwnProperty(ae)&&Vo[ae](this,u[ae],oo);di(this),u.finishInit&&u.finishInit(this);for(var he=0;he<ds.length;++he)ds[he](this);Ca(this),t&&u.lineWrapping&&getComputedStyle(te.lineDiv).textRendering=="optimizelegibility"&&(te.lineDiv.style.textRendering="auto")}Kn.defaults=ol,Kn.optionHandlers=Vo;function ql(e){var u=e.display;Ie(u.scroller,"mousedown",qn(e,tl)),S&&_<11?Ie(u.scroller,"dblclick",qn(e,function(me){if(ce(e,me))return;var we=Jn(e,me);if(!we||cs(e,me)||sn(e.display,me))return;ge(me);var Ue=e.findWordAt(we);Uo(e.doc,Ue.anchor,Ue.head)})):Ie(u.scroller,"dblclick",function(me){return ce(e,me)||ge(me)}),Ie(u.scroller,"contextmenu",function(me){return il(e,me)}),Ie(u.input.getField(),"contextmenu",function(me){u.scroller.contains(me.target)||il(e,me)});var j,k={end:0};function z(){u.activeTouch&&(j=setTimeout(function(){return u.activeTouch=null},1e3),k=u.activeTouch,k.end=+new Date)}function te(me){if(me.touches.length!=1)return!1;var we=me.touches[0];return we.radiusX<=1&&we.radiusY<=1}function ae(me,we){if(we.left==null)return!0;var Ue=we.left-me.left,Ge=we.top-me.top;return Ue*Ue+Ge*Ge>20*20}Ie(u.scroller,"touchstart",function(me){if(!ce(e,me)&&!te(me)&&!cs(e,me)){u.input.ensurePolled(),clearTimeout(j);var we=+new Date;u.activeTouch={start:we,moved:!1,prev:we-k.end<=300?k:null},me.touches.length==1&&(u.activeTouch.left=me.touches[0].pageX,u.activeTouch.top=me.touches[0].pageY)}}),Ie(u.scroller,"touchmove",function(){u.activeTouch&&(u.activeTouch.moved=!0)}),Ie(u.scroller,"touchend",function(me){var we=u.activeTouch;if(we&&!sn(u,me)&&we.left!=null&&!we.moved&&new Date-we.start<300){var Ue=e.coordsChar(u.activeTouch,"page"),Ge;!we.prev||ae(we,we.prev)?Ge=new wn(Ue,Ue):!we.prev.prev||ae(we,we.prev.prev)?Ge=e.findWordAt(Ue):Ge=new wn(Ct(Ue.line,0),wr(e.doc,Ct(Ue.line+1,0))),e.setSelection(Ge.anchor,Ge.head),e.focus(),ge(me)}z()}),Ie(u.scroller,"touchcancel",z),Ie(u.scroller,"scroll",function(){u.scroller.clientHeight&&(aa(e,u.scroller.scrollTop),Fi(e,u.scroller.scrollLeft,!0),Ee(e,"scroll",e))}),Ie(u.scroller,"mousewheel",function(me){return po(e,me)}),Ie(u.scroller,"DOMMouseScroll",function(me){return po(e,me)}),Ie(u.wrapper,"scroll",function(){return u.wrapper.scrollTop=u.wrapper.scrollLeft=0}),u.dragFunctions={enter:function(me){ce(e,me)||De(me)},over:function(me){ce(e,me)||(Rl(e,me),De(me))},start:function(me){return Al(e,me)},drop:qn(e,Ol),leave:function(me){ce(e,me)||Hs(e)}};var he=u.input.getField();Ie(he,"keyup",function(me){return Zs.call(e,me)}),Ie(he,"keydown",qn(e,Qs)),Ie(he,"keypress",qn(e,el)),Ie(he,"focus",function(me){return ta(e,me)}),Ie(he,"blur",function(me){return ra(e,me)})}var ds=[];Kn.defineInitHook=function(e){return ds.push(e)};function Ro(e,u,j,k){var z=e.doc,te;j==null&&(j="add"),j=="smart"&&(z.mode.indent?te=ri(e,u).state:j="prev");var ae=e.options.tabSize,he=Bt(z,u),me=G(he.text,null,ae);he.stateAfter&&(he.stateAfter=null);var we=he.text.match(/^\s*/)[0],Ue;if(!k&&!/\S/.test(he.text))Ue=0,j="not";else if(j=="smart"&&(Ue=z.mode.indent(te,he.text.slice(we.length),he.text),Ue==Oe||Ue>150)){if(!k)return;j="prev"}j=="prev"?u>z.first?Ue=G(Bt(z,u-1).text,null,ae):Ue=0:j=="add"?Ue=me+e.options.indentUnit:j=="subtract"?Ue=me-e.options.indentUnit:typeof j=="number"&&(Ue=me+j),Ue=Math.max(0,Ue);var Ge="",nt=0;if(e.options.indentWithTabs)for(var Qe=Math.floor(Ue/ae);Qe;--Qe)nt+=ae,Ge+=" ";if(nt<Ue&&(Ge+=ee(Ue-nt)),Ge!=we)return ro(z,Ge,Ct(u,0),Ct(u,we.length),"+input"),he.stateAfter=null,!0;for(var gt=0;gt<z.sel.ranges.length;gt++){var Lt=z.sel.ranges[gt];if(Lt.head.line==u&&Lt.head.ch<we.length){var Ft=Ct(u,we.length);is(z,gt,new wn(Ft,Ft));break}}}var fa=null;function Xo(e){fa=e}function hs(e,u,j,k,z){var te=e.doc;e.display.shift=!1,k||(k=te.sel);var ae=+new Date-200,he=z=="paste"||e.state.pasteIncoming>ae,me=Gt(u),we=null;if(he&&k.ranges.length>1)if(fa&&fa.text.join(`
|
|
|
`)==u){if(k.ranges.length%fa.text.length==0){we=[];for(var Ue=0;Ue<fa.text.length;Ue++)we.push(te.splitLines(fa.text[Ue]))}}else me.length==k.ranges.length&&e.options.pasteLinesPerSelection&&(we=V(me,function($t){return[$t]}));for(var Ge=e.curOp.updateInput,nt=k.ranges.length-1;nt>=0;nt--){var Qe=k.ranges[nt],gt=Qe.from(),Lt=Qe.to();Qe.empty()&&(j&&j>0?gt=Ct(gt.line,gt.ch-j):e.state.overwrite&&!he?Lt=Ct(Lt.line,Math.min(Bt(te,Lt.line).text.length,Lt.ch+B(me).length)):he&&fa&&fa.lineWise&&fa.text.join(`
|
|
|
`)==me.join(`
|
|
|
`)&&(gt=Lt=Ct(gt.line,0)));var Ft={from:gt,to:Lt,text:we?we[nt%we.length]:me,origin:z||(he?"paste":e.state.cutIncoming>ae?"cut":"+input")};to(e.doc,Ft),Ht(e,"inputRead",e,Ft)}u&&!he&&ll(e,u),ga(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ge),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,u){var j=e.clipboardData&&e.clipboardData.getData("Text");if(j)return e.preventDefault(),!u.isReadOnly()&&!u.options.disableInput&&Ii(u,function(){return hs(u,j,0,null,"paste")}),!0}function ll(e,u){if(!e.options.electricChars||!e.options.smartIndent)return;for(var j=e.doc.sel,k=j.ranges.length-1;k>=0;k--){var z=j.ranges[k];if(z.head.ch>100||k&&j.ranges[k-1].head.line==z.head.line)continue;var te=e.getModeAt(z.head),ae=!1;if(te.electricChars){for(var he=0;he<te.electricChars.length;he++)if(u.indexOf(te.electricChars.charAt(he))>-1){ae=Ro(e,z.head.line,"smart");break}}else te.electricInput&&(te.electricInput.test(Bt(e.doc,z.head.line).text.slice(0,z.head.ch))&&(ae=Ro(e,z.head.line,"smart")));ae&&Ht(e,"electricInput",e,z.head.line)}}function ul(e){for(var u=[],j=[],k=0;k<e.doc.sel.ranges.length;k++){var z=e.doc.sel.ranges[k].head.line,te={anchor:Ct(z,0),head:Ct(z+1,0)};j.push(te),u.push(e.getRange(te.anchor,te.head))}return{text:u,ranges:j}}function cl(e,u,j,k){e.setAttribute("autocorrect",j?"":"off"),e.setAttribute("autocapitalize",k?"":"off"),e.setAttribute("spellcheck",!!u)}function dl(){var e=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),u=T("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return t?e.style.width="1000px":e.setAttribute("wrap","off"),h&&(e.style.border="1px solid black"),cl(e),u}function eu(e){var u=e.optionHandlers,j=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(k,z){var te=this.options,ae=te[k];if(te[k]==z&&k!="mode")return;te[k]=z,u.hasOwnProperty(k)&&qn(this,u[k])(this,z,ae),Ee(this,"optionChange",this,k)},getOption:function(k){return this.options[k]},getDoc:function(){return this.doc},addKeyMap:function(k,z){this.state.keyMaps[z?"push":"unshift"](Go(k))},removeKeyMap:function(k){for(var z=this.state.keyMaps,te=0;te<z.length;++te)if(z[te]==k||z[te].name==k)return z.splice(te,1),!0},addOverlay:Ei(function(k,z){var te=k.token?k:e.getMode(this.options,k);if(te.startState)throw new Error("Overlays may not be stateful.");X(this.state.overlays,{mode:te,modeSpec:k,opaque:z&&z.opaque,priority:z&&z.priority||0},function(ae){return ae.priority}),this.state.modeGen++,Rn(this)}),removeOverlay:Ei(function(k){for(var z=this.state.overlays,te=0;te<z.length;++te){var ae=z[te].modeSpec;if(ae==k||typeof k=="string"&&ae.name==k){z.splice(te,1),this.state.modeGen++,Rn(this);return}}}),indentLine:Ei(function(k,z,te){typeof z!="string"&&typeof z!="number"&&(z==null?z=this.options.smartIndent?"smart":"prev":z=z?"add":"subtract"),Fn(this.doc,k)&&Ro(this,k,z,te)}),indentSelection:Ei(function(k){for(var z=this.doc.sel.ranges,te=-1,ae=0;ae<z.length;ae++){var he=z[ae];if(he.empty())he.head.line>te&&(Ro(this,he.head.line,k,!0),te=he.head.line,ae==this.doc.sel.primIndex&&ga(this));else{var me=he.from(),we=he.to(),Ue=Math.max(te,me.line);te=Math.min(this.lastLine(),we.line-(we.ch?0:1))+1;for(var Ge=Ue;Ge<te;++Ge)Ro(this,Ge,k);var nt=this.doc.sel.ranges;me.ch==0&&z.length==nt.length&&nt[ae].from().ch>0&&is(this.doc,ae,new wn(me,nt[ae].to()),Ae)}}}),getTokenAt:function(k,z){return ui(this,k,z)},getLineTokens:function(k,z){return ui(this,Ct(k),z,!0)},getTokenTypeAt:function(k){k=wr(this.doc,k);var z=Ti(this,Bt(this.doc,k.line)),te=0,ae=(z.length-1)/2,he=k.ch,me;if(he==0)me=z[2];else for(;;){var we=te+ae>>1;if((we?z[we*2-1]:0)>=he)ae=we;else if(z[we*2+1]<he)te=we+1;else{me=z[we*2+2];break}}var Ue=me?me.indexOf("overlay "):-1;return Ue<0?me:Ue==0?null:me.slice(0,Ue-1)},getModeAt:function(k){var z=this.doc.mode;return z.innerMode?e.innerMode(z,this.getTokenAt(k).state).mode:z},getHelper:function(k,z){return this.getHelpers(k,z)[0]},getHelpers:function(k,z){var te=[];if(!j.hasOwnProperty(z))return te;var ae=j[z],he=this.getModeAt(k);if(typeof he[z]=="string")ae[he[z]]&&te.push(ae[he[z]]);else if(he[z])for(var me=0;me<he[z].length;me++){var we=ae[he[z][me]];we&&te.push(we)}else he.helperType&&ae[he.helperType]?te.push(ae[he.helperType]):ae[he.name]&&te.push(ae[he.name]);for(var Ue=0;Ue<ae._global.length;Ue++){var Ge=ae._global[Ue];Ge.pred(he,this)&&oe(te,Ge.val)==-1&&te.push(Ge.val)}return te},getStateAfter:function(k,z){var te=this.doc;return k=Un(te,k==null?te.first+te.size-1:k),ri(this,k+1,z).state},cursorCoords:function(k,z){var te,ae=this.doc.sel.primary();return k==null?te=ae.head:typeof k=="object"?te=wr(this.doc,k):te=k?ae.from():ae.to(),nn(this,te,z||"page")},charCoords:function(k,z){return Tn(this,wr(this.doc,k),z||"page")},coordsChar:function(k,z){return k=en(this,k,z||"page"),Qr(this,k.left,k.top)},lineAtHeight:function(k,z){return k=en(this,{top:k,left:0},z||"page").top,Wr(this.doc,k+this.display.viewOffset)},heightAtLine:function(k,z,te){var ae=!1,he;if(typeof k=="number"){var me=this.doc.first+this.doc.size-1;k<this.doc.first?k=this.doc.first:k>me&&(k=me,ae=!0),he=Bt(this.doc,k)}else he=k;return cn(this,he,{top:0,left:0},z||"page",te||ae).top+(ae?this.doc.height-qt(he):0)},defaultTextHeight:function(){return Gn(this.display)},defaultCharWidth:function(){return $n(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(k,z,te,ae,he){var me=this.display;k=nn(this,wr(this.doc,k));var we=k.bottom,Ue=k.left;if(z.style.position="absolute",z.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(z),me.sizer.appendChild(z),ae=="over")we=k.top;else if(ae=="above"||ae=="near"){var Ge=Math.max(me.wrapper.clientHeight,this.doc.height),nt=Math.max(me.sizer.clientWidth,me.lineSpace.clientWidth);(ae=="above"||k.bottom+z.offsetHeight>Ge)&&k.top>z.offsetHeight?we=k.top-z.offsetHeight:k.bottom+z.offsetHeight<=Ge&&(we=k.bottom),Ue+z.offsetWidth>nt&&(Ue=nt-z.offsetWidth)}z.style.top=we+"px",z.style.left=z.style.right="",he=="right"?(Ue=me.sizer.clientWidth-z.offsetWidth,z.style.right="0px"):(he=="left"?Ue=0:he=="middle"&&(Ue=(me.sizer.clientWidth-z.offsetWidth)/2),z.style.left=Ue+"px"),te&&Pa(this,{left:Ue,top:we,right:Ue+z.offsetWidth,bottom:we+z.offsetHeight})},triggerOnKeyDown:Ei(Qs),triggerOnKeyPress:Ei(el),triggerOnKeyUp:Zs,triggerOnMouseDown:Ei(tl),execCommand:function(k){if(So.hasOwnProperty(k))return So[k].call(null,this)},triggerElectric:Ei(function(k){ll(this,k)}),findPosH:function(k,z,te,ae){var he=1;z<0&&(he=-1,z=-z);for(var me=wr(this.doc,k),we=0;we<z&&!(me=fs(this.doc,me,he,te,ae),me.hitSide);++we);return me},moveH:Ei(function(k,z){var te=this;this.extendSelectionsBy(function(ae){return te.display.shift||te.doc.extend||ae.empty()?fs(te.doc,ae.head,k,z,te.options.rtlMoveVisually):k<0?ae.from():ae.to()},Se)}),deleteH:Ei(function(k,z){var te=this.doc.sel,ae=this.doc;te.somethingSelected()?ae.replaceSelection("",null,"+delete"):ao(this,function(he){var me=fs(ae,he.head,k,z,!1);return k<0?{from:me,to:he.head}:{from:he.head,to:me}})}),findPosV:function(k,z,te,ae){var he=1,me=ae;z<0&&(he=-1,z=-z);for(var we=wr(this.doc,k),Ue=0;Ue<z;++Ue){var Ge=nn(this,we,"div");if(me==null?me=Ge.left:Ge.left=me,we=hl(this,Ge,he,te),we.hitSide)break}return we},moveV:Ei(function(k,z){var te=this,ae=this.doc,he=[],me=!this.display.shift&&!ae.extend&&ae.sel.somethingSelected();if(ae.extendSelectionsBy(function(Ue){if(me)return k<0?Ue.from():Ue.to();var Ge=nn(te,Ue.head,"div");Ue.goalColumn!=null&&(Ge.left=Ue.goalColumn),he.push(Ge.left);var nt=hl(te,Ge,k,z);return z=="page"&&Ue==ae.sel.primary()&&Ta(te,Tn(te,nt,"div").top-Ge.top),nt},Se),he.length)for(var we=0;we<ae.sel.ranges.length;we++)ae.sel.ranges[we].goalColumn=he[we]}),findWordAt:function(k){var z=this.doc,te=Bt(z,k.line).text,ae=k.ch,he=k.ch;if(te){var me=this.getHelper(k,"wordChars");(k.sticky=="before"||he==te.length)&&ae?--ae:++he;for(var we=te.charAt(ae),Ue=$(we,me)?function(Ge){return $(Ge,me)}:/\s/.test(we)?function(Ge){return/\s/.test(Ge)}:function(Ge){return!/\s/.test(Ge)&&!$(Ge)};ae>0&&Ue(te.charAt(ae-1));)--ae;for(;he<te.length&&Ue(te.charAt(he));)++he}return new wn(Ct(k.line,ae),Ct(k.line,he))},toggleOverwrite:function(k){if(k!=null&&k==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?K(this.display.cursorDiv,"CodeMirror-overwrite"):b(this.display.cursorDiv,"CodeMirror-overwrite"),Ee(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==Y()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ei(function(k,z){ia(this,k,z)}),getScrollInfo:function(){var k=this.display.scroller;return{left:k.scrollLeft,top:k.scrollTop,height:k.scrollHeight-Ve(this)-this.display.barHeight,width:k.scrollWidth-Ve(this)-this.display.barWidth,clientHeight:_e(this),clientWidth:Fe(this)}},scrollIntoView:Ei(function(k,z){k==null?(k={from:this.doc.sel.primary().head,to:null},z==null&&(z=this.options.cursorScrollMargin)):typeof k=="number"?k={from:Ct(k,0),to:null}:k.from==null&&(k={from:k,to:null}),k.to||(k.to=k.from),k.margin=z||0,k.from.line!=null?co(this,k):Sa(this,k.from,k.to,k.margin)}),setSize:Ei(function(k,z){var te=this,ae=function(me){return typeof me=="number"||/^\d+$/.test(String(me))?me+"px":me};k!=null&&(this.display.wrapper.style.width=ae(k)),z!=null&&(this.display.wrapper.style.height=ae(z)),this.options.lineWrapping&&Br(this);var he=this.display.viewFrom;this.doc.iter(he,this.display.viewTo,function(me){if(me.widgets){for(var we=0;we<me.widgets.length;we++)if(me.widgets[we].noHScroll){Nn(te,he,"widget");break}}++he}),this.curOp.forceUpdate=!0,Ee(this,"refresh",this)}),operation:function(k){return Ii(this,k)},startOperation:function(){return Dn(this)},endOperation:function(){return Ca(this)},refresh:Ei(function(){var k=this.display.cachedTextHeight;Rn(this),this.curOp.forceUpdate=!0,Gr(this),ia(this,this.doc.scrollLeft,this.doc.scrollTop),Ja(this.display),(k==null||Math.abs(k-Gn(this.display))>.5||this.options.lineWrapping)&&pi(this),Ee(this,"refresh",this)}),swapDoc:Ei(function(k){var z=this.doc;return z.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,k),Gr(this),this.display.input.reset(),ia(this,k.scrollLeft,k.scrollTop),this.curOp.forceScroll=!0,Ht(this,"swapDoc",this,z),z}),phrase:function(k){var z=this.options.phrases;return z&&Object.prototype.hasOwnProperty.call(z,k)?z[k]:k},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}},Ce(e),e.registerHelper=function(k,z,te){j.hasOwnProperty(k)||(j[k]=e[k]={_global:[]}),j[k][z]=te},e.registerGlobalHelper=function(k,z,te,ae){e.registerHelper(k,z,ae),j[k]._global.push({pred:te,val:ae})}}function fs(e,u,j,k,z){var te=u,ae=j,he=Bt(e,u.line),me=z&&e.direction=="rtl"?-j:j;function we(){var or=u.line+me;return or<e.first||or>=e.first+e.size?!1:(u=new Ct(or,u.ch,u.sticky),he=Bt(e,or))}function Ue(or){var Jt;if(k=="codepoint"){var pr=he.text.charCodeAt(u.ch+(k>0?0:-1));isNaN(pr)?Jt=null:Jt=new Ct(u.line,Math.max(0,Math.min(he.text.length,u.ch+j*(pr>=55296&&pr<56320?2:1))),-j)}else z?Jt=Ml(e.cm,he,u,j):Jt=os(he,u,j);if(Jt==null)if(!or&&we())u=ss(z,e.cm,he,u.line,me);else return!1;else u=Jt;return!0}if(k=="char"||k=="codepoint")Ue();else if(k=="column")Ue(!0);else if(k=="word"||k=="group")for(var Ge=null,nt=k=="group",Qe=e.cm&&e.cm.getHelper(u,"wordChars"),gt=!0;!(j<0&&!Ue(!gt));gt=!1){var Lt=he.text.charAt(u.ch)||`
|
|
|
`,Ft=$(Lt,Qe)?"w":nt&&Lt==`
|
|
|
`?"n":!nt||/\s/.test(Lt)?null:"p";if(nt&&!gt&&!Ft&&(Ft="s"),Ge&&Ge!=Ft){j<0&&(j=1,Ue(),u.sticky="after");break}if(Ft&&(Ge=Ft),j>0&&!Ue(!gt))break}var $t=Ho(e,u,te,ae,!0);return oi(te,$t)&&($t.hitSide=!0),$t}function hl(e,u,j,k){var z=e.doc,te=u.left,ae;if(k=="page"){var he=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),me=Math.max(he-.5*Gn(e.display),3);ae=(j>0?u.bottom:u.top)+j*me}else k=="line"&&(ae=j>0?u.bottom+3:u.top-3);for(var we;!(we=Qr(e,te,ae),!we.outside);){if(j<0?ae<=0:ae>=z.height){we.hitSide=!0;break}ae+=j*5}return we}var Ln=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};Ln.prototype.init=function(e){var u=this,j=this,k=j.cm,z=j.div=e.lineDiv;cl(z,k.options.spellcheck,k.options.autocorrect,k.options.autocapitalize);function te(he){for(var me=he.target;me;me=me.parentNode){if(me==z)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(me.className))break}return!1}Ie(z,"paste",function(he){if(!te(he)||ce(k,he)||sl(he,k))return;_<=11&&setTimeout(qn(k,function(){return u.updateFromDOM()}),20)}),Ie(z,"compositionstart",function(he){u.composing={data:he.data,done:!1}}),Ie(z,"compositionupdate",function(he){u.composing||(u.composing={data:he.data,done:!1})}),Ie(z,"compositionend",function(he){u.composing&&(he.data!=u.composing.data&&u.readFromDOMSoon(),u.composing.done=!0)}),Ie(z,"touchstart",function(){return j.forceCompositionEnd()}),Ie(z,"input",function(){u.composing||u.readFromDOMSoon()});function ae(he){if(!te(he)||ce(k,he))return;if(k.somethingSelected())Xo({lineWise:!1,text:k.getSelections()}),he.type=="cut"&&k.replaceSelection("",null,"cut");else if(k.options.lineWiseCopyCut){var me=ul(k);Xo({lineWise:!0,text:me.text}),he.type=="cut"&&k.operation(function(){k.setSelections(me.ranges,0,Ae),k.replaceSelection("",null,"cut")})}else return;if(he.clipboardData){he.clipboardData.clearData();var we=fa.text.join(`
|
|
|
`);if(he.clipboardData.setData("Text",we),he.clipboardData.getData("Text")==we){he.preventDefault();return}}var Ue=dl(),Ge=Ue.firstChild;k.display.lineSpace.insertBefore(Ue,k.display.lineSpace.firstChild),Ge.value=fa.text.join(`
|
|
|
`);var nt=document.activeElement;H(Ge),setTimeout(function(){k.display.lineSpace.removeChild(Ue),nt.focus(),nt==z&&j.showPrimarySelection()},50)}Ie(z,"copy",ae),Ie(z,"cut",ae)},Ln.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ln.prototype.prepareSelection=function(){var e=Ai(this.cm,!1);return e.focus=document.activeElement==this.div,e},Ln.prototype.showSelection=function(e,u){if(!e||!this.cm.display.view.length)return;(e.focus||u)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Ln.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ln.prototype.showPrimarySelection=function(){var e=this.getSelection(),u=this.cm,j=u.doc.sel.primary(),k=j.from(),z=j.to();if(u.display.viewTo==u.display.viewFrom||k.line>=u.display.viewTo||z.line<u.display.viewFrom){e.removeAllRanges();return}var te=Yo(u,e.anchorNode,e.anchorOffset),ae=Yo(u,e.focusNode,e.focusOffset);if(te&&!te.bad&&ae&&!ae.bad&&ur(vi(te,ae),k)==0&&ur(Pi(te,ae),z)==0)return;var he=u.display.view,me=k.line>=u.display.viewFrom&&fl(u,k)||{node:he[0].measure.map[2],offset:0},we=z.line<u.display.viewTo&&fl(u,z);if(!we){var Ue=he[he.length-1].measure,Ge=Ue.maps?Ue.maps[Ue.maps.length-1]:Ue.map;we={node:Ge[Ge.length-1],offset:Ge[Ge.length-2]-Ge[Ge.length-3]}}if(!me||!we){e.removeAllRanges();return}var nt=e.rangeCount&&e.getRangeAt(0),Qe;try{Qe=M(me.node,me.offset,we.offset,we.node)}catch(gt){}Qe&&(!C&&u.state.focused?(e.collapse(me.node,me.offset),Qe.collapsed||(e.removeAllRanges(),e.addRange(Qe))):(e.removeAllRanges(),e.addRange(Qe)),nt&&e.anchorNode==null?e.addRange(nt):C&&this.startGracePeriod()),this.rememberSelection()},Ln.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)},Ln.prototype.showMultipleSelections=function(e){w(this.cm.display.cursorDiv,e.cursors),w(this.cm.display.selectionDiv,e.selection)},Ln.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ln.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var u=e.getRangeAt(0).commonAncestorContainer;return L(this.div,u)},Ln.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ln.prototype.blur=function(){this.div.blur()},Ln.prototype.getField=function(){return this.div},Ln.prototype.supportsTouch=function(){return!0},Ln.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Ii(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function u(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,u))}this.polling.set(this.cm.options.pollInterval,u)},Ln.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ln.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),u=this.cm;if(f&&i&&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 j=Yo(u,e.anchorNode,e.anchorOffset),k=Yo(u,e.focusNode,e.focusOffset);j&&k&&Ii(u,function(){Ci(u.doc,da(j,k),Ae),(j.bad||k.bad)&&(u.curOp.selectionChanged=!0)})},Ln.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,u=e.display,j=e.doc.sel.primary(),k=j.from(),z=j.to();if(k.ch==0&&k.line>e.firstLine()&&(k=Ct(k.line-1,Bt(e.doc,k.line-1).length)),z.ch==Bt(e.doc,z.line).text.length&&z.line<e.lastLine()&&(z=Ct(z.line+1,0)),k.line<u.viewFrom||z.line>u.viewTo-1)return!1;var te,ae,he;k.line==u.viewFrom||(te=An(e,k.line))==0?(ae=Lr(u.view[0].line),he=u.view[0].node):(ae=Lr(u.view[te].line),he=u.view[te-1].node.nextSibling);var me=An(e,z.line),we,Ue;if(me==u.view.length-1?(we=u.viewTo-1,Ue=u.lineDiv.lastChild):(we=Lr(u.view[me+1].line)-1,Ue=u.view[me+1].node.previousSibling),!he)return!1;for(var Ge=e.doc.splitLines(ru(e,he,Ue,ae,we)),nt=Kr(e.doc,Ct(ae,0),Ct(we,Bt(e.doc,we).text.length));Ge.length>1&&nt.length>1;)if(B(Ge)==B(nt))Ge.pop(),nt.pop(),we--;else if(Ge[0]==nt[0])Ge.shift(),nt.shift(),ae++;else break;for(var Qe=0,gt=0,Lt=Ge[0],Ft=nt[0],$t=Math.min(Lt.length,Ft.length);Qe<$t&&Lt.charCodeAt(Qe)==Ft.charCodeAt(Qe);)++Qe;for(var or=B(Ge),Jt=B(nt),pr=Math.min(or.length-(Ge.length==1?Qe:0),Jt.length-(nt.length==1?Qe:0));gt<pr&&or.charCodeAt(or.length-gt-1)==Jt.charCodeAt(Jt.length-gt-1);)++gt;if(Ge.length==1&&nt.length==1&&ae==k.line)for(;Qe&&Qe>k.ch&&or.charCodeAt(or.length-gt-1)==Jt.charCodeAt(Jt.length-gt-1);)Qe--,gt++;Ge[Ge.length-1]=or.slice(0,or.length-gt).replace(/^\u200b+/,""),Ge[0]=Ge[0].slice(Qe).replace(/\u200b+$/,"");var zr=Ct(ae,Qe),Nr=Ct(we,nt.length?B(nt).length-gt:0);if(Ge.length>1||Ge[0]||ur(zr,Nr))return ro(e.doc,Ge,zr,Nr,"+input"),!0},Ln.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ln.prototype.reset=function(){this.forceCompositionEnd()},Ln.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Ln.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)},Ln.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ii(this.cm,function(){return Rn(e.cm)})},Ln.prototype.setUneditable=function(e){e.contentEditable="false"},Ln.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||qn(this.cm,hs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Ln.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Ln.prototype.onContextMenu=function(){},Ln.prototype.resetPosition=function(){},Ln.prototype.needsContentAttribute=!0;function fl(e,u){var j=Ke(e,u.line);if(!j||j.hidden)return null;var k=Bt(e.doc,u.line),z=Te(j,k,u.line),te=it(k,e.doc.direction),ae="left";if(te){var he=Je(te,u.ch);ae=he%2?"right":"left"}var me=xt(z.map,u.ch,ae);return me.offset=me.collapse=="right"?me.end:me.start,me}function tu(e){for(var u=e;u;u=u.parentNode)if(/CodeMirror-gutter-wrapper/.test(u.className))return!0;return!1}function so(e,u){return u&&(e.bad=!0),e}function ru(e,u,j,k,z){var te="",ae=!1,he=e.doc.lineSeparator(),me=!1;function we(Qe){return function(gt){return gt.id==Qe}}function Ue(){ae&&(te+=he,me&&(te+=he),ae=me=!1)}function Ge(Qe){Qe&&(Ue(),te+=Qe)}function nt(Qe){if(Qe.nodeType==1){var gt=Qe.getAttribute("cm-text");if(gt){Ge(gt);return}var Lt=Qe.getAttribute("cm-marker"),Ft;if(Lt){var $t=e.findMarks(Ct(k,0),Ct(z+1,0),we(+Lt));$t.length&&(Ft=$t[0].find(0))&&Ge(Kr(e.doc,Ft.from,Ft.to).join(he));return}if(Qe.getAttribute("contenteditable")=="false")return;var or=/^(pre|div|p|li|table|br)$/i.test(Qe.nodeName);if(!/^br$/i.test(Qe.nodeName)&&Qe.textContent.length==0)return;or&&Ue();for(var Jt=0;Jt<Qe.childNodes.length;Jt++)nt(Qe.childNodes[Jt]);/^(pre|p)$/i.test(Qe.nodeName)&&(me=!0),or&&(ae=!0)}else Qe.nodeType==3&&Ge(Qe.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(nt(u),u==j);)u=u.nextSibling,me=!1;return te}function Yo(e,u,j){var k;if(u==e.display.lineDiv){if(k=e.display.lineDiv.childNodes[j],!k)return so(e.clipPos(Ct(e.display.viewTo-1)),!0);u=null,j=0}else for(k=u;;k=k.parentNode){if(!k||k==e.display.lineDiv)return null;if(k.parentNode&&k.parentNode==e.display.lineDiv)break}for(var z=0;z<e.display.view.length;z++){var te=e.display.view[z];if(te.node==k)return nu(te,u,j)}}function nu(e,u,j){var k=e.text.firstChild,z=!1;if(!u||!L(k,u))return so(Ct(Lr(e.line),0),!0);if(u==k&&(z=!0,u=k.childNodes[j],j=0,!u)){var te=e.rest?B(e.rest):e.line;return so(Ct(Lr(te),te.text.length),z)}var ae=u.nodeType==3?u:null,he=u;for(!ae&&u.childNodes.length==1&&u.firstChild.nodeType==3&&(ae=u.firstChild,j&&(j=ae.nodeValue.length));he.parentNode!=k;)he=he.parentNode;var me=e.measure,we=me.maps;function Ue(Ft,$t,or){for(var Jt=-1;Jt<(we?we.length:0);Jt++)for(var pr=Jt<0?me.map:we[Jt],zr=0;zr<pr.length;zr+=3){var Nr=pr[zr+2];if(Nr==Ft||Nr==$t){var dn=Lr(Jt<0?e.line:e.rest[Jt]),jn=pr[zr]+or;return(or<0||Nr!=Ft)&&(jn=pr[zr+(or?1:0)]),Ct(dn,jn)}}}var Ge=Ue(ae,he,j);if(Ge)return so(Ge,z);for(var nt=he.nextSibling,Qe=ae?ae.nodeValue.length-j:0;nt;nt=nt.nextSibling){if(Ge=Ue(nt,nt.firstChild,0),Ge)return so(Ct(Ge.line,Ge.ch-Qe),z);Qe+=nt.textContent.length}for(var gt=he.previousSibling,Lt=j;gt;gt=gt.previousSibling){if(Ge=Ue(gt,gt.firstChild,-1),Ge)return so(Ct(Ge.line,Ge.ch+Lt),z);Lt+=gt.textContent.length}}var ti=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ne,this.hasSelection=!1,this.composing=null};ti.prototype.init=function(e){var u=this,j=this,k=this.cm;this.createField(e);var z=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),h&&(z.style.width="0px"),Ie(z,"input",function(){S&&_>=9&&u.hasSelection&&(u.hasSelection=null),j.poll()}),Ie(z,"paste",function(ae){if(ce(k,ae)||sl(ae,k))return;k.state.pasteIncoming=+new Date,j.fastPoll()});function te(ae){if(ce(k,ae))return;if(k.somethingSelected())Xo({lineWise:!1,text:k.getSelections()});else if(k.options.lineWiseCopyCut){var he=ul(k);Xo({lineWise:!0,text:he.text}),ae.type=="cut"?k.setSelections(he.ranges,null,Ae):(j.prevInput="",z.value=he.text.join(`
|
|
|
`),H(z))}else return;ae.type=="cut"&&(k.state.cutIncoming=+new Date)}Ie(z,"cut",te),Ie(z,"copy",te),Ie(e.scroller,"paste",function(ae){if(sn(e,ae)||ce(k,ae))return;if(!z.dispatchEvent){k.state.pasteIncoming=+new Date,j.focus();return}var he=new Event("paste");he.clipboardData=ae.clipboardData,z.dispatchEvent(he)}),Ie(e.lineSpace,"selectstart",function(ae){sn(e,ae)||ge(ae)}),Ie(z,"compositionstart",function(){var ae=k.getCursor("from");j.composing&&j.composing.range.clear(),j.composing={start:ae,range:k.markText(ae,k.getCursor("to"),{className:"CodeMirror-composing"})}}),Ie(z,"compositionend",function(){j.composing&&(j.poll(),j.composing.range.clear(),j.composing=null)})},ti.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},ti.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ti.prototype.prepareSelection=function(){var e=this.cm,u=e.display,j=e.doc,k=Ai(e);if(e.options.moveInputWithCursor){var z=nn(e,j.sel.primary().head,"div"),te=u.wrapper.getBoundingClientRect(),ae=u.lineDiv.getBoundingClientRect();k.teTop=Math.max(0,Math.min(u.wrapper.clientHeight-10,z.top+ae.top-te.top)),k.teLeft=Math.max(0,Math.min(u.wrapper.clientWidth-10,z.left+ae.left-te.left))}return k},ti.prototype.showSelection=function(e){var u=this.cm,j=u.display;w(j.cursorDiv,e.cursors),w(j.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ti.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var u=this.cm;if(u.somethingSelected()){this.prevInput="";var j=u.getSelection();this.textarea.value=j,u.state.focused&&H(this.textarea),S&&_>=9&&(this.hasSelection=j)}else e||(this.prevInput=this.textarea.value="",S&&_>=9&&(this.hasSelection=null))},ti.prototype.getField=function(){return this.textarea},ti.prototype.supportsTouch=function(){return!1},ti.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!l||Y()!=this.textarea))try{this.textarea.focus()}catch(e){}},ti.prototype.blur=function(){this.textarea.blur()},ti.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ti.prototype.receivedFocus=function(){this.slowPoll()},ti.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()})},ti.prototype.fastPoll=function(){var e=!1,u=this;u.pollingFast=!0;function j(){var k=u.poll();!k&&!e?(e=!0,u.polling.set(60,j)):(u.pollingFast=!1,u.slowPoll())}u.polling.set(20,j)},ti.prototype.poll=function(){var e=this,u=this.cm,j=this.textarea,k=this.prevInput;if(this.contextMenuPending||!u.state.focused||yt(j)&&!k&&!this.composing||u.isReadOnly()||u.options.disableInput||u.state.keySeq)return!1;var z=j.value;if(z==k&&!u.somethingSelected())return!1;if(S&&_>=9&&this.hasSelection===z||a&&/[\uf700-\uf7ff]/.test(z))return u.display.input.reset(),!1;if(u.doc.sel==u.display.selForContextMenu){var te=z.charCodeAt(0);if(te==8203&&!k&&(k="\u200B"),te==8666)return this.reset(),this.cm.execCommand("undo")}for(var ae=0,he=Math.min(k.length,z.length);ae<he&&k.charCodeAt(ae)==z.charCodeAt(ae);)++ae;return Ii(u,function(){hs(u,z.slice(ae),k.length-ae,null,e.composing?"*compose":null),z.length>1e3||z.indexOf(`
|
|
|
`)>-1?j.value=e.prevInput="":e.prevInput=z,e.composing&&(e.composing.range.clear(),e.composing.range=u.markText(e.composing.start,u.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ti.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ti.prototype.onKeyPress=function(){S&&_>=9&&(this.hasSelection=null),this.fastPoll()},ti.prototype.onContextMenu=function(e){var u=this,j=u.cm,k=j.display,z=u.textarea;u.contextMenuPending&&u.contextMenuPending();var te=Jn(j,e),ae=k.scroller.scrollTop;if(!te||c)return;var he=j.options.resetSelectionOnContextMenu;he&&j.doc.sel.contains(te)==-1&&qn(j,Ci)(j.doc,da(te),Ae);var me=z.style.cssText,we=u.wrapper.style.cssText,Ue=u.wrapper.offsetParent.getBoundingClientRect();u.wrapper.style.cssText="position: static",z.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(e.clientY-Ue.top-5)+"px; left: "+(e.clientX-Ue.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 Ge;t&&(Ge=window.scrollY),k.input.focus(),t&&window.scrollTo(null,Ge),k.input.reset(),j.somethingSelected()||(z.value=u.prevInput=" "),u.contextMenuPending=Qe,k.selForContextMenu=j.doc.sel,clearTimeout(k.detectingSelectAll);function nt(){if(z.selectionStart!=null){var Lt=j.somethingSelected(),Ft="\u200B"+(Lt?z.value:"");z.value="\u21DA",z.value=Ft,u.prevInput=Lt?"":"\u200B",z.selectionStart=1,z.selectionEnd=Ft.length,k.selForContextMenu=j.doc.sel}}function Qe(){if(u.contextMenuPending!=Qe)return;if(u.contextMenuPending=!1,u.wrapper.style.cssText=we,z.style.cssText=me,S&&_<9&&k.scrollbars.setScrollTop(k.scroller.scrollTop=ae),z.selectionStart!=null){(!S||S&&_<9)&&nt();var Lt=0,Ft=function(){k.selForContextMenu==j.doc.sel&&z.selectionStart==0&&z.selectionEnd>0&&u.prevInput=="\u200B"?qn(j,Is)(j):Lt++<10?k.detectingSelectAll=setTimeout(Ft,500):(k.selForContextMenu=null,k.input.reset())};k.detectingSelectAll=setTimeout(Ft,200)}}if(S&&_>=9&&nt(),R){De(e);var gt=function(){st(window,"mouseup",gt),setTimeout(Qe,20)};Ie(window,"mouseup",gt)}else setTimeout(Qe,50)},ti.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},ti.prototype.setUneditable=function(){},ti.prototype.needsContentAttribute=!1;function iu(e,u){if(u=u?I(u):{},u.value=e.value,!u.tabindex&&e.tabIndex&&(u.tabindex=e.tabIndex),!u.placeholder&&e.placeholder&&(u.placeholder=e.placeholder),u.autofocus==null){var j=Y();u.autofocus=j==e||e.getAttribute("autofocus")!=null&&j==document.body}function k(){e.value=he.getValue()}var z;if(e.form&&(Ie(e.form,"submit",k),!u.leaveSubmitMethodAlone)){var te=e.form;z=te.submit;try{var ae=te.submit=function(){k(),te.submit=z,te.submit(),te.submit=ae}}catch(me){}}u.finishInit=function(me){me.save=k,me.getTextArea=function(){return e},me.toTextArea=function(){me.toTextArea=isNaN,k(),e.parentNode.removeChild(me.getWrapperElement()),e.style.display="",e.form&&(st(e.form,"submit",k),!u.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=z))}},e.style.display="none";var he=Kn(function(me){return e.parentNode.insertBefore(me,e.nextSibling)},u);return he}function au(e){e.off=st,e.on=Ie,e.wheelEventPixels=fo,e.Doc=Ui,e.splitLines=Gt,e.countColumn=G,e.findColumn=be,e.isWordChar=re,e.Pass=Oe,e.signal=Ee,e.Line=Ar,e.changeEnd=ha,e.scrollbarModel=er,e.Pos=Ct,e.cmpPos=ur,e.modes=un,e.mimeModes=xr,e.resolveMode=Ir,e.getMode=hn,e.modeExtensions=lr,e.extendMode=Cr,e.copyState=gr,e.startState=Wn,e.innerMode=xn,e.commands=So,e.keyMap=Ra,e.keyName=Vs,e.isModifierKey=Gs,e.lookupKey=io,e.normalizeKeyMap=Pl,e.StringStream=gn,e.SharedTextMarker=xo,e.TextMarker=ja,e.LineWidget=Eo,e.e_preventDefault=ge,e.e_stopPropagation=ye,e.e_stop=De,e.addClass=K,e.contains=L,e.rmClass=b,e.keyNames=Fa}Jl(Kn),eu(Kn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var $o in Ui.prototype)Ui.prototype.hasOwnProperty($o)&&oe(ou,$o)<0&&(Kn.prototype[$o]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ui.prototype[$o]));return Ce(Ui),Kn.inputStyles={textarea:ti,contenteditable:Ln},Kn.defineMode=function(e){!Kn.defaults.mode&&e!="null"&&(Kn.defaults.mode=e),an.apply(this,arguments)},Kn.defineMIME=tn,Kn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Kn.defineMIME("text/plain","null"),Kn.defineExtension=function(e,u){Kn.prototype[e]=u},Kn.defineDocExtension=function(e,u){Ui.prototype[e]=u},Kn.fromTextArea=iu,au(Kn),Kn.version="5.58.2",Kn})},WYAk:function(W,q,D){(function(P,v){W.exports=q=v(D("Ib8C"))})(this,function(P){(function(){var v=P,C=v.lib,N=C.Base,g=v.enc,m=g.Utf8,S=v.algo,_=S.HMAC=N.extend({init:function(t,d){t=this._hasher=new t.init,typeof d=="string"&&(d=m.parse(d));var i=t.blockSize,c=i*4;d.sigBytes>c&&(d=t.finalize(d)),d.clamp();for(var o=this._oKey=d.clone(),n=this._iKey=d.clone(),s=o.words,h=n.words,f=0;f<i;f++)s[f]^=1549556828,h[f]^=909522486;o.sigBytes=n.sigBytes=c,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var d=this._hasher,i=d.finalize(t);d.reset();var c=d.finalize(this._oKey.clone().concat(i));return c}})})()})},WaYH:function(W,q,D){"use strict";var P=D("rePB"),v=D("Ff2n"),C=D("VTBJ"),N=D("1OyB"),g=D("vuIU"),m=D("JX7q"),S=D("Ji7U"),_=D("LK+K"),t=D("q1tI"),d=D("TSYQ"),i=D.n(d),c=D("sboe"),o=D("OZM5"),n=function(R){var O=R.prefixCls,b=R.level,E=R.isStart,w=R.isEnd;if(!b)return null;for(var T="".concat(O,"-indent-unit"),F=[],M=0;M<b;M+=1){var L;F.push(t.createElement("span",{key:M,className:i()(T,(L={},Object(P.a)(L,"".concat(T,"-start"),E[M+1]),Object(P.a)(L,"".concat(T,"-end"),w[M+1]),Object(P.a)(L,"".concat(T,"-end-first-level"),!M&&w[0]),L))}))}return t.createElement("span",{"aria-hidden":"true",className:"".concat(O,"-indent")},F)},s=n,h=D("815F"),f="open",l="close",a="---",r=function(p){Object(S.a)(O,p);var R=Object(_.a)(O);function O(){var b;return Object(N.a)(this,O),b=R.apply(this,arguments),b.state={dragNodeHighlight:!1},b.onSelectorClick=function(E){var w=b.props.context.onNodeClick;w(E,Object(h.b)(b.props)),b.isSelectable()?b.onSelect(E):b.onCheck(E)},b.onSelectorDoubleClick=function(E){var w=b.props.context.onNodeDoubleClick;w(E,Object(h.b)(b.props))},b.onSelect=function(E){if(b.isDisabled())return;var w=b.props.context.onNodeSelect;E.preventDefault(),w(E,Object(h.b)(b.props))},b.onCheck=function(E){if(b.isDisabled())return;var w=b.props,T=w.disableCheckbox,F=w.checked,M=b.props.context.onNodeCheck;if(!b.isCheckable()||T)return;E.preventDefault();var L=!F;M(E,Object(h.b)(b.props),L)},b.onMouseEnter=function(E){var w=b.props.context.onNodeMouseEnter;w(E,Object(h.b)(b.props))},b.onMouseLeave=function(E){var w=b.props.context.onNodeMouseLeave;w(E,Object(h.b)(b.props))},b.onContextMenu=function(E){var w=b.props.context.onNodeContextMenu;w(E,Object(h.b)(b.props))},b.onDragStart=function(E){var w=b.props.context.onNodeDragStart;E.stopPropagation(),b.setState({dragNodeHighlight:!0}),w(E,Object(m.a)(b));try{E.dataTransfer.setData("text/plain","")}catch(T){}},b.onDragEnter=function(E){var w=b.props.context.onNodeDragEnter;E.preventDefault(),E.stopPropagation(),w(E,Object(m.a)(b))},b.onDragOver=function(E){var w=b.props.context.onNodeDragOver;E.preventDefault(),E.stopPropagation(),w(E,Object(m.a)(b))},b.onDragLeave=function(E){var w=b.props.context.onNodeDragLeave;E.stopPropagation(),w(E,Object(m.a)(b))},b.onDragEnd=function(E){var w=b.props.context.onNodeDragEnd;E.stopPropagation(),b.setState({dragNodeHighlight:!1}),w(E,Object(m.a)(b))},b.onDrop=function(E){var w=b.props.context.onNodeDrop;E.preventDefault(),E.stopPropagation(),b.setState({dragNodeHighlight:!1}),w(E,Object(m.a)(b))},b.onExpand=function(E){var w=b.props.context.onNodeExpand;w(E,Object(h.b)(b.props))},b.setSelectHandle=function(E){b.selectHandle=E},b.getNodeState=function(){var E=b.props.expanded;return b.isLeaf()?null:E?f:l},b.hasChildren=function(){var E=b.props.eventKey,w=b.props.context.keyEntities,T=w[E]||{},F=T.children;return!!(F||[]).length},b.isLeaf=function(){var E=b.props,w=E.isLeaf,T=E.loaded,F=b.props.context.loadData,M=b.hasChildren();return w===!1?!1:w||!F&&!M||F&&T&&!M},b.isDisabled=function(){var E=b.props.disabled,w=b.props.context.disabled;return!!(w||E)},b.isCheckable=function(){var E=b.props.checkable,w=b.props.context.checkable;return!w||E===!1?!1:w},b.syncLoadData=function(E){var w=E.expanded,T=E.loading,F=E.loaded,M=b.props.context,L=M.loadData,Y=M.onNodeLoad;if(T)return;L&&w&&!b.isLeaf()&&(!b.hasChildren()&&!F&&Y(Object(h.b)(b.props)))},b.renderSwitcher=function(){var E=b.props,w=E.expanded,T=E.switcherIcon,F=b.props.context,M=F.prefixCls,L=F.switcherIcon,Y=T||L;if(b.isLeaf())return t.createElement("span",{className:i()("".concat(M,"-switcher"),"".concat(M,"-switcher-noop"))},typeof Y=="function"?Y(Object(C.a)(Object(C.a)({},b.props),{},{isLeaf:!0})):Y);var K=i()("".concat(M,"-switcher"),"".concat(M,"-switcher_").concat(w?f:l));return t.createElement("span",{onClick:b.onExpand,className:K},typeof Y=="function"?Y(Object(C.a)(Object(C.a)({},b.props),{},{isLeaf:!1})):Y)},b.renderCheckbox=function(){var E=b.props,w=E.checked,T=E.halfChecked,F=E.disableCheckbox,M=b.props.context.prefixCls,L=b.isDisabled(),Y=b.isCheckable();if(!Y)return null;var K=typeof Y!="boolean"?Y:null;return t.createElement("span",{className:i()("".concat(M,"-checkbox"),w&&"".concat(M,"-checkbox-checked"),!w&&T&&"".concat(M,"-checkbox-indeterminate"),(L||F)&&"".concat(M,"-checkbox-disabled")),onClick:b.onCheck},K)},b.renderIcon=function(){var E=b.props.loading,w=b.props.context.prefixCls;return t.createElement("span",{className:i()("".concat(w,"-iconEle"),"".concat(w,"-icon__").concat(b.getNodeState()||"docu"),E&&"".concat(w,"-icon_loading"))})},b.renderSelector=function(){var E=b.state.dragNodeHighlight,w=b.props,T=w.title,F=w.selected,M=w.icon,L=w.loading,Y=w.data,K=b.props.context,A=K.prefixCls,H=K.showIcon,U=K.icon,I=K.draggable,G=K.loadData,ne=K.titleRender,oe=b.isDisabled(),de="".concat(A,"-node-content-wrapper"),Oe;if(H){var Ae=M||U;Oe=Ae?t.createElement("span",{className:i()("".concat(A,"-iconEle"),"".concat(A,"-icon__customize"))},typeof Ae=="function"?Ae(b.props):Ae):b.renderIcon()}else G&&L&&(Oe=b.renderIcon());var pe;typeof T=="function"?pe=T(Y):ne?pe=ne(Y):pe=T;var Se=t.createElement("span",{className:"".concat(A,"-title")},pe);return t.createElement("span",{ref:b.setSelectHandle,title:typeof T=="string"?T:"",className:i()("".concat(de),"".concat(de,"-").concat(b.getNodeState()||"normal"),!oe&&(F||E)&&"".concat(A,"-node-selected"),!oe&&I&&"draggable"),draggable:!oe&&I||void 0,"aria-grabbed":!oe&&I||void 0,onMouseEnter:b.onMouseEnter,onMouseLeave:b.onMouseLeave,onContextMenu:b.onContextMenu,onClick:b.onSelectorClick,onDoubleClick:b.onSelectorDoubleClick,onDragStart:I?b.onDragStart:void 0},Oe,Se)},b}return Object(g.a)(O,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var E=this.props.selectable,w=this.props.context.selectable;return typeof E=="boolean"?E:w}},{key:"render",value:function(){var E,w=this.props,T=w.eventKey,F=w.className,M=w.style,L=w.dragOver,Y=w.dragOverGapTop,K=w.dragOverGapBottom,A=w.isLeaf,H=w.isStart,U=w.isEnd,I=w.expanded,G=w.selected,ne=w.checked,oe=w.halfChecked,de=w.loading,Oe=w.domRef,Ae=w.active,pe=w.onMouseMove,Se=Object(v.a)(w,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),be=this.props.context,se=be.prefixCls,ee=be.filterTreeNode,B=be.draggable,V=be.keyEntities,X=this.isDisabled(),Q=Object(o.f)(Se),Z=V[T]||{},ie=Z.level,re=U[U.length-1];return t.createElement("div",Object.assign({ref:Oe,className:i()(F,"".concat(se,"-treenode"),(E={},Object(P.a)(E,"".concat(se,"-treenode-disabled"),X),Object(P.a)(E,"".concat(se,"-treenode-switcher-").concat(I?"open":"close"),!A),Object(P.a)(E,"".concat(se,"-treenode-checkbox-checked"),ne),Object(P.a)(E,"".concat(se,"-treenode-checkbox-indeterminate"),oe),Object(P.a)(E,"".concat(se,"-treenode-selected"),G),Object(P.a)(E,"".concat(se,"-treenode-loading"),de),Object(P.a)(E,"".concat(se,"-treenode-active"),Ae),Object(P.a)(E,"".concat(se,"-treenode-leaf-last"),re),Object(P.a)(E,"drag-over",!X&&L),Object(P.a)(E,"drag-over-gap-top",!X&&Y),Object(P.a)(E,"drag-over-gap-bottom",!X&&K),Object(P.a)(E,"filter-node",ee&&ee(Object(h.b)(this.props))),E)),style:M,onDragEnter:B?this.onDragEnter:void 0,onDragOver:B?this.onDragOver:void 0,onDragLeave:B?this.onDragLeave:void 0,onDrop:B?this.onDrop:void 0,onDragEnd:B?this.onDragEnd:void 0,onMouseMove:pe},Q),t.createElement(s,{prefixCls:se,level:ie,isStart:H,isEnd:U}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),O}(t.Component),x=function(R){return t.createElement(c.a.Consumer,null,function(O){return t.createElement(r,Object.assign({},R,{context:O}))})};x.displayName="TreeNode",x.defaultProps={title:a},x.isTreeNode=1;var y=q.a=x},Y1PL:function(W,q,D){"use strict";D.r(q),D.d(q,"ResizableTextArea",function(){return oe});var P=D("wx14"),v=D("1OyB"),C=D("vuIU"),N=D("Ji7U"),g=D("LK+K"),m=D("q1tI"),S=D("VTBJ"),_=D("rePB"),t=D("Zm9Q"),d=D("Kwbf"),i=D("c+Xe"),c=D("m+aA"),o=D("bdgK"),n=new Map;function s(Ae){Ae.forEach(function(pe){var Se,be=pe.target;(Se=n.get(be))===null||Se===void 0||Se.forEach(function(se){return se(be)})})}var h=new o.default(s),f=null,l=null;function a(Ae,pe){n.has(Ae)||(n.set(Ae,new Set),h.observe(Ae)),n.get(Ae).add(pe)}function r(Ae,pe){n.has(Ae)&&(n.get(Ae).delete(pe),n.get(Ae).size||(h.unobserve(Ae),n.delete(Ae)))}var x=function(Ae){Object(N.a)(Se,Ae);var pe=Object(g.a)(Se);function Se(){return Object(v.a)(this,Se),pe.apply(this,arguments)}return Object(C.a)(Se,[{key:"render",value:function(){return this.props.children}}]),Se}(m.Component),y=m.createContext(null);function p(Ae){var pe=Ae.children,Se=Ae.onBatchResize,be=m.useRef(0),se=m.useRef([]),ee=m.useContext(y),B=m.useCallback(function(V,X,Q){be.current+=1;var Z=be.current;se.current.push({size:V,element:X,data:Q}),Promise.resolve().then(function(){Z===be.current&&(Se==null||Se(se.current),se.current=[])}),ee==null||ee(V,X,Q)},[Se,ee]);return m.createElement(y.Provider,{value:B},pe)}function R(Ae){var pe=Ae.children,Se=Ae.disabled,be=m.useRef(null),se=m.useRef(null),ee=m.useContext(y),B=m.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),V=m.isValidElement(pe)&&Object(i.c)(pe),X=V?pe.ref:null,Q=m.useMemo(function(){return Object(i.a)(X,be)},[X,be]),Z=m.useRef(Ae);Z.current=Ae;var ie=m.useCallback(function(re){var $=Z.current,J=$.onResize,le=$.data,ue=re.getBoundingClientRect(),xe=ue.width,Me=ue.height,Xe=re.offsetWidth,$e=re.offsetHeight,Je=Math.floor(xe),rt=Math.floor(Me);if(B.current.width!==Je||B.current.height!==rt||B.current.offsetWidth!==Xe||B.current.offsetHeight!==$e){var it={width:Je,height:rt,offsetWidth:Xe,offsetHeight:$e};B.current=it;var je=Xe===Math.round(xe)?xe:Xe,Ie=$e===Math.round(Me)?Me:$e,qe=Object(S.a)(Object(S.a)({},it),{},{offsetWidth:je,offsetHeight:Ie});ee==null||ee(qe,re,le),J&&Promise.resolve().then(function(){J(qe,re)})}},[]);return m.useEffect(function(){var re=Object(c.a)(be.current)||Object(c.a)(se.current);return re&&!Se&&a(re,ie),function(){return r(re,ie)}},[be.current,Se]),m.createElement(x,{ref:se},V?m.cloneElement(pe,{ref:Q}):pe)}var O="rc-observer-key";function b(Ae){var pe=Ae.children,Se=Object(t.a)(pe);return Se.map(function(be,se){var ee=(be==null?void 0:be.key)||"".concat(O,"-").concat(se);return m.createElement(R,Object(P.a)({},Ae,{key:ee}),be)})}b.Collection=p;var E=b,w=D("bT9E"),T=D("TSYQ"),F=D.n(T),M=`
|
|
|
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
|
|
|
`,L=["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"],Y={},K;function A(Ae){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Se=Ae.getAttribute("id")||Ae.getAttribute("data-reactid")||Ae.getAttribute("name");if(pe&&Y[Se])return Y[Se];var be=window.getComputedStyle(Ae),se=be.getPropertyValue("box-sizing")||be.getPropertyValue("-moz-box-sizing")||be.getPropertyValue("-webkit-box-sizing"),ee=parseFloat(be.getPropertyValue("padding-bottom"))+parseFloat(be.getPropertyValue("padding-top")),B=parseFloat(be.getPropertyValue("border-bottom-width"))+parseFloat(be.getPropertyValue("border-top-width")),V=L.map(function(Q){return"".concat(Q,":").concat(be.getPropertyValue(Q))}).join(";"),X={sizingStyle:V,paddingSize:ee,borderSize:B,boxSizing:se};return pe&&Se&&(Y[Se]=X),X}function H(Ae){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,be=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;K||(K=document.createElement("textarea"),K.setAttribute("tab-index","-1"),K.setAttribute("aria-hidden","true"),document.body.appendChild(K)),Ae.getAttribute("wrap")?K.setAttribute("wrap",Ae.getAttribute("wrap")):K.removeAttribute("wrap");var se=A(Ae,pe),ee=se.paddingSize,B=se.borderSize,V=se.boxSizing,X=se.sizingStyle;K.setAttribute("style","".concat(X,";").concat(M)),K.value=Ae.value||Ae.placeholder||"";var Q=Number.MIN_SAFE_INTEGER,Z=Number.MAX_SAFE_INTEGER,ie=K.scrollHeight,re;if(V==="border-box"?ie+=B:V==="content-box"&&(ie-=ee),Se!==null||be!==null){K.value=" ";var $=K.scrollHeight-ee;Se!==null&&(Q=$*Se,V==="border-box"&&(Q=Q+ee+B),ie=Math.max(Q,ie)),be!==null&&(Z=$*be,V==="border-box"&&(Z=Z+ee+B),re=ie>Z?"":"hidden",ie=Math.min(Z,ie))}return{height:ie,minHeight:Q,maxHeight:Z,overflowY:re,resize:"none"}}var U=D("Gytx"),I=D.n(U),G;(function(Ae){Ae[Ae.NONE=0]="NONE",Ae[Ae.RESIZING=1]="RESIZING",Ae[Ae.RESIZED=2]="RESIZED"})(G||(G={}));var ne=function(Ae){Object(N.a)(Se,Ae);var pe=Object(g.a)(Se);function Se(be){var se;return Object(v.a)(this,Se),se=pe.call(this,be),se.nextFrameActionId=void 0,se.resizeFrameId=void 0,se.textArea=void 0,se.saveTextArea=function(ee){se.textArea=ee},se.handleResize=function(ee){var B=se.state.resizeStatus,V=se.props,X=V.autoSize,Q=V.onResize;if(B!==G.NONE)return;typeof Q=="function"&&Q(ee),X&&se.resizeOnNextFrame()},se.resizeOnNextFrame=function(){cancelAnimationFrame(se.nextFrameActionId),se.nextFrameActionId=requestAnimationFrame(se.resizeTextarea)},se.resizeTextarea=function(){var ee=se.props.autoSize;if(!ee||!se.textArea)return;var B=ee.minRows,V=ee.maxRows,X=H(se.textArea,!1,B,V);se.setState({textareaStyles:X,resizeStatus:G.RESIZING},function(){cancelAnimationFrame(se.resizeFrameId),se.resizeFrameId=requestAnimationFrame(function(){se.setState({resizeStatus:G.RESIZED},function(){se.resizeFrameId=requestAnimationFrame(function(){se.setState({resizeStatus:G.NONE}),se.fixFirefoxAutoScroll()})})})})},se.renderTextArea=function(){var ee=se.props,B=ee.prefixCls,V=B===void 0?"rc-textarea":B,X=ee.autoSize,Q=ee.onResize,Z=ee.className,ie=ee.disabled,re=se.state,$=re.textareaStyles,J=re.resizeStatus,le=Object(w.a)(se.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ue=F()(V,Z,Object(_.a)({},"".concat(V,"-disabled"),ie));"value"in le&&(le.value=le.value||"");var xe=Object(S.a)(Object(S.a)(Object(S.a)({},se.props.style),$),J===G.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return m.createElement(E,{onResize:se.handleResize,disabled:!(X||Q)},m.createElement("textarea",Object(P.a)({},le,{className:ue,style:xe,ref:se.saveTextArea})))},se.state={textareaStyles:{},resizeStatus:G.NONE},se}return Object(C.a)(Se,[{key:"componentDidUpdate",value:function(se){(se.value!==this.props.value||!I()(se.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 se=this.textArea.selectionStart,ee=this.textArea.selectionEnd;this.textArea.setSelectionRange(se,ee)}}catch(B){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Se}(m.Component),oe=ne,de=function(Ae){Object(N.a)(Se,Ae);var pe=Object(g.a)(Se);function Se(be){var se;Object(v.a)(this,Se),se=pe.call(this,be),se.resizableTextArea=void 0,se.focus=function(){se.resizableTextArea.textArea.focus()},se.saveTextArea=function(B){se.resizableTextArea=B},se.handleChange=function(B){var V=se.props.onChange;se.setValue(B.target.value,function(){se.resizableTextArea.resizeTextarea()}),V&&V(B)},se.handleKeyDown=function(B){var V=se.props,X=V.onPressEnter,Q=V.onKeyDown;B.keyCode===13&&X&&X(B),Q&&Q(B)};var ee=typeof be.value=="undefined"||be.value===null?be.defaultValue:be.value;return se.state={value:ee},se}return Object(C.a)(Se,[{key:"setValue",value:function(se,ee){"value"in this.props||this.setState({value:se},ee)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return m.createElement(oe,Object(P.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(se){return"value"in se?{value:se.value}:null}}]),Se}(m.Component),Oe=q.default=de},ZW9T:function(W,q,D){"use strict";D.d(q,"a",function(){return U});var P=D("k1fw"),v=D("oBTY"),C=D("miYZ"),N=D("tsqr"),g=D("rAM+"),m=D("tJVT"),S=D("PpiC"),_=D("q1tI"),t=D.n(_),d=D("bdgK"),i=D("9og8"),c=D("WmNS"),o=D.n(c),n={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},s={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},h={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
|
`)}]},f={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
|
`)}]},l=D("5VLF"),a=D.n(l),r={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},x=function(G,ne){return ne.map(function(oe){return{label:oe,kind:G.languages.CompletionItemKind.Keyword,insertText:oe}})},y=function(G){return Object.keys(r.tables).map(function(ne){return{label:ne,kind:G.languages.CompletionItemKind.Variable,insertText:ne}})},p=function(G,ne){var oe=r.tables[G];return oe?oe.map(function(de){return{label:de,kind:ne.languages.CompletionItemKind.Field,insertText:de}}):[]};function R(I,G,ne,oe,de){var Oe=G.getWordUntilPosition(ne),Ae={startLineNumber:ne.lineNumber,endLineNumber:ne.lineNumber,startColumn:Oe.startColumn,endColumn:Oe.endColumn},pe=oe.map(function(Se){return{label:Se,kind:I.languages.CompletionItemKind.Keyword,insertText:Se,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ae}});return de.map(function(Se){pe.push(Object(P.a)(Object(P.a)({},Se),{},{range:Ae}))}),pe}var O=function(I){r.languages.map(function(de){return I.languages.registerDocumentFormattingEditProvider(de,{provideDocumentFormattingEdits:function(Ae,pe,Se){return Object(i.a)(o.a.mark(function be(){var se;return o.a.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return se=a()(Ae.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),B.abrupt("return",[{range:Ae.getFullModelRange(),text:se}]);case 2:case"end":return B.stop()}},be)}))()}}),de});var G=h.quickKey.map(function(de){return{label:de.label,kind:I.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ne=f.quickKey.map(function(de){return{label:de.label,kind:I.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),oe=s.quickKey.map(function(de){return{label:de.label,kind:I.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet}});I.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Oe,Ae){var pe=Oe.getWordUntilPosition(Ae),Se={startLineNumber:Ae.lineNumber,endLineNumber:Ae.lineNumber,startColumn:pe.startColumn,endColumn:pe.endColumn},be=Oe.getLineContent(Ae.lineNumber).substring(pe.startColumn-2,pe.endColumn);return{suggestions:[].concat(Object(v.a)(h.keywords.map(function(se){return{label:se,kind:I.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}})),Object(v.a)(h.quickKey.map(function(se){return{label:se.label,kind:I.languages.CompletionItemKind.Function,documentation:se.content,insertText:be.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}})))}}}),I.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Oe,Ae){var pe=Oe.getWordUntilPosition(Ae),Se={startLineNumber:Ae.lineNumber,endLineNumber:Ae.lineNumber,startColumn:pe.startColumn,endColumn:pe.endColumn};return{suggestions:Object(v.a)(n.keywords.map(function(be){return{label:be,kind:I.languages.CompletionItemKind.Function,documentation:be,insertText:be,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}}))}}}),I.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Oe,Ae){var pe=Oe.getWordUntilPosition(Ae),Se={startLineNumber:Ae.lineNumber,endLineNumber:Ae.lineNumber,startColumn:pe.startColumn,endColumn:pe.endColumn},be=Oe.getLineContent(Ae.lineNumber).substring(pe.startColumn-2,pe.endColumn);return{suggestions:[].concat(Object(v.a)(s.keywords.map(function(se){return{label:se,kind:I.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}})),Object(v.a)(s.quickKey.map(function(se){return{label:se.label,kind:I.languages.CompletionItemKind.Function,documentation:se.content,insertText:be.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}})))}}}),I.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Oe,Ae){var pe=Oe.getWordUntilPosition(Ae),Se={startLineNumber:Ae.lineNumber,endLineNumber:Ae.lineNumber,startColumn:pe.startColumn,endColumn:pe.endColumn},be=Oe.getLineContent(Ae.lineNumber).substring(pe.startColumn-2,pe.endColumn);return{suggestions:[].concat(Object(v.a)(f.keywords.map(function(se){return{label:se,kind:I.languages.CompletionItemKind.Function,documentation:se,insertText:se,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}})),Object(v.a)(f.quickKey.map(function(se){return{label:se.label,kind:I.languages.CompletionItemKind.Function,documentation:se.content,insertText:be.startsWith("#")?se.content.replace(/#/,""):se.content,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}})))}}})},b="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",E=D("fjLI"),w=D("LvDl"),T=D("+ua5");function F(I){return/^\d+$/.test(I)?"".concat(I,"px"):I}function M(){}var L=!1,Y={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function K(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],G=I;if(Array.isArray(I)){for(var ne=0;ne<I.length;ne++){var oe=Y[I[ne]];if(oe)return oe}return G[0]}return Y[G]||G}var A=null,H=q.b=function(I){var G=I.width,ne=G===void 0?"100%":G,oe=I.height,de=oe===void 0?"100%":oe,Oe=I.value,Ae=I.language,pe=Ae===void 0?"javascript":Ae,Se=I.style,be=Se===void 0?{}:Se,se=I.options,ee=se===void 0?{}:se,B=I.overrideServices,V=B===void 0?{}:B,X=I.theme,Q=X===void 0?"vs-dark":X,Z=I.onEditBlur,ie=I.onSave,re=I.autoHeight,$=re===void 0?!1:re,J=I.forbidCopy,le=J===void 0?!1:J,ue=I.onChange,xe=ue===void 0?M:ue,Me=I.editorDidMount,Xe=Me===void 0?M:Me,$e=I.onFocus,Je=$e===void 0?M:$e,rt=I.filename,it=rt===void 0?"educoder.txt":rt,je=I.errorLine,Ie=I.errorContent,qe=Ie===void 0?"":Ie,st=Object(S.a)(I,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Ee=Object(_.useRef)(),ce=Object(_.useRef)({}),fe=Object(_.useRef)(),ve=Object(_.useRef)(),Ce=Object(_.useRef)(!1),ge=Object(_.useRef)(),ye=Object(_.useState)(!1),Re=Object(m.a)(ye,2),De=Re[0],Pe=Re[1];function ze(){var lr;return Ee.current&&(lr=new d.default(function(Cr){var gr=Object(g.a)(Cr),xn;try{for(gr.s();!(xn=gr.n()).done;){var Wn=xn.value;(Wn.target.offsetHeight>0||Wn.target.offsetWidth>0)&&ce.current.instance.layout()}}catch(gn){gr.e(gn)}finally{gr.f()}}),lr.observe(Ee.current)),lr}function at(){N.b.warn(decodeURIComponent(b))}var lt=function(){var Cr=ce.current.instance;if(Oe!=null&&Cr&&De){var gr=Cr.getModel();gr&&Oe!==gr.getValue()&&(L=!0,gr.setValue(Oe),Cr.layout(),L=!1)}};Object(_.useEffect)(function(){ve.current&&clearTimeout(ve.current),ve.current=setTimeout(function(){lt()},500)},[Oe,De,ce.current]),Object(_.useEffect)(function(){if(je&&ce.current&&ce.current.instance){var lr=ce.current.instance;lr.changeViewZones(function(gr){var xn=document.createElement("div");xn.style.padding="10px 20px",xn.style.width="calc(100% - 20px)",xn.className="my-error-line-wrp",xn.innerHTML=qe,gr.addZone({afterLineNumber:je||11,heightInLines:3,domNode:xn})});var Cr={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}};lr.addOverlayWidget(Cr),lr.revealPositionInCenter({lineNumber:20,column:1})}},[je,ce.current,De]);function St(){var lr=ce.current.instance;if(lr){var Cr=lr.getSelection(),gr=ce.current.pastePos||{},xn=new A.Range(gr.startLineNumber||Cr.endLineNumber,gr.startColumn||Cr.endColumn,gr.endLineNumber||Cr.endLineNumber,gr.endColumn||Cr.endColumn);setTimeout(function(){lr.executeEdits("",[{range:xn,text:""}])},300)}}function Ot(lr){(window.navigator.platform.match("Mac")?lr.metaKey:lr.ctrlKey)&&lr.keyCode==83&&(lr.preventDefault(),ie())}var ir=function(){if($&&ce.current.instance){var Cr=ce.current.instance.getContentHeight();Ir(Cr<de?de:Cr)}else Ir(de)};function Gt(lr){var Cr=document.createEvent("MouseEvents");Cr.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),lr.dispatchEvent(Cr)}function yt(lr,Cr){var gr=window.URL||window.webkitURL||window,xn=new Blob([Cr]),Wn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Wn.href=gr.createObjectURL(xn),Wn.download=lr,Gt(Wn)}Object(_.useEffect)(function(){ir()},[ir]),Object(_.useEffect)(function(){Ee.current&&!De&&Promise.all([D.e(18),D.e(29)]).then(D.t.bind(null,"M/lh",7)).then(function(lr){try{A=lr,ce.current.instance=A.editor.create(Ee.current,{value:Oe,language:K(pe),theme:Q,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},V);var Cr=ce.current.instance,gr=E.d._menuItems,xn=Object(v.a)(gr).find(function(rn){return rn[0]._debugName=="EditorContext"}),Wn=xn[1],gn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Bt=function(Or,Lr){var Wr=Or._first;do{var Fn,yn,Ct=Lr.includes((Fn=Wr.element)===null||Fn===void 0||((yn=Fn.command)===null||yn===void 0)?void 0:yn.id);Ct&&Or._remove(Wr)}while(Wr=Wr.next)};if(Xe(Cr,A),setTimeout(function(){ir(),ce.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){yt(it||"educoder.txt",Cr.getValue())}}),Cr.getDomNode().addEventListener("input",function(){fe.current.autoFormat&&Cr.getAction("editor.action.formatDocument").run()})},500),ce.current.subscription=Cr.onDidChangeModelContent(function(rn){Ce.current?clearTimeout(ge.current):(ir(),xe(Cr.getValue(),rn)),ge.current=setTimeout(function(){Ce.current=!1},500)}),window.Monaco||O(A,K(pe)),le&&(Bt(Wn,gn),Ee.current.classList.add("noCopyPaste"),Cr.onKeyDown(function(rn){var Or=rn.keyCode,Lr=rn.ctrlKey,Wr=rn.metaKey;(Or===33||Or===52)&&(Wr||Lr)&&(at(),rn.preventDefault())})),window.Monaco=A,Z&&Cr.onDidBlurEditorWidget(function(){Z(Cr.getValue())}),Je&&Cr.onDidFocusEditorText(function(){Je(Cr.getValue())}),le){Cr.addCommand(A.KeyMod.CtrlCmd|A.KeyCode.KEY_V,function(){return at(),null}),Cr.onDidPaste(function(rn){ce.current.pastePos=rn});try{window.addEventListener("paste",St)}catch(rn){}}var Kr=ze();return Pe(!0),function(){var rn=ce.current.instance;rn.dispose();var Or=rn.getModel();Or&&Or.dispose(),ce.current.subscription&&ce.current.subscription.dispose(),le&&window.removeEventListener("paste",St),Kr.unobserve(Ee.current)}}catch(rn){}})},[]),Object(_.useEffect)(function(){var lr=ce.current.instance;if(lr&&De)return document.addEventListener("keydown",Ot,!1),function(){document.removeEventListener("keydown",Ot)}},[ie,De]),Object(_.useEffect)(function(){var lr=ce.current.instance;if(lr&&De){var Cr=K(pe);A.editor.setModelLanguage(lr.getModel(),Cr),console.log("language:",pe,lr.getModel(),Cr)}},[pe,De]),Object(_.useEffect)(function(){var lr=ce.current.instance;lr&&De&&A.editor.setTheme(Q)},[Q,De]),Object(_.useEffect)(function(){var lr=ce.current.instance;fe.current=ee,lr&&De&&(lr.updateOptions(Object(P.a)({},ee)),setTimeout(function(){lr.getModel().updateOptions(Object(P.a)({},ee))},200))},[JSON.stringify(ee),De]),Object(_.useEffect)(function(){var lr=ce.current.instance;lr&&De&&lr.layout()},[ne,de,De]);var Fr=Object(_.useState)(F(ne)),Pr=Object(m.a)(Fr,2),jr=Pr[0],un=Pr[1],xr=Object(_.useState)(F(de)),an=Object(m.a)(xr,2),tn=an[0],Ir=an[1],hn=Object(P.a)(Object(P.a)({},be),{},{width:jr,height:tn});return t.a.createElement("div",{className:"my-monaco-editor",ref:Ee,style:hn})};function U(I){var G=I.width,ne=G===void 0?"100%":G,oe=I.height,de=oe===void 0?"100%":oe,Oe=I.original,Ae=I.modified,pe=I.language,Se=I.options,be=Se===void 0?{}:Se,se=Object(_.useRef)(),ee=Object(_.useState)(null),B=Object(m.a)(ee,2),V=B[0],X=B[1];function Q($){var J;return se.current&&(J=new d.default(function(le){var ue=Object(g.a)(le),xe;try{for(ue.s();!(xe=ue.n()).done;){var Me=xe.value;(Me.target.offsetHeight>0||Me.target.offsetWidth>0)&&$.layout()}}catch(Xe){ue.e(Xe)}finally{ue.f()}}),J.observe(se.current)),J}Object(_.useEffect)(function(){se.current&&Promise.all([D.e(18),D.e(29)]).then(D.t.bind(null,"M/lh",7)).then(function($){A=$;var J=A.editor.createDiffEditor(se.current,Object(P.a)(Object(P.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},be),{},{wordWrap:!0}));X(J);var le=Q(J);return function(){J.dispose();var ue=J.getModel();ue&&ue.dispose(),le.unobserve(se.current)}})},[]),Object(_.useEffect)(function(){V&&V.setModel({original:A.editor.createModel(Oe,pe),modified:A.editor.createModel(Ae,pe)})},[Oe,Ae,pe,V]);var Z=F(ne),ie=F(de),re={width:Z,height:ie};return t.a.createElement("div",{className:"my-diff-editor",ref:se,style:re})}},Zss7:function(W,q,D){var P;(function(v){var C=/^\s+/,N=/\s+$/,g=0,m=v.round,S=v.min,_=v.max,t=v.random;function d(B,V){if(B=B||"",V=V||{},B instanceof d)return B;if(!(this instanceof d))return new d(B,V);var X=i(B);this._originalInput=B,this._r=X.r,this._g=X.g,this._b=X.b,this._a=X.a,this._roundA=m(100*this._a)/100,this._format=V.format||X.format,this._gradientType=V.gradientType,this._r<1&&(this._r=m(this._r)),this._g<1&&(this._g=m(this._g)),this._b<1&&(this._b=m(this._b)),this._ok=X.ok,this._tc_id=g++}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var B=this.toRgb();return(B.r*299+B.g*587+B.b*114)/1e3},getLuminance:function(){var B=this.toRgb(),V,X,Q,Z,ie,re;return V=B.r/255,X=B.g/255,Q=B.b/255,V<=.03928?Z=V/12.92:Z=v.pow((V+.055)/1.055,2.4),X<=.03928?ie=X/12.92:ie=v.pow((X+.055)/1.055,2.4),Q<=.03928?re=Q/12.92:re=v.pow((Q+.055)/1.055,2.4),.2126*Z+.7152*ie+.0722*re},setAlpha:function(B){return this._a=H(B),this._roundA=m(100*this._a)/100,this},toHsv:function(){var B=s(this._r,this._g,this._b);return{h:B.h*360,s:B.s,v:B.v,a:this._a}},toHsvString:function(){var B=s(this._r,this._g,this._b),V=m(B.h*360),X=m(B.s*100),Q=m(B.v*100);return this._a==1?"hsv("+V+", "+X+"%, "+Q+"%)":"hsva("+V+", "+X+"%, "+Q+"%, "+this._roundA+")"},toHsl:function(){var B=o(this._r,this._g,this._b);return{h:B.h*360,s:B.s,l:B.l,a:this._a}},toHslString:function(){var B=o(this._r,this._g,this._b),V=m(B.h*360),X=m(B.s*100),Q=m(B.l*100);return this._a==1?"hsl("+V+", "+X+"%, "+Q+"%)":"hsla("+V+", "+X+"%, "+Q+"%, "+this._roundA+")"},toHex:function(B){return f(this._r,this._g,this._b,B)},toHexString:function(B){return"#"+this.toHex(B)},toHex8:function(B){return l(this._r,this._g,this._b,this._a,B)},toHex8String:function(B){return"#"+this.toHex8(B)},toRgb:function(){return{r:m(this._r),g:m(this._g),b:m(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+m(this._r)+", "+m(this._g)+", "+m(this._b)+")":"rgba("+m(this._r)+", "+m(this._g)+", "+m(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:m(U(this._r,255)*100)+"%",g:m(U(this._g,255)*100)+"%",b:m(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%)":"rgba("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:K[f(this._r,this._g,this._b,!0)]||!1},toFilter:function(B){var V="#"+a(this._r,this._g,this._b,this._a),X=V,Q=this._gradientType?"GradientType = 1, ":"";if(B){var Z=d(B);X="#"+a(Z._r,Z._g,Z._b,Z._a)}return"progid:DXImageTransform.Microsoft.gradient("+Q+"startColorstr="+V+",endColorstr="+X+")"},toString:function(B){var V=!!B;B=B||this._format;var X=!1,Q=this._a<1&&this._a>=0,Z=!V&&Q&&(B==="hex"||B==="hex6"||B==="hex3"||B==="hex4"||B==="hex8"||B==="name");return Z?B==="name"&&this._a===0?this.toName():this.toRgbString():(B==="rgb"&&(X=this.toRgbString()),B==="prgb"&&(X=this.toPercentageRgbString()),(B==="hex"||B==="hex6")&&(X=this.toHexString()),B==="hex3"&&(X=this.toHexString(!0)),B==="hex4"&&(X=this.toHex8String(!0)),B==="hex8"&&(X=this.toHex8String()),B==="name"&&(X=this.toName()),B==="hsl"&&(X=this.toHslString()),B==="hsv"&&(X=this.toHsvString()),X||this.toHexString())},clone:function(){return d(this.toString())},_applyModification:function(B,V){var X=B.apply(null,[this].concat([].slice.call(V)));return this._r=X._r,this._g=X._g,this._b=X._b,this.setAlpha(X._a),this},lighten:function(){return this._applyModification(p,arguments)},brighten:function(){return this._applyModification(R,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(r,arguments)},saturate:function(){return this._applyModification(x,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(B,V){return B.apply(null,[this].concat([].slice.call(V)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(L,arguments)},splitcomplement:function(){return this._applyCombination(F,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},d.fromRatio=function(B,V){if(typeof B=="object"){var X={};for(var Q in B)B.hasOwnProperty(Q)&&(Q==="a"?X[Q]=B[Q]:X[Q]=Oe(B[Q]));B=X}return d(B,V)};function i(B){var V={r:0,g:0,b:0},X=1,Q=null,Z=null,ie=null,re=!1,$=!1;return typeof B=="string"&&(B=se(B)),typeof B=="object"&&(be(B.r)&&be(B.g)&&be(B.b)?(V=c(B.r,B.g,B.b),re=!0,$=String(B.r).substr(-1)==="%"?"prgb":"rgb"):be(B.h)&&be(B.s)&&be(B.v)?(Q=Oe(B.s),Z=Oe(B.v),V=h(B.h,Q,Z),re=!0,$="hsv"):be(B.h)&&be(B.s)&&be(B.l)&&(Q=Oe(B.s),ie=Oe(B.l),V=n(B.h,Q,ie),re=!0,$="hsl"),B.hasOwnProperty("a")&&(X=B.a)),X=H(X),{ok:re,format:B.format||$,r:S(255,_(V.r,0)),g:S(255,_(V.g,0)),b:S(255,_(V.b,0)),a:X}}function c(B,V,X){return{r:U(B,255)*255,g:U(V,255)*255,b:U(X,255)*255}}function o(B,V,X){B=U(B,255),V=U(V,255),X=U(X,255);var Q=_(B,V,X),Z=S(B,V,X),ie,re,$=(Q+Z)/2;if(Q==Z)ie=re=0;else{var J=Q-Z;re=$>.5?J/(2-Q-Z):J/(Q+Z);switch(Q){case B:ie=(V-X)/J+(V<X?6:0);break;case V:ie=(X-B)/J+2;break;case X:ie=(B-V)/J+4;break}ie/=6}return{h:ie,s:re,l:$}}function n(B,V,X){var Q,Z,ie;B=U(B,360),V=U(V,100),X=U(X,100);function re(le,ue,xe){return xe<0&&(xe+=1),xe>1&&(xe-=1),xe<1/6?le+(ue-le)*6*xe:xe<1/2?ue:xe<2/3?le+(ue-le)*(2/3-xe)*6:le}if(V===0)Q=Z=ie=X;else{var $=X<.5?X*(1+V):X+V-X*V,J=2*X-$;Q=re(J,$,B+1/3),Z=re(J,$,B),ie=re(J,$,B-1/3)}return{r:Q*255,g:Z*255,b:ie*255}}function s(B,V,X){B=U(B,255),V=U(V,255),X=U(X,255);var Q=_(B,V,X),Z=S(B,V,X),ie,re,$=Q,J=Q-Z;if(re=Q===0?0:J/Q,Q==Z)ie=0;else{switch(Q){case B:ie=(V-X)/J+(V<X?6:0);break;case V:ie=(X-B)/J+2;break;case X:ie=(B-V)/J+4;break}ie/=6}return{h:ie,s:re,v:$}}function h(B,V,X){B=U(B,360)*6,V=U(V,100),X=U(X,100);var Q=v.floor(B),Z=B-Q,ie=X*(1-V),re=X*(1-Z*V),$=X*(1-(1-Z)*V),J=Q%6,le=[X,re,ie,ie,$,X][J],ue=[$,X,X,re,ie,ie][J],xe=[ie,ie,$,X,X,re][J];return{r:le*255,g:ue*255,b:xe*255}}function f(B,V,X,Q){var Z=[de(m(B).toString(16)),de(m(V).toString(16)),de(m(X).toString(16))];return Q&&Z[0].charAt(0)==Z[0].charAt(1)&&Z[1].charAt(0)==Z[1].charAt(1)&&Z[2].charAt(0)==Z[2].charAt(1)?Z[0].charAt(0)+Z[1].charAt(0)+Z[2].charAt(0):Z.join("")}function l(B,V,X,Q,Z){var ie=[de(m(B).toString(16)),de(m(V).toString(16)),de(m(X).toString(16)),de(Ae(Q))];return Z&&ie[0].charAt(0)==ie[0].charAt(1)&&ie[1].charAt(0)==ie[1].charAt(1)&&ie[2].charAt(0)==ie[2].charAt(1)&&ie[3].charAt(0)==ie[3].charAt(1)?ie[0].charAt(0)+ie[1].charAt(0)+ie[2].charAt(0)+ie[3].charAt(0):ie.join("")}function a(B,V,X,Q){var Z=[de(Ae(Q)),de(m(B).toString(16)),de(m(V).toString(16)),de(m(X).toString(16))];return Z.join("")}d.equals=function(B,V){return!B||!V?!1:d(B).toRgbString()==d(V).toRgbString()},d.random=function(){return d.fromRatio({r:t(),g:t(),b:t()})};function r(B,V){V=V===0?0:V||10;var X=d(B).toHsl();return X.s-=V/100,X.s=I(X.s),d(X)}function x(B,V){V=V===0?0:V||10;var X=d(B).toHsl();return X.s+=V/100,X.s=I(X.s),d(X)}function y(B){return d(B).desaturate(100)}function p(B,V){V=V===0?0:V||10;var X=d(B).toHsl();return X.l+=V/100,X.l=I(X.l),d(X)}function R(B,V){V=V===0?0:V||10;var X=d(B).toRgb();return X.r=_(0,S(255,X.r-m(255*-(V/100)))),X.g=_(0,S(255,X.g-m(255*-(V/100)))),X.b=_(0,S(255,X.b-m(255*-(V/100)))),d(X)}function O(B,V){V=V===0?0:V||10;var X=d(B).toHsl();return X.l-=V/100,X.l=I(X.l),d(X)}function b(B,V){var X=d(B).toHsl(),Q=(X.h+V)%360;return X.h=Q<0?360+Q:Q,d(X)}function E(B){var V=d(B).toHsl();return V.h=(V.h+180)%360,d(V)}function w(B){var V=d(B).toHsl(),X=V.h;return[d(B),d({h:(X+120)%360,s:V.s,l:V.l}),d({h:(X+240)%360,s:V.s,l:V.l})]}function T(B){var V=d(B).toHsl(),X=V.h;return[d(B),d({h:(X+90)%360,s:V.s,l:V.l}),d({h:(X+180)%360,s:V.s,l:V.l}),d({h:(X+270)%360,s:V.s,l:V.l})]}function F(B){var V=d(B).toHsl(),X=V.h;return[d(B),d({h:(X+72)%360,s:V.s,l:V.l}),d({h:(X+216)%360,s:V.s,l:V.l})]}function M(B,V,X){V=V||6,X=X||30;var Q=d(B).toHsl(),Z=360/X,ie=[d(B)];for(Q.h=(Q.h-(Z*V>>1)+720)%360;--V;)Q.h=(Q.h+Z)%360,ie.push(d(Q));return ie}function L(B,V){V=V||6;for(var X=d(B).toHsv(),Q=X.h,Z=X.s,ie=X.v,re=[],$=1/V;V--;)re.push(d({h:Q,s:Z,v:ie})),ie=(ie+$)%1;return re}d.mix=function(B,V,X){X=X===0?0:X||50;var Q=d(B).toRgb(),Z=d(V).toRgb(),ie=X/100,re={r:(Z.r-Q.r)*ie+Q.r,g:(Z.g-Q.g)*ie+Q.g,b:(Z.b-Q.b)*ie+Q.b,a:(Z.a-Q.a)*ie+Q.a};return d(re)},d.readability=function(B,V){var X=d(B),Q=d(V);return(v.max(X.getLuminance(),Q.getLuminance())+.05)/(v.min(X.getLuminance(),Q.getLuminance())+.05)},d.isReadable=function(B,V,X){var Q=d.readability(B,V),Z,ie;ie=!1,Z=ee(X);switch(Z.level+Z.size){case"AAsmall":case"AAAlarge":ie=Q>=4.5;break;case"AAlarge":ie=Q>=3;break;case"AAAsmall":ie=Q>=7;break}return ie},d.mostReadable=function(B,V,X){var Q=null,Z=0,ie,re,$,J;X=X||{},re=X.includeFallbackColors,$=X.level,J=X.size;for(var le=0;le<V.length;le++)ie=d.readability(B,V[le]),ie>Z&&(Z=ie,Q=d(V[le]));return d.isReadable(B,Q,{level:$,size:J})||!re?Q:(X.includeFallbackColors=!1,d.mostReadable(B,["#fff","#000"],X))};var Y=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},K=d.hexNames=A(Y);function A(B){var V={};for(var X in B)B.hasOwnProperty(X)&&(V[B[X]]=X);return V}function H(B){return B=parseFloat(B),(isNaN(B)||B<0||B>1)&&(B=1),B}function U(B,V){ne(B)&&(B="100%");var X=oe(B);return B=S(V,_(0,parseFloat(B))),X&&(B=parseInt(B*V,10)/100),v.abs(B-V)<1e-6?1:B%V/parseFloat(V)}function I(B){return S(1,_(0,B))}function G(B){return parseInt(B,16)}function ne(B){return typeof B=="string"&&B.indexOf(".")!=-1&&parseFloat(B)===1}function oe(B){return typeof B=="string"&&B.indexOf("%")!=-1}function de(B){return B.length==1?"0"+B:""+B}function Oe(B){return B<=1&&(B=B*100+"%"),B}function Ae(B){return v.round(parseFloat(B)*255).toString(16)}function pe(B){return G(B)/255}var Se=function(){var B="[-\\+]?\\d+%?",V="[-\\+]?\\d*\\.\\d+%?",X="(?:"+V+")|(?:"+B+")",Q="[\\s|\\(]+("+X+")[,|\\s]+("+X+")[,|\\s]+("+X+")\\s*\\)?",Z="[\\s|\\(]+("+X+")[,|\\s]+("+X+")[,|\\s]+("+X+")[,|\\s]+("+X+")\\s*\\)?";return{CSS_UNIT:new RegExp(X),rgb:new RegExp("rgb"+Q),rgba:new RegExp("rgba"+Z),hsl:new RegExp("hsl"+Q),hsla:new RegExp("hsla"+Z),hsv:new RegExp("hsv"+Q),hsva:new RegExp("hsva"+Z),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function be(B){return!!Se.CSS_UNIT.exec(B)}function se(B){B=B.replace(C,"").replace(N,"").toLowerCase();var V=!1;if(Y[B])B=Y[B],V=!0;else if(B=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var X;return(X=Se.rgb.exec(B))?{r:X[1],g:X[2],b:X[3]}:(X=Se.rgba.exec(B))?{r:X[1],g:X[2],b:X[3],a:X[4]}:(X=Se.hsl.exec(B))?{h:X[1],s:X[2],l:X[3]}:(X=Se.hsla.exec(B))?{h:X[1],s:X[2],l:X[3],a:X[4]}:(X=Se.hsv.exec(B))?{h:X[1],s:X[2],v:X[3]}:(X=Se.hsva.exec(B))?{h:X[1],s:X[2],v:X[3],a:X[4]}:(X=Se.hex8.exec(B))?{r:G(X[1]),g:G(X[2]),b:G(X[3]),a:pe(X[4]),format:V?"name":"hex8"}:(X=Se.hex6.exec(B))?{r:G(X[1]),g:G(X[2]),b:G(X[3]),format:V?"name":"hex"}:(X=Se.hex4.exec(B))?{r:G(X[1]+""+X[1]),g:G(X[2]+""+X[2]),b:G(X[3]+""+X[3]),a:pe(X[4]+""+X[4]),format:V?"name":"hex8"}:(X=Se.hex3.exec(B))?{r:G(X[1]+""+X[1]),g:G(X[2]+""+X[2]),b:G(X[3]+""+X[3]),format:V?"name":"hex"}:!1}function ee(B){var V,X;return B=B||{level:"AA",size:"small"},V=(B.level||"AA").toUpperCase(),X=(B.size||"small").toLowerCase(),V!=="AA"&&V!=="AAA"&&(V="AA"),X!=="small"&&X!=="large"&&(X="small"),{level:V,size:X}}W.exports?W.exports=d:!(P=function(){return d}.call(q,D,q,W),P!==void 0&&(W.exports=P))})(Math)},bQjk:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("OLod"))})(this,function(P){return function(v){var C=P,N=C.lib,g=N.CipherParams,m=C.enc,S=m.Hex,_=C.format,t=_.Hex={stringify:function(d){return d.ciphertext.toString(S)},parse:function(d){var i=S.parse(d);return g.create({ciphertext:i})}}}(),P.format.Hex})},bT9E:function(W,q,D){"use strict";D.d(q,"a",function(){return v});var P=D("VTBJ");function v(C,N){var g=Object(P.a)({},C);return Array.isArray(N)&&N.forEach(function(m){delete g[m]}),g}},biw7:function(W,q,D){"use strict";var P=D("q1tI"),v=D.n(P),C=P.createContext(null);q.a=C},c5Ni:function(W,q,D){},cv67:function(W,q,D){(function(P,v){W.exports=q=v(D("Ib8C"))})(this,function(P){return function(v){var C=P,N=C.lib,g=N.WordArray,m=N.Hasher,S=C.algo,_=[];(function(){for(var n=0;n<64;n++)_[n]=v.abs(v.sin(n+1))*4294967296|0})();var t=S.MD5=m.extend({_doReset:function(){this._hash=new g.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(n,s){for(var h=0;h<16;h++){var f=s+h,l=n[f];n[f]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360}var a=this._hash.words,r=n[s+0],x=n[s+1],y=n[s+2],p=n[s+3],R=n[s+4],O=n[s+5],b=n[s+6],E=n[s+7],w=n[s+8],T=n[s+9],F=n[s+10],M=n[s+11],L=n[s+12],Y=n[s+13],K=n[s+14],A=n[s+15],H=a[0],U=a[1],I=a[2],G=a[3];H=d(H,U,I,G,r,7,_[0]),G=d(G,H,U,I,x,12,_[1]),I=d(I,G,H,U,y,17,_[2]),U=d(U,I,G,H,p,22,_[3]),H=d(H,U,I,G,R,7,_[4]),G=d(G,H,U,I,O,12,_[5]),I=d(I,G,H,U,b,17,_[6]),U=d(U,I,G,H,E,22,_[7]),H=d(H,U,I,G,w,7,_[8]),G=d(G,H,U,I,T,12,_[9]),I=d(I,G,H,U,F,17,_[10]),U=d(U,I,G,H,M,22,_[11]),H=d(H,U,I,G,L,7,_[12]),G=d(G,H,U,I,Y,12,_[13]),I=d(I,G,H,U,K,17,_[14]),U=d(U,I,G,H,A,22,_[15]),H=i(H,U,I,G,x,5,_[16]),G=i(G,H,U,I,b,9,_[17]),I=i(I,G,H,U,M,14,_[18]),U=i(U,I,G,H,r,20,_[19]),H=i(H,U,I,G,O,5,_[20]),G=i(G,H,U,I,F,9,_[21]),I=i(I,G,H,U,A,14,_[22]),U=i(U,I,G,H,R,20,_[23]),H=i(H,U,I,G,T,5,_[24]),G=i(G,H,U,I,K,9,_[25]),I=i(I,G,H,U,p,14,_[26]),U=i(U,I,G,H,w,20,_[27]),H=i(H,U,I,G,Y,5,_[28]),G=i(G,H,U,I,y,9,_[29]),I=i(I,G,H,U,E,14,_[30]),U=i(U,I,G,H,L,20,_[31]),H=c(H,U,I,G,O,4,_[32]),G=c(G,H,U,I,w,11,_[33]),I=c(I,G,H,U,M,16,_[34]),U=c(U,I,G,H,K,23,_[35]),H=c(H,U,I,G,x,4,_[36]),G=c(G,H,U,I,R,11,_[37]),I=c(I,G,H,U,E,16,_[38]),U=c(U,I,G,H,F,23,_[39]),H=c(H,U,I,G,Y,4,_[40]),G=c(G,H,U,I,r,11,_[41]),I=c(I,G,H,U,p,16,_[42]),U=c(U,I,G,H,b,23,_[43]),H=c(H,U,I,G,T,4,_[44]),G=c(G,H,U,I,L,11,_[45]),I=c(I,G,H,U,A,16,_[46]),U=c(U,I,G,H,y,23,_[47]),H=o(H,U,I,G,r,6,_[48]),G=o(G,H,U,I,E,10,_[49]),I=o(I,G,H,U,K,15,_[50]),U=o(U,I,G,H,O,21,_[51]),H=o(H,U,I,G,L,6,_[52]),G=o(G,H,U,I,p,10,_[53]),I=o(I,G,H,U,F,15,_[54]),U=o(U,I,G,H,x,21,_[55]),H=o(H,U,I,G,w,6,_[56]),G=o(G,H,U,I,A,10,_[57]),I=o(I,G,H,U,b,15,_[58]),U=o(U,I,G,H,Y,21,_[59]),H=o(H,U,I,G,R,6,_[60]),G=o(G,H,U,I,M,10,_[61]),I=o(I,G,H,U,y,15,_[62]),U=o(U,I,G,H,T,21,_[63]),a[0]=a[0]+H|0,a[1]=a[1]+U|0,a[2]=a[2]+I|0,a[3]=a[3]+G|0},_doFinalize:function(){var n=this._data,s=n.words,h=this._nDataBytes*8,f=n.sigBytes*8;s[f>>>5]|=128<<24-f%32;var l=v.floor(h/4294967296),a=h;s[(f+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,s[(f+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,n.sigBytes=(s.length+1)*4,this._process();for(var r=this._hash,x=r.words,y=0;y<4;y++){var p=x[y];x[y]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360}return r},clone:function(){var n=m.clone.call(this);return n._hash=this._hash.clone(),n}});function d(n,s,h,f,l,a,r){var x=n+(s&h|~s&f)+l+r;return(x<<a|x>>>32-a)+s}function i(n,s,h,f,l,a,r){var x=n+(s&f|h&~f)+l+r;return(x<<a|x>>>32-a)+s}function c(n,s,h,f,l,a,r){var x=n+(s^h^f)+l+r;return(x<<a|x>>>32-a)+s}function o(n,s,h,f,l,a,r){var x=n+(h^(s|~f))+l+r;return(x<<a|x>>>32-a)+s}C.MD5=m._createHelper(t),C.HmacMD5=m._createHmacHelper(t)}(Math),P.MD5})},dejd:function(W,q,D){},dmUQ:function(W,q,D){"use strict";var P=D("Ff2n"),v=D("rePB"),C=D("1OyB"),N=D("vuIU"),g=D("Ji7U"),m=D("md7G"),S=D("foSv"),_=D("q1tI"),t=D.n(_),d=D("TSYQ"),i=D.n(d),c=D("4IlW");function o(w,T){var F=Object.keys(w);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(w);T&&(M=M.filter(function(L){return Object.getOwnPropertyDescriptor(w,L).enumerable})),F.push.apply(F,M)}return F}function n(w){for(var T=1;T<arguments.length;T++){var F=arguments[T]!=null?arguments[T]:{};T%2?o(Object(F),!0).forEach(function(M){Object(v.a)(w,M,F[M])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(F)):o(Object(F)).forEach(function(M){Object.defineProperty(w,M,Object.getOwnPropertyDescriptor(F,M))})}return w}function s(w){var T=h();return function(){var M=Object(S.a)(w),L;if(T){var Y=Object(S.a)(this).constructor;L=Reflect.construct(M,arguments,Y)}else L=M.apply(this,arguments);return Object(m.a)(this,L)}}function h(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(w){return!1}}function f(){}function l(w){w.preventDefault()}var a=function(T){return T.replace(/[^\w.-]+/g,"")},r=200,x=600,y=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,p=function(T){return T!=null},R=function(T,F){return F===T||typeof F=="number"&&typeof T=="number"&&isNaN(F)&&isNaN(T)},O=function(w){Object(g.a)(F,w);var T=s(F);function F(M){var L;Object(C.a)(this,F),L=T.call(this,M),L.onKeyDown=function(A){var H=L.props,U=H.onKeyDown,I=H.onPressEnter;if(A.keyCode===c.a.UP){var G=L.getRatio(A);L.up(A,G,null),L.stop()}else if(A.keyCode===c.a.DOWN){var ne=L.getRatio(A);L.down(A,ne,null),L.stop()}else A.keyCode===c.a.ENTER&&I&&I(A);if(L.recordCursorPosition(),L.lastKeyCode=A.keyCode,U){for(var oe=arguments.length,de=new Array(oe>1?oe-1:0),Oe=1;Oe<oe;Oe++)de[Oe-1]=arguments[Oe];U.apply(void 0,[A].concat(de))}},L.onKeyUp=function(A){var H=L.props.onKeyUp;if(L.stop(),L.recordCursorPosition(),H){for(var U=arguments.length,I=new Array(U>1?U-1:0),G=1;G<U;G++)I[G-1]=arguments[G];H.apply(void 0,[A].concat(I))}},L.onChange=function(A){var H=L.props.onChange;L.state.focused&&(L.inputting=!0),L.rawInput=L.props.parser(L.getValueFromEvent(A)),L.setState({inputValue:L.rawInput}),H(L.toNumber(L.rawInput))},L.onMouseUp=function(){var A=L.props.onMouseUp;L.recordCursorPosition(),A&&A.apply(void 0,arguments)},L.onFocus=function(){var A;L.setState({focused:!0}),(A=L.props).onFocus.apply(A,arguments)},L.onBlur=function(){var A=L.props.onBlur;L.inputting=!1,L.setState({focused:!1});var H=L.getCurrentValidValue(L.state.inputValue),U=L.setValue(H,f);if(A){var I=L.input.value,G=L.getInputDisplayValue({focus:!1,value:U});L.input.value=G&&Number(G),A.apply(void 0,arguments),L.input.value=I}},L.getRatio=function(A){var H=1;return A.metaKey||A.ctrlKey?H=.1:A.shiftKey&&(H=10),H},L.getFullNum=function(A){return isNaN(A)?A:/e/i.test(String(A))?Number(A).toFixed(18).replace(/\.?0+$/,""):A},L.getPrecision=function(A){if(p(L.props.precision))return L.props.precision;var H=String(A);if(H.indexOf("e-")>=0)return parseInt(H.slice(H.indexOf("e-")+2),10);var U=0;return H.indexOf(".")>=0&&(U=H.length-H.indexOf(".")-1),U},L.getInputDisplayValue=function(A){var H=A||L.state,U=H.focused,I=H.inputValue,G=H.value,ne;U?ne=I:ne=L.toPrecisionAsStep(G),ne==null&&(ne="");var oe=L.formatWrapper(ne);return p(L.props.decimalSeparator)&&(oe=oe.toString().replace(".",L.props.decimalSeparator)),oe},L.recordCursorPosition=function(){try{L.cursorStart=L.input.selectionStart,L.cursorEnd=L.input.selectionEnd,L.currentValue=L.input.value,L.cursorBefore=L.input.value.substring(0,L.cursorStart),L.cursorAfter=L.input.value.substring(L.cursorEnd)}catch(A){}},L.restoreByAfter=function(A){if(A===void 0)return!1;var H=L.input.value,U=H.lastIndexOf(A);if(U===-1)return!1;var I=L.cursorBefore.length;return L.lastKeyCode===c.a.DELETE&&L.cursorBefore.charAt(I-1)===A[0]?(L.fixCaret(I,I),!0):U+A.length===H.length?(L.fixCaret(U,U),!0):!1},L.partRestoreByAfter=function(A){return A===void 0?!1:Array.prototype.some.call(A,function(H,U){var I=A.substring(U);return L.restoreByAfter(I)})},L.isNotCompleteNumber=function(A){return isNaN(A)||A===""||A===null||A&&A.toString().indexOf(".")===A.toString().length-1},L.stop=function(){L.autoStepTimer&&clearTimeout(L.autoStepTimer)},L.down=function(A,H,U){L.pressingUpOrDown=!0,L.step("down",A,H,U)},L.up=function(A,H,U){L.pressingUpOrDown=!0,L.step("up",A,H,U)},L.saveInput=function(A){L.input=A};var Y=M.value;Y===void 0&&(Y=M.defaultValue),L.state={focused:M.autoFocus};var K=L.getValidValue(L.toNumber(Y));return L.state=n(n({},L.state),{},{inputValue:L.toPrecisionAsStep(K),value:K}),L}return Object(N.a)(F,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(L){var Y=this.props,K=Y.value,A=Y.onChange,H=Y.max,U=Y.min,I=this.state.focused;if(L){if(!R(L.value,K)||!R(L.max,H)||!R(L.min,U)){var G=I?K:this.getValidValue(K),ne;this.pressingUpOrDown?ne=G:this.inputting?ne=this.rawInput:ne=this.toPrecisionAsStep(G),this.setState({value:G,inputValue:ne})}var oe="value"in this.props?K:this.state.value;"max"in this.props&&L.max!==H&&typeof oe=="number"&&oe>H&&A&&A(H),"min"in this.props&&L.min!==U&&typeof oe=="number"&&oe<U&&A&&A(U)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var de=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===c.a.BACKSPACE?de=this.cursorStart-1:this.lastKeyCode===c.a.DELETE&&(de=this.cursorStart):de=this.input.value.length,this.fixCaret(de,de)}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(Oe){}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(L){var Y=L;return Y===""?Y="":this.isNotCompleteNumber(parseFloat(Y))?Y=this.state.value:Y=this.getValidValue(Y),this.toNumber(Y)}},{key:"getValueFromEvent",value:function(L){var Y=L.target.value.trim().replace(/。/g,".");return p(this.props.decimalSeparator)&&(Y=Y.replace(this.props.decimalSeparator,".")),Y}},{key:"getValidValue",value:function(L){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,A=parseFloat(L);return isNaN(A)?L:(A<Y&&(A=Y),A>K&&(A=K),A)}},{key:"setValue",value:function(L,Y){var K=this.props.precision,A=this.isNotCompleteNumber(parseFloat(L))?null:parseFloat(L),H=this.state.value,U=H===void 0?null:H,I=this.state.inputValue,G=I===void 0?null:I,ne=typeof A=="number"?A.toFixed(K):"".concat(A),oe=A!==U||ne!=="".concat(G);return"value"in this.props?(G=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:G},Y)):this.setState({value:A,inputValue:this.toPrecisionAsStep(L)},Y),oe&&this.props.onChange(A),A}},{key:"getMaxPrecision",value:function(L){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.props,A=K.precision,H=K.step;if(p(A))return A;var U=this.getPrecision(Y),I=this.getPrecision(H),G=this.getPrecision(L);return L?Math.max(G,U+I):U+I}},{key:"getPrecisionFactor",value:function(L){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.getMaxPrecision(L,Y);return Math.pow(10,K)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(L){return this.props.formatter?this.props.formatter(L):L}},{key:"toPrecisionAsStep",value:function(L){if(this.isNotCompleteNumber(L)||L==="")return L;var Y=Math.abs(this.getMaxPrecision(L));return isNaN(Y)?L.toString():Number(L).toFixed(Y)}},{key:"toNumber",value:function(L){var Y=this.props.precision,K=this.state.focused,A=L&&L.length>16&&K;return this.isNotCompleteNumber(L)||A?L:p(Y)?Math.round(L*Math.pow(10,Y))/Math.pow(10,Y):Number(L)}},{key:"upStep",value:function(L,Y){var K=this.props.step,A=this.getPrecisionFactor(L,Y),H=Math.abs(this.getMaxPrecision(L,Y)),U=((A*L+A*K*Y)/A).toFixed(H);return this.toNumber(U)}},{key:"downStep",value:function(L,Y){var K=this.props.step,A=this.getPrecisionFactor(L,Y),H=Math.abs(this.getMaxPrecision(L,Y)),U=((A*L-A*K*Y)/A).toFixed(H);return this.toNumber(U)}},{key:"step",value:function(L,Y){var K=this,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,H=arguments.length>3?arguments[3]:void 0;this.stop(),Y&&(Y.persist(),Y.preventDefault());var U=this.props;if(U.disabled)return;var I=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(I))return;var G=this["".concat(L,"Step")](I,A),ne=G>U.max||G<U.min;if(G>U.max?G=U.max:G<U.min&&(G=U.min),this.setValue(G,null),this.setState({focused:!0},function(){K.pressingUpOrDown=!1}),ne)return;this.autoStepTimer=setTimeout(function(){K[L](Y,A,!0)},H?r:x)}},{key:"fixCaret",value:function(L,Y){if(L===void 0||Y===void 0||!this.input||!this.input.value)return;try{var K=this.input.selectionStart,A=this.input.selectionEnd;(L!==K||Y!==A)&&this.input.setSelectionRange(L,Y)}catch(H){}}},{key:"render",value:function(){var L,Y=this.props,K=Y.prefixCls,A=Y.disabled,H=Y.readOnly,U=Y.useTouch,I=Y.autoComplete,G=Y.upHandler,ne=Y.downHandler,oe=Y.className,de=Y.max,Oe=Y.min,Ae=Y.style,pe=Y.title,Se=Y.onMouseEnter,be=Y.onMouseLeave,se=Y.onMouseOver,ee=Y.onMouseOut,B=Y.required,V=Y.onClick,X=Y.tabIndex,Q=Y.type,Z=Y.placeholder,ie=Y.id,re=Y.inputMode,$=Y.pattern,J=Y.step,le=Y.maxLength,ue=Y.autoFocus,xe=Y.name,Me=Y.onPaste,Xe=Y.onInput,$e=Object(P.a)(Y,["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"]),Je=this.state,rt=Je.value,it=Je.focused,je=i()(K,(L={},Object(v.a)(L,oe,!!oe),Object(v.a)(L,"".concat(K,"-disabled"),A),Object(v.a)(L,"".concat(K,"-focused"),it),L)),Ie={};Object.keys($e).forEach(function(De){(De.substr(0,5)==="data-"||De.substr(0,5)==="aria-"||De==="role")&&(Ie[De]=$e[De])});var qe=!H&&!A,st=this.getInputDisplayValue(null),Ee=(rt||rt===0)&&(isNaN(rt)||Number(rt)>=de),ce=(rt||rt===0)&&(isNaN(rt)||Number(rt)<=Oe),fe=Ee||A||H,ve=ce||A||H,Ce=i()("".concat(K,"-handler"),"".concat(K,"-handler-up"),Object(v.a)({},"".concat(K,"-handler-up-disabled"),fe)),ge=i()("".concat(K,"-handler"),"".concat(K,"-handler-down"),Object(v.a)({},"".concat(K,"-handler-down-disabled"),ve)),ye=U?{onTouchStart:fe?f:this.up,onTouchEnd:this.stop}:{onMouseDown:fe?f:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Re=U?{onTouchStart:ve?f:this.down,onTouchEnd:this.stop}:{onMouseDown:ve?f:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return t.a.createElement("div",{className:je,style:Ae,title:pe,onMouseEnter:Se,onMouseLeave:be,onMouseOver:se,onMouseOut:ee,onFocus:function(){return null},onBlur:function(){return null}},t.a.createElement("div",{className:"".concat(K,"-handler-wrap")},t.a.createElement("span",Object.assign({unselectable:"on"},ye,{role:"button","aria-label":"Increase Value","aria-disabled":fe,className:Ce}),G||t.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-up-inner"),onClick:l})),t.a.createElement("span",Object.assign({unselectable:"on"},Re,{role:"button","aria-label":"Decrease Value","aria-disabled":ve,className:ge}),ne||t.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-down-inner"),onClick:l}))),t.a.createElement("div",{className:"".concat(K,"-input-wrap")},t.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Oe,"aria-valuemax":de,"aria-valuenow":rt,required:B,type:Q,placeholder:Z,onPaste:Me,onClick:V,onMouseUp:this.onMouseUp,className:"".concat(K,"-input"),tabIndex:X,autoComplete:I,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:qe?this.onKeyDown:f,onKeyUp:qe?this.onKeyUp:f,autoFocus:ue,maxLength:le,readOnly:H,disabled:A,max:de,min:Oe,step:J,name:xe,title:pe,id:ie,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(st),pattern:$,inputMode:re,onInput:Xe},Ie))))}}]),F}(t.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:y,min:-y,step:1,style:{},onChange:f,onKeyDown:f,onPressEnter:f,onFocus:f,onBlur:f,parser:a,required:!1,autoComplete:"off"};var b=O,E=q.a=b},e7zE:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("3y9D"),D("WYAk"))})(this,function(P){return function(){var v=P,C=v.lib,N=C.Base,g=C.WordArray,m=v.algo,S=m.SHA1,_=m.HMAC,t=m.PBKDF2=N.extend({cfg:N.extend({keySize:128/32,hasher:S,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,i){for(var c=this.cfg,o=_.create(c.hasher,d),n=g.create(),s=g.create([1]),h=n.words,f=s.words,l=c.keySize,a=c.iterations;h.length<l;){var r=o.update(i).finalize(s);o.reset();for(var x=r.words,y=x.length,p=r,R=1;R<a;R++){p=o.finalize(p),o.reset();for(var O=p.words,b=0;b<y;b++)x[b]^=O[b]}n.concat(r),f[0]++}return n.sigBytes=l*4,n}});v.PBKDF2=function(d,i,c){return t.create(c).compute(d,i)}}(),P.PBKDF2})},fjLI:function(W,q,D){"use strict";D.d(q,"f",function(){return o}),D.d(q,"b",function(){return n}),D.d(q,"a",function(){return s}),D.d(q,"d",function(){return h}),D.d(q,"e",function(){return f}),D.d(q,"c",function(){return l});var P=D("8HAY"),v=D("Vhoy"),C=D("MI8n"),N=D("JYp7"),g=D("pmY6"),m=D("24hK"),S=D("nnTU"),_=D("T8No"),t=D("Cg/j"),d=D("t9D7"),i=function(a,r,x,y){var p=arguments.length,R=p<3?r:y===null?y=Object.getOwnPropertyDescriptor(r,x):y,O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(a,r,x,y);else for(var b=a.length-1;b>=0;b--)(O=a[b])&&(R=(p<3?O(R):p>3?O(r,x,R):O(r,x))||R);return p>3&&R&&Object.defineProperty(r,x,R),R},c=function(a,r){return function(x,y){r(x,y,a)}};function o(a){return a.command!==void 0}class n{constructor(a){this.id=n._idPool++,this._debugName=a}}n._idPool=0,n.CommandPalette=new n("CommandPalette"),n.EditorContext=new n("EditorContext"),n.SimpleEditorContext=new n("SimpleEditorContext"),n.EditorContextCopy=new n("EditorContextCopy"),n.EditorContextPeek=new n("EditorContextPeek"),n.MenubarEditMenu=new n("MenubarEditMenu"),n.MenubarCopy=new n("MenubarCopy"),n.MenubarGoMenu=new n("MenubarGoMenu"),n.MenubarSelectionMenu=new n("MenubarSelectionMenu"),n.InlineCompletionsActions=new n("InlineCompletionsActions");const s=Object(t.c)("menuService"),h=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new C.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:a=>a===n.CommandPalette}}addCommand(a){return this.addCommands(N.a.single(a))}addCommands(a){for(const r of a)this._commands.set(r.id,r);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(g.i)(()=>{let r=!1;for(const x of a)r=this._commands.delete(x.id)||r;r&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(a){return this._commands.get(a)}getCommands(){const a=new Map;return this._commands.forEach((r,x)=>a.set(x,r)),a}appendMenuItem(a,r){return this.appendMenuItems(N.a.single({id:a,item:r}))}appendMenuItems(a){const r=new Set,x=new m.a;for(const{id:y,item:p}of a){let R=this._menuItems.get(y);R||(R=new m.a,this._menuItems.set(y,R)),x.push(R.push(p)),r.add(y)}return this._onDidChangeMenu.fire(r),Object(g.i)(()=>{if(x.size>0){for(let y of x)y();this._onDidChangeMenu.fire(r),x.clear()}})}getMenuItems(a){let r;return this._menuItems.has(a)?r=[...this._menuItems.get(a)]:r=[],a===n.CommandPalette&&this._appendImplicitItems(r),r}_appendImplicitItems(a){const r=new Set;for(const x of a)o(x)&&(r.add(x.command.id),x.alt&&r.add(x.alt.id));this._commands.forEach((x,y)=>{r.has(y)||a.push({command:x})})}};class f extends P.e{constructor(a,r,x,y){super(`submenuitem.${a.submenu.id}`,typeof a.title=="string"?a.title:a.title.value,[],"submenu");this.item=a,this._menuService=r,this._contextKeyService=x,this._options=y}get actions(){const a=[],r=this._menuService.createMenu(this.item.submenu,this._contextKeyService),x=r.getActions(this._options);r.dispose();for(const[,y]of x)y.length>0&&(a.push(...y),a.push(new P.d));return a.length&&a.pop(),a}}let l=class a{constructor(r,x,y,p,R){var O,b;if(this._commandService=R,this.id=r.id,this.label=(y==null?void 0:y.renderShortTitle)&&r.shortTitle?typeof r.shortTitle=="string"?r.shortTitle:r.shortTitle.value:typeof r.title=="string"?r.title:r.title.value,this.tooltip=(b=typeof r.tooltip=="string"?r.tooltip:(O=r.tooltip)===null||O===void 0?void 0:O.value)!==null&&b!==void 0?b:"",this.enabled=!r.precondition||p.contextMatchesRules(r.precondition),this.checked=void 0,r.toggled){const E=r.toggled.condition?r.toggled:{condition:r.toggled};this.checked=p.contextMatchesRules(E.condition),this.checked&&E.tooltip&&(this.tooltip=typeof E.tooltip=="string"?E.tooltip:E.tooltip.value),E.title&&(this.label=typeof E.title=="string"?E.title:E.title.value)}this.item=r,this.alt=x?new a(x,void 0,y,p,R):void 0,this._options=y,d.d.isThemeIcon(r.icon)&&(this.class=v.a.asClassName(r.icon))}dispose(){}run(...r){var x,y;let p=[];return((x=this._options)===null||x===void 0?void 0:x.arg)&&(p=[...p,this._options.arg]),((y=this._options)===null||y===void 0?void 0:y.shouldForwardArgs)&&(p=[...p,...r]),this._commandService.executeCommand(this.id,...p)}};l=i([c(3,_.b),c(4,S.b)],l)},fyJ8:function(W,q,D){"use strict";var P=D("rePB"),v=D("VTBJ"),C=D("Ff2n"),N=D("U8pU"),g=D("q1tI"),m=D.n(g),S=D("TSYQ"),_=D.n(S),t=D("c+Xe"),d=D("sR1s");function i(h){return h&&Object(N.a)(h)==="object"&&!Array.isArray(h)&&!g.isValidElement(h)}function c(h){return typeof h=="string"?!0:Object(t.c)(h)}function o(h,f){var l,a=h.prefixCls,r=h.className,x=h.record,y=h.index,p=h.dataIndex,R=h.render,O=h.children,b=h.component,E=b===void 0?"td":b,w=h.colSpan,T=h.rowSpan,F=h.fixLeft,M=h.fixRight,L=h.firstFixLeft,Y=h.lastFixLeft,K=h.firstFixRight,A=h.lastFixRight,H=h.appendNode,U=h.additionalProps,I=U===void 0?{}:U,G=h.ellipsis,ne=h.align,oe=h.rowType,de=h.isSticky,Oe="".concat(a,"-cell"),Ae,pe;if(O)pe=O;else{var Se=Object(d.b)(x,p);if(pe=Se,R){var be=R(Se,x,y);i(be)?(pe=be.children,Ae=be.props):pe=be}}Object(N.a)(pe)==="object"&&!Array.isArray(pe)&&!g.isValidElement(pe)&&(pe=null),G&&(Y||K)&&(pe=g.createElement("span",{className:"".concat(Oe,"-content")},pe));var se=Ae||{},ee=se.colSpan,B=se.rowSpan,V=se.style,X=se.className,Q=Object(C.a)(se,["colSpan","rowSpan","style","className"]),Z=ee!==void 0?ee:w,ie=B!==void 0?B:T;if(Z===0||ie===0)return null;var re={},$=typeof F=="number",J=typeof M=="number";$&&(re.position="sticky",re.left=F),J&&(re.position="sticky",re.right=M);var le={};ne&&(le.textAlign=ne);var ue,xe=G===!0?{showTitle:!0}:G;xe&&(xe.showTitle||oe==="header")&&(typeof pe=="string"||typeof pe=="number"?ue=pe.toString():g.isValidElement(pe)&&typeof pe.props.children=="string"&&(ue=pe.props.children));var Me=Object(v.a)(Object(v.a)(Object(v.a)({title:ue},Q),I),{},{colSpan:Z&&Z!==1?Z:null,rowSpan:ie&&ie!==1?ie:null,className:_()(Oe,r,(l={},Object(P.a)(l,"".concat(Oe,"-fix-left"),$),Object(P.a)(l,"".concat(Oe,"-fix-left-first"),L),Object(P.a)(l,"".concat(Oe,"-fix-left-last"),Y),Object(P.a)(l,"".concat(Oe,"-fix-right"),J),Object(P.a)(l,"".concat(Oe,"-fix-right-first"),K),Object(P.a)(l,"".concat(Oe,"-fix-right-last"),A),Object(P.a)(l,"".concat(Oe,"-ellipsis"),G),Object(P.a)(l,"".concat(Oe,"-with-append"),H),Object(P.a)(l,"".concat(Oe,"-fix-sticky"),($||J)&&de),l),I.className,X),style:Object(v.a)(Object(v.a)(Object(v.a)(Object(v.a)({},I.style),le),re),V),ref:c(E)?f:null});return g.createElement(E,Object.assign({},Me),H,pe)}var n=g.forwardRef(o);n.displayName="Cell";var s=g.memo(n,function(h,f){return f.shouldCellUpdate?!f.shouldCellUpdate(f.record,h.record):!1});q.a=s},gJ3r:function(W,q,D){"use strict";D.d(q,"a",function(){return P});var P=[{value:"\u5317\u4EAC",label:"\u5317\u4EAC",children:[{value:"\u4E1C\u57CE",label:"\u4E1C\u57CE"},{value:"\u897F\u57CE",label:"\u897F\u57CE"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u4E30\u53F0",label:"\u4E30\u53F0"},{value:"\u77F3\u666F\u5C71",label:"\u77F3\u666F\u5C71"},{value:"\u6D77\u6DC0",label:"\u6D77\u6DC0"},{value:"\u95E8\u5934\u6C9F",label:"\u95E8\u5934\u6C9F"},{value:"\u623F\u5C71",label:"\u623F\u5C71"},{value:"\u901A\u5DDE",label:"\u901A\u5DDE"},{value:"\u987A\u4E49",label:"\u987A\u4E49"},{value:"\u660C\u5E73",label:"\u660C\u5E73"},{value:"\u5927\u5174",label:"\u5927\u5174"},{value:"\u5E73\u8C37",label:"\u5E73\u8C37"},{value:"\u6000\u67D4",label:"\u6000\u67D4"},{value:"\u5BC6\u4E91",label:"\u5BC6\u4E91"},{value:"\u5EF6\u5E86",label:"\u5EF6\u5E86"}]},{value:"\u4E0A\u6D77",label:"\u4E0A\u6D77",children:[{value:"\u5D07\u660E",label:"\u5D07\u660E"},{value:"\u9EC4\u6D66",label:"\u9EC4\u6D66"},{value:"\u5362\u6E7E",label:"\u5362\u6E7E"},{value:"\u5F90\u6C47",label:"\u5F90\u6C47"},{value:"\u957F\u5B81",label:"\u957F\u5B81"},{value:"\u9759\u5B89",label:"\u9759\u5B89"},{value:"\u666E\u9640",label:"\u666E\u9640"},{value:"\u95F8\u5317",label:"\u95F8\u5317"},{value:"\u8679\u53E3",label:"\u8679\u53E3"},{value:"\u6768\u6D66",label:"\u6768\u6D66"},{value:"\u95F5\u884C",label:"\u95F5\u884C"},{value:"\u5B9D\u5C71",label:"\u5B9D\u5C71"},{value:"\u5609\u5B9A",label:"\u5609\u5B9A"},{value:"\u6D66\u4E1C",label:"\u6D66\u4E1C"},{value:"\u91D1\u5C71",label:"\u91D1\u5C71"},{value:"\u677E\u6C5F",label:"\u677E\u6C5F"},{value:"\u9752\u6D66",label:"\u9752\u6D66"},{value:"\u5357\u6C47",label:"\u5357\u6C47"},{value:"\u5949\u8D24",label:"\u5949\u8D24"}]},{value:"\u5E7F\u4E1C",label:"\u5E7F\u4E1C",children:[{value:"\u5E7F\u5DDE",label:"\u5E7F\u5DDE"},{value:"\u6DF1\u5733",label:"\u6DF1\u5733"},{value:"\u73E0\u6D77",label:"\u73E0\u6D77"},{value:"\u4E1C\u839E",label:"\u4E1C\u839E"},{value:"\u4E2D\u5C71",label:"\u4E2D\u5C71"},{value:"\u4F5B\u5C71",label:"\u4F5B\u5C71"},{value:"\u60E0\u5DDE",label:"\u60E0\u5DDE"},{value:"\u6CB3\u6E90",label:"\u6CB3\u6E90"},{value:"\u6F6E\u5DDE",label:"\u6F6E\u5DDE"},{value:"\u6C5F\u95E8",label:"\u6C5F\u95E8"},{value:"\u63ED\u9633",label:"\u63ED\u9633"},{value:"\u8302\u540D",label:"\u8302\u540D"},{value:"\u6885\u5DDE",label:"\u6885\u5DDE"},{value:"\u6E05\u8FDC",label:"\u6E05\u8FDC"},{value:"\u6C55\u5934",label:"\u6C55\u5934"},{value:"\u6C55\u5C3E",label:"\u6C55\u5C3E"},{value:"\u97F6\u5173",label:"\u97F6\u5173"},{value:"\u987A\u5FB7",label:"\u987A\u5FB7"},{value:"\u9633\u6C5F",label:"\u9633\u6C5F"},{value:"\u4E91\u6D6E",label:"\u4E91\u6D6E"},{value:"\u6E5B\u6C5F",label:"\u6E5B\u6C5F"},{value:"\u8087\u5E86",label:"\u8087\u5E86"}]},{value:"\u6C5F\u82CF",label:"\u6C5F\u82CF",children:[{value:"\u5357\u4EAC",label:"\u5357\u4EAC"},{value:"\u5E38\u719F",label:"\u5E38\u719F"},{value:"\u5E38\u5DDE",label:"\u5E38\u5DDE"},{value:"\u6D77\u95E8",label:"\u6D77\u95E8"},{value:"\u6DEE\u5B89",label:"\u6DEE\u5B89"},{value:"\u6C5F\u90FD",label:"\u6C5F\u90FD"},{value:"\u6C5F\u9634",label:"\u6C5F\u9634"},{value:"\u6606\u5C71",label:"\u6606\u5C71"},{value:"\u8FDE\u4E91\u6E2F",label:"\u8FDE\u4E91\u6E2F"},{value:"\u5357\u901A",label:"\u5357\u901A"},{value:"\u542F\u4E1C",label:"\u542F\u4E1C"},{value:"\u6CAD\u9633",label:"\u6CAD\u9633"},{value:"\u5BBF\u8FC1",label:"\u5BBF\u8FC1"},{value:"\u82CF\u5DDE",label:"\u82CF\u5DDE"},{value:"\u592A\u4ED3",label:"\u592A\u4ED3"},{value:"\u6CF0\u5DDE",label:"\u6CF0\u5DDE"},{value:"\u540C\u91CC",label:"\u540C\u91CC"},{value:"\u65E0\u9521",label:"\u65E0\u9521"},{value:"\u5F90\u5DDE",label:"\u5F90\u5DDE"},{value:"\u76D0\u57CE",label:"\u76D0\u57CE"},{value:"\u626C\u5DDE",label:"\u626C\u5DDE"},{value:"\u5B9C\u5174",label:"\u5B9C\u5174"},{value:"\u4EEA\u5F81",label:"\u4EEA\u5F81"},{value:"\u5F20\u5BB6\u6E2F",label:"\u5F20\u5BB6\u6E2F"},{value:"\u9547\u6C5F",label:"\u9547\u6C5F"}]},{value:"\u91CD\u5E86",label:"\u91CD\u5E86",children:[{value:"\u4E07\u5DDE",label:"\u4E07\u5DDE"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u6E1D\u4E2D",label:"\u6E1D\u4E2D"},{value:"\u5927\u6E21\u53E3",label:"\u5927\u6E21\u53E3"},{value:"\u6C5F\u5317",label:"\u6C5F\u5317"},{value:"\u6C99\u576A\u575D",label:"\u6C99\u576A\u575D"},{value:"\u4E5D\u9F99\u5761",label:"\u4E5D\u9F99\u5761"},{value:"\u5357\u5CB8",label:"\u5357\u5CB8"},{value:"\u5317\u789A",label:"\u5317\u789A"},{value:"\u4E07\u76DB",label:"\u4E07\u76DB"},{value:"\u53CC\u6322",label:"\u53CC\u6322"},{value:"\u6E1D\u5317",label:"\u6E1D\u5317"},{value:"\u5DF4\u5357",label:"\u5DF4\u5357"},{value:"\u9ED4\u6C5F",label:"\u9ED4\u6C5F"},{value:"\u957F\u5BFF",label:"\u957F\u5BFF"},{value:"\u7DA6\u6C5F",label:"\u7DA6\u6C5F"},{value:"\u6F7C\u5357",label:"\u6F7C\u5357"},{value:"\u94DC\u6881",label:"\u94DC\u6881"},{value:"\u5927\u8DB3",label:"\u5927\u8DB3"},{value:"\u8363\u660C",label:"\u8363\u660C"},{value:"\u58C1\u5C71",label:"\u58C1\u5C71"},{value:"\u6881\u5E73",label:"\u6881\u5E73"},{value:"\u57CE\u53E3",label:"\u57CE\u53E3"},{value:"\u4E30\u90FD",label:"\u4E30\u90FD"},{value:"\u57AB\u6C5F",label:"\u57AB\u6C5F"},{value:"\u6B66\u9686",label:"\u6B66\u9686"},{value:"\u5FE0\u53BF",label:"\u5FE0\u53BF"},{value:"\u5F00\u53BF",label:"\u5F00\u53BF"},{value:"\u4E91\u9633",label:"\u4E91\u9633"},{value:"\u5949\u8282",label:"\u5949\u8282"},{value:"\u5DEB\u5C71",label:"\u5DEB\u5C71"},{value:"\u5DEB\u6EAA",label:"\u5DEB\u6EAA"},{value:"\u77F3\u67F1",label:"\u77F3\u67F1"},{value:"\u79C0\u5C71",label:"\u79C0\u5C71"},{value:"\u9149\u9633",label:"\u9149\u9633"},{value:"\u5F6D\u6C34",label:"\u5F6D\u6C34"},{value:"\u6C5F\u6D25",label:"\u6C5F\u6D25"},{value:"\u5408\u5DDD",label:"\u5408\u5DDD"},{value:"\u6C38\u5DDD",label:"\u6C38\u5DDD"},{value:"\u5357\u5DDD",label:"\u5357\u5DDD"}]},{value:"\u5B89\u5FBD",label:"\u5B89\u5FBD",children:[{value:"\u5408\u80A5",label:"\u5408\u80A5"},{value:"\u5B89\u5E86",label:"\u5B89\u5E86"},{value:"\u868C\u57E0",label:"\u868C\u57E0"},{value:"\u4EB3\u5DDE",label:"\u4EB3\u5DDE"},{value:"\u5DE2\u6E56",label:"\u5DE2\u6E56"},{value:"\u6EC1\u5DDE",label:"\u6EC1\u5DDE"},{value:"\u961C\u9633",label:"\u961C\u9633"},{value:"\u8D35\u6C60",label:"\u8D35\u6C60"},{value:"\u6DEE\u5317",label:"\u6DEE\u5317"},{value:"\u6DEE\u5316",label:"\u6DEE\u5316"},{value:"\u6DEE\u5357",label:"\u6DEE\u5357"},{value:"\u9EC4\u5C71",label:"\u9EC4\u5C71"},{value:"\u4E5D\u534E\u5C71",label:"\u4E5D\u534E\u5C71"},{value:"\u516D\u5B89",label:"\u516D\u5B89"},{value:"\u9A6C\u978D\u5C71",label:"\u9A6C\u978D\u5C71"},{value:"\u5BBF\u5DDE",label:"\u5BBF\u5DDE"},{value:"\u94DC\u9675",label:"\u94DC\u9675"},{value:"\u5C6F\u6EAA",label:"\u5C6F\u6EAA"},{value:"\u829C\u6E56",label:"\u829C\u6E56"},{value:"\u5BA3\u57CE",label:"\u5BA3\u57CE"}]},{value:"\u798F\u5EFA",label:"\u798F\u5EFA",children:[{value:"\u798F\u5DDE",label:"\u798F\u5DDE"},{value:"\u53A6\u95E8",label:"\u53A6\u95E8"},{value:"\u6CC9\u5DDE",label:"\u6CC9\u5DDE"},{value:"\u6F33\u5DDE",label:"\u6F33\u5DDE"},{value:"\u9F99\u5CA9",label:"\u9F99\u5CA9"},{value:"\u5357\u5E73",label:"\u5357\u5E73"},{value:"\u5B81\u5FB7",label:"\u5B81\u5FB7"},{value:"\u8386\u7530",label:"\u8386\u7530"},{value:"\u4E09\u660E",label:"\u4E09\u660E"}]},{value:"\u7518\u8083",label:"\u7518\u8083",children:[{value:"\u5170\u5DDE",label:"\u5170\u5DDE"},{value:"\u5609\u5CEA\u5173",label:"\u5609\u5CEA\u5173"},{value:"\u767D\u94F6",label:"\u767D\u94F6"},{value:"\u5B9A\u897F",label:"\u5B9A\u897F"},{value:"\u6566\u714C",label:"\u6566\u714C"},{value:"\u7518\u5357",label:"\u7518\u5357"},{value:"\u91D1\u660C",label:"\u91D1\u660C"},{value:"\u9152\u6CC9",label:"\u9152\u6CC9"},{value:"\u4E34\u590F",label:"\u4E34\u590F"},{value:"\u5E73\u51C9",label:"\u5E73\u51C9"},{value:"\u5929\u6C34",label:"\u5929\u6C34"},{value:"\u9647\u5357",label:"\u9647\u5357"},{value:"\u6B66\u5A01",label:"\u6B66\u5A01"},{value:"\u897F\u5CF0",label:"\u897F\u5CF0"},{value:"\u5F20\u6396",label:"\u5F20\u6396"}]},{value:"\u5E7F\u897F",label:"\u5E7F\u897F",children:[{value:"\u5357\u5B81",label:"\u5357\u5B81"},{value:"\u6765\u5BBE",label:"\u6765\u5BBE"},{value:"\u767E\u8272",label:"\u767E\u8272"},{value:"\u5317\u6D77",label:"\u5317\u6D77"},{value:"\u6842\u6797",label:"\u6842\u6797"},{value:"\u9632\u57CE\u6E2F",label:"\u9632\u57CE\u6E2F"},{value:"\u8D35\u6E2F",label:"\u8D35\u6E2F"},{value:"\u6CB3\u6C60",label:"\u6CB3\u6C60"},{value:"\u8D3A\u5DDE",label:"\u8D3A\u5DDE"},{value:"\u67F3\u5DDE",label:"\u67F3\u5DDE"},{value:"\u94A6\u5DDE",label:"\u94A6\u5DDE"},{value:"\u68A7\u5DDE",label:"\u68A7\u5DDE"},{value:"\u7389\u6797",label:"\u7389\u6797"}]},{value:"\u8D35\u5DDE",label:"\u8D35\u5DDE",children:[{value:"\u8D35\u9633",label:"\u8D35\u9633"},{value:"\u5B89\u987A",label:"\u5B89\u987A"},{value:"\u6BD5\u8282",label:"\u6BD5\u8282"},{value:"\u90FD\u5300",label:"\u90FD\u5300"},{value:"\u51EF\u91CC",label:"\u51EF\u91CC"},{value:"\u516D\u76D8\u6C34",label:"\u516D\u76D8\u6C34"},{value:"\u94DC\u4EC1",label:"\u94DC\u4EC1"},{value:"\u5174\u4E49",label:"\u5174\u4E49"},{value:"\u7389\u5C4F",label:"\u7389\u5C4F"},{value:"\u9075\u4E49",label:"\u9075\u4E49"}]},{value:"\u6D77\u5357",label:"\u6D77\u5357",children:[{value:"\u6D77\u53E3",label:"\u6D77\u53E3"},{value:"\u510B\u53BF",label:"\u510B\u53BF"},{value:"\u9675\u6C34",label:"\u9675\u6C34"},{value:"\u743C\u6D77",label:"\u743C\u6D77"},{value:"\u4E09\u4E9A",label:"\u4E09\u4E9A"},{value:"\u901A\u4EC0",label:"\u901A\u4EC0"},{value:"\u4E07\u5B81",label:"\u4E07\u5B81"}]},{value:"\u6CB3\u5317",label:"\u6CB3\u5317",children:[{value:"\u77F3\u5BB6\u5E84",label:"\u77F3\u5BB6\u5E84"},{value:"\u4FDD\u5B9A",label:"\u4FDD\u5B9A"},{value:"\u5317\u6234\u6CB3",label:"\u5317\u6234\u6CB3"},{value:"\u6CA7\u5DDE",label:"\u6CA7\u5DDE"},{value:"\u627F\u5FB7",label:"\u627F\u5FB7"},{value:"\u4E30\u6DA6",label:"\u4E30\u6DA6"},{value:"\u90AF\u90F8",label:"\u90AF\u90F8"},{value:"\u8861\u6C34",label:"\u8861\u6C34"},{value:"\u5ECA\u574A",label:"\u5ECA\u574A"},{value:"\u5357\u6234\u6CB3",label:"\u5357\u6234\u6CB3"},{value:"\u79E6\u7687\u5C9B",label:"\u79E6\u7687\u5C9B"},{value:"\u5510\u5C71",label:"\u5510\u5C71"},{value:"\u65B0\u57CE",label:"\u65B0\u57CE"},{value:"\u90A2\u53F0",label:"\u90A2\u53F0"},{value:"\u5F20\u5BB6\u53E3",label:"\u5F20\u5BB6\u53E3"}]},{value:"\u9ED1\u9F99\u6C5F",label:"\u9ED1\u9F99\u6C5F",children:[{value:"\u54C8\u5C14\u6EE8",label:"\u54C8\u5C14\u6EE8"},{value:"\u5317\u5B89",label:"\u5317\u5B89"},{value:"\u5927\u5E86",label:"\u5927\u5E86"},{value:"\u5927\u5174\u5B89\u5CAD",label:"\u5927\u5174\u5B89\u5CAD"},{value:"\u9E64\u5C97",label:"\u9E64\u5C97"},{value:"\u9ED1\u6CB3",label:"\u9ED1\u6CB3"},{value:"\u4F73\u6728\u65AF",label:"\u4F73\u6728\u65AF"},{value:"\u9E21\u897F",label:"\u9E21\u897F"},{value:"\u7261\u4E39\u6C5F",label:"\u7261\u4E39\u6C5F"},{value:"\u9F50\u9F50\u54C8\u5C14",label:"\u9F50\u9F50\u54C8\u5C14"},{value:"\u4E03\u53F0\u6CB3",label:"\u4E03\u53F0\u6CB3"},{value:"\u53CC\u9E2D\u5C71",label:"\u53CC\u9E2D\u5C71"},{value:"\u7EE5\u5316",label:"\u7EE5\u5316"},{value:"\u4F0A\u6625",label:"\u4F0A\u6625"}]},{value:"\u6CB3\u5357",label:"\u6CB3\u5357",children:[{value:"\u90D1\u5DDE",label:"\u90D1\u5DDE"},{value:"\u5B89\u9633",label:"\u5B89\u9633"},{value:"\u9E64\u58C1",label:"\u9E64\u58C1"},{value:"\u6F62\u5DDD",label:"\u6F62\u5DDD"},{value:"\u7126\u4F5C",label:"\u7126\u4F5C"},{value:"\u6D4E\u6E90",label:"\u6D4E\u6E90"},{value:"\u5F00\u5C01",label:"\u5F00\u5C01"},{value:"\u6F2F\u6CB3",label:"\u6F2F\u6CB3"},{value:"\u6D1B\u9633",label:"\u6D1B\u9633"},{value:"\u5357\u9633",label:"\u5357\u9633"},{value:"\u5E73\u9876\u5C71",label:"\u5E73\u9876\u5C71"},{value:"\u6FEE\u9633",label:"\u6FEE\u9633"},{value:"\u4E09\u95E8\u5CE1",label:"\u4E09\u95E8\u5CE1"},{value:"\u5546\u4E18",label:"\u5546\u4E18"},{value:"\u65B0\u4E61",label:"\u65B0\u4E61"},{value:"\u4FE1\u9633",label:"\u4FE1\u9633"},{value:"\u8BB8\u660C",label:"\u8BB8\u660C"},{value:"\u5468\u53E3",label:"\u5468\u53E3"},{value:"\u9A7B\u9A6C\u5E97",label:"\u9A7B\u9A6C\u5E97"}]},{value:"\u9999\u6E2F",label:"\u9999\u6E2F",children:[{value:"\u9999\u6E2F",label:"\u9999\u6E2F"},{value:"\u4E5D\u9F99",label:"\u4E5D\u9F99"},{value:"\u65B0\u754C",label:"\u65B0\u754C"}]},{value:"\u6E56\u5317",label:"\u6E56\u5317",children:[{value:"\u6B66\u6C49",label:"\u6B66\u6C49"},{value:"\u5929\u95E8",label:"\u5929\u95E8"},{value:"\u6069\u65BD",label:"\u6069\u65BD"},{value:"\u9102\u5DDE",label:"\u9102\u5DDE"},{value:"\u9EC4\u5188",label:"\u9EC4\u5188"},{value:"\u9EC4\u77F3",label:"\u9EC4\u77F3"},{value:"\u8346\u95E8",label:"\u8346\u95E8"},{value:"\u8346\u5DDE",label:"\u8346\u5DDE"},{value:"\u6F5C\u6C5F",label:"\u6F5C\u6C5F"},{value:"\u5341\u5830",label:"\u5341\u5830"},{value:"\u968F\u5DDE",label:"\u968F\u5DDE"},{value:"\u6B66\u7A74",label:"\u6B66\u7A74"},{value:"\u4ED9\u6843",label:"\u4ED9\u6843"},{value:"\u54B8\u5B81",label:"\u54B8\u5B81"},{value:"\u8944\u9633",label:"\u8944\u9633"},{value:"\u8944\u6A0A",label:"\u8944\u6A0A"},{value:"\u5B5D\u611F",label:"\u5B5D\u611F"},{value:"\u5B9C\u660C",label:"\u5B9C\u660C"}]},{value:"\u6E56\u5357",label:"\u6E56\u5357",children:[{value:"\u957F\u6C99",label:"\u957F\u6C99"},{value:"\u5E38\u5FB7",label:"\u5E38\u5FB7"},{value:"\u90F4\u5DDE",label:"\u90F4\u5DDE"},{value:"\u8861\u9633",label:"\u8861\u9633"},{value:"\u6000\u5316",label:"\u6000\u5316"},{value:"\u5409\u9996",label:"\u5409\u9996"},{value:"\u5A04\u5E95",label:"\u5A04\u5E95"},{value:"\u90B5\u9633",label:"\u90B5\u9633"},{value:"\u6E58\u6F6D",label:"\u6E58\u6F6D"},{value:"\u76CA\u9633",label:"\u76CA\u9633"},{value:"\u5CB3\u9633",label:"\u5CB3\u9633"},{value:"\u6C38\u5DDE",label:"\u6C38\u5DDE"},{value:"\u5F20\u5BB6\u754C",label:"\u5F20\u5BB6\u754C"},{value:"\u682A\u6D32",label:"\u682A\u6D32"}]},{value:"\u6C5F\u897F",label:"\u6C5F\u897F",children:[{value:"\u5357\u660C",label:"\u5357\u660C"},{value:"\u629A\u5DDE",label:"\u629A\u5DDE"},{value:"\u8D63\u5DDE",label:"\u8D63\u5DDE"},{value:"\u5409\u5B89",label:"\u5409\u5B89"},{value:"\u666F\u5FB7\u9547",label:"\u666F\u5FB7\u9547"},{value:"\u4E95\u5188\u5C71",label:"\u4E95\u5188\u5C71"},{value:"\u4E5D\u6C5F",label:"\u4E5D\u6C5F"},{value:"\u5E90\u5C71",label:"\u5E90\u5C71"},{value:"\u840D\u4E61",label:"\u840D\u4E61"},{value:"\u4E0A\u9976",label:"\u4E0A\u9976"},{value:"\u65B0\u4F59",label:"\u65B0\u4F59"},{value:"\u5B9C\u6625",label:"\u5B9C\u6625"},{value:"\u9E70\u6F6D",label:"\u9E70\u6F6D"}]},{value:"\u5409\u6797",label:"\u5409\u6797",children:[{value:"\u957F\u6625",label:"\u957F\u6625"},{value:"\u5409\u6797",label:"\u5409\u6797"},{value:"\u767D\u57CE",label:"\u767D\u57CE"},{value:"\u767D\u5C71",label:"\u767D\u5C71"},{value:"\u73F2\u6625",label:"\u73F2\u6625"},{value:"\u8FBD\u6E90",label:"\u8FBD\u6E90"},{value:"\u6885\u6CB3",label:"\u6885\u6CB3"},{value:"\u56DB\u5E73",label:"\u56DB\u5E73"},{value:"\u677E\u539F",label:"\u677E\u539F"},{value:"\u901A\u5316",label:"\u901A\u5316"},{value:"\u5EF6\u5409",label:"\u5EF6\u5409"}]},{value:"\u8FBD\u5B81",label:"\u8FBD\u5B81",children:[{value:"\u6C88\u9633",label:"\u6C88\u9633"},{value:"\u978D\u5C71",label:"\u978D\u5C71"},{value:"\u672C\u6EAA",label:"\u672C\u6EAA"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u5927\u8FDE",label:"\u5927\u8FDE"},{value:"\u4E39\u4E1C",label:"\u4E39\u4E1C"},{value:"\u629A\u987A",label:"\u629A\u987A"},{value:"\u961C\u65B0",label:"\u961C\u65B0"},{value:"\u846B\u82A6\u5C9B",label:"\u846B\u82A6\u5C9B"},{value:"\u9526\u5DDE",label:"\u9526\u5DDE"},{value:"\u8FBD\u9633",label:"\u8FBD\u9633"},{value:"\u76D8\u9526",label:"\u76D8\u9526"},{value:"\u94C1\u5CAD",label:"\u94C1\u5CAD"},{value:"\u8425\u53E3",label:"\u8425\u53E3"}]},{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8",children:[{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8"}]},{value:"\u5185\u8499\u53E4",label:"\u5185\u8499\u53E4",children:[{value:"\u547C\u548C\u6D69\u7279",label:"\u547C\u548C\u6D69\u7279"},{value:"\u963F\u62C9\u5584\u76DF",label:"\u963F\u62C9\u5584\u76DF"},{value:"\u5305\u5934",label:"\u5305\u5934"},{value:"\u8D64\u5CF0",label:"\u8D64\u5CF0"},{value:"\u4E1C\u80DC",label:"\u4E1C\u80DC"},{value:"\u6D77\u62C9\u5C14",label:"\u6D77\u62C9\u5C14"},{value:"\u96C6\u5B81",label:"\u96C6\u5B81"},{value:"\u4E34\u6CB3",label:"\u4E34\u6CB3"},{value:"\u901A\u8FBD",label:"\u901A\u8FBD"},{value:"\u4E4C\u6D77",label:"\u4E4C\u6D77"},{value:"\u4E4C\u5170\u6D69\u7279",label:"\u4E4C\u5170\u6D69\u7279"},{value:"\u9521\u6797\u6D69\u7279",label:"\u9521\u6797\u6D69\u7279"}]},{value:"\u5B81\u590F",label:"\u5B81\u590F",children:[{value:"\u94F6\u5DDD",label:"\u94F6\u5DDD"},{value:"\u56FA\u6E90",label:"\u56FA\u6E90"},{value:"\u77F3\u5634\u5C71",label:"\u77F3\u5634\u5C71"},{value:"\u5434\u5FE0",label:"\u5434\u5FE0"}]},{value:"\u9752\u6D77",label:"\u9752\u6D77",children:[{value:"\u897F\u5B81",label:"\u897F\u5B81"},{value:"\u5FB7\u4EE4\u54C8",label:"\u5FB7\u4EE4\u54C8"},{value:"\u683C\u5C14\u6728",label:"\u683C\u5C14\u6728"},{value:"\u5171\u548C",label:"\u5171\u548C"},{value:"\u6D77\u4E1C",label:"\u6D77\u4E1C"},{value:"\u6D77\u664F",label:"\u6D77\u664F"},{value:"\u739B\u6C81",label:"\u739B\u6C81"},{value:"\u540C\u4EC1",label:"\u540C\u4EC1"},{value:"\u7389\u6811",label:"\u7389\u6811"}]},{value:"\u5C71\u4E1C",label:"\u5C71\u4E1C",children:[{value:"\u6D4E\u5357",label:"\u6D4E\u5357"},{value:"\u6EE8\u5DDE",label:"\u6EE8\u5DDE"},{value:"\u5156\u5DDE",label:"\u5156\u5DDE"},{value:"\u5FB7\u5DDE",label:"\u5FB7\u5DDE"},{value:"\u4E1C\u8425",label:"\u4E1C\u8425"},{value:"\u83CF\u6CFD",label:"\u83CF\u6CFD"},{value:"\u6D4E\u5B81",label:"\u6D4E\u5B81"},{value:"\u83B1\u829C",label:"\u83B1\u829C"},{value:"\u804A\u57CE",label:"\u804A\u57CE"},{value:"\u4E34\u6C82",label:"\u4E34\u6C82"},{value:"\u84EC\u83B1",label:"\u84EC\u83B1"},{value:"\u9752\u5C9B",label:"\u9752\u5C9B"},{value:"\u66F2\u961C",label:"\u66F2\u961C"},{value:"\u65E5\u7167",label:"\u65E5\u7167"},{value:"\u6CF0\u5B89",label:"\u6CF0\u5B89"},{value:"\u6F4D\u574A",label:"\u6F4D\u574A"},{value:"\u5A01\u6D77",label:"\u5A01\u6D77"},{value:"\u70DF\u53F0",label:"\u70DF\u53F0"},{value:"\u67A3\u5E84",label:"\u67A3\u5E84"},{value:"\u6DC4\u535A",label:"\u6DC4\u535A"}]},{value:"\u5C71\u897F",label:"\u5C71\u897F",children:[{value:"\u592A\u539F",label:"\u592A\u539F"},{value:"\u5415\u6881",label:"\u5415\u6881"},{value:"\u957F\u6CBB",label:"\u957F\u6CBB"},{value:"\u5927\u540C",label:"\u5927\u540C"},{value:"\u5019\u9A6C",label:"\u5019\u9A6C"},{value:"\u664B\u57CE",label:"\u664B\u57CE"},{value:"\u79BB\u77F3",label:"\u79BB\u77F3"},{value:"\u4E34\u6C7E",label:"\u4E34\u6C7E"},{value:"\u5B81\u6B66",label:"\u5B81\u6B66"},{value:"\u6714\u5DDE",label:"\u6714\u5DDE"},{value:"\u5FFB\u5DDE",label:"\u5FFB\u5DDE"},{value:"\u9633\u6CC9",label:"\u9633\u6CC9"},{value:"\u6986\u6B21",label:"\u6986\u6B21"},{value:"\u664B\u4E2D",label:"\u664B\u4E2D"},{value:"\u8FD0\u57CE",label:"\u8FD0\u57CE"}]},{value:"\u9655\u897F",label:"\u9655\u897F",children:[{value:"\u897F\u5B89",label:"\u897F\u5B89"},{value:"\u5B89\u5EB7",label:"\u5B89\u5EB7"},{value:"\u5B9D\u9E21",label:"\u5B9D\u9E21"},{value:"\u6C49\u4E2D",label:"\u6C49\u4E2D"},{value:"\u6E2D\u5357",label:"\u6E2D\u5357"},{value:"\u5546\u5DDE",label:"\u5546\u5DDE"},{value:"\u7EE5\u5FB7",label:"\u7EE5\u5FB7"},{value:"\u94DC\u5DDD",label:"\u94DC\u5DDD"},{value:"\u54B8\u9633",label:"\u54B8\u9633"},{value:"\u5EF6\u5B89",label:"\u5EF6\u5B89"},{value:"\u6986\u6797",label:"\u6986\u6797"}]},{value:"\u56DB\u5DDD",label:"\u56DB\u5DDD",children:[{value:"\u6210\u90FD",label:"\u6210\u90FD"},{value:"\u5DF4\u4E2D",label:"\u5DF4\u4E2D"},{value:"\u8FBE\u5DDD",label:"\u8FBE\u5DDD"},{value:"\u5FB7\u9633",label:"\u5FB7\u9633"},{value:"\u90FD\u6C5F\u5830",label:"\u90FD\u6C5F\u5830"},{value:"\u5CE8\u7709\u5C71",label:"\u5CE8\u7709\u5C71"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u5E7F\u5B89",label:"\u5E7F\u5B89"},{value:"\u5E7F\u5143",label:"\u5E7F\u5143"},{value:"\u4E5D\u5BE8\u6C9F",label:"\u4E5D\u5BE8\u6C9F"},{value:"\u5EB7\u5B9A",label:"\u5EB7\u5B9A"},{value:"\u4E50\u5C71",label:"\u4E50\u5C71"},{value:"\u6CF8\u5DDE",label:"\u6CF8\u5DDE"},{value:"\u9A6C\u5C14\u5EB7",label:"\u9A6C\u5C14\u5EB7"},{value:"\u7EF5\u9633",label:"\u7EF5\u9633"},{value:"\u7709\u5C71",label:"\u7709\u5C71"},{value:"\u5357\u5145",label:"\u5357\u5145"},{value:"\u5185\u6C5F",label:"\u5185\u6C5F"},{value:"\u6500\u679D\u82B1",label:"\u6500\u679D\u82B1"},{value:"\u9042\u5B81",label:"\u9042\u5B81"},{value:"\u6C76\u5DDD",label:"\u6C76\u5DDD"},{value:"\u897F\u660C",label:"\u897F\u660C"},{value:"\u96C5\u5B89",label:"\u96C5\u5B89"},{value:"\u5B9C\u5BBE",label:"\u5B9C\u5BBE"},{value:"\u81EA\u8D21",label:"\u81EA\u8D21"},{value:"\u8D44\u9633",label:"\u8D44\u9633"}]},{value:"\u53F0\u6E7E",label:"\u53F0\u6E7E",children:[{value:"\u53F0\u5317",label:"\u53F0\u5317"},{value:"\u57FA\u9686",label:"\u57FA\u9686"},{value:"\u53F0\u5357",label:"\u53F0\u5357"},{value:"\u53F0\u4E2D",label:"\u53F0\u4E2D"},{value:"\u9AD8\u96C4",label:"\u9AD8\u96C4"},{value:"\u5C4F\u4E1C",label:"\u5C4F\u4E1C"},{value:"\u5357\u6295",label:"\u5357\u6295"},{value:"\u4E91\u6797",label:"\u4E91\u6797"},{value:"\u65B0\u7AF9",label:"\u65B0\u7AF9"},{value:"\u5F70\u5316",label:"\u5F70\u5316"},{value:"\u82D7\u6817",label:"\u82D7\u6817"},{value:"\u5609\u4E49",label:"\u5609\u4E49"},{value:"\u6843\u56ED",label:"\u6843\u56ED"},{value:"\u5B9C\u5170",label:"\u5B9C\u5170"},{value:"\u53F0\u4E1C",label:"\u53F0\u4E1C"},{value:"\u91D1\u95E8",label:"\u91D1\u95E8"},{value:"\u9A6C\u7956",label:"\u9A6C\u7956"},{value:"\u6F8E\u6E56",label:"\u6F8E\u6E56"}]},{value:"\u5929\u6D25",label:"\u5929\u6D25",children:[{value:"\u5929\u6D25",label:"\u5929\u6D25"},{value:"\u548C\u5E73",label:"\u548C\u5E73"},{value:"\u4E1C\u4E3D",label:"\u4E1C\u4E3D"},{value:"\u6CB3\u4E1C",label:"\u6CB3\u4E1C"},{value:"\u897F\u9752",label:"\u897F\u9752"},{value:"\u6CB3\u897F",label:"\u6CB3\u897F"},{value:"\u6D25\u5357",label:"\u6D25\u5357"},{value:"\u5357\u5F00",label:"\u5357\u5F00"},{value:"\u5317\u8FB0",label:"\u5317\u8FB0"},{value:"\u6CB3\u5317",label:"\u6CB3\u5317"},{value:"\u6B66\u6E05",label:"\u6B66\u6E05"},{value:"\u7EA2\u6322",label:"\u7EA2\u6322"},{value:"\u5858\u6CBD",label:"\u5858\u6CBD"},{value:"\u6C49\u6CBD",label:"\u6C49\u6CBD"},{value:"\u5927\u6E2F",label:"\u5927\u6E2F"},{value:"\u5B81\u6CB3",label:"\u5B81\u6CB3"},{value:"\u9759\u6D77",label:"\u9759\u6D77"},{value:"\u5B9D\u577B",label:"\u5B9D\u577B"},{value:"\u84DF\u53BF",label:"\u84DF\u53BF"}]},{value:"\u65B0\u7586",label:"\u65B0\u7586",children:[{value:"\u4E4C\u9C81\u6728\u9F50",label:"\u4E4C\u9C81\u6728\u9F50"},{value:"\u963F\u514B\u82CF",label:"\u963F\u514B\u82CF"},{value:"\u963F\u52D2\u6CF0",label:"\u963F\u52D2\u6CF0"},{value:"\u963F\u56FE\u4EC0",label:"\u963F\u56FE\u4EC0"},{value:"\u535A\u4E50",label:"\u535A\u4E50"},{value:"\u660C\u5409",label:"\u660C\u5409"},{value:"\u4E1C\u5C71",label:"\u4E1C\u5C71"},{value:"\u54C8\u5BC6",label:"\u54C8\u5BC6"},{value:"\u548C\u7530",label:"\u548C\u7530"},{value:"\u5580\u4EC0",label:"\u5580\u4EC0"},{value:"\u514B\u62C9\u739B\u4F9D",label:"\u514B\u62C9\u739B\u4F9D"},{value:"\u5E93\u8F66",label:"\u5E93\u8F66"},{value:"\u5E93\u5C14\u52D2",label:"\u5E93\u5C14\u52D2"},{value:"\u594E\u5C6F",label:"\u594E\u5C6F"},{value:"\u77F3\u6CB3\u5B50",label:"\u77F3\u6CB3\u5B50"},{value:"\u5854\u57CE",label:"\u5854\u57CE"},{value:"\u5410\u9C81\u756A",label:"\u5410\u9C81\u756A"},{value:"\u4F0A\u5B81",label:"\u4F0A\u5B81"}]},{value:"\u897F\u85CF",label:"\u897F\u85CF",children:[{value:"\u62C9\u8428",label:"\u62C9\u8428"},{value:"\u963F\u91CC",label:"\u963F\u91CC"},{value:"\u660C\u90FD",label:"\u660C\u90FD"},{value:"\u6797\u829D",label:"\u6797\u829D"},{value:"\u90A3\u66F2",label:"\u90A3\u66F2"},{value:"\u65E5\u5580\u5219",label:"\u65E5\u5580\u5219"},{value:"\u5C71\u5357",label:"\u5C71\u5357"}]},{value:"\u4E91\u5357",label:"\u4E91\u5357",children:[{value:"\u6606\u660E",label:"\u6606\u660E"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4FDD\u5C71",label:"\u4FDD\u5C71"},{value:"\u695A\u96C4",label:"\u695A\u96C4"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4E1C\u5DDD",label:"\u4E1C\u5DDD"},{value:"\u4E2A\u65E7",label:"\u4E2A\u65E7"},{value:"\u666F\u6D2A",label:"\u666F\u6D2A"},{value:"\u5F00\u8FDC",label:"\u5F00\u8FDC"},{value:"\u4E34\u6CA7",label:"\u4E34\u6CA7"},{value:"\u4E3D\u6C5F",label:"\u4E3D\u6C5F"},{value:"\u516D\u5E93",label:"\u516D\u5E93"},{value:"\u6F5E\u897F",label:"\u6F5E\u897F"},{value:"\u66F2\u9756",label:"\u66F2\u9756"},{value:"\u601D\u8305",label:"\u601D\u8305"},{value:"\u6587\u5C71",label:"\u6587\u5C71"},{value:"\u897F\u53CC\u7248\u7EB3",label:"\u897F\u53CC\u7248\u7EB3"},{value:"\u7389\u6EAA",label:"\u7389\u6EAA"},{value:"\u4E2D\u7538",label:"\u4E2D\u7538"},{value:"\u662D\u901A",label:"\u662D\u901A"}]},{value:"\u6D59\u6C5F",label:"\u6D59\u6C5F",children:[{value:"\u676D\u5DDE",label:"\u676D\u5DDE"},{value:"\u6E29\u5DDE",label:"\u6E29\u5DDE"},{value:"\u5B89\u5409",label:"\u5B89\u5409"},{value:"\u6148\u6EAA",label:"\u6148\u6EAA"},{value:"\u5B9A\u6D77",label:"\u5B9A\u6D77"},{value:"\u5949\u5316",label:"\u5949\u5316"},{value:"\u6D77\u76D0",label:"\u6D77\u76D0"},{value:"\u9EC4\u5CA9",label:"\u9EC4\u5CA9"},{value:"\u6E56\u5DDE",label:"\u6E56\u5DDE"},{value:"\u5609\u5174",label:"\u5609\u5174"},{value:"\u91D1\u534E",label:"\u91D1\u534E"},{value:"\u4E34\u5B89",label:"\u4E34\u5B89"},{value:"\u4E34\u6D77",label:"\u4E34\u6D77"},{value:"\u4E3D\u6C34",label:"\u4E3D\u6C34"},{value:"\u5B81\u6CE2",label:"\u5B81\u6CE2"},{value:"\u74EF\u6D77",label:"\u74EF\u6D77"},{value:"\u5E73\u6E56",label:"\u5E73\u6E56"},{value:"\u5343\u5C9B\u6E56",label:"\u5343\u5C9B\u6E56"},{value:"\u8862\u5DDE",label:"\u8862\u5DDE"},{value:"\u6C5F\u5C71",label:"\u6C5F\u5C71"},{value:"\u745E\u5B89",label:"\u745E\u5B89"},{value:"\u7ECD\u5174",label:"\u7ECD\u5174"},{value:"\u5D4A\u5DDE",label:"\u5D4A\u5DDE"},{value:"\u53F0\u5DDE",label:"\u53F0\u5DDE"},{value:"\u6E29\u5CAD",label:"\u6E29\u5CAD"},{value:"\u4F59\u59DA",label:"\u4F59\u59DA"},{value:"\u821F\u5C71",label:"\u821F\u5C71"}]},{value:"\u6D77\u5916",label:"\u6D77\u5916",children:[{value:"\u7F8E\u56FD",label:"\u7F8E\u56FD"},{value:"\u65E5\u672C",label:"\u65E5\u672C"},{value:"\u82F1\u56FD",label:"\u82F1\u56FD"},{value:"\u6CD5\u56FD",label:"\u6CD5\u56FD"},{value:"\u5FB7\u56FD",label:"\u5FB7\u56FD"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}]}]},"gb/T":function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("OLod"))})(this,function(P){return P.mode.ECB=function(){var v=P.lib.BlockCipherMode.extend();return v.Encryptor=v.extend({processBlock:function(C,N){this._cipher.encryptBlock(C,N)}}),v.Decryptor=v.extend({processBlock:function(C,N){this._cipher.decryptBlock(C,N)}}),v}(),P.mode.ECB})},h78n:function(W,q,D){"use strict";D.d(q,"a",function(){return L});var P=D("q1tI"),v=D.n(P),C=D("TSYQ"),N=D.n(C),g={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},m=function(A){var H=A.map(function(){return Object(P.useRef)()}),U=Object(P.useRef)();return Object(P.useEffect)(function(){var I=Date.now(),G=!1;Object.keys(H).forEach(function(ne){var oe=H[ne].current;if(!oe)return;G=!0;var de=oe.style;de.transitionDuration=".3s, .3s, .3s, .06s",U.current&&I-U.current<100&&(de.transitionDuration="0s, 0s")}),G&&(U.current=Date.now())}),[H]};function S(){return S=Object.assign||function(K){for(var A=1;A<arguments.length;A++){var H=arguments[A];for(var U in H)Object.prototype.hasOwnProperty.call(H,U)&&(K[U]=H[U])}return K},S.apply(this,arguments)}function _(K,A){return o(K)||c(K,A)||d(K,A)||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 d(K,A){if(!K)return;if(typeof K=="string")return i(K,A);var H=Object.prototype.toString.call(K).slice(8,-1);if(H==="Object"&&K.constructor&&(H=K.constructor.name),H==="Map"||H==="Set")return Array.from(K);if(H==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H))return i(K,A)}function i(K,A){(A==null||A>K.length)&&(A=K.length);for(var H=0,U=new Array(A);H<A;H++)U[H]=K[H];return U}function c(K,A){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(K)))return;var H=[],U=!0,I=!1,G=void 0;try{for(var ne=K[Symbol.iterator](),oe;!(U=(oe=ne.next()).done)&&!(H.push(oe.value),A&&H.length===A);U=!0);}catch(de){I=!0,G=de}finally{try{!U&&ne.return!=null&&ne.return()}finally{if(I)throw G}}return H}function o(K){if(Array.isArray(K))return K}function n(K,A){if(K==null)return{};var H=s(K,A),U,I;if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(K);for(I=0;I<G.length;I++){if(U=G[I],A.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(K,U))continue;H[U]=K[U]}}return H}function s(K,A){if(K==null)return{};var H={},U=Object.keys(K),I,G;for(G=0;G<U.length;G++){if(I=U[G],A.indexOf(I)>=0)continue;H[I]=K[I]}return H}var h=function(A){var H=A.className,U=A.percent,I=A.prefixCls,G=A.strokeColor,ne=A.strokeLinecap,oe=A.strokeWidth,de=A.style,Oe=A.trailColor,Ae=A.trailWidth,pe=A.transition,Se=n(A,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Se.gapPosition;var be=Array.isArray(U)?U:[U],se=Array.isArray(G)?G:[G],ee=m(be),B=_(ee,1),V=B[0],X=oe/2,Q=100-oe/2,Z="M ".concat(ne==="round"?X:0,",").concat(X,`
|
|
|
L `).concat(ne==="round"?Q:100,",").concat(X),ie="0 0 100 ".concat(oe),re=0;return v.a.createElement("svg",S({className:N()("".concat(I,"-line"),H),viewBox:ie,preserveAspectRatio:"none",style:de},Se),v.a.createElement("path",{className:"".concat(I,"-line-trail"),d:Z,strokeLinecap:ne,stroke:Oe,strokeWidth:Ae||oe,fillOpacity:"0"}),be.map(function($,J){var le={strokeDasharray:"".concat($,"px, 100px"),strokeDashoffset:"-".concat(re,"px"),transition:pe||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ue=se[J]||se[se.length-1];return re+=$,v.a.createElement("path",{key:J,className:"".concat(I,"-line-path"),d:Z,strokeLinecap:ne,stroke:ue,strokeWidth:oe,fillOpacity:"0",ref:V[J],style:le})}))};h.defaultProps=g;var f=h;function l(){return l=Object.assign||function(K){for(var A=1;A<arguments.length;A++){var H=arguments[A];for(var U in H)Object.prototype.hasOwnProperty.call(H,U)&&(K[U]=H[U])}return K},l.apply(this,arguments)}function a(K,A){return R(K)||p(K,A)||x(K,A)||r()}function r(){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 x(K,A){if(!K)return;if(typeof K=="string")return y(K,A);var H=Object.prototype.toString.call(K).slice(8,-1);if(H==="Object"&&K.constructor&&(H=K.constructor.name),H==="Map"||H==="Set")return Array.from(K);if(H==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H))return y(K,A)}function y(K,A){(A==null||A>K.length)&&(A=K.length);for(var H=0,U=new Array(A);H<A;H++)U[H]=K[H];return U}function p(K,A){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(K)))return;var H=[],U=!0,I=!1,G=void 0;try{for(var ne=K[Symbol.iterator](),oe;!(U=(oe=ne.next()).done)&&!(H.push(oe.value),A&&H.length===A);U=!0);}catch(de){I=!0,G=de}finally{try{!U&&ne.return!=null&&ne.return()}finally{if(I)throw G}}return H}function R(K){if(Array.isArray(K))return K}function O(K,A){if(K==null)return{};var H=b(K,A),U,I;if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(K);for(I=0;I<G.length;I++){if(U=G[I],A.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(K,U))continue;H[U]=K[U]}}return H}function b(K,A){if(K==null)return{};var H={},U=Object.keys(K),I,G;for(G=0;G<U.length;G++){if(I=U[G],A.indexOf(I)>=0)continue;H[I]=K[I]}return H}var E=0;function w(K){return+K.replace("%","")}function T(K){return Array.isArray(K)?K:[K]}function F(K,A,H,U){var I=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,G=arguments.length>5?arguments[5]:void 0,ne=50-U/2,oe=0,de=-ne,Oe=0,Ae=-2*ne;switch(G){case"left":oe=-ne,de=0,Oe=2*ne,Ae=0;break;case"right":oe=ne,de=0,Oe=-2*ne,Ae=0;break;case"bottom":de=ne,Ae=2*ne;break;default:}var pe="M 50,50 m ".concat(oe,",").concat(de,`
|
|
|
a `).concat(ne,",").concat(ne," 0 1 1 ").concat(Oe,",").concat(-Ae,`
|
|
|
a `).concat(ne,",").concat(ne," 0 1 1 ").concat(-Oe,",").concat(Ae),Se=Math.PI*2*ne,be={stroke:H,strokeDasharray:"".concat(A/100*(Se-I),"px ").concat(Se,"px"),strokeDashoffset:"-".concat(I/2+K/100*(Se-I),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:pe,pathStyle:be}}var M=function(A){var H=A.prefixCls,U=A.strokeWidth,I=A.trailWidth,G=A.gapDegree,ne=A.gapPosition,oe=A.trailColor,de=A.strokeLinecap,Oe=A.style,Ae=A.className,pe=A.strokeColor,Se=A.percent,be=O(A,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),se=Object(P.useMemo)(function(){return E+=1,E},[]),ee=F(0,100,oe,U,G,ne),B=ee.pathString,V=ee.pathStyle,X=T(Se),Q=T(pe),Z=Q.find(function(le){return Object.prototype.toString.call(le)==="[object Object]"}),ie=m(X),re=a(ie,1),$=re[0],J=function(){var ue=0;return X.map(function(xe,Me){var Xe=Q[Me]||Q[Q.length-1],$e=Object.prototype.toString.call(Xe)==="[object Object]"?"url(#".concat(H,"-gradient-").concat(se,")"):"",Je=F(ue,xe,Xe,U,G,ne);return ue+=xe,v.a.createElement("path",{key:Me,className:"".concat(H,"-circle-path"),d:Je.pathString,stroke:$e,strokeLinecap:de,strokeWidth:U,opacity:xe===0?0:1,fillOpacity:"0",style:Je.pathStyle,ref:$[Me]})})};return v.a.createElement("svg",l({className:N()("".concat(H,"-circle"),Ae),viewBox:"0 0 100 100",style:Oe},be),Z&&v.a.createElement("defs",null,v.a.createElement("linearGradient",{id:"".concat(H,"-gradient-").concat(se),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Z).sort(function(le,ue){return w(le)-w(ue)}).map(function(le,ue){return v.a.createElement("stop",{key:ue,offset:le,stopColor:Z[le]})}))),v.a.createElement("path",{className:"".concat(H,"-circle-trail"),d:B,stroke:oe,strokeLinecap:de,strokeWidth:I||U,fillOpacity:"0",style:V}),J().reverse())};M.defaultProps=g;var L=M,Y={Line:f,Circle:L}},hW8S:function(W,q,D){"use strict";D.d(q,"a",function(){return N}),D.d(q,"c",function(){return g}),D.d(q,"b",function(){return m});var P=D("VTBJ"),v=D("Ff2n"),C=D("Kwbf"),N="RC_TABLE_INTERNAL_COL_DEFINE";function g(S){var _=S.expandable,t=Object(v.a)(S,["expandable"]);return"expandable"in S?Object(P.a)(Object(P.a)({},t),_):t}function m(S){return Object.keys(S).reduce(function(_,t){return(t.substr(0,5)==="data-"||t.substr(0,5)==="aria-")&&(_[t]=S[t]),_},{})}},ic2d:function(W,q,D){"use strict";D.d(q,"a",function(){return N});var P=D("FWmy"),v=D("746U");class C{constructor(){this.data=new Map}add(g,m){P.a(v.l(g)),P.a(v.k(m)),P.a(!this.data.has(g),"There is already an extension with this id"),this.data.set(g,m)}as(g){return this.data.get(g)||null}}const N=new C},jO9C:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("OLod"))})(this,function(P){return P.pad.Iso97971={pad:function(v,C){v.concat(P.lib.WordArray.create([2147483648],1)),P.pad.ZeroPadding.pad(v,C)},unpad:function(v){P.pad.ZeroPadding.unpad(v),v.sigBytes--}},P.pad.Iso97971})},jwmR:function(W,q,D){W.exports={flexRow:"flexRow___3nMh-",flexColumn:"flexColumn___Xpn5L",formWrap:"formWrap___3t9mN",example:"example___5c8Eu",footerWrap:"footerWrap___20Wal"}},k3GJ:function(W,q,D){"use strict";D.d(q,"a",function(){return mr});var P=D("rePB"),v=D("ODXe"),C=D("Ff2n"),N=D("VTBJ"),g=D("q1tI"),m=D("TSYQ"),S=D.n(m),_=D("Zm9Q"),t=D("6cGi"),d=D("KQm4"),i=D("xEkU"),c=D.n(i),o=D("t23M");function n(ke){var We=Object(g.useRef)(),Ve=Object(g.useRef)(!1);function Fe(){for(var _e=arguments.length,Le=new Array(_e),Te=0;Te<_e;Te++)Le[Te]=arguments[Te];Ve.current||(c.a.cancel(We.current),We.current=c()(function(){ke.apply(void 0,Le)}))}return Object(g.useEffect)(function(){return function(){Ve.current=!0,c.a.cancel(We.current)}},[]),Fe}function s(ke){var We=Object(g.useRef)([]),Ve=Object(g.useState)({}),Fe=Object(v.a)(Ve,2),_e=Fe[1],Le=Object(g.useRef)(typeof ke=="function"?ke():ke),Te=n(function(){var He=Le.current;We.current.forEach(function(Ke){He=Ke(He)}),We.current=[],Le.current=He,_e({})});function Ne(He){We.current.push(He),Te()}return[Le.current,Ne]}var h=D("4IlW");function f(ke,We){var Ve,Fe=ke.prefixCls,_e=ke.id,Le=ke.active,Te=ke.rtl,Ne=ke.tab,He=Ne.key,Ke=Ne.tab,Be=Ne.disabled,Ye=Ne.closeIcon,ot=ke.tabBarGutter,xt=ke.tabPosition,At=ke.closable,Nt=ke.renderWrapper,Er=ke.removeAriaLabel,Hr=ke.editable,Br=ke.onClick,Gr=ke.onRemove,Mr=ke.onFocus,Yr="".concat(Fe,"-tab");g.useEffect(function(){return Gr},[]);var $r={};xt==="top"||xt==="bottom"?$r[Te?"marginLeft":"marginRight"]=ot:$r.marginBottom=ot;var cn=Hr&&At!==!1&&!Be;function en(Sr){if(Be)return;Br(Sr)}function Tn(Sr){Sr.preventDefault(),Sr.stopPropagation(),Hr.onEdit("remove",{key:He,event:Sr})}var nn=g.createElement("div",{key:He,ref:We,className:S()(Yr,(Ve={},Object(P.a)(Ve,"".concat(Yr,"-with-remove"),cn),Object(P.a)(Ve,"".concat(Yr,"-active"),Le),Object(P.a)(Ve,"".concat(Yr,"-disabled"),Be),Ve)),style:$r,onClick:en},g.createElement("div",{role:"tab","aria-selected":Le,id:_e&&"".concat(_e,"-tab-").concat(He),className:"".concat(Yr,"-btn"),"aria-controls":_e&&"".concat(_e,"-panel-").concat(He),"aria-disabled":Be,tabIndex:Be?null:0,onClick:function(Dr){Dr.stopPropagation(),en(Dr)},onKeyDown:function(Dr){[h.a.SPACE,h.a.ENTER].includes(Dr.which)&&(Dr.preventDefault(),en(Dr))},onFocus:Mr},Ke),cn&&g.createElement("button",{type:"button","aria-label":Er||"remove",tabIndex:0,className:"".concat(Yr,"-remove"),onClick:function(Dr){Dr.stopPropagation(),Tn(Dr)}},Ye||Hr.removeIcon||"\xD7"));return Nt&&(nn=Nt(nn)),nn}var l=g.forwardRef(f),a={width:0,height:0,left:0,top:0};function r(ke,We,Ve){return Object(g.useMemo)(function(){for(var Fe,_e=new Map,Le=We.get((Fe=ke[0])===null||Fe===void 0?void 0:Fe.key)||a,Te=Le.left+Le.width,Ne=0;Ne<ke.length;Ne+=1){var He=ke[Ne].key,Ke=We.get(He);if(!Ke){var Be;Ke=We.get((Be=ke[Ne-1])===null||Be===void 0?void 0:Be.key)||a}var Ye=_e.get(He)||Object(N.a)({},Ke);Ye.right=Te-Ye.left-Ye.width,_e.set(He,Ye)}return _e},[ke.map(function(Fe){return Fe.key}).join("_"),We,Ve])}var x={width:0,height:0,left:0,top:0,right:0};function y(ke,We,Ve,Fe,_e){var Le=_e.tabs,Te=_e.tabPosition,Ne=_e.rtl,He,Ke,Be;["top","bottom"].includes(Te)?(He="width",Ke=Ne?"right":"left",Be=Math.abs(We.left)):(He="height",Ke="top",Be=-We.top);var Ye=We[He],ot=Ve[He],xt=Fe[He],At=Ye;return ot+xt>Ye&&(At=Ye-xt),Object(g.useMemo)(function(){if(!Le.length)return[0,0];for(var Nt=Le.length,Er=Nt,Hr=0;Hr<Nt;Hr+=1){var Br=ke.get(Le[Hr].key)||x;if(Br[Ke]+Br[He]>Be+At){Er=Hr-1;break}}for(var Gr=0,Mr=Nt-1;Mr>=0;Mr-=1){var Yr=ke.get(Le[Mr].key)||x;if(Yr[Ke]<Be){Gr=Mr+1;break}}return[Gr,Er]},[ke,Be,At,Te,Le.map(function(Nt){return Nt.key}).join("_"),Ne])}var p=D("wx14"),R=D("1OyB"),O=D("vuIU"),b=D("JX7q"),E=D("Ji7U"),w=D("LK+K"),T=D("I8Z2"),F=D("bT9E"),M=D("2GS6"),L=D("Gytx"),Y=D.n(L),K=D("U8pU"),A=/iPhone/i,H=/iPod/i,U=/iPad/i,I=/\bAndroid(?:.+)Mobile\b/i,G=/Android/i,ne=/\bAndroid(?:.+)SD4930UR\b/i,oe=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,de=/Windows Phone/i,Oe=/\bWindows(?:.+)ARM\b/i,Ae=/BlackBerry/i,pe=/BB10/i,Se=/Opera Mini/i,be=/\b(CriOS|Chrome)(?:.+)Mobile/i,se=/Mobile(?:.+)Firefox\b/i;function ee(ke,We){return ke.test(We)}function B(ke){var We=ke||(typeof navigator!="undefined"?navigator.userAgent:""),Ve=(We||"").split("[FBAN");if(typeof Ve[1]!="undefined"){var Fe=Ve,_e=Object(v.a)(Fe,1);We=_e[0]}if(Ve=We.split("Twitter"),typeof Ve[1]!="undefined"){var Le=Ve,Te=Object(v.a)(Le,1);We=Te[0]}var Ne={apple:{phone:ee(A,We)&&!ee(de,We),ipod:ee(H,We),tablet:!ee(A,We)&&ee(U,We)&&!ee(de,We),device:(ee(A,We)||ee(H,We)||ee(U,We))&&!ee(de,We)},amazon:{phone:ee(ne,We),tablet:!ee(ne,We)&&ee(oe,We),device:ee(ne,We)||ee(oe,We)},android:{phone:!ee(de,We)&&ee(ne,We)||!ee(de,We)&&ee(I,We),tablet:!ee(de,We)&&!ee(ne,We)&&!ee(I,We)&&(ee(oe,We)||ee(G,We)),device:!ee(de,We)&&(ee(ne,We)||ee(oe,We)||ee(I,We)||ee(G,We))||ee(/\bokhttp\b/i,We)},windows:{phone:ee(de,We),tablet:ee(Oe,We),device:ee(de,We)||ee(Oe,We)},other:{blackberry:ee(Ae,We),blackberry10:ee(pe,We),opera:ee(Se,We),firefox:ee(se,We),chrome:ee(be,We),device:ee(Ae,We)||ee(pe,We)||ee(Se,We)||ee(se,We)||ee(be,We)},any:null,phone:null,tablet:null};return Ne.any=Ne.apple.device||Ne.android.device||Ne.windows.device||Ne.other.device,Ne.phone=Ne.apple.phone||Ne.android.phone||Ne.windows.phone,Ne.tablet=Ne.apple.tablet||Ne.android.tablet||Ne.windows.tablet,Ne}var V=Object(N.a)(Object(N.a)({},B()),{},{isMobile:B}),X=V;function Q(){}function Z(ke,We,Ve){var Fe=We||"";return ke.key||"".concat(Fe,"item_").concat(Ve)}function ie(ke){return"".concat(ke,"-menu-")}function re(ke,We){var Ve=-1;g.Children.forEach(ke,function(Fe){Ve+=1,Fe&&Fe.type&&Fe.type.isMenuItemGroup?g.Children.forEach(Fe.props.children,function(_e){Ve+=1,We(_e,Ve)}):We(Fe,Ve)})}function $(ke,We,Ve){if(!ke||Ve.find)return;g.Children.forEach(ke,function(Fe){if(Fe){var _e=Fe.type;if(!_e||!(_e.isSubMenu||_e.isMenuItem||_e.isMenuItemGroup))return;We.indexOf(Fe.key)!==-1?Ve.find=!0:Fe.props.children&&$(Fe.props.children,We,Ve)}})}var J=["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"],le=function(We){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=We&&typeof We.getBoundingClientRect=="function"&&We.getBoundingClientRect().width;if(Fe){if(Ve){var _e=getComputedStyle(We),Le=_e.marginLeft,Te=_e.marginRight;Fe+=+Le.replace("px","")+ +Te.replace("px","")}Fe=+Fe.toFixed(6)}return Fe||0},ue=function(We,Ve,Fe){We&&Object(K.a)(We.style)==="object"&&(We.style[Ve]=Fe)},xe=function(){return X.any},Me=D("bdgK"),Xe=D("i8i4"),$e=D.n(Xe),Je=D("wgJM"),rt=D("l4aY"),it=D("m+aA"),je=D("c+Xe"),Ie=D("zT1h"),qe=D("QC+M");function st(ke,We,Ve){return Ve?ke[0]===We[0]:ke[0]===We[0]&&ke[1]===We[1]}function Ee(ke,We,Ve){var Fe=ke[We]||{};return Object(N.a)(Object(N.a)({},Fe),Ve)}function ce(ke,We,Ve,Fe){for(var _e=Ve.points,Le=Object.keys(ke),Te=0;Te<Le.length;Te+=1){var Ne=Le[Te];if(st(ke[Ne].points,_e,Fe))return"".concat(We,"-placement-").concat(Ne)}return""}var fe=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var ke=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(ke)||/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(ke==null?void 0:ke.substr(0,4)))},ve=D("MNnm");function Ce(ke,We){var Ve={};return Ve[ke.toLowerCase()]=We.toLowerCase(),Ve["Webkit".concat(ke)]="webkit".concat(We),Ve["Moz".concat(ke)]="moz".concat(We),Ve["ms".concat(ke)]="MS".concat(We),Ve["O".concat(ke)]="o".concat(We.toLowerCase()),Ve}function ge(ke,We){var Ve={animationend:Ce("Animation","AnimationEnd"),transitionend:Ce("Transition","TransitionEnd")};return ke&&("AnimationEvent"in We||delete Ve.animationend.animation,"TransitionEvent"in We||delete Ve.transitionend.transition),Ve}var ye=ge(Object(ve.a)(),typeof window!="undefined"?window:{}),Re={};if(Object(ve.a)()){var De=document.createElement("div");Re=De.style}var Pe={};function ze(ke){if(Pe[ke])return Pe[ke];var We=ye[ke];if(We)for(var Ve=Object.keys(We),Fe=Ve.length,_e=0;_e<Fe;_e+=1){var Le=Ve[_e];if(Object.prototype.hasOwnProperty.call(We,Le)&&Le in Re)return Pe[ke]=We[Le],Pe[ke]}return""}var at=ze("animationend"),lt=ze("transitionend"),St=!!(at&<),Ot=at||"animationend",ir=lt||"transitionend";function Gt(ke,We){if(!ke)return null;if(Object(K.a)(ke)==="object"){var Ve=We.replace(/-\w/g,function(Fe){return Fe[1].toUpperCase()});return ke[Ve]}return"".concat(ke,"-").concat(We)}var yt="none",Fr="appear",Pr="enter",jr="leave",un="none",xr="prepare",an="start",tn="active",Ir="end";function hn(ke){var We=Object(g.useRef)(!1),Ve=Object(g.useState)(ke),Fe=Object(v.a)(Ve,2),_e=Fe[0],Le=Fe[1];function Te(Ne){We.current||Le(Ne)}return Object(g.useEffect)(function(){return function(){We.current=!0}},[]),[_e,Te]}var lr=Object(ve.a)()?g.useLayoutEffect:g.useEffect,Cr=lr,gr=function(){var ke=g.useRef(null);function We(){Je.a.cancel(ke.current)}function Ve(Fe){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;We();var Le=Object(Je.a)(function(){_e<=1?Fe({isCanceled:function(){return Le!==ke.current}}):Ve(Fe,_e-1)});ke.current=Le}return g.useEffect(function(){return function(){We()}},[]),[Ve,We]},xn=[xr,an,tn,Ir],Wn=!1,gn=!0;function Bt(ke){return ke===tn||ke===Ir}var Kr=function(ke,We){var Ve=g.useState(un),Fe=Object(v.a)(Ve,2),_e=Fe[0],Le=Fe[1],Te=gr(),Ne=Object(v.a)(Te,2),He=Ne[0],Ke=Ne[1];function Be(){Le(xr)}return Cr(function(){if(_e!==un&&_e!==Ir){var Ye=xn.indexOf(_e),ot=xn[Ye+1],xt=We(_e);xt===Wn?Le(ot):He(function(At){function Nt(){if(At.isCanceled())return;Le(ot)}xt===!0?Nt():Promise.resolve(xt).then(Nt)})}},[ke,_e]),g.useEffect(function(){return function(){Ke()}},[]),[Be,_e]},rn=function(ke){var We=Object(g.useRef)(),Ve=Object(g.useRef)(ke);Ve.current=ke;var Fe=g.useCallback(function(Te){Ve.current(Te)},[]);function _e(Te){Te&&(Te.removeEventListener(ir,Fe),Te.removeEventListener(Ot,Fe))}function Le(Te){We.current&&We.current!==Te&&_e(We.current),Te&&Te!==We.current&&(Te.addEventListener(ir,Fe),Te.addEventListener(Ot,Fe),We.current=Te)}return g.useEffect(function(){return function(){_e(We.current)}},[]),[Le,_e]};function Or(ke,We,Ve,Fe){var _e=Fe.motionEnter,Le=_e===void 0?!0:_e,Te=Fe.motionAppear,Ne=Te===void 0?!0:Te,He=Fe.motionLeave,Ke=He===void 0?!0:He,Be=Fe.motionDeadline,Ye=Fe.motionLeaveImmediately,ot=Fe.onAppearPrepare,xt=Fe.onEnterPrepare,At=Fe.onLeavePrepare,Nt=Fe.onAppearStart,Er=Fe.onEnterStart,Hr=Fe.onLeaveStart,Br=Fe.onAppearActive,Gr=Fe.onEnterActive,Mr=Fe.onLeaveActive,Yr=Fe.onAppearEnd,$r=Fe.onEnterEnd,cn=Fe.onLeaveEnd,en=Fe.onVisibleChanged,Tn=hn(),nn=Object(v.a)(Tn,2),Sr=nn[0],Dr=nn[1],Qr=hn(yt),ln=Object(v.a)(Qr,2),hr=ln[0],fn=ln[1],Pn=hn(null),vn=Object(v.a)(Pn,2),On=vn[0],bn=vn[1],Gn=Object(g.useRef)(!1),$n=Object(g.useRef)(null),Mn=Object(g.useRef)(!1),ni=Object(g.useRef)(null);function ji(){var Sn=Ve();return Sn||ni.current}var pi=Object(g.useRef)(!1);function Jn(Sn){var _n=ji();if(Sn&&!Sn.deadline&&Sn.target!==_n)return;var Xn;hr===Fr&&pi.current?Xn=Yr==null?void 0:Yr(_n,Sn):hr===Pr&&pi.current?Xn=$r==null?void 0:$r(_n,Sn):hr===jr&&pi.current&&(Xn=cn==null?void 0:cn(_n,Sn)),Xn!==!1&&!Mn.current&&(fn(yt),bn(null))}var An=rn(Jn),Rn=Object(v.a)(An,1),Nn=Rn[0],kn=g.useMemo(function(){var Sn,_n,Xn;switch(hr){case"appear":return Sn={},Object(P.a)(Sn,xr,ot),Object(P.a)(Sn,an,Nt),Object(P.a)(Sn,tn,Br),Sn;case"enter":return _n={},Object(P.a)(_n,xr,xt),Object(P.a)(_n,an,Er),Object(P.a)(_n,tn,Gr),_n;case"leave":return Xn={},Object(P.a)(Xn,xr,At),Object(P.a)(Xn,an,Hr),Object(P.a)(Xn,tn,Mr),Xn;default:return{}}},[hr]),Vn=Kr(hr,function(Sn){if(Sn===xr){var _n=kn[xr];return _n?_n(ji()):Wn}if(En in kn){var Xn;bn(((Xn=kn[En])===null||Xn===void 0?void 0:Xn.call(kn,ji(),null))||null)}return En===tn&&(Nn(ji()),Be>0&&(clearTimeout($n.current),$n.current=setTimeout(function(){Jn({deadline:!0})},Be))),gn}),_i=Object(v.a)(Vn,2),Xi=_i[0],En=_i[1],Ai=Bt(En);pi.current=Ai,Cr(function(){Dr(We);var Sn=Gn.current;if(Gn.current=!0,!ke)return;var _n;!Sn&&We&&Ne&&(_n=Fr),Sn&&We&&Le&&(_n=Pr),(Sn&&!We&&Ke||!Sn&&Ye&&!We&&Ke)&&(_n=jr),_n&&(fn(_n),Xi())},[We]),Object(g.useEffect)(function(){(hr===Fr&&!Ne||hr===Pr&&!Le||hr===jr&&!Ke)&&fn(yt)},[Ne,Le,Ke]),Object(g.useEffect)(function(){return function(){clearTimeout($n.current),Mn.current=!0}},[]),Object(g.useEffect)(function(){Sr!==void 0&&hr===yt&&(en==null||en(Sr))},[Sr,hr]);var Ri=On;return kn[xr]&&En===an&&(Ri=Object(N.a)({transition:"none"},Ri)),[hr,En,Ri,Sr!=null?Sr:We]}var Lr=function(ke){Object(E.a)(Ve,ke);var We=Object(w.a)(Ve);function Ve(){return Object(R.a)(this,Ve),We.apply(this,arguments)}return Object(O.a)(Ve,[{key:"render",value:function(){return this.props.children}}]),Ve}(g.Component),Wr=Lr;function Fn(ke){var We=ke;Object(K.a)(ke)==="object"&&(We=ke.transitionSupport);function Ve(_e){return!!(_e.motionName&&We)}var Fe=g.forwardRef(function(_e,Le){var Te=_e.visible,Ne=Te===void 0?!0:Te,He=_e.removeOnLeave,Ke=He===void 0?!0:He,Be=_e.forceRender,Ye=_e.children,ot=_e.motionName,xt=_e.leavedClassName,At=_e.eventProps,Nt=Ve(_e),Er=Object(g.useRef)(),Hr=Object(g.useRef)();function Br(){try{return Object(it.a)(Er.current||Hr.current)}catch(fn){return null}}var Gr=Or(Nt,Ne,Br,_e),Mr=Object(v.a)(Gr,4),Yr=Mr[0],$r=Mr[1],cn=Mr[2],en=Mr[3],Tn=g.useRef(en);en&&(Tn.current=!0);var nn=Object(g.useRef)(Le);nn.current=Le;var Sr=g.useCallback(function(fn){Er.current=fn,Object(je.b)(nn.current,fn)},[]),Dr,Qr=Object(N.a)(Object(N.a)({},At),{},{visible:Ne});if(!Ye)Dr=null;else if(Yr===yt||!Ve(_e))en?Dr=Ye(Object(N.a)({},Qr),Sr):!Ke&&Tn.current?Dr=Ye(Object(N.a)(Object(N.a)({},Qr),{},{className:xt}),Sr):Be?Dr=Ye(Object(N.a)(Object(N.a)({},Qr),{},{style:{display:"none"}}),Sr):Dr=null;else{var ln,hr;$r===xr?hr="prepare":Bt($r)?hr="active":$r===an&&(hr="start"),Dr=Ye(Object(N.a)(Object(N.a)({},Qr),{},{className:S()(Gt(ot,Yr),(ln={},Object(P.a)(ln,Gt(ot,"".concat(Yr,"-").concat(hr)),hr),Object(P.a)(ln,ot,typeof ot=="string"),ln)),style:cn}),Sr)}return g.createElement(Wr,{ref:Hr},Dr)});return Fe.displayName="CSSMotion",Fe}var yn=Fn(St),Ct="add",ur="keep",oi="remove",wi="removed";function Pi(ke){var We;return ke&&Object(K.a)(ke)==="object"&&"key"in ke?We=ke:We={key:ke},Object(N.a)(Object(N.a)({},We),{},{key:String(We.key)})}function vi(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return ke.map(Pi)}function Un(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ve=[],Fe=0,_e=We.length,Le=vi(ke),Te=vi(We);Le.forEach(function(Ke){for(var Be=!1,Ye=Fe;Ye<_e;Ye+=1){var ot=Te[Ye];if(ot.key===Ke.key){Fe<Ye&&(Ve=Ve.concat(Te.slice(Fe,Ye).map(function(xt){return Object(N.a)(Object(N.a)({},xt),{},{status:Ct})})),Fe=Ye),Ve.push(Object(N.a)(Object(N.a)({},ot),{},{status:ur})),Fe+=1,Be=!0;break}}Be||Ve.push(Object(N.a)(Object(N.a)({},Ke),{},{status:oi}))}),Fe<_e&&(Ve=Ve.concat(Te.slice(Fe).map(function(Ke){return Object(N.a)(Object(N.a)({},Ke),{},{status:Ct})})));var Ne={};Ve.forEach(function(Ke){var Be=Ke.key;Ne[Be]=(Ne[Be]||0)+1});var He=Object.keys(Ne).filter(function(Ke){return Ne[Ke]>1});return He.forEach(function(Ke){Ve=Ve.filter(function(Be){var Ye=Be.key,ot=Be.status;return Ye!==Ke||ot!==oi}),Ve.forEach(function(Be){Be.key===Ke&&(Be.status=ur)})}),Ve}var wr=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function si(ke){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yn,Ve=function(Fe){Object(E.a)(Le,Fe);var _e=Object(w.a)(Le);function Le(){var Te;return Object(R.a)(this,Le),Te=_e.apply(this,arguments),Te.state={keyEntities:[]},Te.removeKey=function(Ne){Te.setState(function(He){var Ke=He.keyEntities;return{keyEntities:Ke.map(function(Be){return Be.key!==Ne?Be:Object(N.a)(Object(N.a)({},Be),{},{status:wi})})}})},Te}return Object(O.a)(Le,[{key:"render",value:function(){var Ne=this,He=this.state.keyEntities,Ke=this.props,Be=Ke.component,Ye=Ke.children,ot=Ke.onVisibleChanged,xt=Object(C.a)(Ke,["component","children","onVisibleChanged"]),At=Be||g.Fragment,Nt={};return wr.forEach(function(Er){Nt[Er]=xt[Er],delete xt[Er]}),delete xt.keys,g.createElement(At,xt,He.map(function(Er){var Hr=Er.status,Br=Object(C.a)(Er,["status"]),Gr=Hr===Ct||Hr===ur;return g.createElement(We,Object(p.a)({},Nt,{key:Br.key,visible:Gr,eventProps:Br,onVisibleChanged:function(Yr){ot==null||ot(Yr,{key:Br.key}),Yr||Ne.removeKey(Br.key)}}),Ye)}))}}],[{key:"getDerivedStateFromProps",value:function(Ne,He){var Ke=Ne.keys,Be=He.keyEntities,Ye=vi(Ke),ot=Un(Be,Ye);return{keyEntities:ot.filter(function(xt){var At=Be.find(function(Nt){var Er=Nt.key;return xt.key===Er});return!(At&&At.status===wi&&xt.status===oi)})}}}]),Le}(g.Component);return Ve.defaultProps={component:"div"},Ve}var It=si(St),Zn=yn;function Bn(ke){var We=ke.prefixCls,Ve=ke.motion,Fe=ke.animation,_e=ke.transitionName;return Ve||(Fe?{motionName:"".concat(We,"-").concat(Fe)}:_e?{motionName:_e}:null)}function zi(ke){var We=ke.prefixCls,Ve=ke.visible,Fe=ke.zIndex,_e=ke.mask,Le=ke.maskMotion,Te=ke.maskAnimation,Ne=ke.maskTransitionName;if(!_e)return null;var He={};return(Le||Ne||Te)&&(He=Object(N.a)({motionAppear:!0},Bn({motion:Le,prefixCls:We,transitionName:Ne,animation:Te}))),g.createElement(Zn,Object(p.a)({},He,{visible:Ve,removeOnLeave:!0}),function(Ke){var Be=Ke.className;return g.createElement("div",{style:{zIndex:Fe},className:S()("".concat(We,"-mask"),Be)})})}var Ti=D("9mu1"),ri=D("o0o1"),Qi=D.n(ri),Zi=D("HaE+"),li=["measure","align",null,"motion"],In=function(ke,We){var Ve=Object(g.useState)(null),Fe=Object(v.a)(Ve,2),_e=Fe[0],Le=Fe[1],Te=Object(g.useRef)(),Ne=Object(g.useRef)(!1);function He(Ye){Ne.current||Le(Ye)}function Ke(){Je.a.cancel(Te.current)}function Be(Ye){Ke(),Te.current=Object(Je.a)(function(){He(function(ot){switch(_e){case"align":return"motion";case"motion":return"stable";default:}return ot}),Ye==null||Ye()})}return Object(g.useEffect)(function(){He("measure")},[ke]),Object(g.useEffect)(function(){switch(_e){case"measure":We();break;default:}_e&&(Te.current=Object(Je.a)(Object(Zi.a)(Qi.a.mark(function Ye(){var ot,xt;return Qi.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:ot=li.indexOf(_e),xt=li[ot+1],xt&&ot!==-1&&He(xt);case 3:case"end":return Nt.stop()}},Ye)}))))},[_e]),Object(g.useEffect)(function(){return function(){Ne.current=!0,Ke()}},[]),[_e,Be]},ui=function(ke){var We=g.useState({width:0,height:0}),Ve=Object(v.a)(We,2),Fe=Ve[0],_e=Ve[1];function Le(Ne){_e({width:Ne.offsetWidth,height:Ne.offsetHeight})}var Te=g.useMemo(function(){var Ne={};if(ke){var He=Fe.width,Ke=Fe.height;ke.indexOf("height")!==-1&&Ke?Ne.height=Ke:ke.indexOf("minHeight")!==-1&&Ke&&(Ne.minHeight=Ke),ke.indexOf("width")!==-1&&He?Ne.width=He:ke.indexOf("minWidth")!==-1&&He&&(Ne.minWidth=He)}return Ne},[ke,Fe]);return[Te,Le]},Mi=g.forwardRef(function(ke,We){var Ve=ke.visible,Fe=ke.prefixCls,_e=ke.className,Le=ke.style,Te=ke.children,Ne=ke.zIndex,He=ke.stretch,Ke=ke.destroyPopupOnHide,Be=ke.forceRender,Ye=ke.align,ot=ke.point,xt=ke.getRootDomNode,At=ke.getClassNameFromAlign,Nt=ke.onAlign,Er=ke.onMouseEnter,Hr=ke.onMouseLeave,Br=ke.onMouseDown,Gr=ke.onTouchStart,Mr=Object(g.useRef)(),Yr=Object(g.useRef)(),$r=Object(g.useState)(),cn=Object(v.a)($r,2),en=cn[0],Tn=cn[1],nn=ui(He),Sr=Object(v.a)(nn,2),Dr=Sr[0],Qr=Sr[1];function ln(){He&&Qr(xt())}var hr=In(Ve,ln),fn=Object(v.a)(hr,2),Pn=fn[0],vn=fn[1],On=Object(g.useRef)();function bn(){return ot||xt}function Gn(){var An;(An=Mr.current)===null||An===void 0||An.forceAlign()}function $n(An,Rn){var Nn=At(Rn);en!==Nn&&Tn(Nn),Pn==="align"&&(en!==Nn?Promise.resolve().then(function(){Gn()}):vn(function(){var kn;(kn=On.current)===null||kn===void 0||kn.call(On)}),Nt==null||Nt(An,Rn))}var Mn=Object(N.a)({},Bn(ke));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(An){var Rn=Mn[An];Mn[An]=function(Nn,kn){return vn(),Rn==null?void 0:Rn(Nn,kn)}});function ni(){return new Promise(function(An){On.current=An})}g.useEffect(function(){!Mn.motionName&&Pn==="motion"&&vn()},[Mn.motionName,Pn]),g.useImperativeHandle(We,function(){return{forceAlign:Gn,getElement:function(){return Yr.current}}});var ji=Object(N.a)(Object(N.a)({},Dr),{},{zIndex:Ne,opacity:Pn==="motion"||Pn==="stable"||!Ve?void 0:0,pointerEvents:Pn==="stable"?void 0:"none"},Le),pi=!0;(Ye==null?void 0:Ye.points)&&(Pn==="align"||Pn==="stable")&&(pi=!1);var Jn=Te;return g.Children.count(Te)>1&&(Jn=g.createElement("div",{className:"".concat(Fe,"-content")},Te)),g.createElement(Zn,Object(p.a)({visible:Ve,ref:Yr,leavedClassName:"".concat(Fe,"-hidden")},Mn,{onAppearPrepare:ni,onEnterPrepare:ni,removeOnLeave:Ke,forceRender:Be}),function(An,Rn){var Nn=An.className,kn=An.style,Vn=S()(Fe,_e,en,Nn);return g.createElement(Ti.a,{target:bn(),key:"popup",ref:Mr,monitorWindowResize:!0,disabled:pi,align:Ye,onAlign:$n},g.createElement("div",{ref:Rn,className:Vn,onMouseEnter:Er,onMouseLeave:Hr,onMouseDownCapture:Br,onTouchStartCapture:Gr,style:Object(N.a)(Object(N.a)({},kn),ji)},Jn))})});Mi.displayName="PopupInner";var yi=Mi,bi=g.forwardRef(function(ke,We){var Ve=ke.prefixCls,Fe=ke.visible,_e=ke.zIndex,Le=ke.children,Te=ke.mobile;Te=Te===void 0?{}:Te;var Ne=Te.popupClassName,He=Te.popupStyle,Ke=Te.popupMotion,Be=Ke===void 0?{}:Ke,Ye=Te.popupRender,ot=g.useRef();g.useImperativeHandle(We,function(){return{forceAlign:function(){},getElement:function(){return ot.current}}});var xt=Object(N.a)({zIndex:_e},He),At=Le;return g.Children.count(Le)>1&&(At=g.createElement("div",{className:"".concat(Ve,"-content")},Le)),Ye&&(At=Ye(At)),g.createElement(Zn,Object(p.a)({visible:Fe,ref:ot,removeOnLeave:!0},Be),function(Nt,Er){var Hr=Nt.className,Br=Nt.style,Gr=S()(Ve,Ne,Hr);return g.createElement("div",{ref:Er,className:Gr,style:Object(N.a)(Object(N.a)({},Br),xt)},At)})});bi.displayName="MobilePopupInner";var Da=bi,Vi=["visible","mobile"],zn=g.forwardRef(function(ke,We){var Ve=ke.visible,Fe=ke.mobile,_e=Object(C.a)(ke,Vi),Le=Object(g.useState)(Ve),Te=Object(v.a)(Le,2),Ne=Te[0],He=Te[1],Ke=Object(g.useState)(!1),Be=Object(v.a)(Ke,2),Ye=Be[0],ot=Be[1],xt=Object(N.a)(Object(N.a)({},_e),{},{visible:Ne});Object(g.useEffect)(function(){He(Ve),Ve&&Fe&&ot(fe())},[Ve,Fe]);var At=Ye?g.createElement(Da,Object(p.a)({},xt,{mobile:Fe,ref:We})):g.createElement(yi,Object(p.a)({},xt,{ref:We}));return g.createElement("div",null,g.createElement(zi,xt),At)});zn.displayName="Popup";var Gi=zn,_a=g.createContext(null),Ni=_a;function ci(){}function oa(){return""}function pa(ke){return ke?ke.ownerDocument:window.document}var sa=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function ma(ke){var We=function(Ve){Object(E.a)(_e,Ve);var Fe=Object(w.a)(_e);function _e(Le){var Te;Object(R.a)(this,_e),Te=Fe.call(this,Le),Te.popupRef=g.createRef(),Te.triggerRef=g.createRef(),Te.attachId=void 0,Te.clickOutsideHandler=void 0,Te.touchOutsideHandler=void 0,Te.contextMenuOutsideHandler1=void 0,Te.contextMenuOutsideHandler2=void 0,Te.mouseDownTimeout=void 0,Te.focusTime=void 0,Te.preClickTime=void 0,Te.preTouchTime=void 0,Te.delayTimer=void 0,Te.hasPopupMouseDown=void 0,Te.onMouseEnter=function(He){var Ke=Te.props.mouseEnterDelay;Te.fireEvents("onMouseEnter",He),Te.delaySetPopupVisible(!0,Ke,Ke?null:He)},Te.onMouseMove=function(He){Te.fireEvents("onMouseMove",He),Te.setPoint(He)},Te.onMouseLeave=function(He){Te.fireEvents("onMouseLeave",He),Te.delaySetPopupVisible(!1,Te.props.mouseLeaveDelay)},Te.onPopupMouseEnter=function(){Te.clearDelayTimer()},Te.onPopupMouseLeave=function(He){var Ke;if(He.relatedTarget&&!He.relatedTarget.setTimeout&&Object(rt.a)((Ke=Te.popupRef.current)===null||Ke===void 0?void 0:Ke.getElement(),He.relatedTarget))return;Te.delaySetPopupVisible(!1,Te.props.mouseLeaveDelay)},Te.onFocus=function(He){Te.fireEvents("onFocus",He),Te.clearDelayTimer(),Te.isFocusToShow()&&(Te.focusTime=Date.now(),Te.delaySetPopupVisible(!0,Te.props.focusDelay))},Te.onMouseDown=function(He){Te.fireEvents("onMouseDown",He),Te.preClickTime=Date.now()},Te.onTouchStart=function(He){Te.fireEvents("onTouchStart",He),Te.preTouchTime=Date.now()},Te.onBlur=function(He){Te.fireEvents("onBlur",He),Te.clearDelayTimer(),Te.isBlurToHide()&&Te.delaySetPopupVisible(!1,Te.props.blurDelay)},Te.onContextMenu=function(He){He.preventDefault(),Te.fireEvents("onContextMenu",He),Te.setPopupVisible(!0,He)},Te.onContextMenuClose=function(){Te.isContextMenuToShow()&&Te.close()},Te.onClick=function(He){if(Te.fireEvents("onClick",He),Te.focusTime){var Ke;if(Te.preClickTime&&Te.preTouchTime?Ke=Math.min(Te.preClickTime,Te.preTouchTime):Te.preClickTime?Ke=Te.preClickTime:Te.preTouchTime&&(Ke=Te.preTouchTime),Math.abs(Ke-Te.focusTime)<20)return;Te.focusTime=0}Te.preClickTime=0,Te.preTouchTime=0,Te.isClickToShow()&&(Te.isClickToHide()||Te.isBlurToHide())&&He&&He.preventDefault&&He.preventDefault();var Be=!Te.state.popupVisible;(Te.isClickToHide()&&!Be||Be&&Te.isClickToShow())&&Te.setPopupVisible(!Te.state.popupVisible,He)},Te.onPopupMouseDown=function(){if(Te.hasPopupMouseDown=!0,clearTimeout(Te.mouseDownTimeout),Te.mouseDownTimeout=window.setTimeout(function(){Te.hasPopupMouseDown=!1},0),Te.context){var He;(He=Te.context).onPopupMouseDown.apply(He,arguments)}},Te.onDocumentClick=function(He){if(Te.props.mask&&!Te.props.maskClosable)return;var Ke=He.target,Be=Te.getRootDomNode(),Ye=Te.getPopupDomNode();(!Object(rt.a)(Be,Ke)||Te.isContextMenuOnly())&&!Object(rt.a)(Ye,Ke)&&!Te.hasPopupMouseDown&&Te.close()},Te.getRootDomNode=function(){var He=Te.props.getTriggerDOMNode;if(He)return He(Te.triggerRef.current);try{var Ke=Object(it.a)(Te.triggerRef.current);if(Ke)return Ke}catch(Be){}return $e.a.findDOMNode(Object(b.a)(Te))},Te.getPopupClassNameFromAlign=function(He){var Ke=[],Be=Te.props,Ye=Be.popupPlacement,ot=Be.builtinPlacements,xt=Be.prefixCls,At=Be.alignPoint,Nt=Be.getPopupClassNameFromAlign;return Ye&&ot&&Ke.push(ce(ot,xt,He,At)),Nt&&Ke.push(Nt(He)),Ke.join(" ")},Te.getComponent=function(){var He=Te.props,Ke=He.prefixCls,Be=He.destroyPopupOnHide,Ye=He.popupClassName,ot=He.onPopupAlign,xt=He.popupMotion,At=He.popupAnimation,Nt=He.popupTransitionName,Er=He.popupStyle,Hr=He.mask,Br=He.maskAnimation,Gr=He.maskTransitionName,Mr=He.maskMotion,Yr=He.zIndex,$r=He.popup,cn=He.stretch,en=He.alignPoint,Tn=He.mobile,nn=He.forceRender,Sr=Te.state,Dr=Sr.popupVisible,Qr=Sr.point,ln=Te.getPopupAlign(),hr={};return Te.isMouseEnterToShow()&&(hr.onMouseEnter=Te.onPopupMouseEnter),Te.isMouseLeaveToHide()&&(hr.onMouseLeave=Te.onPopupMouseLeave),hr.onMouseDown=Te.onPopupMouseDown,hr.onTouchStart=Te.onPopupMouseDown,g.createElement(Gi,Object(p.a)({prefixCls:Ke,destroyPopupOnHide:Be,visible:Dr,point:en&&Qr,className:Ye,align:ln,onAlign:ot,animation:At,getClassNameFromAlign:Te.getPopupClassNameFromAlign},hr,{stretch:cn,getRootDomNode:Te.getRootDomNode,style:Er,mask:Hr,zIndex:Yr,transitionName:Nt,maskAnimation:Br,maskTransitionName:Gr,maskMotion:Mr,ref:Te.popupRef,motion:xt,mobile:Tn,forceRender:nn}),typeof $r=="function"?$r():$r)},Te.attachParent=function(He){Je.a.cancel(Te.attachId);var Ke=Te.props,Be=Ke.getPopupContainer,Ye=Ke.getDocument,ot=Te.getRootDomNode(),xt;Be?(ot||Be.length===0)&&(xt=Be(ot)):xt=Ye(Te.getRootDomNode()).body,xt?xt.appendChild(He):Te.attachId=Object(Je.a)(function(){Te.attachParent(He)})},Te.getContainer=function(){var He=Te.props.getDocument,Ke=He(Te.getRootDomNode()).createElement("div");return Ke.style.position="absolute",Ke.style.top="0",Ke.style.left="0",Ke.style.width="100%",Te.attachParent(Ke),Ke},Te.setPoint=function(He){var Ke=Te.props.alignPoint;if(!Ke||!He)return;Te.setState({point:{pageX:He.pageX,pageY:He.pageY}})},Te.handlePortalUpdate=function(){Te.state.prevPopupVisible!==Te.state.popupVisible&&Te.props.afterPopupVisibleChange(Te.state.popupVisible)},Te.triggerContextValue={onPopupMouseDown:Te.onPopupMouseDown};var Ne;return"popupVisible"in Le?Ne=!!Le.popupVisible:Ne=!!Le.defaultPopupVisible,Te.state={prevPopupVisible:Ne,popupVisible:Ne},sa.forEach(function(He){Te["fire".concat(He)]=function(Ke){Te.fireEvents(He,Ke)}}),Te}return Object(O.a)(_e,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Te=this.props,Ne=this.state;if(Ne.popupVisible){var He;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(He=Te.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ie.a)(He,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(He=He||Te.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ie.a)(He,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(He=He||Te.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ie.a)(He,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Ie.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Je.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var Te;return((Te=this.popupRef.current)===null||Te===void 0?void 0:Te.getElement())||null}},{key:"getPopupAlign",value:function(){var Te=this.props,Ne=Te.popupPlacement,He=Te.popupAlign,Ke=Te.builtinPlacements;return Ne&&Ke?Ee(Ke,Ne,He):He}},{key:"setPopupVisible",value:function(Te,Ne){var He=this.props.alignPoint,Ke=this.state.popupVisible;this.clearDelayTimer(),Ke!==Te&&("popupVisible"in this.props||this.setState({popupVisible:Te,prevPopupVisible:Ke}),this.props.onPopupVisibleChange(Te)),He&&Ne&&Te&&this.setPoint(Ne)}},{key:"delaySetPopupVisible",value:function(Te,Ne,He){var Ke=this,Be=Ne*1e3;if(this.clearDelayTimer(),Be){var Ye=He?{pageX:He.pageX,pageY:He.pageY}:null;this.delayTimer=window.setTimeout(function(){Ke.setPopupVisible(Te,Ye),Ke.clearDelayTimer()},Be)}else this.setPopupVisible(Te,He)}},{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(Te){var Ne=this.props.children.props,He=this.props;return Ne[Te]&&He[Te]?this["fire".concat(Te)]:Ne[Te]||He[Te]}},{key:"isClickToShow",value:function(){var Te=this.props,Ne=Te.action,He=Te.showAction;return Ne.indexOf("click")!==-1||He.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var Te=this.props.action;return Te==="contextMenu"||Te.length===1&&Te[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var Te=this.props,Ne=Te.action,He=Te.showAction;return Ne.indexOf("contextMenu")!==-1||He.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var Te=this.props,Ne=Te.action,He=Te.hideAction;return Ne.indexOf("click")!==-1||He.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var Te=this.props,Ne=Te.action,He=Te.showAction;return Ne.indexOf("hover")!==-1||He.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var Te=this.props,Ne=Te.action,He=Te.hideAction;return Ne.indexOf("hover")!==-1||He.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var Te=this.props,Ne=Te.action,He=Te.showAction;return Ne.indexOf("focus")!==-1||He.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var Te=this.props,Ne=Te.action,He=Te.hideAction;return Ne.indexOf("focus")!==-1||He.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var Te;(Te=this.popupRef.current)===null||Te===void 0||Te.forceAlign()}}},{key:"fireEvents",value:function(Te,Ne){var He=this.props.children.props[Te];He&&He(Ne);var Ke=this.props[Te];Ke&&Ke(Ne)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var Te=this.state.popupVisible,Ne=this.props,He=Ne.children,Ke=Ne.forceRender,Be=Ne.alignPoint,Ye=Ne.className,ot=Ne.autoDestroy,xt=g.Children.only(He),At={key:"trigger"};this.isContextMenuToShow()?At.onContextMenu=this.onContextMenu:At.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(At.onClick=this.onClick,At.onMouseDown=this.onMouseDown,At.onTouchStart=this.onTouchStart):(At.onClick=this.createTwoChains("onClick"),At.onMouseDown=this.createTwoChains("onMouseDown"),At.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(At.onMouseEnter=this.onMouseEnter,Be&&(At.onMouseMove=this.onMouseMove)):At.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?At.onMouseLeave=this.onMouseLeave:At.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(At.onFocus=this.onFocus,At.onBlur=this.onBlur):(At.onFocus=this.createTwoChains("onFocus"),At.onBlur=this.createTwoChains("onBlur"));var Nt=S()(xt&&xt.props&&xt.props.className,Ye);Nt&&(At.className=Nt);var Er=Object(N.a)({},At);Object(je.c)(xt)&&(Er.ref=Object(je.a)(this.triggerRef,xt.ref));var Hr=g.cloneElement(xt,Er),Br;return(Te||this.popupRef.current||Ke)&&(Br=g.createElement(ke,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!Te&&ot&&(Br=null),g.createElement(Ni.Provider,{value:this.triggerContextValue},Hr,Br)}}],[{key:"getDerivedStateFromProps",value:function(Te,Ne){var He=Te.popupVisible,Ke={};return He!==void 0&&Ne.popupVisible!==He&&(Ke.popupVisible=He,Ke.prevPopupVisible=Ne.popupVisible),Ke}}]),_e}(g.Component);return We.contextType=Ni,We.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:oa,getDocument:pa,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},We}var qi=ma(qe.a),Si={adjustX:1,adjustY:1},ea={topLeft:{points:["bl","tl"],overflow:Si,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Si,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Si,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Si,offset:[4,0]}},Ea={topLeft:{points:["bl","tl"],overflow:Si,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Si,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Si,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Si,offset:[4,0]}},mt=ea,tt=0,pt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Et=function(We,Ve,Fe){var _e=ie(Ve),Le=We.getState();We.setState({defaultActiveFirst:Object(N.a)(Object(N.a)({},Le.defaultActiveFirst),{},Object(P.a)({},_e,Fe))})},Ut=function(ke){Object(E.a)(Ve,ke);var We=Object(w.a)(Ve);function Ve(Fe){var _e;Object(R.a)(this,Ve),_e=We.call(this,Fe),_e.onDestroy=function(Be){_e.props.onDestroy(Be)},_e.onKeyDown=function(Be){var Ye=Be.keyCode,ot=_e.menuInstance,xt=_e.props.store,At=_e.getVisible();if(Ye===h.a.ENTER)return _e.onTitleClick(Be),Et(xt,_e.props.eventKey,!0),!0;if(Ye===h.a.RIGHT)return At?ot.onKeyDown(Be):(_e.triggerOpenChange(!0),Et(xt,_e.props.eventKey,!0)),!0;if(Ye===h.a.LEFT){var Nt;if(At)Nt=ot.onKeyDown(Be);else return;return Nt||(_e.triggerOpenChange(!1),Nt=!0),Nt}return At&&(Ye===h.a.UP||Ye===h.a.DOWN)?ot.onKeyDown(Be):void 0},_e.onOpenChange=function(Be){_e.props.onOpenChange(Be)},_e.onPopupVisibleChange=function(Be){_e.triggerOpenChange(Be,Be?"mouseenter":"mouseleave")},_e.onMouseEnter=function(Be){var Ye=_e.props,ot=Ye.eventKey,xt=Ye.onMouseEnter,At=Ye.store;Et(At,_e.props.eventKey,!1),xt({key:ot,domEvent:Be})},_e.onMouseLeave=function(Be){var Ye=_e.props,ot=Ye.parentMenu,xt=Ye.eventKey,At=Ye.onMouseLeave;ot.subMenuInstance=Object(b.a)(_e),At({key:xt,domEvent:Be})},_e.onTitleMouseEnter=function(Be){var Ye=_e.props,ot=Ye.eventKey,xt=Ye.onItemHover,At=Ye.onTitleMouseEnter;xt({key:ot,hover:!0}),At({key:ot,domEvent:Be})},_e.onTitleMouseLeave=function(Be){var Ye=_e.props,ot=Ye.parentMenu,xt=Ye.eventKey,At=Ye.onItemHover,Nt=Ye.onTitleMouseLeave;ot.subMenuInstance=Object(b.a)(_e),At({key:xt,hover:!1}),Nt({key:xt,domEvent:Be})},_e.onTitleClick=function(Be){var Ye=Object(b.a)(_e),ot=Ye.props;if(ot.onTitleClick({key:ot.eventKey,domEvent:Be}),ot.triggerSubMenuAction==="hover")return;_e.triggerOpenChange(!_e.getVisible(),"click"),Et(ot.store,_e.props.eventKey,!1)},_e.onSubMenuClick=function(Be){typeof _e.props.onClick=="function"&&_e.props.onClick(_e.addKeyPath(Be))},_e.onSelect=function(Be){_e.props.onSelect(Be)},_e.onDeselect=function(Be){_e.props.onDeselect(Be)},_e.getPrefixCls=function(){return"".concat(_e.props.rootPrefixCls,"-submenu")},_e.getActiveClassName=function(){return"".concat(_e.getPrefixCls(),"-active")},_e.getDisabledClassName=function(){return"".concat(_e.getPrefixCls(),"-disabled")},_e.getSelectedClassName=function(){return"".concat(_e.getPrefixCls(),"-selected")},_e.getOpenClassName=function(){return"".concat(_e.props.rootPrefixCls,"-submenu-open")},_e.getVisible=function(){return _e.state.isOpen},_e.getMode=function(){return _e.state.mode},_e.saveMenuInstance=function(Be){_e.menuInstance=Be},_e.addKeyPath=function(Be){return Object(N.a)(Object(N.a)({},Be),{},{keyPath:(Be.keyPath||[]).concat(_e.props.eventKey)})},_e.triggerOpenChange=function(Be,Ye){var ot=_e.props.eventKey,xt=function(){_e.onOpenChange({key:ot,item:Object(b.a)(_e),trigger:Ye,open:Be})};Ye==="mouseenter"?_e.mouseenterTimeout=setTimeout(function(){xt()},0):xt()},_e.isChildrenSelected=function(){var Be={find:!1};return $(_e.props.children,_e.props.selectedKeys,Be),Be.find},_e.isInlineMode=function(){return _e.getMode()==="inline"},_e.adjustWidth=function(){if(!_e.subMenuTitle||!_e.menuInstance)return;var Be=Xe.findDOMNode(_e.menuInstance);if(Be.offsetWidth>=_e.subMenuTitle.offsetWidth)return;Be.style.minWidth="".concat(_e.subMenuTitle.offsetWidth,"px")},_e.saveSubMenuTitle=function(Be){_e.subMenuTitle=Be},_e.getBaseProps=function(){var Be=Object(b.a)(_e),Ye=Be.props,ot=_e.getMode();return{mode:ot==="horizontal"?"vertical":ot,visible:_e.getVisible(),level:Ye.level+1,inlineIndent:Ye.inlineIndent,focusable:!1,onClick:_e.onSubMenuClick,onSelect:_e.onSelect,onDeselect:_e.onDeselect,onDestroy:_e.onDestroy,selectedKeys:Ye.selectedKeys,eventKey:"".concat(Ye.eventKey,"-menu-"),openKeys:Ye.openKeys,motion:Ye.motion,onOpenChange:_e.onOpenChange,subMenuOpenDelay:Ye.subMenuOpenDelay,parentMenu:Object(b.a)(_e),subMenuCloseDelay:Ye.subMenuCloseDelay,forceSubMenuRender:Ye.forceSubMenuRender,triggerSubMenuAction:Ye.triggerSubMenuAction,builtinPlacements:Ye.builtinPlacements,defaultActiveFirst:Ye.store.getState().defaultActiveFirst[ie(Ye.eventKey)],multiple:Ye.multiple,prefixCls:Ye.rootPrefixCls,id:_e.internalMenuId,manualRef:_e.saveMenuInstance,itemIcon:Ye.itemIcon,expandIcon:Ye.expandIcon,direction:Ye.direction}},_e.getMotion=function(Be,Ye){var ot=Object(b.a)(_e),xt=ot.haveRendered,At=_e.props,Nt=At.motion,Er=At.rootPrefixCls,Hr=Object(N.a)(Object(N.a)({},Nt),{},{leavedClassName:"".concat(Er,"-hidden"),removeOnLeave:!1,motionAppear:xt||!Ye||Be!=="inline"});return Hr};var Le=Fe.store,Te=Fe.eventKey,Ne=Le.getState(),He=Ne.defaultActiveFirst;_e.isRootMenu=!1;var Ke=!1;return He&&(Ke=He[Te]),Et(Le,Te,Ke),_e.state={mode:Fe.mode,isOpen:Fe.isOpen},_e}return Object(O.a)(Ve,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var _e=this,Le=this.props,Te=Le.mode,Ne=Le.parentMenu,He=Le.manualRef,Ke=Le.isOpen,Be=function(){_e.setState({mode:Te,isOpen:Ke})},Ye=Ke!==this.state.isOpen,ot=Te!==this.state.mode;if((ot||Ye)&&(Je.a.cancel(this.updateStateRaf),ot?this.updateStateRaf=Object(Je.a)(Be):Be()),He&&He(this),Te!=="horizontal"||!(Ne==null?void 0:Ne.isRootMenu)||!Ke)return;this.minWidthTimeout=setTimeout(function(){return _e.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var _e=this.props,Le=_e.onDestroy,Te=_e.eventKey;Le&&Le(Te),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),Je.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(_e,Le){var Te=this.getBaseProps();return g.createElement(vr,Object(p.a)({},Te,{id:this.internalMenuId,className:_e,style:Le}),this.props.children)}},{key:"renderChildren",value:function(){var _e=this,Le=this.getBaseProps(),Te=Le.mode,Ne=Le.visible,He=Le.forceSubMenuRender,Ke=Le.direction,Be=this.getMotion(Te,Ne);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Ne||He,!this.haveOpened)return g.createElement("div",null);var Ye=S()("".concat(Le.prefixCls,"-sub"),Object(P.a)({},"".concat(Le.prefixCls,"-rtl"),Ke==="rtl"));return this.isInlineMode()?g.createElement(Zn,Object(p.a)({visible:Le.visible,forceRender:He},Be),function(ot){var xt=ot.className,At=ot.style,Nt=S()(Ye,xt);return _e.renderPopupMenu(Nt,At)}):this.renderPopupMenu(Ye)}},{key:"render",value:function(){var _e,Le,Te,Ne=Object(N.a)({},this.props),He=this.getVisible(),Ke=this.getPrefixCls(),Be=this.isInlineMode(),Ye=this.getMode(),ot=S()(Ke,"".concat(Ke,"-").concat(Ye),(_e={},Object(P.a)(_e,Ne.className,!!Ne.className),Object(P.a)(_e,this.getOpenClassName(),He),Object(P.a)(_e,this.getActiveClassName(),Ne.active||He&&!Be),Object(P.a)(_e,this.getDisabledClassName(),Ne.disabled),Object(P.a)(_e,this.getSelectedClassName(),this.isChildrenSelected()),_e));this.internalMenuId||(Ne.eventKey?this.internalMenuId="".concat(Ne.eventKey,"$Menu"):(tt+=1,this.internalMenuId="$__$".concat(tt,"$Menu")));var xt={},At={},Nt={};Ne.disabled||(xt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},At={onClick:this.onTitleClick},Nt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Er={},Hr=Ne.direction,Br=Hr==="rtl";Be&&(Br?Er.paddingRight=Ne.inlineIndent*Ne.level:Er.paddingLeft=Ne.inlineIndent*Ne.level);var Gr={};this.getVisible()&&(Gr={"aria-owns":this.internalMenuId});var Mr=null;Ye!=="horizontal"&&(Mr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Mr=g.createElement(this.props.expandIcon,Object(N.a)({},this.props))));var Yr=g.createElement("div",Object(p.a)({ref:this.saveSubMenuTitle,style:Er,className:"".concat(Ke,"-title"),role:"button"},Nt,At,{"aria-expanded":He},Gr,{"aria-haspopup":"true",title:typeof Ne.title=="string"?Ne.title:void 0}),Ne.title,Mr||g.createElement("i",{className:"".concat(Ke,"-arrow")})),$r=this.renderChildren(),cn=((Le=Ne.parentMenu)===null||Le===void 0?void 0:Le.isRootMenu)?Ne.parentMenu.props.getPopupContainer:function(bn){return bn.parentNode},en=pt[Ye],Tn=Ne.popupOffset?{offset:Ne.popupOffset}:{},nn=S()((Te={},Object(P.a)(Te,Ne.popupClassName,Ne.popupClassName&&!Be),Object(P.a)(Te,"".concat(Ke,"-rtl"),Br),Te)),Sr=Ne.disabled,Dr=Ne.triggerSubMenuAction,Qr=Ne.subMenuOpenDelay,ln=Ne.forceSubMenuRender,hr=Ne.subMenuCloseDelay,fn=Ne.builtinPlacements;J.forEach(function(bn){return delete Ne[bn]}),delete Ne.onClick;var Pn=Br?Object(N.a)(Object(N.a)({},Ea),fn):Object(N.a)(Object(N.a)({},ea),fn);delete Ne.direction;var vn=this.getBaseProps(),On=Be?null:this.getMotion(vn.mode,vn.visible);return g.createElement("li",Object(p.a)({},Ne,xt,{className:ot,role:"menuitem"}),g.createElement(qi,{prefixCls:Ke,popupClassName:S()("".concat(Ke,"-popup"),nn),getPopupContainer:cn,builtinPlacements:Pn,popupPlacement:en,popupVisible:Be?!1:He,popupAlign:Tn,popup:Be?null:$r,action:Sr||Be?[]:[Dr],mouseEnterDelay:Qr,mouseLeaveDelay:hr,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:ln,popupMotion:On},Yr),Be?$r:null)}}]),Ve}(g.Component);Ut.defaultProps={onMouseEnter:Q,onMouseLeave:Q,onTitleMouseEnter:Q,onTitleMouseLeave:Q,onTitleClick:Q,manualRef:Q,mode:"vertical",title:""};var Dt=Object(T.b)(function(ke,We){var Ve=ke.openKeys,Fe=ke.activeKey,_e=ke.selectedKeys,Le=We.eventKey,Te=We.subMenuKey;return{isOpen:Ve.indexOf(Le)>-1,active:Fe[Te]===Le,selectedKeys:_e}})(Ut);Dt.isSubMenu=!0;var Xt=Dt,Pt="menuitem-overflowed",ut=.5,vt=function(ke){Object(E.a)(Ve,ke);var We=Object(w.a)(Ve);function Ve(){var Fe;return Object(R.a)(this,Ve),Fe=We.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=g.createRef(),Fe.getMenuItemNodes=function(){var _e=Fe.props.prefixCls,Le=Fe.childRef.current;return Le?[].slice.call(Le.children).filter(function(Te){return Te.className.split(" ").indexOf("".concat(_e,"-overflowed-submenu"))<0}):[]},Fe.getOverflowedSubMenuItem=function(_e,Le,Te){var Ne=Fe.props,He=Ne.overflowedIndicator,Ke=Ne.level,Be=Ne.mode,Ye=Ne.prefixCls,ot=Ne.theme;if(Ke!==1||Be!=="horizontal")return null;var xt=Fe.props.children[0],At=xt.props,Nt=At.children,Er=At.title,Hr=At.style,Br=Object(C.a)(At,["children","title","style"]),Gr=Object(N.a)({},Hr),Mr="".concat(_e,"-overflowed-indicator"),Yr="".concat(_e,"-overflowed-indicator");Le.length===0&&Te!==!0?Gr=Object(N.a)(Object(N.a)({},Gr),{},{display:"none"}):Te&&(Gr=Object(N.a)(Object(N.a)({},Gr),{},{visibility:"hidden",position:"absolute"}),Mr="".concat(Mr,"-placeholder"),Yr="".concat(Yr,"-placeholder"));var $r=ot?"".concat(Ye,"-").concat(ot):"",cn={};return J.forEach(function(en){Br[en]!==void 0&&(cn[en]=Br[en])}),g.createElement(Xt,Object(p.a)({title:He,className:"".concat(Ye,"-overflowed-submenu"),popupClassName:$r},cn,{key:Mr,eventKey:Yr,disabled:!1,style:Gr}),Le)},Fe.setChildrenWidthAndResize=function(){if(Fe.props.mode!=="horizontal")return;var _e=Fe.childRef.current;if(!_e)return;var Le=_e.children;if(!Le||Le.length===0)return;var Te=_e.children[Le.length-1];ue(Te,"display","inline-block");var Ne=Fe.getMenuItemNodes(),He=Ne.filter(function(Ke){return Ke.className.split(" ").indexOf(Pt)>=0});He.forEach(function(Ke){ue(Ke,"display","inline-block")}),Fe.menuItemSizes=Ne.map(function(Ke){return le(Ke,!0)}),He.forEach(function(Ke){ue(Ke,"display","none")}),Fe.overflowedIndicatorWidth=le(_e.children[_e.children.length-1],!0),Fe.originalTotalWidth=Fe.menuItemSizes.reduce(function(Ke,Be){return Ke+Be},0),Fe.handleResize(),ue(Te,"display","none")},Fe.handleResize=function(){if(Fe.props.mode!=="horizontal")return;var _e=Fe.childRef.current;if(!_e)return;var Le=le(_e);Fe.overflowedItems=[];var Te=0,Ne;Fe.originalTotalWidth>Le+ut&&(Ne=-1,Fe.menuItemSizes.forEach(function(He){Te+=He,Te+Fe.overflowedIndicatorWidth<=Le&&(Ne+=1)})),Fe.setState({lastVisibleIndex:Ne})},Fe}return Object(O.a)(Ve,[{key:"componentDidMount",value:function(){var _e=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Le=this.childRef.current;if(!Le)return;this.resizeObserver=new Me.default(function(Te){Te.forEach(function(){var Ne=_e.cancelFrameId;cancelAnimationFrame(Ne),_e.cancelFrameId=requestAnimationFrame(_e.setChildrenWidthAndResize)})}),[].slice.call(Le.children).concat(Le).forEach(function(Te){_e.resizeObserver.observe(Te)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){_e.resizeObserver.disconnect(),[].slice.call(Le.children).concat(Le).forEach(function(Te){_e.resizeObserver.observe(Te)}),_e.setChildrenWidthAndResize()}),this.mutationObserver.observe(Le,{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(_e){var Le=this,Te=this.state.lastVisibleIndex;return(_e||[]).reduce(function(Ne,He,Ke){var Be=He;if(Le.props.mode==="horizontal"){var Ye=Le.getOverflowedSubMenuItem(He.props.eventKey,[]);Te!==void 0&&Le.props.className.indexOf("".concat(Le.props.prefixCls,"-root"))!==-1&&(Ke>Te&&(Be=g.cloneElement(He,{style:{display:"none"},eventKey:"".concat(He.props.eventKey,"-hidden"),className:"".concat(Pt)})),Ke===Te+1&&(Le.overflowedItems=_e.slice(Te+1).map(function(xt){return g.cloneElement(xt,{key:xt.props.eventKey,mode:"vertical-left"})}),Ye=Le.getOverflowedSubMenuItem(He.props.eventKey,Le.overflowedItems)));var ot=[].concat(Object(d.a)(Ne),[Ye,Be]);return Ke===_e.length-1&&ot.push(Le.getOverflowedSubMenuItem(He.props.eventKey,[],!0)),ot}return[].concat(Object(d.a)(Ne),[Be])},[])}},{key:"render",value:function(){var _e=this.props,Le=_e.visible,Te=_e.prefixCls,Ne=_e.overflowedIndicator,He=_e.mode,Ke=_e.level,Be=_e.tag,Ye=_e.children,ot=_e.theme,xt=Object(C.a)(_e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),At=Be;return g.createElement(At,Object(p.a)({ref:this.childRef},xt),this.renderChildren(Ye))}}]),Ve}(g.Component);vt.defaultProps={tag:"div",className:""};var bt=vt;function tr(ke){return ke.length?ke.every(function(We){return!!We.props.disabled}):!0}function Qt(ke,We,Ve){var Fe=ke.getState();ke.setState({activeKey:Object(N.a)(Object(N.a)({},Fe.activeKey),{},Object(P.a)({},We,Ve))})}function Wt(ke){return ke.eventKey||"0-menu-"}function jt(ke,We){var Ve=We,Fe=ke.children,_e=ke.eventKey;if(Ve){var Le;if(re(Fe,function(Te,Ne){Te&&Te.props&&!Te.props.disabled&&Ve===Z(Te,_e,Ne)&&(Le=!0)}),Le)return Ve}return Ve=null,ke.defaultActiveFirst&&re(Fe,function(Te,Ne){!Ve&&Te&&!Te.props.disabled&&(Ve=Z(Te,_e,Ne))}),Ve}function Yt(ke){if(!ke)return;var We=this.instanceArray.indexOf(ke);We!==-1?this.instanceArray[We]=ke:this.instanceArray.push(ke)}var qt=function(ke){Object(E.a)(Ve,ke);var We=Object(w.a)(Ve);function Ve(Fe){var _e;return Object(R.a)(this,Ve),_e=We.call(this,Fe),_e.onKeyDown=function(Le,Te){var Ne=Le.keyCode,He;if(_e.getFlatInstanceArray().forEach(function(Be){Be&&Be.props.active&&Be.onKeyDown&&(He=Be.onKeyDown(Le))}),He)return 1;var Ke=null;return(Ne===h.a.UP||Ne===h.a.DOWN)&&(Ke=_e.step(Ne===h.a.UP?-1:1)),Ke?(Le.preventDefault(),Qt(_e.props.store,Wt(_e.props),Ke.props.eventKey),typeof Te=="function"&&Te(Ke),1):void 0},_e.onItemHover=function(Le){var Te=Le.key,Ne=Le.hover;Qt(_e.props.store,Wt(_e.props),Ne?Te:null)},_e.onDeselect=function(Le){_e.props.onDeselect(Le)},_e.onSelect=function(Le){_e.props.onSelect(Le)},_e.onClick=function(Le){_e.props.onClick(Le)},_e.onOpenChange=function(Le){_e.props.onOpenChange(Le)},_e.onDestroy=function(Le){_e.props.onDestroy(Le)},_e.getFlatInstanceArray=function(){return _e.instanceArray},_e.step=function(Le){var Te=_e.getFlatInstanceArray(),Ne=_e.props.store.getState().activeKey[Wt(_e.props)],He=Te.length;if(!He)return null;Le<0&&(Te=Te.concat().reverse());var Ke=-1;if(Te.every(function(xt,At){return xt&&xt.props.eventKey===Ne?(Ke=At,!1):!0}),!_e.props.defaultActiveFirst&&Ke!==-1&&tr(Te.slice(Ke,He-1)))return;var Be=(Ke+1)%He,Ye=Be;do{var ot=Te[Ye];if(!ot||ot.props.disabled)Ye=(Ye+1)%He;else return ot}while(Ye!==Be);return null},_e.renderCommonMenuItem=function(Le,Te,Ne){var He=_e.props.store.getState(),Ke=Object(b.a)(_e),Be=Ke.props,Ye=Z(Le,Be.eventKey,Te),ot=Le.props;if(!ot||typeof Le.type=="string")return Le;var xt=Ye===He.activeKey,At=Object(N.a)(Object(N.a)({mode:ot.mode||Be.mode,level:Be.level,inlineIndent:Be.inlineIndent,renderMenuItem:_e.renderMenuItem,rootPrefixCls:Be.prefixCls,index:Te,parentMenu:Be.parentMenu,manualRef:ot.disabled?void 0:Object(M.a)(Le.ref,Yt.bind(Object(b.a)(_e))),eventKey:Ye,active:!ot.disabled&&xt,multiple:Be.multiple,onClick:function(Er){(ot.onClick||Q)(Er),_e.onClick(Er)},onItemHover:_e.onItemHover,motion:Be.motion,subMenuOpenDelay:Be.subMenuOpenDelay,subMenuCloseDelay:Be.subMenuCloseDelay,forceSubMenuRender:Be.forceSubMenuRender,onOpenChange:_e.onOpenChange,onDeselect:_e.onDeselect,onSelect:_e.onSelect,builtinPlacements:Be.builtinPlacements,itemIcon:ot.itemIcon||_e.props.itemIcon,expandIcon:ot.expandIcon||_e.props.expandIcon},Ne),{},{direction:Be.direction});return(Be.mode==="inline"||xe())&&(At.triggerSubMenuAction="click"),g.cloneElement(Le,Object(N.a)(Object(N.a)({},At),{},{key:Ye||Te}))},_e.renderMenuItem=function(Le,Te,Ne){if(!Le)return null;var He=_e.props.store.getState(),Ke={openKeys:He.openKeys,selectedKeys:He.selectedKeys,triggerSubMenuAction:_e.props.triggerSubMenuAction,subMenuKey:Ne};return _e.renderCommonMenuItem(Le,Te,Ke)},Fe.store.setState({activeKey:Object(N.a)(Object(N.a)({},Fe.store.getState().activeKey),{},Object(P.a)({},Fe.eventKey,jt(Fe,Fe.activeKey)))}),_e.instanceArray=[],_e}return Object(O.a)(Ve,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(_e){return this.props.visible||_e.visible||this.props.className!==_e.className||!Y()(this.props.style,_e.style)}},{key:"componentDidUpdate",value:function(_e){var Le=this.props,Te="activeKey"in Le?Le.activeKey:Le.store.getState().activeKey[Wt(Le)],Ne=jt(Le,Te);if(Ne!==Te)Qt(Le.store,Wt(Le),Ne);else if("activeKey"in _e){var He=jt(_e,_e.activeKey);Ne!==He&&Qt(Le.store,Wt(Le),Ne)}}},{key:"render",value:function(){var _e=this,Le=Object(p.a)({},this.props);this.instanceArray=[];var Te=S()(Le.prefixCls,Le.className,"".concat(Le.prefixCls,"-").concat(Le.mode)),Ne={className:Te,role:Le.role||"menu"};Le.id&&(Ne.id=Le.id),Le.focusable&&(Ne.tabIndex=0,Ne.onKeyDown=this.onKeyDown);var He=Le.prefixCls,Ke=Le.eventKey,Be=Le.visible,Ye=Le.level,ot=Le.mode,xt=Le.overflowedIndicator,At=Le.theme;return J.forEach(function(Nt){return delete Le[Nt]}),delete Le.onClick,g.createElement(bt,Object(p.a)({},Le,{prefixCls:He,mode:ot,tag:"ul",level:Ye,theme:At,visible:Be,overflowedIndicator:xt},Ne),Object(_.a)(Le.children).map(function(Nt,Er){return _e.renderMenuItem(Nt,Er,Ke||"0-menu-")}))}}]),Ve}(g.Component);qt.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:Q};var et=Object(T.b)()(qt),vr=et,Ar=D("Kwbf");function cr(ke,We,Ve){var Fe=ke.prefixCls,_e=ke.motion,Le=ke.defaultMotions,Te=Le===void 0?{}:Le,Ne=ke.openAnimation,He=ke.openTransitionName,Ke=We.switchingModeFromInline;if(_e)return _e;if(Object(K.a)(Ne)==="object"&&Ne)Object(Ar.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Ne=="string")return{motionName:"".concat(Fe,"-open-").concat(Ne)};if(He)return{motionName:He};var Be=Te[Ve];return Be||(Ke?null:Te.other)}var ht=function(ke){Object(E.a)(Ve,ke);var We=Object(w.a)(Ve);function Ve(Fe){var _e;Object(R.a)(this,Ve),_e=We.call(this,Fe),_e.onSelect=function(Ne){var He=Object(b.a)(_e),Ke=He.props;if(Ke.selectable){var Be=_e.store.getState(),Ye=Be.selectedKeys,ot=Ne.key;Ke.multiple?Ye=Ye.concat([ot]):Ye=[ot],"selectedKeys"in Ke||_e.store.setState({selectedKeys:Ye}),Ke.onSelect(Object(N.a)(Object(N.a)({},Ne),{},{selectedKeys:Ye}))}},_e.onClick=function(Ne){var He=_e.getRealMenuMode(),Ke=Object(b.a)(_e),Be=Ke.store,Ye=Ke.props.onOpenChange;He!=="inline"&&!("openKeys"in _e.props)&&(Be.setState({openKeys:[]}),Ye([])),_e.props.onClick(Ne)},_e.onKeyDown=function(Ne,He){_e.innerMenu.getWrappedInstance().onKeyDown(Ne,He)},_e.onOpenChange=function(Ne){var He=Object(b.a)(_e),Ke=He.props,Be=_e.store.getState().openKeys.concat(),Ye=!1,ot=function(At){var Nt=!1;if(At.open)Nt=Be.indexOf(At.key)===-1,Nt&&Be.push(At.key);else{var Er=Be.indexOf(At.key);Nt=Er!==-1,Nt&&Be.splice(Er,1)}Ye=Ye||Nt};Array.isArray(Ne)?Ne.forEach(ot):ot(Ne),Ye&&("openKeys"in _e.props||_e.store.setState({openKeys:Be}),Ke.onOpenChange(Be))},_e.onDeselect=function(Ne){var He=Object(b.a)(_e),Ke=He.props;if(Ke.selectable){var Be=_e.store.getState().selectedKeys.concat(),Ye=Ne.key,ot=Be.indexOf(Ye);ot!==-1&&Be.splice(ot,1),"selectedKeys"in Ke||_e.store.setState({selectedKeys:Be}),Ke.onDeselect(Object(N.a)(Object(N.a)({},Ne),{},{selectedKeys:Be}))}},_e.onMouseEnter=function(Ne){_e.restoreModeVerticalFromInline();var He=_e.props.onMouseEnter;He&&He(Ne)},_e.onTransitionEnd=function(Ne){var He=Ne.propertyName==="width"&&Ne.target===Ne.currentTarget,Ke=Ne.target.className,Be=Object.prototype.toString.call(Ke)==="[object SVGAnimatedString]"?Ke.animVal:Ke,Ye=Ne.propertyName==="font-size"&&Be.indexOf("anticon")>=0;(He||Ye)&&_e.restoreModeVerticalFromInline()},_e.setInnerMenu=function(Ne){_e.innerMenu=Ne},_e.isRootMenu=!0;var Le=Fe.defaultSelectedKeys,Te=Fe.defaultOpenKeys;return"selectedKeys"in Fe&&(Le=Fe.selectedKeys||[]),"openKeys"in Fe&&(Te=Fe.openKeys||[]),_e.store=Object(T.c)({selectedKeys:Le,openKeys:Te,activeKey:{"0-menu-":jt(Fe,Fe.activeKey)}}),_e.state={switchingModeFromInline:!1,prevProps:Fe,inlineOpenKeys:[],store:_e.store},_e}return Object(O.a)(Ve,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(_e){var Le=this.props,Te=Le.siderCollapsed,Ne=Le.inlineCollapsed,He=Le.onOpenChange;(!_e.inlineCollapsed&&Ne||!_e.siderCollapsed&&Te)&&He([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var _e=this.props.collapsedWidth,Le=this.store,Te=this.prevOpenKeys,Ne=this.getInlineCollapsed()&&(_e===0||_e==="0"||_e==="0px");Ne?(this.prevOpenKeys=Le.getState().openKeys.concat(),this.store.setState({openKeys:[]})):Te&&(this.store.setState({openKeys:Te}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var _e=this.props.mode,Le=this.state.switchingModeFromInline,Te=this.getInlineCollapsed();return Le&&Te?"inline":Te?"vertical":_e}},{key:"getInlineCollapsed",value:function(){var _e=this.props,Le=_e.inlineCollapsed,Te=_e.siderCollapsed;return Te!==void 0?Te:Le}},{key:"restoreModeVerticalFromInline",value:function(){var _e=this.state.switchingModeFromInline;_e&&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 _e=Object(N.a)({},Object(F.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Le=this.getRealMenuMode();return _e.className+=" ".concat(_e.prefixCls,"-root"),_e.direction==="rtl"&&(_e.className+=" ".concat(_e.prefixCls,"-rtl")),_e=Object(N.a)(Object(N.a)({},_e),{},{mode:Le,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,Le)}),delete _e.openAnimation,delete _e.openTransitionName,g.createElement(T.a,{store:this.store},g.createElement(vr,Object(p.a)({},_e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(_e,Le){var Te=Le.prevProps,Ne=Le.store,He=Ne.getState(),Ke={},Be={prevProps:_e};return Te.mode==="inline"&&_e.mode!=="inline"&&(Be.switchingModeFromInline=!0),"openKeys"in _e?Ke.openKeys=_e.openKeys||[]:((_e.inlineCollapsed&&!Te.inlineCollapsed||_e.siderCollapsed&&!Te.siderCollapsed)&&(Be.switchingModeFromInline=!0,Be.inlineOpenKeys=He.openKeys,Ke.openKeys=[]),(!_e.inlineCollapsed&&Te.inlineCollapsed||!_e.siderCollapsed&&Te.siderCollapsed)&&(Ke.openKeys=Le.inlineOpenKeys,Be.inlineOpenKeys=[])),Object.keys(Ke).length&&Ne.setState(Ke),Be}}]),Ve}(g.Component);ht.defaultProps={selectable:!0,onClick:Q,onSelect:Q,onOpenChange:Q,onDeselect:Q,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:g.createElement("span",null,"\xB7\xB7\xB7")};var _t=ht,ft=function(ke){Object(E.a)(Ve,ke);var We=Object(w.a)(Ve);function Ve(){var Fe;return Object(R.a)(this,Ve),Fe=We.apply(this,arguments),Fe.onKeyDown=function(_e){var Le=_e.keyCode;return Le===h.a.ENTER?(Fe.onClick(_e),!0):void 0},Fe.onMouseLeave=function(_e){var Le=Fe.props,Te=Le.eventKey,Ne=Le.onItemHover,He=Le.onMouseLeave;Ne({key:Te,hover:!1}),He({key:Te,domEvent:_e})},Fe.onMouseEnter=function(_e){var Le=Fe.props,Te=Le.eventKey,Ne=Le.onItemHover,He=Le.onMouseEnter;Ne({key:Te,hover:!0}),He({key:Te,domEvent:_e})},Fe.onClick=function(_e){var Le=Fe.props,Te=Le.eventKey,Ne=Le.multiple,He=Le.onClick,Ke=Le.onSelect,Be=Le.onDeselect,Ye=Le.isSelected,ot={key:Te,keyPath:[Te],item:Object(b.a)(Fe),domEvent:_e};He(ot),Ne?Ye?Be(ot):Ke(ot):Ye||Ke(ot)},Fe.saveNode=function(_e){Fe.node=_e},Fe}return Object(O.a)(Ve,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var _e=this.props;_e.onDestroy&&_e.onDestroy(_e.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 _e,Le=Object(N.a)({},this.props),Te=S()(this.getPrefixCls(),Le.className,(_e={},Object(P.a)(_e,this.getActiveClassName(),!Le.disabled&&Le.active),Object(P.a)(_e,this.getSelectedClassName(),Le.isSelected),Object(P.a)(_e,this.getDisabledClassName(),Le.disabled),_e)),Ne=Object(N.a)(Object(N.a)({},Le.attribute),{},{title:typeof Le.title=="string"?Le.title:void 0,className:Te,role:Le.role||"menuitem","aria-disabled":Le.disabled});Le.role==="option"?Ne=Object(N.a)(Object(N.a)({},Ne),{},{role:"option","aria-selected":Le.isSelected}):(Le.role===null||Le.role==="none")&&(Ne.role="none");var He={onClick:Le.disabled?null:this.onClick,onMouseLeave:Le.disabled?null:this.onMouseLeave,onMouseEnter:Le.disabled?null:this.onMouseEnter},Ke=Object(N.a)({},Le.style);Le.mode==="inline"&&(Le.direction==="rtl"?Ke.paddingRight=Le.inlineIndent*Le.level:Ke.paddingLeft=Le.inlineIndent*Le.level),J.forEach(function(Ye){return delete Le[Ye]}),delete Le.direction;var Be=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Be=g.createElement(this.props.itemIcon,this.props)),g.createElement("li",Object(p.a)({},Object(F.a)(Le,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Ne,He,{style:Ke,ref:this.saveNode}),Le.children,Be)}}]),Ve}(g.Component);ft.isMenuItem=!0,ft.defaultProps={onSelect:Q,onMouseEnter:Q,onMouseLeave:Q,manualRef:Q};var Tt=Object(T.b)(function(ke,We){var Ve=ke.activeKey,Fe=ke.selectedKeys,_e=We.eventKey,Le=We.subMenuKey;return{active:Ve[Le]===_e,isSelected:Array.isArray(Fe)?Fe.indexOf(_e)!==-1:Fe===_e}})(ft),zt=Tt,rr=function(ke){Object(E.a)(Ve,ke);var We=Object(w.a)(Ve);function Ve(){var Fe;return Object(R.a)(this,Ve),Fe=We.apply(this,arguments),Fe.renderInnerMenuItem=function(_e){var Le=Fe.props,Te=Le.renderMenuItem,Ne=Le.index;return Te(_e,Ne,Fe.props.subMenuKey)},Fe}return Object(O.a)(Ve,[{key:"render",value:function(){var _e=Object(p.a)({},this.props),Le=_e.className,Te=Le===void 0?"":Le,Ne=_e.rootPrefixCls,He="".concat(Ne,"-item-group-title"),Ke="".concat(Ne,"-item-group-list"),Be=_e.title,Ye=_e.children;return J.forEach(function(ot){return delete _e[ot]}),delete _e.direction,g.createElement("li",Object(p.a)({},_e,{onClick:function(xt){return xt.stopPropagation()},className:"".concat(Te," ").concat(Ne,"-item-group")}),g.createElement("div",{className:He,title:typeof Be=="string"?Be:void 0},Be),g.createElement("ul",{className:Ke},g.Children.map(Ye,this.renderInnerMenuItem)))}}]),Ve}(g.Component);rr.isMenuItemGroup=!0,rr.defaultProps={disabled:!0};var Kt=rr,yr=function(We){var Ve=We.className,Fe=We.rootPrefixCls,_e=We.style;return g.createElement("li",{className:"".concat(Ve," ").concat(Fe,"-item-divider"),style:_e})};yr.defaultProps={disabled:!0,className:"",style:{}};var kr=yr,sr=_t,Ze=D("eDIo");function kt(ke,We){var Ve=ke.prefixCls,Fe=ke.editable,_e=ke.locale,Le=ke.style;return!Fe||Fe.showAdd===!1?null:g.createElement("button",{ref:We,type:"button",className:"".concat(Ve,"-nav-add"),style:Le,"aria-label":(_e==null?void 0:_e.addAriaLabel)||"Add tab",onClick:function(Ne){Fe.onEdit("add",{event:Ne})}},Fe.addIcon||"+")}var Zr=g.forwardRef(kt);function Vr(ke,We){var Ve=ke.prefixCls,Fe=ke.id,_e=ke.tabs,Le=ke.locale,Te=ke.mobile,Ne=ke.moreIcon,He=Ne===void 0?"More":Ne,Ke=ke.moreTransitionName,Be=ke.style,Ye=ke.className,ot=ke.editable,xt=ke.tabBarGutter,At=ke.rtl,Nt=ke.onTabClick,Er=Object(g.useState)(!1),Hr=Object(v.a)(Er,2),Br=Hr[0],Gr=Hr[1],Mr=Object(g.useState)(null),Yr=Object(v.a)(Mr,2),$r=Yr[0],cn=Yr[1],en="".concat(Fe,"-more-popup"),Tn="".concat(Ve,"-dropdown"),nn=$r!==null?"".concat(en,"-").concat($r):null,Sr=Le==null?void 0:Le.dropdownAriaLabel,Dr=g.createElement(sr,{onClick:function(On){var bn=On.key,Gn=On.domEvent;Nt(bn,Gn),Gr(!1)},id:en,tabIndex:-1,role:"listbox","aria-activedescendant":nn,selectedKeys:[$r],"aria-label":Sr!==void 0?Sr:"expanded dropdown"},_e.map(function(vn){return g.createElement(zt,{key:vn.key,id:"".concat(en,"-").concat(vn.key),role:"option","aria-controls":Fe&&"".concat(Fe,"-panel-").concat(vn.key),disabled:vn.disabled},vn.tab)}));function Qr(vn){for(var On=_e.filter(function(ni){return!ni.disabled}),bn=On.findIndex(function(ni){return ni.key===$r})||0,Gn=On.length,$n=0;$n<Gn;$n+=1){bn=(bn+vn+Gn)%Gn;var Mn=On[bn];if(!Mn.disabled){cn(Mn.key);return}}}function ln(vn){var On=vn.which;if(!Br){[h.a.DOWN,h.a.SPACE,h.a.ENTER].includes(On)&&(Gr(!0),vn.preventDefault());return}switch(On){case h.a.UP:Qr(-1),vn.preventDefault();break;case h.a.DOWN:Qr(1),vn.preventDefault();break;case h.a.ESC:Gr(!1);break;case h.a.SPACE:case h.a.ENTER:$r!==null&&Nt($r,vn);break}}Object(g.useEffect)(function(){var vn=document.getElementById(nn);vn&&vn.scrollIntoView&&vn.scrollIntoView(!1)},[$r]),Object(g.useEffect)(function(){Br||cn(null)},[Br]);var hr=Object(P.a)({},At?"marginLeft":"marginRight",xt);_e.length||(hr.visibility="hidden",hr.order=1);var fn=S()(Object(P.a)({},"".concat(Tn,"-rtl"),At)),Pn=Te?null:g.createElement(Ze.a,{prefixCls:Tn,overlay:Dr,trigger:["hover"],visible:Br,transitionName:Ke,onVisibleChange:Gr,overlayClassName:fn,mouseEnterDelay:.1,mouseLeaveDelay:.1},g.createElement("button",{type:"button",className:"".concat(Ve,"-nav-more"),style:hr,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":en,id:"".concat(Fe,"-more"),"aria-expanded":Br,onKeyDown:ln},He));return g.createElement("div",{className:S()("".concat(Ve,"-nav-operations"),Ye),style:Be,ref:We},Pn,g.createElement(Zr,{prefixCls:Ve,locale:Le,editable:ot}))}var nr=g.forwardRef(Vr),br=Object(g.createContext)(null),Tr=.1,Rt=.01,Ht=20,ar=Math.pow(.995,Ht);function Vt(){var ke=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(ke)||/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(ke.substr(0,4)))}function ct(ke,We){var Ve=Object(g.useState)(),Fe=Object(v.a)(Ve,2),_e=Fe[0],Le=Fe[1],Te=Object(g.useState)(0),Ne=Object(v.a)(Te,2),He=Ne[0],Ke=Ne[1],Be=Object(g.useState)(0),Ye=Object(v.a)(Be,2),ot=Ye[0],xt=Ye[1],At=Object(g.useState)(),Nt=Object(v.a)(At,2),Er=Nt[0],Hr=Nt[1],Br=Object(g.useRef)();function Gr(Sr){var Dr=Sr.touches[0],Qr=Dr.screenX,ln=Dr.screenY;Le({x:Qr,y:ln}),window.clearInterval(Br.current)}function Mr(Sr){if(!_e)return;Sr.preventDefault();var Dr=Sr.touches[0],Qr=Dr.screenX,ln=Dr.screenY;Le({x:Qr,y:ln});var hr=Qr-_e.x,fn=ln-_e.y;We(hr,fn);var Pn=Date.now();Ke(Pn),xt(Pn-He),Hr({x:hr,y:fn})}function Yr(){if(!_e)return;if(Le(null),Hr(null),Er){var Sr=Er.x/ot,Dr=Er.y/ot,Qr=Math.abs(Sr),ln=Math.abs(Dr);if(Math.max(Qr,ln)<Tr)return;var hr=Sr,fn=Dr;Br.current=window.setInterval(function(){if(Math.abs(hr)<Rt&&Math.abs(fn)<Rt){window.clearInterval(Br.current);return}hr*=ar,fn*=ar,We(hr*Ht,fn*Ht)},Ht)}}var $r=Object(g.useRef)(0),cn=Object(g.useRef)(!1),en=Object(g.useRef)();function Tn(Sr){var Dr=Sr.deltaX,Qr=Sr.deltaY,ln=0,hr=Math.abs(Dr),fn=Math.abs(Qr);hr===fn?ln=en.current==="x"?Dr:Qr:hr>fn?(ln=Dr,en.current="x"):(ln=Qr,en.current="y");var Pn=Date.now();Pn-$r.current>100&&(cn.current=!1),(We(-ln,-ln)||cn.current)&&(Sr.preventDefault(),cn.current=!0),$r.current=Pn}var nn=Object(g.useRef)(null);nn.current={onTouchStart:Gr,onTouchMove:Mr,onTouchEnd:Yr,onWheel:Tn},g.useEffect(function(){function Sr(hr){nn.current.onTouchStart(hr)}function Dr(hr){nn.current.onTouchMove(hr)}function Qr(hr){nn.current.onTouchEnd(hr)}function ln(hr){nn.current.onWheel(hr)}return document.addEventListener("touchmove",Dr,{passive:!1}),document.addEventListener("touchend",Qr,{passive:!1}),ke.current.addEventListener("touchstart",Sr,{passive:!1}),ke.current.addEventListener("wheel",ln),function(){document.removeEventListener("touchmove",Dr),document.removeEventListener("touchend",Qr)}},[])}function dt(){var ke=Object(g.useRef)(new Map);function We(Fe){return ke.current.has(Fe)||ke.current.set(Fe,g.createRef()),ke.current.get(Fe)}function Ve(Fe){ke.current.delete(Fe)}return[We,Ve]}function Mt(ke,We){var Ve=g.useRef(ke),Fe=g.useState({}),_e=Object(v.a)(Fe,2),Le=_e[1];function Te(Ne){var He=typeof Ne=="function"?Ne(Ve.current):Ne;He!==Ve.current&&We(He,Ve.current),Ve.current=He,Le({})}return[Ve.current,Te]}var wt=function(We){var Ve=We.position,Fe=We.prefixCls,_e=We.extra;if(!_e)return null;var Le,Te=_e;return Ve==="right"&&(Le=Te.right||!Te.left&&Te||null),Ve==="left"&&(Le=Te.left||null),Le?g.createElement("div",{className:"".concat(Fe,"-extra-content")},Le):null};function _r(ke,We){var Ve,Fe=g.useContext(br),_e=Fe.prefixCls,Le=Fe.tabs,Te=ke.className,Ne=ke.style,He=ke.id,Ke=ke.animated,Be=ke.activeKey,Ye=ke.rtl,ot=ke.extra,xt=ke.editable,At=ke.locale,Nt=ke.tabPosition,Er=ke.tabBarGutter,Hr=ke.children,Br=ke.onTabClick,Gr=ke.onTabScroll,Mr=Object(g.useRef)(),Yr=Object(g.useRef)(),$r=Object(g.useRef)(),cn=Object(g.useRef)(),en=dt(),Tn=Object(v.a)(en,2),nn=Tn[0],Sr=Tn[1],Dr=Nt==="top"||Nt==="bottom",Qr=Mt(0,function(Cn,mn){Dr&&Gr&&Gr({direction:Cn>mn?"left":"right"})}),ln=Object(v.a)(Qr,2),hr=ln[0],fn=ln[1],Pn=Mt(0,function(Cn,mn){!Dr&&Gr&&Gr({direction:Cn>mn?"top":"bottom"})}),vn=Object(v.a)(Pn,2),On=vn[0],bn=vn[1],Gn=Object(g.useState)(0),$n=Object(v.a)(Gn,2),Mn=$n[0],ni=$n[1],ji=Object(g.useState)(0),pi=Object(v.a)(ji,2),Jn=pi[0],An=pi[1],Rn=Object(g.useState)(0),Nn=Object(v.a)(Rn,2),kn=Nn[0],Vn=Nn[1],_i=Object(g.useState)(0),Xi=Object(v.a)(_i,2),En=Xi[0],Ai=Xi[1],Ri=Object(g.useState)(null),Sn=Object(v.a)(Ri,2),_n=Sn[0],Xn=Sn[1],Ba=Object(g.useState)(null),xa=Object(v.a)(Ba,2),ta=xa[0],ra=xa[1],La=Object(g.useState)(0),wa=Object(v.a)(La,2),ka=wa[0],Ha=wa[1],Xa=Object(g.useState)(0),Pa=Object(v.a)(Xa,2),na=Pa[0],Ta=Pa[1],ga=s(new Map),ia=Object(v.a)(ga,2),co=ia[0],va=ia[1],Sa=r(Le,co,Mn),aa="".concat(_e,"-nav-operations-hidden"),la=0,Fi=0;Dr?Ye?(la=0,Fi=Math.max(0,Mn-_n)):(la=Math.min(0,_n-Mn),Fi=0):(la=Math.min(0,ta-Jn),Fi=0);function Yi(Cn){return Cn<la?[la,!1]:Cn>Fi?[Fi,!1]:[Cn,!0]}var dr=Object(g.useRef)(),fr=Object(g.useState)(),Zt=Object(v.a)(fr,2),pn=Zt[0],er=Zt[1];function ua(){er(Date.now())}function Ya(){window.clearTimeout(dr.current)}ct(Mr,function(Cn,mn){var di=!1;function Di(Ma,ca){Ma(function(Ga){var ya=Yi(Ga+ca),hi=Object(v.a)(ya,2),Qa=hi[0],fo=hi[1];return di=fo,Qa})}if(Dr){if(_n>=Mn)return di;Di(fn,Cn)}else{if(ta>=Jn)return di;Di(bn,mn)}return Ya(),ua(),di}),Object(g.useEffect)(function(){return Ya(),pn&&(dr.current=window.setTimeout(function(){er(0)},100)),Ya},[pn]);function Dn(){var Cn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Be,mn=Sa.get(Cn);if(!mn)return;if(Dr){var di=hr;Ye?mn.right<hr?di=mn.right:mn.right+mn.width>hr+_n&&(di=mn.right+mn.width-_n):mn.left<-hr?di=-mn.left:mn.left+mn.width>-hr+_n&&(di=-(mn.left+mn.width-_n)),bn(0),fn(Yi(di)[0])}else{var Di=On;mn.top<-On?Di=-mn.top:mn.top+mn.height>-On+ta&&(Di=-(mn.top+mn.height-ta)),fn(0),bn(Yi(Di)[0])}}var Ca=y(Sa,{width:_n,height:ta,left:hr,top:On},{width:kn,height:En},{width:ka,height:na},Object(N.a)(Object(N.a)({},ke),{},{tabs:Le})),Io=Object(v.a)(Ca,2),Jo=Io[0],Qo=Io[1],Zo=Le.map(function(Cn){var mn=Cn.key;return g.createElement(l,{id:He,prefixCls:_e,key:mn,rtl:Ye,tab:Cn,closable:Cn.closable,editable:xt,active:mn===Be,tabPosition:Nt,tabBarGutter:Er,renderWrapper:Hr,removeAriaLabel:At==null?void 0:At.removeAriaLabel,ref:nn(mn),onClick:function(Di){Br(mn,Di)},onRemove:function(){Sr(mn)},onFocus:function(){Dn(mn),ua(),Ye||(Mr.current.scrollLeft=0),Mr.current.scrollTop=0}})}),ho=n(function(){var Cn,mn,di,Di,Ma,ca,Ga,ya,hi,Qa=((Cn=Mr.current)===null||Cn===void 0?void 0:Cn.offsetWidth)||0,fo=((mn=Mr.current)===null||mn===void 0?void 0:mn.offsetHeight)||0,po=((di=cn.current)===null||di===void 0?void 0:di.offsetWidth)||0,Li=((Di=cn.current)===null||Di===void 0?void 0:Di.offsetHeight)||0,wn=((Ma=$r.current)===null||Ma===void 0?void 0:Ma.offsetWidth)||0,Ji=((ca=$r.current)===null||ca===void 0?void 0:ca.offsetHeight)||0;Xn(Qa),ra(fo),Ha(po),Ta(Li);var da=(((Ga=Yr.current)===null||Ga===void 0?void 0:Ga.offsetWidth)||0)-po,ha=(((ya=Yr.current)===null||ya===void 0?void 0:ya.offsetHeight)||0)-Li;ni(da),An(ha);var mo=(hi=$r.current)===null||hi===void 0?void 0:hi.className.includes(aa);Vn(da-(mo?0:wn)),Ai(ha-(mo?0:Ji)),va(function(){var Za=new Map;return Le.forEach(function(Mo){var No=Mo.key,Aa=nn(No).current;Aa&&Za.set(No,{width:Aa.offsetWidth,height:Aa.offsetHeight,left:Aa.offsetLeft,top:Aa.offsetTop})}),Za})}),qo=Le.slice(0,Jo),Ii=Le.slice(Qo+1),qn=[].concat(Object(d.a)(qo),Object(d.a)(Ii)),Ei=Object(g.useState)(),ei=Object(v.a)(Ei,2),Wa=ei[0],es=ei[1],$i=Sa.get(Be),Do=Object(g.useRef)();function Lo(){c.a.cancel(Do.current)}Object(g.useEffect)(function(){var Cn={};return $i&&(Dr?(Ye?Cn.right=$i.right:Cn.left=$i.left,Cn.width=$i.width):(Cn.top=$i.top,Cn.height=$i.height)),Lo(),Do.current=c()(function(){es(Cn)}),Lo},[$i,Dr,Ye]),Object(g.useEffect)(function(){Dn()},[Be,$i,Sa,Dr]),Object(g.useEffect)(function(){ho()},[Ye,Er,Be,Le.map(function(Cn){return Cn.key}).join("_")]);var ko=!!qn.length,Oa="".concat(_e,"-nav-wrap"),$a,za,Po,Ja;return Dr?Ye?(za=hr>0,$a=hr+_n<Mn):($a=hr<0,za=-hr+_n<Mn):(Po=On<0,Ja=-On+ta<Jn),g.createElement("div",{ref:We,role:"tablist",className:S()("".concat(_e,"-nav"),Te),style:Ne,onKeyDown:function(){ua()}},g.createElement(wt,{position:"left",extra:ot,prefixCls:_e}),g.createElement(o.a,{onResize:ho},g.createElement("div",{className:S()(Oa,(Ve={},Object(P.a)(Ve,"".concat(Oa,"-ping-left"),$a),Object(P.a)(Ve,"".concat(Oa,"-ping-right"),za),Object(P.a)(Ve,"".concat(Oa,"-ping-top"),Po),Object(P.a)(Ve,"".concat(Oa,"-ping-bottom"),Ja),Ve)),ref:Mr},g.createElement(o.a,{onResize:ho},g.createElement("div",{ref:Yr,className:"".concat(_e,"-nav-list"),style:{transform:"translate(".concat(hr,"px, ").concat(On,"px)"),transition:pn?"none":void 0}},Zo,g.createElement(Zr,{ref:cn,prefixCls:_e,locale:At,editable:xt,style:{visibility:ko?"hidden":null}}),g.createElement("div",{className:S()("".concat(_e,"-ink-bar"),Object(P.a)({},"".concat(_e,"-ink-bar-animated"),Ke.inkBar)),style:Wa}))))),g.createElement(nr,Object.assign({},ke,{ref:$r,prefixCls:_e,tabs:qn,className:!ko&&aa})),g.createElement(wt,{position:"right",extra:ot,prefixCls:_e}))}var Jr=g.forwardRef(_r);function qr(ke){var We=ke.id,Ve=ke.activeKey,Fe=ke.animated,_e=ke.tabPosition,Le=ke.rtl,Te=ke.destroyInactiveTabPane,Ne=g.useContext(br),He=Ne.prefixCls,Ke=Ne.tabs,Be=Fe.tabPane,Ye=Ke.findIndex(function(ot){return ot.key===Ve});return g.createElement("div",{className:S()("".concat(He,"-content-holder"))},g.createElement("div",{className:S()("".concat(He,"-content"),"".concat(He,"-content-").concat(_e),Object(P.a)({},"".concat(He,"-content-animated"),Be)),style:Ye&&Be?Object(P.a)({},Le?"marginRight":"marginLeft","-".concat(Ye,"00%")):null},Ke.map(function(ot){return g.cloneElement(ot.node,{key:ot.key,prefixCls:He,tabKey:ot.key,id:We,animated:Be,active:ot.key===Ve,destroyInactiveTabPane:Te})})))}function mr(ke){var We=ke.prefixCls,Ve=ke.forceRender,Fe=ke.className,_e=ke.style,Le=ke.id,Te=ke.active,Ne=ke.animated,He=ke.destroyInactiveTabPane,Ke=ke.tabKey,Be=ke.children,Ye=g.useState(Ve),ot=Object(v.a)(Ye,2),xt=ot[0],At=ot[1];g.useEffect(function(){Te?At(!0):He&&At(!1)},[Te,He]);var Nt={};return Te||(Ne?(Nt.visibility="hidden",Nt.height=0,Nt.overflowY="hidden"):Nt.display="none"),g.createElement("div",{id:Le&&"".concat(Le,"-panel-").concat(Ke),role:"tabpanel",tabIndex:Te?0:-1,"aria-labelledby":Le&&"".concat(Le,"-tab-").concat(Ke),"aria-hidden":!Te,style:Object(N.a)(Object(N.a)({},Nt),_e),className:S()("".concat(We,"-tabpane"),Te&&"".concat(We,"-tabpane-active"),Fe)},(Te||xt||Ve)&&Be)}var Xr=0;function Rr(ke){return Object(_.a)(ke).map(function(We){if(g.isValidElement(We)){var Ve=We.key!==void 0?String(We.key):void 0;return Object(N.a)(Object(N.a)({key:Ve},We.props),{},{node:We})}return null}).filter(function(We){return We})}function on(ke,We){var Ve,Fe=ke.id,_e=ke.prefixCls,Le=_e===void 0?"rc-tabs":_e,Te=ke.className,Ne=ke.children,He=ke.direction,Ke=ke.activeKey,Be=ke.defaultActiveKey,Ye=ke.editable,ot=ke.animated,xt=ke.tabPosition,At=xt===void 0?"top":xt,Nt=ke.tabBarGutter,Er=ke.tabBarStyle,Hr=ke.tabBarExtraContent,Br=ke.locale,Gr=ke.moreIcon,Mr=ke.moreTransitionName,Yr=ke.destroyInactiveTabPane,$r=ke.renderTabBar,cn=ke.onChange,en=ke.onTabClick,Tn=ke.onTabScroll,nn=Object(C.a)(ke,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),Sr=Rr(Ne),Dr=He==="rtl",Qr;ot===!1?Qr={inkBar:!1,tabPane:!1}:Qr=Object(N.a)({inkBar:!0,tabPane:!1},ot!==!0?ot:null);var ln=Object(g.useState)(!1),hr=Object(v.a)(ln,2),fn=hr[0],Pn=hr[1];Object(g.useEffect)(function(){Pn(Vt())},[]);var vn=Object(t.a)(function(){var En;return(En=Sr[0])===null||En===void 0?void 0:En.key},{value:Ke,defaultValue:Be}),On=Object(v.a)(vn,2),bn=On[0],Gn=On[1],$n=Object(g.useState)(function(){return Sr.findIndex(function(En){return En.key===bn})}),Mn=Object(v.a)($n,2),ni=Mn[0],ji=Mn[1];Object(g.useEffect)(function(){var En=Sr.findIndex(function(Ri){return Ri.key===bn});if(En===-1){var Ai;En=Math.max(0,Math.min(ni,Sr.length-1)),Gn((Ai=Sr[En])===null||Ai===void 0?void 0:Ai.key)}ji(En)},[Sr.map(function(En){return En.key}).join("_"),bn,ni]);var pi=Object(t.a)(null,{value:Fe}),Jn=Object(v.a)(pi,2),An=Jn[0],Rn=Jn[1],Nn=At;fn&&!["left","right"].includes(At)&&(Nn="top"),Object(g.useEffect)(function(){Fe||(Rn("rc-tabs-".concat(Xr)),Xr+=1)},[]);function kn(En,Ai){en==null||en(En,Ai),Gn(En),cn==null||cn(En)}var Vn={id:An,activeKey:bn,animated:Qr,tabPosition:Nn,rtl:Dr,mobile:fn},_i,Xi=Object(N.a)(Object(N.a)({},Vn),{},{editable:Ye,locale:Br,moreIcon:Gr,moreTransitionName:Mr,tabBarGutter:Nt,onTabClick:kn,onTabScroll:Tn,extra:Hr,style:Er,panes:Ne});return $r?_i=$r(Xi,Jr):_i=g.createElement(Jr,Object.assign({},Xi)),g.createElement(br.Provider,{value:{tabs:Sr,prefixCls:Le}},g.createElement("div",Object.assign({ref:We,id:Fe,className:S()(Le,"".concat(Le,"-").concat(Nn),(Ve={},Object(P.a)(Ve,"".concat(Le,"-mobile"),fn),Object(P.a)(Ve,"".concat(Le,"-editable"),Ye),Object(P.a)(Ve,"".concat(Le,"-rtl"),Dr),Ve),Te)},nn),_i,g.createElement(qr,Object.assign({destroyInactiveTabPane:Yr},Vn,{animated:Qr}))))}var Ur=g.forwardRef(on);Ur.TabPane=mr;var sn=Ur,Hn=q.b=sn},kSUc:function(W,q,D){},lPiR:function(W,q,D){(function(P,v){W.exports=q=v(D("Ib8C"))})(this,function(P){return function(v){var C=P,N=C.lib,g=N.WordArray,m=N.Hasher,S=C.algo,_=[],t=[];(function(){function c(h){for(var f=v.sqrt(h),l=2;l<=f;l++)if(!(h%l))return!1;return!0}function o(h){return(h-(h|0))*4294967296|0}for(var n=2,s=0;s<64;)c(n)&&(s<8&&(_[s]=o(v.pow(n,1/2))),t[s]=o(v.pow(n,1/3)),s++),n++})();var d=[],i=S.SHA256=m.extend({_doReset:function(){this._hash=new g.init(_.slice(0))},_doProcessBlock:function(c,o){for(var n=this._hash.words,s=n[0],h=n[1],f=n[2],l=n[3],a=n[4],r=n[5],x=n[6],y=n[7],p=0;p<64;p++){if(p<16)d[p]=c[o+p]|0;else{var R=d[p-15],O=(R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3,b=d[p-2],E=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;d[p]=O+d[p-7]+E+d[p-16]}var w=a&r^~a&x,T=s&h^s&f^h&f,F=(s<<30|s>>>2)^(s<<19|s>>>13)^(s<<10|s>>>22),M=(a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25),L=y+M+w+t[p]+d[p],Y=F+T;y=x,x=r,r=a,a=l+L|0,l=f,f=h,h=s,s=L+Y|0}n[0]=n[0]+s|0,n[1]=n[1]+h|0,n[2]=n[2]+f|0,n[3]=n[3]+l|0,n[4]=n[4]+a|0,n[5]=n[5]+r|0,n[6]=n[6]+x|0,n[7]=n[7]+y|0},_doFinalize:function(){var c=this._data,o=c.words,n=this._nDataBytes*8,s=c.sigBytes*8;return o[s>>>5]|=128<<24-s%32,o[(s+64>>>9<<4)+14]=v.floor(n/4294967296),o[(s+64>>>9<<4)+15]=n,c.sigBytes=o.length*4,this._process(),this._hash},clone:function(){var c=m.clone.call(this);return c._hash=this._hash.clone(),c}});C.SHA256=m._createHelper(i),C.HmacSHA256=m._createHmacHelper(i)}(Math),P.SHA256})},lZu9:function(W,q,D){(function(P){P(D("VrN/"),D("1eCo"),D("8EBN"))})(function(P){"use strict";P.defineMode("markdown",function(v,C){var N=P.getMode(v,"text/html"),g=N.name=="null";function m(U){if(P.findModeByName){var I=P.findModeByName(U);I&&(U=I.mime||I.mimes[0])}var G=P.getMode(v,U);return G.name=="null"?null:G}C.highlightFormatting===void 0&&(C.highlightFormatting=!1),C.maxBlockquoteDepth===void 0&&(C.maxBlockquoteDepth=0),C.taskLists===void 0&&(C.taskLists=!1),C.strikethrough===void 0&&(C.strikethrough=!1),C.emoji===void 0&&(C.emoji=!1),C.fencedCodeBlockHighlighting===void 0&&(C.fencedCodeBlockHighlighting=!0),C.fencedCodeBlockDefaultMode===void 0&&(C.fencedCodeBlockDefaultMode="text/plain"),C.xml===void 0&&(C.xml=!0),C.tokenTypeOverrides===void 0&&(C.tokenTypeOverrides={});var 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 _ in S)S.hasOwnProperty(_)&&C.tokenTypeOverrides[_]&&(S[_]=C.tokenTypeOverrides[_]);var t=/^([*\-_])(?:\s*\1){2,}\s*$/,d=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,i=/^\[(x| )\](?=\s)/i,c=C.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,o=/^ {0,3}(?:\={1,}|-{2,})\s*$/,n=/^[^#!\[\]*_\\<>` "'(~:]+/,s=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,h=/^\s*\[[^\]]+?\]:.*$/,f=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,l=" ";function a(U,I,G){return I.f=I.inline=G,G(U,I)}function r(U,I,G){return I.f=I.block=G,G(U,I)}function x(U){return!U||!/\S/.test(U.string)}function y(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==R){var I=g;if(!I){var G=P.innerMode(N,U.htmlState);I=G.mode.name=="xml"&&G.state.tagStart===null&&!G.state.context&&G.state.tokenize.isInText}I&&(U.f=w,U.block=p,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function p(U,I){var G=U.column()===I.indentation,ne=x(I.prevLine.stream),oe=I.indentedCode,de=I.prevLine.hr,Oe=I.list!==!1,Ae=(I.listStack[I.listStack.length-1]||0)+3;I.indentedCode=!1;var pe=I.indentation;if(I.indentationDiff===null&&(I.indentationDiff=I.indentation,Oe)){for(I.list=null;pe<I.listStack[I.listStack.length-1];)I.listStack.pop(),I.listStack.length?I.indentation=I.listStack[I.listStack.length-1]:I.list=!1;I.list!==!1&&(I.indentationDiff=pe-I.listStack[I.listStack.length-1])}var Se=!ne&&!de&&!I.prevLine.header&&(!Oe||!oe)&&!I.prevLine.fencedCodeEnd,be=(I.list===!1||de||ne)&&I.indentation<=Ae&&U.match(t),se=null;if(I.indentationDiff>=4&&(oe||I.prevLine.fencedCodeEnd||I.prevLine.header||ne))return U.skipToEnd(),I.indentedCode=!0,S.code;if(U.eatSpace())return null;if(G&&I.indentation<=Ae&&(se=U.match(c))&&se[1].length<=6)return I.quote=0,I.header=se[1].length,I.thisLine.header=!0,C.highlightFormatting&&(I.formatting="header"),I.f=I.inline,b(I);if(I.indentation<=Ae&&U.eat(">"))return I.quote=G?1:I.quote+1,C.highlightFormatting&&(I.formatting="quote"),U.eatSpace(),b(I);if(!be&&!I.setext&&G&&I.indentation<=Ae&&(se=U.match(d))){var ee=se[1]?"ol":"ul";return I.indentation=pe+U.current().length,I.list=!0,I.quote=0,I.listStack.push(I.indentation),I.em=!1,I.strong=!1,I.code=!1,I.strikethrough=!1,C.taskLists&&U.match(i,!1)&&(I.taskList=!0),I.f=I.inline,C.highlightFormatting&&(I.formatting=["list","list-"+ee]),b(I)}else{if(G&&I.indentation<=Ae&&(se=U.match(s,!0)))return I.quote=0,I.fencedEndRE=new RegExp(se[1]+"+ *$"),I.localMode=C.fencedCodeBlockHighlighting&&m(se[2]||C.fencedCodeBlockDefaultMode),I.localMode&&(I.localState=P.startState(I.localMode)),I.f=I.block=O,C.highlightFormatting&&(I.formatting="code-block"),I.code=-1,b(I);if(I.setext||(!Se||!Oe)&&!I.quote&&I.list===!1&&!I.code&&!be&&!h.test(U.string)&&(se=U.lookAhead(1))&&(se=se.match(o)))return I.setext?(I.header=I.setext,I.setext=0,U.skipToEnd(),C.highlightFormatting&&(I.formatting="header")):(I.header=se[0].charAt(0)=="="?1:2,I.setext=I.header),I.thisLine.header=!0,I.f=I.inline,b(I);if(be)return U.skipToEnd(),I.hr=!0,I.thisLine.hr=!0,S.hr;if(U.peek()==="[")return a(U,I,Y)}return a(U,I,I.inline)}function R(U,I){var G=N.token(U,I.htmlState);if(!g){var ne=P.innerMode(N,I.htmlState);(ne.mode.name=="xml"&&ne.state.tagStart===null&&!ne.state.context&&ne.state.tokenize.isInText||I.md_inside&&U.current().indexOf(">")>-1)&&(I.f=w,I.block=p,I.htmlState=null)}return G}function O(U,I){var G=I.listStack[I.listStack.length-1]||0,ne=I.indentation<G,oe=G+3;if(I.fencedEndRE&&I.indentation<=oe&&(ne||U.match(I.fencedEndRE))){C.highlightFormatting&&(I.formatting="code-block");var de;return ne||(de=b(I)),I.localMode=I.localState=null,I.block=p,I.f=w,I.fencedEndRE=null,I.code=0,I.thisLine.fencedCodeEnd=!0,ne?r(U,I,I.block):de}else return I.localMode?I.localMode.token(U,I.localState):(U.skipToEnd(),S.code)}function b(U){var I=[];if(U.formatting){I.push(S.formatting),typeof U.formatting=="string"&&(U.formatting=[U.formatting]);for(var G=0;G<U.formatting.length;G++)I.push(S.formatting+"-"+U.formatting[G]),U.formatting[G]==="header"&&I.push(S.formatting+"-"+U.formatting[G]+"-"+U.header),U.formatting[G]==="quote"&&(!C.maxBlockquoteDepth||C.maxBlockquoteDepth>=U.quote?I.push(S.formatting+"-"+U.formatting[G]+"-"+U.quote):I.push("error"))}if(U.taskOpen)return I.push("meta"),I.length?I.join(" "):null;if(U.taskClosed)return I.push("property"),I.length?I.join(" "):null;if(U.linkHref?I.push(S.linkHref,"url"):(U.strong&&I.push(S.strong),U.em&&I.push(S.em),U.strikethrough&&I.push(S.strikethrough),U.emoji&&I.push(S.emoji),U.linkText&&I.push(S.linkText),U.code&&I.push(S.code),U.image&&I.push(S.image),U.imageAltText&&I.push(S.imageAltText,"link"),U.imageMarker&&I.push(S.imageMarker)),U.header&&I.push(S.header,S.header+"-"+U.header),U.quote&&(I.push(S.quote),!C.maxBlockquoteDepth||C.maxBlockquoteDepth>=U.quote?I.push(S.quote+"-"+U.quote):I.push(S.quote+"-"+C.maxBlockquoteDepth)),U.list!==!1){var ne=(U.listStack.length-1)%3;ne?ne===1?I.push(S.list2):I.push(S.list3):I.push(S.list1)}return U.trailingSpaceNewLine?I.push("trailing-space-new-line"):U.trailingSpace&&I.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),I.length?I.join(" "):null}function E(U,I){return U.match(n,!0)?b(I):void 0}function w(U,I){var G=I.text(U,I);if(typeof G!="undefined")return G;if(I.list)return I.list=null,b(I);if(I.taskList){var ne=U.match(i,!0)[1]===" ";return ne?I.taskOpen=!0:I.taskClosed=!0,C.highlightFormatting&&(I.formatting="task"),I.taskList=!1,b(I)}if(I.taskOpen=!1,I.taskClosed=!1,I.header&&U.match(/^#+$/,!0))return C.highlightFormatting&&(I.formatting="header"),b(I);var oe=U.next();if(I.linkTitle){I.linkTitle=!1;var de=oe;oe==="("&&(de=")"),de=(de+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Oe="^\\s*(?:[^"+de+"\\\\]+|\\\\\\\\|\\\\.)"+de;if(U.match(new RegExp(Oe),!0))return S.linkHref}if(oe==="`"){var Ae=I.formatting;C.highlightFormatting&&(I.formatting="code"),U.eatWhile("`");var pe=U.current().length;if(I.code==0&&(!I.quote||pe==1))return I.code=pe,b(I);if(pe==I.code){var Se=b(I);return I.code=0,Se}else return I.formatting=Ae,b(I)}else if(I.code)return b(I);if(oe==="\\"&&(U.next(),C.highlightFormatting)){var be=b(I),se=S.formatting+"-escape";return be?be+" "+se:se}if(oe==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return I.imageMarker=!0,I.image=!0,C.highlightFormatting&&(I.formatting="image"),b(I);if(oe==="["&&I.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return I.imageMarker=!1,I.imageAltText=!0,C.highlightFormatting&&(I.formatting="image"),b(I);if(oe==="]"&&I.imageAltText){C.highlightFormatting&&(I.formatting="image");var be=b(I);return I.imageAltText=!1,I.image=!1,I.inline=I.f=F,be}if(oe==="["&&!I.image)return I.linkText&&U.match(/^.*?\]/)||(I.linkText=!0,C.highlightFormatting&&(I.formatting="link")),b(I);if(oe==="]"&&I.linkText){C.highlightFormatting&&(I.formatting="link");var be=b(I);return I.linkText=!1,I.inline=I.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?F:w,be}if(oe==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){I.f=I.inline=T,C.highlightFormatting&&(I.formatting="link");var be=b(I);return be?be+=" ":be="",be+S.linkInline}if(oe==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){I.f=I.inline=T,C.highlightFormatting&&(I.formatting="link");var be=b(I);return be?be+=" ":be="",be+S.linkEmail}if(C.xml&&oe==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ee=U.string.indexOf(">",U.pos);if(ee!=-1){var B=U.string.substring(U.start,ee);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(B)&&(I.md_inside=!0)}return U.backUp(1),I.htmlState=P.startState(N),r(U,I,R)}if(C.xml&&oe==="<"&&U.match(/^\/\w*?>/))return I.md_inside=!1,"tag";if(oe==="*"||oe==="_"){for(var V=1,X=U.pos==1?" ":U.string.charAt(U.pos-2);V<3&&U.eat(oe);)V++;var Q=U.peek()||" ",Z=!/\s/.test(Q)&&(!f.test(Q)||/\s/.test(X)||f.test(X)),ie=!/\s/.test(X)&&(!f.test(X)||/\s/.test(Q)||f.test(Q)),re=null,$=null;if(V%2&&(!I.em&&Z&&(oe==="*"||!ie||f.test(X))?re=!0:I.em==oe&&ie&&(oe==="*"||!Z||f.test(Q))&&(re=!1)),V>1&&(!I.strong&&Z&&(oe==="*"||!ie||f.test(X))?$=!0:I.strong==oe&&ie&&(oe==="*"||!Z||f.test(Q))&&($=!1)),$!=null||re!=null){C.highlightFormatting&&(I.formatting=re==null?"strong":$==null?"em":"strong em"),re===!0&&(I.em=oe),$===!0&&(I.strong=oe);var Se=b(I);return re===!1&&(I.em=!1),$===!1&&(I.strong=!1),Se}}else if(oe===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return b(I);U.backUp(1)}if(C.strikethrough){if(oe==="~"&&U.eatWhile(oe)){if(I.strikethrough){C.highlightFormatting&&(I.formatting="strikethrough");var Se=b(I);return I.strikethrough=!1,Se}else if(U.match(/^[^\s]/,!1))return I.strikethrough=!0,C.highlightFormatting&&(I.formatting="strikethrough"),b(I)}else if(oe===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return b(I);U.backUp(2)}}if(C.emoji&&oe===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){I.emoji=!0,C.highlightFormatting&&(I.formatting="emoji");var J=b(I);return I.emoji=!1,J}return oe===" "&&(U.match(/^ +$/,!1)?I.trailingSpace++:I.trailingSpace&&(I.trailingSpaceNewLine=!0)),b(I)}function T(U,I){var G=U.next();if(G===">"){I.f=I.inline=w,C.highlightFormatting&&(I.formatting="link");var ne=b(I);return ne?ne+=" ":ne="",ne+S.linkInline}return U.match(/^[^>]+/,!0),S.linkInline}function F(U,I){if(U.eatSpace())return null;var G=U.next();return G==="("||G==="["?(I.f=I.inline=L(G==="("?")":"]"),C.highlightFormatting&&(I.formatting="link-string"),I.linkHref=!0,b(I)):"error"}var M={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function L(U){return function(I,G){var ne=I.next();if(ne===U){G.f=G.inline=w,C.highlightFormatting&&(G.formatting="link-string");var oe=b(G);return G.linkHref=!1,oe}return I.match(M[U]),G.linkHref=!0,b(G)}}function Y(U,I){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(I.f=K,U.next(),C.highlightFormatting&&(I.formatting="link"),I.linkText=!0,b(I)):a(U,I,w)}function K(U,I){if(U.match(/^\]:/,!0)){I.f=I.inline=A,C.highlightFormatting&&(I.formatting="link");var G=b(I);return I.linkText=!1,G}return U.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function A(U,I){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?I.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),I.f=I.inline=w,S.linkHref+" url")}var H={startState:function(){return{f:p,prevLine:{stream:null},thisLine:{stream:null},block:p,htmlState:null,indentation:0,inline:w,text:E,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&P.copyState(N,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?P.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,I){if(I.formatting=!1,U!=I.thisLine.stream){if(I.header=0,I.hr=!1,U.match(/^\s*$/,!0))return y(I),null;if(I.prevLine=I.thisLine,I.thisLine={stream:U},I.taskList=!1,I.trailingSpace=0,I.trailingSpaceNewLine=!1,!I.localState&&(I.f=I.block,I.f!=R)){var G=U.match(/^\s*/,!0)[0].replace(/\t/g,l).length;if(I.indentation=G,I.indentationDiff=null,G>0)return null}}return I.f(U,I)},innerMode:function(U){return U.block==R?{state:U.htmlState,mode:N}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:H}},indent:function(U,I,G){return U.block==R&&N.indent?N.indent(U.htmlState,I,G):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,I,G):P.Pass},blankLine:y,getType:b,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return H},"xml"),P.defineMIME("text/markdown","markdown"),P.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(W){if(!0)module.exports=W();else var q})(function(){var define,module,exports;return function(){function W(q,D,P){function v(g,m){if(!D[g]){if(!q[g]){var S=typeof require=="function"&&require;if(!m&&S)return require(g,!0);if(C)return C(g,!0);var _=new Error("Cannot find module '"+g+"'");throw _.code="MODULE_NOT_FOUND",_}var t=D[g]={exports:{}};q[g][0].call(t.exports,function(d){var i=q[g][1][d];return v(i||d)},t,t.exports,W,q,D,P)}return D[g].exports}for(var C=typeof require=="function"&&require,N=0;N<P.length;N++)v(P[N]);return v}return W}()({1:[function(W,q,D){"use strict";var P=W("./browser/client");P.Buffer=W("buffer").Buffer,P.urllib=W("../shims/xhr"),P.version=W("./browser/version").version,q.exports=P},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(W,q,D){(function(P,v){"use strict";var C=W("babel-runtime/core-js/promise"),N=t(C),g=W("babel-runtime/regenerator"),m=t(g),S=W("babel-runtime/core-js/object/assign"),_=t(S);function t(Y){return Y&&Y.__esModule?Y:{default:Y}}var d=W("debug")("ali-oss"),i=W("copy-to"),c=W("xml2js"),o=W("agentkeepalive"),n=W("merge-descriptors"),s=W("url"),h=W("is-type-of"),f=W("platform"),l=W("utility"),a=W("urllib"),r=W("./version"),x=W("bowser"),y=W("../common/signUtils"),p=W("../common/utils/isIP"),R=p.isIP,O=W("../common/client/initOptions"),b=W("../common/utils/createRequest"),E=b.createRequest,w=new o;function T(){var Y=f.name,K=f.version;Y&&Y.toLowerCase&&Y.toLowerCase()==="ie"&&K.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function F(){return location&&location.protocol==="https:"}function M(Y,K){if(T(),!(this instanceof M))return new M(Y,K);Y&&Y.inited?this.options=Y:this.options=M.initOptions(Y),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=a,this.agent=this.options.agent||w),this.ctx=K,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}q.exports=M,M.initOptions=function(K){K.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var A=(0,_.default)({secure:F(),useFetch:!1},K);return O(A)};var L=M.prototype;L.debug=d,n(L,W("./object")),n(L,W("../common/bucket/getBucketWebsite")),n(L,W("../common/bucket/putBucketWebsite")),n(L,W("../common/bucket/deleteBucketWebsite")),n(L,W("../common/bucket/getBucketLifecycle")),n(L,W("../common/bucket/putBucketLifecycle")),n(L,W("../common/bucket/deleteBucketLifecycle")),n(L,W("../common/bucket/putBucketVersioning")),n(L,W("../common/bucket/getBucketVersioning")),n(L,W("./managed-upload")),n(L,W("../common/multipart")),n(L,W("../common/parallel")),L.signature=function(K){return this.debug("authorization stringToSign: %s",K,"info"),y.computeSignature(this.options.accessKeySecret,K)},L.authorization=function(K,A,H,U){var I=y.buildCanonicalString(K.toUpperCase(),A,{headers:U,parameters:H});return y.authorization(this.options.accessKeyId,this.options.accessKeySecret,I)},L.request=function(K){var A,H,U,I,G,ne;return m.default.async(function(de){for(;;)switch(de.prev=de.next){case 0:return A=E.call(this,K),this.options.useFetch||(A.params.mode="disable-fetch"),H=void 0,U=void 0,I=!!K.stream,de.prev=5,de.next=8,m.default.awrap(this.urllib.request(A.url,A.params));case 8:H=de.sent,this.debug("response %s %s, got %s, headers: %j",K.method,A.url,H.status,H.headers,"info"),de.next=15;break;case 12:de.prev=12,de.t0=de.catch(5),U=de.t0;case 15:if(G=void 0,!(H&&K.successStatuses&&K.successStatuses.indexOf(H.status)===-1)){de.next=28;break}return de.next=19,m.default.awrap(this.requestError(H));case 19:if(G=de.sent,!(G.code==="RequestTimeTooSkewed"&&!I)){de.next=25;break}return this.options.amendTimeSkewed=+new Date(G.serverTime)-new Date,de.next=24,m.default.awrap(this.request(K));case 24:return de.abrupt("return",de.sent);case 25:G.params=K,de.next=32;break;case 28:if(!U){de.next=32;break}return de.next=31,m.default.awrap(this.requestError(U));case 31:G=de.sent;case 32:if(!G){de.next=34;break}throw G;case 34:if(!K.xmlResponse){de.next=39;break}return de.next=37,m.default.awrap(this.parseXML(H.data));case 37:ne=de.sent,H.data=ne;case 39:return de.abrupt("return",H);case 40:case"end":return de.stop()}},null,this,[[5,12]])},L._getResource=function(K){var A="/";return K.bucket&&(A+=K.bucket+"/"),K.object&&(A+=K.object),A},L._isIP=R,L._escape=function(K){return l.encodeURIComponent(K).replace(/%2F/g,"/")},L._getReqUrl=function(K){var A={};i(this.options.endpoint).to(A);var H=this._isIP(A.hostname),U=this.options.cname;K.bucket&&!U&&!H&&(A.host=K.bucket+"."+A.host);var I="/";K.bucket&&H&&(I+=K.bucket+"/"),K.object&&(I+=this._escape(K.object).replace(/\+/g,"%2B")),A.pathname=I;var G={};if(K.query&&n(G,K.query),K.subres){var ne={};h.string(K.subres)?ne[K.subres]="":h.array(K.subres)?K.subres.forEach(function(oe){ne[oe]=""}):ne=K.subres,n(G,ne)}return A.query=G,s.format(A)},L._getUserAgent=function(){var K=v&&v.browser?"js":"nodejs",A="aliyun-sdk-"+K+"/"+r.version,H=f.description;return!H&&v&&(H="Node.js "+v.version.slice(1)+" on "+v.platform+" "+v.arch),this._checkUserAgent(A+" "+H)},L._checkUserAgent=function(K){var A=K.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return A},L.checkBrowserAndVersion=function(K,A){return x.name===K&&x.version.split(".")[0]===A},L.parseXML=function(K){return new N.default(function(A,H){P.isBuffer(K)&&(K=K.toString()),c.parseString(K,{explicitRoot:!1,explicitArray:!1},function(U,I){U?H(U):A(I)})})},L.requestError=function(K){var A,H,U,I;return m.default.async(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(A=null,!(!K.data||!K.data.length)){ne.next=5;break}K.status===-1||K.status===-2?(A=new Error(K.message),A.name=K.name,A.status=K.status,A.code=K.name):(K.status===404?(A=new Error("Object not exists"),A.name="NoSuchKeyError",A.status=404,A.code="NoSuchKey"):K.status===412?(A=new Error("Pre condition failed"),A.name="PreconditionFailedError",A.status=412,A.code="PreconditionFailed"):(A=new Error("Unknow error, status: "+K.status),A.name="UnknowError",A.status=K.status),A.requestId=K.headers["x-oss-request-id"],A.host=""),ne.next=33;break;case 5:return H=String(K.data),this.debug("request response error data: %s",H,"error"),U=void 0,ne.prev=8,ne.next=11,m.default.awrap(this.parseXML(H));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(H,"error"),ne.t1.message+=`
|
|
|
raw xml: `+H,ne.t1.status=K.status,ne.t1.requestId=K.headers["x-oss-request-id"],ne.abrupt("return",ne.t1);case 24:I=U.Message||"unknow request error, status: "+K.status,U.Condition&&(I+=" (condition: "+U.Condition+")"),A=new Error(I),A.name=U.Code?U.Code+"Error":"UnknowError",A.status=K.status,A.code=U.Code,A.requestId=U.RequestId,A.hostId=U.HostId,A.serverTime=U.ServerTime;case 33:return this.debug("generate error %j",A,"error"),ne.abrupt("return",A);case 35:case"end":return ne.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:W("../../node_modules/is-buffer/index.js")},W("_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(W,q,D){(function(P){"use strict";var v=W("babel-runtime/core-js/array/from"),C=_(v),N=W("babel-runtime/core-js/promise"),g=_(N),m=W("babel-runtime/regenerator"),S=_(m);function _(y){return y&&y.__esModule?y:{default:y}}var t=W("is-type-of"),d=W("util"),i=W("path"),c=W("mime"),o=W("copy-to"),n=W("../common/utils/isBlob"),s=n.isBlob,h=W("../common/utils/isFile"),f=h.isFile,l=D;l.multipartUpload=function(p,R,O){var b,E,w,T,F,M,L,Y,K;return S.default.async(function(H){for(;;)switch(H.prev=H.next){case 0:if(this.resetCancelFlag(),O=O||{},!(O.checkpoint&&O.checkpoint.uploadId)){H.next=6;break}return H.next=5,S.default.awrap(this._resumeMultipart(O.checkpoint,O));case 5:return H.abrupt("return",H.sent);case 6:return b=100*1024,O.mime||(f(R)?O.mime=c.getType(i.extname(R.name)):s(R)?O.mime=R.type:O.mime=c.getType(i.extname(R))),O.headers=O.headers||{},this._convertMetaToHeaders(O.meta,O.headers),H.next=12,S.default.awrap(this._getFileSize(R));case 12:if(E=H.sent,!(E<b)){H.next=25;break}return w=this._createStream(R,0,E),O.contentLength=E,H.next=18,S.default.awrap(this.putStream(p,w,O));case 18:if(T=H.sent,!(O&&O.progress)){H.next=22;break}return H.next=22,S.default.awrap(O.progress(1));case 22:return F={res:T.res,bucket:this.options.bucket,name:p,etag:T.res.headers.etag},(O.headers&&O.headers["x-oss-callback"]||O.callback)&&(F.data=T.data),H.abrupt("return",F);case 25:if(!(O.partSize&&!(parseInt(O.partSize,10)===O.partSize))){H.next=27;break}throw new Error("partSize must be int number");case 27:if(!(O.partSize&&O.partSize<b)){H.next=29;break}throw new Error("partSize must not be smaller than "+b);case 29:return H.next=31,S.default.awrap(this.initMultipartUpload(p,O));case 31:if(M=H.sent,L=M.uploadId,Y=this._getPartSize(E,O.partSize),K={file:R,name:p,fileSize:E,partSize:Y,uploadId:L,doneParts:[]},!(O&&O.progress)){H.next=38;break}return H.next=38,S.default.awrap(O.progress(0,K,M.res));case 38:return H.next=40,S.default.awrap(this._resumeMultipart(K,O));case 40:return H.abrupt("return",H.sent);case 41:case"end":return H.stop()}},null,this)},l._resumeMultipart=function(p,R){var O,b,E,w,T,F,M,L,Y,K,A,H,U,I,G,ne,oe,de;return S.default.async(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:if(O=this,!this.isCancel()){Ae.next=3;break}throw this._makeCancelEvent();case 3:return b=p.file,E=p.fileSize,w=p.partSize,T=p.uploadId,F=p.doneParts,M=p.name,L=[],F.length>0&&o(F).to(L),Y=this._divideParts(E,w),K=Y.length,A=!1,H=function(Se,be){var se=this;return new g.default(function(B,V){var X,Q,Z,ie;return S.default.async(function($){for(;;)switch($.prev=$.next){case 0:if($.prev=0,Se.isCancel()){$.next=18;break}return X=Y[be-1],Q={stream:Se._createStream(b,X.start,X.end),size:X.end-X.start},$.next=6,S.default.awrap(Se._uploadPart(M,T,be,Q));case 6:if(Z=$.sent,!(!Se.isCancel()&&!A)){$.next=15;break}if(p.doneParts.push({number:be,etag:Z.res.headers.etag}),!R.progress){$.next=12;break}return $.next=12,S.default.awrap(R.progress(F.length/K,p,Z.res));case 12:B({number:be,etag:Z.res.headers.etag}),$.next=16;break;case 15:B();case 16:$.next=19;break;case 18:B();case 19:$.next=30;break;case 21:$.prev=21,$.t0=$.catch(0),ie=new Error,ie.name=$.t0.name,ie.message=$.t0.message,ie.stack=$.t0.stack,ie.partNum=be,o($.t0).to(ie),V(ie);case 30:case"end":return $.stop()}},null,se,[[0,21]])})},U=(0,C.default)(new Array(K),function(pe,Se){return Se+1}),I=L.map(function(pe){return pe.number}),G=U.filter(function(pe){return I.indexOf(pe)<0}),ne=5,oe=R.parallel||ne,Ae.next=17,S.default.awrap(this._parallel(G,oe,function(pe){return new g.default(function(Se,be){H(O,pe).then(function(se){se&&L.push(se),Se()}).catch(function(se){be(se)})})}));case 17:if(de=Ae.sent,A=!0,!this.isCancel()){Ae.next=22;break}throw H=null,this._makeCancelEvent();case 22:if(!(de&&de.length>0)){Ae.next=25;break}throw de[0].message="Failed to upload some parts with error: "+de[0].toString()+" part_num: "+de[0].partNum,de[0];case 25:return Ae.next=27,S.default.awrap(this.completeMultipartUpload(M,T,L,R));case 27:return Ae.abrupt("return",Ae.sent);case 28:case"end":return Ae.stop()}},null,this)},l._getFileSize=function(p){return S.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!t.buffer(p)){O.next=4;break}return O.abrupt("return",p.length);case 4:if(!(s(p)||f(p))){O.next=6;break}return O.abrupt("return",p.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return O.stop()}},null,this)};var a=W("stream"),r=a.Readable;function x(y,p){if(!(this instanceof x))return new x(y,p);r.call(this,p),this.file=y,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}d.inherits(x,r),x.prototype.readFileAndPush=function(p){if(this.fileBuffer)for(var R=!0;R&&this.fileBuffer&&this.start<this.fileBuffer.length;){var O=this.start,b=O+p;b=b>this.fileBuffer.length?this.fileBuffer.length:b,this.start=b,R=this.push(this.fileBuffer.slice(O,b))}},x.prototype._read=function(p){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var R=16*1024;p=p||R;var O=this;this.reader.onload=function(E){O.fileBuffer=P.from(new Uint8Array(E.target.result)),O.file=null,O.readFileAndPush(p)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(p)},l._createStream=function(p,R,O){if(s(p)||f(p))return new x(p.slice(R,O));throw new Error("_createStream requires File/Blob.")},l._getPartSize=function(p,R){var O=10*1e3,b=1024*1024;return R?Math.max(Math.ceil(p/O),R):b},l._divideParts=function(p,R){for(var O=Math.ceil(p/R),b=[],E=0;E<O;E++){var w=R*E,T=Math.min(w+R,p);b.push({start:w,end:T})}return b}}).call(this,W("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(W,q,D){"use strict";var P=W("babel-runtime/core-js/promise"),v=t(P),C=W("babel-runtime/core-js/object/keys"),N=t(C),g=W("babel-runtime/core-js/object/assign"),m=t(g),S=W("babel-runtime/regenerator"),_=t(S);function t(O){return O&&O.__esModule?O:{default:O}}var d=W("utility"),i=W("fs"),c=W("is-type-of"),o=W("url"),n=W("copy-to"),s=W("path"),h=W("mime"),f=W("../common/callback"),l=W("../common/signUtils"),a=W("merge-descriptors"),r=W("../common/utils/isBlob"),x=r.isBlob,y=W("../common/utils/isFile"),p=y.isFile,R=D;R.append=function(b,E,w){var T;return _.default.async(function(M){for(;;)switch(M.prev=M.next){case 0:return w=w||{},w.position===void 0&&(w.position="0"),w.subres={append:"",position:w.position},w.method="POST",M.next=6,_.default.awrap(this.put(b,E,w));case 6:return T=M.sent,T.nextAppendPosition=T.res.headers["x-oss-next-append-position"],M.abrupt("return",T);case 9:case"end":return M.stop()}},null,this)},R.put=function(b,E,w){var T,F,M,L,Y,K,A;return _.default.async(function(U){for(;;)switch(U.prev=U.next){case 0:if(T=void 0,w=w||{},b=this._objectName(b),!c.buffer(E)){U.next=7;break}T=E,U.next=33;break;case 7:if(!(x(E)||p(E))){U.next=32;break}return w.mime||(p(E)?w.mime=h.getType(s.extname(E.name)):w.mime=E.type),F=this._createStream(E,0,E.size),U.next=12,_.default.awrap(this._getFileSize(E));case 12:return w.contentLength=U.sent,U.prev=13,U.next=16,_.default.awrap(this.putStream(b,F,w));case 16:return M=U.sent,U.abrupt("return",M);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,_.default.awrap(this.put(b,E,w));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 w.headers=w.headers||{},this._convertMetaToHeaders(w.meta,w.headers),L=w.method||"PUT",Y=this._objectRequestParams(L,b,w),f.encodeCallback(Y,w),Y.mime=w.mime,Y.content=T,Y.successStatuses=[200],U.next=43,_.default.awrap(this.request(Y));case 43:return K=U.sent,A={name:b,url:this._objectUrl(b),res:K.res},Y.headers&&Y.headers["x-oss-callback"]&&(A.data=JSON.parse(K.data.toString())),U.abrupt("return",A);case 47:case"end":return U.stop()}},null,this,[[13,20]])},R.putStream=function(b,E,w){var T,F,M,L;return _.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:return w=w||{},w.headers=w.headers||{},b=this._objectName(b),w.contentLength?w.headers["Content-Length"]=w.contentLength:w.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(w.meta,w.headers),T=w.method||"PUT",F=this._objectRequestParams(T,b,w),f.encodeCallback(F,w),F.mime=w.mime,F.stream=E,F.successStatuses=[200],K.next=13,_.default.awrap(this.request(F));case 13:return M=K.sent,L={name:b,url:this._objectUrl(b),res:M.res},F.headers&&F.headers["x-oss-callback"]&&(L.data=JSON.parse(M.data.toString())),K.abrupt("return",L);case 17:case"end":return K.stop()}},null,this)},a(R,W("../common/object/copyObject")),a(R,W("../common/object/getObjectTagging")),a(R,W("../common/object/putObjectTagging")),a(R,W("../common/object/deleteObjectTagging")),a(R,W("../common/image")),a(R,W("../common/object/getBucketVersions")),a(R,W("../common/object/getACL")),a(R,W("../common/object/putACL")),a(R,W("../common/object/head")),a(R,W("../common/object/delete")),a(R,W("../common/object/get")),a(R,W("../common/object/putSymlink")),a(R,W("../common/object/getSymlink")),a(R,W("../common/object/deleteMulti")),a(R,W("../common/object/getObjectMeta")),R.putMeta=function(b,E,w){var T;return _.default.async(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,_.default.awrap(this.copy(b,b,{meta:E||{},timeout:w&&w.timeout,ctx:w&&w.ctx}));case 2:return T=M.sent,M.abrupt("return",T);case 4:case"end":return M.stop()}},null,this)},R.list=function(b,E){var w,T,F,M,L;return _.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:return w=this._objectRequestParams("GET","",E),w.query=b,w.xmlResponse=!0,w.successStatuses=[200],K.next=6,_.default.awrap(this.request(w));case 6:return T=K.sent,F=T.data.Contents,M=this,F&&(Array.isArray(F)||(F=[F]),F=F.map(function(A){return{name:A.Key,url:M._objectUrl(A.Key),lastModified:A.LastModified,etag:A.ETag,type:A.Type,size:Number(A.Size),storageClass:A.StorageClass,owner:{id:A.Owner.ID,displayName:A.Owner.DisplayName}}})),L=T.data.CommonPrefixes||null,L&&(Array.isArray(L)||(L=[L]),L=L.map(function(A){return A.Prefix})),K.abrupt("return",{res:T.res,objects:F,prefixes:L,nextMarker:T.data.NextMarker||null,isTruncated:T.data.IsTruncated==="true"});case 13:case"end":return K.stop()}},null,this)},R.restore=function(b,E){var w,T;return _.default.async(function(M){for(;;)switch(M.prev=M.next){case 0:return E=E||{},E.subres=(0,m.default)({restore:""},E.subres),E.versionId&&(E.subres.versionId=E.versionId),w=this._objectRequestParams("POST",b,E),w.successStatuses=[202],M.next=7,_.default.awrap(this.request(w));case 7:return T=M.sent,M.abrupt("return",{res:T.res});case 9:case"end":return M.stop()}},null,this)},R.signatureUrl=function(b,E){E=E||{},b=this._objectName(b),E.method=E.method||"GET";var w=d.timestamp()+(E.expires||1800),T={bucket:this.options.bucket,object:b},F=this._getResource(T);this.options.stsToken&&(E["security-token"]=this.options.stsToken);var M=l._signatureForURL(this.options.accessKeySecret,E,F,w),L=o.parse(this._getReqUrl(T));return L.query={OSSAccessKeyId:this.options.accessKeyId,Expires:w,Signature:M.Signature},n(M.subResource).to(L.query),L.format()},R.getObjectUrl=function(b,E){return E?E[E.length-1]!=="/"&&(E+="/"):E=this.options.endpoint.format(),E+this._escape(this._objectName(b))},R._objectUrl=function(b){return this._getReqUrl({bucket:this.options.bucket,object:b})},R.generateObjectUrl=function(O,b){if(b)b[b.length-1]!=="/"&&(b+="/");else{b=this.options.endpoint.format();var E=o.parse(b),w=this.options.bucket;E.hostname=w+"."+E.hostname,E.host=w+"."+E.host,b=E.format()}return b+this._escape(this._objectName(O))},R._objectRequestParams=function(b,E,w){if(!this.options.bucket)throw new Error("Please create a bucket first");w=w||{},E=this._objectName(E);var T={object:E,bucket:this.options.bucket,method:b,subres:w&&w.subres,timeout:w&&w.timeout,ctx:w&&w.ctx};return w.headers&&(T.headers={},n(w.headers).to(T.headers)),T},R._objectName=function(b){return b.replace(/^\/+/,"")},R._convertMetaToHeaders=function(b,E){if(!b)return;(0,N.default)(b).forEach(function(w){E["x-oss-meta-"+w]=b[w]})},R._deleteFileSafe=function(b){var E=this;return new v.default(function(w){i.exists(b,function(T){T?i.unlink(b,function(F){F&&E.debug("unlink %j error: %s",b,F,"error"),w()}):w()})})}},{"../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(W,q,D){"use strict";D.version="6.10.0"},{}],6:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=C(P);function C(S){return S&&S.__esModule?S:{default:S}}var N=W("../utils/checkBucketName"),g=N.checkBucketName,m=D;m.deleteBucketLifecycle=function(_,t){var d,i;return v.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return g(_),d=this._bucketRequestParams("DELETE",_,"lifecycle",t),d.successStatuses=[204],o.next=5,v.default.awrap(this.request(d));case 5:return i=o.sent,o.abrupt("return",{res:i.res});case 7:case"end":return o.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=C(P);function C(S){return S&&S.__esModule?S:{default:S}}var N=W("../utils/checkBucketName"),g=N.checkBucketName,m=D;m.deleteBucketWebsite=function(_,t){var d,i;return v.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return g(_),d=this._bucketRequestParams("DELETE",_,"website",t),d.successStatuses=[204],o.next=5,v.default.awrap(this.request(d));case 5:return i=o.sent,o.abrupt("return",{res:i.res});case 7:case"end":return o.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=C(P);function C(i){return i&&i.__esModule?i:{default:i}}var N=W("../utils/checkBucketName"),g=N.checkBucketName,m=W("../utils/isArray"),S=m.isArray,_=W("../utils/formatObjKey"),t=_.formatObjKey,d=D;d.getBucketLifecycle=function(c,o){var n,s,h;return v.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return g(c),n=this._bucketRequestParams("GET",c,"lifecycle",o),n.successStatuses=[200],n.xmlResponse=!0,l.next=6,v.default.awrap(this.request(n));case 6:return s=l.sent,h=s.data.Rule||null,h&&(S(h)||(h=[h]),h=h.map(function(a){return a.ID&&(a.id=a.ID,delete a.ID),a.Tag&&!S(a.Tag)&&(a.Tag=[a.Tag]),t(a,"firstLowerCase")})),l.abrupt("return",{rules:h,res:s.res});case 10:case"end":return l.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=C(P);function C(S){return S&&S.__esModule?S:{default:S}}var N=W("../utils/checkBucketName"),g=N.checkBucketName,m=D;m.getBucketVersioning=function(_,t){var d,i,c;return v.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return g(_),d=this._bucketRequestParams("GET",_,"versioning",t),d.xmlResponse=!0,d.successStatuses=[200],n.next=6,v.default.awrap(this.request(d));case 6:return i=n.sent,c=i.data.Status,n.abrupt("return",{status:i.status,versionStatus:c,res:i.res});case 9:case"end":return n.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=C(P);function C(t){return t&&t.__esModule?t:{default:t}}var N=W("../utils/checkBucketName"),g=N.checkBucketName,m=W("../utils/isObject"),S=m.isObject,_=D;_.getBucketWebsite=function(d,i){var c,o,n;return v.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return g(d),c=this._bucketRequestParams("GET",d,"website",i),c.successStatuses=[200],c.xmlResponse=!0,h.next=6,v.default.awrap(this.request(c));case 6:return o=h.sent,n=[],o.data.RoutingRules&&o.data.RoutingRules.RoutingRule&&(S(o.data.RoutingRules.RoutingRule)?n=[o.data.RoutingRules.RoutingRule]:n=o.data.RoutingRules.RoutingRule),h.abrupt("return",{index:o.data.IndexDocument&&o.data.IndexDocument.Suffix||"",supportSubDir:o.data.IndexDocument&&o.data.IndexDocument.SupportSubDir||"false",type:o.data.IndexDocument&&o.data.IndexDocument.Type,routingRules:n,error:o.data.ErrorDocument&&o.data.ErrorDocument.Key||null,res:o.res});case 10:case"end":return h.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=C(P);function C(p){return p&&p.__esModule?p:{default:p}}var N=W("../utils/checkBucketName"),g=N.checkBucketName,m=W("../utils/isArray"),S=m.isArray,_=W("../utils/deepCopy"),t=_.deepCopy,d=W("../utils/isObject"),i=d.isObject,c=W("../utils/obj2xml"),o=c.obj2xml,n=W("../utils/checkObjectTag"),s=n.checkObjectTag,h=W("../utils/getStrBytesCount"),f=h.getStrBytesCount,l=D;l.putBucketLifecycle=function(R,O,b){var E,w,T,F,M;return v.default.async(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(g(R),S(O)){Y.next=3;break}throw new Error("rules must be Array");case 3:return E=this._bucketRequestParams("PUT",R,"lifecycle",b),w=[],T={LifecycleConfiguration:{Rule:w}},O.forEach(function(K){a(K),y(K),K.id&&(K.ID=K.id,delete K.id),w.push(K)}),F=o(T,{headers:!0,firstUpperCase:!0}),E.content=F,E.mime="xml",E.successStatuses=[200],Y.next=13,v.default.awrap(this.request(E));case 13:return M=Y.sent,Y.abrupt("return",{res:M.res});case 15:case"end":return Y.stop()}},null,this)};function a(p){p.days&&(p.expiration={days:p.days}),p.date&&(p.expiration={createdBeforeDate:p.date})}function r(p,R){var O=p.days,b=p.createdBeforeDate;if(!O&&!b)throw new Error(R+" must includes days or createdBeforeDate");if(O&&!/^[1-9][0-9]*$/.test(O))throw new Error("days must be a positive integer");if(b&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(b))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function x(p){if(!S(p)&&!i(p))throw new Error("tag must be Object or Array");p=i(p)?[p]:p;var R={},O=t(p);O.forEach(function(b){R[b.key]=b.value}),s(R)}function y(p){if(p.id&&f(p.id)>255)throw new Error("ID is composed of 255 bytes at most");if(p.prefix===""||p.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(p.status))throw new Error("Status must be Enabled or Disabled");if(p.transition){if(!["IA","Archive"].includes(p.transition.storageClass))throw new Error("StorageClass must be IA or Archive");r(p.transition,"Transition")}if(p.expiration){if(!p.expiration.expiredObjectDeleteMarker)r(p.expiration,"Expiration");else if(p.expiration.days||p.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(p.abortMultipartUpload&&r(p.abortMultipartUpload,"AbortMultipartUpload"),!p.expiration&&!p.abortMultipartUpload&&!p.transition&&!p.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(p.tag){if(p.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");x(p.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(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=C(P);function C(t){return t&&t.__esModule?t:{default:t}}var N=W("../utils/checkBucketName"),g=N.checkBucketName,m=W("../utils/obj2xml"),S=m.obj2xml,_=D;_.putBucketVersioning=function(d,i){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,n,s;return v.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:if(g(d),["Enabled","Suspended"].includes(i)){f.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return o=this._bucketRequestParams("PUT",d,"versioning",c),n={VersioningConfiguration:{Status:i}},o.mime="xml",o.content=S(n,{headers:!0}),f.next=9,v.default.awrap(this.request(o));case 9:return s=f.sent,f.abrupt("return",{res:s.res,status:s.status});case 11:case"end":return f.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=C(P);function C(i){return i&&i.__esModule?i:{default:i}}var N=W("../utils/checkBucketName"),g=N.checkBucketName,m=W("../utils/obj2xml"),S=m.obj2xml,_=W("../utils/isArray"),t=_.isArray,d=D;d.putBucketWebsite=function(c){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments[2],s,h,f,l,a;return v.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:if(g(c),s=this._bucketRequestParams("PUT",c,"website",n),h={Suffix:o.index||"index.html"},f={IndexDocument:h},l={WebsiteConfiguration:f},o.supportSubDir&&(h.SupportSubDir=o.supportSubDir),o.type&&(h.Type=o.type),o.error&&(f.ErrorDocument={Key:o.error}),!(o.routingRules!==void 0)){x.next=12;break}if(t(o.routingRules)){x.next=11;break}throw new Error("RoutingRules must be Array");case 11:f.RoutingRules={RoutingRule:o.routingRules};case 12:return l=S(l),s.content=l,s.mime="xml",s.successStatuses=[200],x.next=18,v.default.awrap(this.request(s));case 18:return a=x.sent,x.abrupt("return",{res:a.res});case 20:case"end":return x.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(W,q,D){(function(P){"use strict";var v=W("babel-runtime/core-js/object/keys"),C=m(v),N=W("babel-runtime/core-js/json/stringify"),g=m(N);function m(S){return S&&S.__esModule?S:{default:S}}D.encodeCallback=function(_,t){if(_.headers=_.headers||{},!Object.prototype.hasOwnProperty.call(_.headers,"x-oss-callback")&&t.callback){var d={callbackUrl:encodeURI(t.callback.url),callbackBody:t.callback.body};t.callback.host&&(d.callbackHost=t.callback.host),t.callback.contentType&&(d.callbackBodyType=t.callback.contentType);var i=P.from((0,g.default)(d)).toString("base64");if(_.headers["x-oss-callback"]=i,t.callback.customValue){var c={};(0,C.default)(t.callback.customValue).forEach(function(o){c["x:"+o]=t.callback.customValue[o]}),_.headers["x-oss-callback-var"]=P.from((0,g.default)(c)).toString("base64")}}}}).call(this,W("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/assign"),v=C(P);function C(d){return d&&d.__esModule?d:{default:d}}var N=W("humanize-ms"),g=W("url"),m=W("../utils/checkBucketName"),S=m.checkBucketName;function _(d,i){var c=g.parse(d);if(c.protocol||(c=g.parse("http"+(i?"s":"")+"://"+d)),c.protocol!=="http:"&&c.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return c}function t(d,i,c){var o=c?"https://":"http://",n=i?"-internal.aliyuncs.com":".aliyuncs.com",s="vpc100-oss-cn-";return d.substr(0,s.length)===s&&(n=".aliyuncs.com"),g.parse(o+d+n)}q.exports=function(d){if(!d||!d.accessKeyId||!d.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");d.bucket&&S(d.bucket);var i=(0,v.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},d);if(i.accessKeyId=i.accessKeyId.trim(),i.accessKeySecret=i.accessKeySecret.trim(),i.timeout&&(i.timeout=N(i.timeout)),i.endpoint)i.endpoint=_(i.endpoint,i.secure);else if(i.region)i.endpoint=t(i.region,i.internal,i.secure);else throw new Error("require options.endpoint or options.region");return i.inited=!0,i}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(W,q,D){"use strict";var P=W("merge-descriptors"),v=D;P(v,W("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=C(P);function C(i){return i&&i.__esModule?i:{default:i}}var N=W("../utils/checkBucketName"),g=N.checkBucketName,m=W("querystring"),S=W("js-base64"),_=S.Base64.encode,t=D;t.processObjectSave=function(c,o,n,s){var h,f,l,a;return v.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:return d(c,"sourceObject"),d(o,"targetObject"),d(n,"process"),o=this._objectName(o),s&&g(s),h=this._objectRequestParams("POST",c,{subres:"x-oss-process"}),f=s?",b_"+_(s):"",o=_(o),l={"x-oss-process":n+"|sys/saveas,o_"+o+f},h.content=m.stringify(l),x.next=12,v.default.awrap(this.request(h));case 12:return a=x.sent,x.abrupt("return",{res:a.res,status:a.res.status});case 14:case"end":return x.stop()}},null,this)};function d(i,c){if(!i)throw new Error(c+" is required");if(typeof i!="string")throw new Error(c+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=C(P);function C(t){return t&&t.__esModule?t:{default:t}}var N=W("copy-to"),g=W("./callback"),m=W("./utils/deepCopy"),S=m.deepCopy,_=D;_.listUploads=function(d,i){var c,o,n,s;return v.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return i=i||{},c={},N(i).to(c),c.subres="uploads",o=this._objectRequestParams("GET","",c),o.query=d,o.xmlResponse=!0,o.successStatuses=[200],f.next=10,v.default.awrap(this.request(o));case 10:return n=f.sent,s=n.data.Upload||[],Array.isArray(s)||(s=[s]),s=s.map(function(l){return{name:l.Key,uploadId:l.UploadId,initiated:l.Initiated}}),f.abrupt("return",{res:n.res,uploads:s,bucket:n.data.Bucket,nextKeyMarker:n.data.NextKeyMarker,nextUploadIdMarker:n.data.NextUploadIdMarker,isTruncated:n.data.IsTruncated==="true"});case 15:case"end":return f.stop()}},null,this)},_.listParts=function(d,i,c,o){var n,s,h;return v.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return o=o||{},n={},N(o).to(n),n.subres={uploadId:i},s=this._objectRequestParams("GET",d,n),s.query=c,s.xmlResponse=!0,s.successStatuses=[200],l.next=10,v.default.awrap(this.request(s));case 10:return h=l.sent,l.abrupt("return",{res:h.res,uploadId:h.data.UploadId,bucket:h.data.Bucket,name:h.data.Key,partNumberMarker:h.data.PartNumberMarker,nextPartNumberMarker:h.data.NextPartNumberMarker,maxParts:h.data.MaxParts,isTruncated:h.data.IsTruncated,parts:h.data.Part||[]});case 12:case"end":return l.stop()}},null,this)},_.abortMultipartUpload=function(d,i,c){var o,n,s;return v.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return this._stop(),c=c||{},o={},N(c).to(o),o.subres={uploadId:i},n=this._objectRequestParams("DELETE",d,o),n.successStatuses=[204],f.next=9,v.default.awrap(this.request(n));case 9:return s=f.sent,f.abrupt("return",{res:s.res});case 11:case"end":return f.stop()}},null,this)},_.initMultipartUpload=function(d,i){var c,o,n;return v.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return i=i||{},c={},N(i).to(c),c.headers=c.headers||{},this._convertMetaToHeaders(i.meta,c.headers),c.subres="uploads",o=this._objectRequestParams("POST",d,c),o.mime=i.mime,o.xmlResponse=!0,o.successStatuses=[200],h.next=12,v.default.awrap(this.request(o));case 12:return n=h.sent,h.abrupt("return",{res:n.res,bucket:n.data.Bucket,name:n.data.Key,uploadId:n.data.UploadId});case 14:case"end":return h.stop()}},null,this)},_.uploadPart=function(d,i,c,o,n,s,h){var f;return v.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return f={stream:this._createStream(o,n,s),size:s-n},a.next=3,v.default.awrap(this._uploadPart(d,i,c,f,h));case 3:return a.abrupt("return",a.sent);case 4:case"end":return a.stop()}},null,this)},_.completeMultipartUpload=function(d,i,c,o){var n,s,h,f,l,a,r,x;return v.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:for(n=c.concat().sort(function(R,O){return R.number-O.number}).filter(function(R,O,b){return!O||R.number!==b[O-1].number}),s=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,h=0;h<n.length;h++)f=n[h],s+=`<Part>
|
|
|
`,s+="<PartNumber>"+f.number+`</PartNumber>
|
|
|
`,s+="<ETag>"+f.etag+`</ETag>
|
|
|
`,s+=`</Part>
|
|
|
`;return s+="</CompleteMultipartUpload>",o=o||{},l={},l=S(o),l.headers&&delete l.headers["x-oss-server-side-encryption"],l.subres={uploadId:i},a=this._objectRequestParams("POST",d,l),g.encodeCallback(a,l),a.mime="xml",a.content=s,a.headers&&a.headers["x-oss-callback"]||(a.xmlResponse=!0),a.successStatuses=[200],p.next=17,v.default.awrap(this.request(a));case 17:return r=p.sent,x={res:r.res,bucket:a.bucket,name:d,etag:r.res.headers.etag},a.headers&&a.headers["x-oss-callback"]&&(x.data=JSON.parse(r.data.toString())),p.abrupt("return",x);case 21:case"end":return p.stop()}},null,this)},_._uploadPart=function(d,i,c,o,n){var s,h,f;return v.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return n=n||{},s={},N(n).to(s),s.headers={"Content-Length":o.size},s.subres={partNumber:c,uploadId:i},h=this._objectRequestParams("PUT",d,s),h.mime=s.mime,h.stream=o.stream,h.successStatuses=[200],a.next=11,v.default.awrap(this.request(h));case 11:if(f=a.sent,f.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 o.stream=null,h.stream=null,a.abrupt("return",{name:d,etag:f.res.headers.etag,res:f.res});case 17:case"end":return a.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=S(P),C=W("babel-runtime/core-js/object/keys"),N=S(C),g=W("babel-runtime/helpers/typeof"),m=S(g);function S(i){return i&&i.__esModule?i:{default:i}}var _=W("../utils/checkBucketName"),t=_.checkBucketName,d=D;d.copy=function(c,o,n,s){var h,f,l;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return(typeof n=="undefined"?"undefined":(0,m.default)(n))==="object"&&(s=n),s=s||{},s.headers=s.headers||{},(0,N.default)(s.headers).forEach(function(x){s.headers["x-oss-copy-source-"+x.toLowerCase()]=s.headers[x]}),s.meta&&(s.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(s.meta,s.headers),o=this._getSourceName(o,n),s.versionId&&(o=o+"?versionId="+s.versionId),s.headers["x-oss-copy-source"]=o,h=this._objectRequestParams("PUT",c,s),h.xmlResponse=!0,h.successStatuses=[200,304],r.next=14,v.default.awrap(this.request(h));case 14:return f=r.sent,l=f.data,l&&(l={etag:l.ETag,lastModified:l.LastModified}),r.abrupt("return",{data:l,res:f.res});case 18:case"end":return r.stop()}},null,this)},d._getSourceName=function(c,o){return typeof o=="string"?c=this._objectName(c):c[0]!=="/"?o=this.options.bucket:(o=c.replace(/\/(.+?)(\/.*)/,"$1"),c=c.replace(/(\/.+?\/)(.*)/,"$2")),t(o),c=encodeURI(c),c="/"+o+"/"+c,c}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=g(P),C=W("babel-runtime/core-js/object/assign"),N=g(C);function g(S){return S&&S.__esModule?S:{default:S}}var m=D;m.delete=function(_){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,i;return v.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return t.subres=(0,N.default)({},t.subres),t.versionId&&(t.subres.versionId=t.versionId),d=this._objectRequestParams("DELETE",_,t),d.successStatuses=[204],o.next=6,v.default.awrap(this.request(d));case 6:return i=o.sent,o.abrupt("return",{res:i.res});case 8:case"end":return o.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=g(P),C=W("babel-runtime/core-js/object/assign"),N=g(C);function g(d){return d&&d.__esModule?d:{default:d}}var m=W("utility"),S=W("../utils/obj2xml"),_=S.obj2xml,t=D;t.deleteMulti=function(i){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,n,s,h,f,l,a,r,x,y,p,R;return v.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:if(o=[],!(!i||!i.length)){b.next=3;break}throw new Error("names is required");case 3:for(n=0;n<i.length;n++)s={},typeof i[n]=="string"?s.Key=m.escape(this._objectName(i[n])):(h=i[n],f=h.key,l=h.versionId,s.Key=m.escape(this._objectName(f)),s.VersionId=l),o.push(s);return a={Delete:{Quiet:!!c.quiet,Object:o}},r=_(a,{headers:!0}),c.subres=(0,N.default)({delete:""},c.subres),c.versionId&&(c.subres.versionId=c.versionId),x=this._objectRequestParams("POST","",c),x.mime="xml",x.content=r,x.xmlResponse=!0,x.successStatuses=[200],b.next=15,v.default.awrap(this.request(x));case 15:return y=b.sent,p=y.data,R=p&&p.Deleted||null,R&&(Array.isArray(R)||(R=[R])),b.abrupt("return",{res:y.res,deleted:R||[]});case 20:case"end":return b.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=g(P),C=W("babel-runtime/core-js/object/assign"),N=g(C);function g(S){return S&&S.__esModule?S:{default:S}}var m=D;m.deleteObjectTagging=function(_){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,i;return v.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return t.subres=(0,N.default)({tagging:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),_=this._objectName(_),d=this._objectRequestParams("DELETE",_,t),d.successStatuses=[204],o.next=7,v.default.awrap(this.request(d));case 7:return i=o.sent,o.abrupt("return",{status:i.status,res:i.res});case 9:case"end":return o.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=g(P),C=W("babel-runtime/core-js/object/assign"),N=g(C);function g(t){return t&&t.__esModule?t:{default:t}}var m=W("fs"),S=W("is-type-of"),_=D;_.get=function(d,i){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,n,s,h;return v.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return o=null,n=!1,S.writableStream(i)?o=i:S.string(i)?(o=m.createWriteStream(i),n=!0):c=i,c=c||{},c.subres=(0,N.default)({},c.subres),c.versionId&&(c.subres.versionId=c.versionId),c.process&&(c.subres["x-oss-process"]=c.process),s=void 0,l.prev=8,h=this._objectRequestParams("GET",d,c),h.writeStream=o,h.successStatuses=[200,206,304],l.next=14,v.default.awrap(this.request(h));case 14:s=l.sent,n&&o.destroy(),l.next=25;break;case 18:if(l.prev=18,l.t0=l.catch(8),!n){l.next=24;break}return o.destroy(),l.next=24,v.default.awrap(this._deleteFileSafe(i));case 24:throw l.t0;case 25:return l.abrupt("return",{res:s.res,content:s.data});case 26:case"end":return l.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=g(P),C=W("babel-runtime/core-js/object/assign"),N=g(C);function g(S){return S&&S.__esModule?S:{default:S}}var m=D;m.getACL=function(_){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,i;return v.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return t.subres=(0,N.default)({acl:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),_=this._objectName(_),d=this._objectRequestParams("GET",_,t),d.successStatuses=[200],d.xmlResponse=!0,o.next=8,v.default.awrap(this.request(d));case 8:return i=o.sent,o.abrupt("return",{acl:i.data.AccessControlList.Grant,owner:{id:i.data.Owner.ID,displayName:i.data.Owner.DisplayName},res:i.res});case 10:case"end":return o.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/keys"),v=S(P),C=W("babel-runtime/regenerator"),N=S(C),g=W("babel-runtime/core-js/object/assign"),m=S(g);function S(h){return h&&h.__esModule?h:{default:h}}var _=D,t=W("../utils/isObject"),d=t.isObject,i=W("../utils/isArray"),c=i.isArray;_.getBucketVersions=o,_.listObjectVersions=o;function o(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,a,r,x,y,p;return N.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!(h.versionIdMarker&&h.keyMarker===void 0)){O.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return f.subres=(0,m.default)({versions:""},f.subres),f.versionId&&(f.subres.versionId=f.versionId),l=this._objectRequestParams("GET","",f),l.xmlResponse=!0,l.successStatuses=[200],l.query=s(h),O.next=10,N.default.awrap(this.request(l));case 10:return a=O.sent,r=a.data.Version||[],x=a.data.DeleteMarker||[],y=this,r&&(Array.isArray(r)||(r=[r]),r=r.map(function(b){return{name:b.Key,url:y._objectUrl(b.Key),lastModified:b.LastModified,isLatest:b.IsLatest==="true",versionId:b.VersionId,etag:b.ETag,type:b.Type,size:Number(b.Size),storageClass:b.StorageClass,owner:{id:b.Owner.ID,displayName:b.Owner.DisplayName}}})),x&&(c(x)||(x=[x]),x=x.map(function(b){return{name:b.Key,lastModified:b.LastModified,versionId:b.VersionId,owner:{id:b.Owner.ID,displayName:b.Owner.DisplayName}}})),p=a.data.CommonPrefixes||null,p&&(c(p)||(p=[p]),p=p.map(function(b){return b.Prefix})),O.abrupt("return",{res:a.res,objects:r,deleteMarker:x,prefixes:p,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 n(h){return h.replace(/([A-Z])/g,"-$1").toLowerCase()}function s(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f={};return d(h)&&(0,v.default)(h).forEach(function(l){f[n(l)]=h[l]}),f}},{"../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(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=g(P),C=W("babel-runtime/core-js/object/assign"),N=g(C);function g(S){return S&&S.__esModule?S:{default:S}}var m=D;m.getObjectMeta=function(_,t){var d,i;return v.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return t=t||{},_=this._objectName(_),t.subres=(0,N.default)({objectMeta:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),d=this._objectRequestParams("HEAD",_,t),d.successStatuses=[200],o.next=8,v.default.awrap(this.request(d));case 8:return i=o.sent,o.abrupt("return",{status:i.status,res:i.res});case 10:case"end":return o.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=g(P),C=W("babel-runtime/core-js/object/assign"),N=g(C);function g(t){return t&&t.__esModule?t:{default:t}}var m=D,S=W("../utils/isObject"),_=S.isObject;m.getObjectTagging=function(d){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,o,n,s,h;return v.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return i.subres=(0,N.default)({tagging:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),d=this._objectName(d),c=this._objectRequestParams("GET",d,i),c.successStatuses=[200],l.next=7,v.default.awrap(this.request(c));case 7:return o=l.sent,l.next=10,v.default.awrap(this.parseXML(o.data));case 10:return n=l.sent,s=n.TagSet.Tag,s=s&&_(s)?[s]:s||[],h={},s.forEach(function(a){h[a.Key]=a.Value}),l.abrupt("return",{status:o.status,res:o.res,tag:h});case 16:case"end":return l.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=g(P),C=W("babel-runtime/core-js/object/assign"),N=g(C);function g(S){return S&&S.__esModule?S:{default:S}}var m=D;m.getSymlink=function(_){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,i,c;return v.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return t.subres=(0,N.default)({symlink:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),_=this._objectName(_),d=this._objectRequestParams("GET",_,t),d.successStatuses=[200],n.next=7,v.default.awrap(this.request(d));case 7:return i=n.sent,c=i.res.headers["x-oss-symlink-target"],n.abrupt("return",{targetName:decodeURIComponent(c),res:i.res});case 10:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=S(P),C=W("babel-runtime/core-js/object/keys"),N=S(C),g=W("babel-runtime/core-js/object/assign"),m=S(g);function S(t){return t&&t.__esModule?t:{default:t}}var _=D;_.head=function(d){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,o,n;return v.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return i.subres=(0,m.default)({},i.subres),i.versionId&&(i.subres.versionId=i.versionId),c=this._objectRequestParams("HEAD",d,i),c.successStatuses=[200,304],h.next=6,v.default.awrap(this.request(c));case 6:return o=h.sent,n={meta:null,res:o.res,status:o.status},o.status===200&&(0,N.default)(o.headers).forEach(function(f){f.indexOf("x-oss-meta-")===0&&(n.meta||(n.meta={}),n.meta[f.substring(11)]=o.headers[f])}),h.abrupt("return",n);case 10:case"end":return h.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=g(P),C=W("babel-runtime/core-js/object/assign"),N=g(C);function g(S){return S&&S.__esModule?S:{default:S}}var m=D;m.putACL=function(_,t,d){var i,c;return v.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return d=d||{},d.subres=(0,N.default)({acl:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),d.headers=d.headers||{},d.headers["x-oss-object-acl"]=t,_=this._objectName(_),i=this._objectRequestParams("PUT",_,d),i.successStatuses=[200],n.next=10,v.default.awrap(this.request(i));case 10:return c=n.sent,n.abrupt("return",{res:c.res});case 12:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=S(P),C=W("babel-runtime/core-js/object/keys"),N=S(C),g=W("babel-runtime/core-js/object/assign"),m=S(g);function S(o){return o&&o.__esModule?o:{default:o}}var _=W("../utils/obj2xml"),t=_.obj2xml,d=W("../utils/checkObjectTag"),i=d.checkObjectTag,c=D;c.putObjectTagging=function(n,s){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f,l,a;return v.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:return i(s),h.subres=(0,m.default)({tagging:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),n=this._objectName(n),f=this._objectRequestParams("PUT",n,h),f.successStatuses=[200],s=(0,N.default)(s).map(function(y){return{Key:y,Value:s[y]}}),l={Tagging:{TagSet:{Tag:s}}},f.mime="xml",f.content=t(l),x.next=12,v.default.awrap(this.request(f));case 12:return a=x.sent,x.abrupt("return",{res:a.res,status:a.status});case 14:case"end":return x.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(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=g(P),C=W("babel-runtime/core-js/object/assign"),N=g(C);function g(S){return S&&S.__esModule?S:{default:S}}var m=D;m.putSymlink=function(_,t,d){var i,c;return v.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return d=d||{},d.headers=d.headers||{},t=this._escape(this._objectName(t)),this._convertMetaToHeaders(d.meta,d.headers),d.headers["x-oss-symlink-target"]=t,d.subres=(0,N.default)({symlink:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),d.storageClass&&(d.headers["x-oss-storage-class"]=d.storageClass),_=this._objectName(_),i=this._objectRequestParams("PUT",_,d),i.successStatuses=[200],n.next=13,v.default.awrap(this.request(i));case 13:return c=n.sent,n.abrupt("return",{res:c.res});case 15:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(W,q,D){"use strict";var P=W("babel-runtime/regenerator"),v=g(P),C=W("babel-runtime/core-js/promise"),N=g(C);function g(S){return S&&S.__esModule?S:{default:S}}var m=D;m._parallelNode=function(_,t,d,i){var c,o,n,s,h,f,l,a;return v.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:c=this,o=[],n=[],s=_.length/t,h=_.length%t,f=h===0?s:(_.length-h)/t+1,l=1,a=0;case 8:if(!(a<_.length)){x.next=26;break}if(!c.isCancel()){x.next=11;break}return x.abrupt("break",26);case 11:if(i?n.push(d(c,_[a],i)):n.push(d(c,_[a])),!(n.length===t||l===f&&a===_.length-1)){x.next=23;break}return x.prev=13,l+=1,x.next=17,v.default.awrap(N.default.all(n));case 17:x.next=22;break;case 19:x.prev=19,x.t0=x.catch(13),o.push(x.t0);case 22:n=[];case 23:a++,x.next=8;break;case 26:return x.abrupt("return",o);case 27:case"end":return x.stop()}},null,this,[[13,19]])},m._parallel=function(_,t,d){var i=this;return new N.default(function(c){var o=[];if(t<=0||!_){c(o);return}function n(p){return function(){if(p===null)throw new Error("Callback was already called.");var R=p;p=null;for(var O=arguments.length,b=Array(O),E=0;E<O;E++)b[E]=arguments[E];R.apply(this,b)}}function s(p){var R=-1,O=p.length;return function(){return++R<O&&!i.isCancel()?{value:p[R],key:R}:null}}var h=s(_),f=!1,l=0,a=!1;function r(p,R){l-=1,p?(f=!0,o.push(p),c(o)):R==={}||f&&l<=0?(f=!0,c(o)):a||(i.isCancel()?c(o):y())}function x(p,R){d(p).then(function(O){R(null,O)}).catch(function(O){R(O)})}function y(){for(a=!0;l<t&&!f&&!i.isCancel();){var p=h();if(p===null||o.length>0){f=!0,l<=0&&c(o);return}l+=1,x(p.value,n(r))}a=!1}y()})},m.cancel=function(_){this.options.cancelFlag=!0,_&&this.abortMultipartUpload(_.name,_.uploadId,_.options)},m.isCancel=function(){return this.options.cancelFlag},m.resetCancelFlag=function(){this.options.cancelFlag=!1},m._stop=function(){this.options.cancelFlag=!0},m._makeCancelEvent=function(){var _={status:0,name:"cancel"};return _}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(W,q,D){(function(P){"use strict";var v=W("babel-runtime/core-js/json/stringify"),C=m(v),N=W("babel-runtime/core-js/object/keys"),g=m(N);function m(t){return t&&t.__esModule?t:{default:t}}var S=W("./../../shims/crypto/crypto.js"),_=W("is-type-of");D.buildCanonicalizedResource=function(d,i){var c=""+d,o="?";if(_.string(i)&&i.trim()!=="")c+=o+i;else if(_.array(i))i.sort(),c+=o+i.join("&");else if(i){var n=function(f,l){return f[0]>l[0]?1:f[0]<l[0]?-1:0},s=function(f){c+=o+f,i[f]&&(c+="="+i[f]),o="&"};(0,g.default)(i).sort(n).forEach(s)}return c},D.buildCanonicalString=function(d,i,c,o){c=c||{};var n=c.headers||{},s="x-oss-",h=[],f={},l=[d.toUpperCase(),n["Content-Md5"]||"",n["Content-Type"]||n["Content-Type".toLowerCase()],o||n["x-oss-date"]];return(0,g.default)(n).forEach(function(a){var r=a.toLowerCase();r.indexOf(s)===0&&(f[r]=String(n[a]).trim())}),(0,g.default)(f).sort().forEach(function(a){h.push(a+":"+f[a])}),l=l.concat(h),l.push(this.buildCanonicalizedResource(i,c.parameters)),l.join(`
|
|
|
`)},D.computeSignature=function(d,i){var c=S.createHmac("sha1",d);return c.update(P.from(i,"utf8")).digest("base64")},D.authorization=function(d,i,c){return"OSS "+d+":"+this.computeSignature(i,c)},D._signatureForURL=function(d){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments[2],o=arguments[3],n={},s=i.subResource,h=s===void 0?{}:s;if(i.process){var f="x-oss-process";h[f]=i.process}if(i.trafficLimit){var l="x-oss-traffic-limit";h[l]=i.trafficLimit}if(i.response&&(0,g.default)(i.response).forEach(function(y){var p="response-"+y.toLowerCase();h[p]=i.response[y]}),(0,g.default)(i).forEach(function(y){var p=y.toLowerCase(),R=i[y];p.indexOf("x-oss-")===0?n[p]=R:(p.indexOf("content-md5")===0||p.indexOf("content-type")===0)&&(n[y]=R)}),Object.prototype.hasOwnProperty.call(i,"security-token")&&(h["security-token"]=i["security-token"]),Object.prototype.hasOwnProperty.call(i,"callback")){var a={callbackUrl:encodeURI(i.callback.url),callbackBody:i.callback.body};if(i.callback.host&&(a.callbackHost=i.callback.host),i.callback.contentType&&(a.callbackBodyType=i.callback.contentType),h.callback=P.from((0,C.default)(a)).toString("base64"),i.callback.customValue){var r={};(0,g.default)(i.callback.customValue).forEach(function(y){r["x:"+y]=i.callback.customValue[y]}),h["callback-var"]=P.from((0,C.default)(r)).toString("base64")}}var x=this.buildCanonicalString(i.method,c,{headers:n,parameters:h},o.toString());return{Signature:this.computeSignature(d,x),subResource:h}}}).call(this,W("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(W,q,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.checkBucketName=void 0,D.checkBucketName=function(P,v){var C=v?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!C.test(P))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/entries"),v=C(P);function C(i){return i&&i.__esModule?i:{default:i}}Object.defineProperty(D,"__esModule",{value:!0}),D.checkObjectTag=void 0;var N=W("./checkValid"),g=N.checkValid,m=W("./isObject"),S=m.isObject,_=[{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 (/)"}],t={key:[].concat(_,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(_,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function d(i){if(!S(i))throw new Error("tag must be Object");var c=(0,v.default)(i);if(c.length>10)throw new Error("maximum of 10 tags for a object");var o=["key","value"];c.forEach(function(n){n.forEach(function(s,h){g(s,t[o[h]])})})}D.checkObjectTag=d},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(W,q,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.checkValid=void 0;function P(v,C){C.forEach(function(N){if(N.validator)N.validator(v);else if(N.pattern&&!N.pattern.test(v))throw new Error(N.msg)})}D.checkValid=P},{}],38:[function(W,q,D){(function(P){"use strict";var v=W("babel-runtime/core-js/object/assign"),C=N(v);function N(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(D,"__esModule",{value:!0}),D.createRequest=void 0;var g=W("./../../../shims/crypto/crypto.js"),m=W("debug")("ali-oss"),S=W("mime"),_=W("dateformat"),t=W("copy-to"),d=W("path");function i(n,s){return n[s]||n[s.toLowerCase()]}function c(n,s){delete n[s],delete n[s.toLowerCase()]}function o(n){var s=new Date;this.options.amendTimeSkewed&&(s=+new Date+this.options.amendTimeSkewed);var h={"x-oss-date":_(s,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(h["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,C.default)(h,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(h["x-oss-security-token"]=this.options.stsToken),t(n.headers).to(h),i(h,"Content-Type")||(n.mime&&n.mime.indexOf("/")>0?h["Content-Type"]=n.mime:h["Content-Type"]=S.getType(n.mime||d.extname(n.object||""))),i(h,"Content-Type")||c(h,"Content-Type"),n.content&&(h["Content-Md5"]=g.createHash("md5").update(P.from(n.content,"utf8")).digest("base64"),h["Content-Length"]||(h["Content-Length"]=n.content.length));var f=this._getResource(n);h.authorization=this.authorization(n.method,f,n.subres,h);var l=this._getReqUrl(n);m("request %s %s, with headers %j, !!stream: %s",n.method,l,h,!!n.stream);var a=n.timeout||this.options.timeout,r={method:n.method,content:n.content,stream:n.stream,headers:h,timeout:a,writeStream:n.writeStream,customResponse:n.customResponse,ctx:n.ctx||this.ctx};return this.agent&&(r.agent=this.agent),this.httpsAgent&&(r.httpsAgent=this.httpsAgent),{url:l,params:r}}D.createRequest=o}).call(this,W("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(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/keys"),v=g(P),C=W("babel-runtime/helpers/typeof"),N=g(C);function g(m){return m&&m.__esModule?m:{default:m}}Object.defineProperty(D,"__esModule",{value:!0}),D.deepCopy=void 0,D.deepCopy=function(m){if(m===null||(typeof m=="undefined"?"undefined":(0,N.default)(m))!=="object")return m;var S=Array.isArray(m)?[]:{};return(0,v.default)(m).forEach(function(_){S[_]=D.deepCopy(m[_])}),S}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/keys"),v=g(P),C=W("babel-runtime/helpers/typeof"),N=g(C);function g(_){return _&&_.__esModule?_:{default:_}}Object.defineProperty(D,"__esModule",{value:!0}),D.formatObjKey=void 0;function m(_,t){if(_===null||(typeof _=="undefined"?"undefined":(0,N.default)(_))!=="object")return _;var d=void 0;if(Array.isArray(_)){d=[];for(var i=0;i<_.length;i++)d.push(m(_[i],t))}else d={},(0,v.default)(_).forEach(function(c){d[S(c,t)]=m(_[c],t)});return d}D.formatObjKey=m;function S(_,t){return t==="firstUpperCase"?_=_.replace(/^./,function(d){return d.toUpperCase()}):t==="firstLowerCase"&&(_=_.replace(/^./,function(d){return d.toLowerCase()})),_}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(W,q,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.getStrBytesCount=void 0;function P(v){for(var C=0,N=0;N<v.length;N++){var g=v.charAt(N);/^[\u00-\uff]$/.test(g)?C+=1:C+=2}return C}D.getStrBytesCount=P},{}],42:[function(W,q,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isArray=void 0,D.isArray=function(P){return Object.prototype.toString.call(P)==="[object Array]"}},{}],43:[function(W,q,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isBlob=void 0;function P(v){return typeof Blob!="undefined"&&v instanceof Blob}D.isBlob=P},{}],44:[function(W,q,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isFile=void 0,D.isFile=function(P){return typeof File!="undefined"&&P instanceof File}},{}],45:[function(W,q,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isIP=void 0,D.isIP=function(P){var v=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,C=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return v.test(P)||C.test(P)}},{}],46:[function(W,q,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isObject=void 0,D.isObject=function(P){return Object.prototype.toString.call(P)==="[object Object]"}},{}],47:[function(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/keys"),v=C(P);function C(S){return S&&S.__esModule?S:{default:S}}Object.defineProperty(D,"__esModule",{value:!0}),D.obj2xml=void 0;var N=W("./formatObjKey");function g(S){return Object.prototype.toString.call(S).replace(/(.*? |])/g,"").toLowerCase()}function m(S,_){var t="";return _&&_.headers&&(t=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
`),_&&_.firstUpperCase&&(S=N.formatObjKey(S,"firstUpperCase")),g(S)==="object"?(0,v.default)(S).forEach(function(d){g(S[d])==="string"||g(S[d])==="number"?t+="<"+d+">"+S[d]+"</"+d+">":g(S[d])==="object"?t+="<"+d+">"+m(S[d])+"</"+d+">":g(S[d])==="array"?t+=S[d].map(function(i){return"<"+d+">"+m(i)+"</"+d+">"}).join(""):t+="<"+d+">"+S[d].toString()+"</"+d+">"}):t+=S.toString(),t}D.obj2xml=m},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(W,q,D){q.exports=P,q.exports.HttpsAgent=P;function P(){}},{}],49:[function(W,q,D){q.exports=W("./register")().Promise},{"./register":51}],50:[function(W,q,D){"use strict";var P="@@any-promise/REGISTRATION",v=null;q.exports=function(C,N){return function(m,S){m=m||null,S=S||{};var _=S.global!==!1;if(v===null&&_&&(v=C[P]||null),v!==null&&m!==null&&v.implementation!==m)throw new Error('any-promise already defined as "'+v.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return v===null&&(m!==null&&typeof S.Promise!="undefined"?v={Promise:S.Promise,implementation:m}:v=N(m),_&&(C[P]=v)),v}}},{}],51:[function(W,q,D){"use strict";q.exports=W("./loader")(window,P);function P(){if(typeof window.Promise=="undefined")throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}},{"./loader":50}],52:[function(W,q,D){q.exports={default:W("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(W,q,D){q.exports={default:W("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(W,q,D){q.exports={default:W("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(W,q,D){q.exports={default:W("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(W,q,D){q.exports={default:W("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(W,q,D){q.exports={default:W("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(W,q,D){q.exports={default:W("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(W,q,D){q.exports={default:W("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(W,q,D){q.exports={default:W("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(W,q,D){q.exports={default:W("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(W,q,D){q.exports={default:W("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(W,q,D){q.exports={default:W("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(W,q,D){q.exports={default:W("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(W,q,D){q.exports={default:W("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(W,q,D){q.exports={default:W("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(W,q,D){"use strict";D.__esModule=!0;var P=W("../core-js/symbol/iterator"),v=m(P),C=W("../core-js/symbol"),N=m(C),g=typeof N.default=="function"&&typeof v.default=="symbol"?function(S){return typeof S}:function(S){return S&&typeof N.default=="function"&&S.constructor===N.default&&S!==N.default.prototype?"symbol":typeof S};function m(S){return S&&S.__esModule?S:{default:S}}D.default=typeof N.default=="function"&&g(v.default)==="symbol"?function(S){return typeof S=="undefined"?"undefined":g(S)}:function(S){return S&&typeof N.default=="function"&&S.constructor===N.default&&S!==N.default.prototype?"symbol":typeof S=="undefined"?"undefined":g(S)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(W,q,D){q.exports=W("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(W,q,D){"use strict";D.byteLength=_,D.toByteArray=d,D.fromByteArray=o;for(var P=[],v=[],C=typeof Uint8Array!="undefined"?Uint8Array:Array,N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0,m=N.length;g<m;++g)P[g]=N[g],v[N.charCodeAt(g)]=g;v["-".charCodeAt(0)]=62,v["_".charCodeAt(0)]=63;function S(n){var s=n.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=n.indexOf("=");h===-1&&(h=s);var f=h===s?0:4-h%4;return[h,f]}function _(n){var s=S(n),h=s[0],f=s[1];return(h+f)*3/4-f}function t(n,s,h){return(s+h)*3/4-h}function d(n){var s,h=S(n),f=h[0],l=h[1],a=new C(t(n,f,l)),r=0,x=l>0?f-4:f,y;for(y=0;y<x;y+=4)s=v[n.charCodeAt(y)]<<18|v[n.charCodeAt(y+1)]<<12|v[n.charCodeAt(y+2)]<<6|v[n.charCodeAt(y+3)],a[r++]=s>>16&255,a[r++]=s>>8&255,a[r++]=s&255;return l===2&&(s=v[n.charCodeAt(y)]<<2|v[n.charCodeAt(y+1)]>>4,a[r++]=s&255),l===1&&(s=v[n.charCodeAt(y)]<<10|v[n.charCodeAt(y+1)]<<4|v[n.charCodeAt(y+2)]>>2,a[r++]=s>>8&255,a[r++]=s&255),a}function i(n){return P[n>>18&63]+P[n>>12&63]+P[n>>6&63]+P[n&63]}function c(n,s,h){for(var f,l=[],a=s;a<h;a+=3)f=(n[a]<<16&16711680)+(n[a+1]<<8&65280)+(n[a+2]&255),l.push(i(f));return l.join("")}function o(n){for(var s,h=n.length,f=h%3,l=[],a=16383,r=0,x=h-f;r<x;r+=a)l.push(c(n,r,r+a>x?x:r+a));return f===1?(s=n[h-1],l.push(P[s>>2]+P[s<<4&63]+"==")):f===2&&(s=(n[h-2]<<8)+n[h-1],l.push(P[s>>10]+P[s>>4&63]+P[s<<2&63]+"=")),l.join("")}},{}],70:[function(W,q,D){/*!
|
|
|
* Bowser - a browser detector
|
|
|
* https://github.com/ded/bowser
|
|
|
* MIT License | (c) Dustin Diaz 2015
|
|
|
*/!function(P,v,C){typeof q!="undefined"&&q.exports?q.exports=C():typeof define=="function"&&define.amd?define(v,C):P[v]=C()}(this,"bowser",function(){var P=!0;function v(t){function d(H){var U=t.match(H);return U&&U.length>1&&U[1]||""}function i(H){var U=t.match(H);return U&&U.length>1&&U[2]||""}var c=d(/(ipod|iphone|ipad)/i).toLowerCase(),o=/like android/i.test(t),n=!o&&/android/i.test(t),s=/nexus\s*[0-6]\s*/i.test(t),h=!s&&/nexus\s*[0-9]+/i.test(t),f=/CrOS/.test(t),l=/silk/i.test(t),a=/sailfish/i.test(t),r=/tizen/i.test(t),x=/(web|hpw)(o|0)s/i.test(t),y=/windows phone/i.test(t),p=/SamsungBrowser/i.test(t),R=!y&&/windows/i.test(t),O=!c&&!l&&/macintosh/i.test(t),b=!n&&!a&&!r&&!x&&/linux/i.test(t),E=i(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),w=d(/version\/(\d+(\.\d+)?)/i),T=/tablet/i.test(t)&&!/tablet pc/i.test(t),F=!T&&/[^-]mobi/i.test(t),M=/xbox/i.test(t),L;/opera/i.test(t)?L={name:"Opera",opera:P,version:w||d(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(t)?L={name:"Opera",opera:P,version:d(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||w}:/SamsungBrowser/i.test(t)?L={name:"Samsung Internet for Android",samsungBrowser:P,version:w||d(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(t)?L={name:"NAVER Whale browser",whale:P,version:d(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(t)?L={name:"MZ Browser",mzbrowser:P,version:d(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(t)?L={name:"Opera Coast",coast:P,version:w||d(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(t)?L={name:"Focus",focus:P,version:d(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(t)?L={name:"Yandex Browser",yandexbrowser:P,version:w||d(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(t)?L={name:"UC Browser",ucbrowser:P,version:d(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(t)?L={name:"Maxthon",maxthon:P,version:d(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(t)?L={name:"Epiphany",epiphany:P,version:d(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(t)?L={name:"Puffin",puffin:P,version:d(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(t)?L={name:"Sleipnir",sleipnir:P,version:d(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(t)?L={name:"K-Meleon",kMeleon:P,version:d(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:y?(L={name:"Windows Phone",osname:"Windows Phone",windowsphone:P},E?(L.msedge=P,L.version=E):(L.msie=P,L.version=d(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?L={name:"Internet Explorer",msie:P,version:d(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:f?L={name:"Chrome",osname:"Chrome OS",chromeos:P,chromeBook:P,chrome:P,version:d(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(t)?L={name:"Microsoft Edge",msedge:P,version:E}:/vivaldi/i.test(t)?L={name:"Vivaldi",vivaldi:P,version:d(/vivaldi\/(\d+(\.\d+)?)/i)||w}:a?L={name:"Sailfish",osname:"Sailfish OS",sailfish:P,version:d(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?L={name:"SeaMonkey",seamonkey:P,version:d(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(t)?(L={name:"Firefox",firefox:P,version:d(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(L.firefoxos=P,L.osname="Firefox OS")):l?L={name:"Amazon Silk",silk:P,version:d(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(t)?L={name:"PhantomJS",phantom:P,version:d(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(t)?L={name:"SlimerJS",slimer:P,version:d(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(t)||/rim\stablet/i.test(t)?L={name:"BlackBerry",osname:"BlackBerry OS",blackberry:P,version:w||d(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:x?(L={name:"WebOS",osname:"WebOS",webos:P,version:w||d(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(t)&&(L.touchpad=P)):/bada/i.test(t)?L={name:"Bada",osname:"Bada",bada:P,version:d(/dolfin\/(\d+(\.\d+)?)/i)}:r?L={name:"Tizen",osname:"Tizen",tizen:P,version:d(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||w}:/qupzilla/i.test(t)?L={name:"QupZilla",qupzilla:P,version:d(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||w}:/chromium/i.test(t)?L={name:"Chromium",chromium:P,version:d(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||w}:/chrome|crios|crmo/i.test(t)?L={name:"Chrome",chrome:P,version:d(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:n?L={name:"Android",version:w}:/safari|applewebkit/i.test(t)?(L={name:"Safari",safari:P},w&&(L.version=w)):c?(L={name:c=="iphone"?"iPhone":c=="ipad"?"iPad":"iPod"},w&&(L.version=w)):/googlebot/i.test(t)?L={name:"Googlebot",googlebot:P,version:d(/googlebot\/(\d+(\.\d+))/i)||w}:L={name:d(/^(.*)\/(.*) /),version:i(/^(.*)\/(.*) /)},!L.msedge&&/(apple)?webkit/i.test(t)?(/(apple)?webkit\/537\.36/i.test(t)?(L.name=L.name||"Blink",L.blink=P):(L.name=L.name||"Webkit",L.webkit=P),!L.version&&w&&(L.version=w)):!L.opera&&/gecko\//i.test(t)&&(L.name=L.name||"Gecko",L.gecko=P,L.version=L.version||d(/gecko\/(\d+(\.\d+)?)/i)),!L.windowsphone&&(n||L.silk)?(L.android=P,L.osname="Android"):!L.windowsphone&&c?(L[c]=P,L.ios=P,L.osname="iOS"):O?(L.mac=P,L.osname="macOS"):M?(L.xbox=P,L.osname="Xbox"):R?(L.windows=P,L.osname="Windows"):b&&(L.linux=P,L.osname="Linux");function Y(H){switch(H){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var K="";L.windows?K=Y(d(/Windows ((NT|XP)( \d\d?.\d)?)/i)):L.windowsphone?K=d(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):L.mac?(K=d(/Mac OS X (\d+([_\.\s]\d+)*)/i),K=K.replace(/[_\s]/g,".")):c?(K=d(/os (\d+([_\s]\d+)*) like mac os x/i),K=K.replace(/[_\s]/g,".")):n?K=d(/android[ \/-](\d+(\.\d+)*)/i):L.webos?K=d(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):L.blackberry?K=d(/rim\stablet\sos\s(\d+(\.\d+)*)/i):L.bada?K=d(/bada\/(\d+(\.\d+)*)/i):L.tizen&&(K=d(/tizen[\/\s](\d+(\.\d+)*)/i)),K&&(L.osversion=K);var A=!L.windows&&K.split(".")[0];return T||h||c=="ipad"||n&&(A==3||A>=4&&!F)||L.silk?L.tablet=P:(F||c=="iphone"||c=="ipod"||n||s||L.blackberry||L.webos||L.bada)&&(L.mobile=P),L.msedge||L.msie&&L.version>=10||L.yandexbrowser&&L.version>=15||L.vivaldi&&L.version>=1||L.chrome&&L.version>=20||L.samsungBrowser&&L.version>=4||L.whale&&m([L.version,"1.0"])===1||L.mzbrowser&&m([L.version,"6.0"])===1||L.focus&&m([L.version,"1.0"])===1||L.firefox&&L.version>=20||L.safari&&L.version>=6||L.opera&&L.version>=10||L.ios&&L.osversion&&L.osversion.split(".")[0]>=6||L.blackberry&&L.version>=10.1||L.chromium&&L.version>=20?L.a=P:L.msie&&L.version<10||L.chrome&&L.version<20||L.firefox&&L.version<20||L.safari&&L.version<6||L.opera&&L.version<10||L.ios&&L.osversion&&L.osversion.split(".")[0]<6||L.chromium&&L.version<20?L.c=P:L.x=P,L}var C=v(typeof navigator!="undefined"&&navigator.userAgent||"");C.test=function(t){for(var d=0;d<t.length;++d){var i=t[d];if(typeof i=="string"&&i in C)return!0}return!1};function N(t){return t.split(".").length}function g(t,d){var i=[],c;if(Array.prototype.map)return Array.prototype.map.call(t,d);for(c=0;c<t.length;c++)i.push(d(t[c]));return i}function m(t){for(var d=Math.max(N(t[0]),N(t[1])),i=g(t,function(c){var o=d-N(c);return c=c+new Array(o+1).join(".0"),g(c.split("."),function(n){return new Array(20-n.length).join("0")+n}).reverse()});--d>=0;){if(i[0][d]>i[1][d])return 1;if(i[0][d]===i[1][d]){if(d===0)return 0}else return-1}}function S(t,d,i){var c=C;typeof d=="string"&&(i=d,d=void 0),d===void 0&&(d=!1),i&&(c=v(i));var o=""+c.version;for(var n in t)if(t.hasOwnProperty(n)&&c[n]){if(typeof t[n]!="string")throw new Error("Browser version in the minVersion map should be a string: "+n+": "+String(t));return m([o,t[n]])<0}return d}function _(t,d,i){return!S(t,d,i)}return C.isUnsupportedBrowser=S,C.compareVersions=m,C.check=_,C._detect=v,C.detect=v,C})},{}],71:[function(W,q,D){},{}],72:[function(W,q,D){var P=W("buffer").Buffer,v=P.isEncoding||function(_){switch(_&&_.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function C(_){if(_&&!v(_))throw new Error("Unknown encoding: "+_)}var N=D.StringDecoder=function(_){this.encoding=(_||"utf8").toLowerCase().replace(/[-_]/,""),C(_);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=m;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=S;break;default:this.write=g;return}this.charBuffer=new P(6),this.charReceived=0,this.charLength=0};N.prototype.write=function(_){for(var t="";this.charLength;){var d=_.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:_.length;if(_.copy(this.charBuffer,this.charReceived,0,d),this.charReceived+=d,this.charReceived<this.charLength)return"";_=_.slice(d,_.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var c=t.charCodeAt(t.length-1);if(c>=55296&&c<=56319){this.charLength+=this.surrogateSize,t="";continue}if(this.charReceived=this.charLength=0,_.length===0)return t;break}this.detectIncompleteChar(_);var i=_.length;this.charLength&&(_.copy(this.charBuffer,0,_.length-this.charReceived,i),i-=this.charReceived),t+=_.toString(this.encoding,0,i);var i=t.length-1,c=t.charCodeAt(i);if(c>=55296&&c<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),_.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},N.prototype.detectIncompleteChar=function(_){for(var t=_.length>=3?3:_.length;t>0;t--){var d=_[_.length-t];if(t==1&&d>>5==6){this.charLength=2;break}if(t<=2&&d>>4==14){this.charLength=3;break}if(t<=3&&d>>3==30){this.charLength=4;break}}this.charReceived=t},N.prototype.end=function(_){var t="";if(_&&_.length&&(t=this.write(_)),this.charReceived){var d=this.charReceived,i=this.charBuffer,c=this.encoding;t+=i.slice(0,d).toString(c)}return t};function g(_){return _.toString(this.encoding)}function m(_){this.charReceived=_.length%2,this.charLength=this.charReceived?2:0}function S(_){this.charReceived=_.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(W,q,D){(function(P,v){/*!
|
|
|
* The buffer module from node.js, for the browser.
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
|
* @license MIT
|
|
|
*/"use strict";var C=W("base64-js"),N=W("ieee754"),g=W("isarray");D.Buffer=v,D.SlowBuffer=l,D.INSPECT_MAX_BYTES=50,v.TYPED_ARRAY_SUPPORT=P.TYPED_ARRAY_SUPPORT!==void 0?P.TYPED_ARRAY_SUPPORT:m(),D.kMaxLength=S();function m(){try{var ie=new Uint8Array(1);return ie.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ie.foo()===42&&typeof ie.subarray=="function"&&ie.subarray(1,1).byteLength===0}catch(re){return!1}}function S(){return v.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function _(ie,re){if(S()<re)throw new RangeError("Invalid typed array length");return v.TYPED_ARRAY_SUPPORT?(ie=new Uint8Array(re),ie.__proto__=v.prototype):(ie===null&&(ie=new v(re)),ie.length=re),ie}function v(ie,re,$){if(!v.TYPED_ARRAY_SUPPORT&&!(this instanceof v))return new v(ie,re,$);if(typeof ie=="number"){if(typeof re=="string")throw new Error("If encoding is specified then the first argument must be a string");return c(this,ie)}return t(this,ie,re,$)}v.poolSize=8192,v._augment=function(ie){return ie.__proto__=v.prototype,ie};function t(ie,re,$,J){if(typeof re=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&re instanceof ArrayBuffer?s(ie,re,$,J):typeof re=="string"?o(ie,re,$):h(ie,re)}v.from=function(ie,re,$){return t(null,ie,re,$)},v.TYPED_ARRAY_SUPPORT&&(v.prototype.__proto__=Uint8Array.prototype,v.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&v[Symbol.species]===v&&Object.defineProperty(v,Symbol.species,{value:null,configurable:!0}));function d(ie){if(typeof ie!="number")throw new TypeError('"size" argument must be a number');if(ie<0)throw new RangeError('"size" argument must not be negative')}function i(ie,re,$,J){return d(re),re<=0?_(ie,re):$!==void 0?typeof J=="string"?_(ie,re).fill($,J):_(ie,re).fill($):_(ie,re)}v.alloc=function(ie,re,$){return i(null,ie,re,$)};function c(ie,re){if(d(re),ie=_(ie,re<0?0:f(re)|0),!v.TYPED_ARRAY_SUPPORT)for(var $=0;$<re;++$)ie[$]=0;return ie}v.allocUnsafe=function(ie){return c(null,ie)},v.allocUnsafeSlow=function(ie){return c(null,ie)};function o(ie,re,$){if((typeof $!="string"||$==="")&&($="utf8"),!v.isEncoding($))throw new TypeError('"encoding" must be a valid string encoding');var J=a(re,$)|0;ie=_(ie,J);var le=ie.write(re,$);return le!==J&&(ie=ie.slice(0,le)),ie}function n(ie,re){var $=re.length<0?0:f(re.length)|0;ie=_(ie,$);for(var J=0;J<$;J+=1)ie[J]=re[J]&255;return ie}function s(ie,re,$,J){if(re.byteLength,$<0||re.byteLength<$)throw new RangeError("'offset' is out of bounds");if(re.byteLength<$+(J||0))throw new RangeError("'length' is out of bounds");return $===void 0&&J===void 0?re=new Uint8Array(re):J===void 0?re=new Uint8Array(re,$):re=new Uint8Array(re,$,J),v.TYPED_ARRAY_SUPPORT?(ie=re,ie.__proto__=v.prototype):ie=n(ie,re),ie}function h(ie,re){if(v.isBuffer(re)){var $=f(re.length)|0;return ie=_(ie,$),ie.length===0||re.copy(ie,0,0,$),ie}if(re){if(typeof ArrayBuffer!="undefined"&&re.buffer instanceof ArrayBuffer||"length"in re)return typeof re.length!="number"||Z(re.length)?_(ie,0):n(ie,re);if(re.type==="Buffer"&&g(re.data))return n(ie,re.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function f(ie){if(ie>=S())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S().toString(16)+" bytes");return ie|0}function l(ie){return+ie!=ie&&(ie=0),v.alloc(+ie)}v.isBuffer=function(re){return!!(re!=null&&re._isBuffer)},v.compare=function(re,$){if(!v.isBuffer(re)||!v.isBuffer($))throw new TypeError("Arguments must be Buffers");if(re===$)return 0;for(var J=re.length,le=$.length,ue=0,xe=Math.min(J,le);ue<xe;++ue)if(re[ue]!==$[ue]){J=re[ue],le=$[ue];break}return J<le?-1:le<J?1:0},v.isEncoding=function(re){switch(String(re).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}},v.concat=function(re,$){if(!g(re))throw new TypeError('"list" argument must be an Array of Buffers');if(re.length===0)return v.alloc(0);var J;if($===void 0)for($=0,J=0;J<re.length;++J)$+=re[J].length;var le=v.allocUnsafe($),ue=0;for(J=0;J<re.length;++J){var xe=re[J];if(!v.isBuffer(xe))throw new TypeError('"list" argument must be an Array of Buffers');xe.copy(le,ue),ue+=xe.length}return le};function a(ie,re){if(v.isBuffer(ie))return ie.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ie)||ie instanceof ArrayBuffer))return ie.byteLength;typeof ie!="string"&&(ie=""+ie);var $=ie.length;if($===0)return 0;for(var J=!1;;)switch(re){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":case void 0:return ee(ie).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $*2;case"hex":return $>>>1;case"base64":return X(ie).length;default:if(J)return ee(ie).length;re=(""+re).toLowerCase(),J=!0}}v.byteLength=a;function r(ie,re,$){var J=!1;if((re===void 0||re<0)&&(re=0),re>this.length)return"";if(($===void 0||$>this.length)&&($=this.length),$<=0)return"";if($>>>=0,re>>>=0,$<=re)return"";for(ie||(ie="utf8");;)switch(ie){case"hex":return H(this,re,$);case"utf8":case"utf-8":return M(this,re,$);case"ascii":return K(this,re,$);case"latin1":case"binary":return A(this,re,$);case"base64":return F(this,re,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,re,$);default:if(J)throw new TypeError("Unknown encoding: "+ie);ie=(ie+"").toLowerCase(),J=!0}}v.prototype._isBuffer=!0;function x(ie,re,$){var J=ie[re];ie[re]=ie[$],ie[$]=J}v.prototype.swap16=function(){var re=this.length;if(re%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var $=0;$<re;$+=2)x(this,$,$+1);return this},v.prototype.swap32=function(){var re=this.length;if(re%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var $=0;$<re;$+=4)x(this,$,$+3),x(this,$+1,$+2);return this},v.prototype.swap64=function(){var re=this.length;if(re%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var $=0;$<re;$+=8)x(this,$,$+7),x(this,$+1,$+6),x(this,$+2,$+5),x(this,$+3,$+4);return this},v.prototype.toString=function(){var re=this.length|0;return re===0?"":arguments.length===0?M(this,0,re):r.apply(this,arguments)},v.prototype.equals=function(re){if(!v.isBuffer(re))throw new TypeError("Argument must be a Buffer");return this===re?!0:v.compare(this,re)===0},v.prototype.inspect=function(){var re="",$=D.INSPECT_MAX_BYTES;return this.length>0&&(re=this.toString("hex",0,$).match(/.{2}/g).join(" "),this.length>$&&(re+=" ... ")),"<Buffer "+re+">"},v.prototype.compare=function(re,$,J,le,ue){if(!v.isBuffer(re))throw new TypeError("Argument must be a Buffer");if($===void 0&&($=0),J===void 0&&(J=re?re.length:0),le===void 0&&(le=0),ue===void 0&&(ue=this.length),$<0||J>re.length||le<0||ue>this.length)throw new RangeError("out of range index");if(le>=ue&&$>=J)return 0;if(le>=ue)return-1;if($>=J)return 1;if($>>>=0,J>>>=0,le>>>=0,ue>>>=0,this===re)return 0;for(var xe=ue-le,Me=J-$,Xe=Math.min(xe,Me),$e=this.slice(le,ue),Je=re.slice($,J),rt=0;rt<Xe;++rt)if($e[rt]!==Je[rt]){xe=$e[rt],Me=Je[rt];break}return xe<Me?-1:Me<xe?1:0};function y(ie,re,$,J,le){if(ie.length===0)return-1;if(typeof $=="string"?(J=$,$=0):$>2147483647?$=2147483647:$<-2147483648&&($=-2147483648),$=+$,isNaN($)&&($=le?0:ie.length-1),$<0&&($=ie.length+$),$>=ie.length){if(le)return-1;$=ie.length-1}else if($<0)if(le)$=0;else return-1;if(typeof re=="string"&&(re=v.from(re,J)),v.isBuffer(re))return re.length===0?-1:p(ie,re,$,J,le);if(typeof re=="number")return re=re&255,v.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(ie,re,$):Uint8Array.prototype.lastIndexOf.call(ie,re,$):p(ie,[re],$,J,le);throw new TypeError("val must be string, number or Buffer")}function p(ie,re,$,J,le){var ue=1,xe=ie.length,Me=re.length;if(J!==void 0&&(J=String(J).toLowerCase(),J==="ucs2"||J==="ucs-2"||J==="utf16le"||J==="utf-16le")){if(ie.length<2||re.length<2)return-1;ue=2,xe/=2,Me/=2,$/=2}function Xe(je,Ie){return ue===1?je[Ie]:je.readUInt16BE(Ie*ue)}var $e;if(le){var Je=-1;for($e=$;$e<xe;$e++)if(Xe(ie,$e)===Xe(re,Je===-1?0:$e-Je)){if(Je===-1&&(Je=$e),$e-Je+1===Me)return Je*ue}else Je!==-1&&($e-=$e-Je),Je=-1}else for($+Me>xe&&($=xe-Me),$e=$;$e>=0;$e--){for(var rt=!0,it=0;it<Me;it++)if(Xe(ie,$e+it)!==Xe(re,it)){rt=!1;break}if(rt)return $e}return-1}v.prototype.includes=function(re,$,J){return this.indexOf(re,$,J)!==-1},v.prototype.indexOf=function(re,$,J){return y(this,re,$,J,!0)},v.prototype.lastIndexOf=function(re,$,J){return y(this,re,$,J,!1)};function R(ie,re,$,J){$=Number($)||0;var le=ie.length-$;J?(J=Number(J),J>le&&(J=le)):J=le;var ue=re.length;if(ue%2!==0)throw new TypeError("Invalid hex string");J>ue/2&&(J=ue/2);for(var xe=0;xe<J;++xe){var Me=parseInt(re.substr(xe*2,2),16);if(isNaN(Me))return xe;ie[$+xe]=Me}return xe}function O(ie,re,$,J){return Q(ee(re,ie.length-$),ie,$,J)}function b(ie,re,$,J){return Q(B(re),ie,$,J)}function E(ie,re,$,J){return b(ie,re,$,J)}function w(ie,re,$,J){return Q(X(re),ie,$,J)}function T(ie,re,$,J){return Q(V(re,ie.length-$),ie,$,J)}v.prototype.write=function(re,$,J,le){if($===void 0)le="utf8",J=this.length,$=0;else if(J===void 0&&typeof $=="string")le=$,J=this.length,$=0;else if(isFinite($))$=$|0,isFinite(J)?(J=J|0,le===void 0&&(le="utf8")):(le=J,J=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ue=this.length-$;if((J===void 0||J>ue)&&(J=ue),re.length>0&&(J<0||$<0)||$>this.length)throw new RangeError("Attempt to write outside buffer bounds");le||(le="utf8");for(var xe=!1;;)switch(le){case"hex":return R(this,re,$,J);case"utf8":case"utf-8":return O(this,re,$,J);case"ascii":return b(this,re,$,J);case"latin1":case"binary":return E(this,re,$,J);case"base64":return w(this,re,$,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,re,$,J);default:if(xe)throw new TypeError("Unknown encoding: "+le);le=(""+le).toLowerCase(),xe=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F(ie,re,$){return re===0&&$===ie.length?C.fromByteArray(ie):C.fromByteArray(ie.slice(re,$))}function M(ie,re,$){$=Math.min(ie.length,$);for(var J=[],le=re;le<$;){var ue=ie[le],xe=null,Me=ue>239?4:ue>223?3:ue>191?2:1;if(le+Me<=$){var Xe,$e,Je,rt;switch(Me){case 1:ue<128&&(xe=ue);break;case 2:Xe=ie[le+1],(Xe&192)===128&&(rt=(ue&31)<<6|Xe&63,rt>127&&(xe=rt));break;case 3:Xe=ie[le+1],$e=ie[le+2],(Xe&192)===128&&($e&192)===128&&(rt=(ue&15)<<12|(Xe&63)<<6|$e&63,rt>2047&&(rt<55296||rt>57343)&&(xe=rt));break;case 4:Xe=ie[le+1],$e=ie[le+2],Je=ie[le+3],(Xe&192)===128&&($e&192)===128&&(Je&192)===128&&(rt=(ue&15)<<18|(Xe&63)<<12|($e&63)<<6|Je&63,rt>65535&&rt<1114112&&(xe=rt))}}xe===null?(xe=65533,Me=1):xe>65535&&(xe-=65536,J.push(xe>>>10&1023|55296),xe=56320|xe&1023),J.push(xe),le+=Me}return Y(J)}var L=4096;function Y(ie){var re=ie.length;if(re<=L)return String.fromCharCode.apply(String,ie);for(var $="",J=0;J<re;)$+=String.fromCharCode.apply(String,ie.slice(J,J+=L));return $}function K(ie,re,$){var J="";$=Math.min(ie.length,$);for(var le=re;le<$;++le)J+=String.fromCharCode(ie[le]&127);return J}function A(ie,re,$){var J="";$=Math.min(ie.length,$);for(var le=re;le<$;++le)J+=String.fromCharCode(ie[le]);return J}function H(ie,re,$){var J=ie.length;(!re||re<0)&&(re=0),(!$||$<0||$>J)&&($=J);for(var le="",ue=re;ue<$;++ue)le+=se(ie[ue]);return le}function U(ie,re,$){for(var J=ie.slice(re,$),le="",ue=0;ue<J.length;ue+=2)le+=String.fromCharCode(J[ue]+J[ue+1]*256);return le}v.prototype.slice=function(re,$){var J=this.length;re=~~re,$=$===void 0?J:~~$,re<0?(re+=J,re<0&&(re=0)):re>J&&(re=J),$<0?($+=J,$<0&&($=0)):$>J&&($=J),$<re&&($=re);var le;if(v.TYPED_ARRAY_SUPPORT)le=this.subarray(re,$),le.__proto__=v.prototype;else{var ue=$-re;le=new v(ue,void 0);for(var xe=0;xe<ue;++xe)le[xe]=this[xe+re]}return le};function I(ie,re,$){if(ie%1!==0||ie<0)throw new RangeError("offset is not uint");if(ie+re>$)throw new RangeError("Trying to access beyond buffer length")}v.prototype.readUIntLE=function(re,$,J){re=re|0,$=$|0,J||I(re,$,this.length);for(var le=this[re],ue=1,xe=0;++xe<$&&(ue*=256);)le+=this[re+xe]*ue;return le},v.prototype.readUIntBE=function(re,$,J){re=re|0,$=$|0,J||I(re,$,this.length);for(var le=this[re+--$],ue=1;$>0&&(ue*=256);)le+=this[re+--$]*ue;return le},v.prototype.readUInt8=function(re,$){return $||I(re,1,this.length),this[re]},v.prototype.readUInt16LE=function(re,$){return $||I(re,2,this.length),this[re]|this[re+1]<<8},v.prototype.readUInt16BE=function(re,$){return $||I(re,2,this.length),this[re]<<8|this[re+1]},v.prototype.readUInt32LE=function(re,$){return $||I(re,4,this.length),(this[re]|this[re+1]<<8|this[re+2]<<16)+this[re+3]*16777216},v.prototype.readUInt32BE=function(re,$){return $||I(re,4,this.length),this[re]*16777216+(this[re+1]<<16|this[re+2]<<8|this[re+3])},v.prototype.readIntLE=function(re,$,J){re=re|0,$=$|0,J||I(re,$,this.length);for(var le=this[re],ue=1,xe=0;++xe<$&&(ue*=256);)le+=this[re+xe]*ue;return ue*=128,le>=ue&&(le-=Math.pow(2,8*$)),le},v.prototype.readIntBE=function(re,$,J){re=re|0,$=$|0,J||I(re,$,this.length);for(var le=$,ue=1,xe=this[re+--le];le>0&&(ue*=256);)xe+=this[re+--le]*ue;return ue*=128,xe>=ue&&(xe-=Math.pow(2,8*$)),xe},v.prototype.readInt8=function(re,$){return $||I(re,1,this.length),this[re]&128?(255-this[re]+1)*-1:this[re]},v.prototype.readInt16LE=function(re,$){$||I(re,2,this.length);var J=this[re]|this[re+1]<<8;return J&32768?J|4294901760:J},v.prototype.readInt16BE=function(re,$){$||I(re,2,this.length);var J=this[re+1]|this[re]<<8;return J&32768?J|4294901760:J},v.prototype.readInt32LE=function(re,$){return $||I(re,4,this.length),this[re]|this[re+1]<<8|this[re+2]<<16|this[re+3]<<24},v.prototype.readInt32BE=function(re,$){return $||I(re,4,this.length),this[re]<<24|this[re+1]<<16|this[re+2]<<8|this[re+3]},v.prototype.readFloatLE=function(re,$){return $||I(re,4,this.length),N.read(this,re,!0,23,4)},v.prototype.readFloatBE=function(re,$){return $||I(re,4,this.length),N.read(this,re,!1,23,4)},v.prototype.readDoubleLE=function(re,$){return $||I(re,8,this.length),N.read(this,re,!0,52,8)},v.prototype.readDoubleBE=function(re,$){return $||I(re,8,this.length),N.read(this,re,!1,52,8)};function G(ie,re,$,J,le,ue){if(!v.isBuffer(ie))throw new TypeError('"buffer" argument must be a Buffer instance');if(re>le||re<ue)throw new RangeError('"value" argument is out of bounds');if($+J>ie.length)throw new RangeError("Index out of range")}v.prototype.writeUIntLE=function(re,$,J,le){if(re=+re,$=$|0,J=J|0,!le){var ue=Math.pow(2,8*J)-1;G(this,re,$,J,ue,0)}var xe=1,Me=0;for(this[$]=re&255;++Me<J&&(xe*=256);)this[$+Me]=re/xe&255;return $+J},v.prototype.writeUIntBE=function(re,$,J,le){if(re=+re,$=$|0,J=J|0,!le){var ue=Math.pow(2,8*J)-1;G(this,re,$,J,ue,0)}var xe=J-1,Me=1;for(this[$+xe]=re&255;--xe>=0&&(Me*=256);)this[$+xe]=re/Me&255;return $+J},v.prototype.writeUInt8=function(re,$,J){return re=+re,$=$|0,J||G(this,re,$,1,255,0),v.TYPED_ARRAY_SUPPORT||(re=Math.floor(re)),this[$]=re&255,$+1};function ne(ie,re,$,J){re<0&&(re=65535+re+1);for(var le=0,ue=Math.min(ie.length-$,2);le<ue;++le)ie[$+le]=(re&255<<8*(J?le:1-le))>>>(J?le:1-le)*8}v.prototype.writeUInt16LE=function(re,$,J){return re=+re,$=$|0,J||G(this,re,$,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[$]=re&255,this[$+1]=re>>>8):ne(this,re,$,!0),$+2},v.prototype.writeUInt16BE=function(re,$,J){return re=+re,$=$|0,J||G(this,re,$,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[$]=re>>>8,this[$+1]=re&255):ne(this,re,$,!1),$+2};function oe(ie,re,$,J){re<0&&(re=4294967295+re+1);for(var le=0,ue=Math.min(ie.length-$,4);le<ue;++le)ie[$+le]=re>>>(J?le:3-le)*8&255}v.prototype.writeUInt32LE=function(re,$,J){return re=+re,$=$|0,J||G(this,re,$,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[$+3]=re>>>24,this[$+2]=re>>>16,this[$+1]=re>>>8,this[$]=re&255):oe(this,re,$,!0),$+4},v.prototype.writeUInt32BE=function(re,$,J){return re=+re,$=$|0,J||G(this,re,$,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[$]=re>>>24,this[$+1]=re>>>16,this[$+2]=re>>>8,this[$+3]=re&255):oe(this,re,$,!1),$+4},v.prototype.writeIntLE=function(re,$,J,le){if(re=+re,$=$|0,!le){var ue=Math.pow(2,8*J-1);G(this,re,$,J,ue-1,-ue)}var xe=0,Me=1,Xe=0;for(this[$]=re&255;++xe<J&&(Me*=256);)re<0&&Xe===0&&this[$+xe-1]!==0&&(Xe=1),this[$+xe]=(re/Me>>0)-Xe&255;return $+J},v.prototype.writeIntBE=function(re,$,J,le){if(re=+re,$=$|0,!le){var ue=Math.pow(2,8*J-1);G(this,re,$,J,ue-1,-ue)}var xe=J-1,Me=1,Xe=0;for(this[$+xe]=re&255;--xe>=0&&(Me*=256);)re<0&&Xe===0&&this[$+xe+1]!==0&&(Xe=1),this[$+xe]=(re/Me>>0)-Xe&255;return $+J},v.prototype.writeInt8=function(re,$,J){return re=+re,$=$|0,J||G(this,re,$,1,127,-128),v.TYPED_ARRAY_SUPPORT||(re=Math.floor(re)),re<0&&(re=255+re+1),this[$]=re&255,$+1},v.prototype.writeInt16LE=function(re,$,J){return re=+re,$=$|0,J||G(this,re,$,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[$]=re&255,this[$+1]=re>>>8):ne(this,re,$,!0),$+2},v.prototype.writeInt16BE=function(re,$,J){return re=+re,$=$|0,J||G(this,re,$,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[$]=re>>>8,this[$+1]=re&255):ne(this,re,$,!1),$+2},v.prototype.writeInt32LE=function(re,$,J){return re=+re,$=$|0,J||G(this,re,$,4,2147483647,-2147483648),v.TYPED_ARRAY_SUPPORT?(this[$]=re&255,this[$+1]=re>>>8,this[$+2]=re>>>16,this[$+3]=re>>>24):oe(this,re,$,!0),$+4},v.prototype.writeInt32BE=function(re,$,J){return re=+re,$=$|0,J||G(this,re,$,4,2147483647,-2147483648),re<0&&(re=4294967295+re+1),v.TYPED_ARRAY_SUPPORT?(this[$]=re>>>24,this[$+1]=re>>>16,this[$+2]=re>>>8,this[$+3]=re&255):oe(this,re,$,!1),$+4};function de(ie,re,$,J,le,ue){if($+J>ie.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function Oe(ie,re,$,J,le){return le||de(ie,re,$,4,34028234663852886e22,-34028234663852886e22),N.write(ie,re,$,J,23,4),$+4}v.prototype.writeFloatLE=function(re,$,J){return Oe(this,re,$,!0,J)},v.prototype.writeFloatBE=function(re,$,J){return Oe(this,re,$,!1,J)};function Ae(ie,re,$,J,le){return le||de(ie,re,$,8,17976931348623157e292,-17976931348623157e292),N.write(ie,re,$,J,52,8),$+8}v.prototype.writeDoubleLE=function(re,$,J){return Ae(this,re,$,!0,J)},v.prototype.writeDoubleBE=function(re,$,J){return Ae(this,re,$,!1,J)},v.prototype.copy=function(re,$,J,le){if(J||(J=0),!le&&le!==0&&(le=this.length),$>=re.length&&($=re.length),$||($=0),le>0&&le<J&&(le=J),le===J)return 0;if(re.length===0||this.length===0)return 0;if($<0)throw new RangeError("targetStart out of bounds");if(J<0||J>=this.length)throw new RangeError("sourceStart out of bounds");if(le<0)throw new RangeError("sourceEnd out of bounds");le>this.length&&(le=this.length),re.length-$<le-J&&(le=re.length-$+J);var ue=le-J,xe;if(this===re&&J<$&&$<le)for(xe=ue-1;xe>=0;--xe)re[xe+$]=this[xe+J];else if(ue<1e3||!v.TYPED_ARRAY_SUPPORT)for(xe=0;xe<ue;++xe)re[xe+$]=this[xe+J];else Uint8Array.prototype.set.call(re,this.subarray(J,J+ue),$);return ue},v.prototype.fill=function(re,$,J,le){if(typeof re=="string"){if(typeof $=="string"?(le=$,$=0,J=this.length):typeof J=="string"&&(le=J,J=this.length),re.length===1){var ue=re.charCodeAt(0);ue<256&&(re=ue)}if(le!==void 0&&typeof le!="string")throw new TypeError("encoding must be a string");if(typeof le=="string"&&!v.isEncoding(le))throw new TypeError("Unknown encoding: "+le)}else typeof re=="number"&&(re=re&255);if($<0||this.length<$||this.length<J)throw new RangeError("Out of range index");if(J<=$)return this;$=$>>>0,J=J===void 0?this.length:J>>>0,re||(re=0);var xe;if(typeof re=="number")for(xe=$;xe<J;++xe)this[xe]=re;else{var Me=v.isBuffer(re)?re:ee(new v(re,le).toString()),Xe=Me.length;for(xe=0;xe<J-$;++xe)this[xe+$]=Me[xe%Xe]}return this};var pe=/[^+\/0-9A-Za-z-_]/g;function Se(ie){if(ie=be(ie).replace(pe,""),ie.length<2)return"";for(;ie.length%4!==0;)ie=ie+"=";return ie}function be(ie){return ie.trim?ie.trim():ie.replace(/^\s+|\s+$/g,"")}function se(ie){return ie<16?"0"+ie.toString(16):ie.toString(16)}function ee(ie,re){re=re||Infinity;for(var $,J=ie.length,le=null,ue=[],xe=0;xe<J;++xe){if($=ie.charCodeAt(xe),$>55295&&$<57344){if(!le){if($>56319){(re-=3)>-1&&ue.push(239,191,189);continue}else if(xe+1===J){(re-=3)>-1&&ue.push(239,191,189);continue}le=$;continue}if($<56320){(re-=3)>-1&&ue.push(239,191,189),le=$;continue}$=(le-55296<<10|$-56320)+65536}else le&&((re-=3)>-1&&ue.push(239,191,189));if(le=null,$<128){if((re-=1)<0)break;ue.push($)}else if($<2048){if((re-=2)<0)break;ue.push($>>6|192,$&63|128)}else if($<65536){if((re-=3)<0)break;ue.push($>>12|224,$>>6&63|128,$&63|128)}else if($<1114112){if((re-=4)<0)break;ue.push($>>18|240,$>>12&63|128,$>>6&63|128,$&63|128)}else throw new Error("Invalid code point")}return ue}function B(ie){for(var re=[],$=0;$<ie.length;++$)re.push(ie.charCodeAt($)&255);return re}function V(ie,re){for(var $,J,le,ue=[],xe=0;xe<ie.length&&!((re-=2)<0);++xe)$=ie.charCodeAt(xe),J=$>>8,le=$%256,ue.push(le),ue.push(J);return ue}function X(ie){return C.toByteArray(Se(ie))}function Q(ie,re,$,J){for(var le=0;le<J&&!(le+$>=re.length||le>=ie.length);++le)re[le+$]=ie[le];return le}function Z(ie){return ie!==ie}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},W("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(W,q,D){q.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(W,q,D){q.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(W,q,D){/*!
|
|
|
* copy-to - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var P=Array.prototype.slice;q.exports=v;function v(N,g){if(!(this instanceof v))return new v(N,g);this.src=N,this._withAccess=g}v.prototype.withAccess=function(N){return this._withAccess=N!==!1,this},v.prototype.pick=function(N){return Array.isArray(N)||(N=P.call(arguments)),N.length&&(this.keys=N),this},v.prototype.to=function(N){if(N=N||{},!this.src)return N;var g=this.keys||Object.keys(this.src);if(!this._withAccess){for(var m=0;m<g.length;m++){if(S=g[m],N[S]!==void 0)continue;N[S]=this.src[S]}return N}for(var m=0;m<g.length;m++){var S=g[m];if(!C(N,S))continue;var _=this.src.__lookupGetter__(S),t=this.src.__lookupSetter__(S);_&&N.__defineGetter__(S,_),t&&N.__defineSetter__(S,t),!_&&!t&&(N[S]=this.src[S])}return N},v.prototype.toCover=function(N){for(var g=this.keys||Object.keys(this.src),m=0;m<g.length;m++){var S=g[m];delete N[S];var _=this.src.__lookupGetter__(S),t=this.src.__lookupSetter__(S);_&&N.__defineGetter__(S,_),t&&N.__defineSetter__(S,t),!_&&!t&&(N[S]=this.src[S])}},v.prototype.override=v.prototype.toCover,v.prototype.and=function(N){var g={};return this.to(g),this.src=N,this.to(g),this.src=g,this};function C(N,g){return N[g]===void 0&&N.__lookupGetter__(g)===void 0&&N.__lookupSetter__(g)===void 0}},{}],77:[function(W,q,D){W("../../modules/es6.string.iterator"),W("../../modules/es6.array.from"),q.exports=W("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(W,q,D){var P=W("../../modules/_core"),v=P.JSON||(P.JSON={stringify:JSON.stringify});q.exports=function(N){return v.stringify.apply(v,arguments)}},{"../../modules/_core":99}],79:[function(W,q,D){W("../../modules/es6.object.assign"),q.exports=W("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(W,q,D){W("../../modules/es6.object.create");var P=W("../../modules/_core").Object;q.exports=function(C,N){return P.create(C,N)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(W,q,D){W("../../modules/es6.object.define-property");var P=W("../../modules/_core").Object;q.exports=function(C,N,g){return P.defineProperty(C,N,g)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(W,q,D){W("../../modules/es7.object.entries"),q.exports=W("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(W,q,D){W("../../modules/es6.object.get-own-property-names");var P=W("../../modules/_core").Object;q.exports=function(C){return P.getOwnPropertyNames(C)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(W,q,D){W("../../modules/es6.object.get-prototype-of"),q.exports=W("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(W,q,D){W("../../modules/es6.object.keys"),q.exports=W("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(W,q,D){W("../modules/es6.object.to-string"),W("../modules/es6.string.iterator"),W("../modules/web.dom.iterable"),W("../modules/es6.promise"),W("../modules/es7.promise.finally"),W("../modules/es7.promise.try"),q.exports=W("../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(W,q,D){W("../modules/web.immediate"),q.exports=W("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(W,q,D){W("../../modules/es6.string.from-code-point"),q.exports=W("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(W,q,D){W("../../modules/es6.function.has-instance"),q.exports=W("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(W,q,D){W("../../modules/es6.symbol"),W("../../modules/es6.object.to-string"),W("../../modules/es7.symbol.async-iterator"),W("../../modules/es7.symbol.observable"),q.exports=W("../../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(W,q,D){W("../../modules/es6.string.iterator"),W("../../modules/web.dom.iterable"),q.exports=W("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(W,q,D){q.exports=function(P){if(typeof P!="function")throw TypeError(P+" is not a function!");return P}},{}],93:[function(W,q,D){q.exports=function(){}},{}],94:[function(W,q,D){q.exports=function(P,v,C,N){if(!(P instanceof v)||N!==void 0&&N in P)throw TypeError(C+": incorrect invocation!");return P}},{}],95:[function(W,q,D){var P=W("./_is-object");q.exports=function(v){if(!P(v))throw TypeError(v+" is not an object!");return v}},{"./_is-object":119}],96:[function(W,q,D){var P=W("./_to-iobject"),v=W("./_to-length"),C=W("./_to-absolute-index");q.exports=function(N){return function(g,m,S){var _=P(g),t=v(_.length),d=C(S,t),i;if(N&&m!=m){for(;t>d;)if(i=_[d++],i!=i)return!0}else for(;t>d;d++)if((N||d in _)&&_[d]===m)return N||d||0;return!N&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(W,q,D){var P=W("./_cof"),v=W("./_wks")("toStringTag"),C=P(function(){return arguments}())=="Arguments",N=function(g,m){try{return g[m]}catch(S){}};q.exports=function(g){var m,S,_;return g===void 0?"Undefined":g===null?"Null":typeof(S=N(m=Object(g),v))=="string"?S:C?P(m):(_=P(m))=="Object"&&typeof m.callee=="function"?"Arguments":_}},{"./_cof":98,"./_wks":166}],98:[function(W,q,D){var P={}.toString;q.exports=function(v){return P.call(v).slice(8,-1)}},{}],99:[function(W,q,D){var P=q.exports={version:"2.6.11"};typeof __e=="number"&&(__e=P)},{}],100:[function(W,q,D){"use strict";var P=W("./_object-dp"),v=W("./_property-desc");q.exports=function(C,N,g){N in C?P.f(C,N,v(0,g)):C[N]=g}},{"./_object-dp":132,"./_property-desc":146}],101:[function(W,q,D){var P=W("./_a-function");q.exports=function(v,C,N){if(P(v),C===void 0)return v;switch(N){case 1:return function(g){return v.call(C,g)};case 2:return function(g,m){return v.call(C,g,m)};case 3:return function(g,m,S){return v.call(C,g,m,S)}}return function(){return v.apply(C,arguments)}}},{"./_a-function":92}],102:[function(W,q,D){q.exports=function(P){if(P==null)throw TypeError("Can't call method on "+P);return P}},{}],103:[function(W,q,D){q.exports=!W("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(W,q,D){var P=W("./_is-object"),v=W("./_global").document,C=P(v)&&P(v.createElement);q.exports=function(N){return C?v.createElement(N):{}}},{"./_global":110,"./_is-object":119}],105:[function(W,q,D){q.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(W,q,D){var P=W("./_object-keys"),v=W("./_object-gops"),C=W("./_object-pie");q.exports=function(N){var g=P(N),m=v.f;if(m)for(var S=m(N),_=C.f,t=0,d;S.length>t;)_.call(N,d=S[t++])&&g.push(d);return g}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(W,q,D){var P=W("./_global"),v=W("./_core"),C=W("./_ctx"),N=W("./_hide"),g=W("./_has"),m="prototype",S=function(_,t,d){var i=_&S.F,c=_&S.G,o=_&S.S,n=_&S.P,s=_&S.B,h=_&S.W,f=c?v:v[t]||(v[t]={}),l=f[m],a=c?P:o?P[t]:(P[t]||{})[m],r,x,y;c&&(d=t);for(r in d){if(x=!i&&a&&a[r]!==void 0,x&&g(f,r))continue;y=x?a[r]:d[r],f[r]=c&&typeof a[r]!="function"?d[r]:s&&x?C(y,P):h&&a[r]==y?function(p){var R=function(O,b,E){if(this instanceof p){switch(arguments.length){case 0:return new p;case 1:return new p(O);case 2:return new p(O,b)}return new p(O,b,E)}return p.apply(this,arguments)};return R[m]=p[m],R}(y):n&&typeof y=="function"?C(Function.call,y):y,n&&((f.virtual||(f.virtual={}))[r]=y,_&S.R&&l&&!l[r]&&N(l,r,y))}};S.F=1,S.G=2,S.S=4,S.P=8,S.B=16,S.W=32,S.U=64,S.R=128,q.exports=S},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(W,q,D){q.exports=function(P){try{return!!P()}catch(v){return!0}}},{}],109:[function(W,q,D){var P=W("./_ctx"),v=W("./_iter-call"),C=W("./_is-array-iter"),N=W("./_an-object"),g=W("./_to-length"),m=W("./core.get-iterator-method"),S={},_={},D=q.exports=function(t,d,i,c,o){var n=o?function(){return t}:m(t),s=P(i,c,d?2:1),h=0,f,l,a,r;if(typeof n!="function")throw TypeError(t+" is not iterable!");if(C(n)){for(f=g(t.length);f>h;h++)if(r=d?s(N(l=t[h])[0],l[1]):s(t[h]),r===S||r===_)return r}else for(a=n.call(t);!(l=a.next()).done;)if(r=v(a,s,l.value,d),r===S||r===_)return r};D.BREAK=S,D.RETURN=_},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(W,q,D){var P=q.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=P)},{}],111:[function(W,q,D){var P={}.hasOwnProperty;q.exports=function(v,C){return P.call(v,C)}},{}],112:[function(W,q,D){var P=W("./_object-dp"),v=W("./_property-desc");q.exports=W("./_descriptors")?function(C,N,g){return P.f(C,N,v(1,g))}:function(C,N,g){return C[N]=g,C}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(W,q,D){var P=W("./_global").document;q.exports=P&&P.documentElement},{"./_global":110}],114:[function(W,q,D){q.exports=!W("./_descriptors")&&!W("./_fails")(function(){return Object.defineProperty(W("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(W,q,D){q.exports=function(P,v,C){var N=C===void 0;switch(v.length){case 0:return N?P():P.call(C);case 1:return N?P(v[0]):P.call(C,v[0]);case 2:return N?P(v[0],v[1]):P.call(C,v[0],v[1]);case 3:return N?P(v[0],v[1],v[2]):P.call(C,v[0],v[1],v[2]);case 4:return N?P(v[0],v[1],v[2],v[3]):P.call(C,v[0],v[1],v[2],v[3])}return P.apply(C,v)}},{}],116:[function(W,q,D){var P=W("./_cof");q.exports=Object("z").propertyIsEnumerable(0)?Object:function(v){return P(v)=="String"?v.split(""):Object(v)}},{"./_cof":98}],117:[function(W,q,D){var P=W("./_iterators"),v=W("./_wks")("iterator"),C=Array.prototype;q.exports=function(N){return N!==void 0&&(P.Array===N||C[v]===N)}},{"./_iterators":125,"./_wks":166}],118:[function(W,q,D){var P=W("./_cof");q.exports=Array.isArray||function(C){return P(C)=="Array"}},{"./_cof":98}],119:[function(W,q,D){q.exports=function(P){return typeof P=="object"?P!==null:typeof P=="function"}},{}],120:[function(W,q,D){var P=W("./_an-object");q.exports=function(v,C,N,g){try{return g?C(P(N)[0],N[1]):C(N)}catch(S){var m=v.return;throw m!==void 0&&P(m.call(v)),S}}},{"./_an-object":95}],121:[function(W,q,D){"use strict";var P=W("./_object-create"),v=W("./_property-desc"),C=W("./_set-to-string-tag"),N={};W("./_hide")(N,W("./_wks")("iterator"),function(){return this}),q.exports=function(g,m,S){g.prototype=P(N,{next:v(1,S)}),C(g,m+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(W,q,D){"use strict";var P=W("./_library"),v=W("./_export"),C=W("./_redefine"),N=W("./_hide"),g=W("./_iterators"),m=W("./_iter-create"),S=W("./_set-to-string-tag"),_=W("./_object-gpo"),t=W("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),i="@@iterator",c="keys",o="values",n=function(){return this};q.exports=function(s,h,f,l,a,r,x){m(f,h,l);var y=function(K){if(!d&&K in b)return b[K];switch(K){case c:return function(){return new f(this,K)};case o:return function(){return new f(this,K)}}return function(){return new f(this,K)}},p=h+" Iterator",R=a==o,O=!1,b=s.prototype,E=b[t]||b[i]||a&&b[a],w=E||y(a),T=a?R?y("entries"):w:void 0,F=h=="Array"&&b.entries||E,M,L,Y;if(F&&(Y=_(F.call(new s)),Y!==Object.prototype&&Y.next&&(S(Y,p,!0),!P&&typeof Y[t]!="function"&&N(Y,t,n))),R&&E&&E.name!==o&&(O=!0,w=function(){return E.call(this)}),(!P||x)&&(d||O||!b[t])&&N(b,t,w),g[h]=w,g[p]=n,a)if(M={values:R?w:y(o),keys:r?w:y(c),entries:T},x)for(L in M)L in b||C(b,L,M[L]);else v(v.P+v.F*(d||O),h,M);return M}},{"./_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(W,q,D){var P=W("./_wks")("iterator"),v=!1;try{var C=[7][P]();C.return=function(){v=!0},Array.from(C,function(){throw 2})}catch(N){}q.exports=function(N,g){if(!g&&!v)return!1;var m=!1;try{var S=[7],_=S[P]();_.next=function(){return{done:m=!0}},S[P]=function(){return _},N(S)}catch(t){}return m}},{"./_wks":166}],124:[function(W,q,D){q.exports=function(P,v){return{value:v,done:!!P}}},{}],125:[function(W,q,D){q.exports={}},{}],126:[function(W,q,D){q.exports=!0},{}],127:[function(W,q,D){var P=W("./_uid")("meta"),v=W("./_is-object"),C=W("./_has"),N=W("./_object-dp").f,g=0,m=Object.isExtensible||function(){return!0},S=!W("./_fails")(function(){return m(Object.preventExtensions({}))}),_=function(o){N(o,P,{value:{i:"O"+ ++g,w:{}}})},t=function(o,n){if(!v(o))return typeof o=="symbol"?o:(typeof o=="string"?"S":"P")+o;if(!C(o,P)){if(!m(o))return"F";if(!n)return"E";_(o)}return o[P].i},d=function(o,n){if(!C(o,P)){if(!m(o))return!0;if(!n)return!1;_(o)}return o[P].w},i=function(o){return S&&c.NEED&&m(o)&&!C(o,P)&&_(o),o},c=q.exports={KEY:P,NEED:!1,fastKey:t,getWeak:d,onFreeze:i}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(W,q,D){var P=W("./_global"),v=W("./_task").set,C=P.MutationObserver||P.WebKitMutationObserver,N=P.process,g=P.Promise,m=W("./_cof")(N)=="process";q.exports=function(){var S,_,t,d=function(){var n,s;for(m&&(n=N.domain)&&n.exit();S;){s=S.fn,S=S.next;try{s()}catch(h){throw S?t():_=void 0,h}}_=void 0,n&&n.enter()};if(m)t=function(){N.nextTick(d)};else if(C&&!(P.navigator&&P.navigator.standalone)){var i=!0,c=document.createTextNode("");new C(d).observe(c,{characterData:!0}),t=function(){c.data=i=!i}}else if(g&&g.resolve){var o=g.resolve(void 0);t=function(){o.then(d)}}else t=function(){v.call(P,d)};return function(n){var s={fn:n,next:void 0};_&&(_.next=s),S||(S=s,t()),_=s}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(W,q,D){"use strict";var P=W("./_a-function");function v(C){var N,g;this.promise=new C(function(m,S){if(N!==void 0||g!==void 0)throw TypeError("Bad Promise constructor");N=m,g=S}),this.resolve=P(N),this.reject=P(g)}q.exports.f=function(C){return new v(C)}},{"./_a-function":92}],130:[function(W,q,D){"use strict";var P=W("./_descriptors"),v=W("./_object-keys"),C=W("./_object-gops"),N=W("./_object-pie"),g=W("./_to-object"),m=W("./_iobject"),S=Object.assign;q.exports=!S||W("./_fails")(function(){var _={},t={},d=Symbol(),i="abcdefghijklmnopqrst";return _[d]=7,i.split("").forEach(function(c){t[c]=c}),S({},_)[d]!=7||Object.keys(S({},t)).join("")!=i})?function(t,d){for(var i=g(t),c=arguments.length,o=1,n=C.f,s=N.f;c>o;)for(var h=m(arguments[o++]),f=n?v(h).concat(n(h)):v(h),l=f.length,a=0,r;l>a;)r=f[a++],(!P||s.call(h,r))&&(i[r]=h[r]);return i}:S},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(W,q,D){var P=W("./_an-object"),v=W("./_object-dps"),C=W("./_enum-bug-keys"),N=W("./_shared-key")("IE_PROTO"),g=function(){},m="prototype",S=function(){var _=W("./_dom-create")("iframe"),t=C.length,d="<",i=">",c;for(_.style.display="none",W("./_html").appendChild(_),_.src="javascript:",c=_.contentWindow.document,c.open(),c.write(d+"script"+i+"document.F=Object"+d+"/script"+i),c.close(),S=c.F;t--;)delete S[m][C[t]];return S()};q.exports=Object.create||function(t,d){var i;return t!==null?(g[m]=P(t),i=new g,g[m]=null,i[N]=t):i=S(),d===void 0?i:v(i,d)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(W,q,D){var P=W("./_an-object"),v=W("./_ie8-dom-define"),C=W("./_to-primitive"),N=Object.defineProperty;D.f=W("./_descriptors")?Object.defineProperty:function(m,S,_){if(P(m),S=C(S,!0),P(_),v)try{return N(m,S,_)}catch(t){}if("get"in _||"set"in _)throw TypeError("Accessors not supported!");return"value"in _&&(m[S]=_.value),m}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(W,q,D){var P=W("./_object-dp"),v=W("./_an-object"),C=W("./_object-keys");q.exports=W("./_descriptors")?Object.defineProperties:function(g,m){v(g);for(var S=C(m),_=S.length,t=0,d;_>t;)P.f(g,d=S[t++],m[d]);return g}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(W,q,D){var P=W("./_object-pie"),v=W("./_property-desc"),C=W("./_to-iobject"),N=W("./_to-primitive"),g=W("./_has"),m=W("./_ie8-dom-define"),S=Object.getOwnPropertyDescriptor;D.f=W("./_descriptors")?S:function(t,d){if(t=C(t),d=N(d,!0),m)try{return S(t,d)}catch(i){}if(g(t,d))return v(!P.f.call(t,d),t[d])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(W,q,D){var P=W("./_to-iobject"),v=W("./_object-gopn").f,C={}.toString,N=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],g=function(m){try{return v(m)}catch(S){return N.slice()}};q.exports.f=function(S){return N&&C.call(S)=="[object Window]"?g(S):v(P(S))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(W,q,D){var P=W("./_object-keys-internal"),v=W("./_enum-bug-keys").concat("length","prototype");D.f=Object.getOwnPropertyNames||function(N){return P(N,v)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(W,q,D){D.f=Object.getOwnPropertySymbols},{}],138:[function(W,q,D){var P=W("./_has"),v=W("./_to-object"),C=W("./_shared-key")("IE_PROTO"),N=Object.prototype;q.exports=Object.getPrototypeOf||function(g){return g=v(g),P(g,C)?g[C]:typeof g.constructor=="function"&&g instanceof g.constructor?g.constructor.prototype:g instanceof Object?N:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(W,q,D){var P=W("./_has"),v=W("./_to-iobject"),C=W("./_array-includes")(!1),N=W("./_shared-key")("IE_PROTO");q.exports=function(g,m){var S=v(g),_=0,t=[],d;for(d in S)d!=N&&(P(S,d)&&t.push(d));for(;m.length>_;)P(S,d=m[_++])&&(~C(t,d)||t.push(d));return t}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(W,q,D){var P=W("./_object-keys-internal"),v=W("./_enum-bug-keys");q.exports=Object.keys||function(N){return P(N,v)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(W,q,D){D.f={}.propertyIsEnumerable},{}],142:[function(W,q,D){var P=W("./_export"),v=W("./_core"),C=W("./_fails");q.exports=function(N,g){var m=(v.Object||{})[N]||Object[N],S={};S[N]=g(m),P(P.S+P.F*C(function(){m(1)}),"Object",S)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(W,q,D){var P=W("./_descriptors"),v=W("./_object-keys"),C=W("./_to-iobject"),N=W("./_object-pie").f;q.exports=function(g){return function(m){for(var S=C(m),_=v(S),t=_.length,d=0,i=[],c;t>d;)c=_[d++],(!P||N.call(S,c))&&i.push(g?[c,S[c]]:S[c]);return i}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(W,q,D){q.exports=function(P){try{return{e:!1,v:P()}}catch(v){return{e:!0,v}}}},{}],145:[function(W,q,D){var P=W("./_an-object"),v=W("./_is-object"),C=W("./_new-promise-capability");q.exports=function(N,g){if(P(N),v(g)&&g.constructor===N)return g;var m=C.f(N),S=m.resolve;return S(g),m.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(W,q,D){q.exports=function(P,v){return{enumerable:!(P&1),configurable:!(P&2),writable:!(P&4),value:v}}},{}],147:[function(W,q,D){var P=W("./_hide");q.exports=function(v,C,N){for(var g in C)N&&v[g]?v[g]=C[g]:P(v,g,C[g]);return v}},{"./_hide":112}],148:[function(W,q,D){q.exports=W("./_hide")},{"./_hide":112}],149:[function(W,q,D){"use strict";var P=W("./_global"),v=W("./_core"),C=W("./_object-dp"),N=W("./_descriptors"),g=W("./_wks")("species");q.exports=function(m){var S=typeof v[m]=="function"?v[m]:P[m];N&&S&&!S[g]&&C.f(S,g,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(W,q,D){var P=W("./_object-dp").f,v=W("./_has"),C=W("./_wks")("toStringTag");q.exports=function(N,g,m){N&&!v(N=m?N:N.prototype,C)&&P(N,C,{configurable:!0,value:g})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(W,q,D){var P=W("./_shared")("keys"),v=W("./_uid");q.exports=function(C){return P[C]||(P[C]=v(C))}},{"./_shared":152,"./_uid":162}],152:[function(W,q,D){var P=W("./_core"),v=W("./_global"),C="__core-js_shared__",N=v[C]||(v[C]={});(q.exports=function(g,m){return N[g]||(N[g]=m!==void 0?m:{})})("versions",[]).push({version:P.version,mode:W("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(W,q,D){var P=W("./_an-object"),v=W("./_a-function"),C=W("./_wks")("species");q.exports=function(N,g){var m=P(N).constructor,S;return m===void 0||(S=P(m)[C])==null?g:v(S)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(W,q,D){var P=W("./_to-integer"),v=W("./_defined");q.exports=function(C){return function(N,g){var m=String(v(N)),S=P(g),_=m.length,t,d;return S<0||S>=_?C?"":void 0:(t=m.charCodeAt(S),t<55296||t>56319||S+1===_||(d=m.charCodeAt(S+1))<56320||d>57343?C?m.charAt(S):t:C?m.slice(S,S+2):(t-55296<<10)+(d-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(W,q,D){var P=W("./_ctx"),v=W("./_invoke"),C=W("./_html"),N=W("./_dom-create"),g=W("./_global"),m=g.process,S=g.setImmediate,_=g.clearImmediate,t=g.MessageChannel,d=g.Dispatch,i=0,c={},o="onreadystatechange",n,s,h,f=function(){var a=+this;if(c.hasOwnProperty(a)){var r=c[a];delete c[a],r()}},l=function(a){f.call(a.data)};(!S||!_)&&(S=function(r){for(var x=[],y=1;arguments.length>y;)x.push(arguments[y++]);return c[++i]=function(){v(typeof r=="function"?r:Function(r),x)},n(i),i},_=function(r){delete c[r]},W("./_cof")(m)=="process"?n=function(a){m.nextTick(P(f,a,1))}:d&&d.now?n=function(a){d.now(P(f,a,1))}:t?(s=new t,h=s.port2,s.port1.onmessage=l,n=P(h.postMessage,h,1)):g.addEventListener&&typeof postMessage=="function"&&!g.importScripts?(n=function(a){g.postMessage(a+"","*")},g.addEventListener("message",l,!1)):o in N("script")?n=function(a){C.appendChild(N("script"))[o]=function(){C.removeChild(this),f.call(a)}}:n=function(a){setTimeout(P(f,a,1),0)}),q.exports={set:S,clear:_}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(W,q,D){var P=W("./_to-integer"),v=Math.max,C=Math.min;q.exports=function(N,g){return N=P(N),N<0?v(N+g,0):C(N,g)}},{"./_to-integer":157}],157:[function(W,q,D){var P=Math.ceil,v=Math.floor;q.exports=function(C){return isNaN(C=+C)?0:(C>0?v:P)(C)}},{}],158:[function(W,q,D){var P=W("./_iobject"),v=W("./_defined");q.exports=function(C){return P(v(C))}},{"./_defined":102,"./_iobject":116}],159:[function(W,q,D){var P=W("./_to-integer"),v=Math.min;q.exports=function(C){return C>0?v(P(C),9007199254740991):0}},{"./_to-integer":157}],160:[function(W,q,D){var P=W("./_defined");q.exports=function(v){return Object(P(v))}},{"./_defined":102}],161:[function(W,q,D){var P=W("./_is-object");q.exports=function(v,C){if(!P(v))return v;var N,g;if(C&&typeof(N=v.toString)=="function"&&!P(g=N.call(v)))return g;if(typeof(N=v.valueOf)=="function"&&!P(g=N.call(v)))return g;if(!C&&typeof(N=v.toString)=="function"&&!P(g=N.call(v)))return g;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(W,q,D){var P=0,v=Math.random();q.exports=function(C){return"Symbol(".concat(C===void 0?"":C,")_",(++P+v).toString(36))}},{}],163:[function(W,q,D){var P=W("./_global"),v=P.navigator;q.exports=v&&v.userAgent||""},{"./_global":110}],164:[function(W,q,D){var P=W("./_global"),v=W("./_core"),C=W("./_library"),N=W("./_wks-ext"),g=W("./_object-dp").f;q.exports=function(m){var S=v.Symbol||(v.Symbol=C?{}:P.Symbol||{});m.charAt(0)!="_"&&!(m in S)&&g(S,m,{value:N.f(m)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(W,q,D){D.f=W("./_wks")},{"./_wks":166}],166:[function(W,q,D){var P=W("./_shared")("wks"),v=W("./_uid"),C=W("./_global").Symbol,N=typeof C=="function",g=q.exports=function(m){return P[m]||(P[m]=N&&C[m]||(N?C:v)("Symbol."+m))};g.store=P},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(W,q,D){var P=W("./_classof"),v=W("./_wks")("iterator"),C=W("./_iterators");q.exports=W("./_core").getIteratorMethod=function(N){if(N!=null)return N[v]||N["@@iterator"]||C[P(N)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(W,q,D){"use strict";var P=W("./_ctx"),v=W("./_export"),C=W("./_to-object"),N=W("./_iter-call"),g=W("./_is-array-iter"),m=W("./_to-length"),S=W("./_create-property"),_=W("./core.get-iterator-method");v(v.S+v.F*!W("./_iter-detect")(function(t){Array.from(t)}),"Array",{from:function(d){var i=C(d),c=typeof this=="function"?this:Array,o=arguments.length,n=o>1?arguments[1]:void 0,s=n!==void 0,h=0,f=_(i),l,a,r,x;if(s&&(n=P(n,o>2?arguments[2]:void 0,2)),f!=null&&!(c==Array&&g(f)))for(x=f.call(i),a=new c;!(r=x.next()).done;h++)S(a,h,s?N(x,n,[r.value,h],!0):r.value);else for(l=m(i.length),a=new c(l);l>h;h++)S(a,h,s?n(i[h],h):i[h]);return a.length=h,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(W,q,D){"use strict";var P=W("./_add-to-unscopables"),v=W("./_iter-step"),C=W("./_iterators"),N=W("./_to-iobject");q.exports=W("./_iter-define")(Array,"Array",function(g,m){this._t=N(g),this._i=0,this._k=m},function(){var g=this._t,m=this._k,S=this._i++;return!g||S>=g.length?(this._t=void 0,v(1)):m=="keys"?v(0,S):m=="values"?v(0,g[S]):v(0,[S,g[S]])},"values"),C.Arguments=C.Array,P("keys"),P("values"),P("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(W,q,D){"use strict";var P=W("./_is-object"),v=W("./_object-gpo"),C=W("./_wks")("hasInstance"),N=Function.prototype;C in N||W("./_object-dp").f(N,C,{value:function(g){if(typeof this!="function"||!P(g))return!1;if(!P(this.prototype))return g instanceof this;for(;g=v(g);)if(this.prototype===g)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(W,q,D){var P=W("./_export");P(P.S+P.F,"Object",{assign:W("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(W,q,D){var P=W("./_export");P(P.S,"Object",{create:W("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(W,q,D){var P=W("./_export");P(P.S+P.F*!W("./_descriptors"),"Object",{defineProperty:W("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(W,q,D){W("./_object-sap")("getOwnPropertyNames",function(){return W("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(W,q,D){var P=W("./_to-object"),v=W("./_object-gpo");W("./_object-sap")("getPrototypeOf",function(){return function(N){return v(P(N))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(W,q,D){var P=W("./_to-object"),v=W("./_object-keys");W("./_object-sap")("keys",function(){return function(N){return v(P(N))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(W,q,D){arguments[4][71][0].apply(D,arguments)},{dup:71}],178:[function(W,q,D){"use strict";var P=W("./_library"),v=W("./_global"),C=W("./_ctx"),N=W("./_classof"),g=W("./_export"),m=W("./_is-object"),S=W("./_a-function"),_=W("./_an-instance"),t=W("./_for-of"),d=W("./_species-constructor"),i=W("./_task").set,c=W("./_microtask")(),o=W("./_new-promise-capability"),n=W("./_perform"),s=W("./_user-agent"),h=W("./_promise-resolve"),f="Promise",l=v.TypeError,a=v.process,r=a&&a.versions,x=r&&r.v8||"",y=v[f],p=N(a)=="process",R=function(){},O,b,E,w,T=b=o.f,F=!!function(){try{var I=y.resolve(1),G=(I.constructor={})[W("./_wks")("species")]=function(ne){ne(R,R)};return(p||typeof PromiseRejectionEvent=="function")&&I.then(R)instanceof G&&x.indexOf("6.6")!==0&&s.indexOf("Chrome/66")===-1}catch(ne){}}(),M=function(I){var G;return m(I)&&typeof(G=I.then)=="function"?G:!1},L=function(I,G){if(I._n)return;I._n=!0;var ne=I._c;c(function(){for(var oe=I._v,de=I._s==1,Oe=0,Ae=function(pe){var Se=de?pe.ok:pe.fail,be=pe.resolve,se=pe.reject,ee=pe.domain,B,V,X;try{Se?(de||(I._h==2&&A(I),I._h=1),Se===!0?B=oe:(ee&&ee.enter(),B=Se(oe),ee&&(ee.exit(),X=!0)),B===pe.promise?se(l("Promise-chain cycle")):(V=M(B))?V.call(B,be,se):be(B)):se(oe)}catch(Q){ee&&!X&&ee.exit(),se(Q)}};ne.length>Oe;)Ae(ne[Oe++]);I._c=[],I._n=!1,G&&!I._h&&Y(I)})},Y=function(I){i.call(v,function(){var G=I._v,ne=K(I),oe,de,Oe;if(ne&&(oe=n(function(){p?a.emit("unhandledRejection",G,I):(de=v.onunhandledrejection)?de({promise:I,reason:G}):(Oe=v.console)&&Oe.error&&Oe.error("Unhandled promise rejection",G)}),I._h=p||K(I)?2:1),I._a=void 0,ne&&oe.e)throw oe.v})},K=function(I){return I._h!==1&&(I._a||I._c).length===0},A=function(I){i.call(v,function(){var G;p?a.emit("rejectionHandled",I):(G=v.onrejectionhandled)&&G({promise:I,reason:I._v})})},H=function(I){var G=this;if(G._d)return;G._d=!0,G=G._w||G,G._v=I,G._s=2,G._a||(G._a=G._c.slice()),L(G,!0)},U=function(I){var G=this,ne;if(G._d)return;G._d=!0,G=G._w||G;try{if(G===I)throw l("Promise can't be resolved itself");(ne=M(I))?c(function(){var oe={_w:G,_d:!1};try{ne.call(I,C(U,oe,1),C(H,oe,1))}catch(de){H.call(oe,de)}}):(G._v=I,G._s=1,L(G,!1))}catch(oe){H.call({_w:G,_d:!1},oe)}};F||(y=function(G){_(this,y,f,"_h"),S(G),O.call(this);try{G(C(U,this,1),C(H,this,1))}catch(ne){H.call(this,ne)}},O=function(G){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},O.prototype=W("./_redefine-all")(y.prototype,{then:function(G,ne){var oe=T(d(this,y));return oe.ok=typeof G=="function"?G:!0,oe.fail=typeof ne=="function"&&ne,oe.domain=p?a.domain:void 0,this._c.push(oe),this._a&&this._a.push(oe),this._s&&L(this,!1),oe.promise},catch:function(I){return this.then(void 0,I)}}),E=function(){var I=new O;this.promise=I,this.resolve=C(U,I,1),this.reject=C(H,I,1)},o.f=T=function(I){return I===y||I===w?new E(I):b(I)}),g(g.G+g.W+g.F*!F,{Promise:y}),W("./_set-to-string-tag")(y,f),W("./_set-species")(f),w=W("./_core")[f],g(g.S+g.F*!F,f,{reject:function(G){var ne=T(this),oe=ne.reject;return oe(G),ne.promise}}),g(g.S+g.F*(P||!F),f,{resolve:function(G){return h(P&&this===w?y:this,G)}}),g(g.S+g.F*!(F&&W("./_iter-detect")(function(I){y.all(I).catch(R)})),f,{all:function(G){var ne=this,oe=T(ne),de=oe.resolve,Oe=oe.reject,Ae=n(function(){var pe=[],Se=0,be=1;t(G,!1,function(se){var ee=Se++,B=!1;pe.push(void 0),be++,ne.resolve(se).then(function(V){if(B)return;B=!0,pe[ee]=V,--be||de(pe)},Oe)}),--be||de(pe)});return Ae.e&&Oe(Ae.v),oe.promise},race:function(G){var ne=this,oe=T(ne),de=oe.reject,Oe=n(function(){t(G,!1,function(Ae){ne.resolve(Ae).then(oe.resolve,de)})});return Oe.e&&de(Oe.v),oe.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(W,q,D){var P=W("./_export"),v=W("./_to-absolute-index"),C=String.fromCharCode,N=String.fromCodePoint;P(P.S+P.F*(!!N&&N.length!=1),"String",{fromCodePoint:function(m){for(var S=[],_=arguments.length,t=0,d;_>t;){if(d=+arguments[t++],v(d,1114111)!==d)throw RangeError(d+" is not a valid code point");S.push(d<65536?C(d):C(((d-=65536)>>10)+55296,d%1024+56320))}return S.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(W,q,D){"use strict";var P=W("./_string-at")(!0);W("./_iter-define")(String,"String",function(v){this._t=String(v),this._i=0},function(){var v=this._t,C=this._i,N;return C>=v.length?{value:void 0,done:!0}:(N=P(v,C),this._i+=N.length,{value:N,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(W,q,D){"use strict";var P=W("./_global"),v=W("./_has"),C=W("./_descriptors"),N=W("./_export"),g=W("./_redefine"),m=W("./_meta").KEY,S=W("./_fails"),_=W("./_shared"),t=W("./_set-to-string-tag"),d=W("./_uid"),i=W("./_wks"),c=W("./_wks-ext"),o=W("./_wks-define"),n=W("./_enum-keys"),s=W("./_is-array"),h=W("./_an-object"),f=W("./_is-object"),l=W("./_to-object"),a=W("./_to-iobject"),r=W("./_to-primitive"),x=W("./_property-desc"),y=W("./_object-create"),p=W("./_object-gopn-ext"),R=W("./_object-gopd"),O=W("./_object-gops"),b=W("./_object-dp"),E=W("./_object-keys"),w=R.f,T=b.f,F=p.f,M=P.Symbol,L=P.JSON,Y=L&&L.stringify,K="prototype",A=i("_hidden"),H=i("toPrimitive"),U={}.propertyIsEnumerable,I=_("symbol-registry"),G=_("symbols"),ne=_("op-symbols"),oe=Object[K],de=typeof M=="function"&&!!O.f,Oe=P.QObject,Ae=!Oe||!Oe[K]||!Oe[K].findChild,pe=C&&S(function(){return y(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a!=7})?function(ue,xe,Me){var Xe=w(oe,xe);Xe&&delete oe[xe],T(ue,xe,Me),Xe&&ue!==oe&&T(oe,xe,Xe)}:T,Se=function(ue){var xe=G[ue]=y(M[K]);return xe._k=ue,xe},be=de&&typeof M.iterator=="symbol"?function(ue){return typeof ue=="symbol"}:function(ue){return ue instanceof M},se=function(xe,Me,Xe){return xe===oe&&se(ne,Me,Xe),h(xe),Me=r(Me,!0),h(Xe),v(G,Me)?(Xe.enumerable?(v(xe,A)&&xe[A][Me]&&(xe[A][Me]=!1),Xe=y(Xe,{enumerable:x(0,!1)})):(v(xe,A)||T(xe,A,x(1,{})),xe[A][Me]=!0),pe(xe,Me,Xe)):T(xe,Me,Xe)},ee=function(xe,Me){h(xe);for(var Xe=n(Me=a(Me)),$e=0,Je=Xe.length,rt;Je>$e;)se(xe,rt=Xe[$e++],Me[rt]);return xe},B=function(xe,Me){return Me===void 0?y(xe):ee(y(xe),Me)},V=function(xe){var Me=U.call(this,xe=r(xe,!0));return this===oe&&v(G,xe)&&!v(ne,xe)?!1:Me||!v(this,xe)||!v(G,xe)||v(this,A)&&this[A][xe]?Me:!0},X=function(xe,Me){if(xe=a(xe),Me=r(Me,!0),xe===oe&&v(G,Me)&&!v(ne,Me))return;var Xe=w(xe,Me);return Xe&&v(G,Me)&&!(v(xe,A)&&xe[A][Me])&&(Xe.enumerable=!0),Xe},Q=function(xe){for(var Me=F(a(xe)),Xe=[],$e=0,Je;Me.length>$e;)!v(G,Je=Me[$e++])&&Je!=A&&Je!=m&&Xe.push(Je);return Xe},Z=function(xe){for(var Me=xe===oe,Xe=F(Me?ne:a(xe)),$e=[],Je=0,rt;Xe.length>Je;)v(G,rt=Xe[Je++])&&(Me?v(oe,rt):!0)&&$e.push(G[rt]);return $e};de||(M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var xe=d(arguments.length>0?arguments[0]:void 0),Me=function(Xe){this===oe&&Me.call(ne,Xe),v(this,A)&&v(this[A],xe)&&(this[A][xe]=!1),pe(this,xe,x(1,Xe))};return C&&Ae&&pe(oe,xe,{configurable:!0,set:Me}),Se(xe)},g(M[K],"toString",function(){return this._k}),R.f=X,b.f=se,W("./_object-gopn").f=p.f=Q,W("./_object-pie").f=V,O.f=Z,C&&!W("./_library")&&g(oe,"propertyIsEnumerable",V,!0),c.f=function(ue){return Se(i(ue))}),N(N.G+N.W+N.F*!de,{Symbol:M});for(var ie="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),re=0;ie.length>re;)i(ie[re++]);for(var $=E(i.store),J=0;$.length>J;)o($[J++]);N(N.S+N.F*!de,"Symbol",{for:function(ue){return v(I,ue+="")?I[ue]:I[ue]=M(ue)},keyFor:function(xe){if(!be(xe))throw TypeError(xe+" is not a symbol!");for(var Me in I)if(I[Me]===xe)return Me},useSetter:function(){Ae=!0},useSimple:function(){Ae=!1}}),N(N.S+N.F*!de,"Object",{create:B,defineProperty:se,defineProperties:ee,getOwnPropertyDescriptor:X,getOwnPropertyNames:Q,getOwnPropertySymbols:Z});var le=S(function(){O.f(1)});N(N.S+N.F*le,"Object",{getOwnPropertySymbols:function(xe){return O.f(l(xe))}}),L&&N(N.S+N.F*(!de||S(function(){var ue=M();return Y([ue])!="[null]"||Y({a:ue})!="{}"||Y(Object(ue))!="{}"})),"JSON",{stringify:function(xe){for(var Me=[xe],Xe=1,$e,Je;arguments.length>Xe;)Me.push(arguments[Xe++]);return Je=$e=Me[1],!f($e)&&xe===void 0||be(xe)?void 0:(s($e)||($e=function(rt,it){if(typeof Je=="function"&&(it=Je.call(this,rt,it)),!be(it))return it}),Me[1]=$e,Y.apply(L,Me))}}),M[K][H]||W("./_hide")(M[K],H,M[K].valueOf),t(M,"Symbol"),t(Math,"Math",!0),t(P.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(W,q,D){var P=W("./_export"),v=W("./_object-to-array")(!0);P(P.S,"Object",{entries:function(N){return v(N)}})},{"./_export":107,"./_object-to-array":143}],183:[function(W,q,D){"use strict";var P=W("./_export"),v=W("./_core"),C=W("./_global"),N=W("./_species-constructor"),g=W("./_promise-resolve");P(P.P+P.R,"Promise",{finally:function(m){var S=N(this,v.Promise||C.Promise),_=typeof m=="function";return this.then(_?function(t){return g(S,m()).then(function(){return t})}:m,_?function(t){return g(S,m()).then(function(){throw t})}:m)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(W,q,D){"use strict";var P=W("./_export"),v=W("./_new-promise-capability"),C=W("./_perform");P(P.S,"Promise",{try:function(N){var g=v.f(this),m=C(N);return(m.e?g.reject:g.resolve)(m.v),g.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(W,q,D){W("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(W,q,D){W("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(W,q,D){W("./es6.array.iterator");for(var P=W("./_global"),v=W("./_hide"),C=W("./_iterators"),N=W("./_wks")("toStringTag"),g="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),m=0;m<g.length;m++){var S=g[m],_=P[S],t=_&&_.prototype;t&&!t[N]&&v(t,N,S),C[S]=C.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(W,q,D){var P=W("./_export"),v=W("./_task");P(P.G+P.B,{setImmediate:v.set,clearImmediate:v.clear})},{"./_export":107,"./_task":155}],189:[function(W,q,D){(function(P){"use strict";var v=W("babel-runtime/helpers/typeof"),C=N(v);function N(r){return r&&r.__esModule?r:{default:r}}function g(r){return Array.isArray?Array.isArray(r):a(r)==="[object Array]"}D.isArray=g;function m(r){return typeof r=="boolean"}D.isBoolean=m;function S(r){return r===null}D.isNull=S;function _(r){return r==null}D.isNullOrUndefined=_;function t(r){return typeof r=="number"}D.isNumber=t;function d(r){return typeof r=="string"}D.isString=d;function i(r){return(typeof r=="undefined"?"undefined":(0,C.default)(r))==="symbol"}D.isSymbol=i;function c(r){return r===void 0}D.isUndefined=c;function o(r){return a(r)==="[object RegExp]"}D.isRegExp=o;function n(r){return(typeof r=="undefined"?"undefined":(0,C.default)(r))==="object"&&r!==null}D.isObject=n;function s(r){return a(r)==="[object Date]"}D.isDate=s;function h(r){return a(r)==="[object Error]"||r instanceof Error}D.isError=h;function f(r){return typeof r=="function"}D.isFunction=f;function l(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||(typeof r=="undefined"?"undefined":(0,C.default)(r))==="symbol"||typeof r=="undefined"}D.isPrimitive=l,D.isBuffer=P.isBuffer;function a(r){return Object.prototype.toString.call(r)}}).call(this,{isBuffer:W("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(W,q,D){"use strict";var P=W("babel-runtime/helpers/typeof"),v=C(P);function C(N){return N&&N.__esModule?N:{default:N}}(function(N){"use strict";var g=function(){var d=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,i=/\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(o,n,s,h){if(arguments.length===1&&t(o)==="string"&&!/\d/.test(o)&&(n=o,o=void 0),o=o||new Date,o instanceof Date||(o=new Date(o)),isNaN(o))throw TypeError("Invalid date");n=String(g.masks[n]||n||g.masks.default);var f=n.slice(0,4);(f==="UTC:"||f==="GMT:")&&(n=n.slice(4),s=!0,f==="GMT:"&&(h=!0));var l=s?"getUTC":"get",a=o[l+"Date"](),r=o[l+"Day"](),x=o[l+"Month"](),y=o[l+"FullYear"](),p=o[l+"Hours"](),R=o[l+"Minutes"](),O=o[l+"Seconds"](),b=o[l+"Milliseconds"](),E=s?0:o.getTimezoneOffset(),w=S(o),T=_(o),F={d:a,dd:m(a),ddd:g.i18n.dayNames[r],dddd:g.i18n.dayNames[r+7],m:x+1,mm:m(x+1),mmm:g.i18n.monthNames[x],mmmm:g.i18n.monthNames[x+12],yy:String(y).slice(2),yyyy:y,h:p%12||12,hh:m(p%12||12),H:p,HH:m(p),M:R,MM:m(R),s:O,ss:m(O),l:m(b,3),L:m(Math.round(b/10)),t:p<12?"a":"p",tt:p<12?"am":"pm",T:p<12?"A":"P",TT:p<12?"AM":"PM",Z:h?"GMT":s?"UTC":(String(o).match(i)||[""]).pop().replace(c,""),o:(E>0?"-":"+")+m(Math.floor(Math.abs(E)/60)*100+Math.abs(E)%60,4),S:["th","st","nd","rd"][a%10>3?0:(a%100-a%10!=10)*a%10],W:w,N:T};return n.replace(d,function(M){return M in F?F[M]:M.slice(1,M.length-1)})}}();g.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"},g.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function m(d,i){for(d=String(d),i=i||2;d.length<i;)d="0"+d;return d}function S(d){var i=new Date(d.getFullYear(),d.getMonth(),d.getDate());i.setDate(i.getDate()-(i.getDay()+6)%7+3);var c=new Date(i.getFullYear(),0,4);c.setDate(c.getDate()-(c.getDay()+6)%7+3);var o=i.getTimezoneOffset()-c.getTimezoneOffset();i.setHours(i.getHours()-o);var n=(i-c)/(864e5*7);return 1+Math.floor(n)}function _(d){var i=d.getDay();return i===0&&(i=7),i}function t(d){return d===null?"null":d===void 0?"undefined":(typeof d=="undefined"?"undefined":(0,v.default)(d))!=="object"?typeof d=="undefined"?"undefined":(0,v.default)(d):Array.isArray(d)?"array":{}.toString.call(d).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return g}):(typeof D=="undefined"?"undefined":(0,v.default)(D))==="object"?q.exports=g:N.dateFormat=g})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(W,q,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 P=/["'&<>]/;q.exports=v;function v(C){var N=""+C,g=P.exec(N);if(!g)return N;var m,S="",_=0,t=0;for(_=g.index;_<N.length;_++){switch(N.charCodeAt(_)){case 34:m=""";break;case 38:m="&";break;case 39:m="'";break;case 60:m="<";break;case 62:m=">";break;default:continue}t!==_&&(S+=N.substring(t,_)),t=_+1,S+=m}return t!==_?S+N.substring(t,_):S}},{}],192:[function(W,q,D){function P(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}q.exports=P,P.EventEmitter=P,P.prototype._events=void 0,P.prototype._maxListeners=void 0,P.defaultMaxListeners=10,P.prototype.setMaxListeners=function(m){if(!C(m)||m<0||isNaN(m))throw TypeError("n must be a positive number");return this._maxListeners=m,this},P.prototype.emit=function(m){var S,_,t,d,i,c;if(this._events||(this._events={}),m==="error"&&(!this._events.error||N(this._events.error)&&!this._events.error.length)){if(S=arguments[1],S instanceof Error)throw S;var o=new Error('Uncaught, unspecified "error" event. ('+S+")");throw o.context=S,o}if(_=this._events[m],g(_))return!1;if(v(_))switch(arguments.length){case 1:_.call(this);break;case 2:_.call(this,arguments[1]);break;case 3:_.call(this,arguments[1],arguments[2]);break;default:d=Array.prototype.slice.call(arguments,1),_.apply(this,d)}else if(N(_))for(d=Array.prototype.slice.call(arguments,1),c=_.slice(),t=c.length,i=0;i<t;i++)c[i].apply(this,d);return!0},P.prototype.addListener=function(m,S){var _;if(!v(S))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",m,v(S.listener)?S.listener:S),this._events[m]?N(this._events[m])?this._events[m].push(S):this._events[m]=[this._events[m],S]:this._events[m]=S,N(this._events[m])&&!this._events[m].warned&&(g(this._maxListeners)?_=P.defaultMaxListeners:_=this._maxListeners,_&&_>0&&this._events[m].length>_&&(this._events[m].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[m].length),typeof console.trace=="function"&&console.trace())),this},P.prototype.on=P.prototype.addListener,P.prototype.once=function(m,S){if(!v(S))throw TypeError("listener must be a function");var _=!1;function t(){this.removeListener(m,t),_||(_=!0,S.apply(this,arguments))}return t.listener=S,this.on(m,t),this},P.prototype.removeListener=function(m,S){var _,t,d,i;if(!v(S))throw TypeError("listener must be a function");if(!this._events||!this._events[m])return this;if(_=this._events[m],d=_.length,t=-1,_===S||v(_.listener)&&_.listener===S)delete this._events[m],this._events.removeListener&&this.emit("removeListener",m,S);else if(N(_)){for(i=d;i-- >0;)if(_[i]===S||_[i].listener&&_[i].listener===S){t=i;break}if(t<0)return this;_.length===1?(_.length=0,delete this._events[m]):_.splice(t,1),this._events.removeListener&&this.emit("removeListener",m,S)}return this},P.prototype.removeAllListeners=function(m){var S,_;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[m]&&delete this._events[m],this;if(arguments.length===0){for(S in this._events){if(S==="removeListener")continue;this.removeAllListeners(S)}return this.removeAllListeners("removeListener"),this._events={},this}if(_=this._events[m],v(_))this.removeListener(m,_);else if(_)for(;_.length;)this.removeListener(m,_[_.length-1]);return delete this._events[m],this},P.prototype.listeners=function(m){var S;return!this._events||!this._events[m]?S=[]:v(this._events[m])?S=[this._events[m]]:S=this._events[m].slice(),S},P.prototype.listenerCount=function(m){if(this._events){var S=this._events[m];if(v(S))return 1;if(S)return S.length}return 0},P.listenerCount=function(m,S){return m.listenerCount(S)};function v(m){return typeof m=="function"}function C(m){return typeof m=="number"}function N(m){return typeof m=="object"&&m!==null}function g(m){return m===void 0}},{}],193:[function(W,q,D){var P=W("http"),v=q.exports;for(var C in P)P.hasOwnProperty(C)&&(v[C]=P[C]);v.request=function(N,g){return N||(N={}),N.scheme="https",N.protocol="https:",P.request.call(this,N,g)}},{http:231}],194:[function(W,q,D){/*!
|
|
|
* humanize-ms - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var P=W("util"),v=W("ms");q.exports=function(C){if(typeof C=="number")return C;var N=v(C);if(N===void 0){var g=new Error(P.format("humanize-ms(%j) result undefined",C));console.warn(g.stack)}return N}},{ms:204,util:243}],195:[function(W,q,D){D.read=function(P,v,C,N,g){var m,S,_=g*8-N-1,t=(1<<_)-1,d=t>>1,i=-7,c=C?g-1:0,o=C?-1:1,n=P[v+c];for(c+=o,m=n&(1<<-i)-1,n>>=-i,i+=_;i>0;m=m*256+P[v+c],c+=o,i-=8);for(S=m&(1<<-i)-1,m>>=-i,i+=N;i>0;S=S*256+P[v+c],c+=o,i-=8);if(m===0)m=1-d;else{if(m===t)return S?NaN:(n?-1:1)*Infinity;S=S+Math.pow(2,N),m=m-d}return(n?-1:1)*S*Math.pow(2,m-N)},D.write=function(P,v,C,N,g,m){var S,_,t,d=m*8-g-1,i=(1<<d)-1,c=i>>1,o=g===23?Math.pow(2,-24)-Math.pow(2,-77):0,n=N?0:m-1,s=N?1:-1,h=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===Infinity?(_=isNaN(v)?1:0,S=i):(S=Math.floor(Math.log(v)/Math.LN2),v*(t=Math.pow(2,-S))<1&&(S--,t*=2),S+c>=1?v+=o/t:v+=o*Math.pow(2,1-c),v*t>=2&&(S++,t/=2),S+c>=i?(_=0,S=i):S+c>=1?(_=(v*t-1)*Math.pow(2,g),S=S+c):(_=v*Math.pow(2,c-1)*Math.pow(2,g),S=0));g>=8;P[C+n]=_&255,n+=s,_/=256,g-=8);for(S=S<<g|_,d+=g;d>0;P[C+n]=S&255,n+=s,S/=256,d-=8);P[C+n-s]|=h*128}},{}],196:[function(W,q,D){typeof Object.create=="function"?q.exports=function(v,C){C&&(v.super_=C,v.prototype=Object.create(C.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}))}:q.exports=function(v,C){if(C){v.super_=C;var N=function(){};N.prototype=C.prototype,v.prototype=new N,v.prototype.constructor=v}}},{}],197:[function(W,q,D){/*!
|
|
|
* Determine if an object is a Buffer
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
|
* @license MIT
|
|
|
*/q.exports=function(C){return C!=null&&(P(C)||v(C)||!!C._isBuffer)};function P(C){return!!C.constructor&&typeof C.constructor.isBuffer=="function"&&C.constructor.isBuffer(C)}function v(C){return typeof C.readFloatLE=="function"&&typeof C.slice=="function"&&P(C.slice(0,0))}},{}],198:[function(W,q,D){var P={}.toString;q.exports=Array.isArray||function(v){return P.call(v)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(W,q){typeof exports=="object"&&typeof module!="undefined"?module.exports=q(W):typeof define=="function"&&define.amd?define(q):q(W)})(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(W){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(W){for(var q={},D=0,P=W.length;D<P;D++)q[W.charAt(D)]=D;return q}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(W){if(W.length<2){var q=W.charCodeAt(0);return q<128?W:q<2048?fromCharCode(192|q>>>6)+fromCharCode(128|q&63):fromCharCode(224|q>>>12&15)+fromCharCode(128|q>>>6&63)+fromCharCode(128|q&63)}else{var q=65536+(W.charCodeAt(0)-55296)*1024+(W.charCodeAt(1)-56320);return fromCharCode(240|q>>>18&7)+fromCharCode(128|q>>>12&63)+fromCharCode(128|q>>>6&63)+fromCharCode(128|q&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(W){return W.replace(re_utob,cb_utob)},cb_encode=function(W){var q=[0,2,1][W.length%3],D=W.charCodeAt(0)<<16|(W.length>1?W.charCodeAt(1):0)<<8|(W.length>2?W.charCodeAt(2):0),P=[b64chars.charAt(D>>>18),b64chars.charAt(D>>>12&63),q>=2?"=":b64chars.charAt(D>>>6&63),q>=1?"=":b64chars.charAt(D&63)];return P.join("")},btoa=global.btoa?function(W){return global.btoa(W)}:function(W){return W.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(W){var q=Object.prototype.toString.call(W)==="[object Uint8Array]";return q?W.toString("base64"):btoa(utob(String(W)))},encode=function(W,q){return q?_encode(String(W)).replace(/[+\/]/g,function(D){return D=="+"?"-":"_"}).replace(/=/g,""):_encode(W)},encodeURI=function(W){return encode(W,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(W){switch(W.length){case 4:var q=(7&W.charCodeAt(0))<<18|(63&W.charCodeAt(1))<<12|(63&W.charCodeAt(2))<<6|63&W.charCodeAt(3),D=q-65536;return fromCharCode((D>>>10)+55296)+fromCharCode((D&1023)+56320);case 3:return fromCharCode((15&W.charCodeAt(0))<<12|(63&W.charCodeAt(1))<<6|63&W.charCodeAt(2));default:return fromCharCode((31&W.charCodeAt(0))<<6|63&W.charCodeAt(1))}},btou=function(W){return W.replace(re_btou,cb_btou)},cb_decode=function(W){var q=W.length,D=q%4,P=(q>0?b64tab[W.charAt(0)]<<18:0)|(q>1?b64tab[W.charAt(1)]<<12:0)|(q>2?b64tab[W.charAt(2)]<<6:0)|(q>3?b64tab[W.charAt(3)]:0),v=[fromCharCode(P>>>16),fromCharCode(P>>>8&255),fromCharCode(P&255)];return v.length-=[0,0,2,1][D],v.join("")},_atob=global.atob?function(W){return global.atob(W)}:function(W){return W.replace(/\S{1,4}/g,cb_decode)},atob=function(W){return _atob(String(W).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(W){return(W.constructor===buffer.constructor?W:buffer.from(W,"base64")).toString()}:function(W){return(W.constructor===buffer.constructor?W:new buffer(W,"base64")).toString()}:function(W){return btou(_atob(W))},decode=function(W){return _decode(String(W).replace(/[-_]/g,function(q){return q=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var W=global.Base64;return global.Base64=_Base64,W};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(W){return{value:W,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(W){return encode(this,W)})),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(W,q,D){/*!
|
|
|
* merge-descriptors
|
|
|
* Copyright(c) 2014 Jonathan Ong
|
|
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
|
* MIT Licensed
|
|
|
*/"use strict";q.exports=v;var P=Object.prototype.hasOwnProperty;function v(C,N,g){if(!C)throw new TypeError("argument dest is required");if(!N)throw new TypeError("argument src is required");return g===void 0&&(g=!0),Object.getOwnPropertyNames(N).forEach(function(S){if(!g&&P.call(C,S))return;var _=Object.getOwnPropertyDescriptor(N,S);Object.defineProperty(C,S,_)}),C}},{}],201:[function(W,q,D){"use strict";function P(){this._types=Object.create(null),this._extensions=Object.create(null);for(var v=0;v<arguments.length;v++)this.define(arguments[v]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}P.prototype.define=function(v,C){for(var N in v){var g=v[N].map(function(_){return _.toLowerCase()});N=N.toLowerCase();for(var m=0;m<g.length;m++){var S=g[m];if(S[0]=="*")continue;if(!C&&S in this._types)throw new Error('Attempt to change mapping for "'+S+'" extension from "'+this._types[S]+'" to "'+N+'". Pass `force=true` to allow this, otherwise remove "'+S+'" from the list of extensions for "'+N+'".');this._types[S]=N}if(C||!this._extensions[N]){var S=g[0];this._extensions[N]=S[0]!="*"?S:S.substr(1)}}},P.prototype.getType=function(v){v=String(v);var C=v.replace(/^.*[/\\]/,"").toLowerCase(),N=C.replace(/^.*\./,"").toLowerCase(),g=C.length<v.length,m=N.length<C.length-1;return(m||!g)&&this._types[N]||null},P.prototype.getExtension=function(v){return v=/^\s*([^;\s]*)/.test(v)&&RegExp.$1,v&&this._extensions[v.toLowerCase()]||null},q.exports=P},{}],202:[function(W,q,D){"use strict";var P=W("./Mime");q.exports=new P(W("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(W,q,D){q.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(W,q,D){var P=1e3,v=P*60,C=v*60,N=C*24,g=N*7,m=N*365.25;q.exports=function(i,c){c=c||{};var o=typeof i;if(o==="string"&&i.length>0)return S(i);if(o==="number"&&isFinite(i))return c.long?t(i):_(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function S(i){if(i=String(i),i.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(i);if(!c)return;var o=parseFloat(c[1]),n=(c[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return o*m;case"weeks":case"week":case"w":return o*g;case"days":case"day":case"d":return o*N;case"hours":case"hour":case"hrs":case"hr":case"h":return o*C;case"minutes":case"minute":case"mins":case"min":case"m":return o*v;case"seconds":case"second":case"secs":case"sec":case"s":return o*P;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}function _(i){var c=Math.abs(i);return c>=N?Math.round(i/N)+"d":c>=C?Math.round(i/C)+"h":c>=v?Math.round(i/v)+"m":c>=P?Math.round(i/P)+"s":i+"ms"}function t(i){var c=Math.abs(i);return c>=N?d(i,c,N,"day"):c>=C?d(i,c,C,"hour"):c>=v?d(i,c,v,"minute"):c>=P?d(i,c,P,"second"):i+" ms"}function d(i,c,o,n){var s=c>=o*1.5;return Math.round(i/o)+" "+n+(s?"s":"")}},{}],205:[function(W,q,D){(function(P){function v(m,S){for(var _=0,t=m.length-1;t>=0;t--){var d=m[t];d==="."?m.splice(t,1):d===".."?(m.splice(t,1),_++):_&&(m.splice(t,1),_--)}if(S)for(;_--;_)m.unshift("..");return m}D.resolve=function(){for(var m="",S=!1,_=arguments.length-1;_>=-1&&!S;_--){var t=_>=0?arguments[_]:P.cwd();if(typeof t!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!t)continue;m=t+"/"+m,S=t.charAt(0)==="/"}return m=v(N(m.split("/"),function(d){return!!d}),!S).join("/"),(S?"/":"")+m||"."},D.normalize=function(m){var S=D.isAbsolute(m),_=g(m,-1)==="/";return m=v(N(m.split("/"),function(t){return!!t}),!S).join("/"),!m&&!S&&(m="."),m&&_&&(m+="/"),(S?"/":"")+m},D.isAbsolute=function(m){return m.charAt(0)==="/"},D.join=function(){var m=Array.prototype.slice.call(arguments,0);return D.normalize(N(m,function(S,_){if(typeof S!="string")throw new TypeError("Arguments to path.join must be strings");return S}).join("/"))},D.relative=function(m,S){m=D.resolve(m).substr(1),S=D.resolve(S).substr(1);function _(s){for(var h=0;h<s.length&&!(s[h]!=="");h++);for(var f=s.length-1;f>=0&&!(s[f]!=="");f--);return h>f?[]:s.slice(h,f-h+1)}for(var t=_(m.split("/")),d=_(S.split("/")),i=Math.min(t.length,d.length),c=i,o=0;o<i;o++)if(t[o]!==d[o]){c=o;break}for(var n=[],o=c;o<t.length;o++)n.push("..");return n=n.concat(d.slice(c)),n.join("/")},D.sep="/",D.delimiter=":",D.dirname=function(m){if(typeof m!="string"&&(m=m+""),m.length===0)return".";for(var S=m.charCodeAt(0),_=S===47,t=-1,d=!0,i=m.length-1;i>=1;--i)if(S=m.charCodeAt(i),S===47){if(!d){t=i;break}}else d=!1;return t===-1?_?"/":".":_&&t===1?"/":m.slice(0,t)};function C(m){typeof m!="string"&&(m=m+"");var S=0,_=-1,t=!0,d;for(d=m.length-1;d>=0;--d)if(m.charCodeAt(d)===47){if(!t){S=d+1;break}}else _===-1&&(t=!1,_=d+1);return _===-1?"":m.slice(S,_)}D.basename=function(m,S){var _=C(m);return S&&_.substr(-1*S.length)===S&&(_=_.substr(0,_.length-S.length)),_},D.extname=function(m){typeof m!="string"&&(m=m+"");for(var S=-1,_=0,t=-1,d=!0,i=0,c=m.length-1;c>=0;--c){var o=m.charCodeAt(c);if(o===47){if(!d){_=c+1;break}continue}t===-1&&(d=!1,t=c+1),o===46?S===-1?S=c:i!==1&&(i=1):S!==-1&&(i=-1)}return S===-1||t===-1||i===0||i===1&&S===t-1&&S===_+1?"":m.slice(S,t)};function N(m,S){if(m.filter)return m.filter(S);for(var _=[],t=0;t<m.length;t++)S(m[t],t,m)&&_.push(m[t]);return _}var g="ab".substr(-1)==="b"?function(m,S,_){return m.substr(S,_)}:function(m,S,_){return S<0&&(S=m.length+S),m.substr(S,_)}}).call(this,W("_process"))},{_process:208}],206:[function(W,q,D){(function(P){/*!
|
|
|
* Platform.js <https://mths.be/platform>
|
|
|
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
|
|
|
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
|
|
|
* Available under MIT license <https://mths.be/mit>
|
|
|
*/(function(){"use strict";var v={function:!0,object:!0},C=v[typeof window]&&window||this,N=C,g=v[typeof D]&&D,m=v[typeof q]&&q&&!q.nodeType&&q,S=g&&m&&typeof P=="object"&&P;S&&(S.global===S||S.window===S||S.self===S)&&(C=S);var _=Math.pow(2,53)-1,t=/\bOpera/,d=this,i=Object.prototype,c=i.hasOwnProperty,o=i.toString;function n(b){return b=String(b),b.charAt(0).toUpperCase()+b.slice(1)}function s(b,E,w){var T={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return E&&w&&/^Win/i.test(b)&&!/^Windows Phone /i.test(b)&&(T=T[/[\d.]+$/.exec(b)])&&(b="Windows "+T),b=String(b),E&&w&&(b=b.replace(RegExp(E,"i"),w)),b=f(b.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),b}function h(b,E){var w=-1,T=b?b.length:0;if(typeof T=="number"&&T>-1&&T<=_)for(;++w<T;)E(b[w],w,b);else l(b,E)}function f(b){return b=p(b),/^(?:webOS|i(?:OS|P))/.test(b)?b:n(b)}function l(b,E){for(var w in b)c.call(b,w)&&E(b[w],w,b)}function a(b){return b==null?n(b):o.call(b).slice(8,-1)}function r(b,E){var w=b!=null?typeof b[E]:"number";return!/^(?:boolean|number|string|undefined)$/.test(w)&&(w=="object"?!!b[E]:!0)}function x(b){return String(b).replace(/([ -])(?!$)/g,"$1?")}function y(b,E){var w=null;return h(b,function(T,F){w=E(w,T,F,b)}),w}function p(b){return String(b).replace(/^ +| +$/g,"")}function R(b){var E=C,w=b&&typeof b=="object"&&a(b)!="String";w&&(E=b,b=null);var T=E.navigator||{},F=T.userAgent||"";b||(b=F);var M=w||d==N,L=w?!!T.likeChrome:/\bChrome\b/.test(b)&&!/internal|\n/i.test(o.toString()),Y="Object",K=w?Y:"ScriptBridgingProxyObject",A=w?Y:"Environment",H=w&&E.java?"JavaPackage":a(E.java),U=w?Y:"RuntimeObject",I=/\bJava/.test(H)&&E.java,G=I&&a(E.environment)==A,ne=I?"a":"\u03B1",oe=I?"b":"\u03B2",de=E.document||{},Oe=E.operamini||E.opera,Ae=t.test(Ae=w&&Oe?Oe["[[Class]]"]:a(Oe))?Ae:Oe=null,pe,Se=b,be=[],se=null,ee=b==F,B=ee&&Oe&&typeof Oe.version=="function"&&Oe.version(),V,X=$([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Q=le(["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"]),Z=xe([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),ie=J({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}}),re=ue(["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 $(Je){return y(Je,function(rt,it){return rt||RegExp("\\b"+(it.pattern||x(it))+"\\b","i").exec(b)&&(it.label||it)})}function J(Je){return y(Je,function(rt,it,je){return rt||(it[Z]||it[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Z)]||RegExp("\\b"+x(je)+"(?:\\b|\\w*\\d)","i").exec(b))&&je})}function le(Je){return y(Je,function(rt,it){return rt||RegExp("\\b"+(it.pattern||x(it))+"\\b","i").exec(b)&&(it.label||it)})}function ue(Je){return y(Je,function(rt,it){var je=it.pattern||x(it);return!rt&&(rt=RegExp("\\b"+je+"(?:/[\\d.]+|[ \\w.]*)","i").exec(b))&&(rt=s(rt,je,it.label||it)),rt})}function xe(Je){return y(Je,function(rt,it){var je=it.pattern||x(it);return!rt&&(rt=RegExp("\\b"+je+" *\\d+[.\\w_]*","i").exec(b)||RegExp("\\b"+je+" *\\w+-[\\w]*","i").exec(b)||RegExp("\\b"+je+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(b))&&((rt=String(it.label&&!RegExp(je,"i").test(it.label)?it.label:rt).split("/"))[1]&&!/[\d.]+/.test(rt[0])&&(rt[0]+=" "+rt[1]),it=it.label||it,rt=f(rt[0].replace(RegExp(je,"i"),it).replace(RegExp("; *(?:"+it+"[_-])?","i")," ").replace(RegExp("("+it+")[-_.]?(\\w)","i"),"$1 $2"))),rt})}function Me(Je){return y(Je,function(rt,it){return rt||(RegExp(it+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(b)||0)[1]||null})}function Xe(){return this.description||""}if(X&&(X=[X]),ie&&!Z&&(Z=xe([ie])),(pe=/\bGoogle TV\b/.exec(Z))&&(Z=pe[0]),/\bSimulator\b/i.test(b)&&(Z=(Z?Z+" ":"")+"Simulator"),Q=="Opera Mini"&&/\bOPiOS\b/.test(b)&&be.push("running in Turbo/Uncompressed mode"),Q=="IE"&&/\blike iPhone OS\b/.test(b)?(pe=R(b.replace(/like iPhone OS/,"")),ie=pe.manufacturer,Z=pe.product):/^iP/.test(Z)?(Q||(Q="Safari"),re="iOS"+((pe=/ OS ([\d_]+)/i.exec(b))?" "+pe[1].replace(/_/g,"."):"")):Q=="Konqueror"&&!/buntu/i.test(re)?re="Kubuntu":ie&&ie!="Google"&&(/Chrome/.test(Q)&&!/\bMobile Safari\b/i.test(b)||/\bVita\b/.test(Z))||/\bAndroid\b/.test(re)&&/^Chrome/.test(Q)&&/\bVersion\//i.test(b)?(Q="Android Browser",re=/\bAndroid\b/.test(re)?re:"Android"):Q=="Silk"?(/\bMobi/i.test(b)||(re="Android",be.unshift("desktop mode")),/Accelerated *= *true/i.test(b)&&be.unshift("accelerated")):Q=="PaleMoon"&&(pe=/\bFirefox\/([\d.]+)\b/.exec(b))?be.push("identifying as Firefox "+pe[1]):Q=="Firefox"&&(pe=/\b(Mobile|Tablet|TV)\b/i.exec(b))?(re||(re="Firefox OS"),Z||(Z=pe[1])):!Q||(pe=!/\bMinefield\b/i.test(b)&&/\b(?:Firefox|Safari)\b/.exec(Q))?(Q&&!Z&&/[\/,]|^[^(]+?\)/.test(b.slice(b.indexOf(pe+"/")+8))&&(Q=null),(pe=Z||ie||re)&&(Z||ie||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(re))&&(Q=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(re)?re:pe)+" Browser")):Q=="Electron"&&(pe=(/\bChrome\/([\d.]+)\b/.exec(b)||0)[1])&&be.push("Chromium "+pe),B||(B=Me(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",x(Q),"(?:Firefox|Minefield|NetFront)"])),(pe=X=="iCab"&&parseFloat(B)>3&&"WebKit"||/\bOpera\b/.test(Q)&&(/\bOPR\b/.test(b)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(b)&&!/^(?:Trident|EdgeHTML)$/.test(X)&&"WebKit"||!X&&/\bMSIE\b/i.test(b)&&(re=="Mac OS"?"Tasman":"Trident")||X=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Q)&&"NetFront")&&(X=[pe]),Q=="IE"&&(pe=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(b)||0)[1])?(Q+=" Mobile",re="Windows Phone "+(/\+$/.test(pe)?pe:pe+".x"),be.unshift("desktop mode")):/\bWPDesktop\b/i.test(b)?(Q="IE Mobile",re="Windows Phone 8.x",be.unshift("desktop mode"),B||(B=(/\brv:([\d.]+)/.exec(b)||0)[1])):Q!="IE"&&X=="Trident"&&(pe=/\brv:([\d.]+)/.exec(b))&&(Q&&be.push("identifying as "+Q+(B?" "+B:"")),Q="IE",B=pe[1]),ee){if(r(E,"global"))if(I&&(pe=I.lang.System,Se=pe.getProperty("os.arch"),re=re||pe.getProperty("os.name")+" "+pe.getProperty("os.version")),G){try{B=E.require("ringo/engine").version.join("."),Q="RingoJS"}catch(Je){(pe=E.system)&&pe.global.system==E.system&&(Q="Narwhal",re||(re=pe[0].os||null))}Q||(Q="Rhino")}else typeof E.process=="object"&&!E.process.browser&&(pe=E.process)&&(typeof pe.versions=="object"&&(typeof pe.versions.electron=="string"?(be.push("Node "+pe.versions.node),Q="Electron",B=pe.versions.electron):typeof pe.versions.nw=="string"&&(be.push("Chromium "+B,"Node "+pe.versions.node),Q="NW.js",B=pe.versions.nw)),Q||(Q="Node.js",Se=pe.arch,re=pe.platform,B=/[\d.]+/.exec(pe.version),B=B?B[0]:null));else a(pe=E.runtime)==K?(Q="Adobe AIR",re=pe.flash.system.Capabilities.os):a(pe=E.phantom)==U?(Q="PhantomJS",B=(pe=pe.version||null)&&pe.major+"."+pe.minor+"."+pe.patch):typeof de.documentMode=="number"&&(pe=/\bTrident\/(\d+)/i.exec(b))?(B=[B,de.documentMode],(pe=+pe[1]+4)!=B[1]&&(be.push("IE "+B[1]+" mode"),X&&(X[1]=""),B[1]=pe),B=Q=="IE"?String(B[1].toFixed(1)):B[0]):typeof de.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Q)&&(be.push("masking as "+Q+" "+B),Q="IE",B="11.0",X=["Trident"],re="Windows");re=re&&f(re)}if(B&&(pe=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(B)||/(?:alpha|beta)(?: ?\d)?/i.exec(b+";"+(ee&&T.appMinorVersion))||/\bMinefield\b/i.test(b)&&"a")&&(se=/b/i.test(pe)?"beta":"alpha",B=B.replace(RegExp(pe+"\\+?$"),"")+(se=="beta"?oe:ne)+(/\d+\+?/.exec(pe)||"")),Q=="Fennec"||Q=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(re))Q="Firefox Mobile";else if(Q=="Maxthon"&&B)B=B.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Z))Z=="Xbox 360"&&(re=null),Z=="Xbox 360"&&/\bIEMobile\b/.test(b)&&be.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Q)||Q&&!Z&&!/Browser|Mobi/.test(Q))&&(re=="Windows CE"||/Mobi/i.test(b)))Q+=" Mobile";else if(Q=="IE"&&ee)try{E.external===null&&be.unshift("platform preview")}catch(Je){be.unshift("embedded")}else(/\bBlackBerry\b/.test(Z)||/\bBB10\b/.test(b))&&(pe=(RegExp(Z.replace(/ +/g," *")+"/([.\\d]+)","i").exec(b)||0)[1]||B)?(pe=[pe,/BB10/.test(b)],re=(pe[1]?(Z=null,ie="BlackBerry"):"Device Software")+" "+pe[0],B=null):this!=l&&Z!="Wii"&&(ee&&Oe||/Opera/.test(Q)&&/\b(?:MSIE|Firefox)\b/i.test(b)||Q=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(re)||Q=="IE"&&(re&&!/^Win/.test(re)&&B>5.5||/\bWindows XP\b/.test(re)&&B>8||B==8&&!/\bTrident\b/.test(b)))&&!t.test(pe=R.call(l,b.replace(t,"")+";"))&&pe.name&&(pe="ing as "+pe.name+((pe=pe.version)?" "+pe:""),t.test(Q)?(/\bIE\b/.test(pe)&&re=="Mac OS"&&(re=null),pe="identify"+pe):(pe="mask"+pe,Ae?Q=f(Ae.replace(/([a-z])([A-Z])/g,"$1 $2")):Q="Opera",/\bIE\b/.test(pe)&&(re=null),ee||(B=null)),X=["Presto"],be.push(pe));(pe=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(b)||0)[1])&&(pe=[parseFloat(pe.replace(/\.(\d)$/,".0$1")),pe],Q=="Safari"&&pe[1].slice(-1)=="+"?(Q="WebKit Nightly",se="alpha",B=pe[1].slice(0,-1)):(B==pe[1]||B==(pe[2]=(/\bSafari\/([\d.]+\+?)/i.exec(b)||0)[1]))&&(B=null),pe[1]=(/\bChrome\/([\d.]+)/i.exec(b)||0)[1],pe[0]==537.36&&pe[2]==537.36&&parseFloat(pe[1])>=28&&X=="WebKit"&&(X=["Blink"]),!ee||!L&&!pe[1]?(X&&(X[1]="like Safari"),pe=(pe=pe[0],pe<400?1:pe<500?2:pe<526?3:pe<533?4:pe<534?"4+":pe<535?5:pe<537?6:pe<538?7:pe<601?8:"8")):(X&&(X[1]="like Chrome"),pe=pe[1]||(pe=pe[0],pe<530?1:pe<532?2:pe<532.05?3:pe<533?4:pe<534.03?5:pe<534.07?6:pe<534.1?7:pe<534.13?8:pe<534.16?9:pe<534.24?10:pe<534.3?11:pe<535.01?12:pe<535.02?"13+":pe<535.07?15:pe<535.11?16:pe<535.19?17:pe<536.05?18:pe<536.1?19:pe<537.01?20:pe<537.11?"21+":pe<537.13?23:pe<537.18?24:pe<537.24?25:pe<537.36?26:X!="Blink"?"27":"28")),X&&(X[1]+=" "+(pe+=typeof pe=="number"?".x":/[.+]/.test(pe)?"":"+")),Q=="Safari"&&(!B||parseInt(B)>45)&&(B=pe)),Q=="Opera"&&(pe=/\bzbov|zvav$/.exec(re))?(Q+=" ",be.unshift("desktop mode"),pe=="zvav"?(Q+="Mini",B=null):Q+="Mobile",re=re.replace(RegExp(" *"+pe+"$"),"")):Q=="Safari"&&/\bChrome\b/.exec(X&&X[1])&&(be.unshift("desktop mode"),Q="Chrome Mobile",B=null,/\bOS X\b/.test(re)?(ie="Apple",re="iOS 4.3+"):re=null),B&&B.indexOf(pe=/[\d.]+$/.exec(re))==0&&b.indexOf("/"+pe+"-")>-1&&(re=p(re.replace(pe,""))),X&&!/\b(?:Avant|Nook)\b/.test(Q)&&(/Browser|Lunascape|Maxthon/.test(Q)||Q!="Safari"&&/^iOS/.test(re)&&/\bSafari\b/.test(X[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Q)&&X[1])&&((pe=X[X.length-1])&&be.push(pe)),be.length&&(be=["("+be.join("; ")+")"]),ie&&Z&&Z.indexOf(ie)<0&&be.push("on "+ie),Z&&be.push((/^on /.test(be[be.length-1])?"":"on ")+Z),re&&(pe=/ ([\d.+]+)$/.exec(re),V=pe&&re.charAt(re.length-pe[0].length-1)=="/",re={architecture:32,family:pe&&!V?re.replace(pe[0],""):re,version:pe?pe[1]:null,toString:function(){var Je=this.version;return this.family+(Je&&!V?" "+Je:"")+(this.architecture==64?" 64-bit":"")}}),(pe=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Se))&&!/\bi686\b/i.test(Se)?(re&&(re.architecture=64,re.family=re.family.replace(RegExp(" *"+pe),"")),Q&&(/\bWOW64\b/i.test(b)||ee&&/\w(?:86|32)$/.test(T.cpuClass||T.platform)&&!/\bWin64; x64\b/i.test(b))&&be.unshift("32-bit")):re&&/^OS X/.test(re.family)&&Q=="Chrome"&&parseFloat(B)>=39&&(re.architecture=64),b||(b=null);var $e={};return $e.description=b,$e.layout=X&&X[0],$e.manufacturer=ie,$e.name=Q,$e.prerelease=se,$e.product=Z,$e.ua=b,$e.version=Q&&B,$e.os=re||{architecture:null,family:null,version:null,toString:function(){return"null"}},$e.parse=R,$e.toString=Xe,$e.version&&be.unshift(B),$e.name&&be.unshift(Q),re&&Q&&!(re==String(re).split(" ")[0]&&(re==Q.split(" ")[0]||Z))&&be.push(Z?"("+re+")":"on "+re),be.length&&($e.description=be.join(" ")),$e}var O=R();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(C.platform=O,define(function(){return O})):g&&m?l(O,function(b,E){g[E]=b}):C.platform=O}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(W,q,D){(function(P){"use strict";typeof P=="undefined"||!P.version||P.version.indexOf("v0.")===0||P.version.indexOf("v1.")===0&&P.version.indexOf("v1.8.")!==0?q.exports={nextTick:v}:q.exports=P;function v(C,N,g,m){if(typeof C!="function")throw new TypeError('"callback" argument must be a function');var S=arguments.length,_,t;switch(S){case 0:case 1:return P.nextTick(C);case 2:return P.nextTick(function(){C.call(null,N)});case 3:return P.nextTick(function(){C.call(null,N,g)});case 4:return P.nextTick(function(){C.call(null,N,g,m)});default:for(_=new Array(S-1),t=0;t<_.length;)_[t++]=arguments[t];return P.nextTick(function(){C.apply(null,_)})}}}).call(this,W("_process"))},{_process:208}],208:[function(W,q,D){var P=q.exports={},v,C;function N(){throw new Error("setTimeout has not been defined")}function g(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?v=setTimeout:v=N}catch(h){v=N}try{typeof clearTimeout=="function"?C=clearTimeout:C=g}catch(h){C=g}})();function m(h){if(v===setTimeout)return setTimeout(h,0);if((v===N||!v)&&setTimeout)return v=setTimeout,setTimeout(h,0);try{return v(h,0)}catch(f){try{return v.call(null,h,0)}catch(l){return v.call(this,h,0)}}}function S(h){if(C===clearTimeout)return clearTimeout(h);if((C===g||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(h);try{return C(h)}catch(f){try{return C.call(null,h)}catch(l){return C.call(this,h)}}}var _=[],t=!1,d,i=-1;function c(){if(!t||!d)return;t=!1,d.length?_=d.concat(_):i=-1,_.length&&o()}function o(){if(t)return;var h=m(c);t=!0;for(var f=_.length;f;){for(d=_,_=[];++i<f;)d&&d[i].run();i=-1,f=_.length}d=null,t=!1,S(h)}P.nextTick=function(h){var f=new Array(arguments.length-1);if(arguments.length>1)for(var l=1;l<arguments.length;l++)f[l-1]=arguments[l];_.push(new n(h,f)),_.length===1&&!t&&m(o)};function n(h,f){this.fun=h,this.array=f}n.prototype.run=function(){this.fun.apply(null,this.array)},P.title="browser",P.browser=!0,P.env={},P.argv=[],P.version="",P.versions={};function s(){}P.on=s,P.addListener=s,P.once=s,P.off=s,P.removeListener=s,P.removeAllListeners=s,P.emit=s,P.prependListener=s,P.prependOnceListener=s,P.listeners=function(h){return[]},P.binding=function(h){throw new Error("process.binding is not supported")},P.cwd=function(){return"/"},P.chdir=function(h){throw new Error("process.chdir is not supported")},P.umask=function(){return 0}},{}],209:[function(W,q,D){(function(P){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(v){var C=typeof D=="object"&&D&&!D.nodeType&&D,N=typeof q=="object"&&q&&!q.nodeType&&q,g=typeof P=="object"&&P;(g.global===g||g.window===g||g.self===g)&&(v=g);var m,S=2147483647,_=36,t=1,d=26,i=38,c=700,o=72,n=128,s="-",h=/^xn--/,f=/[^\x20-\x7E]/,l=/[\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"},r=_-t,x=Math.floor,y=String.fromCharCode,p;function R(H){throw new RangeError(a[H])}function O(H,U){for(var I=H.length,G=[];I--;)G[I]=U(H[I]);return G}function b(H,U){var I=H.split("@"),G="";I.length>1&&(G=I[0]+"@",H=I[1]),H=H.replace(l,".");var ne=H.split("."),oe=O(ne,U).join(".");return G+oe}function E(H){for(var U=[],I=0,G=H.length,ne,oe;I<G;)ne=H.charCodeAt(I++),ne>=55296&&ne<=56319&&I<G?(oe=H.charCodeAt(I++),(oe&64512)==56320?U.push(((ne&1023)<<10)+(oe&1023)+65536):(U.push(ne),I--)):U.push(ne);return U}function w(H){return O(H,function(U){var I="";return U>65535&&(U-=65536,I+=y(U>>>10&1023|55296),U=56320|U&1023),I+=y(U),I}).join("")}function T(H){return H-48<10?H-22:H-65<26?H-65:H-97<26?H-97:_}function F(H,U){return H+22+75*(H<26)-((U!=0)<<5)}function M(H,U,I){var G=0;for(H=I?x(H/c):H>>1,H+=x(H/U);H>r*d>>1;G+=_)H=x(H/r);return x(G+(r+1)*H/(H+i))}function L(H){var U=[],I=H.length,G,ne=0,oe=n,de=o,Oe,Ae,pe,Se,be,se,ee,B,V;for(Oe=H.lastIndexOf(s),Oe<0&&(Oe=0),Ae=0;Ae<Oe;++Ae)H.charCodeAt(Ae)>=128&&R("not-basic"),U.push(H.charCodeAt(Ae));for(pe=Oe>0?Oe+1:0;pe<I;){for(Se=ne,be=1,se=_;!(pe>=I&&R("invalid-input"),ee=T(H.charCodeAt(pe++)),(ee>=_||ee>x((S-ne)/be))&&R("overflow"),ne+=ee*be,B=se<=de?t:se>=de+d?d:se-de,ee<B);se+=_)V=_-B,be>x(S/V)&&R("overflow"),be*=V;G=U.length+1,de=M(ne-Se,G,Se==0),x(ne/G)>S-oe&&R("overflow"),oe+=x(ne/G),ne%=G,U.splice(ne++,0,oe)}return w(U)}function Y(H){var U,I,G,ne,oe,de,Oe,Ae,pe,Se,be,se=[],ee,B,V,X;for(H=E(H),ee=H.length,U=n,I=0,oe=o,de=0;de<ee;++de)be=H[de],be<128&&se.push(y(be));for(G=ne=se.length,ne&&se.push(s);G<ee;){for(Oe=S,de=0;de<ee;++de)be=H[de],be>=U&&be<Oe&&(Oe=be);for(B=G+1,Oe-U>x((S-I)/B)&&R("overflow"),I+=(Oe-U)*B,U=Oe,de=0;de<ee;++de)if(be=H[de],be<U&&++I>S&&R("overflow"),be==U){for(Ae=I,pe=_;!(Se=pe<=oe?t:pe>=oe+d?d:pe-oe,Ae<Se);pe+=_)X=Ae-Se,V=_-Se,se.push(y(F(Se+X%V,0))),Ae=x(X/V);se.push(y(F(Ae,0))),oe=M(I,B,G==ne),I=0,++G}++I,++U}return se.join("")}function K(H){return b(H,function(U){return h.test(U)?L(U.slice(4).toLowerCase()):U})}function A(H){return b(H,function(U){return f.test(U)?"xn--"+Y(U):U})}if(m={version:"1.4.1",ucs2:{decode:E,encode:w},decode:L,encode:Y,toASCII:A,toUnicode:K},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return m});else if(C&&N)if(q.exports==C)N.exports=m;else for(p in m)m.hasOwnProperty(p)&&(C[p]=m[p]);else v.punycode=m})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(W,q,D){"use strict";function P(C,N){return Object.prototype.hasOwnProperty.call(C,N)}q.exports=function(C,N,g,m){N=N||"&",g=g||"=";var S={};if(typeof C!="string"||C.length===0)return S;var _=/\+/g;C=C.split(N);var t=1e3;m&&typeof m.maxKeys=="number"&&(t=m.maxKeys);var d=C.length;t>0&&d>t&&(d=t);for(var i=0;i<d;++i){var c=C[i].replace(_,"%20"),o=c.indexOf(g),n,s,h,f;o>=0?(n=c.substr(0,o),s=c.substr(o+1)):(n=c,s=""),h=decodeURIComponent(n),f=decodeURIComponent(s),P(S,h)?v(S[h])?S[h].push(f):S[h]=[S[h],f]:S[h]=f}return S};var v=Array.isArray||function(C){return Object.prototype.toString.call(C)==="[object Array]"}},{}],211:[function(W,q,D){"use strict";var P=function(g){switch(typeof g){case"string":return g;case"boolean":return g?"true":"false";case"number":return isFinite(g)?g:"";default:return""}};q.exports=function(g,m,S,_){return m=m||"&",S=S||"=",g===null&&(g=void 0),typeof g=="object"?C(N(g),function(t){var d=encodeURIComponent(P(t))+S;return v(g[t])?C(g[t],function(i){return d+encodeURIComponent(P(i))}).join(m):d+encodeURIComponent(P(g[t]))}).join(m):_?encodeURIComponent(P(_))+S+encodeURIComponent(P(g)):""};var v=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"};function C(g,m){if(g.map)return g.map(m);for(var S=[],_=0;_<g.length;_++)S.push(m(g[_],_));return S}var N=Object.keys||function(g){var m=[];for(var S in g)Object.prototype.hasOwnProperty.call(g,S)&&m.push(S);return m}},{}],212:[function(W,q,D){"use strict";D.decode=D.parse=W("./decode"),D.encode=D.stringify=W("./encode")},{"./decode":210,"./encode":211}],213:[function(W,q,D){q.exports=W("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/create"),v=g(P),C=W("babel-runtime/core-js/object/keys"),N=g(C);function g(f){return f&&f.__esModule?f:{default:f}}var m=W("process-nextick-args"),S=N.default||function(f){var l=[];for(var a in f)l.push(a);return l};q.exports=n;var _=(0,v.default)(W("core-util-is"));_.inherits=W("inherits");var t=W("./_stream_readable"),d=W("./_stream_writable");_.inherits(n,t);for(var i=S(d.prototype),c=0;c<i.length;c++){var o=i[c];n.prototype[o]||(n.prototype[o]=d.prototype[o])}function n(f){if(!(this instanceof n))return new n(f);t.call(this,f),d.call(this,f),f&&f.readable===!1&&(this.readable=!1),f&&f.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,f&&f.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",s)}Object.defineProperty(n.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function s(){if(this.allowHalfOpen||this._writableState.ended)return;m.nextTick(h,this)}function h(f){f.end()}Object.defineProperty(n.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(l){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=l,this._writableState.destroyed=l}}),n.prototype._destroy=function(f,l){this.push(null),this.end(),m.nextTick(l,f)}},{"./_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(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/create"),v=C(P);function C(S){return S&&S.__esModule?S:{default:S}}q.exports=m;var N=W("./_stream_transform"),g=(0,v.default)(W("core-util-is"));g.inherits=W("inherits"),g.inherits(m,N);function m(S){if(!(this instanceof m))return new m(S);N.call(this,S)}m.prototype._transform=function(S,_,t){t(null,S)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(W,q,D){(function(P,v){"use strict";var C=W("babel-runtime/core-js/object/get-prototype-of"),N=S(C),g=W("babel-runtime/core-js/object/create"),m=S(g);function S(X){return X&&X.__esModule?X:{default:X}}var _=W("process-nextick-args");q.exports=E;var t=W("isarray"),d;E.ReadableState=b;var i=W("events").EventEmitter,c=function(Q,Z){return Q.listeners(Z).length},o=W("./internal/streams/stream"),n=W("safe-buffer").Buffer,s=v.Uint8Array||function(){};function h(X){return n.from(X)}function f(X){return n.isBuffer(X)||X instanceof s}var l=(0,m.default)(W("core-util-is"));l.inherits=W("inherits");var a=W("util"),r=void 0;a&&a.debuglog?r=a.debuglog("stream"):r=function(){};var x=W("./internal/streams/BufferList"),y=W("./internal/streams/destroy"),p;l.inherits(E,o);var R=["error","close","destroy","pause","resume"];function O(X,Q,Z){if(typeof X.prependListener=="function")return X.prependListener(Q,Z);!X._events||!X._events[Q]?X.on(Q,Z):t(X._events[Q])?X._events[Q].unshift(Z):X._events[Q]=[Z,X._events[Q]]}function b(X,Q){d=d||W("./_stream_duplex"),X=X||{};var Z=Q instanceof d;this.objectMode=!!X.objectMode,Z&&(this.objectMode=this.objectMode||!!X.readableObjectMode);var ie=X.highWaterMark,re=X.readableHighWaterMark,$=this.objectMode?16:16*1024;ie||ie===0?this.highWaterMark=ie:Z&&(re||re===0)?this.highWaterMark=re:this.highWaterMark=$,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new x,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=X.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,X.encoding&&(p||(p=W("string_decoder/").StringDecoder),this.decoder=new p(X.encoding),this.encoding=X.encoding)}function E(X){if(d=d||W("./_stream_duplex"),!(this instanceof E))return new E(X);this._readableState=new b(X,this),this.readable=!0,X&&(typeof X.read=="function"&&(this._read=X.read),typeof X.destroy=="function"&&(this._destroy=X.destroy)),o.call(this)}Object.defineProperty(E.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Q){if(!this._readableState)return;this._readableState.destroyed=Q}}),E.prototype.destroy=y.destroy,E.prototype._undestroy=y.undestroy,E.prototype._destroy=function(X,Q){this.push(null),Q(X)},E.prototype.push=function(X,Q){var Z=this._readableState,ie;return Z.objectMode?ie=!0:typeof X=="string"&&(Q=Q||Z.defaultEncoding,Q!==Z.encoding&&(X=n.from(X,Q),Q=""),ie=!0),w(this,X,Q,!1,ie)},E.prototype.unshift=function(X){return w(this,X,null,!0,!1)};function w(X,Q,Z,ie,re){var $=X._readableState;if(Q===null)$.reading=!1,A(X,$);else{var J;re||(J=F($,Q)),J?X.emit("error",J):$.objectMode||Q&&Q.length>0?(typeof Q!="string"&&!$.objectMode&&(0,N.default)(Q)!==n.prototype&&(Q=h(Q)),ie?$.endEmitted?X.emit("error",new Error("stream.unshift() after end event")):T(X,$,Q,!0):$.ended?X.emit("error",new Error("stream.push() after EOF")):($.reading=!1,$.decoder&&!Z?(Q=$.decoder.write(Q),$.objectMode||Q.length!==0?T(X,$,Q,!1):I(X,$)):T(X,$,Q,!1))):ie||($.reading=!1)}return M($)}function T(X,Q,Z,ie){Q.flowing&&Q.length===0&&!Q.sync?(X.emit("data",Z),X.read(0)):(Q.length+=Q.objectMode?1:Z.length,ie?Q.buffer.unshift(Z):Q.buffer.push(Z),Q.needReadable&&H(X)),I(X,Q)}function F(X,Q){var Z;return!f(Q)&&typeof Q!="string"&&Q!==void 0&&!X.objectMode&&(Z=new TypeError("Invalid non-string/buffer chunk")),Z}function M(X){return!X.ended&&(X.needReadable||X.length<X.highWaterMark||X.length===0)}E.prototype.isPaused=function(){return this._readableState.flowing===!1},E.prototype.setEncoding=function(X){return p||(p=W("string_decoder/").StringDecoder),this._readableState.decoder=new p(X),this._readableState.encoding=X,this};var L=8388608;function Y(X){return X>=L?X=L:(X--,X|=X>>>1,X|=X>>>2,X|=X>>>4,X|=X>>>8,X|=X>>>16,X++),X}function K(X,Q){return X<=0||Q.length===0&&Q.ended?0:Q.objectMode?1:X!==X?Q.flowing&&Q.length?Q.buffer.head.data.length:Q.length:(X>Q.highWaterMark&&(Q.highWaterMark=Y(X)),X<=Q.length?X:Q.ended?Q.length:(Q.needReadable=!0,0))}E.prototype.read=function(X){r("read",X),X=parseInt(X,10);var Q=this._readableState,Z=X;if(X!==0&&(Q.emittedReadable=!1),X===0&&Q.needReadable&&(Q.length>=Q.highWaterMark||Q.ended))return r("read: emitReadable",Q.length,Q.ended),Q.length===0&&Q.ended?ee(this):H(this),null;if(X=K(X,Q),X===0&&Q.ended)return Q.length===0&&ee(this),null;var ie=Q.needReadable;r("need readable",ie),(Q.length===0||Q.length-X<Q.highWaterMark)&&(ie=!0,r("length less than watermark",ie)),Q.ended||Q.reading?(ie=!1,r("reading or ended",ie)):ie&&(r("do read"),Q.reading=!0,Q.sync=!0,Q.length===0&&(Q.needReadable=!0),this._read(Q.highWaterMark),Q.sync=!1,Q.reading||(X=K(Z,Q)));var re;return X>0?re=pe(X,Q):re=null,re===null?(Q.needReadable=!0,X=0):Q.length-=X,Q.length===0&&(Q.ended||(Q.needReadable=!0),Z!==X&&Q.ended&&ee(this)),re!==null&&this.emit("data",re),re};function A(X,Q){if(Q.ended)return;if(Q.decoder){var Z=Q.decoder.end();Z&&Z.length&&(Q.buffer.push(Z),Q.length+=Q.objectMode?1:Z.length)}Q.ended=!0,H(X)}function H(X){var Q=X._readableState;Q.needReadable=!1,Q.emittedReadable||(r("emitReadable",Q.flowing),Q.emittedReadable=!0,Q.sync?_.nextTick(U,X):U(X))}function U(X){r("emit readable"),X.emit("readable"),Ae(X)}function I(X,Q){Q.readingMore||(Q.readingMore=!0,_.nextTick(G,X,Q))}function G(X,Q){for(var Z=Q.length;!Q.reading&&!Q.flowing&&!Q.ended&&Q.length<Q.highWaterMark&&!(r("maybeReadMore read 0"),X.read(0),Z===Q.length);)Z=Q.length;Q.readingMore=!1}E.prototype._read=function(X){this.emit("error",new Error("_read() is not implemented"))},E.prototype.pipe=function(X,Q){var Z=this,ie=this._readableState;switch(ie.pipesCount){case 0:ie.pipes=X;break;case 1:ie.pipes=[ie.pipes,X];break;default:ie.pipes.push(X);break}ie.pipesCount+=1,r("pipe count=%d opts=%j",ie.pipesCount,Q);var re=(!Q||Q.end!==!1)&&X!==P.stdout&&X!==P.stderr,$=re?le:je;ie.endEmitted?_.nextTick($):Z.once("end",$),X.on("unpipe",J);function J(Ie,qe){r("onunpipe"),Ie===Z&&(qe&&qe.hasUnpiped===!1&&(qe.hasUnpiped=!0,Me()))}function le(){r("onend"),X.end()}var ue=ne(Z);X.on("drain",ue);var xe=!1;function Me(){r("cleanup"),X.removeListener("close",rt),X.removeListener("finish",it),X.removeListener("drain",ue),X.removeListener("error",Je),X.removeListener("unpipe",J),Z.removeListener("end",le),Z.removeListener("end",je),Z.removeListener("data",$e),xe=!0,ie.awaitDrain&&(!X._writableState||X._writableState.needDrain)&&ue()}var Xe=!1;Z.on("data",$e);function $e(Ie){r("ondata"),Xe=!1;var qe=X.write(Ie);qe===!1&&!Xe&&((ie.pipesCount===1&&ie.pipes===X||ie.pipesCount>1&&V(ie.pipes,X)!==-1)&&!xe&&(r("false write response, pause",Z._readableState.awaitDrain),Z._readableState.awaitDrain++,Xe=!0),Z.pause())}function Je(Ie){r("onerror",Ie),je(),X.removeListener("error",Je),c(X,"error")===0&&X.emit("error",Ie)}O(X,"error",Je);function rt(){X.removeListener("finish",it),je()}X.once("close",rt);function it(){r("onfinish"),X.removeListener("close",rt),je()}X.once("finish",it);function je(){r("unpipe"),Z.unpipe(X)}return X.emit("pipe",Z),ie.flowing||(r("pipe resume"),Z.resume()),X};function ne(X){return function(){var Q=X._readableState;r("pipeOnDrain",Q.awaitDrain),Q.awaitDrain&&Q.awaitDrain--,Q.awaitDrain===0&&c(X,"data")&&(Q.flowing=!0,Ae(X))}}E.prototype.unpipe=function(X){var Q=this._readableState,Z={hasUnpiped:!1};if(Q.pipesCount===0)return this;if(Q.pipesCount===1)return X&&X!==Q.pipes?this:(X||(X=Q.pipes),Q.pipes=null,Q.pipesCount=0,Q.flowing=!1,X&&X.emit("unpipe",this,Z),this);if(!X){var ie=Q.pipes,re=Q.pipesCount;Q.pipes=null,Q.pipesCount=0,Q.flowing=!1;for(var $=0;$<re;$++)ie[$].emit("unpipe",this,Z);return this}var J=V(Q.pipes,X);return J===-1?this:(Q.pipes.splice(J,1),Q.pipesCount-=1,Q.pipesCount===1&&(Q.pipes=Q.pipes[0]),X.emit("unpipe",this,Z),this)},E.prototype.on=function(X,Q){var Z=o.prototype.on.call(this,X,Q);if(X==="data")this._readableState.flowing!==!1&&this.resume();else if(X==="readable"){var ie=this._readableState;!ie.endEmitted&&!ie.readableListening&&(ie.readableListening=ie.needReadable=!0,ie.emittedReadable=!1,ie.reading?ie.length&&H(this):_.nextTick(oe,this))}return Z},E.prototype.addListener=E.prototype.on;function oe(X){r("readable nexttick read 0"),X.read(0)}E.prototype.resume=function(){var X=this._readableState;return X.flowing||(r("resume"),X.flowing=!0,de(this,X)),this};function de(X,Q){Q.resumeScheduled||(Q.resumeScheduled=!0,_.nextTick(Oe,X,Q))}function Oe(X,Q){Q.reading||(r("resume read 0"),X.read(0)),Q.resumeScheduled=!1,Q.awaitDrain=0,X.emit("resume"),Ae(X),Q.flowing&&!Q.reading&&X.read(0)}E.prototype.pause=function(){return r("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(r("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Ae(X){var Q=X._readableState;for(r("flow",Q.flowing);Q.flowing&&X.read()!==null;);}E.prototype.wrap=function(X){var Q=this,Z=this._readableState,ie=!1;X.on("end",function(){if(r("wrapped end"),Z.decoder&&!Z.ended){var J=Z.decoder.end();J&&J.length&&Q.push(J)}Q.push(null)}),X.on("data",function(J){if(r("wrapped data"),Z.decoder&&(J=Z.decoder.write(J)),Z.objectMode&&J==null)return;if(!Z.objectMode&&(!J||!J.length))return;var le=Q.push(J);le||(ie=!0,X.pause())});for(var re in X)this[re]===void 0&&typeof X[re]=="function"&&(this[re]=function(J){return function(){return X[J].apply(X,arguments)}}(re));for(var $=0;$<R.length;$++)X.on(R[$],this.emit.bind(this,R[$]));return this._read=function(J){r("wrapped _read",J),ie&&(ie=!1,X.resume())},this},Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),E._fromList=pe;function pe(X,Q){if(Q.length===0)return null;var Z;return Q.objectMode?Z=Q.buffer.shift():!X||X>=Q.length?(Q.decoder?Z=Q.buffer.join(""):Q.buffer.length===1?Z=Q.buffer.head.data:Z=Q.buffer.concat(Q.length),Q.buffer.clear()):Z=Se(X,Q.buffer,Q.decoder),Z}function Se(X,Q,Z){var ie;return X<Q.head.data.length?(ie=Q.head.data.slice(0,X),Q.head.data=Q.head.data.slice(X)):X===Q.head.data.length?ie=Q.shift():ie=Z?be(X,Q):se(X,Q),ie}function be(X,Q){var Z=Q.head,ie=1,re=Z.data;for(X-=re.length;Z=Z.next;){var $=Z.data,J=X>$.length?$.length:X;if(J===$.length?re+=$:re+=$.slice(0,X),X-=J,X===0){J===$.length?(++ie,Z.next?Q.head=Z.next:Q.head=Q.tail=null):(Q.head=Z,Z.data=$.slice(J));break}++ie}return Q.length-=ie,re}function se(X,Q){var Z=n.allocUnsafe(X),ie=Q.head,re=1;for(ie.data.copy(Z),X-=ie.data.length;ie=ie.next;){var $=ie.data,J=X>$.length?$.length:X;if($.copy(Z,Z.length-X,0,J),X-=J,X===0){J===$.length?(++re,ie.next?Q.head=ie.next:Q.head=Q.tail=null):(Q.head=ie,ie.data=$.slice(J));break}++re}return Q.length-=re,Z}function ee(X){var Q=X._readableState;if(Q.length>0)throw new Error('"endReadable()" called on non-empty stream');Q.endEmitted||(Q.ended=!0,_.nextTick(B,Q,X))}function B(X,Q){!X.endEmitted&&X.length===0&&(X.endEmitted=!0,Q.readable=!1,Q.emit("end"))}function V(X,Q){for(var Z=0,ie=X.length;Z<ie;Z++)if(X[Z]===Q)return Z;return-1}}).call(this,W("_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(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/create"),v=C(P);function C(d){return d&&d.__esModule?d:{default:d}}q.exports=S;var N=W("./_stream_duplex"),g=(0,v.default)(W("core-util-is"));g.inherits=W("inherits"),g.inherits(S,N);function m(d,i){var c=this._transformState;c.transforming=!1;var o=c.writecb;if(!o)return this.emit("error",new Error("write callback called multiple times"));c.writechunk=null,c.writecb=null,i!=null&&this.push(i),o(d);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function S(d){if(!(this instanceof S))return new S(d);N.call(this,d),this._transformState={afterTransform:m.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",_)}function _(){var d=this;typeof this._flush=="function"?this._flush(function(i,c){t(d,i,c)}):t(this,null,null)}S.prototype.push=function(d,i){return this._transformState.needTransform=!1,N.prototype.push.call(this,d,i)},S.prototype._transform=function(d,i,c){throw new Error("_transform() is not implemented")},S.prototype._write=function(d,i,c){var o=this._transformState;if(o.writecb=c,o.writechunk=d,o.writeencoding=i,!o.transforming){var n=this._readableState;(o.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},S.prototype._read=function(d){var i=this._transformState;i.writechunk!==null&&i.writecb&&!i.transforming?(i.transforming=!0,this._transform(i.writechunk,i.writeencoding,i.afterTransform)):i.needTransform=!0},S.prototype._destroy=function(d,i){var c=this;N.prototype._destroy.call(this,d,function(o){i(o),c.emit("close")})};function t(d,i,c){if(i)return d.emit("error",i);if(c!=null&&d.push(c),d._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(d._transformState.transforming)throw new Error("Calling transform done when still transforming");return d.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(W,q,D){(function(P,v){"use strict";var C=W("babel-runtime/core-js/object/define-property"),N=o(C),g=W("babel-runtime/core-js/symbol/has-instance"),m=o(g),S=W("babel-runtime/core-js/symbol"),_=o(S),t=W("babel-runtime/core-js/object/create"),d=o(t),i=W("babel-runtime/core-js/set-immediate"),c=o(i);function o(se){return se&&se.__esModule?se:{default:se}}var n=W("process-nextick-args");q.exports=F;function s(se,ee,B){this.chunk=se,this.encoding=ee,this.callback=B,this.next=null}function h(se){var ee=this;this.next=null,this.entry=null,this.finish=function(){be(ee,se)}}var f=!P.browser&&["v0.10","v0.9."].indexOf(P.version.slice(0,5))>-1?c.default:n.nextTick,l;F.WritableState=w;var a=(0,d.default)(W("core-util-is"));a.inherits=W("inherits");var r={deprecate:W("util-deprecate")},x=W("./internal/streams/stream"),y=W("safe-buffer").Buffer,p=v.Uint8Array||function(){};function R(se){return y.from(se)}function O(se){return y.isBuffer(se)||se instanceof p}var b=W("./internal/streams/destroy");a.inherits(F,x);function E(){}function w(se,ee){l=l||W("./_stream_duplex"),se=se||{};var B=ee instanceof l;this.objectMode=!!se.objectMode,B&&(this.objectMode=this.objectMode||!!se.writableObjectMode);var V=se.highWaterMark,X=se.writableHighWaterMark,Q=this.objectMode?16:16*1024;V||V===0?this.highWaterMark=V:B&&(X||X===0)?this.highWaterMark=X:this.highWaterMark=Q,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Z=se.decodeStrings===!1;this.decodeStrings=!Z,this.defaultEncoding=se.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ie){I(ee,ie)},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 h(this)}w.prototype.getBuffer=function(){for(var ee=this.bufferedRequest,B=[];ee;)B.push(ee),ee=ee.next;return B},function(){try{Object.defineProperty(w.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(se){}}();var T;typeof _.default=="function"&&m.default&&typeof Function.prototype[m.default]=="function"?(T=Function.prototype[m.default],(0,N.default)(F,m.default,{value:function(ee){return T.call(this,ee)?!0:this!==F?!1:ee&&ee._writableState instanceof w}})):T=function(ee){return ee instanceof this};function F(se){if(l=l||W("./_stream_duplex"),!T.call(F,this)&&!(this instanceof l))return new F(se);this._writableState=new w(se,this),this.writable=!0,se&&(typeof se.write=="function"&&(this._write=se.write),typeof se.writev=="function"&&(this._writev=se.writev),typeof se.destroy=="function"&&(this._destroy=se.destroy),typeof se.final=="function"&&(this._final=se.final)),x.call(this)}F.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function M(se,ee){var B=new Error("write after end");se.emit("error",B),n.nextTick(ee,B)}function L(se,ee,B,V){var X=!0,Q=!1;return B===null?Q=new TypeError("May not write null values to stream"):typeof B!="string"&&B!==void 0&&!ee.objectMode&&(Q=new TypeError("Invalid non-string/buffer chunk")),Q&&(se.emit("error",Q),n.nextTick(V,Q),X=!1),X}F.prototype.write=function(se,ee,B){var V=this._writableState,X=!1,Q=!V.objectMode&&O(se);return Q&&!y.isBuffer(se)&&(se=R(se)),typeof ee=="function"&&(B=ee,ee=null),Q?ee="buffer":ee||(ee=V.defaultEncoding),typeof B!="function"&&(B=E),V.ended?M(this,B):(Q||L(this,V,se,B))&&(V.pendingcb++,X=K(this,V,Q,se,ee,B)),X},F.prototype.cork=function(){var se=this._writableState;se.corked++},F.prototype.uncork=function(){var se=this._writableState;se.corked&&(se.corked--,!se.writing&&!se.corked&&!se.finished&&!se.bufferProcessing&&se.bufferedRequest&&oe(this,se))},F.prototype.setDefaultEncoding=function(ee){if(typeof ee=="string"&&(ee=ee.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ee+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ee);return this._writableState.defaultEncoding=ee,this};function Y(se,ee,B){return!se.objectMode&&se.decodeStrings!==!1&&typeof ee=="string"&&(ee=y.from(ee,B)),ee}Object.defineProperty(F.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function K(se,ee,B,V,X,Q){if(!B){var Z=Y(ee,V,X);V!==Z&&(B=!0,X="buffer",V=Z)}var ie=ee.objectMode?1:V.length;ee.length+=ie;var re=ee.length<ee.highWaterMark;if(re||(ee.needDrain=!0),ee.writing||ee.corked){var $=ee.lastBufferedRequest;ee.lastBufferedRequest={chunk:V,encoding:X,isBuf:B,callback:Q,next:null},$?$.next=ee.lastBufferedRequest:ee.bufferedRequest=ee.lastBufferedRequest,ee.bufferedRequestCount+=1}else A(se,ee,!1,ie,V,X,Q);return re}function A(se,ee,B,V,X,Q,Z){ee.writelen=V,ee.writecb=Z,ee.writing=!0,ee.sync=!0,B?se._writev(X,ee.onwrite):se._write(X,Q,ee.onwrite),ee.sync=!1}function H(se,ee,B,V,X){--ee.pendingcb,B?(n.nextTick(X,V),n.nextTick(pe,se,ee),se._writableState.errorEmitted=!0,se.emit("error",V)):(X(V),se._writableState.errorEmitted=!0,se.emit("error",V),pe(se,ee))}function U(se){se.writing=!1,se.writecb=null,se.length-=se.writelen,se.writelen=0}function I(se,ee){var B=se._writableState,V=B.sync,X=B.writecb;if(U(B),ee)H(se,B,V,ee,X);else{var Q=de(B);!Q&&!B.corked&&!B.bufferProcessing&&B.bufferedRequest&&oe(se,B),V?f(G,se,B,Q,X):G(se,B,Q,X)}}function G(se,ee,B,V){B||ne(se,ee),ee.pendingcb--,V(),pe(se,ee)}function ne(se,ee){ee.length===0&&ee.needDrain&&(ee.needDrain=!1,se.emit("drain"))}function oe(se,ee){ee.bufferProcessing=!0;var B=ee.bufferedRequest;if(se._writev&&B&&B.next){var V=ee.bufferedRequestCount,X=new Array(V),Q=ee.corkedRequestsFree;Q.entry=B;for(var Z=0,ie=!0;B;)X[Z]=B,B.isBuf||(ie=!1),B=B.next,Z+=1;X.allBuffers=ie,A(se,ee,!0,ee.length,X,"",Q.finish),ee.pendingcb++,ee.lastBufferedRequest=null,Q.next?(ee.corkedRequestsFree=Q.next,Q.next=null):ee.corkedRequestsFree=new h(ee),ee.bufferedRequestCount=0}else{for(;B;){var re=B.chunk,$=B.encoding,J=B.callback,le=ee.objectMode?1:re.length;if(A(se,ee,!1,le,re,$,J),B=B.next,ee.bufferedRequestCount--,ee.writing)break}B===null&&(ee.lastBufferedRequest=null)}ee.bufferedRequest=B,ee.bufferProcessing=!1}F.prototype._write=function(se,ee,B){B(new Error("_write() is not implemented"))},F.prototype._writev=null,F.prototype.end=function(se,ee,B){var V=this._writableState;typeof se=="function"?(B=se,se=null,ee=null):typeof ee=="function"&&(B=ee,ee=null),se!=null&&this.write(se,ee),V.corked&&(V.corked=1,this.uncork()),!V.ending&&!V.finished&&Se(this,V,B)};function de(se){return se.ending&&se.length===0&&se.bufferedRequest===null&&!se.finished&&!se.writing}function Oe(se,ee){se._final(function(B){ee.pendingcb--,B&&se.emit("error",B),ee.prefinished=!0,se.emit("prefinish"),pe(se,ee)})}function Ae(se,ee){!ee.prefinished&&!ee.finalCalled&&(typeof se._final=="function"?(ee.pendingcb++,ee.finalCalled=!0,n.nextTick(Oe,se,ee)):(ee.prefinished=!0,se.emit("prefinish")))}function pe(se,ee){var B=de(ee);return B&&(Ae(se,ee),ee.pendingcb===0&&(ee.finished=!0,se.emit("finish"))),B}function Se(se,ee,B){ee.ending=!0,pe(se,ee),B&&(ee.finished?n.nextTick(B):se.once("finish",B)),ee.ended=!0,se.writable=!1}function be(se,ee,B){var V=se.entry;for(se.entry=null;V;){var X=V.callback;ee.pendingcb--,X(B),V=V.next}ee.corkedRequestsFree?ee.corkedRequestsFree.next=se:ee.corkedRequestsFree=se}Object.defineProperty(F.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ee){if(!this._writableState)return;this._writableState.destroyed=ee}}),F.prototype.destroy=b.destroy,F.prototype._undestroy=b.undestroy,F.prototype._destroy=function(se,ee){this.end(),ee(se)}}).call(this,W("_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(W,q,D){"use strict";function P(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}var v=W("safe-buffer").Buffer,C=W("util");function N(g,m,S){g.copy(m,S)}q.exports=function(){function g(){P(this,g),this.head=null,this.tail=null,this.length=0}return g.prototype.push=function(S){var _={data:S,next:null};this.length>0?this.tail.next=_:this.head=_,this.tail=_,++this.length},g.prototype.unshift=function(S){var _={data:S,next:this.head};this.length===0&&(this.tail=_),this.head=_,++this.length},g.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},g.prototype.clear=function(){this.head=this.tail=null,this.length=0},g.prototype.join=function(S){if(this.length===0)return"";for(var _=this.head,t=""+_.data;_=_.next;)t+=S+_.data;return t},g.prototype.concat=function(S){if(this.length===0)return v.alloc(0);if(this.length===1)return this.head.data;for(var _=v.allocUnsafe(S>>>0),t=this.head,d=0;t;)N(t.data,_,d),d+=t.data.length,t=t.next;return _},g}(),C&&C.inspect&&C.inspect.custom&&(q.exports.prototype[C.inspect.custom]=function(){var g=C.inspect({length:this.length});return this.constructor.name+" "+g})},{"safe-buffer":228,util:71}],220:[function(W,q,D){"use strict";var P=W("process-nextick-args");function v(g,m){var S=this,_=this._readableState&&this._readableState.destroyed,t=this._writableState&&this._writableState.destroyed;return _||t?(m?m(g):g&&(!this._writableState||!this._writableState.errorEmitted)&&P.nextTick(N,this,g),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(g||null,function(d){!m&&d?(P.nextTick(N,S,d),S._writableState&&(S._writableState.errorEmitted=!0)):m&&m(d)}),this)}function C(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function N(g,m){g.emit("error",m)}q.exports={destroy:v,undestroy:C}},{"process-nextick-args":207}],221:[function(W,q,D){"use strict";q.exports=W("events").EventEmitter},{events:192}],222:[function(W,q,D){q.exports=W("./readable").PassThrough},{"./readable":223}],223:[function(W,q,D){D=q.exports=W("./lib/_stream_readable.js"),D.Stream=D,D.Readable=D,D.Writable=W("./lib/_stream_writable.js"),D.Duplex=W("./lib/_stream_duplex.js"),D.Transform=W("./lib/_stream_transform.js"),D.PassThrough=W("./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(W,q,D){q.exports=W("./readable").Transform},{"./readable":223}],225:[function(W,q,D){q.exports=W("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(W,q,D){var P=function(){return this}()||Function("return this")(),v=P.regeneratorRuntime&&Object.getOwnPropertyNames(P).indexOf("regeneratorRuntime")>=0,C=v&&P.regeneratorRuntime;if(P.regeneratorRuntime=void 0,q.exports=W("./runtime"),v)P.regeneratorRuntime=C;else try{delete P.regeneratorRuntime}catch(N){P.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(W,q,D){!function(P){"use strict";var v=Object.prototype,C=v.hasOwnProperty,N,g=typeof Symbol=="function"?Symbol:{},m=g.iterator||"@@iterator",S=g.asyncIterator||"@@asyncIterator",_=g.toStringTag||"@@toStringTag",t=typeof q=="object",d=P.regeneratorRuntime;if(d){t&&(q.exports=d);return}d=P.regeneratorRuntime=t?q.exports:{};function i(K,A,H,U){var I=A&&A.prototype instanceof l?A:l,G=Object.create(I.prototype),ne=new M(U||[]);return G._invoke=E(K,H,ne),G}d.wrap=i;function c(K,A,H){try{return{type:"normal",arg:K.call(A,H)}}catch(U){return{type:"throw",arg:U}}}var o="suspendedStart",n="suspendedYield",s="executing",h="completed",f={};function l(){}function a(){}function r(){}var x={};x[m]=function(){return this};var y=Object.getPrototypeOf,p=y&&y(y(L([])));p&&p!==v&&C.call(p,m)&&(x=p);var R=r.prototype=l.prototype=Object.create(x);a.prototype=R.constructor=r,r.constructor=a,r[_]=a.displayName="GeneratorFunction";function O(K){["next","throw","return"].forEach(function(A){K[A]=function(H){return this._invoke(A,H)}})}d.isGeneratorFunction=function(K){var A=typeof K=="function"&&K.constructor;return A?A===a||(A.displayName||A.name)==="GeneratorFunction":!1},d.mark=function(K){return Object.setPrototypeOf?Object.setPrototypeOf(K,r):(K.__proto__=r,_ in K||(K[_]="GeneratorFunction")),K.prototype=Object.create(R),K},d.awrap=function(K){return{__await:K}};function b(K){function A(I,G,ne,oe){var de=c(K[I],K,G);if(de.type==="throw")oe(de.arg);else{var Oe=de.arg,Ae=Oe.value;return Ae&&typeof Ae=="object"&&C.call(Ae,"__await")?Promise.resolve(Ae.__await).then(function(pe){A("next",pe,ne,oe)},function(pe){A("throw",pe,ne,oe)}):Promise.resolve(Ae).then(function(pe){Oe.value=pe,ne(Oe)},oe)}}var H;function U(I,G){function ne(){return new Promise(function(oe,de){A(I,G,oe,de)})}return H=H?H.then(ne,ne):ne()}this._invoke=U}O(b.prototype),b.prototype[S]=function(){return this},d.AsyncIterator=b,d.async=function(K,A,H,U){var I=new b(i(K,A,H,U));return d.isGeneratorFunction(A)?I:I.next().then(function(G){return G.done?G.value:I.next()})};function E(K,A,H){var U=o;return function(G,ne){if(U===s)throw new Error("Generator is already running");if(U===h){if(G==="throw")throw ne;return Y()}for(H.method=G,H.arg=ne;;){var oe=H.delegate;if(oe){var de=w(oe,H);if(de){if(de===f)continue;return de}}if(H.method==="next")H.sent=H._sent=H.arg;else if(H.method==="throw"){if(U===o)throw U=h,H.arg;H.dispatchException(H.arg)}else H.method==="return"&&H.abrupt("return",H.arg);U=s;var Oe=c(K,A,H);if(Oe.type==="normal"){if(U=H.done?h:n,Oe.arg===f)continue;return{value:Oe.arg,done:H.done}}else Oe.type==="throw"&&(U=h,H.method="throw",H.arg=Oe.arg)}}}function w(K,A){var H=K.iterator[A.method];if(H===N){if(A.delegate=null,A.method==="throw"){if(K.iterator.return&&(A.method="return",A.arg=N,w(K,A),A.method==="throw"))return f;A.method="throw",A.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var U=c(H,K.iterator,A.arg);if(U.type==="throw")return A.method="throw",A.arg=U.arg,A.delegate=null,f;var I=U.arg;if(!I)return A.method="throw",A.arg=new TypeError("iterator result is not an object"),A.delegate=null,f;if(I.done)A[K.resultName]=I.value,A.next=K.nextLoc,A.method!=="return"&&(A.method="next",A.arg=N);else return I;return A.delegate=null,f}O(R),R[_]="Generator",R[m]=function(){return this},R.toString=function(){return"[object Generator]"};function T(K){var A={tryLoc:K[0]};1 in K&&(A.catchLoc=K[1]),2 in K&&(A.finallyLoc=K[2],A.afterLoc=K[3]),this.tryEntries.push(A)}function F(K){var A=K.completion||{};A.type="normal",delete A.arg,K.completion=A}function M(K){this.tryEntries=[{tryLoc:"root"}],K.forEach(T,this),this.reset(!0)}d.keys=function(K){var A=[];for(var H in K)A.push(H);return A.reverse(),function U(){for(;A.length;){var I=A.pop();if(I in K)return U.value=I,U.done=!1,U}return U.done=!0,U}};function L(K){if(K){var A=K[m];if(A)return A.call(K);if(typeof K.next=="function")return K;if(!isNaN(K.length)){var H=-1,U=function I(){for(;++H<K.length;)if(C.call(K,H))return I.value=K[H],I.done=!1,I;return I.value=N,I.done=!0,I};return U.next=U}}return{next:Y}}d.values=L;function Y(){return{value:N,done:!0}}M.prototype={constructor:M,reset:function(K){if(this.prev=0,this.next=0,this.sent=this._sent=N,this.done=!1,this.delegate=null,this.method="next",this.arg=N,this.tryEntries.forEach(F),!K)for(var A in this)A.charAt(0)==="t"&&C.call(this,A)&&!isNaN(+A.slice(1))&&(this[A]=N)},stop:function(){this.done=!0;var K=this.tryEntries[0],A=K.completion;if(A.type==="throw")throw A.arg;return this.rval},dispatchException:function(K){if(this.done)throw K;var A=this;function H(de,Oe){return G.type="throw",G.arg=K,A.next=de,Oe&&(A.method="next",A.arg=N),!!Oe}for(var U=this.tryEntries.length-1;U>=0;--U){var I=this.tryEntries[U],G=I.completion;if(I.tryLoc==="root")return H("end");if(I.tryLoc<=this.prev){var ne=C.call(I,"catchLoc"),oe=C.call(I,"finallyLoc");if(ne&&oe){if(this.prev<I.catchLoc)return H(I.catchLoc,!0);if(this.prev<I.finallyLoc)return H(I.finallyLoc)}else if(ne){if(this.prev<I.catchLoc)return H(I.catchLoc,!0)}else if(oe){if(this.prev<I.finallyLoc)return H(I.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(K,A){for(var H=this.tryEntries.length-1;H>=0;--H){var U=this.tryEntries[H];if(U.tryLoc<=this.prev&&C.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var I=U;break}}I&&(K==="break"||K==="continue")&&I.tryLoc<=A&&A<=I.finallyLoc&&(I=null);var G=I?I.completion:{};return G.type=K,G.arg=A,I?(this.method="next",this.next=I.finallyLoc,f):this.complete(G)},complete:function(K,A){if(K.type==="throw")throw K.arg;return K.type==="break"||K.type==="continue"?this.next=K.arg:K.type==="return"?(this.rval=this.arg=K.arg,this.method="return",this.next="end"):K.type==="normal"&&A&&(this.next=A),f},finish:function(K){for(var A=this.tryEntries.length-1;A>=0;--A){var H=this.tryEntries[A];if(H.finallyLoc===K)return this.complete(H.completion,H.afterLoc),F(H),f}},catch:function(K){for(var A=this.tryEntries.length-1;A>=0;--A){var H=this.tryEntries[A];if(H.tryLoc===K){var U=H.completion;if(U.type==="throw"){var I=U.arg;F(H)}return I}}throw new Error("illegal catch attempt")},delegateYield:function(K,A,H){return this.delegate={iterator:L(K),resultName:A,nextLoc:H},this.method==="next"&&(this.arg=N),f}}}(function(){return this}()||Function("return this")())},{}],228:[function(W,q,D){var P=W("buffer"),v=P.Buffer;function C(g,m){for(var S in g)m[S]=g[S]}v.from&&v.alloc&&v.allocUnsafe&&v.allocUnsafeSlow?q.exports=P:(C(P,D),D.Buffer=N);function N(g,m,S){return v(g,m,S)}C(v,N),N.from=function(g,m,S){if(typeof g=="number")throw new TypeError("Argument must not be a number");return v(g,m,S)},N.alloc=function(g,m,S){if(typeof g!="number")throw new TypeError("Argument must be a number");var _=v(g);return m!==void 0?typeof S=="string"?_.fill(m,S):_.fill(m):_.fill(0),_},N.allocUnsafe=function(g){if(typeof g!="number")throw new TypeError("Argument must be a number");return v(g)},N.allocUnsafeSlow=function(g){if(typeof g!="number")throw new TypeError("Argument must be a number");return P.SlowBuffer(g)}},{buffer:73}],229:[function(W,q,D){(function(P){"use strict";var v=W("babel-runtime/core-js/string/from-code-point"),C=n(v),N=W("babel-runtime/core-js/json/stringify"),g=n(N),m=W("babel-runtime/helpers/typeof"),S=n(m),_=W("babel-runtime/core-js/object/define-property"),t=n(_),d=W("babel-runtime/core-js/object/keys"),i=n(d),c=W("babel-runtime/core-js/object/create"),o=n(c);function n(s){return s&&s.__esModule?s:{default:s}}(function(s){s.parser=function($,J){return new f($,J)},s.SAXParser=f,s.SAXStream=R,s.createStream=p,s.MAX_BUFFER_LENGTH=64*1024;var h=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];s.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function f($,J){if(!(this instanceof f))return new f($,J);var le=this;a(le),le.q=le.c="",le.bufferCheckPosition=s.MAX_BUFFER_LENGTH,le.opt=J||{},le.opt.lowercase=le.opt.lowercase||le.opt.lowercasetags,le.looseCase=le.opt.lowercase?"toLowerCase":"toUpperCase",le.tags=[],le.closed=le.closedRoot=le.sawRoot=!1,le.tag=le.error=null,le.strict=!!$,le.noscript=!!($||le.opt.noscript),le.state=G.BEGIN,le.strictEntities=le.opt.strictEntities,le.ENTITIES=le.strictEntities?(0,o.default)(s.XML_ENTITIES):(0,o.default)(s.ENTITIES),le.attribList=[],le.opt.xmlns&&(le.ns=(0,o.default)(T)),le.trackPosition=le.opt.position!==!1,le.trackPosition&&(le.position=le.line=le.column=0),oe(le,"onready")}o.default||(Object.create=function($){function J(){}J.prototype=$;var le=new J;return le}),i.default||(Object.keys=function($){var J=[];for(var le in $)$.hasOwnProperty(le)&&J.push(le);return J});function l($){for(var J=Math.max(s.MAX_BUFFER_LENGTH,10),le=0,ue=0,xe=h.length;ue<xe;ue++){var Me=$[h[ue]].length;if(Me>J)switch(h[ue]){case"textNode":Oe($);break;case"cdata":de($,"oncdata",$.cdata),$.cdata="";break;case"script":de($,"onscript",$.script),$.script="";break;default:pe($,"Max buffer length exceeded: "+h[ue])}le=Math.max(le,Me)}var Xe=s.MAX_BUFFER_LENGTH-le;$.bufferCheckPosition=Xe+$.position}function a($){for(var J=0,le=h.length;J<le;J++)$[h[J]]=""}function r($){Oe($),$.cdata!==""&&(de($,"oncdata",$.cdata),$.cdata=""),$.script!==""&&(de($,"onscript",$.script),$.script="")}f.prototype={end:function(){Se(this)},write:re,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){r(this)}};var x;try{x=W("stream").Stream}catch($){x=function(){}}var y=s.EVENTS.filter(function($){return $!=="error"&&$!=="end"});function p($,J){return new R($,J)}function R($,J){if(!(this instanceof R))return new R($,J);x.apply(this),this._parser=new f($,J),this.writable=!0,this.readable=!0;var le=this;this._parser.onend=function(){le.emit("end")},this._parser.onerror=function(ue){le.emit("error",ue),le._parser.error=null},this._decoder=null,y.forEach(function(ue){(0,t.default)(le,"on"+ue,{get:function(){return le._parser["on"+ue]},set:function(Me){if(!Me)return le.removeAllListeners(ue),le._parser["on"+ue]=Me,Me;le.on(ue,Me)},enumerable:!0,configurable:!1})})}R.prototype=(0,o.default)(x.prototype,{constructor:{value:R}}),R.prototype.write=function($){if(typeof P=="function"&&typeof P.isBuffer=="function"&&P.isBuffer($)){if(!this._decoder){var J=W("string_decoder").StringDecoder;this._decoder=new J("utf8")}$=this._decoder.write($)}return this._parser.write($.toString()),this.emit("data",$),!0},R.prototype.end=function($){return $&&$.length&&this.write($),this._parser.end(),!0},R.prototype.on=function($,J){var le=this;return!le._parser["on"+$]&&y.indexOf($)!==-1&&(le._parser["on"+$]=function(){var ue=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);ue.splice(0,0,$),le.emit.apply(le,ue)}),x.prototype.on.call(le,$,J)};var O="[CDATA[",b="DOCTYPE",E="http://www.w3.org/XML/1998/namespace",w="http://www.w3.org/2000/xmlns/",T={xml:E,xmlns:w},F=/[:_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]/,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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,L=/[#:_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]/,Y=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function K($){return $===" "||$===`
|
|
|
`||$==="\r"||$===" "}function A($){return $==='"'||$==="'"}function H($){return $===">"||K($)}function U($,J){return $.test(J)}function I($,J){return!U($,J)}var G=0;s.STATE={BEGIN:G++,BEGIN_WHITESPACE:G++,TEXT:G++,TEXT_ENTITY:G++,OPEN_WAKA:G++,SGML_DECL:G++,SGML_DECL_QUOTED:G++,DOCTYPE:G++,DOCTYPE_QUOTED:G++,DOCTYPE_DTD:G++,DOCTYPE_DTD_QUOTED:G++,COMMENT_STARTING:G++,COMMENT:G++,COMMENT_ENDING:G++,COMMENT_ENDED:G++,CDATA:G++,CDATA_ENDING:G++,CDATA_ENDING_2:G++,PROC_INST:G++,PROC_INST_BODY:G++,PROC_INST_ENDING:G++,OPEN_TAG:G++,OPEN_TAG_SLASH:G++,ATTRIB:G++,ATTRIB_NAME:G++,ATTRIB_NAME_SAW_WHITE:G++,ATTRIB_VALUE:G++,ATTRIB_VALUE_QUOTED:G++,ATTRIB_VALUE_CLOSED:G++,ATTRIB_VALUE_UNQUOTED:G++,ATTRIB_VALUE_ENTITY_Q:G++,ATTRIB_VALUE_ENTITY_U:G++,CLOSE_TAG:G++,CLOSE_TAG_SAW_WHITE:G++,SCRIPT:G++,SCRIPT_ENDING:G++},s.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},s.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,i.default)(s.ENTITIES).forEach(function($){var J=s.ENTITIES[$],le=typeof J=="number"?String.fromCharCode(J):J;s.ENTITIES[$]=le});for(var ne in s.STATE)s.STATE[s.STATE[ne]]=ne;G=s.STATE;function oe($,J,le){$[J]&&$[J](le)}function de($,J,le){$.textNode&&Oe($),oe($,J,le)}function Oe($){$.textNode=Ae($.opt,$.textNode),$.textNode&&oe($,"ontext",$.textNode),$.textNode=""}function Ae($,J){return $.trim&&(J=J.trim()),$.normalize&&(J=J.replace(/\s+/g," ")),J}function pe($,J){return Oe($),$.trackPosition&&(J+=`
|
|
|
Line: `+$.line+`
|
|
|
Column: `+$.column+`
|
|
|
Char: `+$.c),J=new Error(J),$.error=J,oe($,"onerror",J),$}function Se($){return $.sawRoot&&!$.closedRoot&&be($,"Unclosed root tag"),$.state!==G.BEGIN&&$.state!==G.BEGIN_WHITESPACE&&$.state!==G.TEXT&&pe($,"Unexpected end"),Oe($),$.c="",$.closed=!0,oe($,"onend"),f.call($,$.strict,$.opt),$}function be($,J){if((typeof $=="undefined"?"undefined":(0,S.default)($))!=="object"||!($ instanceof f))throw new Error("bad call to strictFail");$.strict&&pe($,J)}function se($){$.strict||($.tagName=$.tagName[$.looseCase]());var J=$.tags[$.tags.length-1]||$,le=$.tag={name:$.tagName,attributes:{}};$.opt.xmlns&&(le.ns=J.ns),$.attribList.length=0,de($,"onopentagstart",le)}function ee($,J){var le=$.indexOf(":"),ue=le<0?["",$]:$.split(":"),xe=ue[0],Me=ue[1];return J&&$==="xmlns"&&(xe="xmlns",Me=""),{prefix:xe,local:Me}}function B($){if($.strict||($.attribName=$.attribName[$.looseCase]()),$.attribList.indexOf($.attribName)!==-1||$.tag.attributes.hasOwnProperty($.attribName)){$.attribName=$.attribValue="";return}if($.opt.xmlns){var J=ee($.attribName,!0),le=J.prefix,ue=J.local;if(le==="xmlns")if(ue==="xml"&&$.attribValue!==E)be($,"xml: prefix must be bound to "+E+`
|
|
|
Actual: `+$.attribValue);else if(ue==="xmlns"&&$.attribValue!==w)be($,"xmlns: prefix must be bound to "+w+`
|
|
|
Actual: `+$.attribValue);else{var xe=$.tag,Me=$.tags[$.tags.length-1]||$;xe.ns===Me.ns&&(xe.ns=(0,o.default)(Me.ns)),xe.ns[ue]=$.attribValue}$.attribList.push([$.attribName,$.attribValue])}else $.tag.attributes[$.attribName]=$.attribValue,de($,"onattribute",{name:$.attribName,value:$.attribValue});$.attribName=$.attribValue=""}function V($,J){if($.opt.xmlns){var le=$.tag,ue=ee($.tagName);le.prefix=ue.prefix,le.local=ue.local,le.uri=le.ns[ue.prefix]||"",le.prefix&&!le.uri&&(be($,"Unbound namespace prefix: "+(0,g.default)($.tagName)),le.uri=ue.prefix);var xe=$.tags[$.tags.length-1]||$;le.ns&&xe.ns!==le.ns&&(0,i.default)(le.ns).forEach(function(Ee){de($,"onopennamespace",{prefix:Ee,uri:le.ns[Ee]})});for(var Me=0,Xe=$.attribList.length;Me<Xe;Me++){var $e=$.attribList[Me],Je=$e[0],rt=$e[1],it=ee(Je,!0),je=it.prefix,Ie=it.local,qe=je===""?"":le.ns[je]||"",st={name:Je,value:rt,prefix:je,local:Ie,uri:qe};je&&je!=="xmlns"&&!qe&&(be($,"Unbound namespace prefix: "+(0,g.default)(je)),st.uri=je),$.tag.attributes[Je]=st,de($,"onattribute",st)}$.attribList.length=0}$.tag.isSelfClosing=!!J,$.sawRoot=!0,$.tags.push($.tag),de($,"onopentag",$.tag),J||(!$.noscript&&$.tagName.toLowerCase()==="script"?$.state=G.SCRIPT:$.state=G.TEXT,$.tag=null,$.tagName=""),$.attribName=$.attribValue="",$.attribList.length=0}function X($){if(!$.tagName){be($,"Weird empty close tag."),$.textNode+="</>",$.state=G.TEXT;return}if($.script){if($.tagName!=="script"){$.script+="</"+$.tagName+">",$.tagName="",$.state=G.SCRIPT;return}de($,"onscript",$.script),$.script=""}var J=$.tags.length,le=$.tagName;$.strict||(le=le[$.looseCase]());for(var ue=le;J--;){var xe=$.tags[J];if(xe.name!==ue)be($,"Unexpected close tag");else break}if(J<0){be($,"Unmatched closing tag: "+$.tagName),$.textNode+="</"+$.tagName+">",$.state=G.TEXT;return}$.tagName=le;for(var Me=$.tags.length;Me-- >J;){var Xe=$.tag=$.tags.pop();$.tagName=$.tag.name,de($,"onclosetag",$.tagName);var $e={};for(var Je in Xe.ns)$e[Je]=Xe.ns[Je];var rt=$.tags[$.tags.length-1]||$;$.opt.xmlns&&Xe.ns!==rt.ns&&(0,i.default)(Xe.ns).forEach(function(it){var je=Xe.ns[it];de($,"onclosenamespace",{prefix:it,uri:je})})}J===0&&($.closedRoot=!0),$.tagName=$.attribValue=$.attribName="",$.attribList.length=0,$.state=G.TEXT}function Q($){var J=$.entity,le=J.toLowerCase(),ue,xe="";return $.ENTITIES[J]?$.ENTITIES[J]:$.ENTITIES[le]?$.ENTITIES[le]:(J=le,J.charAt(0)==="#"&&(J.charAt(1)==="x"?(J=J.slice(2),ue=parseInt(J,16),xe=ue.toString(16)):(J=J.slice(1),ue=parseInt(J,10),xe=ue.toString(10))),J=J.replace(/^0+/,""),isNaN(ue)||xe.toLowerCase()!==J?(be($,"Invalid character entity"),"&"+$.entity+";"):(0,C.default)(ue))}function Z($,J){J==="<"?($.state=G.OPEN_WAKA,$.startTagPosition=$.position):K(J)||(be($,"Non-whitespace before first tag."),$.textNode=J,$.state=G.TEXT)}function ie($,J){var le="";return J<$.length&&(le=$.charAt(J)),le}function re($){var J=this;if(this.error)throw this.error;if(J.closed)return pe(J,"Cannot write after close. Assign an onready handler.");if($===null)return Se(J);(typeof $=="undefined"?"undefined":(0,S.default)($))==="object"&&($=$.toString());for(var le=0,ue="";!(ue=ie($,le++),J.c=ue,!ue);){J.trackPosition&&(J.position++,ue===`
|
|
|
`?(J.line++,J.column=0):J.column++);switch(J.state){case G.BEGIN:if(J.state=G.BEGIN_WHITESPACE,ue==="\uFEFF")continue;Z(J,ue);continue;case G.BEGIN_WHITESPACE:Z(J,ue);continue;case G.TEXT:if(J.sawRoot&&!J.closedRoot){for(var xe=le-1;ue&&ue!=="<"&&ue!=="&";)ue=ie($,le++),ue&&J.trackPosition&&(J.position++,ue===`
|
|
|
`?(J.line++,J.column=0):J.column++);J.textNode+=$.substring(xe,le-1)}ue==="<"&&!(J.sawRoot&&J.closedRoot&&!J.strict)?(J.state=G.OPEN_WAKA,J.startTagPosition=J.position):(!K(ue)&&(!J.sawRoot||J.closedRoot)&&be(J,"Text data outside of root node."),ue==="&"?J.state=G.TEXT_ENTITY:J.textNode+=ue);continue;case G.SCRIPT:ue==="<"?J.state=G.SCRIPT_ENDING:J.script+=ue;continue;case G.SCRIPT_ENDING:ue==="/"?J.state=G.CLOSE_TAG:(J.script+="<"+ue,J.state=G.SCRIPT);continue;case G.OPEN_WAKA:if(ue==="!")J.state=G.SGML_DECL,J.sgmlDecl="";else if(!K(ue))if(U(F,ue))J.state=G.OPEN_TAG,J.tagName=ue;else if(ue==="/")J.state=G.CLOSE_TAG,J.tagName="";else if(ue==="?")J.state=G.PROC_INST,J.procInstName=J.procInstBody="";else{if(be(J,"Unencoded <"),J.startTagPosition+1<J.position){var Me=J.position-J.startTagPosition;ue=new Array(Me).join(" ")+ue}J.textNode+="<"+ue,J.state=G.TEXT}continue;case G.SGML_DECL:(J.sgmlDecl+ue).toUpperCase()===O?(de(J,"onopencdata"),J.state=G.CDATA,J.sgmlDecl="",J.cdata=""):J.sgmlDecl+ue==="--"?(J.state=G.COMMENT,J.comment="",J.sgmlDecl=""):(J.sgmlDecl+ue).toUpperCase()===b?(J.state=G.DOCTYPE,(J.doctype||J.sawRoot)&&be(J,"Inappropriately located doctype declaration"),J.doctype="",J.sgmlDecl=""):ue===">"?(de(J,"onsgmldeclaration",J.sgmlDecl),J.sgmlDecl="",J.state=G.TEXT):(A(ue)&&(J.state=G.SGML_DECL_QUOTED),J.sgmlDecl+=ue);continue;case G.SGML_DECL_QUOTED:ue===J.q&&(J.state=G.SGML_DECL,J.q=""),J.sgmlDecl+=ue;continue;case G.DOCTYPE:ue===">"?(J.state=G.TEXT,de(J,"ondoctype",J.doctype),J.doctype=!0):(J.doctype+=ue,ue==="["?J.state=G.DOCTYPE_DTD:A(ue)&&(J.state=G.DOCTYPE_QUOTED,J.q=ue));continue;case G.DOCTYPE_QUOTED:J.doctype+=ue,ue===J.q&&(J.q="",J.state=G.DOCTYPE);continue;case G.DOCTYPE_DTD:J.doctype+=ue,ue==="]"?J.state=G.DOCTYPE:A(ue)&&(J.state=G.DOCTYPE_DTD_QUOTED,J.q=ue);continue;case G.DOCTYPE_DTD_QUOTED:J.doctype+=ue,ue===J.q&&(J.state=G.DOCTYPE_DTD,J.q="");continue;case G.COMMENT:ue==="-"?J.state=G.COMMENT_ENDING:J.comment+=ue;continue;case G.COMMENT_ENDING:ue==="-"?(J.state=G.COMMENT_ENDED,J.comment=Ae(J.opt,J.comment),J.comment&&de(J,"oncomment",J.comment),J.comment=""):(J.comment+="-"+ue,J.state=G.COMMENT);continue;case G.COMMENT_ENDED:ue!==">"?(be(J,"Malformed comment"),J.comment+="--"+ue,J.state=G.COMMENT):J.state=G.TEXT;continue;case G.CDATA:ue==="]"?J.state=G.CDATA_ENDING:J.cdata+=ue;continue;case G.CDATA_ENDING:ue==="]"?J.state=G.CDATA_ENDING_2:(J.cdata+="]"+ue,J.state=G.CDATA);continue;case G.CDATA_ENDING_2:ue===">"?(J.cdata&&de(J,"oncdata",J.cdata),de(J,"onclosecdata"),J.cdata="",J.state=G.TEXT):ue==="]"?J.cdata+="]":(J.cdata+="]]"+ue,J.state=G.CDATA);continue;case G.PROC_INST:ue==="?"?J.state=G.PROC_INST_ENDING:K(ue)?J.state=G.PROC_INST_BODY:J.procInstName+=ue;continue;case G.PROC_INST_BODY:if(!J.procInstBody&&K(ue))continue;ue==="?"?J.state=G.PROC_INST_ENDING:J.procInstBody+=ue;continue;case G.PROC_INST_ENDING:ue===">"?(de(J,"onprocessinginstruction",{name:J.procInstName,body:J.procInstBody}),J.procInstName=J.procInstBody="",J.state=G.TEXT):(J.procInstBody+="?"+ue,J.state=G.PROC_INST_BODY);continue;case G.OPEN_TAG:U(M,ue)?J.tagName+=ue:(se(J),ue===">"?V(J):ue==="/"?J.state=G.OPEN_TAG_SLASH:(K(ue)||be(J,"Invalid character in tag name"),J.state=G.ATTRIB));continue;case G.OPEN_TAG_SLASH:ue===">"?(V(J,!0),X(J)):(be(J,"Forward-slash in opening tag not followed by >"),J.state=G.ATTRIB);continue;case G.ATTRIB:if(K(ue))continue;ue===">"?V(J):ue==="/"?J.state=G.OPEN_TAG_SLASH:U(F,ue)?(J.attribName=ue,J.attribValue="",J.state=G.ATTRIB_NAME):be(J,"Invalid attribute name");continue;case G.ATTRIB_NAME:ue==="="?J.state=G.ATTRIB_VALUE:ue===">"?(be(J,"Attribute without value"),J.attribValue=J.attribName,B(J),V(J)):K(ue)?J.state=G.ATTRIB_NAME_SAW_WHITE:U(M,ue)?J.attribName+=ue:be(J,"Invalid attribute name");continue;case G.ATTRIB_NAME_SAW_WHITE:if(ue==="=")J.state=G.ATTRIB_VALUE;else{if(K(ue))continue;be(J,"Attribute without value"),J.tag.attributes[J.attribName]="",J.attribValue="",de(J,"onattribute",{name:J.attribName,value:""}),J.attribName="",ue===">"?V(J):U(F,ue)?(J.attribName=ue,J.state=G.ATTRIB_NAME):(be(J,"Invalid attribute name"),J.state=G.ATTRIB)}continue;case G.ATTRIB_VALUE:if(K(ue))continue;A(ue)?(J.q=ue,J.state=G.ATTRIB_VALUE_QUOTED):(be(J,"Unquoted attribute value"),J.state=G.ATTRIB_VALUE_UNQUOTED,J.attribValue=ue);continue;case G.ATTRIB_VALUE_QUOTED:if(ue!==J.q){ue==="&"?J.state=G.ATTRIB_VALUE_ENTITY_Q:J.attribValue+=ue;continue}B(J),J.q="",J.state=G.ATTRIB_VALUE_CLOSED;continue;case G.ATTRIB_VALUE_CLOSED:K(ue)?J.state=G.ATTRIB:ue===">"?V(J):ue==="/"?J.state=G.OPEN_TAG_SLASH:U(F,ue)?(be(J,"No whitespace between attributes"),J.attribName=ue,J.attribValue="",J.state=G.ATTRIB_NAME):be(J,"Invalid attribute name");continue;case G.ATTRIB_VALUE_UNQUOTED:if(!H(ue)){ue==="&"?J.state=G.ATTRIB_VALUE_ENTITY_U:J.attribValue+=ue;continue}B(J),ue===">"?V(J):J.state=G.ATTRIB;continue;case G.CLOSE_TAG:if(J.tagName)ue===">"?X(J):U(M,ue)?J.tagName+=ue:J.script?(J.script+="</"+J.tagName,J.tagName="",J.state=G.SCRIPT):(K(ue)||be(J,"Invalid tagname in closing tag"),J.state=G.CLOSE_TAG_SAW_WHITE);else{if(K(ue))continue;I(F,ue)?J.script?(J.script+="</"+ue,J.state=G.SCRIPT):be(J,"Invalid tagname in closing tag."):J.tagName=ue}continue;case G.CLOSE_TAG_SAW_WHITE:if(K(ue))continue;ue===">"?X(J):be(J,"Invalid characters in closing tag");continue;case G.TEXT_ENTITY:case G.ATTRIB_VALUE_ENTITY_Q:case G.ATTRIB_VALUE_ENTITY_U:var Xe,$e;switch(J.state){case G.TEXT_ENTITY:Xe=G.TEXT,$e="textNode";break;case G.ATTRIB_VALUE_ENTITY_Q:Xe=G.ATTRIB_VALUE_QUOTED,$e="attribValue";break;case G.ATTRIB_VALUE_ENTITY_U:Xe=G.ATTRIB_VALUE_UNQUOTED,$e="attribValue";break}ue===";"?(J[$e]+=Q(J),J.entity="",J.state=Xe):U(J.entity.length?Y:L,ue)?J.entity+=ue:(be(J,"Invalid character in entity name"),J[$e]+="&"+J.entity+ue,J.entity="",J.state=Xe);continue;default:throw new Error(J,"Unknown state: "+J.state)}}return J.position>=J.bufferCheckPosition&&l(J),J}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */C.default||function(){var $=String.fromCharCode,J=Math.floor,le=function(){var xe=16384,Me=[],Xe,$e,Je=-1,rt=arguments.length;if(!rt)return"";for(var it="";++Je<rt;){var je=Number(arguments[Je]);if(!isFinite(je)||je<0||je>1114111||J(je)!==je)throw RangeError("Invalid code point: "+je);je<=65535?Me.push(je):(je-=65536,Xe=(je>>10)+55296,$e=je%1024+56320,Me.push(Xe,$e)),(Je+1===rt||Me.length>xe)&&(it+=$.apply(null,Me),Me.length=0)}return it};t.default?Object.defineProperty(String,"fromCodePoint",{value:le,configurable:!0,writable:!0}):String.fromCodePoint=le}()})(typeof D=="undefined"?(void 0).sax={}:D)}).call(this,W("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(W,q,D){q.exports=C;var P=W("events").EventEmitter,v=W("inherits");v(C,P),C.Readable=W("readable-stream/readable.js"),C.Writable=W("readable-stream/writable.js"),C.Duplex=W("readable-stream/duplex.js"),C.Transform=W("readable-stream/transform.js"),C.PassThrough=W("readable-stream/passthrough.js"),C.Stream=C;function C(){P.call(this)}C.prototype.pipe=function(N,g){var m=this;function S(n){N.writable&&(N.write(n)===!1&&m.pause&&m.pause())}m.on("data",S);function _(){m.readable&&m.resume&&m.resume()}N.on("drain",_),!N._isStdio&&(!g||g.end!==!1)&&(m.on("end",d),m.on("close",i));var t=!1;function d(){if(t)return;t=!0,N.end()}function i(){if(t)return;t=!0,typeof N.destroy=="function"&&N.destroy()}function c(n){if(o(),P.listenerCount(this,"error")===0)throw n}m.on("error",c),N.on("error",c);function o(){m.removeListener("data",S),N.removeListener("drain",_),m.removeListener("end",d),m.removeListener("close",i),m.removeListener("error",c),N.removeListener("error",c),m.removeListener("end",o),m.removeListener("close",o),N.removeListener("close",o)}return m.on("end",o),m.on("close",o),N.on("close",o),N.emit("pipe",m),N}},{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(W,q,D){(function(P){var v=W("./lib/request"),C=W("./lib/response"),N=W("xtend"),g=W("builtin-status-codes"),m=W("url"),S=D;S.request=function(_,t){typeof _=="string"?_=m.parse(_):_=N(_);var d=P.location.protocol.search(/^https?:$/)===-1?"http:":"",i=_.protocol||d,c=_.hostname||_.host,o=_.port,n=_.path||"/";c&&c.indexOf(":")!==-1&&(c="["+c+"]"),_.url=(c?i+"//"+c:"")+(o?":"+o:"")+n,_.method=(_.method||"GET").toUpperCase(),_.headers=_.headers||{};var s=new v(_);return t&&s.on("response",t),s},S.get=function(t,d){var i=S.request(t,d);return i.end(),i},S.ClientRequest=v,S.IncomingMessage=C.IncomingMessage,S.Agent=function(){},S.Agent.defaultMaxSockets=4,S.globalAgent=new S.Agent,S.STATUS_CODES=g,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(W,q,D){(function(P){"use strict";D.fetch=S(P.fetch)&&S(P.ReadableStream),D.writableStream=S(P.WritableStream),D.abortController=S(P.AbortController),D.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),D.blobConstructor=!0}catch(_){}var v;function C(){if(v!==void 0)return v;if(P.XMLHttpRequest){v=new P.XMLHttpRequest;try{v.open("GET",P.XDomainRequest?"/":"https://example.com")}catch(_){v=null}}else v=null;return v}function N(_){var t=C();if(!t)return!1;try{return t.responseType=_,t.responseType===_}catch(d){}return!1}var g=typeof P.ArrayBuffer!="undefined",m=g&&S(P.ArrayBuffer.prototype.slice);D.arraybuffer=D.fetch||g&&N("arraybuffer"),D.msstream=!D.fetch&&m&&N("ms-stream"),D.mozchunkedarraybuffer=!D.fetch&&g&&N("moz-chunked-arraybuffer"),D.overrideMimeType=D.fetch||(C()?S(C().overrideMimeType):!1),D.vbArray=S(P.VBArray);function S(_){return typeof _=="function"}v=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(W,q,D){(function(P,v,C){"use strict";var N=W("babel-runtime/core-js/object/keys"),g=m(N);function m(l){return l&&l.__esModule?l:{default:l}}var S=W("./capability"),_=W("inherits"),t=W("./response"),d=W("readable-stream"),i=W("to-arraybuffer"),c=t.IncomingMessage,o=t.readyStates;function n(l,a){return S.fetch&&a?"fetch":S.mozchunkedarraybuffer?"moz-chunked-arraybuffer":S.msstream?"ms-stream":S.arraybuffer&&l?"arraybuffer":S.vbArray&&l?"text:vbarray":"text"}var s=q.exports=function(l){var a=this;d.Writable.call(a),a._opts=l,a._body=[],a._headers={},l.auth&&a.setHeader("Authorization","Basic "+new C(l.auth).toString("base64")),(0,g.default)(l.headers).forEach(function(y){a.setHeader(y,l.headers[y])});var r,x=!0;if(l.mode==="disable-fetch"||"requestTimeout"in l&&!S.abortController)x=!1,r=!0;else if(l.mode==="prefer-streaming")r=!1;else if(l.mode==="allow-wrong-content-type")r=!S.overrideMimeType;else if(!l.mode||l.mode==="default"||l.mode==="prefer-fast")r=!0;else throw new Error("Invalid value for opts.mode");a._mode=n(r,x),a._fetchTimer=null,a.on("finish",function(){a._onFinish()})};_(s,d.Writable),s.prototype.setHeader=function(l,a){var r=this,x=l.toLowerCase();if(f.indexOf(x)!==-1)return;r._headers[x]={name:l,value:a}},s.prototype.getHeader=function(l){var a=this._headers[l.toLowerCase()];return a?a.value:null},s.prototype.removeHeader=function(l){var a=this;delete a._headers[l.toLowerCase()]},s.prototype._onFinish=function(){var l=this;if(l._destroyed)return;var a=l._opts,r=l._headers,x=null;a.method!=="GET"&&a.method!=="HEAD"&&(S.arraybuffer?x=i(C.concat(l._body)):S.blobConstructor?x=new v.Blob(l._body.map(function(E){return i(E)}),{type:(r["content-type"]||{}).value||""}):x=C.concat(l._body).toString());var y=[];if((0,g.default)(r).forEach(function(E){var w=r[E].name,T=r[E].value;Array.isArray(T)?T.forEach(function(F){y.push([w,F])}):y.push([w,T])}),l._mode==="fetch"){var p=null,R=null;if(S.abortController){var O=new AbortController;p=O.signal,l._fetchAbortController=O,"requestTimeout"in a&&a.requestTimeout!==0&&(l._fetchTimer=v.setTimeout(function(){l.emit("requestTimeout"),l._fetchAbortController&&l._fetchAbortController.abort()},a.requestTimeout))}v.fetch(l._opts.url,{method:l._opts.method,headers:y,body:x||void 0,mode:"cors",credentials:a.withCredentials?"include":"same-origin",signal:p}).then(function(E){l._fetchResponse=E,l._connect()},function(E){v.clearTimeout(l._fetchTimer),l._destroyed||l.emit("error",E)})}else{var b=l._xhr=new v.XMLHttpRequest;try{b.open(l._opts.method,l._opts.url,!0)}catch(E){P.nextTick(function(){l.emit("error",E)});return}"responseType"in b&&(b.responseType=l._mode.split(":")[0]),"withCredentials"in b&&(b.withCredentials=!!a.withCredentials),l._mode==="text"&&"overrideMimeType"in b&&b.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in a&&(b.timeout=a.requestTimeout,b.ontimeout=function(){l.emit("requestTimeout")}),y.forEach(function(E){b.setRequestHeader(E[0],E[1])}),l._response=null,b.onreadystatechange=function(){switch(b.readyState){case o.LOADING:case o.DONE:l._onXHRProgress();break}},l._mode==="moz-chunked-arraybuffer"&&(b.onprogress=function(){l._onXHRProgress()}),b.onerror=function(){if(l._destroyed)return;l.emit("error",new Error("XHR error"))};try{b.send(x)}catch(E){P.nextTick(function(){l.emit("error",E)});return}}};function h(l){try{var a=l.status;return a!==null&&a!==0}catch(r){return!1}}s.prototype._onXHRProgress=function(){var l=this;if(!h(l._xhr)||l._destroyed)return;l._response||l._connect(),l._response._onXHRProgress()},s.prototype._connect=function(){var l=this;if(l._destroyed)return;l._response=new c(l._xhr,l._fetchResponse,l._mode,l._fetchTimer),l._response.on("error",function(a){l.emit("error",a)}),l.emit("response",l._response)},s.prototype._write=function(l,a,r){var x=this;x._body.push(l),r()},s.prototype.abort=s.prototype.destroy=function(){var l=this;l._destroyed=!0,v.clearTimeout(l._fetchTimer),l._response&&(l._response._destroyed=!0),l._xhr?l._xhr.abort():l._fetchAbortController&&l._fetchAbortController.abort()},s.prototype.end=function(l,a,r){var x=this;typeof l=="function"&&(r=l,l=void 0),d.Writable.prototype.end.call(x,l,a,r)},s.prototype.flushHeaders=function(){},s.prototype.setTimeout=function(){},s.prototype.setNoDelay=function(){},s.prototype.setSocketKeepAlive=function(){};var f=["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,W("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},W("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(W,q,D){(function(P,v,C){"use strict";var N=W("babel-runtime/core-js/promise"),g=m(N);function m(c){return c&&c.__esModule?c:{default:c}}var S=W("./capability"),_=W("inherits"),t=W("readable-stream"),d=D.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},i=D.IncomingMessage=function(c,o,n,s){var h=this;if(t.Readable.call(h),h._mode=n,h.headers={},h.rawHeaders=[],h.trailers={},h.rawTrailers=[],h.on("end",function(){P.nextTick(function(){h.emit("close")})}),n==="fetch"){var f=function p(){a.read().then(function(R){if(h._destroyed)return;if(R.done){v.clearTimeout(s),h.push(null);return}h.push(new C(R.value)),p()}).catch(function(R){v.clearTimeout(s),h._destroyed||h.emit("error",R)})};if(h._fetchResponse=o,h.url=o.url,h.statusCode=o.status,h.statusMessage=o.statusText,o.headers.forEach(function(p,R){h.headers[R.toLowerCase()]=p,h.rawHeaders.push(R,p)}),S.writableStream){var l=new WritableStream({write:function(R){return new g.default(function(O,b){h._destroyed?b():h.push(new C(R))?O():h._resumeFetch=O})},close:function(){v.clearTimeout(s),h._destroyed||h.push(null)},abort:function(R){h._destroyed||h.emit("error",R)}});try{o.body.pipeTo(l).catch(function(p){v.clearTimeout(s),h._destroyed||h.emit("error",p)});return}catch(p){}}var a=o.body.getReader();f()}else{h._xhr=c,h._pos=0,h.url=c.responseURL,h.statusCode=c.status,h.statusMessage=c.statusText;var r=c.getAllResponseHeaders().split(/\r?\n/);if(r.forEach(function(p){var R=p.match(/^([^:]+):\s*(.*)/);if(R){var O=R[1].toLowerCase();O==="set-cookie"?(h.headers[O]===void 0&&(h.headers[O]=[]),h.headers[O].push(R[2])):h.headers[O]!==void 0?h.headers[O]+=", "+R[2]:h.headers[O]=R[2],h.rawHeaders.push(R[1],R[2])}}),h._charset="x-user-defined",!S.overrideMimeType){var x=h.rawHeaders["mime-type"];if(x){var y=x.match(/;\s*charset=([^;])(;|$)/);y&&(h._charset=y[1].toLowerCase())}h._charset||(h._charset="utf-8")}}};_(i,t.Readable),i.prototype._read=function(){var c=this,o=c._resumeFetch;o&&(c._resumeFetch=null,o())},i.prototype._onXHRProgress=function(){var c=this,o=c._xhr,n=null;switch(c._mode){case"text:vbarray":if(o.readyState!==d.DONE)break;try{n=new v.VBArray(o.responseBody).toArray()}catch(a){}if(n!==null){c.push(new C(n));break}case"text":try{n=o.responseText}catch(a){c._mode="text:vbarray";break}if(n.length>c._pos){var s=n.substr(c._pos);if(c._charset==="x-user-defined"){for(var h=new C(s.length),f=0;f<s.length;f++)h[f]=s.charCodeAt(f)&255;c.push(h)}else c.push(s,c._charset);c._pos=n.length}break;case"arraybuffer":if(o.readyState!==d.DONE||!o.response)break;n=o.response,c.push(new C(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=o.response,o.readyState!==d.LOADING||!n)break;c.push(new C(new Uint8Array(n)));break;case"ms-stream":if(n=o.response,o.readyState!==d.LOADING)break;var l=new v.MSStreamReader;l.onprogress=function(){l.result.byteLength>c._pos&&(c.push(new C(new Uint8Array(l.result.slice(c._pos)))),c._pos=l.result.byteLength)},l.onload=function(){c.push(null)},l.readAsArrayBuffer(n);break}c._xhr.readyState===d.DONE&&c._mode!=="ms-stream"&&c.push(null)}}).call(this,W("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},W("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(W,q,D){"use strict";var P=W("safe-buffer").Buffer,v=P.isEncoding||function(l){l=""+l;switch(l&&l.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function C(l){if(!l)return"utf8";for(var a;;)switch(l){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 l;default:if(a)return;l=(""+l).toLowerCase(),a=!0}}function N(l){var a=C(l);if(typeof a!="string"&&(P.isEncoding===v||!v(l)))throw new Error("Unknown encoding: "+l);return a||l}D.StringDecoder=g;function g(l){this.encoding=N(l);var a;switch(this.encoding){case"utf16le":this.text=c,this.end=o,a=4;break;case"utf8":this.fillLast=t,a=4;break;case"base64":this.text=n,this.end=s,a=3;break;default:this.write=h,this.end=f;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=P.allocUnsafe(a)}g.prototype.write=function(l){if(l.length===0)return"";var a,r;if(this.lastNeed){if(a=this.fillLast(l),a===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<l.length?a?a+this.text(l,r):this.text(l,r):a||""},g.prototype.end=i,g.prototype.text=d,g.prototype.fillLast=function(l){if(this.lastNeed<=l.length)return l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,l.length),this.lastNeed-=l.length};function m(l){return l<=127?0:l>>5===6?2:l>>4===14?3:l>>3===30?4:l>>6===2?-1:-2}function S(l,a,r){var x=a.length-1;if(x<r)return 0;var y=m(a[x]);return y>=0?(y>0&&(l.lastNeed=y-1),y):--x<r||y===-2?0:(y=m(a[x]),y>=0?(y>0&&(l.lastNeed=y-2),y):--x<r||y===-2?0:(y=m(a[x]),y>=0?(y>0&&(y===2?y=0:l.lastNeed=y-3),y):0))}function _(l,a,r){if((a[0]&192)!==128)return l.lastNeed=0,"\uFFFD";if(l.lastNeed>1&&a.length>1){if((a[1]&192)!==128)return l.lastNeed=1,"\uFFFD";if(l.lastNeed>2&&a.length>2&&(a[2]&192)!==128)return l.lastNeed=2,"\uFFFD"}}function t(l){var a=this.lastTotal-this.lastNeed,r=_(this,l,a);if(r!==void 0)return r;if(this.lastNeed<=l.length)return l.copy(this.lastChar,a,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);l.copy(this.lastChar,a,0,l.length),this.lastNeed-=l.length}function d(l,a){var r=S(this,l,a);if(!this.lastNeed)return l.toString("utf8",a);this.lastTotal=r;var x=l.length-(r-this.lastNeed);return l.copy(this.lastChar,0,x),l.toString("utf8",a,x)}function i(l){var a=l&&l.length?this.write(l):"";return this.lastNeed?a+"\uFFFD":a}function c(l,a){if((l.length-a)%2===0){var r=l.toString("utf16le",a);if(r){var x=r.charCodeAt(r.length-1);if(x>=55296&&x<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=l[l.length-1],l.toString("utf16le",a,l.length-1)}function o(l){var a=l&&l.length?this.write(l):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return a+this.lastChar.toString("utf16le",0,r)}return a}function n(l,a){var r=(l.length-a)%3;return r===0?l.toString("base64",a):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=l[l.length-1]:(this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1]),l.toString("base64",a,l.length-r))}function s(l){var a=l&&l.length?this.write(l):"";return this.lastNeed?a+this.lastChar.toString("base64",0,3-this.lastNeed):a}function h(l){return l.toString(this.encoding)}function f(l){return l&&l.length?this.write(l):""}},{"safe-buffer":228}],236:[function(W,q,D){(function(P,v){var C=W("process/browser.js").nextTick,N=Function.prototype.apply,g=Array.prototype.slice,m={},S=0;D.setTimeout=function(){return new _(N.call(setTimeout,window,arguments),clearTimeout)},D.setInterval=function(){return new _(N.call(setInterval,window,arguments),clearInterval)},D.clearTimeout=D.clearInterval=function(t){t.close()};function _(t,d){this._id=t,this._clearFn=d}_.prototype.unref=_.prototype.ref=function(){},_.prototype.close=function(){this._clearFn.call(window,this._id)},D.enroll=function(t,d){clearTimeout(t._idleTimeoutId),t._idleTimeout=d},D.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},D._unrefActive=D.active=function(t){clearTimeout(t._idleTimeoutId);var d=t._idleTimeout;d>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},d))},D.setImmediate=typeof P=="function"?P:function(t){var d=S++,i=arguments.length<2?!1:g.call(arguments,1);return m[d]=!0,C(function(){m[d]&&(i?t.apply(null,i):t.call(null),D.clearImmediate(d))}),d},D.clearImmediate=typeof v=="function"?v:function(t){delete m[t]}}).call(this,W("timers").setImmediate,W("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(W,q,D){var P=W("buffer").Buffer;q.exports=function(v){if(v instanceof Uint8Array){if(v.byteOffset===0&&v.byteLength===v.buffer.byteLength)return v.buffer;if(typeof v.buffer.slice=="function")return v.buffer.slice(v.byteOffset,v.byteOffset+v.byteLength)}if(P.isBuffer(v)){for(var C=new Uint8Array(v.length),N=v.length,g=0;g<N;g++)C[g]=v[g];return C.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(W,q,D){"use strict";var P=W("punycode"),v=W("./util");D.parse=a,D.resolve=x,D.resolveObject=y,D.format=r,D.Url=C;function C(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var N=/^([a-z0-9.+-]+:)/i,g=/:[0-9]*$/,m=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,S=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],_=["{","}","|","\\","^","`"].concat(S),t=["'"].concat(_),d=["%","/","?",";","#"].concat(t),i=["/","?","#"],c=255,o=/^[+a-z0-9A-Z_-]{0,63}$/,n=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,s={javascript:!0,"javascript:":!0},h={javascript:!0,"javascript:":!0},f={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},l=W("querystring");function a(p,R,O){if(p&&v.isObject(p)&&p instanceof C)return p;var b=new C;return b.parse(p,R,O),b}C.prototype.parse=function(p,R,O){if(!v.isString(p))throw new TypeError("Parameter 'url' must be a string, not "+typeof p);var b=p.indexOf("?"),E=b!==-1&&b<p.indexOf("#")?"?":"#",w=p.split(E),T=/\\/g;w[0]=w[0].replace(T,"/"),p=w.join(E);var F=p;if(F=F.trim(),!O&&p.split("#").length===1){var M=m.exec(F);if(M)return this.path=F,this.href=F,this.pathname=M[1],M[2]?(this.search=M[2],R?this.query=l.parse(this.search.substr(1)):this.query=this.search.substr(1)):R&&(this.search="",this.query={}),this}var L=N.exec(F);if(L){L=L[0];var Y=L.toLowerCase();this.protocol=Y,F=F.substr(L.length)}if(O||L||F.match(/^\/\/[^@\/]+@[^@\/]+/)){var K=F.substr(0,2)==="//";K&&!(L&&h[L])&&(F=F.substr(2),this.slashes=!0)}if(!h[L]&&(K||L&&!f[L])){for(var A=-1,H=0;H<i.length;H++){var U=F.indexOf(i[H]);U!==-1&&(A===-1||U<A)&&(A=U)}var I,G;A===-1?G=F.lastIndexOf("@"):G=F.lastIndexOf("@",A),G!==-1&&(I=F.slice(0,G),F=F.slice(G+1),this.auth=decodeURIComponent(I)),A=-1;for(var H=0;H<d.length;H++){var U=F.indexOf(d[H]);U!==-1&&(A===-1||U<A)&&(A=U)}A===-1&&(A=F.length),this.host=F.slice(0,A),F=F.slice(A),this.parseHost(),this.hostname=this.hostname||"";var ne=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ne)for(var oe=this.hostname.split(/\./),H=0,de=oe.length;H<de;H++){var Oe=oe[H];if(!Oe)continue;if(!Oe.match(o)){for(var Ae="",pe=0,Se=Oe.length;pe<Se;pe++)Oe.charCodeAt(pe)>127?Ae+="x":Ae+=Oe[pe];if(!Ae.match(o)){var be=oe.slice(0,H),se=oe.slice(H+1),ee=Oe.match(n);ee&&(be.push(ee[1]),se.unshift(ee[2])),se.length&&(F="/"+se.join(".")+F),this.hostname=be.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),ne||(this.hostname=P.toASCII(this.hostname));var B=this.port?":"+this.port:"",V=this.hostname||"";this.host=V+B,this.href+=this.host,ne&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),F[0]!=="/"&&(F="/"+F))}if(!s[Y])for(var H=0,de=t.length;H<de;H++){var X=t[H];if(F.indexOf(X)===-1)continue;var Q=encodeURIComponent(X);Q===X&&(Q=escape(X)),F=F.split(X).join(Q)}var Z=F.indexOf("#");Z!==-1&&(this.hash=F.substr(Z),F=F.slice(0,Z));var ie=F.indexOf("?");if(ie!==-1?(this.search=F.substr(ie),this.query=F.substr(ie+1),R&&(this.query=l.parse(this.query)),F=F.slice(0,ie)):R&&(this.search="",this.query={}),F&&(this.pathname=F),f[Y]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var B=this.pathname||"",re=this.search||"";this.path=B+re}return this.href=this.format(),this};function r(p){return v.isString(p)&&(p=a(p)),p instanceof C?p.format():C.prototype.format.call(p)}C.prototype.format=function(){var p=this.auth||"";p&&(p=encodeURIComponent(p),p=p.replace(/%3A/i,":"),p+="@");var R=this.protocol||"",O=this.pathname||"",b=this.hash||"",E=!1,w="";this.host?E=p+this.host:this.hostname&&(E=p+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(E+=":"+this.port)),this.query&&v.isObject(this.query)&&Object.keys(this.query).length&&(w=l.stringify(this.query));var T=this.search||w&&"?"+w||"";return R&&R.substr(-1)!==":"&&(R+=":"),this.slashes||(!R||f[R])&&E!==!1?(E="//"+(E||""),O&&O.charAt(0)!=="/"&&(O="/"+O)):E||(E=""),b&&b.charAt(0)!=="#"&&(b="#"+b),T&&T.charAt(0)!=="?"&&(T="?"+T),O=O.replace(/[?#]/g,function(F){return encodeURIComponent(F)}),T=T.replace("#","%23"),R+E+O+T+b};function x(p,R){return a(p,!1,!0).resolve(R)}C.prototype.resolve=function(p){return this.resolveObject(a(p,!1,!0)).format()};function y(p,R){return p?a(p,!1,!0).resolveObject(R):R}C.prototype.resolveObject=function(p){if(v.isString(p)){var R=new C;R.parse(p,!1,!0),p=R}for(var O=new C,b=Object.keys(this),E=0;E<b.length;E++){var w=b[E];O[w]=this[w]}if(O.hash=p.hash,p.href==="")return O.href=O.format(),O;if(p.slashes&&!p.protocol){for(var T=Object.keys(p),F=0;F<T.length;F++){var M=T[F];M!=="protocol"&&(O[M]=p[M])}return f[O.protocol]&&O.hostname&&!O.pathname&&(O.path=O.pathname="/"),O.href=O.format(),O}if(p.protocol&&p.protocol!==O.protocol){if(!f[p.protocol]){for(var L=Object.keys(p),Y=0;Y<L.length;Y++){var K=L[Y];O[K]=p[K]}return O.href=O.format(),O}if(O.protocol=p.protocol,!p.host&&!h[p.protocol]){for(var de=(p.pathname||"").split("/");de.length&&!(p.host=de.shift()););p.host||(p.host=""),p.hostname||(p.hostname=""),de[0]!==""&&de.unshift(""),de.length<2&&de.unshift(""),O.pathname=de.join("/")}else O.pathname=p.pathname;if(O.search=p.search,O.query=p.query,O.host=p.host||"",O.auth=p.auth,O.hostname=p.hostname||p.host,O.port=p.port,O.pathname||O.search){var A=O.pathname||"",H=O.search||"";O.path=A+H}return O.slashes=O.slashes||p.slashes,O.href=O.format(),O}var U=O.pathname&&O.pathname.charAt(0)==="/",I=p.host||p.pathname&&p.pathname.charAt(0)==="/",G=I||U||O.host&&p.pathname,ne=G,oe=O.pathname&&O.pathname.split("/")||[],de=p.pathname&&p.pathname.split("/")||[],Oe=O.protocol&&!f[O.protocol];if(Oe&&(O.hostname="",O.port=null,O.host&&(oe[0]===""?oe[0]=O.host:oe.unshift(O.host)),O.host="",p.protocol&&(p.hostname=null,p.port=null,p.host&&(de[0]===""?de[0]=p.host:de.unshift(p.host)),p.host=null),G=G&&(de[0]===""||oe[0]==="")),I)O.host=p.host||p.host===""?p.host:O.host,O.hostname=p.hostname||p.hostname===""?p.hostname:O.hostname,O.search=p.search,O.query=p.query,oe=de;else if(de.length)oe||(oe=[]),oe.pop(),oe=oe.concat(de),O.search=p.search,O.query=p.query;else if(!v.isNullOrUndefined(p.search)){if(Oe){O.hostname=O.host=oe.shift();var Ae=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;Ae&&(O.auth=Ae.shift(),O.host=O.hostname=Ae.shift())}return O.search=p.search,O.query=p.query,(!v.isNull(O.pathname)||!v.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!oe.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var pe=oe.slice(-1)[0],Se=(O.host||p.host||oe.length>1)&&(pe==="."||pe==="..")||pe==="",be=0,se=oe.length;se>=0;se--)pe=oe[se],pe==="."?oe.splice(se,1):pe===".."?(oe.splice(se,1),be++):be&&(oe.splice(se,1),be--);if(!G&&!ne)for(;be--;be)oe.unshift("..");G&&oe[0]!==""&&(!oe[0]||oe[0].charAt(0)!=="/")&&oe.unshift(""),Se&&oe.join("/").substr(-1)!=="/"&&oe.push("");var ee=oe[0]===""||oe[0]&&oe[0].charAt(0)==="/";if(Oe){O.hostname=O.host=ee?"":oe.length?oe.shift():"";var Ae=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;Ae&&(O.auth=Ae.shift(),O.host=O.hostname=Ae.shift())}return G=G||O.host&&oe.length,G&&!ee&&oe.unshift(""),oe.length?O.pathname=oe.join("/"):(O.pathname=null,O.path=null),(!v.isNull(O.pathname)||!v.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=p.auth||O.auth,O.slashes=O.slashes||p.slashes,O.href=O.format(),O},C.prototype.parseHost=function(){var p=this.host,R=g.exec(p);R&&(R=R[0],R!==":"&&(this.port=R.substr(1)),p=p.substr(0,p.length-R.length)),p&&(this.hostname=p)}},{"./util":239,punycode:209,querystring:212}],239:[function(W,q,D){"use strict";q.exports={isString:function(P){return typeof P=="string"},isObject:function(P){return typeof P=="object"&&P!==null},isNull:function(P){return P===null},isNullOrUndefined:function(P){return P==null}}},{}],240:[function(W,q,D){(function(P){q.exports=v;function v(N,g){if(C("noDeprecation"))return N;var m=!1;function S(){if(!m){if(C("throwDeprecation"))throw new Error(g);C("traceDeprecation")?console.trace(g):console.warn(g),m=!0}return N.apply(this,arguments)}return S}function C(N){try{if(!P.localStorage)return!1}catch(m){return!1}var g=P.localStorage[N];return g==null?!1:String(g).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(W,q,D){typeof Object.create=="function"?q.exports=function(v,C){v.super_=C,v.prototype=Object.create(C.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}})}:q.exports=function(v,C){v.super_=C;var N=function(){};N.prototype=C.prototype,v.prototype=new N,v.prototype.constructor=v}},{}],242:[function(W,q,D){q.exports=function(v){return v&&typeof v=="object"&&typeof v.copy=="function"&&typeof v.fill=="function"&&typeof v.readUInt8=="function"}},{}],243:[function(W,q,D){(function(P,v){var C=/%[sdj%]/g;D.format=function(A){if(!x(A)){for(var H=[],U=0;U<arguments.length;U++)H.push(m(arguments[U]));return H.join(" ")}for(var U=1,I=arguments,G=I.length,ne=String(A).replace(C,function(de){if(de==="%%")return"%";if(U>=G)return de;switch(de){case"%s":return String(I[U++]);case"%d":return Number(I[U++]);case"%j":try{return JSON.stringify(I[U++])}catch(Oe){return"[Circular]"}default:return de}}),oe=I[U];U<G;oe=I[++U])l(oe)||!O(oe)?ne+=" "+oe:ne+=" "+m(oe);return ne},D.deprecate=function(A,H){if(p(v.process))return function(){return D.deprecate(A,H).apply(this,arguments)};if(P.noDeprecation===!0)return A;var U=!1;function I(){if(!U){if(P.throwDeprecation)throw new Error(H);P.traceDeprecation?console.trace(H):console.error(H),U=!0}return A.apply(this,arguments)}return I};var N={},g;D.debuglog=function(A){if(p(g)&&(g=P.env.NODE_DEBUG||""),A=A.toUpperCase(),!N[A])if(new RegExp("\\b"+A+"\\b","i").test(g)){var H=P.pid;N[A]=function(){var U=D.format.apply(D,arguments);console.error("%s %d: %s",A,H,U)}}else N[A]=function(){};return N[A]};function m(A,H){var U={seen:[],stylize:_};return arguments.length>=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),f(H)?U.showHidden=H:H&&D._extend(U,H),p(U.showHidden)&&(U.showHidden=!1),p(U.depth)&&(U.depth=2),p(U.colors)&&(U.colors=!1),p(U.customInspect)&&(U.customInspect=!0),U.colors&&(U.stylize=S),d(U,A,U.depth)}D.inspect=m,m.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},m.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function S(A,H){var U=m.styles[H];return U?"["+m.colors[U][0]+"m"+A+"["+m.colors[U][1]+"m":A}function _(A,H){return A}function t(A){var H={};return A.forEach(function(U,I){H[U]=!0}),H}function d(A,H,U){if(A.customInspect&&H&&w(H.inspect)&&H.inspect!==D.inspect&&!(H.constructor&&H.constructor.prototype===H)){var I=H.inspect(U,A);return x(I)||(I=d(A,I,U)),I}var G=i(A,H);if(G)return G;var ne=Object.keys(H),oe=t(ne);if(A.showHidden&&(ne=Object.getOwnPropertyNames(H)),E(H)&&(ne.indexOf("message")>=0||ne.indexOf("description")>=0))return c(H);if(ne.length===0){if(w(H)){var de=H.name?": "+H.name:"";return A.stylize("[Function"+de+"]","special")}if(R(H))return A.stylize(RegExp.prototype.toString.call(H),"regexp");if(b(H))return A.stylize(Date.prototype.toString.call(H),"date");if(E(H))return c(H)}var Oe="",Ae=!1,pe=["{","}"];if(h(H)&&(Ae=!0,pe=["[","]"]),w(H)){var Se=H.name?": "+H.name:"";Oe=" [Function"+Se+"]"}if(R(H)&&(Oe=" "+RegExp.prototype.toString.call(H)),b(H)&&(Oe=" "+Date.prototype.toUTCString.call(H)),E(H)&&(Oe=" "+c(H)),ne.length===0&&(!Ae||H.length==0))return pe[0]+Oe+pe[1];if(U<0)return R(H)?A.stylize(RegExp.prototype.toString.call(H),"regexp"):A.stylize("[Object]","special");A.seen.push(H);var be;return Ae?be=o(A,H,U,oe,ne):be=ne.map(function(se){return n(A,H,U,oe,se,Ae)}),A.seen.pop(),s(be,Oe,pe)}function i(A,H){if(p(H))return A.stylize("undefined","undefined");if(x(H)){var U="'"+JSON.stringify(H).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return A.stylize(U,"string")}if(r(H))return A.stylize(""+H,"number");if(f(H))return A.stylize(""+H,"boolean");if(l(H))return A.stylize("null","null")}function c(A){return"["+Error.prototype.toString.call(A)+"]"}function o(A,H,U,I,G){for(var ne=[],oe=0,de=H.length;oe<de;++oe)K(H,String(oe))?ne.push(n(A,H,U,I,String(oe),!0)):ne.push("");return G.forEach(function(Oe){Oe.match(/^\d+$/)||ne.push(n(A,H,U,I,Oe,!0))}),ne}function n(A,H,U,I,G,ne){var oe,de,Oe;if(Oe=Object.getOwnPropertyDescriptor(H,G)||{value:H[G]},Oe.get?Oe.set?de=A.stylize("[Getter/Setter]","special"):de=A.stylize("[Getter]","special"):Oe.set&&(de=A.stylize("[Setter]","special")),K(I,G)||(oe="["+G+"]"),de||(A.seen.indexOf(Oe.value)<0?(l(U)?de=d(A,Oe.value,null):de=d(A,Oe.value,U-1),de.indexOf(`
|
|
|
`)>-1&&(ne?de=de.split(`
|
|
|
`).map(function(Ae){return" "+Ae}).join(`
|
|
|
`).substr(2):de=`
|
|
|
`+de.split(`
|
|
|
`).map(function(Ae){return" "+Ae}).join(`
|
|
|
`))):de=A.stylize("[Circular]","special")),p(oe)){if(ne&&G.match(/^\d+$/))return de;oe=JSON.stringify(""+G),oe.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(oe=oe.substr(1,oe.length-2),oe=A.stylize(oe,"name")):(oe=oe.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),oe=A.stylize(oe,"string"))}return oe+": "+de}function s(A,H,U){var I=0,G=A.reduce(function(ne,oe){return I++,oe.indexOf(`
|
|
|
`)>=0&&I++,ne+oe.replace(/\u001b\[\d\d?m/g,"").length+1},0);return G>60?U[0]+(H===""?"":H+`
|
|
|
`)+" "+A.join(`,
|
|
|
`)+" "+U[1]:U[0]+H+" "+A.join(", ")+" "+U[1]}function h(A){return Array.isArray(A)}D.isArray=h;function f(A){return typeof A=="boolean"}D.isBoolean=f;function l(A){return A===null}D.isNull=l;function a(A){return A==null}D.isNullOrUndefined=a;function r(A){return typeof A=="number"}D.isNumber=r;function x(A){return typeof A=="string"}D.isString=x;function y(A){return typeof A=="symbol"}D.isSymbol=y;function p(A){return A===void 0}D.isUndefined=p;function R(A){return O(A)&&F(A)==="[object RegExp]"}D.isRegExp=R;function O(A){return typeof A=="object"&&A!==null}D.isObject=O;function b(A){return O(A)&&F(A)==="[object Date]"}D.isDate=b;function E(A){return O(A)&&(F(A)==="[object Error]"||A instanceof Error)}D.isError=E;function w(A){return typeof A=="function"}D.isFunction=w;function T(A){return A===null||typeof A=="boolean"||typeof A=="number"||typeof A=="string"||typeof A=="symbol"||typeof A=="undefined"}D.isPrimitive=T,D.isBuffer=W("./support/isBuffer");function F(A){return Object.prototype.toString.call(A)}function M(A){return A<10?"0"+A.toString(10):A.toString(10)}var L=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Y(){var A=new Date,H=[M(A.getHours()),M(A.getMinutes()),M(A.getSeconds())].join(":");return[A.getDate(),L[A.getMonth()],H].join(" ")}D.log=function(){console.log("%s - %s",Y(),D.format.apply(D,arguments))},D.inherits=W("inherits"),D._extend=function(A,H){if(!H||!O(H))return A;for(var U=Object.keys(H),I=U.length;I--;)A[U[I]]=H[U[I]];return A};function K(A,H){return Object.prototype.hasOwnProperty.call(A,H)}}).call(this,W("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(W,q,D){"use strict";(function(){"use strict";D.stripBOM=function(P){return P[0]==="\uFEFF"?P.substring(1):P}}).call(void 0)},{}],245:[function(W,q,D){"use strict";var P=W("babel-runtime/helpers/typeof"),v=g(P),C=W("babel-runtime/core-js/object/keys"),N=g(C);function g(m){return m&&m.__esModule?m:{default:m}}(function(){"use strict";var m,S,_,t,d,i={}.hasOwnProperty;m=W("xmlbuilder"),S=W("./defaults").defaults,t=function(o){return typeof o=="string"&&(o.indexOf("&")>=0||o.indexOf(">")>=0||o.indexOf("<")>=0)},d=function(o){return"<![CDATA["+_(o)+"]]>"},_=function(o){return o.replace("]]>","]]]]><![CDATA[>")},D.Builder=function(){function c(o){var n,s,h;this.options={},s=S["0.2"];for(n in s){if(!i.call(s,n))continue;h=s[n],this.options[n]=h}for(n in o){if(!i.call(o,n))continue;h=o[n],this.options[n]=h}}return c.prototype.buildObject=function(o){var n,s,h,f,l;return n=this.options.attrkey,s=this.options.charkey,(0,N.default)(o).length===1&&this.options.rootName===S["0.2"].rootName?(l=(0,N.default)(o)[0],o=o[l]):l=this.options.rootName,h=function(a){return function(r,x){var y,p,R,O,b,E;if((typeof x=="undefined"?"undefined":(0,v.default)(x))!=="object")a.options.cdata&&t(x)?r.raw(d(x)):r.txt(x);else if(Array.isArray(x))for(O in x){if(!i.call(x,O))continue;p=x[O];for(b in p)R=p[b],r=h(r.ele(b),R).up()}else for(b in x){if(!i.call(x,b))continue;if(p=x[b],b===n){if((typeof p=="undefined"?"undefined":(0,v.default)(p))==="object")for(y in p)E=p[y],r=r.att(y,E)}else if(b===s)a.options.cdata&&t(p)?r=r.raw(d(p)):r=r.txt(p);else if(Array.isArray(p))for(O in p){if(!i.call(p,O))continue;R=p[O],typeof R=="string"?a.options.cdata&&t(R)?r=r.ele(b).raw(d(R)).up():r=r.ele(b,R).up():r=h(r.ele(b),R).up()}else(typeof p=="undefined"?"undefined":(0,v.default)(p))==="object"?r=h(r.ele(b),p).up():typeof p=="string"&&a.options.cdata&&t(p)?r=r.ele(b).raw(d(p)).up():(p==null&&(p=""),r=r.ele(b,p.toString()).up())}return r}}(this),f=m.create(l,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),h(f,o).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(W,q,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(W,q,D){"use strict";var P=W("babel-runtime/core-js/promise"),v=t(P),C=W("babel-runtime/core-js/object/get-own-property-names"),N=t(C),g=W("babel-runtime/core-js/object/keys"),m=t(g),S=W("babel-runtime/helpers/typeof"),_=t(S);function t(d){return d&&d.__esModule?d:{default:d}}(function(){"use strict";var d,i,c,o,n,s,h,f,l=function(y,p){return function(){return y.apply(p,arguments)}},a=function(y,p){for(var R in p)r.call(p,R)&&(y[R]=p[R]);function O(){this.constructor=y}return O.prototype=p.prototype,y.prototype=new O,y.__super__=p.prototype,y},r={}.hasOwnProperty;h=W("sax"),c=W("events"),d=W("./bom"),s=W("./processors"),f=W("timers").setImmediate,i=W("./defaults").defaults,o=function(y){return(typeof y=="undefined"?"undefined":(0,_.default)(y))==="object"&&y!=null&&(0,m.default)(y).length===0},n=function(y,p,R){var O,b,E;for(O=0,b=y.length;O<b;O++)E=y[O],p=E(p,R);return p},D.Parser=function(x){a(y,x);function y(p){this.parseStringPromise=l(this.parseStringPromise,this),this.parseString=l(this.parseString,this),this.reset=l(this.reset,this),this.assignOrPush=l(this.assignOrPush,this),this.processAsync=l(this.processAsync,this);var R,O,b;if(!(this instanceof D.Parser))return new D.Parser(p);this.options={},O=i["0.2"];for(R in O){if(!r.call(O,R))continue;b=O[R],this.options[R]=b}for(R in p){if(!r.call(p,R))continue;b=p[R],this.options[R]=b}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(s.normalize)),this.reset()}return y.prototype.processAsync=function(){var p,R;try{return this.remaining.length<=this.options.chunkSize?(p=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(p),this.saxParser.close()):(p=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(p),f(this.processAsync))}catch(O){if(R=O,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(R)}},y.prototype.assignOrPush=function(p,R,O){return R in p?(p[R]instanceof Array||(p[R]=[p[R]]),p[R].push(O)):this.options.explicitArray?p[R]=[O]:p[R]=O},y.prototype.reset=function(){var p,R,O,b;return this.removeAllListeners(),this.saxParser=h.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(E){return function(w){if(E.saxParser.resume(),!E.saxParser.errThrown)return E.saxParser.errThrown=!0,E.emit("error",w)}}(this),this.saxParser.onend=function(E){return function(){if(!E.saxParser.ended)return E.saxParser.ended=!0,E.emit("end",E.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,b=[],p=this.options.attrkey,R=this.options.charkey,this.saxParser.onopentag=function(E){return function(w){var T,F,M,L,Y;if(M={},M[R]="",!E.options.ignoreAttrs){Y=w.attributes;for(T in Y){if(!r.call(Y,T))continue;!(p in M)&&!E.options.mergeAttrs&&(M[p]={}),F=E.options.attrValueProcessors?n(E.options.attrValueProcessors,w.attributes[T],T):w.attributes[T],L=E.options.attrNameProcessors?n(E.options.attrNameProcessors,T):T,E.options.mergeAttrs?E.assignOrPush(M,L,F):M[p][L]=F}}return M["#name"]=E.options.tagNameProcessors?n(E.options.tagNameProcessors,w.name):w.name,E.options.xmlns&&(M[E.options.xmlnskey]={uri:w.uri,local:w.local}),b.push(M)}}(this),this.saxParser.onclosetag=function(E){return function(){var w,T,F,M,L,Y,K,A,H,U;if(Y=b.pop(),L=Y["#name"],(!E.options.explicitChildren||!E.options.preserveChildrenOrder)&&delete Y["#name"],Y.cdata===!0&&(w=Y.cdata,delete Y.cdata),H=b[b.length-1],Y[R].match(/^\s*$/)&&!w?(T=Y[R],delete Y[R]):(E.options.trim&&(Y[R]=Y[R].trim()),E.options.normalize&&(Y[R]=Y[R].replace(/\s{2,}/g," ").trim()),Y[R]=E.options.valueProcessors?n(E.options.valueProcessors,Y[R],L):Y[R],(0,m.default)(Y).length===1&&R in Y&&!E.EXPLICIT_CHARKEY&&(Y=Y[R])),o(Y)&&(Y=E.options.emptyTag!==""?E.options.emptyTag:T),E.options.validator!=null&&(U="/"+function(){var I,G,ne;for(ne=[],I=0,G=b.length;I<G;I++)M=b[I],ne.push(M["#name"]);return ne}().concat(L).join("/"),function(){var I;try{return Y=E.options.validator(U,H&&H[L],Y)}catch(G){return I=G,E.emit("error",I)}}()),E.options.explicitChildren&&!E.options.mergeAttrs&&(typeof Y=="undefined"?"undefined":(0,_.default)(Y))==="object"){if(!E.options.preserveChildrenOrder)M={},E.options.attrkey in Y&&(M[E.options.attrkey]=Y[E.options.attrkey],delete Y[E.options.attrkey]),!E.options.charsAsChildren&&E.options.charkey in Y&&(M[E.options.charkey]=Y[E.options.charkey],delete Y[E.options.charkey]),(0,N.default)(Y).length>0&&(M[E.options.childkey]=Y),Y=M;else if(H){H[E.options.childkey]=H[E.options.childkey]||[],K={};for(F in Y){if(!r.call(Y,F))continue;K[F]=Y[F]}H[E.options.childkey].push(K),delete Y["#name"],(0,m.default)(Y).length===1&&R in Y&&!E.EXPLICIT_CHARKEY&&(Y=Y[R])}}return b.length>0?E.assignOrPush(H,L,Y):(E.options.explicitRoot&&(A=Y,Y={},Y[L]=A),E.resultObject=Y,E.saxParser.ended=!0,E.emit("end",E.resultObject))}}(this),O=function(E){return function(w){var T,F;if(F=b[b.length-1],F)return F[R]+=w,E.options.explicitChildren&&E.options.preserveChildrenOrder&&E.options.charsAsChildren&&(E.options.includeWhiteChars||w.replace(/\\n/g,"").trim()!=="")&&(F[E.options.childkey]=F[E.options.childkey]||[],T={"#name":"__text__"},T[R]=w,E.options.normalize&&(T[R]=T[R].replace(/\s{2,}/g," ").trim()),F[E.options.childkey].push(T)),F}}(this),this.saxParser.ontext=O,this.saxParser.oncdata=function(E){return function(w){var T;if(T=O(w),T)return T.cdata=!0}}(this)},y.prototype.parseString=function(p,R){var O;R!=null&&typeof R=="function"&&(this.on("end",function(b){return this.reset(),R(null,b)}),this.on("error",function(b){return this.reset(),R(b)}));try{return p=p.toString(),p.trim()===""?(this.emit("end",null),!0):(p=d.stripBOM(p),this.options.async?(this.remaining=p,f(this.processAsync),this.saxParser):this.saxParser.write(p).close())}catch(b){if(O=b,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw O}else return this.emit("error",O),this.saxParser.errThrown=!0}},y.prototype.parseStringPromise=function(p){return new v.default(function(R){return function(O,b){return R.parseString(p,function(E,w){return E?b(E):O(w)})}}(this))},y}(c),D.parseString=function(x,y,p){var R,O,b;return p!=null?(typeof p=="function"&&(R=p),(typeof y=="undefined"?"undefined":(0,_.default)(y))==="object"&&(O=y)):(typeof y=="function"&&(R=y),O={}),b=new D.Parser(O),b.parseString(x,R)},D.parseStringPromise=function(x,y){var p,R;return(typeof y=="undefined"?"undefined":(0,_.default)(y))==="object"&&(p=y),R=new D.Parser(p),R.parseStringPromise(x)}}).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(W,q,D){"use strict";(function(){"use strict";var P;P=new RegExp(/(?!xmlns)^.*:/),D.normalize=function(v){return v.toLowerCase()},D.firstCharLowerCase=function(v){return v.charAt(0).toLowerCase()+v.slice(1)},D.stripPrefix=function(v){return v.replace(P,"")},D.parseNumbers=function(v){return isNaN(v)||(v=v%1===0?parseInt(v,10):parseFloat(v)),v},D.parseBooleans=function(v){return/^(?:true|false)$/i.test(v)&&(v=v.toLowerCase()==="true"),v}}).call(void 0)},{}],249:[function(W,q,D){"use strict";(function(){"use strict";var P,v,C,N,g=function(_,t){for(var d in t)m.call(t,d)&&(_[d]=t[d]);function i(){this.constructor=_}return i.prototype=t.prototype,_.prototype=new i,_.__super__=t.prototype,_},m={}.hasOwnProperty;v=W("./defaults"),P=W("./builder"),C=W("./parser"),N=W("./processors"),D.defaults=v.defaults,D.processors=N,D.ValidationError=function(S){g(_,S);function _(t){this.message=t}return _}(Error),D.Builder=P.Builder,D.Parser=C.Parser,D.parseString=C.parseString,D.parseStringPromise=C.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(W,q,D){"use strict";(function(){q.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(W,q,D){"use strict";(function(){q.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(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/get-prototype-of"),v=S(P),C=W("babel-runtime/helpers/typeof"),N=S(C),g=W("babel-runtime/core-js/object/assign"),m=S(g);function S(_){return _&&_.__esModule?_:{default:_}}(function(){var _,t,d,i,c,o,n,s=[].slice,h={}.hasOwnProperty;_=function(){var l,a,r,x,y,p;if(p=arguments[0],y=2<=arguments.length?s.call(arguments,1):[],c(m.default))m.default.apply(null,arguments);else for(l=0,r=y.length;l<r;l++)if(x=y[l],x!=null)for(a in x){if(!h.call(x,a))continue;p[a]=x[a]}return p},c=function(l){return!!l&&Object.prototype.toString.call(l)==="[object Function]"},o=function(l){var a;return!!l&&((a=typeof l=="undefined"?"undefined":(0,N.default)(l))==="function"||a==="object")},d=function(l){return c(Array.isArray)?Array.isArray(l):Object.prototype.toString.call(l)==="[object Array]"},i=function(l){var a;if(d(l))return!l.length;for(a in l){if(!h.call(l,a))continue;return!1}return!0},n=function(l){var a,r;return o(l)&&(r=(0,v.default)(l))&&(a=r.constructor)&&typeof a=="function"&&a instanceof a&&Function.prototype.toString.call(a)===Function.prototype.toString.call(Object)},t=function(l){return c(l.valueOf)?l.valueOf():l},q.exports.assign=_,q.exports.isFunction=c,q.exports.isObject=o,q.exports.isArray=d,q.exports.isEmpty=i,q.exports.isPlainObject=n,q.exports.getValue=t}).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(W,q,D){"use strict";(function(){q.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/create"),v=C(P);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,g,m;N=W("./NodeType"),m=W("./XMLNode"),q.exports=g=function(){function S(_,t,d){if(this.parent=_,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),t==null)throw new Error("Missing attribute name. "+this.debugInfo(t));this.name=this.stringify.name(t),this.value=this.stringify.attValue(d),this.type=N.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(t){return this.value=t||""}}),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,v.default)(this)},S.prototype.toString=function(_){return this.options.writer.attribute(this,this.options.writer.filterOptions(_))},S.prototype.debugInfo=function(_){return _=_||this.name,_==null?"parent: <"+this.parent.name+">":"attribute: {"+_+"}, parent: <"+this.parent.name+">"},S.prototype.isEqualNode=function(_){return _.namespaceURI!==this.namespaceURI||(_.prefix!==this.prefix||_.localName!==this.localName)?!1:!(_.value!==this.value)},S}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/create"),v=C(P);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,g,m,S=function(d,i){for(var c in i)_.call(i,c)&&(d[c]=i[c]);function o(){this.constructor=d}return o.prototype=i.prototype,d.prototype=new o,d.__super__=i.prototype,d},_={}.hasOwnProperty;N=W("./NodeType"),m=W("./XMLCharacterData"),q.exports=g=function(t){S(d,t);function d(i,c){if(d.__super__.constructor.call(this,i),c==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=N.CData,this.value=this.stringify.cdata(c)}return d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(i){return this.options.writer.cdata(this,this.options.writer.filterOptions(i))},d}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/create"),v=C(P);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,g,m=function(t,d){for(var i in d)S.call(d,i)&&(t[i]=d[i]);function c(){this.constructor=t}return c.prototype=d.prototype,t.prototype=new c,t.__super__=d.prototype,t},S={}.hasOwnProperty;g=W("./XMLNode"),q.exports=N=function(_){m(t,_);function t(d){t.__super__.constructor.call(this,d),this.value=""}return Object.defineProperty(t.prototype,"data",{get:function(){return this.value},set:function(i){return this.value=i||""}}),Object.defineProperty(t.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(i){return this.value=i||""}}),t.prototype.clone=function(){return(0,v.default)(this)},t.prototype.substringData=function(d,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.appendData=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.insertData=function(d,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.deleteData=function(d,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.replaceData=function(d,i,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isEqualNode=function(d){return t.__super__.isEqualNode.apply(this,arguments).isEqualNode(d)?!(d.data!==this.data):!1},t}(g)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/create"),v=C(P);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,g,m,S=function(d,i){for(var c in i)_.call(i,c)&&(d[c]=i[c]);function o(){this.constructor=d}return o.prototype=i.prototype,d.prototype=new o,d.__super__=i.prototype,d},_={}.hasOwnProperty;N=W("./NodeType"),g=W("./XMLCharacterData"),q.exports=m=function(t){S(d,t);function d(i,c){if(d.__super__.constructor.call(this,i),c==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=N.Comment,this.value=this.stringify.comment(c)}return d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(i){return this.options.writer.comment(this,this.options.writer.filterOptions(i))},d}(g)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/keys"),v=g(P),C=W("babel-runtime/core-js/object/create"),N=g(C);function g(m){return m&&m.__esModule?m:{default:m}}(function(){var m,S,_;S=W("./XMLDOMErrorHandler"),_=W("./XMLDOMStringList"),q.exports=m=function(){function t(){var d;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new S,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=d=(0,N.default)(this.defaultParams)}return Object.defineProperty(t.prototype,"parameterNames",{get:function(){return new _((0,v.default)(this.defaultParams))}}),t.prototype.getParameter=function(d){return this.params.hasOwnProperty(d)?this.params[d]:null},t.prototype.canSetParameter=function(d,i){return!0},t.prototype.setParameter=function(d,i){return i!=null?this.params[d]=i:delete this.params[d]},t}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(W,q,D){"use strict";(function(){var P;q.exports=P=function(){function v(){}return v.prototype.handleError=function(C){throw new Error(C)},v}()}).call(void 0)},{}],260:[function(W,q,D){"use strict";(function(){var P;q.exports=P=function(){function v(){}return v.prototype.hasFeature=function(C,N){return!0},v.prototype.createDocumentType=function(C,N,g){throw new Error("This DOM method is not implemented.")},v.prototype.createDocument=function(C,N,g){throw new Error("This DOM method is not implemented.")},v.prototype.createHTMLDocument=function(C){throw new Error("This DOM method is not implemented.")},v.prototype.getFeature=function(C,N){throw new Error("This DOM method is not implemented.")},v}()}).call(void 0)},{}],261:[function(W,q,D){"use strict";(function(){var P;q.exports=P=function(){function v(C){this.arr=C||[]}return Object.defineProperty(v.prototype,"length",{get:function(){return this.arr.length}}),v.prototype.item=function(C){return this.arr[C]||null},v.prototype.contains=function(C){return this.arr.indexOf(C)!==-1},v}()}).call(void 0)},{}],262:[function(W,q,D){"use strict";(function(){var P,v,C,N=function(S,_){for(var t in _)g.call(_,t)&&(S[t]=_[t]);function d(){this.constructor=S}return d.prototype=_.prototype,S.prototype=new d,S.__super__=_.prototype,S},g={}.hasOwnProperty;C=W("./XMLNode"),P=W("./NodeType"),q.exports=v=function(m){N(S,m);function S(_,t,d,i,c,o){if(S.__super__.constructor.call(this,_),t==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(d==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(t));if(!i)throw new Error("Missing DTD attribute type. "+this.debugInfo(t));if(!c)throw new Error("Missing DTD attribute default. "+this.debugInfo(t));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(t));if(o&&!c.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(t));this.elementName=this.stringify.name(t),this.type=P.AttributeDeclaration,this.attributeName=this.stringify.name(d),this.attributeType=this.stringify.dtdAttType(i),o&&(this.defaultValue=this.stringify.dtdAttDefault(o)),this.defaultValueType=c}return S.prototype.toString=function(_){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(_))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(W,q,D){"use strict";(function(){var P,v,C,N=function(S,_){for(var t in _)g.call(_,t)&&(S[t]=_[t]);function d(){this.constructor=S}return d.prototype=_.prototype,S.prototype=new d,S.__super__=_.prototype,S},g={}.hasOwnProperty;C=W("./XMLNode"),P=W("./NodeType"),q.exports=v=function(m){N(S,m);function S(_,t,d){if(S.__super__.constructor.call(this,_),t==null)throw new Error("Missing DTD element name. "+this.debugInfo());d||(d="(#PCDATA)"),Array.isArray(d)&&(d="("+d.join(",")+")"),this.name=this.stringify.name(t),this.type=P.ElementDeclaration,this.value=this.stringify.dtdElementValue(d)}return S.prototype.toString=function(_){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(_))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(W,q,D){"use strict";(function(){var P,v,C,N,g=function(_,t){for(var d in t)m.call(t,d)&&(_[d]=t[d]);function i(){this.constructor=_}return i.prototype=t.prototype,_.prototype=new i,_.__super__=t.prototype,_},m={}.hasOwnProperty;N=W("./Utility").isObject,C=W("./XMLNode"),P=W("./NodeType"),q.exports=v=function(S){g(_,S);function _(t,d,i,c){if(_.__super__.constructor.call(this,t),i==null)throw new Error("Missing DTD entity name. "+this.debugInfo(i));if(c==null)throw new Error("Missing DTD entity value. "+this.debugInfo(i));if(this.pe=!!d,this.name=this.stringify.name(i),this.type=P.EntityDeclaration,!N(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(i));if(c.pubID&&!c.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(i));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(i))}}return Object.defineProperty(_.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(_.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(_.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(_.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(_.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(_.prototype,"xmlVersion",{get:function(){return null}}),_.prototype.toString=function(t){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(t))},_}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(W,q,D){"use strict";(function(){var P,v,C,N=function(S,_){for(var t in _)g.call(_,t)&&(S[t]=_[t]);function d(){this.constructor=S}return d.prototype=_.prototype,S.prototype=new d,S.__super__=_.prototype,S},g={}.hasOwnProperty;C=W("./XMLNode"),P=W("./NodeType"),q.exports=v=function(m){N(S,m);function S(_,t,d){if(S.__super__.constructor.call(this,_),t==null)throw new Error("Missing DTD notation name. "+this.debugInfo(t));if(!d.pubID&&!d.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(t));this.name=this.stringify.name(t),this.type=P.NotationDeclaration,d.pubID!=null&&(this.pubID=this.stringify.dtdPubID(d.pubID)),d.sysID!=null&&(this.sysID=this.stringify.dtdSysID(d.sysID))}return Object.defineProperty(S.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(S.prototype,"systemId",{get:function(){return this.sysID}}),S.prototype.toString=function(_){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(_))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(W,q,D){"use strict";(function(){var P,v,C,N,g=function(_,t){for(var d in t)m.call(t,d)&&(_[d]=t[d]);function i(){this.constructor=_}return i.prototype=t.prototype,_.prototype=new i,_.__super__=t.prototype,_},m={}.hasOwnProperty;N=W("./Utility").isObject,C=W("./XMLNode"),P=W("./NodeType"),q.exports=v=function(S){g(_,S);function _(t,d,i,c){var o;_.__super__.constructor.call(this,t),N(d)&&(o=d,d=o.version,i=o.encoding,c=o.standalone),d||(d="1.0"),this.type=P.Declaration,this.version=this.stringify.xmlVersion(d),i!=null&&(this.encoding=this.stringify.xmlEncoding(i)),c!=null&&(this.standalone=this.stringify.xmlStandalone(c))}return _.prototype.toString=function(t){return this.options.writer.declaration(this,this.options.writer.filterOptions(t))},_}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(W,q,D){"use strict";(function(){var P,v,C,N,g,m,S,_,t,d=function(o,n){for(var s in n)i.call(n,s)&&(o[s]=n[s]);function h(){this.constructor=o}return h.prototype=n.prototype,o.prototype=new h,o.__super__=n.prototype,o},i={}.hasOwnProperty;t=W("./Utility").isObject,_=W("./XMLNode"),P=W("./NodeType"),v=W("./XMLDTDAttList"),N=W("./XMLDTDEntity"),C=W("./XMLDTDElement"),g=W("./XMLDTDNotation"),S=W("./XMLNamedNodeMap"),q.exports=m=function(c){d(o,c);function o(n,s,h){var f,l,a,r,x,y;if(o.__super__.constructor.call(this,n),this.type=P.DocType,n.children){for(r=n.children,l=0,a=r.length;l<a;l++)if(f=r[l],f.type===P.Element){this.name=f.name;break}}this.documentObject=n,t(s)&&(x=s,s=x.pubID,h=x.sysID),h==null&&(y=[s,h],h=y[0],s=y[1]),s!=null&&(this.pubID=this.stringify.dtdPubID(s)),h!=null&&(this.sysID=this.stringify.dtdSysID(h))}return Object.defineProperty(o.prototype,"entities",{get:function(){var s,h,f,l,a;for(l={},a=this.children,h=0,f=a.length;h<f;h++)s=a[h],s.type===P.EntityDeclaration&&!s.pe&&(l[s.name]=s);return new S(l)}}),Object.defineProperty(o.prototype,"notations",{get:function(){var s,h,f,l,a;for(l={},a=this.children,h=0,f=a.length;h<f;h++)s=a[h],s.type===P.NotationDeclaration&&(l[s.name]=s);return new S(l)}}),Object.defineProperty(o.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(o.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(o.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),o.prototype.element=function(n,s){var h;return h=new C(this,n,s),this.children.push(h),this},o.prototype.attList=function(n,s,h,f,l){var a;return a=new v(this,n,s,h,f,l),this.children.push(a),this},o.prototype.entity=function(n,s){var h;return h=new N(this,!1,n,s),this.children.push(h),this},o.prototype.pEntity=function(n,s){var h;return h=new N(this,!0,n,s),this.children.push(h),this},o.prototype.notation=function(n,s){var h;return h=new g(this,n,s),this.children.push(h),this},o.prototype.toString=function(n){return this.options.writer.docType(this,this.options.writer.filterOptions(n))},o.prototype.ele=function(n,s){return this.element(n,s)},o.prototype.att=function(n,s,h,f,l){return this.attList(n,s,h,f,l)},o.prototype.ent=function(n,s){return this.entity(n,s)},o.prototype.pent=function(n,s){return this.pEntity(n,s)},o.prototype.not=function(n,s){return this.notation(n,s)},o.prototype.up=function(){return this.root()||this.documentObject},o.prototype.isEqualNode=function(n){return o.__super__.isEqualNode.apply(this,arguments).isEqualNode(n)?n.name!==this.name||n.publicId!==this.publicId?!1:!(n.systemId!==this.systemId):!1},o}(_)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(W,q,D){"use strict";(function(){var P,v,C,N,g,m,S,_,t=function(c,o){for(var n in o)d.call(o,n)&&(c[n]=o[n]);function s(){this.constructor=c}return s.prototype=o.prototype,c.prototype=new s,c.__super__=o.prototype,c},d={}.hasOwnProperty;_=W("./Utility").isPlainObject,C=W("./XMLDOMImplementation"),v=W("./XMLDOMConfiguration"),g=W("./XMLNode"),P=W("./NodeType"),S=W("./XMLStringifier"),m=W("./XMLStringWriter"),q.exports=N=function(i){t(c,i);function c(o){c.__super__.constructor.call(this,null),this.name="#document",this.type=P.Document,this.documentURI=null,this.domConfig=new v,o||(o={}),o.writer||(o.writer=new m),this.options=o,this.stringify=new S(o)}return Object.defineProperty(c.prototype,"implementation",{value:new C}),Object.defineProperty(c.prototype,"doctype",{get:function(){var n,s,h,f;for(f=this.children,s=0,h=f.length;s<h;s++)if(n=f[s],n.type===P.DocType)return n;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===P.Declaration?this.children[0].encoding:null}}),Object.defineProperty(c.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(c.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===P.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(o){var n;return n={},o?_(o)&&(n=o,o=this.options.writer):o=this.options.writer,o.document(this,o.filterOptions(n))},c.prototype.toString=function(o){return this.options.writer.document(this,this.options.writer.filterOptions(o))},c.prototype.createElement=function(o){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(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createComment=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createCDATASection=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createProcessingInstruction=function(o,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createAttribute=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createEntityReference=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagName=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.importNode=function(o,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createElementNS=function(o,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createAttributeNS=function(o,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagNameNS=function(o,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementById=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.adoptNode=function(o){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(o,n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByClassName=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createEvent=function(o){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(o,n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createTreeWalker=function(o,n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},c}(g)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(W,q,D){"use strict";(function(){var P,v,C,N,g,m,S,_,t,d,i,c,o,n,s,h,f,l,a,r,x,y,p,R,O={}.hasOwnProperty;R=W("./Utility"),y=R.isObject,x=R.isFunction,p=R.isPlainObject,r=R.getValue,P=W("./NodeType"),c=W("./XMLDocument"),n=W("./XMLElement"),N=W("./XMLCData"),g=W("./XMLComment"),h=W("./XMLRaw"),a=W("./XMLText"),s=W("./XMLProcessingInstruction"),d=W("./XMLDeclaration"),i=W("./XMLDocType"),m=W("./XMLDTDAttList"),_=W("./XMLDTDEntity"),S=W("./XMLDTDElement"),t=W("./XMLDTDNotation"),C=W("./XMLAttribute"),l=W("./XMLStringifier"),f=W("./XMLStringWriter"),v=W("./WriterState"),q.exports=o=function(){function b(E,w,T){var F;this.name="?xml",this.type=P.Document,E||(E={}),F={},E.writer?p(E.writer)&&(F=E.writer,E.writer=new f):E.writer=new f,this.options=E,this.writer=E.writer,this.writerOptions=this.writer.filterOptions(F),this.stringify=new l(E),this.onDataCallback=w||function(){},this.onEndCallback=T||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return b.prototype.createChildNode=function(E){var w,T,F,M,L,Y,K,A;switch(E.type){case P.CData:this.cdata(E.value);break;case P.Comment:this.comment(E.value);break;case P.Element:F={},K=E.attribs;for(T in K){if(!O.call(K,T))continue;w=K[T],F[T]=w.value}this.node(E.name,F);break;case P.Dummy:this.dummy();break;case P.Raw:this.raw(E.value);break;case P.Text:this.text(E.value);break;case P.ProcessingInstruction:this.instruction(E.target,E.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+E.constructor.name)}for(A=E.children,L=0,Y=A.length;L<Y;L++)M=A[L],this.createChildNode(M),M.type===P.Element&&this.up();return this},b.prototype.dummy=function(){return this},b.prototype.node=function(E,w,T){var F;if(E==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(E));return this.openCurrent(),E=r(E),w==null&&(w={}),w=r(w),y(w)||(F=[w,T],T=F[0],w=F[1]),this.currentNode=new n(this,E,w),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,T!=null&&this.text(T),this},b.prototype.element=function(E,w,T){var F,M,L,Y,K,A;if(this.currentNode&&this.currentNode.type===P.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(E)||y(E)||x(E))for(Y=this.options.noValidation,this.options.noValidation=!0,A=new c(this.options).element("TEMP_ROOT"),A.element(E),this.options.noValidation=Y,K=A.children,M=0,L=K.length;M<L;M++)F=K[M],this.createChildNode(F),F.type===P.Element&&this.up();else this.node(E,w,T);return this},b.prototype.attribute=function(E,w){var T,F;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(E));if(E!=null&&(E=r(E)),y(E))for(T in E){if(!O.call(E,T))continue;F=E[T],this.attribute(T,F)}else x(w)&&(w=w.apply()),this.options.keepNullAttributes&&w==null?this.currentNode.attribs[E]=new C(this,E,""):w!=null&&(this.currentNode.attribs[E]=new C(this,E,w));return this},b.prototype.text=function(E){var w;return this.openCurrent(),w=new a(this,E),this.onData(this.writer.text(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.cdata=function(E){var w;return this.openCurrent(),w=new N(this,E),this.onData(this.writer.cdata(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.comment=function(E){var w;return this.openCurrent(),w=new g(this,E),this.onData(this.writer.comment(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.raw=function(E){var w;return this.openCurrent(),w=new h(this,E),this.onData(this.writer.raw(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.instruction=function(E,w){var T,F,M,L,Y;if(this.openCurrent(),E!=null&&(E=r(E)),w!=null&&(w=r(w)),Array.isArray(E))for(T=0,L=E.length;T<L;T++)F=E[T],this.instruction(F);else if(y(E))for(F in E){if(!O.call(E,F))continue;M=E[F],this.instruction(F,M)}else x(w)&&(w=w.apply()),Y=new s(this,E,w),this.onData(this.writer.processingInstruction(Y,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},b.prototype.declaration=function(E,w,T){var F;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return F=new d(this,E,w,T),this.onData(this.writer.declaration(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.doctype=function(E,w,T){if(this.openCurrent(),E==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 i(this,w,T),this.currentNode.rootNodeName=E,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},b.prototype.dtdElement=function(E,w){var T;return this.openCurrent(),T=new S(this,E,w),this.onData(this.writer.dtdElement(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.attList=function(E,w,T,F,M){var L;return this.openCurrent(),L=new m(this,E,w,T,F,M),this.onData(this.writer.dtdAttList(L,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.entity=function(E,w){var T;return this.openCurrent(),T=new _(this,!1,E,w),this.onData(this.writer.dtdEntity(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.pEntity=function(E,w){var T;return this.openCurrent(),T=new _(this,!0,E,w),this.onData(this.writer.dtdEntity(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.notation=function(E,w){var T;return this.openCurrent(),T=new t(this,E,w),this.onData(this.writer.dtdNotation(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},b.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},b.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},b.prototype.openNode=function(E){var w,T,F,M;if(!E.isOpen){if(!this.root&&this.currentLevel===0&&E.type===P.Element&&(this.root=E),T="",E.type===P.Element){this.writerOptions.state=v.OpenTag,T=this.writer.indent(E,this.writerOptions,this.currentLevel)+"<"+E.name,M=E.attribs;for(F in M){if(!O.call(M,F))continue;w=M[F],T+=this.writer.attribute(w,this.writerOptions,this.currentLevel)}T+=(E.children?">":"/>")+this.writer.endline(E,this.writerOptions,this.currentLevel),this.writerOptions.state=v.InsideTag}else this.writerOptions.state=v.OpenTag,T=this.writer.indent(E,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+E.rootNodeName,E.pubID&&E.sysID?T+=' PUBLIC "'+E.pubID+'" "'+E.sysID+'"':E.sysID&&(T+=' SYSTEM "'+E.sysID+'"'),E.children?(T+=" [",this.writerOptions.state=v.InsideTag):(this.writerOptions.state=v.CloseTag,T+=">"),T+=this.writer.endline(E,this.writerOptions,this.currentLevel);return this.onData(T,this.currentLevel),E.isOpen=!0}},b.prototype.closeNode=function(E){var w;if(!E.isClosed)return w="",this.writerOptions.state=v.CloseTag,E.type===P.Element?w=this.writer.indent(E,this.writerOptions,this.currentLevel)+"</"+E.name+">"+this.writer.endline(E,this.writerOptions,this.currentLevel):w=this.writer.indent(E,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(E,this.writerOptions,this.currentLevel),this.writerOptions.state=v.None,this.onData(w,this.currentLevel),E.isClosed=!0},b.prototype.onData=function(E,w){return this.documentStarted=!0,this.onDataCallback(E,w+1)},b.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},b.prototype.debugInfo=function(E){return E==null?"":"node: <"+E+">"},b.prototype.ele=function(){return this.element.apply(this,arguments)},b.prototype.nod=function(E,w,T){return this.node(E,w,T)},b.prototype.txt=function(E){return this.text(E)},b.prototype.dat=function(E){return this.cdata(E)},b.prototype.com=function(E){return this.comment(E)},b.prototype.ins=function(E,w){return this.instruction(E,w)},b.prototype.dec=function(E,w,T){return this.declaration(E,w,T)},b.prototype.dtd=function(E,w,T){return this.doctype(E,w,T)},b.prototype.e=function(E,w,T){return this.element(E,w,T)},b.prototype.n=function(E,w,T){return this.node(E,w,T)},b.prototype.t=function(E){return this.text(E)},b.prototype.d=function(E){return this.cdata(E)},b.prototype.c=function(E){return this.comment(E)},b.prototype.r=function(E){return this.raw(E)},b.prototype.i=function(E,w){return this.instruction(E,w)},b.prototype.att=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},b.prototype.a=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},b.prototype.ent=function(E,w){return this.entity(E,w)},b.prototype.pent=function(E,w){return this.pEntity(E,w)},b.prototype.not=function(E,w){return this.notation(E,w)},b}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/create"),v=C(P);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,g,m,S=function(d,i){for(var c in i)_.call(i,c)&&(d[c]=i[c]);function o(){this.constructor=d}return o.prototype=i.prototype,d.prototype=new o,d.__super__=i.prototype,d},_={}.hasOwnProperty;m=W("./XMLNode"),N=W("./NodeType"),q.exports=g=function(t){S(d,t);function d(i){d.__super__.constructor.call(this,i),this.type=N.Dummy}return d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(i){return""},d}(m)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/create"),v=C(P);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,g,m,S,_,t,d,i,c,o=function(h,f){for(var l in f)n.call(f,l)&&(h[l]=f[l]);function a(){this.constructor=h}return a.prototype=f.prototype,h.prototype=new a,h.__super__=f.prototype,h},n={}.hasOwnProperty;c=W("./Utility"),i=c.isObject,d=c.isFunction,t=c.getValue,_=W("./XMLNode"),N=W("./NodeType"),g=W("./XMLAttribute"),S=W("./XMLNamedNodeMap"),q.exports=m=function(s){o(h,s);function h(f,l,a){var r,x,y,p;if(h.__super__.constructor.call(this,f),l==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(l),this.type=N.Element,this.attribs={},this.schemaTypeInfo=null,a!=null&&this.attribute(a),f.type===N.Document&&(this.isRoot=!0,this.documentObject=f,f.rootObject=this,f.children)){for(p=f.children,x=0,y=p.length;x<y;x++)if(r=p[x],r.type===N.DocType){r.name=this.name;break}}}return Object.defineProperty(h.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(h.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(h.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(h.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(h.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(h.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(h.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(h.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new S(this.attribs)),this.attributeMap}}),h.prototype.clone=function(){var f,l,a,r;a=(0,v.default)(this),a.isRoot&&(a.documentObject=null),a.attribs={},r=this.attribs;for(l in r){if(!n.call(r,l))continue;f=r[l],a.attribs[l]=f.clone()}return a.children=[],this.children.forEach(function(x){var y;return y=x.clone(),y.parent=a,a.children.push(y)}),a},h.prototype.attribute=function(f,l){var a,r;if(f!=null&&(f=t(f)),i(f))for(a in f){if(!n.call(f,a))continue;r=f[a],this.attribute(a,r)}else d(l)&&(l=l.apply()),this.options.keepNullAttributes&&l==null?this.attribs[f]=new g(this,f,""):l!=null&&(this.attribs[f]=new g(this,f,l));return this},h.prototype.removeAttribute=function(f){var l,a,r;if(f==null)throw new Error("Missing attribute name. "+this.debugInfo());if(f=t(f),Array.isArray(f))for(a=0,r=f.length;a<r;a++)l=f[a],delete this.attribs[l];else delete this.attribs[f];return this},h.prototype.toString=function(f){return this.options.writer.element(this,this.options.writer.filterOptions(f))},h.prototype.att=function(f,l){return this.attribute(f,l)},h.prototype.a=function(f,l){return this.attribute(f,l)},h.prototype.getAttribute=function(f){return this.attribs.hasOwnProperty(f)?this.attribs[f].value:null},h.prototype.setAttribute=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getAttributeNode=function(f){return this.attribs.hasOwnProperty(f)?this.attribs[f]:null},h.prototype.setAttributeNode=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.removeAttributeNode=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagName=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getAttributeNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.setAttributeNS=function(f,l,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.removeAttributeNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getAttributeNodeNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.setAttributeNodeNS=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagNameNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.hasAttribute=function(f){return this.attribs.hasOwnProperty(f)},h.prototype.hasAttributeNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.setIdAttribute=function(f,l){return this.attribs.hasOwnProperty(f)?this.attribs[f].isId:l},h.prototype.setIdAttributeNS=function(f,l,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.setIdAttributeNode=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagName=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagNameNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByClassName=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.isEqualNode=function(f){var l,a,r;if(!h.__super__.isEqualNode.apply(this,arguments).isEqualNode(f))return!1;if(f.namespaceURI!==this.namespaceURI)return!1;if(f.prefix!==this.prefix)return!1;if(f.localName!==this.localName)return!1;if(f.attribs.length!==this.attribs.length)return!1;for(l=a=0,r=this.attribs.length-1;0<=r?a<=r:a>=r;l=0<=r?++a:--a)if(!this.attribs[l].isEqualNode(f.attribs[l]))return!1;return!0},h}(_)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/keys"),v=C(P);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N;q.exports=N=function(){function g(m){this.nodes=m}return Object.defineProperty(g.prototype,"length",{get:function(){return(0,v.default)(this.nodes).length||0}}),g.prototype.clone=function(){return this.nodes=null},g.prototype.getNamedItem=function(m){return this.nodes[m]},g.prototype.setNamedItem=function(m){var S;return S=this.nodes[m.nodeName],this.nodes[m.nodeName]=m,S||null},g.prototype.removeNamedItem=function(m){var S;return S=this.nodes[m],delete this.nodes[m],S||null},g.prototype.item=function(m){return this.nodes[(0,v.default)(this.nodes)[m]]||null},g.prototype.getNamedItemNS=function(m,S){throw new Error("This DOM method is not implemented.")},g.prototype.setNamedItemNS=function(m){throw new Error("This DOM method is not implemented.")},g.prototype.removeNamedItemNS=function(m,S){throw new Error("This DOM method is not implemented.")},g}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(W,q,D){"use strict";(function(){var P,v,C,N,g,m,S,_,t,d,i,c,o,n,s,h,f,l,a,r={}.hasOwnProperty;a=W("./Utility"),l=a.isObject,f=a.isFunction,h=a.isEmpty,s=a.getValue,_=null,C=null,N=null,g=null,m=null,o=null,n=null,c=null,S=null,v=null,i=null,t=null,P=null,q.exports=d=function(){function x(y){this.parent=y,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,_||(_=W("./XMLElement"),C=W("./XMLCData"),N=W("./XMLComment"),g=W("./XMLDeclaration"),m=W("./XMLDocType"),o=W("./XMLRaw"),n=W("./XMLText"),c=W("./XMLProcessingInstruction"),S=W("./XMLDummy"),v=W("./NodeType"),i=W("./XMLNodeList"),t=W("./XMLNamedNodeMap"),P=W("./DocumentPosition"))}return Object.defineProperty(x.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(x.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(x.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(x.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(x.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new i(this.children)),this.childNodeList}}),Object.defineProperty(x.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(x.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(x.prototype,"previousSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p-1]||null}}),Object.defineProperty(x.prototype,"nextSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p+1]||null}}),Object.defineProperty(x.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(x.prototype,"textContent",{get:function(){var p,R,O,b,E;if(this.nodeType===v.Element||this.nodeType===v.DocumentFragment){for(E="",b=this.children,R=0,O=b.length;R<O;R++)p=b[R],p.textContent&&(E+=p.textContent);return E}else return null},set:function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),x.prototype.setParent=function(y){var p,R,O,b,E;for(this.parent=y,y&&(this.options=y.options,this.stringify=y.stringify),b=this.children,E=[],R=0,O=b.length;R<O;R++)p=b[R],E.push(p.setParent(this));return E},x.prototype.element=function(y,p,R){var O,b,E,w,T,F,M,L,Y,K,A;if(F=null,p===null&&R==null&&(Y=[{},null],p=Y[0],R=Y[1]),p==null&&(p={}),p=s(p),l(p)||(K=[p,R],R=K[0],p=K[1]),y!=null&&(y=s(y)),Array.isArray(y))for(E=0,M=y.length;E<M;E++)b=y[E],F=this.element(b);else if(f(y))F=this.element(y.apply());else if(l(y))for(T in y){if(!r.call(y,T))continue;if(A=y[T],f(A)&&(A=A.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&T.indexOf(this.stringify.convertAttKey)===0)F=this.attribute(T.substr(this.stringify.convertAttKey.length),A);else if(!this.options.separateArrayItems&&Array.isArray(A)&&h(A))F=this.dummy();else if(l(A)&&h(A))F=this.element(T);else if(!this.options.keepNullNodes&&A==null)F=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(A))for(w=0,L=A.length;w<L;w++)b=A[w],O={},O[T]=b,F=this.element(O);else l(A)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&T.indexOf(this.stringify.convertTextKey)===0?F=this.element(A):(F=this.element(T),F.element(A)):F=this.element(T,A)}else!this.options.keepNullNodes&&R===null?F=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&y.indexOf(this.stringify.convertTextKey)===0?F=this.text(R):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&y.indexOf(this.stringify.convertCDataKey)===0?F=this.cdata(R):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&y.indexOf(this.stringify.convertCommentKey)===0?F=this.comment(R):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&y.indexOf(this.stringify.convertRawKey)===0?F=this.raw(R):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&y.indexOf(this.stringify.convertPIKey)===0?F=this.instruction(y.substr(this.stringify.convertPIKey.length),R):F=this.node(y,p,R);if(F==null)throw new Error("Could not create any elements with: "+y+". "+this.debugInfo());return F},x.prototype.insertBefore=function(y,p,R){var O,b,E,w,T;if(y!=null?y.type:void 0)return E=y,w=p,E.setParent(this),w?(b=children.indexOf(w),T=children.splice(b),children.push(E),Array.prototype.push.apply(children,T)):children.push(E),E;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(y));return b=this.parent.children.indexOf(this),T=this.parent.children.splice(b),O=this.parent.element(y,p,R),Array.prototype.push.apply(this.parent.children,T),O},x.prototype.insertAfter=function(y,p,R){var O,b,E;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(y));return b=this.parent.children.indexOf(this),E=this.parent.children.splice(b+1),O=this.parent.element(y,p,R),Array.prototype.push.apply(this.parent.children,E),O},x.prototype.remove=function(){var y,p;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return y=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[y,y-y+1].concat(p=[])),this.parent},x.prototype.node=function(y,p,R){var O,b;return y!=null&&(y=s(y)),p||(p={}),p=s(p),l(p)||(b=[p,R],R=b[0],p=b[1]),O=new _(this,y,p),R!=null&&O.text(R),this.children.push(O),O},x.prototype.text=function(y){var p;return l(y)&&this.element(y),p=new n(this,y),this.children.push(p),this},x.prototype.cdata=function(y){var p;return p=new C(this,y),this.children.push(p),this},x.prototype.comment=function(y){var p;return p=new N(this,y),this.children.push(p),this},x.prototype.commentBefore=function(y){var p,R,O;return R=this.parent.children.indexOf(this),O=this.parent.children.splice(R),p=this.parent.comment(y),Array.prototype.push.apply(this.parent.children,O),this},x.prototype.commentAfter=function(y){var p,R,O;return R=this.parent.children.indexOf(this),O=this.parent.children.splice(R+1),p=this.parent.comment(y),Array.prototype.push.apply(this.parent.children,O),this},x.prototype.raw=function(y){var p;return p=new o(this,y),this.children.push(p),this},x.prototype.dummy=function(){var y;return y=new S(this),y},x.prototype.instruction=function(y,p){var R,O,b,E,w;if(y!=null&&(y=s(y)),p!=null&&(p=s(p)),Array.isArray(y))for(E=0,w=y.length;E<w;E++)R=y[E],this.instruction(R);else if(l(y))for(R in y){if(!r.call(y,R))continue;O=y[R],this.instruction(R,O)}else f(p)&&(p=p.apply()),b=new c(this,y,p),this.children.push(b);return this},x.prototype.instructionBefore=function(y,p){var R,O,b;return O=this.parent.children.indexOf(this),b=this.parent.children.splice(O),R=this.parent.instruction(y,p),Array.prototype.push.apply(this.parent.children,b),this},x.prototype.instructionAfter=function(y,p){var R,O,b;return O=this.parent.children.indexOf(this),b=this.parent.children.splice(O+1),R=this.parent.instruction(y,p),Array.prototype.push.apply(this.parent.children,b),this},x.prototype.declaration=function(y,p,R){var O,b;return O=this.document(),b=new g(O,y,p,R),O.children.length===0?O.children.unshift(b):O.children[0].type===v.Declaration?O.children[0]=b:O.children.unshift(b),O.root()||O},x.prototype.dtd=function(y,p){var R,O,b,E,w,T,F,M,L,Y;for(O=this.document(),b=new m(O,y,p),L=O.children,E=w=0,F=L.length;w<F;E=++w)if(R=L[E],R.type===v.DocType)return O.children[E]=b,b;for(Y=O.children,E=T=0,M=Y.length;T<M;E=++T)if(R=Y[E],R.isRoot)return O.children.splice(E,0,b),b;return O.children.push(b),b},x.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},x.prototype.root=function(){var y;for(y=this;y;){if(y.type===v.Document)return y.rootObject;if(y.isRoot)return y;y=y.parent}},x.prototype.document=function(){var y;for(y=this;y;){if(y.type===v.Document)return y;y=y.parent}},x.prototype.end=function(y){return this.document().end(y)},x.prototype.prev=function(){var y;if(y=this.parent.children.indexOf(this),y<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[y-1]},x.prototype.next=function(){var y;if(y=this.parent.children.indexOf(this),y===-1||y===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[y+1]},x.prototype.importDocument=function(y){var p;return p=y.root().clone(),p.parent=this,p.isRoot=!1,this.children.push(p),this},x.prototype.debugInfo=function(y){var p,R;return y=y||this.name,y==null&&!((p=this.parent)!=null?p.name:void 0)?"":y==null?"parent: <"+this.parent.name+">":((R=this.parent)!=null?R.name:void 0)?"node: <"+y+">, parent: <"+this.parent.name+">":"node: <"+y+">"},x.prototype.ele=function(y,p,R){return this.element(y,p,R)},x.prototype.nod=function(y,p,R){return this.node(y,p,R)},x.prototype.txt=function(y){return this.text(y)},x.prototype.dat=function(y){return this.cdata(y)},x.prototype.com=function(y){return this.comment(y)},x.prototype.ins=function(y,p){return this.instruction(y,p)},x.prototype.doc=function(){return this.document()},x.prototype.dec=function(y,p,R){return this.declaration(y,p,R)},x.prototype.e=function(y,p,R){return this.element(y,p,R)},x.prototype.n=function(y,p,R){return this.node(y,p,R)},x.prototype.t=function(y){return this.text(y)},x.prototype.d=function(y){return this.cdata(y)},x.prototype.c=function(y){return this.comment(y)},x.prototype.r=function(y){return this.raw(y)},x.prototype.i=function(y,p){return this.instruction(y,p)},x.prototype.u=function(){return this.up()},x.prototype.importXMLBuilder=function(y){return this.importDocument(y)},x.prototype.replaceChild=function(y,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.removeChild=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.appendChild=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.hasChildNodes=function(){return this.children.length!==0},x.prototype.cloneNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.isSupported=function(y,p){return!0},x.prototype.hasAttributes=function(){return this.attribs.length!==0},x.prototype.compareDocumentPosition=function(y){var p,R;return p=this,p===y?0:this.document()!==y.document()?(R=P.Disconnected|P.ImplementationSpecific,Math.random()<.5?R|=P.Preceding:R|=P.Following,R):p.isAncestor(y)?P.Contains|P.Preceding:p.isDescendant(y)?P.Contains|P.Following:p.isPreceding(y)?P.Preceding:P.Following},x.prototype.isSameNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.lookupPrefix=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.isDefaultNamespace=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.lookupNamespaceURI=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.isEqualNode=function(y){var p,R,O;if(y.nodeType!==this.nodeType)return!1;if(y.children.length!==this.children.length)return!1;for(p=R=0,O=this.children.length-1;0<=O?R<=O:R>=O;p=0<=O?++R:--R)if(!this.children[p].isEqualNode(y.children[p]))return!1;return!0},x.prototype.getFeature=function(y,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.setUserData=function(y,p,R){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.getUserData=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.contains=function(y){return y?y===this||this.isDescendant(y):!1},x.prototype.isDescendant=function(y){var p,R,O,b,E;for(E=this.children,O=0,b=E.length;O<b;O++){if(p=E[O],y===p)return!0;if(R=p.isDescendant(y),R)return!0}return!1},x.prototype.isAncestor=function(y){return y.isDescendant(this)},x.prototype.isPreceding=function(y){var p,R;return p=this.treePosition(y),R=this.treePosition(this),p===-1||R===-1?!1:p<R},x.prototype.isFollowing=function(y){var p,R;return p=this.treePosition(y),R=this.treePosition(this),p===-1||R===-1?!1:p>R},x.prototype.treePosition=function(y){var p,R;return R=0,p=!1,this.foreachTreeNode(this.document(),function(O){if(R++,!p&&O===y)return p=!0}),p?R:-1},x.prototype.foreachTreeNode=function(y,p){var R,O,b,E,w;for(y||(y=this.document()),E=y.children,O=0,b=E.length;O<b;O++){if(R=E[O],w=p(R))return w;if(w=this.foreachTreeNode(R,p),w)return w}},x}()}).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(W,q,D){"use strict";(function(){var P;q.exports=P=function(){function v(C){this.nodes=C}return Object.defineProperty(v.prototype,"length",{get:function(){return this.nodes.length||0}}),v.prototype.clone=function(){return this.nodes=null},v.prototype.item=function(C){return this.nodes[C]||null},v}()}).call(void 0)},{}],275:[function(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/create"),v=C(P);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,g,m,S=function(d,i){for(var c in i)_.call(i,c)&&(d[c]=i[c]);function o(){this.constructor=d}return o.prototype=i.prototype,d.prototype=new o,d.__super__=i.prototype,d},_={}.hasOwnProperty;N=W("./NodeType"),g=W("./XMLCharacterData"),q.exports=m=function(t){S(d,t);function d(i,c,o){if(d.__super__.constructor.call(this,i),c==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=N.ProcessingInstruction,this.target=this.stringify.insTarget(c),this.name=this.target,o&&(this.value=this.stringify.insValue(o))}return d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(i){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(i))},d.prototype.isEqualNode=function(i){return d.__super__.isEqualNode.apply(this,arguments).isEqualNode(i)?!(i.target!==this.target):!1},d}(g)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/create"),v=C(P);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,g,m,S=function(d,i){for(var c in i)_.call(i,c)&&(d[c]=i[c]);function o(){this.constructor=d}return o.prototype=i.prototype,d.prototype=new o,d.__super__=i.prototype,d},_={}.hasOwnProperty;N=W("./NodeType"),g=W("./XMLNode"),q.exports=m=function(t){S(d,t);function d(i,c){if(d.__super__.constructor.call(this,i),c==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=N.Raw,this.value=this.stringify.raw(c)}return d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(i){return this.options.writer.raw(this,this.options.writer.filterOptions(i))},d}(g)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(W,q,D){"use strict";(function(){var P,v,C,N,g=function(_,t){for(var d in t)m.call(t,d)&&(_[d]=t[d]);function i(){this.constructor=_}return i.prototype=t.prototype,_.prototype=new i,_.__super__=t.prototype,_},m={}.hasOwnProperty;P=W("./NodeType"),N=W("./XMLWriterBase"),v=W("./WriterState"),q.exports=C=function(S){g(_,S);function _(t,d){this.stream=t,_.__super__.constructor.call(this,d)}return _.prototype.endline=function(t,d,i){return t.isLastRootNode&&d.state===v.CloseTag?"":_.__super__.endline.call(this,t,d,i)},_.prototype.document=function(t,d){var i,c,o,n,s,h,f,l,a;for(f=t.children,c=o=0,s=f.length;o<s;c=++o)i=f[c],i.isLastRootNode=c===t.children.length-1;for(d=this.filterOptions(d),l=t.children,a=[],n=0,h=l.length;n<h;n++)i=l[n],a.push(this.writeChildNode(i,d,0));return a},_.prototype.attribute=function(t,d,i){return this.stream.write(_.__super__.attribute.call(this,t,d,i))},_.prototype.cdata=function(t,d,i){return this.stream.write(_.__super__.cdata.call(this,t,d,i))},_.prototype.comment=function(t,d,i){return this.stream.write(_.__super__.comment.call(this,t,d,i))},_.prototype.declaration=function(t,d,i){return this.stream.write(_.__super__.declaration.call(this,t,d,i))},_.prototype.docType=function(t,d,i){var c,o,n,s;if(i||(i=0),this.openNode(t,d,i),d.state=v.OpenTag,this.stream.write(this.indent(t,d,i)),this.stream.write("<!DOCTYPE "+t.root().name),t.pubID&&t.sysID?this.stream.write(' PUBLIC "'+t.pubID+'" "'+t.sysID+'"'):t.sysID&&this.stream.write(' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(t,d,i)),d.state=v.InsideTag,s=t.children,o=0,n=s.length;o<n;o++)c=s[o],this.writeChildNode(c,d,i+1);d.state=v.CloseTag,this.stream.write("]")}return d.state=v.CloseTag,this.stream.write(d.spaceBeforeSlash+">"),this.stream.write(this.endline(t,d,i)),d.state=v.None,this.closeNode(t,d,i)},_.prototype.element=function(t,d,i){var c,o,n,s,h,f,l,a,r,x;i||(i=0),this.openNode(t,d,i),d.state=v.OpenTag,this.stream.write(this.indent(t,d,i)+"<"+t.name),r=t.attribs;for(l in r){if(!m.call(r,l))continue;c=r[l],this.attribute(c,d,i)}if(n=t.children.length,s=n===0?null:t.children[0],n===0||t.children.every(function(y){return(y.type===P.Text||y.type===P.Raw)&&y.value===""}))d.allowEmpty?(this.stream.write(">"),d.state=v.CloseTag,this.stream.write("</"+t.name+">")):(d.state=v.CloseTag,this.stream.write(d.spaceBeforeSlash+"/>"));else if(d.pretty&&n===1&&(s.type===P.Text||s.type===P.Raw)&&s.value!=null)this.stream.write(">"),d.state=v.InsideTag,d.suppressPrettyCount++,a=!0,this.writeChildNode(s,d,i+1),d.suppressPrettyCount--,a=!1,d.state=v.CloseTag,this.stream.write("</"+t.name+">");else{for(this.stream.write(">"+this.endline(t,d,i)),d.state=v.InsideTag,x=t.children,h=0,f=x.length;h<f;h++)o=x[h],this.writeChildNode(o,d,i+1);d.state=v.CloseTag,this.stream.write(this.indent(t,d,i)+"</"+t.name+">")}return this.stream.write(this.endline(t,d,i)),d.state=v.None,this.closeNode(t,d,i)},_.prototype.processingInstruction=function(t,d,i){return this.stream.write(_.__super__.processingInstruction.call(this,t,d,i))},_.prototype.raw=function(t,d,i){return this.stream.write(_.__super__.raw.call(this,t,d,i))},_.prototype.text=function(t,d,i){return this.stream.write(_.__super__.text.call(this,t,d,i))},_.prototype.dtdAttList=function(t,d,i){return this.stream.write(_.__super__.dtdAttList.call(this,t,d,i))},_.prototype.dtdElement=function(t,d,i){return this.stream.write(_.__super__.dtdElement.call(this,t,d,i))},_.prototype.dtdEntity=function(t,d,i){return this.stream.write(_.__super__.dtdEntity.call(this,t,d,i))},_.prototype.dtdNotation=function(t,d,i){return this.stream.write(_.__super__.dtdNotation.call(this,t,d,i))},_}(N)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(W,q,D){"use strict";(function(){var P,v,C=function(m,S){for(var _ in S)N.call(S,_)&&(m[_]=S[_]);function t(){this.constructor=m}return t.prototype=S.prototype,m.prototype=new t,m.__super__=S.prototype,m},N={}.hasOwnProperty;v=W("./XMLWriterBase"),q.exports=P=function(g){C(m,g);function m(S){m.__super__.constructor.call(this,S)}return m.prototype.document=function(S,_){var t,d,i,c,o;for(_=this.filterOptions(_),c="",o=S.children,d=0,i=o.length;d<i;d++)t=o[d],c+=this.writeChildNode(t,_,0);return _.pretty&&c.slice(-_.newline.length)===_.newline&&(c=c.slice(0,-_.newline.length)),c},m}(v)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(W,q,D){"use strict";(function(){var P,v=function(g,m){return function(){return g.apply(m,arguments)}},C={}.hasOwnProperty;q.exports=P=function(){function N(g){this.assertLegalName=v(this.assertLegalName,this),this.assertLegalChar=v(this.assertLegalChar,this);var m,S,_;g||(g={}),this.options=g,this.options.version||(this.options.version="1.0"),S=g.stringify||{};for(m in S){if(!C.call(S,m))continue;_=S[m],this[m]=_}}return N.prototype.name=function(g){return this.options.noValidation?g:this.assertLegalName(""+g||"")},N.prototype.text=function(g){return this.options.noValidation?g:this.assertLegalChar(this.textEscape(""+g||""))},N.prototype.cdata=function(g){return this.options.noValidation?g:(g=""+g||"",g=g.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(g))},N.prototype.comment=function(g){if(this.options.noValidation)return g;if(g=""+g||"",g.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+g);return this.assertLegalChar(g)},N.prototype.raw=function(g){return this.options.noValidation?g:""+g||""},N.prototype.attValue=function(g){return this.options.noValidation?g:this.assertLegalChar(this.attEscape(g=""+g||""))},N.prototype.insTarget=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},N.prototype.insValue=function(g){if(this.options.noValidation)return g;if(g=""+g||"",g.match(/\?>/))throw new Error("Invalid processing instruction value: "+g);return this.assertLegalChar(g)},N.prototype.xmlVersion=function(g){if(this.options.noValidation)return g;if(g=""+g||"",!g.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+g);return g},N.prototype.xmlEncoding=function(g){if(this.options.noValidation)return g;if(g=""+g||"",!g.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+g);return this.assertLegalChar(g)},N.prototype.xmlStandalone=function(g){return this.options.noValidation?g:g?"yes":"no"},N.prototype.dtdPubID=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},N.prototype.dtdSysID=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},N.prototype.dtdElementValue=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},N.prototype.dtdAttType=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},N.prototype.dtdAttDefault=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},N.prototype.dtdEntityValue=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},N.prototype.dtdNData=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},N.prototype.convertAttKey="@",N.prototype.convertPIKey="?",N.prototype.convertTextKey="#text",N.prototype.convertCDataKey="#cdata",N.prototype.convertCommentKey="#comment",N.prototype.convertRawKey="#raw",N.prototype.assertLegalChar=function(g){var m,S;if(this.options.noValidation)return g;if(m="",this.options.version==="1.0"){if(m=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=g.match(m))throw new Error("Invalid character in string: "+g+" at index "+S.index)}else if(this.options.version==="1.1"&&(m=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=g.match(m)))throw new Error("Invalid character in string: "+g+" at index "+S.index);return g},N.prototype.assertLegalName=function(g){var m;if(this.options.noValidation)return g;if(this.assertLegalChar(g),m=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!g.match(m))throw new Error("Invalid character in name");return g},N.prototype.textEscape=function(g){var m;return this.options.noValidation?g:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,g.replace(m,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},N.prototype.attEscape=function(g){var m;return this.options.noValidation?g:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,g.replace(m,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},N}()}).call(void 0)},{}],280:[function(W,q,D){"use strict";var P=W("babel-runtime/core-js/object/create"),v=C(P);function C(N){return N&&N.__esModule?N:{default:N}}(function(){var N,g,m,S=function(d,i){for(var c in i)_.call(i,c)&&(d[c]=i[c]);function o(){this.constructor=d}return o.prototype=i.prototype,d.prototype=new o,d.__super__=i.prototype,d},_={}.hasOwnProperty;N=W("./NodeType"),g=W("./XMLCharacterData"),q.exports=m=function(t){S(d,t);function d(i,c){if(d.__super__.constructor.call(this,i),c==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=N.Text,this.value=this.stringify.text(c)}return Object.defineProperty(d.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(d.prototype,"wholeText",{get:function(){var c,o,n;for(n="",o=this.previousSibling;o;)n=o.data+n,o=o.previousSibling;for(n+=this.data,c=this.nextSibling;c;)n=n+c.data,c=c.nextSibling;return n}}),d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(i){return this.options.writer.text(this,this.options.writer.filterOptions(i))},d.prototype.splitText=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.replaceWholeText=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},d}(g)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(W,q,D){"use strict";(function(){var P,v,C,N,g,m,S,_,t,d,i,c,o,n,s,h,f,l={}.hasOwnProperty;f=W("./Utility").assign,P=W("./NodeType"),t=W("./XMLDeclaration"),d=W("./XMLDocType"),C=W("./XMLCData"),N=W("./XMLComment"),c=W("./XMLElement"),n=W("./XMLRaw"),s=W("./XMLText"),o=W("./XMLProcessingInstruction"),i=W("./XMLDummy"),g=W("./XMLDTDAttList"),m=W("./XMLDTDElement"),S=W("./XMLDTDEntity"),_=W("./XMLDTDNotation"),v=W("./WriterState"),q.exports=h=function(){function a(r){var x,y,p;r||(r={}),this.options=r,y=r.writer||{};for(x in y){if(!l.call(y,x))continue;p=y[x],this["_"+x]=this[x],this[x]=p}}return a.prototype.filterOptions=function(r){var x,y,p,R,O,b,E,w;return r||(r={}),r=f({},this.options,r),x={writer:this},x.pretty=r.pretty||!1,x.allowEmpty=r.allowEmpty||!1,x.indent=(y=r.indent)!=null?y:" ",x.newline=(p=r.newline)!=null?p:`
|
|
|
`,x.offset=(R=r.offset)!=null?R:0,x.dontPrettyTextNodes=(O=(b=r.dontPrettyTextNodes)!=null?b:r.dontprettytextnodes)!=null?O:0,x.spaceBeforeSlash=(E=(w=r.spaceBeforeSlash)!=null?w:r.spacebeforeslash)!=null?E:"",x.spaceBeforeSlash===!0&&(x.spaceBeforeSlash=" "),x.suppressPrettyCount=0,x.user={},x.state=v.None,x},a.prototype.indent=function(r,x,y){var p;return!x.pretty||x.suppressPrettyCount?"":x.pretty&&(p=(y||0)+x.offset+1,p>0)?new Array(p).join(x.indent):""},a.prototype.endline=function(r,x,y){return!x.pretty||x.suppressPrettyCount?"":x.newline},a.prototype.attribute=function(r,x,y){var p;return this.openAttribute(r,x,y),p=" "+r.name+'="'+r.value+'"',this.closeAttribute(r,x,y),p},a.prototype.cdata=function(r,x,y){var p;return this.openNode(r,x,y),x.state=v.OpenTag,p=this.indent(r,x,y)+"<![CDATA[",x.state=v.InsideTag,p+=r.value,x.state=v.CloseTag,p+="]]>"+this.endline(r,x,y),x.state=v.None,this.closeNode(r,x,y),p},a.prototype.comment=function(r,x,y){var p;return this.openNode(r,x,y),x.state=v.OpenTag,p=this.indent(r,x,y)+"<!-- ",x.state=v.InsideTag,p+=r.value,x.state=v.CloseTag,p+=" -->"+this.endline(r,x,y),x.state=v.None,this.closeNode(r,x,y),p},a.prototype.declaration=function(r,x,y){var p;return this.openNode(r,x,y),x.state=v.OpenTag,p=this.indent(r,x,y)+"<?xml",x.state=v.InsideTag,p+=' version="'+r.version+'"',r.encoding!=null&&(p+=' encoding="'+r.encoding+'"'),r.standalone!=null&&(p+=' standalone="'+r.standalone+'"'),x.state=v.CloseTag,p+=x.spaceBeforeSlash+"?>",p+=this.endline(r,x,y),x.state=v.None,this.closeNode(r,x,y),p},a.prototype.docType=function(r,x,y){var p,R,O,b,E;if(y||(y=0),this.openNode(r,x,y),x.state=v.OpenTag,b=this.indent(r,x,y),b+="<!DOCTYPE "+r.root().name,r.pubID&&r.sysID?b+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"':r.sysID&&(b+=' SYSTEM "'+r.sysID+'"'),r.children.length>0){for(b+=" [",b+=this.endline(r,x,y),x.state=v.InsideTag,E=r.children,R=0,O=E.length;R<O;R++)p=E[R],b+=this.writeChildNode(p,x,y+1);x.state=v.CloseTag,b+="]"}return x.state=v.CloseTag,b+=x.spaceBeforeSlash+">",b+=this.endline(r,x,y),x.state=v.None,this.closeNode(r,x,y),b},a.prototype.element=function(r,x,y){var p,R,O,b,E,w,T,F,M,L,Y,K,A,H;y||(y=0),L=!1,Y="",this.openNode(r,x,y),x.state=v.OpenTag,Y+=this.indent(r,x,y)+"<"+r.name,K=r.attribs;for(M in K){if(!l.call(K,M))continue;p=K[M],Y+=this.attribute(p,x,y)}if(O=r.children.length,b=O===0?null:r.children[0],O===0||r.children.every(function(U){return(U.type===P.Text||U.type===P.Raw)&&U.value===""}))x.allowEmpty?(Y+=">",x.state=v.CloseTag,Y+="</"+r.name+">"+this.endline(r,x,y)):(x.state=v.CloseTag,Y+=x.spaceBeforeSlash+"/>"+this.endline(r,x,y));else if(x.pretty&&O===1&&(b.type===P.Text||b.type===P.Raw)&&b.value!=null)Y+=">",x.state=v.InsideTag,x.suppressPrettyCount++,L=!0,Y+=this.writeChildNode(b,x,y+1),x.suppressPrettyCount--,L=!1,x.state=v.CloseTag,Y+="</"+r.name+">"+this.endline(r,x,y);else{if(x.dontPrettyTextNodes){for(A=r.children,E=0,T=A.length;E<T;E++)if(R=A[E],(R.type===P.Text||R.type===P.Raw)&&R.value!=null){x.suppressPrettyCount++,L=!0;break}}for(Y+=">"+this.endline(r,x,y),x.state=v.InsideTag,H=r.children,w=0,F=H.length;w<F;w++)R=H[w],Y+=this.writeChildNode(R,x,y+1);x.state=v.CloseTag,Y+=this.indent(r,x,y)+"</"+r.name+">",L&&x.suppressPrettyCount--,Y+=this.endline(r,x,y),x.state=v.None}return this.closeNode(r,x,y),Y},a.prototype.writeChildNode=function(r,x,y){switch(r.type){case P.CData:return this.cdata(r,x,y);case P.Comment:return this.comment(r,x,y);case P.Element:return this.element(r,x,y);case P.Raw:return this.raw(r,x,y);case P.Text:return this.text(r,x,y);case P.ProcessingInstruction:return this.processingInstruction(r,x,y);case P.Dummy:return"";case P.Declaration:return this.declaration(r,x,y);case P.DocType:return this.docType(r,x,y);case P.AttributeDeclaration:return this.dtdAttList(r,x,y);case P.ElementDeclaration:return this.dtdElement(r,x,y);case P.EntityDeclaration:return this.dtdEntity(r,x,y);case P.NotationDeclaration:return this.dtdNotation(r,x,y);default:throw new Error("Unknown XML node type: "+r.constructor.name)}},a.prototype.processingInstruction=function(r,x,y){var p;return this.openNode(r,x,y),x.state=v.OpenTag,p=this.indent(r,x,y)+"<?",x.state=v.InsideTag,p+=r.target,r.value&&(p+=" "+r.value),x.state=v.CloseTag,p+=x.spaceBeforeSlash+"?>",p+=this.endline(r,x,y),x.state=v.None,this.closeNode(r,x,y),p},a.prototype.raw=function(r,x,y){var p;return this.openNode(r,x,y),x.state=v.OpenTag,p=this.indent(r,x,y),x.state=v.InsideTag,p+=r.value,x.state=v.CloseTag,p+=this.endline(r,x,y),x.state=v.None,this.closeNode(r,x,y),p},a.prototype.text=function(r,x,y){var p;return this.openNode(r,x,y),x.state=v.OpenTag,p=this.indent(r,x,y),x.state=v.InsideTag,p+=r.value,x.state=v.CloseTag,p+=this.endline(r,x,y),x.state=v.None,this.closeNode(r,x,y),p},a.prototype.dtdAttList=function(r,x,y){var p;return this.openNode(r,x,y),x.state=v.OpenTag,p=this.indent(r,x,y)+"<!ATTLIST",x.state=v.InsideTag,p+=" "+r.elementName+" "+r.attributeName+" "+r.attributeType,r.defaultValueType!=="#DEFAULT"&&(p+=" "+r.defaultValueType),r.defaultValue&&(p+=' "'+r.defaultValue+'"'),x.state=v.CloseTag,p+=x.spaceBeforeSlash+">"+this.endline(r,x,y),x.state=v.None,this.closeNode(r,x,y),p},a.prototype.dtdElement=function(r,x,y){var p;return this.openNode(r,x,y),x.state=v.OpenTag,p=this.indent(r,x,y)+"<!ELEMENT",x.state=v.InsideTag,p+=" "+r.name+" "+r.value,x.state=v.CloseTag,p+=x.spaceBeforeSlash+">"+this.endline(r,x,y),x.state=v.None,this.closeNode(r,x,y),p},a.prototype.dtdEntity=function(r,x,y){var p;return this.openNode(r,x,y),x.state=v.OpenTag,p=this.indent(r,x,y)+"<!ENTITY",x.state=v.InsideTag,r.pe&&(p+=" %"),p+=" "+r.name,r.value?p+=' "'+r.value+'"':(r.pubID&&r.sysID?p+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"':r.sysID&&(p+=' SYSTEM "'+r.sysID+'"'),r.nData&&(p+=" NDATA "+r.nData)),x.state=v.CloseTag,p+=x.spaceBeforeSlash+">"+this.endline(r,x,y),x.state=v.None,this.closeNode(r,x,y),p},a.prototype.dtdNotation=function(r,x,y){var p;return this.openNode(r,x,y),x.state=v.OpenTag,p=this.indent(r,x,y)+"<!NOTATION",x.state=v.InsideTag,p+=" "+r.name,r.pubID&&r.sysID?p+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"':r.pubID?p+=' PUBLIC "'+r.pubID+'"':r.sysID&&(p+=' SYSTEM "'+r.sysID+'"'),x.state=v.CloseTag,p+=x.spaceBeforeSlash+">"+this.endline(r,x,y),x.state=v.None,this.closeNode(r,x,y),p},a.prototype.openNode=function(r,x,y){},a.prototype.closeNode=function(r,x,y){},a.prototype.openAttribute=function(r,x,y){},a.prototype.closeAttribute=function(r,x,y){},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(W,q,D){"use strict";(function(){var P,v,C,N,g,m,S,_,t,d;d=W("./Utility"),_=d.assign,t=d.isFunction,C=W("./XMLDOMImplementation"),N=W("./XMLDocument"),g=W("./XMLDocumentCB"),S=W("./XMLStringWriter"),m=W("./XMLStreamWriter"),P=W("./NodeType"),v=W("./WriterState"),q.exports.create=function(i,c,o,n){var s,h;if(i==null)throw new Error("Root element needs a name.");return n=_({},c,o,n),s=new N(n),h=s.element(i),n.headless||(s.declaration(n),(n.pubID!=null||n.sysID!=null)&&s.dtd(n)),h},q.exports.begin=function(i,c,o){var n;return t(i)&&(n=[i,c],c=n[0],o=n[1],i={}),c?new g(i,c,o):new N(i)},q.exports.stringWriter=function(i){return new S(i)},q.exports.streamWriter=function(i,c){return new m(i,c)},q.exports.implementation=new C,q.exports.nodeType=P,q.exports.writerState=v}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(W,q,D){q.exports=v;var P=Object.prototype.hasOwnProperty;function v(){for(var C={},N=0;N<arguments.length;N++){var g=arguments[N];for(var m in g)P.call(g,m)&&(C[m]=g[m])}return C}},{}],284:[function(W,q,D){"use strict";var P=W("buffer").Buffer,v=W("./sha"),C=W("./md5"),N={sha1:v,md5:C},g=64,m=P.alloc(g);m.fill(0);function S(d,i,c){P.isBuffer(i)||(i=P.from(i)),P.isBuffer(c)||(c=P.from(c)),i.length>g?i=d(i):i.length<g&&(i=P.concat([i,m],g));for(var o=P.alloc(g),n=P.alloc(g),s=0;s<g;s++)o[s]=i[s]^54,n[s]=i[s]^92;var h=d(P.concat([o,c]));return d(P.concat([n,h]))}function _(d,i){d=d||"sha1";var c=N[d],o=[],n=0;return c||t("algorithm:",d,"is not yet supported"),{update:function(h){return P.isBuffer(h)||(h=P.from(h)),o.push(h),n+=h.length,this},digest:function(h){var f=P.concat(o),l=i?S(c,i,f):c(f);return o=null,h?l.toString(h):l}}}function t(){var d=[].slice.call(arguments).join(" ");throw new Error([d,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}D.createHash=function(d){return _(d)},D.createHmac=function(d,i){return _(d,i)},D.createCredentials=function(){t("sorry,createCredentials is not implemented yet")},D.createCipher=function(){t("sorry,createCipher is not implemented yet")},D.createCipheriv=function(){t("sorry,createCipheriv is not implemented yet")},D.createDecipher=function(){t("sorry,createDecipher is not implemented yet")},D.createDecipheriv=function(){t("sorry,createDecipheriv is not implemented yet")},D.createSign=function(){t("sorry,createSign is not implemented yet")},D.createVerify=function(){t("sorry,createVerify is not implemented yet")},D.createDiffieHellman=function(){t("sorry,createDiffieHellman is not implemented yet")},D.pbkdf2=function(){t("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(W,q,D){"use strict";var P=W("buffer").Buffer,v=4,C=P.alloc(v);C.fill(0);var N=8;function g(_,t){if(_.length%v!==0){var d=_.length+(v-_.length%v);_=P.concat([_,C],d)}for(var i=[],c=t?_.readInt32BE:_.readInt32LE,o=0;o<_.length;o+=v)i.push(c.call(_,o));return i}function m(_,t,d){for(var i=P.alloc(t),c=d?i.writeInt32BE:i.writeInt32LE,o=0;o<_.length;o++)c.call(i,_[o],o*4,!0);return i}function S(_,t,d,i){P.isBuffer(_)||(_=P.from(_));var c=t(g(_,i),_.length*N);return m(c,d,i)}q.exports={hash:S}},{buffer:73}],286:[function(W,q,D){"use strict";var P=W("./helpers");function v(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function C(i,c){i[c>>5]|=128<<c%32,i[(c+64>>>9<<4)+14]=c;for(var o=1732584193,n=-271733879,s=-1732584194,h=271733878,f=0;f<i.length;f+=16){var l=o,a=n,r=s,x=h;o=g(o,n,s,h,i[f+0],7,-680876936),h=g(h,o,n,s,i[f+1],12,-389564586),s=g(s,h,o,n,i[f+2],17,606105819),n=g(n,s,h,o,i[f+3],22,-1044525330),o=g(o,n,s,h,i[f+4],7,-176418897),h=g(h,o,n,s,i[f+5],12,1200080426),s=g(s,h,o,n,i[f+6],17,-1473231341),n=g(n,s,h,o,i[f+7],22,-45705983),o=g(o,n,s,h,i[f+8],7,1770035416),h=g(h,o,n,s,i[f+9],12,-1958414417),s=g(s,h,o,n,i[f+10],17,-42063),n=g(n,s,h,o,i[f+11],22,-1990404162),o=g(o,n,s,h,i[f+12],7,1804603682),h=g(h,o,n,s,i[f+13],12,-40341101),s=g(s,h,o,n,i[f+14],17,-1502002290),n=g(n,s,h,o,i[f+15],22,1236535329),o=m(o,n,s,h,i[f+1],5,-165796510),h=m(h,o,n,s,i[f+6],9,-1069501632),s=m(s,h,o,n,i[f+11],14,643717713),n=m(n,s,h,o,i[f+0],20,-373897302),o=m(o,n,s,h,i[f+5],5,-701558691),h=m(h,o,n,s,i[f+10],9,38016083),s=m(s,h,o,n,i[f+15],14,-660478335),n=m(n,s,h,o,i[f+4],20,-405537848),o=m(o,n,s,h,i[f+9],5,568446438),h=m(h,o,n,s,i[f+14],9,-1019803690),s=m(s,h,o,n,i[f+3],14,-187363961),n=m(n,s,h,o,i[f+8],20,1163531501),o=m(o,n,s,h,i[f+13],5,-1444681467),h=m(h,o,n,s,i[f+2],9,-51403784),s=m(s,h,o,n,i[f+7],14,1735328473),n=m(n,s,h,o,i[f+12],20,-1926607734),o=S(o,n,s,h,i[f+5],4,-378558),h=S(h,o,n,s,i[f+8],11,-2022574463),s=S(s,h,o,n,i[f+11],16,1839030562),n=S(n,s,h,o,i[f+14],23,-35309556),o=S(o,n,s,h,i[f+1],4,-1530992060),h=S(h,o,n,s,i[f+4],11,1272893353),s=S(s,h,o,n,i[f+7],16,-155497632),n=S(n,s,h,o,i[f+10],23,-1094730640),o=S(o,n,s,h,i[f+13],4,681279174),h=S(h,o,n,s,i[f+0],11,-358537222),s=S(s,h,o,n,i[f+3],16,-722521979),n=S(n,s,h,o,i[f+6],23,76029189),o=S(o,n,s,h,i[f+9],4,-640364487),h=S(h,o,n,s,i[f+12],11,-421815835),s=S(s,h,o,n,i[f+15],16,530742520),n=S(n,s,h,o,i[f+2],23,-995338651),o=_(o,n,s,h,i[f+0],6,-198630844),h=_(h,o,n,s,i[f+7],10,1126891415),s=_(s,h,o,n,i[f+14],15,-1416354905),n=_(n,s,h,o,i[f+5],21,-57434055),o=_(o,n,s,h,i[f+12],6,1700485571),h=_(h,o,n,s,i[f+3],10,-1894986606),s=_(s,h,o,n,i[f+10],15,-1051523),n=_(n,s,h,o,i[f+1],21,-2054922799),o=_(o,n,s,h,i[f+8],6,1873313359),h=_(h,o,n,s,i[f+15],10,-30611744),s=_(s,h,o,n,i[f+6],15,-1560198380),n=_(n,s,h,o,i[f+13],21,1309151649),o=_(o,n,s,h,i[f+4],6,-145523070),h=_(h,o,n,s,i[f+11],10,-1120210379),s=_(s,h,o,n,i[f+2],15,718787259),n=_(n,s,h,o,i[f+9],21,-343485551),o=t(o,l),n=t(n,a),s=t(s,r),h=t(h,x)}return Array(o,n,s,h)}function N(i,c,o,n,s,h){return t(d(t(t(c,i),t(n,h)),s),o)}function g(i,c,o,n,s,h,f){return N(c&o|~c&n,i,c,s,h,f)}function m(i,c,o,n,s,h,f){return N(c&n|o&~n,i,c,s,h,f)}function S(i,c,o,n,s,h,f){return N(c^o^n,i,c,s,h,f)}function _(i,c,o,n,s,h,f){return N(o^(c|~n),i,c,s,h,f)}function t(i,c){var o=(i&65535)+(c&65535),n=(i>>16)+(c>>16)+(o>>16);return n<<16|o&65535}function d(i,c){return i<<c|i>>>32-c}q.exports=function(c){return P.hash(c,C,16)}},{"./helpers":285}],287:[function(W,q,D){"use strict";var P=W("./helpers");function v(S,_){S[_>>5]|=128<<24-_%32,S[(_+64>>9<<4)+15]=_;for(var t=Array(80),d=1732584193,i=-271733879,c=-1732584194,o=271733878,n=-1009589776,s=0;s<S.length;s+=16){for(var h=d,f=i,l=c,a=o,r=n,x=0;x<80;x++){x<16?t[x]=S[s+x]:t[x]=m(t[x-3]^t[x-8]^t[x-14]^t[x-16],1);var y=g(g(m(d,5),C(x,i,c,o)),g(g(n,t[x]),N(x)));n=o,o=c,c=m(i,30),i=d,d=y}d=g(d,h),i=g(i,f),c=g(c,l),o=g(o,a),n=g(n,r)}return Array(d,i,c,o,n)}function C(S,_,t,d){return S<20?_&t|~_&d:S<40?_^t^d:S<60?_&t|_&d|t&d:_^t^d}function N(S){return S<20?1518500249:S<40?1859775393:S<60?-1894007588:-899497514}function g(S,_){var t=(S&65535)+(_&65535),d=(S>>16)+(_>>16)+(t>>16);return d<<16|t&65535}function m(S,_){return S<<_|S>>>32-_}q.exports=function(_){return P.hash(_,v,20,!0)}},{"./helpers":285}],288:[function(W,q,D){"use strict";q.exports=function(){return function(){}}},{}],289:[function(W,q,D){(function(P){"use strict";var v=W("babel-runtime/helpers/typeof"),C=N(v);function N(d){return d&&d.__esModule?d:{default:d}}var g=W("stream"),m=g.Stream,S=W("../lib/common/utils/isArray"),_=S.isArray;q.exports.string=function(i){return typeof i=="string"},q.exports.array=_,q.exports.buffer=P.isBuffer;function t(d){return d instanceof m}q.exports.writableStream=function(i){return t(i)&&typeof i._write=="function"&&(0,C.default)(i._writableState)==="object"}}).call(this,{isBuffer:W("../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(W,q,D){"use strict";D.encodeURIComponent=function(P){try{return encodeURIComponent(P)}catch(v){return P}},D.escape=W("escape-html"),D.timestamp=function(v){if(v){var C=v;return typeof C=="string"&&(C=Number(C)),String(v).length===10&&(C*=1e3),new Date(C)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(W,q,D){(function(P,v){"use strict";var C=W("babel-runtime/core-js/json/stringify"),N=S(C),g=W("babel-runtime/helpers/typeof"),m=S(g);function S(x){return x&&x.__esModule?x:{default:x}}var _=W("util"),t=W("url"),d=W("http"),i=W("https"),c=W("debug")("urllib"),o=W("humanize-ms"),n,s=0,h=Math.pow(2,31)-10,f=/^https?:\/\//i;function l(x,y){return x===void 0?y:x}function a(x,y){return function(p,R,O){if(p)return y(p);x({data:R,status:O.statusCode,headers:O.headers,res:O})}}D.TIMEOUTS=[o("300s"),o("300s")];var r=["json","text"];D.request=function(y,p,R){return arguments.length===2&&typeof p=="function"&&(R=p,p=null),typeof R=="function"?D.requestWithCallback(y,p,R):(n||(n=W("any-promise")),new n(function(O,b){D.requestWithCallback(y,p,a(O,b))}))},D.requestWithCallback=function(y,p,R){if(!y||typeof y!="string"&&(typeof y=="undefined"?"undefined":(0,m.default)(y))!=="object"){var O=_.format("expect request url to be a string or a http request options, but got %j",y);throw new Error(O)}arguments.length===2&&typeof p=="function"&&(R=p,p=null),p=p||{},s>=h&&(s=0);var b=++s;p.requestUrls=p.requestUrls||[];var E={requestId:b,url:y,args:p,ctx:p.ctx};p.emitter&&p.emitter.emit("request",E),p.timeout=p.timeout||D.TIMEOUTS,p.maxRedirects=p.maxRedirects||10,p.streaming=p.streaming||p.customResponse;var w=Date.now(),T;typeof y=="string"?(f.test(y)||(y="http://"+y),T=t.parse(y)):T=y;var F=(p.type||p.method||T.method||"GET").toUpperCase(),M=T.port||80,L=d,Y=l(p.agent,D.agent),K=p.fixJSONCtlChars;T.protocol==="https:"&&(L=i,Y=l(p.httpsAgent,D.httpsAgent),T.port||(M=443));var A={host:T.hostname||T.host||"localhost",path:T.path||"/",method:F,port:M,agent:Y,headers:p.headers||{},lookup:p.lookup};Array.isArray(p.timeout)?A.requestTimeout=p.timeout[p.timeout.length-1]:typeof p.timeout!="undefined"&&(A.requestTimeout=p.timeout);for(var H=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U<H.length;U++){var I=H[U];p.hasOwnProperty(I)&&(A[I]=p[I])}A.rejectUnauthorized===!1&&!A.hasOwnProperty("secureOptions")&&(A.secureOptions=W("constants").SSL_OP_NO_TLSv1_2);var G=p.auth||T.auth;G&&(A.auth=G);var ne=p.content||p.data,oe=F==="GET"||F==="HEAD"||p.dataAsQueryString;if(!p.content&&(ne&&!(typeof ne=="string"||v.isBuffer(ne))))if(oe)ne=p.nestedQuerystring?qs.stringify(ne):querystring.stringify(ne);else{var de=A.headers["Content-Type"]||A.headers["content-type"];de||(p.contentType==="json"?de="application/json":de="application/x-www-form-urlencoded",A.headers["Content-Type"]=de),parseContentType(de).type==="application/json"?ne=(0,N.default)(ne):ne=p.nestedQuerystring?qs.stringify(ne):querystring.stringify(ne)}oe&&ne&&(A.path+=(T.query?"&":"?")+ne,ne=null);var Oe=0;if(ne){var Ae=ne.length;v.isBuffer(ne)||(Ae=v.byteLength(ne)),Oe=A.headers["Content-Length"]=Ae}p.dataType==="json"&&(A.headers.Accept="application/json"),typeof p.beforeRequest=="function"&&p.beforeRequest(A);var pe=null,Se=null,be=null,se=!1,ee=!1,B=0,V=-1,X=!1,Q="",Z="",ie=null;p.timing&&(ie={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function re(){pe&&(clearTimeout(pe),pe=null)}function $(){Se&&(clearTimeout(Se),Se=null)}function J(Ie,qe,st){if($(),!R){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),b,P.pid,A.method,y),Ie&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),b,P.pid,Ie.name,Ie.message,Ie.stack);return}var Ee=R;R=null;var ce={};if(st&&(V=st.statusCode,ce=st.headers),V===401&&ce["www-authenticate"]&&(!p.headers||!p.headers.Authorization)&&p.digestAuth){var fe=ce["www-authenticate"];if(fe.indexOf("Digest ")>=0)return c("Request#%d %s: got digest auth header WWW-Authenticate: %s",b,y,fe),p.headers=p.headers||{},p.headers.Authorization=digestAuthHeader(A.method,A.path,fe,p.digestAuth),c("Request#%d %s: auth with digest header: %s",b,y,p.headers.Authorization),st.headers["set-cookie"]&&(p.headers.Cookie=st.headers["set-cookie"].join(";")),D.requestWithCallback(y,p,Ee)}var ve=Date.now()-w;ie&&(ie.contentDownload=ve),c("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",ve,B,V,A.method,A.host,A.path,ee,ie);var Ce={status:V,statusCode:V,headers:ce,size:B,aborted:X,rt:ve,keepAliveSocket:ee,data:qe,requestUrls:p.requestUrls,timing:ie,remoteAddress:Q,remotePort:Z};if(Ie){var ge="";Y&&typeof Y.getCurrentStatus=="function"&&(ge=", agent status: "+(0,N.default)(Y.getCurrentStatus())),Ie.message+=", "+A.method+" "+y+" "+V+" (connected: "+se+", keepalive socket: "+ee+ge+`)
|
|
|
headers: `+(0,N.default)(ce),Ie.data=qe,Ie.path=A.path,Ie.status=V,Ie.headers=ce,Ie.res=Ce}Ee(Ie,qe,p.streaming?st:Ce),p.emitter&&(E.url=y,E.socket=it&&it.connection,E.options=A,E.size=Oe,p.emitter.emit("response",{requestId:b,error:Ie,ctx:p.ctx,req:E,res:Ce}))}function le(Ie){var qe=null;if(p.followRedirect&&statuses.redirect[Ie.statusCode]){p._followRedirectCount=(p._followRedirectCount||0)+1;var st=Ie.headers.location;if(!st)qe=new Error("Got statusCode "+Ie.statusCode+" but cannot resolve next location from headers"),qe.name="FollowRedirectError";else if(p._followRedirectCount>p.maxRedirects)qe=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+y),qe.name="MaxRedirectError";else{var Ee=p.formatRedirectUrl?p.formatRedirectUrl(y,st):t.resolve(y,st);c("Request#%d %s: `redirected` from %s to %s",b,A.path,y,Ee),$(),p.headers&&p.headers.Host&&f.test(st)&&(p.headers.Host=null);var ce=R;return R=null,D.requestWithCallback(Ee,p,ce),{redirect:!0,error:null}}}return{redirect:!1,error:qe}}!A.headers["User-Agent"]&&!A.headers["user-agent"]&&(A.headers["User-Agent"]=navigator.userAgent),p.gzip&&(!A.headers["Accept-Encoding"]&&!A.headers["accept-encoding"]&&(A.headers["Accept-Encoding"]="gzip"));function ue(Ie,qe,st){var Ee=Ie.headers["content-encoding"];return st(null,qe,Ee)}var xe=p.writeStream;c("Request#%d %s %s with headers %j, options.path: %s",b,F,y,A.headers,A.path),p.requestUrls.push(y);function Me(Ie){if(ie&&(ie.waiting=Date.now()-w),c("Request#%d %s `req response` event emit: status %d, headers: %j",b,y,Ie.statusCode,Ie.headers),p.streaming){var qe=le(Ie);if(qe.redirect){Ie.resume();return}return qe.error?(Ie.resume(),J(qe.error,null,Ie)):J(null,null,Ie)}if(Ie.on("close",function(){c("Request#%d %s: `res close` event emit, total size %d",b,y,B)}),Ie.on("error",function(){c("Request#%d %s: `res error` event emit, total size %d",b,y,B)}),Ie.on("aborted",function(){X=!0,c("Request#%d %s: `res aborted` event emit, total size %d",b,y,B)}),xe){var qe=le(Ie);if(qe.redirect){Ie.resume();return}return qe.error?(Ie.resume(),xe.end(),J(qe.error,null,Ie)):(p.consumeWriteStream===!1?Ie.on("end",J.bind(null,null,null,Ie)):isNode010||isNode012?first([[xe,"close"],[Ie,"aborted"]],function(ce,fe,ve){c("Request#%d %s: writeStream or res %s event emitted",b,y,ve),J(be||null,null,Ie)}):xe.on("close",function(){c("Request#%d %s: writeStream close event emitted",b,y),J(be||null,null,Ie)}),Ie.pipe(xe))}var st=[];Ie.on("data",function(Ee){c("Request#%d %s: `res data` event emit, size %d",b,y,Ee.length),B+=Ee.length,st.push(Ee)}),Ie.on("end",function(){var Ee=v.concat(st,B);if(c("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",b,y,B,Ie._dumped),be)return J(be,Ee,Ie);var ce=le(Ie);if(ce.error)return J(ce.error,Ee,Ie);if(ce.redirect)return;ue(Ie,Ee,function(fe,ve,Ce){if(fe)return J(fe,Ee,Ie);if(!Ce&&r.indexOf(p.dataType)>=0){try{ve=decodeBodyByCharset(ve,Ie)}catch(ye){return c("decodeBodyByCharset error: %s",ye),J(null,ve,Ie)}if(p.dataType==="json")if(B===0)ve=null;else{var ge=parseJSON(ve,K);ge.error?fe=ge.error:ve=ge.data}}X&&c("Request#%d %s: Remote socket was terminated before `response.end()` was called",b,y),J(fe,ve,Ie)})})}var Xe,$e;Array.isArray(p.timeout)?(Xe=o(p.timeout[0]),$e=o(p.timeout[1])):Xe=$e=o(p.timeout),c("ConnectTimeout: %d, ResponseTimeout: %d",Xe,$e);function Je(){c("Connect timer ticking, timeout: %d",Xe),pe=setTimeout(function(){pe=null,V===-1&&(V=-2);var Ie="Connect timeout for "+Xe+"ms",qe="ConnectionTimeoutError";it.socket||(qe="SocketAssignTimeoutError",Ie+=", working sockets is full"),be=new Error(Ie),be.name=qe,be.requestId=b,c("ConnectTimeout: Request#%d %s %s: %s, connected: %s",b,y,be.name,Ie,se),je()},Xe)}function rt(){c("Response timer ticking, timeout: %d",$e),Se=setTimeout(function(){Se=null;var Ie="Response timeout for "+$e+"ms",qe="ResponseTimeoutError";be=new Error(Ie),be.name=qe,be.requestId=b,c("ResponseTimeout: Request#%d %s %s: %s, connected: %s",b,y,be.name,Ie,se),je()},$e)}var it;A.mode=p.mode?p.mode:"";try{it=L.request(A,Me)}catch(Ie){return J(Ie)}typeof window=="undefined"?Je():it.on("requestTimeout",function(){V===-1&&(V=-2);var Ie="Connect timeout for "+Xe+"ms",qe="ConnectionTimeoutError";be=new Error(Ie),be.name=qe,be.requestId=b,je()});function je(){c("Request#%d %s abort, connected: %s",b,y,se),it.socket||(be.noSocket=!0,J(be)),it.abort()}return ie&&it.on("finish",function(){ie.requestSent=Date.now()-w}),it.once("socket",function(Ie){ie&&(ie.queuing=Date.now()-w),isNode010&&Ie.socket&&(Ie=Ie.socket);var qe=Ie.readyState;if(qe==="opening"){Ie.once("lookup",function(st,Ee,ce){c("Request#%d %s lookup: %s, %s, %s",b,y,st,Ee,ce),ie&&(ie.dnslookup=Date.now()-w),Ee&&(Q=Ee)}),Ie.once("connect",function(){ie&&(ie.connected=Date.now()-w),re(),rt(),c("Request#%d %s new socket connected",b,y),se=!0,Q||(Q=Ie.remoteAddress),Z=Ie.remotePort});return}c("Request#%d %s reuse socket connected, readyState: %s",b,y,qe),se=!0,ee=!0,Q||(Q=Ie.remoteAddress),Z=Ie.remotePort,re(),rt()}),it.on("error",function(Ie){(Ie.name==="Error"||Ie.name==="TypeError")&&(Ie.name=se?"ResponseError":"RequestError"),Ie.message+=' (req "error")',c("Request#%d %s `req error` event emit, %s: %s",b,y,Ie.name,Ie.message),J(be||Ie)}),xe&&xe.once("error",function(Ie){Ie.message+=' (writeStream "error")',be=Ie,c("Request#%d %s `writeStream error` event emit, %s: %s",b,y,Ie.name,Ie.message),je()}),p.stream?(p.stream.pipe(it),p.stream.once("error",function(Ie){Ie.message+=' (stream "error")',be=Ie,c("Request#%d %s `readStream error` event emit, %s: %s",b,y,Ie.name,Ie.message),je()})):it.end(ne),it.requestId=b,it}}).call(this,W("_process"),W("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(W,q,D){"use strict";D.d(q,"a",function(){return _});var P=D("q1tI"),v=D("biw7"),C=D("fyJ8");function N(t){var d=t.className,i=t.index,c=t.children,o=t.colSpan,n=t.rowSpan,s=P.useContext(v.a),h=s.prefixCls,f=s.fixedInfoList,l=f[i];return P.createElement(C.a,Object.assign({className:d,index:i,component:"td",prefixCls:h,record:null,dataIndex:null,render:function(){return{children:c,props:{colSpan:o,rowSpan:n}}}},l))}function g(t){return P.createElement("tr",Object.assign({},t))}function m(t){var d=t.children,i=P.useContext(v.a),c=i.prefixCls;return P.createElement("tfoot",{className:"".concat(c,"-summary")},d)}var S=q.b=m,_={Cell:N,Row:g}},nEHx:function(W,q,D){"use strict";D.d(q,"a",function(){return P});var P;(function(v){v.DARK="dark",v.LIGHT="light",v.HIGH_CONTRAST="hc"})(P||(P={}))},nnTU:function(W,q,D){"use strict";D.d(q,"b",function(){return S}),D.d(q,"a",function(){return _});var P=D("MI8n"),v=D("JYp7"),C=D("pmY6"),N=D("24hK"),g=D("746U"),m=D("Cg/j");const S=Object(m.c)("commandService"),_=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new P.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(t,d){if(!t)throw new Error("invalid command");if(typeof t=="string"){if(!d)throw new Error("invalid command");return this.registerCommand({id:t,handler:d})}if(t.description){const s=[];for(let f of t.description.args)s.push(f.constraint);const h=t.handler;t.handler=function(f,...l){return Object(g.o)(l,s),h(f,...l)}}const{id:i}=t;let c=this._commands.get(i);c||(c=new N.a,this._commands.set(i,c));let o=c.unshift(t),n=Object(C.i)(()=>{o();const s=this._commands.get(i);(s==null?void 0:s.isEmpty())&&this._commands.delete(i)});return this._onDidRegisterCommand.fire(i),n}registerCommandAlias(t,d){return _.registerCommand(t,(i,...c)=>i.get(S).executeCommand(d,...c))}getCommand(t){const d=this._commands.get(t);return!d||d.isEmpty()?void 0:v.a.first(d)}getCommands(){const t=new Map;for(const d of this._commands.keys()){const i=this.getCommand(d);i&&t.set(d,i)}return t}};_.registerCommand("noop",()=>{})},oRuE:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("OLod"))})(this,function(P){return P.pad.Iso10126={pad:function(v,C){var N=C*4,g=N-v.sigBytes%N;v.concat(P.lib.WordArray.random(g-1)).concat(P.lib.WordArray.create([g<<24],1))},unpad:function(v){var C=v.words[v.sigBytes-1>>>2]&255;v.sigBytes-=C}},P.pad.Iso10126})},osHv:function(W,q,D){(function(P){P(D("VrN/"))})(function(P){"use strict";var v=P.Pos;function C(f,l){return f.line-l.line||f.ch-l.ch}var N="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",g=N+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",m=new RegExp("<(/?)(["+N+"]["+g+"]*)","g");function S(f,l,a,r){this.line=l,this.ch=a,this.cm=f,this.text=f.getLine(l),this.min=r?Math.max(r.from,f.firstLine()):f.firstLine(),this.max=r?Math.min(r.to-1,f.lastLine()):f.lastLine()}function _(f,l){var a=f.cm.getTokenTypeAt(v(f.line,l));return a&&/\btag\b/.test(a)}function t(f){return f.line>=f.max?void 0:(f.ch=0,f.text=f.cm.getLine(++f.line),!0)}function d(f){return f.line<=f.min?void 0:(f.text=f.cm.getLine(--f.line),f.ch=f.text.length,!0)}function i(f){for(;;){var l=f.text.indexOf(">",f.ch);if(l==-1){if(t(f))continue;return}if(!_(f,l+1)){f.ch=l+1;continue}var a=f.text.lastIndexOf("/",l),r=a>-1&&!/\S/.test(f.text.slice(a+1,l));return f.ch=l+1,r?"selfClose":"regular"}}function c(f){for(;;){var l=f.ch?f.text.lastIndexOf("<",f.ch-1):-1;if(l==-1){if(d(f))continue;return}if(!_(f,l+1)){f.ch=l;continue}m.lastIndex=l,f.ch=l;var a=m.exec(f.text);if(a&&a.index==l)return a}}function o(f){for(;;){m.lastIndex=f.ch;var l=m.exec(f.text);if(!l){if(t(f))continue;return}if(!_(f,l.index+1)){f.ch=l.index+1;continue}return f.ch=l.index+l[0].length,l}}function n(f){for(;;){var l=f.ch?f.text.lastIndexOf(">",f.ch-1):-1;if(l==-1){if(d(f))continue;return}if(!_(f,l+1)){f.ch=l;continue}var a=f.text.lastIndexOf("/",l),r=a>-1&&!/\S/.test(f.text.slice(a+1,l));return f.ch=l+1,r?"selfClose":"regular"}}function s(f,l){for(var a=[];;){var r=o(f),x,y=f.line,p=f.ch-(r?r[0].length:0);if(!r||!(x=i(f)))return;if(x=="selfClose")continue;if(r[1]){for(var R=a.length-1;R>=0;--R)if(a[R]==r[2]){a.length=R;break}if(R<0&&(!l||l==r[2]))return{tag:r[2],from:v(y,p),to:v(f.line,f.ch)}}else a.push(r[2])}}function h(f,l){for(var a=[];;){var r=n(f);if(!r)return;if(r=="selfClose"){c(f);continue}var x=f.line,y=f.ch,p=c(f);if(!p)return;if(p[1])a.push(p[2]);else{for(var R=a.length-1;R>=0;--R)if(a[R]==p[2]){a.length=R;break}if(R<0&&(!l||l==p[2]))return{tag:p[2],from:v(f.line,f.ch),to:v(x,y)}}}}P.registerHelper("fold","xml",function(f,l){for(var a=new S(f,l.line,0);;){var r=o(a);if(!r||a.line!=l.line)return;var x=i(a);if(!x)return;if(!r[1]&&x!="selfClose"){var y=v(a.line,a.ch),p=s(a,r[2]);return p&&C(p.from,y)>0?{from:y,to:p.from}:null}}}),P.findMatchingTag=function(f,l,a){var r=new S(f,l.line,l.ch,a);if(r.text.indexOf(">")==-1&&r.text.indexOf("<")==-1)return;var x=i(r),y=x&&v(r.line,r.ch),p=x&&c(r);if(!x||!p||C(r,l)>0)return;var R={from:v(r.line,r.ch),to:y,tag:p[2]};return x=="selfClose"?{open:R,close:null,at:"open"}:p[1]?{open:h(r,p[2]),close:R,at:"close"}:(r=new S(f,y.line,y.ch,a),{open:R,close:s(r,p[2]),at:"open"})},P.findEnclosingTag=function(f,l,a,r){for(var x=new S(f,l.line,l.ch,a);;){var y=h(x,r);if(!y)break;var p=new S(f,l.line,l.ch,a),R=s(p,y.tag);if(R)return{open:y,close:R}}},P.scanForClosingTag=function(f,l,a,r){var x=new S(f,l.line,l.ch,r?{from:0,to:r}:null);return s(x,a)}})},p5ED:function(W,q,D){"use strict";var P=D("+L6B"),v=D("2/Rp"),C=D("5Dmo"),N=D("3S7+"),g=D("k1fw"),m=D("9og8"),S=D("tJVT"),_=D("WmNS"),t=D.n(_),d=D("q1tI"),i=D.n(d),c=D("vHTk"),o=D.n(c),n=D("yEEn"),s=D("ZW9T"),h=D("1vsH"),f=D("V0Rq"),l=D("m3rI");q.a=function(a){var r,x,y,p,R,O,b,E=a.editOffice,w=E===void 0?"view":E,T=a.data,F=a.theme,M=a.type,L=a.filename,Y=a.monacoEditor,K=a.className,A=a.style,H=a.close,U=a.onClose,I=a.hasMask,G=a.disabledDownload,ne=Object(d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),oe=Object(S.a)(ne,2),de=oe[0],Oe=oe[1],Ae=Object(d.useState)(""),pe=Object(S.a)(Ae,2),Se=pe[0],be=pe[1],se=Object(d.useState)(),ee=Object(S.a)(se,2),B=ee[0],V=ee[1],X=window.ENV==="build"?"/react/build":"",Q=l.a.PROXY_SERVER||location.origin,Z,ie=1024*1024,re=10*ie,$=Object(d.useRef)();(r=T)!==null&&r!==void 0&&r.startsWith("/api")&&M!=="txt"&&(T=(l.a.API_SERVER||location.origin)+T),M==="office"&&(Z=Object(h.T)(T).filesize,Z>re&&(M="other")),L&&Y&&(Y.filename=L),Object(d.useEffect)(function(){var xe,Me,Xe=(xe=document.cookie)===null||xe===void 0||((Me=xe.replace(/\s/g,""))===null||Me===void 0)?void 0:Me.split(";");Xe==null||Xe.map(function($e){var Je=$e.split("=");Je[0]==="_educoder_session"&&be(Je[1])})},[]),Object(d.useEffect)(function(){M==="office"&&J()},[M,T]);var J=function(){var xe=Object(m.a)(t.a.mark(function Me(){var Xe,$e,Je;return t.a.wrap(function(it){for(;;)switch(it.prev=it.next){case 0:return console.log("data:",T),Xe=T,T.startsWith("http")||(Xe=location.origin+Xe),$e=new URL(Xe).pathname.split("/").pop(),it.next=6,Object(f.V)({attachment_id:$e});case 6:Je=it.sent,V(Je);case 8:case"end":return it.stop()}},Me)}));return function(){return xe.apply(this,arguments)}}(),le=function(){if(T.startsWith("http")||T.startsWith("blob:")){ue();return}Object(h.z)(L||"educoder",T,L)},ue=function(){Object(h.x)(L||"educoder",decodeURIComponent(T))};return i.a.createElement("div",{style:Object(g.a)({},A||{}),className:"".concat(I&&o.a.bgBlack," ").concat(M?o.a.wrp:"hide")},H&&i.a.createElement("div",{className:o.a.close,ref:$},!G&&i.a.createElement(N.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return $.current}},i.a.createElement("span",{onClick:ue},i.a.createElement("i",{className:"icon-quxiaozhiding"}))),i.a.createElement(N.a,{title:"\u5173\u95ED",getPopupContainer:function(){return $.current}},i.a.createElement("span",{className:"",onClick:U},i.a.createElement("i",{className:"icon-guanbi1"})))),i.a.createElement("div",{className:"".concat(o.a[K]," ").concat(K," ").concat(o.a.monaco," ").concat(M==="txt"?"show":"hide")},M==="txt"&&i.a.createElement(s.b,Y)),M==="audio"&&i.a.createElement("audio",{src:"".concat(((x=T)===null||x===void 0?void 0:x.indexOf("http://"))>-1||((y=T)===null||y===void 0?void 0:y.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(T),autoPlay:!0}),M==="video"&&i.a.createElement(i.a.Fragment,null,((p=T)===null||p===void 0?void 0:p.indexOf("http"))>-1?i.a.createElement("video",{controls:!0,src:"".concat(T),autoPlay:!0}):i.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(T),autoPlay:!0})),M==="office"&&B&&i.a.createElement("iframe",{src:"".concat(X,"/office.html?key=").concat(B.key,"&url=").concat(Q+B.url,"&callbackUrl=").concat(Q+B.callbackUrl,"&fileType=").concat(B.fileType,"&title=").concat(B.title,"&model=").concat(w,"&officeServer=").concat(l.a.OFFICE_SERVER,"&disabledDownload=").concat(!!G)}),M==="html"&&i.a.createElement("iframe",{src:T+"&disposition=inline"}),M==="pdf"&&i.a.createElement("iframe",{src:"".concat(X,"/js/pdfview/index.html?url=").concat(T,"&disabledDownload=").concat(!!G)}),M==="image"&&i.a.createElement("img",{src:"".concat(((R=T)===null||R===void 0?void 0:R.indexOf("http://"))>-1||((O=T)===null||O===void 0?void 0:O.indexOf("https://"))>-1||(b=T)!==null&&b!==void 0&&b.startsWith("/api")?"":"data:image/png;base64,").concat(T)}),M==="other"&&i.a.createElement("div",null,i.a.createElement(v.a,{type:"primary",size:"large",onClick:le},i.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),M==="download"&&i.a.createElement(v.a,{type:"primary",size:"large",onClick:le},i.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(W,q,D){},pA7S:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(P){return function(){var v=P,C=v.lib,N=C.WordArray,g=C.BlockCipher,m=v.algo,S=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],_=[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],t=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],d=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],i=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],c=m.DES=g.extend({_doReset:function(){for(var h=this._key,f=h.words,l=[],a=0;a<56;a++){var r=S[a]-1;l[a]=f[r>>>5]>>>31-r%32&1}for(var x=this._subKeys=[],y=0;y<16;y++){for(var p=x[y]=[],R=t[y],a=0;a<24;a++)p[a/6|0]|=l[(_[a]-1+R)%28]<<31-a%6,p[4+(a/6|0)]|=l[28+(_[a+24]-1+R)%28]<<31-a%6;p[0]=p[0]<<1|p[0]>>>31;for(var a=1;a<7;a++)p[a]=p[a]>>>(a-1)*4+3;p[7]=p[7]<<5|p[7]>>>27}for(var O=this._invSubKeys=[],a=0;a<16;a++)O[a]=x[15-a]},encryptBlock:function(h,f){this._doCryptBlock(h,f,this._subKeys)},decryptBlock:function(h,f){this._doCryptBlock(h,f,this._invSubKeys)},_doCryptBlock:function(h,f,l){this._lBlock=h[f],this._rBlock=h[f+1],o.call(this,4,252645135),o.call(this,16,65535),n.call(this,2,858993459),n.call(this,8,16711935),o.call(this,1,1431655765);for(var a=0;a<16;a++){for(var r=l[a],x=this._lBlock,y=this._rBlock,p=0,R=0;R<8;R++)p|=d[R][((y^r[R])&i[R])>>>0];this._lBlock=y,this._rBlock=x^p}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,o.call(this,1,1431655765),n.call(this,8,16711935),n.call(this,2,858993459),o.call(this,16,65535),o.call(this,4,252645135),h[f]=this._lBlock,h[f+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function o(h,f){var l=(this._lBlock>>>h^this._rBlock)&f;this._rBlock^=l,this._lBlock^=l<<h}function n(h,f){var l=(this._rBlock>>>h^this._lBlock)&f;this._lBlock^=l,this._rBlock^=l<<h}v.DES=g._createHelper(c);var s=m.TripleDES=g.extend({_doReset:function(){var h=this._key,f=h.words;if(f.length!==2&&f.length!==4&&f.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var l=f.slice(0,2),a=f.length<4?f.slice(0,2):f.slice(2,4),r=f.length<6?f.slice(0,2):f.slice(4,6);this._des1=c.createEncryptor(N.create(l)),this._des2=c.createEncryptor(N.create(a)),this._des3=c.createEncryptor(N.create(r))},encryptBlock:function(h,f){this._des1.encryptBlock(h,f),this._des2.decryptBlock(h,f),this._des3.encryptBlock(h,f)},decryptBlock:function(h,f){this._des3.decryptBlock(h,f),this._des2.encryptBlock(h,f),this._des1.decryptBlock(h,f)},keySize:192/32,ivSize:64/32,blockSize:64/32});v.TripleDES=g._createHelper(s)}(),P.TripleDES})},pIsd:function(W,q,D){var P=D("BJfS"),v=function(g){var m=/[height|width]$/;return m.test(g)},C=function(g){var m="",S=Object.keys(g);return S.forEach(function(_,t){var d=g[_];_=P(_),v(_)&&typeof d=="number"&&(d=d+"px"),d===!0?m+=_:d===!1?m+="not "+_:m+="("+_+": "+d+")",t<S.length-1&&(m+=" and ")}),m},N=function(g){var m="";return typeof g=="string"?g:g instanceof Array?(g.forEach(function(S,_){m+=C(S),_<g.length-1&&(m+=", ")}),m):C(g)};W.exports=N},pmY6:function(W,q,D){"use strict";D.d(q,"h",function(){return d}),D.d(q,"g",function(){return c}),D.d(q,"f",function(){return o}),D.d(q,"e",function(){return n}),D.d(q,"i",function(){return s}),D.d(q,"b",function(){return h}),D.d(q,"a",function(){return f}),D.d(q,"d",function(){return l}),D.d(q,"c",function(){return a});var P=D("C/vA"),v=D("JYp7");const C=!1;let N=null;function g(r){N=r}if(C){const r="__is_disposable_tracked__";g(new class{trackDisposable(x){const y=new Error("Potentially leaked disposable").stack;setTimeout(()=>{x[r]||console.log(y)},3e3)}setParent(x,y){if(x&&x!==f.None)try{x[r]=!0}catch(p){}}markAsDisposed(x){if(x&&x!==f.None)try{x[r]=!0}catch(y){}}markAsSingleton(x){}})}function m(r){return N==null||N.trackDisposable(r),r}function S(r){N==null||N.markAsDisposed(r)}function _(r,x){N==null||N.setParent(r,x)}function t(r,x){if(!N)return;for(const y of r)N.setParent(y,x)}function d(r){return N==null||N.markAsSingleton(r),r}class i extends Error{constructor(r){super(`Encountered errors while disposing of store. Errors: [${r.join(", ")}]`);this.errors=r}}function c(r){return typeof r.dispose=="function"&&r.dispose.length===0}function o(r){if(v.a.is(r)){let x=[];for(const y of r)if(y)try{y.dispose()}catch(p){x.push(p)}if(x.length===1)throw x[0];if(x.length>1)throw new i(x);return Array.isArray(r)?[]:r}else if(r)return r.dispose(),r}function n(...r){const x=s(()=>o(r));return t(r,x),x}function s(r){const x=m({dispose:Object(P.a)(()=>{S(x),r()})});return x}class h{constructor(){this._toDispose=new Set,this._isDisposed=!1,m(this)}dispose(){if(this._isDisposed)return;S(this),this._isDisposed=!0,this.clear()}clear(){try{o(this._toDispose.values())}finally{this._toDispose.clear()}}add(r){if(!r)return r;if(r===this)throw new Error("Cannot register a disposable on itself!");return _(r,this),this._isDisposed?h.DISABLE_DISPOSED_WARNING||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(r),r}}h.DISABLE_DISPOSED_WARNING=!1;class f{constructor(){this._store=new h,m(this),_(this._store,this)}dispose(){S(this),this._store.dispose()}_register(r){if(r===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(r)}}f.None=Object.freeze({dispose(){}});class l{constructor(){this._isDisposed=!1,m(this)}get value(){return this._isDisposed?void 0:this._value}set value(r){var x;if(this._isDisposed||r===this._value)return;(x=this._value)===null||x===void 0||x.dispose(),r&&_(r,this),this._value=r}clear(){this.value=void 0}dispose(){var r;this._isDisposed=!0,S(this),(r=this._value)===null||r===void 0||r.dispose(),this._value=void 0}clearAndLeak(){const r=this._value;return this._value=void 0,r&&_(r,null),r}}class a{constructor(r){this.object=r}dispose(){}}},psGv:function(W,q,D){var P,v;(function(){var C;(function(){"use strict";var S=[,,function(i){function c(s){this.__parent=s,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}c.prototype.clone_empty=function(){var s=new c(this.__parent);return s.set_indent(this.__indent_count,this.__alignment_count),s},c.prototype.item=function(s){return s<0?this.__items[this.__items.length+s]:this.__items[s]},c.prototype.has_match=function(s){for(var h=this.__items.length-1;h>=0;h--)if(this.__items[h].match(s))return!0;return!1},c.prototype.set_indent=function(s,h){this.is_empty()&&(this.__indent_count=s||0,this.__alignment_count=h||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},c.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},c.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},c.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var s=this.__parent.current_line;return s.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),s.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),s.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,s.__items[0]===" "&&(s.__items.splice(0,1),s.__character_count-=1),!0}return!1},c.prototype.is_empty=function(){return this.__items.length===0},c.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},c.prototype.push=function(s){this.__items.push(s);var h=s.lastIndexOf(`
|
|
|
`);h!==-1?this.__character_count=s.length-h:this.__character_count+=s.length},c.prototype.pop=function(){var s=null;return this.is_empty()||(s=this.__items.pop(),this.__character_count-=s.length),s},c.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},c.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},c.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},c.prototype.toString=function(){var s="";return this.is_empty()?this.__parent.indent_empty_lines&&(s=this.__parent.get_indent_string(this.__indent_count)):(s=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),s+=this.__items.join("")),s};function o(s,h){this.__cache=[""],this.__indent_size=s.indent_size,this.__indent_string=s.indent_char,s.indent_with_tabs||(this.__indent_string=new Array(s.indent_size+1).join(s.indent_char)),h=h||"",s.indent_level>0&&(h=new Array(s.indent_level+1).join(this.__indent_string)),this.__base_string=h,this.__base_string_length=h.length}o.prototype.get_indent_size=function(s,h){var f=this.__base_string_length;return h=h||0,s<0&&(f=0),f+=s*this.__indent_size,f+=h,f},o.prototype.get_indent_string=function(s,h){var f=this.__base_string;return h=h||0,s<0&&(s=0,f=""),h+=s*this.__indent_size,this.__ensure_cache(h),f+=this.__cache[h],f},o.prototype.__ensure_cache=function(s){for(;s>=this.__cache.length;)this.__add_column()},o.prototype.__add_column=function(){var s=this.__cache.length,h=0,f="";this.__indent_size&&s>=this.__indent_size&&(h=Math.floor(s/this.__indent_size),s-=h*this.__indent_size,f=new Array(h+1).join(this.__indent_string)),s&&(f+=new Array(s+1).join(" ")),this.__cache.push(f)};function n(s,h){this.__indent_cache=new o(s,h),this.raw=!1,this._end_with_newline=s.end_with_newline,this.indent_size=s.indent_size,this.wrap_line_length=s.wrap_line_length,this.indent_empty_lines=s.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new c(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}n.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},n.prototype.get_line_number=function(){return this.__lines.length},n.prototype.get_indent_string=function(s,h){return this.__indent_cache.get_indent_string(s,h)},n.prototype.get_indent_size=function(s,h){return this.__indent_cache.get_indent_size(s,h)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(s){return this.is_empty()||!s&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},n.prototype.get_code=function(s){this.trim(!0);var h=this.current_line.pop();h&&(h[h.length-1]===`
|
|
|
`&&(h=h.replace(/\n+$/g,"")),this.current_line.push(h)),this._end_with_newline&&this.__add_outputline();var f=this.__lines.join(`
|
|
|
`);return s!==`
|
|
|
`&&(f=f.replace(/[\n]/g,s)),f},n.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},n.prototype.set_indent=function(s,h){return s=s||0,h=h||0,this.next_line.set_indent(s,h),this.__lines.length>1?(this.current_line.set_indent(s,h),!0):(this.current_line.set_indent(),!1)},n.prototype.add_raw_token=function(s){for(var h=0;h<s.newlines;h++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(s.whitespace_before),this.current_line.push(s.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},n.prototype.add_token=function(s){this.__add_space_before_token(),this.current_line.push(s),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},n.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},n.prototype.remove_indent=function(s){for(var h=this.__lines.length;s<h;)this.__lines[s]._remove_indent(),s++;this.current_line._remove_wrap_indent()},n.prototype.trim=function(s){for(s=s===void 0?!1:s,this.current_line.trim();s&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},n.prototype.just_added_newline=function(){return this.current_line.is_empty()},n.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},n.prototype.ensure_empty_line_above=function(s,h){for(var f=this.__lines.length-2;f>=0;){var l=this.__lines[f];if(l.is_empty())break;if(l.item(0).indexOf(s)!==0&&l.item(-1)!==h){this.__lines.splice(f+1,0,new c(this)),this.previous_line=this.__lines[this.__lines.length-2];break}f--}},i.exports.Output=n},function(i){function c(o,n,s,h){this.type=o,this.text=n,this.comments_before=null,this.newlines=s||0,this.whitespace_before=h||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}i.exports.Token=c},,,function(i){function c(s,h){this.raw_options=o(s,h),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}c.prototype._get_array=function(s,h){var f=this.raw_options[s],l=h||[];return typeof f=="object"?f!==null&&typeof f.concat=="function"&&(l=f.concat()):typeof f=="string"&&(l=f.split(/[^a-zA-Z0-9_\/\-]+/)),l},c.prototype._get_boolean=function(s,h){var f=this.raw_options[s],l=f===void 0?!!h:!!f;return l},c.prototype._get_characters=function(s,h){var f=this.raw_options[s],l=h||"";return typeof f=="string"&&(l=f.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),l},c.prototype._get_number=function(s,h){var f=this.raw_options[s];h=parseInt(h,10),isNaN(h)&&(h=0);var l=parseInt(f,10);return isNaN(l)&&(l=h),l},c.prototype._get_selection=function(s,h,f){var l=this._get_selection_list(s,h,f);if(l.length!==1)throw new Error("Invalid Option Value: The option '"+s+`' can only be one of the following values:
|
|
|
`+h+`
|
|
|
You passed in: '`+this.raw_options[s]+"'");return l[0]},c.prototype._get_selection_list=function(s,h,f){if(!h||h.length===0)throw new Error("Selection list cannot be empty.");if(f=f||[h[0]],!this._is_valid_selection(f,h))throw new Error("Invalid Default Value!");var l=this._get_array(s,f);if(!this._is_valid_selection(l,h))throw new Error("Invalid Option Value: The option '"+s+`' can contain only the following values:
|
|
|
`+h+`
|
|
|
You passed in: '`+this.raw_options[s]+"'");return l},c.prototype._is_valid_selection=function(s,h){return s.length&&h.length&&!s.some(function(f){return h.indexOf(f)===-1})};function o(s,h){var f={};s=n(s);var l;for(l in s)l!==h&&(f[l]=s[l]);if(h&&s[h])for(l in s[h])f[l]=s[h][l];return f}function n(s){var h={},f;for(f in s){var l=f.replace(/-/g,"_");h[l]=s[f]}return h}i.exports.Options=c,i.exports.normalizeOpts=n,i.exports.mergeOpts=o},,function(i){var c=RegExp.prototype.hasOwnProperty("sticky");function o(n){this.__input=n||"",this.__input_length=this.__input.length,this.__position=0}o.prototype.restart=function(){this.__position=0},o.prototype.back=function(){this.__position>0&&(this.__position-=1)},o.prototype.hasNext=function(){return this.__position<this.__input_length},o.prototype.next=function(){var n=null;return this.hasNext()&&(n=this.__input.charAt(this.__position),this.__position+=1),n},o.prototype.peek=function(n){var s=null;return n=n||0,n+=this.__position,n>=0&&n<this.__input_length&&(s=this.__input.charAt(n)),s},o.prototype.__match=function(n,s){n.lastIndex=s;var h=n.exec(this.__input);return h&&!(c&&n.sticky)&&(h.index!==s&&(h=null)),h},o.prototype.test=function(n,s){return s=s||0,s+=this.__position,s>=0&&s<this.__input_length?!!this.__match(n,s):!1},o.prototype.testChar=function(n,s){var h=this.peek(s);return n.lastIndex=0,h!==null&&n.test(h)},o.prototype.match=function(n){var s=this.__match(n,this.__position);return s?this.__position+=s[0].length:s=null,s},o.prototype.read=function(n,s,h){var f="",l;return n&&(l=this.match(n),l&&(f+=l[0])),s&&(l||!n)&&(f+=this.readUntil(s,h)),f},o.prototype.readUntil=function(n,s){var h="",f=this.__position;n.lastIndex=this.__position;var l=n.exec(this.__input);return l?(f=l.index,s&&(f+=l[0].length)):f=this.__input_length,h=this.__input.substring(this.__position,f),this.__position=f,h},o.prototype.readUntilAfter=function(n){return this.readUntil(n,!0)},o.prototype.get_regexp=function(n,s){var h=null,f="g";return s&&c&&(f="y"),typeof n=="string"&&n!==""?h=new RegExp(n,f):n&&(h=new RegExp(n.source,f)),h},o.prototype.get_literal_regexp=function(n){return RegExp(n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},o.prototype.peekUntilAfter=function(n){var s=this.__position,h=this.readUntilAfter(n);return this.__position=s,h},o.prototype.lookBack=function(n){var s=this.__position-1;return s>=n.length&&this.__input.substring(s-n.length,s).toLowerCase()===n},i.exports.InputScanner=o},function(i,c,o){var n=o(8).InputScanner,s=o(3).Token,h=o(10).TokenStream,f=o(11).WhitespacePattern,l={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},a=function(r,x){this._input=new n(r),this._options=x||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new f(this._input)};a.prototype.tokenize=function(){this._input.restart(),this.__tokens=new h,this._reset();for(var r,x=new s(l.START,""),y=null,p=[],R=new h;x.type!==l.EOF;){for(r=this._get_next_token(x,y);this._is_comment(r);)R.add(r),r=this._get_next_token(x,y);R.isEmpty()||(r.comments_before=R,R=new h),r.parent=y,this._is_opening(r)?(p.push(y),y=r):y&&this._is_closing(r,y)&&(r.opened=y,y.closed=r,y=p.pop(),r.parent=y),r.previous=x,x.next=r,this.__tokens.add(r),x=r}return this.__tokens},a.prototype._is_first_token=function(){return this.__tokens.isEmpty()},a.prototype._reset=function(){},a.prototype._get_next_token=function(r,x){this._readWhitespace();var y=this._input.read(/.+/g);return y?this._create_token(l.RAW,y):this._create_token(l.EOF,"")},a.prototype._is_comment=function(r){return!1},a.prototype._is_opening=function(r){return!1},a.prototype._is_closing=function(r,x){return!1},a.prototype._create_token=function(r,x){var y=new s(r,x,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return y},a.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},i.exports.Tokenizer=a,i.exports.TOKEN=l},function(i){function c(o){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=o}c.prototype.restart=function(){this.__position=0},c.prototype.isEmpty=function(){return this.__tokens_length===0},c.prototype.hasNext=function(){return this.__position<this.__tokens_length},c.prototype.next=function(){var o=null;return this.hasNext()&&(o=this.__tokens[this.__position],this.__position+=1),o},c.prototype.peek=function(o){var n=null;return o=o||0,o+=this.__position,o>=0&&o<this.__tokens_length&&(n=this.__tokens[o]),n},c.prototype.add=function(o){this.__parent_token&&(o.parent=this.__parent_token),this.__tokens.push(o),this.__tokens_length+=1},i.exports.TokenStream=c},function(i,c,o){var n=o(12).Pattern;function s(h,f){n.call(this,h,f),f?this._line_regexp=this._input.get_regexp(f._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}s.prototype=new n,s.prototype.__set_whitespace_patterns=function(h,f){h+="\\t ",f+="\\n\\r",this._match_pattern=this._input.get_regexp("["+h+f+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+f+"]")},s.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var h=this._input.read(this._match_pattern);if(h===" ")this.whitespace_before_token=" ";else if(h){var f=this.__split(this._newline_regexp,h);this.newline_count=f.length-1,this.whitespace_before_token=f[this.newline_count]}return h},s.prototype.matching=function(h,f){var l=this._create();return l.__set_whitespace_patterns(h,f),l._update(),l},s.prototype._create=function(){return new s(this._input,this)},s.prototype.__split=function(h,f){h.lastIndex=0;for(var l=0,a=[],r=h.exec(f);r;)a.push(f.substring(l,r.index)),l=r.index+r[0].length,r=h.exec(f);return l<f.length?a.push(f.substring(l,f.length)):a.push(""),a},i.exports.WhitespacePattern=s},function(i){function c(o,n){this._input=o,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,n&&(this._starting_pattern=this._input.get_regexp(n._starting_pattern,!0),this._match_pattern=this._input.get_regexp(n._match_pattern,!0),this._until_pattern=this._input.get_regexp(n._until_pattern),this._until_after=n._until_after)}c.prototype.read=function(){var o=this._input.read(this._starting_pattern);return(!this._starting_pattern||o)&&(o+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),o},c.prototype.read_match=function(){return this._input.match(this._match_pattern)},c.prototype.until_after=function(o){var n=this._create();return n._until_after=!0,n._until_pattern=this._input.get_regexp(o),n._update(),n},c.prototype.until=function(o){var n=this._create();return n._until_after=!1,n._until_pattern=this._input.get_regexp(o),n._update(),n},c.prototype.starting_with=function(o){var n=this._create();return n._starting_pattern=this._input.get_regexp(o,!0),n._update(),n},c.prototype.matching=function(o){var n=this._create();return n._match_pattern=this._input.get_regexp(o,!0),n._update(),n},c.prototype._create=function(){return new c(this._input,this)},c.prototype._update=function(){},i.exports.Pattern=c},function(i){function c(o,n){o=typeof o=="string"?o:o.source,n=typeof n=="string"?n:n.source,this.__directives_block_pattern=new RegExp(o+/ beautify( \w+[:]\w+)+ /.source+n,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(o+/\sbeautify\signore:end\s/.source+n,"g")}c.prototype.get_directives=function(o){if(!o.match(this.__directives_block_pattern))return null;var n={};this.__directive_pattern.lastIndex=0;for(var s=this.__directive_pattern.exec(o);s;)n[s[1]]=s[2],s=this.__directive_pattern.exec(o);return n},c.prototype.readIgnored=function(o){return o.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=c},function(i,c,o){var n=o(12).Pattern,s={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function h(f,l){n.call(this,f,l),this.__template_pattern=null,this._disabled=Object.assign({},s),this._excluded=Object.assign({},s),l&&(this.__template_pattern=this._input.get_regexp(l.__template_pattern),this._excluded=Object.assign(this._excluded,l._excluded),this._disabled=Object.assign(this._disabled,l._disabled));var a=new n(f);this.__patterns={handlebars_comment:a.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:a.starting_with(/{{{/).until_after(/}}}/),handlebars:a.starting_with(/{{/).until_after(/}}/),php:a.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:a.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:a.starting_with(/{%/).until_after(/%}/),django_value:a.starting_with(/{{/).until_after(/}}/),django_comment:a.starting_with(/{#/).until_after(/#}/),smarty:a.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:a.starting_with(/{\*/).until_after(/\*}/),smarty_literal:a.starting_with(/{literal}/).until_after(/{\/literal}/)}}h.prototype=new n,h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){this.__set_templated_pattern()},h.prototype.disable=function(f){var l=this._create();return l._disabled[f]=!0,l._update(),l},h.prototype.read_options=function(f){var l=this._create();for(var a in s)l._disabled[a]=f.templating.indexOf(a)===-1;return l._update(),l},h.prototype.exclude=function(f){var l=this._create();return l._excluded[f]=!0,l._update(),l},h.prototype.read=function(){var f="";this._match_pattern?f=this._input.read(this._starting_pattern):f=this._input.read(this._starting_pattern,this.__template_pattern);for(var l=this._read_template();l;)this._match_pattern?l+=this._input.read(this._match_pattern):l+=this._input.readUntil(this.__template_pattern),f+=l,l=this._read_template();return this._until_after&&(f+=this._input.readUntilAfter(this._until_pattern)),f},h.prototype.__set_templated_pattern=function(){var f=[];this._disabled.php||f.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||f.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||f.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(f.push(this.__patterns.django._starting_pattern.source),f.push(this.__patterns.django_value._starting_pattern.source),f.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||f.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&f.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+f.join("|")+")")},h.prototype._read_template=function(){var f="",l=this._input.peek();if(l==="<"){var a=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&a==="?"&&(f=f||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&a==="%"&&(f=f||this.__patterns.erb.read())}else l==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(f=f||this.__patterns.handlebars_comment.read(),f=f||this.__patterns.handlebars_unescaped.read(),f=f||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(f=f||this.__patterns.django_value.read()),this._excluded.django||(f=f||this.__patterns.django_comment.read(),f=f||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(f=f||this.__patterns.smarty_comment.read(),f=f||this.__patterns.smarty_literal.read(),f=f||this.__patterns.smarty.read()));return f},i.exports.TemplatablePattern=h},,,,function(i,c,o){var n=o(19).Beautifier,s=o(20).Options;function h(f,l,a,r){var x=new n(f,l,a,r);return x.beautify()}i.exports=h,i.exports.defaultOptions=function(){return new s}},function(i,c,o){var n=o(20).Options,s=o(2).Output,h=o(21).Tokenizer,f=o(21).TOKEN,l=/\r\n|[\r\n]/,a=/\r\n|[\r\n]/g,r=function(F,M){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=F.max_preserve_newlines,this.preserve_newlines=F.preserve_newlines,this._output=new s(F,M)};r.prototype.current_line_has_match=function(F){return this._output.current_line.has_match(F)},r.prototype.set_space_before_token=function(F,M){this._output.space_before_token=F,this._output.non_breaking_space=M},r.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},r.prototype.add_raw_token=function(F){this._output.add_raw_token(F)},r.prototype.print_preserved_newlines=function(F){var M=0;F.type!==f.TEXT&&F.previous.type!==f.TEXT&&(M=F.newlines?1:0),this.preserve_newlines&&(M=F.newlines<this.max_preserve_newlines+1?F.newlines:this.max_preserve_newlines+1);for(var L=0;L<M;L++)this.print_newline(L>0);return M!==0},r.prototype.traverse_whitespace=function(F){return F.whitespace_before||F.newlines?(this.print_preserved_newlines(F)||(this._output.space_before_token=!0),!0):!1},r.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},r.prototype.print_newline=function(F){this._output.add_new_line(F)},r.prototype.print_token=function(F){F.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(F.text))},r.prototype.indent=function(){this.indent_level++},r.prototype.get_full_indent=function(F){return F=this.indent_level+(F||0),F<1?"":this._output.get_indent_string(F)};var x=function(F){for(var M=null,L=F.next;L.type!==f.EOF&&F.closed!==L;){if(L.type===f.ATTRIBUTE&&L.text==="type"){L.next&&L.next.type===f.EQUALS&&L.next.next&&L.next.next.type===f.VALUE&&(M=L.next.next.text);break}L=L.next}return M},y=function(F,M){var L=null,Y=null;return M.closed?(F==="script"?L="text/javascript":F==="style"&&(L="text/css"),L=x(M)||L,L.search("text/css")>-1?Y="css":L.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?Y="javascript":L.search(/(text|application|dojo)\/(x-)?(html)/)>-1?Y="html":L.search(/test\/null/)>-1&&(Y="null"),Y):null};function p(F,M){return M.indexOf(F)!==-1}function R(F,M,L){this.parent=F||null,this.tag=M?M.tag_name:"",this.indent_level=L||0,this.parser_token=M||null}function O(F){this._printer=F,this._current_frame=null}O.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},O.prototype.record_tag=function(F){var M=new R(this._current_frame,F,this._printer.indent_level);this._current_frame=M},O.prototype._try_pop_frame=function(F){var M=null;return F&&(M=F.parser_token,this._printer.indent_level=F.indent_level,this._current_frame=F.parent),M},O.prototype._get_frame=function(F,M){for(var L=this._current_frame;L&&!(F.indexOf(L.tag)!==-1);){if(M&&M.indexOf(L.tag)!==-1){L=null;break}L=L.parent}return L},O.prototype.try_pop=function(F,M){var L=this._get_frame([F],M);return this._try_pop_frame(L)},O.prototype.indent_to_tag=function(F){var M=this._get_frame(F);M&&(this._printer.indent_level=M.indent_level)};function b(F,M,L,Y){this._source_text=F||"",M=M||{},this._js_beautify=L,this._css_beautify=Y,this._tag_stack=null;var K=new n(M,"html");this._options=K,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}b.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var F=this._source_text,M=this._options.eol;this._options.eol==="auto"&&(M=`
|
|
|
`,F&&l.test(F)&&(M=F.match(l)[0])),F=F.replace(a,`
|
|
|
`);var L=F.match(/^[\t ]*/)[0],Y={text:"",type:""},K=new E,A=new r(this._options,L),H=new h(F,this._options).tokenize();this._tag_stack=new O(A);for(var U=null,I=H.next();I.type!==f.EOF;)I.type===f.TAG_OPEN||I.type===f.COMMENT?(U=this._handle_tag_open(A,I,K,Y),K=U):I.type===f.ATTRIBUTE||I.type===f.EQUALS||I.type===f.VALUE||I.type===f.TEXT&&!K.tag_complete?U=this._handle_inside_tag(A,I,K,H):I.type===f.TAG_CLOSE?U=this._handle_tag_close(A,I,K):I.type===f.TEXT?U=this._handle_text(A,I,K):A.add_raw_token(I),Y=U,I=H.next();var G=A._output.get_code(M);return G},b.prototype._handle_tag_close=function(F,M,L){var Y={text:M.text,type:M.type};return F.alignment_size=0,L.tag_complete=!0,F.set_space_before_token(M.newlines||M.whitespace_before!=="",!0),L.is_unformatted?F.add_raw_token(M):(L.tag_start_char==="<"&&(F.set_space_before_token(M.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&L.has_wrapped_attrs&&F.print_newline(!1)),F.print_token(M)),L.indent_content&&!(L.is_unformatted||L.is_content_unformatted)&&(F.indent(),L.indent_content=!1),!L.is_inline_element&&!(L.is_unformatted||L.is_content_unformatted)&&F.set_wrap_point(),Y},b.prototype._handle_inside_tag=function(F,M,L,Y){var K=L.has_wrapped_attrs,A={text:M.text,type:M.type};if(F.set_space_before_token(M.newlines||M.whitespace_before!=="",!0),L.is_unformatted)F.add_raw_token(M);else if(L.tag_start_char==="{"&&M.type===f.TEXT)F.print_preserved_newlines(M)?(M.newlines=0,F.add_raw_token(M)):F.print_token(M);else{if(M.type===f.ATTRIBUTE?(F.set_space_before_token(!0),L.attr_count+=1):(M.type===f.EQUALS||M.type===f.VALUE&&M.previous.type===f.EQUALS)&&F.set_space_before_token(!1),M.type===f.ATTRIBUTE&&L.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(F.traverse_whitespace(M),K=K||M.newlines!==0),this._is_wrap_attributes_force)){var H=L.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&L.attr_count===1){var U=!0,I=0,G;do{if(G=Y.peek(I),G.type===f.ATTRIBUTE){U=!1;break}I+=1}while(I<4&&G.type!==f.EOF&&G.type!==f.TAG_CLOSE);H=!U}H&&(F.print_newline(!1),K=!0)}F.print_token(M),K=K||F.previous_token_wrapped(),L.has_wrapped_attrs=K}return A},b.prototype._handle_text=function(F,M,L){var Y={text:M.text,type:"TK_CONTENT"};return L.custom_beautifier_name?this._print_custom_beatifier_text(F,M,L):L.is_unformatted||L.is_content_unformatted?F.add_raw_token(M):(F.traverse_whitespace(M),F.print_token(M)),Y},b.prototype._print_custom_beatifier_text=function(F,M,L){var Y=this;if(M.text!==""){var K=M.text,A,H=1,U="",I="";L.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?A=this._js_beautify:L.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?A=this._css_beautify:L.custom_beautifier_name==="html"&&(A=function(Ae,pe){var Se=new b(Ae,pe,Y._js_beautify,Y._css_beautify);return Se.beautify()}),this._options.indent_scripts==="keep"?H=0:this._options.indent_scripts==="separate"&&(H=-F.indent_level);var G=F.get_full_indent(H);if(K=K.replace(/\n[ \t]*$/,""),L.custom_beautifier_name!=="html"&&K[0]==="<"&&K.match(/^(<!--|<!\[CDATA\[)/)){var ne=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(K);if(!ne){F.add_raw_token(M);return}U=G+ne[1]+`
|
|
|
`,K=ne[4],ne[5]&&(I=G+ne[5]),K=K.replace(/\n[ \t]*$/,""),(ne[2]||ne[3].indexOf(`
|
|
|
`)!==-1)&&(ne=ne[3].match(/[ \t]+$/),ne&&(M.whitespace_before=ne[0]))}if(K)if(A){var oe=function(){this.eol=`
|
|
|
`};oe.prototype=this._options.raw_options;var de=new oe;K=A(G+K,de)}else{var Oe=M.whitespace_before;Oe&&(K=K.replace(new RegExp(`
|
|
|
(`+Oe+")?","g"),`
|
|
|
`)),K=G+K.replace(/\n/g,`
|
|
|
`+G)}U&&(K?K=U+K+`
|
|
|
`+I:K=U+I),F.print_newline(!1),K&&(M.text=K,M.whitespace_before="",M.newlines=0,F.add_raw_token(M),F.print_newline(!0))}},b.prototype._handle_tag_open=function(F,M,L,Y){var K=this._get_tag_open_token(M);return(L.is_unformatted||L.is_content_unformatted)&&!L.is_empty_element&&M.type===f.TAG_OPEN&&M.text.indexOf("</")===0?(F.add_raw_token(M),K.start_tag_token=this._tag_stack.try_pop(K.tag_name)):(F.traverse_whitespace(M),this._set_tag_position(F,M,K,L,Y),K.is_inline_element||F.set_wrap_point(),F.print_token(M)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(K.alignment_size=M.text.length+1),!K.tag_complete&&!K.is_unformatted&&(F.alignment_size=K.alignment_size),K};var E=function(F,M){if(this.parent=F||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!M)this.tag_complete=!0;else{var L;this.tag_start_char=M.text[0],this.text=M.text,this.tag_start_char==="<"?(L=M.text.match(/^<([^\s>]*)/),this.tag_check=L?L[1]:""):(L=M.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=L?L[1]:"",(M.text.startsWith("{{#>")||M.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&M.next!==null?this.tag_check=M.next.text.split(" ")[0]:this.tag_check=M.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),M.type===f.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||M.closed&&M.closed.text==="/>";var Y=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(Y=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(Y)))}};b.prototype._get_tag_open_token=function(F){var M=new E(this._tag_stack.get_parser_token(),F);return M.alignment_size=this._options.wrap_attributes_indent_size,M.is_end_tag=M.is_end_tag||p(M.tag_check,this._options.void_elements),M.is_empty_element=M.tag_complete||M.is_start_tag&&M.is_end_tag,M.is_unformatted=!M.tag_complete&&p(M.tag_check,this._options.unformatted),M.is_content_unformatted=!M.is_empty_element&&p(M.tag_check,this._options.content_unformatted),M.is_inline_element=p(M.tag_name,this._options.inline)||M.tag_name.includes("-")||M.tag_start_char==="{",M},b.prototype._set_tag_position=function(F,M,L,Y,K){if(L.is_empty_element||(L.is_end_tag?L.start_tag_token=this._tag_stack.try_pop(L.tag_name):(this._do_optional_end_element(L)&&(L.is_inline_element||F.print_newline(!1)),this._tag_stack.record_tag(L),(L.tag_name==="script"||L.tag_name==="style")&&!(L.is_unformatted||L.is_content_unformatted)&&(L.custom_beautifier_name=y(L.tag_check,M)))),p(L.tag_check,this._options.extra_liners)&&(F.print_newline(!1),F._output.just_added_blankline()||F.print_newline(!0)),L.is_empty_element){if(L.tag_start_char==="{"&&L.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),L.indent_content=!0;var A=F.current_line_has_match(/{{#if/);A||F.print_newline(!1)}L.tag_name==="!--"&&K.type===f.TAG_CLOSE&&Y.is_end_tag&&L.text.indexOf(`
|
|
|
`)===-1||(L.is_inline_element||L.is_unformatted||F.print_newline(!1),this._calcluate_parent_multiline(F,L))}else if(L.is_end_tag){var H=!1;H=L.start_tag_token&&L.start_tag_token.multiline_content,H=H||!L.is_inline_element&&!(Y.is_inline_element||Y.is_unformatted)&&!(K.type===f.TAG_CLOSE&&L.start_tag_token===Y)&&K.type!=="TK_CONTENT",(L.is_content_unformatted||L.is_unformatted)&&(H=!1),H&&F.print_newline(!1)}else L.indent_content=!L.custom_beautifier_name,L.tag_start_char==="<"&&(L.tag_name==="html"?L.indent_content=this._options.indent_inner_html:L.tag_name==="head"?L.indent_content=this._options.indent_head_inner_html:L.tag_name==="body"&&(L.indent_content=this._options.indent_body_inner_html)),!(L.is_inline_element||L.is_unformatted)&&(K.type!=="TK_CONTENT"||L.is_content_unformatted)&&F.print_newline(!1),this._calcluate_parent_multiline(F,L)},b.prototype._calcluate_parent_multiline=function(F,M){M.parent&&F._output.just_added_newline()&&!((M.is_inline_element||M.is_unformatted)&&M.parent.is_inline_element)&&(M.parent.multiline_content=!0)};var w=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],T=["a","audio","del","ins","map","noscript","video"];b.prototype._do_optional_end_element=function(F){var M=null;if(F.is_empty_element||!F.is_start_tag||!F.parent)return;if(F.tag_name==="body")M=M||this._tag_stack.try_pop("head");else if(F.tag_name==="li")M=M||this._tag_stack.try_pop("li",["ol","ul"]);else if(F.tag_name==="dd"||F.tag_name==="dt")M=M||this._tag_stack.try_pop("dt",["dl"]),M=M||this._tag_stack.try_pop("dd",["dl"]);else if(F.parent.tag_name==="p"&&w.indexOf(F.tag_name)!==-1){var L=F.parent.parent;(!L||T.indexOf(L.tag_name)===-1)&&(M=M||this._tag_stack.try_pop("p"))}else F.tag_name==="rp"||F.tag_name==="rt"?(M=M||this._tag_stack.try_pop("rt",["ruby","rtc"]),M=M||this._tag_stack.try_pop("rp",["ruby","rtc"])):F.tag_name==="optgroup"?M=M||this._tag_stack.try_pop("optgroup",["select"]):F.tag_name==="option"?M=M||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):F.tag_name==="colgroup"?M=M||this._tag_stack.try_pop("caption",["table"]):F.tag_name==="thead"?(M=M||this._tag_stack.try_pop("caption",["table"]),M=M||this._tag_stack.try_pop("colgroup",["table"])):F.tag_name==="tbody"||F.tag_name==="tfoot"?(M=M||this._tag_stack.try_pop("caption",["table"]),M=M||this._tag_stack.try_pop("colgroup",["table"]),M=M||this._tag_stack.try_pop("thead",["table"]),M=M||this._tag_stack.try_pop("tbody",["table"])):F.tag_name==="tr"?(M=M||this._tag_stack.try_pop("caption",["table"]),M=M||this._tag_stack.try_pop("colgroup",["table"]),M=M||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(F.tag_name==="th"||F.tag_name==="td")&&(M=M||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),M=M||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return F.parent=this._tag_stack.get_parser_token(),M},i.exports.Beautifier=b},function(i,c,o){var n=o(6).Options;function s(h){n.call(this,h,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}s.prototype=new n,i.exports.Options=s},function(i,c,o){var n=o(9).Tokenizer,s=o(9).TOKEN,h=o(13).Directives,f=o(14).TemplatablePattern,l=o(12).Pattern,a={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:s.START,RAW:s.RAW,EOF:s.EOF},r=new h(/<\!--/,/-->/),x=function(y,p){n.call(this,y,p),this._current_tag_name="";var R=new f(this._input).read_options(this._options),O=new l(this._input);if(this.__patterns={word:R.until(/[\n\r\t <]/),single_quote:R.until_after(/'/),double_quote:R.until_after(/"/),attribute:R.until(/[\n\r\t =>]|\/>/),element_name:R.until(/[\n\r\t >\/]/),handlebars_comment:O.starting_with(/{{!--/).until_after(/--}}/),handlebars:O.starting_with(/{{/).until_after(/}}/),handlebars_open:O.until(/[\n\r\t }]/),handlebars_raw_close:O.until(/}}/),comment:O.starting_with(/<!--/).until_after(/-->/),cdata:O.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:O.starting_with(/<!\[/).until_after(/]>/),processing:O.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var b=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=O.matching(b).until_after(b)}};x.prototype=new n,x.prototype._is_comment=function(y){return!1},x.prototype._is_opening=function(y){return y.type===a.TAG_OPEN},x.prototype._is_closing=function(y,p){return y.type===a.TAG_CLOSE&&p&&((y.text===">"||y.text==="/>")&&p.text[0]==="<"||y.text==="}}"&&p.text[0]==="{"&&p.text[1]==="{")},x.prototype._reset=function(){this._current_tag_name=""},x.prototype._get_next_token=function(y,p){var R=null;this._readWhitespace();var O=this._input.peek();return O===null?this._create_token(a.EOF,""):(R=R||this._read_open_handlebars(O,p),R=R||this._read_attribute(O,y,p),R=R||this._read_close(O,p),R=R||this._read_raw_content(O,y,p),R=R||this._read_content_word(O),R=R||this._read_comment_or_cdata(O),R=R||this._read_processing(O),R=R||this._read_open(O,p),R=R||this._create_token(a.UNKNOWN,this._input.next()),R)},x.prototype._read_comment_or_cdata=function(y){var p=null,R=null,O=null;if(y==="<"){var b=this._input.peek(1);b==="!"&&(R=this.__patterns.comment.read(),R?(O=r.get_directives(R),O&&O.ignore==="start"&&(R+=r.readIgnored(this._input))):R=this.__patterns.cdata.read()),R&&(p=this._create_token(a.COMMENT,R),p.directives=O)}return p},x.prototype._read_processing=function(y){var p=null,R=null,O=null;if(y==="<"){var b=this._input.peek(1);(b==="!"||b==="?")&&(R=this.__patterns.conditional_comment.read(),R=R||this.__patterns.processing.read()),R&&(p=this._create_token(a.COMMENT,R),p.directives=O)}return p},x.prototype._read_open=function(y,p){var R=null,O=null;return p||y==="<"&&(R=this._input.next(),this._input.peek()==="/"&&(R+=this._input.next()),R+=this.__patterns.element_name.read(),O=this._create_token(a.TAG_OPEN,R)),O},x.prototype._read_open_handlebars=function(y,p){var R=null,O=null;return p||this._options.indent_handlebars&&y==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(R=this.__patterns.handlebars_comment.read(),R=R||this.__patterns.handlebars.read(),O=this._create_token(a.COMMENT,R)):(R=this.__patterns.handlebars_open.read(),O=this._create_token(a.TAG_OPEN,R))),O},x.prototype._read_close=function(y,p){var R=null,O=null;return p&&(p.text[0]==="<"&&(y===">"||y==="/"&&this._input.peek(1)===">")?(R=this._input.next(),y==="/"&&(R+=this._input.next()),O=this._create_token(a.TAG_CLOSE,R)):p.text[0]==="{"&&y==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),O=this._create_token(a.TAG_CLOSE,"}}"))),O},x.prototype._read_attribute=function(y,p,R){var O=null,b="";if(R&&R.text[0]==="<")if(y==="=")O=this._create_token(a.EQUALS,this._input.next());else if(y==='"'||y==="'"){var E=this._input.next();y==='"'?E+=this.__patterns.double_quote.read():E+=this.__patterns.single_quote.read(),O=this._create_token(a.VALUE,E)}else b=this.__patterns.attribute.read(),b&&(p.type===a.EQUALS?O=this._create_token(a.VALUE,b):O=this._create_token(a.ATTRIBUTE,b));return O},x.prototype._is_content_unformatted=function(y){return this._options.void_elements.indexOf(y)===-1&&(this._options.content_unformatted.indexOf(y)!==-1||this._options.unformatted.indexOf(y)!==-1)},x.prototype._read_raw_content=function(y,p,R){var O="";if(R&&R.text[0]==="{")O=this.__patterns.handlebars_raw_close.read();else if(p.type===a.TAG_CLOSE&&p.opened.text[0]==="<"&&p.text[0]!=="/"){var b=p.opened.text.substr(1).toLowerCase();if(b==="script"||b==="style"){var E=this._read_comment_or_cdata(y);if(E)return E.type=a.TEXT,E;O=this._input.readUntil(new RegExp("</"+b+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(b)&&(O=this._input.readUntil(new RegExp("</"+b+"[\\n\\r\\t ]*?>","ig")))}return O?this._create_token(a.TEXT,O):null},x.prototype._read_content_word=function(y){var p="";if(this._options.unformatted_content_delimiter&&(y===this._options.unformatted_content_delimiter[0]&&(p=this.__patterns.unformatted_content_delimiter.read())),p||(p=this.__patterns.word.read()),p)return this._create_token(a.TEXT,p)},i.exports.Tokenizer=x,i.exports.TOKEN=a}],_={};function t(i){var c=_[i];if(c!==void 0)return c.exports;var o=_[i]={exports:{}};return S[i](o,o.exports,t),o.exports}var d=t(18);C=d})();var N=C;if(!0)!(P=[D,D("6UM0"),D("TXwP")],v=function(S){var _=D("6UM0"),t=D("TXwP");return{html_beautify:function(d,i){return N(d,i,_.js_beautify,t.css_beautify)}}}.apply(q,P),v!==void 0&&(W.exports=v));else var g,m})()},qBft:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("OLod"))})(this,function(P){return P.pad.AnsiX923={pad:function(v,C){var N=v.sigBytes,g=C*4,m=g-N%g,S=N+m-1;v.clamp(),v.words[S>>>2]|=m<<24-S%4*8,v.sigBytes+=m},unpad:function(v){var C=v.words[v.sigBytes-1>>>2]&255;v.sigBytes-=C}},P.pad.Ansix923})},qHvr:function(W,q,D){"use strict";var P=D("2qtc"),v=D("kLXV"),C=D("5NDa"),N=D("5rEg"),g=D("miYZ"),m=D("tsqr"),S=D("tJVT"),_=D("q1tI"),t=D.n(_),d=D("4i/N");function i(c){var o=c.isAddmodle,n=c.setIsAdd,s=c.createTeam,h=Object(_.useState)(""),f=Object(S.a)(h,2),l=f[0],a=f[1];return t.a.createElement(v.a,{centered:!0,title:t.a.createElement("div",{style:{alignItems:"center",display:"flex"}},t.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u521B\u5EFA\u6218\u961F"),t.a.createElement(d.a,{onClick:function(){return n(!1)},style:{cursor:"porint"}})),visible:o,closable:!1,destroyOnClose:!0,onOk:function(){if(!l){m.b.info("\u6218\u961F\u540D\u4E0D\u80FD\u4E3A\u7A7A");return}s(l)},onCancel:function(){return n(!1)}},t.a.createElement("div",null,t.a.createElement("span",{style:{fontSize:"14px",color:"#F73737"}},"*"),"\u961F\u540D\uFF1A",t.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px"}},t.a.createElement(N.a,{placeholder:"\u8BF7\u8F93\u5165\u961F\u540D",value:l,maxLength:60,addonAfter:String(l&&l.length||0)+"/60",onChange:function(x){return a(x.target.value)}}))))}q.a=i},qM6L:function(W,q,D){(function(P,v){W.exports=q=v(D("Ib8C"))})(this,function(P){return function(){var v=P,C=v.lib,N=C.WordArray,g=v.enc,m=g.Utf16=g.Utf16BE={stringify:function(_){for(var t=_.words,d=_.sigBytes,i=[],c=0;c<d;c+=2){var o=t[c>>>2]>>>16-c%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(_){for(var t=_.length,d=[],i=0;i<t;i++)d[i>>>1]|=_.charCodeAt(i)<<16-i%2*16;return N.create(d,t*2)}};g.Utf16LE={stringify:function(_){for(var t=_.words,d=_.sigBytes,i=[],c=0;c<d;c+=2){var o=S(t[c>>>2]>>>16-c%4*8&65535);i.push(String.fromCharCode(o))}return i.join("")},parse:function(_){for(var t=_.length,d=[],i=0;i<t;i++)d[i>>>1]|=S(_.charCodeAt(i)<<16-i%2*16);return N.create(d,t*2)}};function S(_){return _<<8&4278255360|_>>>8&16711935}}(),P.enc.Utf16})},qu8F:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("OLod"))})(this,function(P){/** @preserve
|
|
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
|
* derived from CryptoJS.mode.CTR
|
|
|
* Jan Hruby jhruby.web@gmail.com
|
|
|
*/return P.mode.CTRGladman=function(){var v=P.lib.BlockCipherMode.extend();function C(m){if((m>>24&255)===255){var S=m>>16&255,_=m>>8&255,t=m&255;S===255?(S=0,_===255?(_=0,t===255?t=0:++t):++_):++S,m=0,m+=S<<16,m+=_<<8,m+=t}else m+=1<<24;return m}function N(m){return(m[0]=C(m[0]))===0&&(m[1]=C(m[1])),m}var g=v.Encryptor=v.extend({processBlock:function(m,S){var _=this._cipher,t=_.blockSize,d=this._iv,i=this._counter;d&&(i=this._counter=d.slice(0),this._iv=void 0),N(i);var c=i.slice(0);_.encryptBlock(c,0);for(var o=0;o<t;o++)m[S+o]^=c[o]}});return v.Decryptor=g,v}(),P.mode.CTRGladman})},"rAM+":function(W,q,D){"use strict";D.d(q,"a",function(){return v});var P=D("Qw5x");function v(C,N){var g;if(typeof Symbol=="undefined"||C[Symbol.iterator]==null){if(Array.isArray(C)||(g=Object(P.a)(C))||N&&C&&typeof C.length=="number"){g&&(C=g);var m=0,S=function(){};return{s:S,n:function(){return m>=C.length?{done:!0}:{done:!1,value:C[m++]}},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 _=!0,t=!1,d;return{s:function(){g=C[Symbol.iterator]()},n:function(){var c=g.next();return _=c.done,c},e:function(c){t=!0,d=c},f:function(){try{!_&&g.return!=null&&g.return()}finally{if(t)throw d}}}}},rUJ1:function(W,q){const D=/[&<>"']/,P=/[&<>"']/g,v=/[<>"']|&(?!#?\w+;)/,C=/[<>"']|&(?!#?\w+;)/g,N={"&":"&","<":"<",">":">",'"':""","'":"'"},g=O=>N[O];function m(O,b){if(b){if(D.test(O))return O.replace(P,g)}else if(v.test(O))return O.replace(C,g);return O}const S=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function _(O){return O.replace(S,(b,E)=>(E=E.toLowerCase(),E==="colon"?":":E.charAt(0)==="#"?E.charAt(1)==="x"?String.fromCharCode(parseInt(E.substring(2),16)):String.fromCharCode(+E.substring(1)):""))}const t=/(^|[^\[])\^/g;function d(O,b){O=O.source||O,b=b||"";const E={replace:(w,T)=>(T=T.source||T,T=T.replace(t,"$1"),O=O.replace(w,T),E),getRegex:()=>new RegExp(O,b)};return E}const i=/[^\w:]/g,c=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function o(O,b,E){if(O){let w;try{w=decodeURIComponent(_(E)).replace(i,"").toLowerCase()}catch(T){return null}if(w.indexOf("javascript:")===0||w.indexOf("vbscript:")===0||w.indexOf("data:")===0)return null}b&&!c.test(E)&&(E=l(b,E));try{E=encodeURI(E).replace(/%25/g,"%")}catch(w){return null}return E}const n={},s=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,f=/^([^:]+:\/*[^/]*)[\s\S]*$/;function l(O,b){n[" "+O]||(s.test(O)?n[" "+O]=O+"/":n[" "+O]=y(O,"/",!0)),O=n[" "+O];const E=O.indexOf(":")===-1;return b.substring(0,2)==="//"?E?b:O.replace(h,"$1")+b:b.charAt(0)==="/"?E?b:O.replace(f,"$1")+b:O+b}const a={exec:function(){}};function r(O){let b=1,E,w;for(;b<arguments.length;b++){E=arguments[b];for(w in E)Object.prototype.hasOwnProperty.call(E,w)&&(O[w]=E[w])}return O}function x(O,b){const E=O.replace(/\|/g,(F,M,L)=>{let Y=!1,K=M;for(;--K>=0&&L[K]==="\\";)Y=!Y;return Y?"|":" |"}),w=E.split(/ \|/);let T=0;if(w.length>b)w.splice(b);else for(;w.length<b;)w.push("");for(;T<w.length;T++)w[T]=w[T].trim().replace(/\\\|/g,"|");return w}function y(O,b,E){const w=O.length;if(w===0)return"";let T=0;for(;T<w;){const F=O.charAt(w-T-1);if(F===b&&!E)T++;else if(F!==b&&E)T++;else break}return O.substr(0,w-T)}function p(O,b){if(O.indexOf(b[1])===-1)return-1;const E=O.length;let w=0,T=0;for(;T<E;T++)if(O[T]==="\\")T++;else if(O[T]===b[0])w++;else if(O[T]===b[1]&&(w--,w<0))return T;return-1}function R(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")}W.exports={escape:m,unescape:_,edit:d,cleanUrl:o,resolveUrl:l,noopTest:a,merge:r,splitCells:x,rtrim:y,findClosingBracket:p,checkSanitizeDeprecation:R}},sR1s:function(W,q,D){"use strict";D.d(q,"b",function(){return N}),D.d(q,"a",function(){return g}),D.d(q,"c",function(){return m}),D.d(q,"d",function(){return S});var P=D("U8pU"),v="RC_TABLE_KEY";function C(_){return _==null?[]:Array.isArray(_)?_:[_]}function N(_,t){if(!t&&typeof t!="number")return _;for(var d=C(t),i=_,c=0;c<d.length;c+=1){if(!i)return null;var o=d[c];i=i[o]}return i}function g(_){var t=[],d={};return _.forEach(function(i){for(var c=i||{},o=c.key,n=c.dataIndex,s=o||C(n).join("-")||v;d[s];)s="".concat(s,"_next");d[s]=!0,t.push(s)}),t}function m(){var _={};function t(o,n){n&&Object.keys(n).forEach(function(s){var h=n[s];h&&Object(P.a)(h)==="object"?(o[s]=o[s]||{},t(o[s],h)):o[s]=h})}for(var d=arguments.length,i=new Array(d),c=0;c<d;c++)i[c]=arguments[c];return i.forEach(function(o){t(_,o)}),_}function S(_){return _!=null}},sboe:function(W,q,D){"use strict";D.d(q,"a",function(){return C});var P=D("q1tI"),v=D.n(P),C=P.createContext(null)},t23M:function(W,q,D){"use strict";var P=D("VTBJ"),v=D("1OyB"),C=D("vuIU"),N=D("Ji7U"),g=D("LK+K"),m=D("q1tI"),S=D.n(m),_=D("m+aA"),t=D("Zm9Q"),d=D("Kwbf"),i=D("c+Xe"),c=D("bdgK"),o="rc-observer-key",n=function(s){Object(N.a)(f,s);var h=Object(g.a)(f);function f(){var l;return Object(v.a)(this,f),l=h.apply(this,arguments),l.resizeObserver=null,l.childNode=null,l.currentElement=null,l.state={width:0,height:0,offsetHeight:0,offsetWidth:0},l.onResize=function(a){var r=l.props.onResize,x=a[0].target,y=x.getBoundingClientRect(),p=y.width,R=y.height,O=x.offsetWidth,b=x.offsetHeight,E=Math.floor(p),w=Math.floor(R);if(l.state.width!==E||l.state.height!==w||l.state.offsetWidth!==O||l.state.offsetHeight!==b){var T={width:E,height:w,offsetWidth:O,offsetHeight:b};l.setState(T),r&&Promise.resolve().then(function(){r(Object(P.a)(Object(P.a)({},T),{},{offsetWidth:O,offsetHeight:b}))})}},l.setChildNode=function(a){l.childNode=a},l}return Object(C.a)(f,[{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 r=Object(_.a)(this.childNode||this),x=r!==this.currentElement;x&&(this.destroyObserver(),this.currentElement=r),!this.resizeObserver&&r&&(this.resizeObserver=new c.default(this.onResize),this.resizeObserver.observe(r))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var a=this.props.children,r=Object(t.a)(a);if(r.length>1)Object(d.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(r.length===0)return Object(d.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var x=r[0];if(m.isValidElement(x)&&Object(i.c)(x)){var y=x.ref;r[0]=m.cloneElement(x,{ref:Object(i.a)(y,this.setChildNode)})}return r.length===1?r[0]:r.map(function(p,R){return!m.isValidElement(p)||"key"in p&&p.key!==null?p:m.cloneElement(p,{key:"".concat(o,"-").concat(R)})})}}]),f}(m.Component);n.displayName="ResizeObserver",q.a=n},t9D7:function(W,q,D){"use strict";D.d(q,"b",function(){return S}),D.d(q,"g",function(){return t}),D.d(q,"d",function(){return d}),D.d(q,"e",function(){return i}),D.d(q,"a",function(){return c}),D.d(q,"f",function(){return s}),D.d(q,"c",function(){return h});var P=D("Vhoy"),v=D("MI8n"),C=D("pmY6"),N=D("Cg/j"),g=D("ic2d"),m=D("nEHx");const S=Object(N.c)("themeService");var _;(function(f){function l(a){return a&&typeof a=="object"&&typeof a.id=="string"}f.isThemeColor=l})(_||(_={}));function t(f){return{id:f}}var d;(function(f){function l(R){return R&&typeof R=="object"&&typeof R.id=="string"&&(typeof R.color=="undefined"||_.isThemeColor(R.color))}f.isThemeIcon=l;const a=new RegExp(`^\\$\\((${P.a.iconNameExpression}(?:${P.a.iconModifierExpression})?)\\)$`);function r(R){const O=a.exec(R);if(!O)return;let[,b]=O;return{id:b}}f.fromString=r;function x(R,O){let b=R.id;const E=b.lastIndexOf("~");return E!==-1&&(b=b.substring(0,E)),O&&(b=`${b}~${O}`),{id:b}}f.modify=x;function y(R,O){var b,E;return R.id===O.id&&((b=R.color)===null||b===void 0?void 0:b.id)===((E=O.color)===null||E===void 0?void 0:E.id)}f.isEqual=y;function p(R,O){return{id:R.id,color:O?t(O):void 0}}f.asThemeIcon=p,f.asClassNameArray=P.a.asClassNameArray,f.asClassName=P.a.asClassName,f.asCSSSelector=P.a.asCSSSelector})(d||(d={}));function i(f){switch(f){case m.a.DARK:return"vs-dark";case m.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const c={ThemingContribution:"base.contributions.theming"};class o{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new v.b}onColorThemeChange(f){return this.themingParticipants.push(f),this.onThemingParticipantAddedEmitter.fire(f),Object(C.i)(()=>{const l=this.themingParticipants.indexOf(f);this.themingParticipants.splice(l,1)})}getThemingParticipants(){return this.themingParticipants}}let n=new o;g.a.add(c.ThemingContribution,n);function s(f){return n.onColorThemeChange(f)}class h extends C.a{constructor(f){super();this.themeService=f,this.theme=f.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(l=>this.onThemeChange(l)))}onThemeChange(f){this.theme=f,this.updateStyles()}updateStyles(){}}},uGsb:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("MlIO"),D("1uat"))})(this,function(P){return function(){var v=P,C=v.x64,N=C.Word,g=C.WordArray,m=v.algo,S=m.SHA512,_=m.SHA384=S.extend({_doReset:function(){this._hash=new g.init([new N.init(3418070365,3238371032),new N.init(1654270250,914150663),new N.init(2438529370,812702999),new N.init(355462360,4144912697),new N.init(1731405415,4290775857),new N.init(2394180231,1750603025),new N.init(3675008525,1694076839),new N.init(1203062813,3204075428)])},_doFinalize:function(){var t=S._doFinalize.call(this);return t.sigBytes-=16,t}});v.SHA384=S._createHelper(_),v.HmacSHA384=S._createHmacHelper(_)}(),P.SHA384})},uGxW:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("OLod"))})(this,function(P){return P.pad.NoPadding={pad:function(){},unpad:function(){}},P.pad.NoPadding})},uK0f:function(W,q,D){(function(P,v){W.exports=v()})(this,function(){"use strict";function P(v,C,N){N=N||{},N.childrenKeyName=N.childrenKeyName||"children";var g=v||[],m=[],S=0;do{var _=g.filter(function(t){return C(t,S)})[0];if(!_)break;m.push(_),g=_[N.childrenKeyName]||[],S+=1}while(g.length>0);return m}return P})},ulZh:function(W,q,D){typeof window!="undefined"&&function(v,C){W.exports=C()}(this,function(){return function(P){var v={};function C(N){if(v[N])return v[N].exports;var g=v[N]={i:N,l:!1,exports:{}};return P[N].call(g.exports,g,g.exports,C),g.l=!0,g.exports}return C.m=P,C.c=v,C.d=function(N,g,m){C.o(N,g)||Object.defineProperty(N,g,{enumerable:!0,get:m})},C.r=function(N){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(N,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(N,"__esModule",{value:!0})},C.t=function(N,g){if(g&1&&(N=C(N)),g&8)return N;if(g&4&&typeof N=="object"&&N&&N.__esModule)return N;var m=Object.create(null);if(C.r(m),Object.defineProperty(m,"default",{enumerable:!0,value:N}),g&2&&typeof N!="string")for(var S in N)C.d(m,S,function(_){return N[_]}.bind(null,S));return m},C.n=function(N){var g=N&&N.__esModule?function(){return N.default}:function(){return N};return C.d(g,"a",g),g},C.o=function(N,g){return Object.prototype.hasOwnProperty.call(N,g)},C.p="/dist/",C(C.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(P,v,C){"use strict";var N=Object.prototype.hasOwnProperty,g="~";function m(){}Object.create&&(m.prototype=Object.create(null),new m().__proto__||(g=!1));function S(i,c,o){this.fn=i,this.context=c,this.once=o||!1}function _(i,c,o,n,s){if(typeof o!="function")throw new TypeError("The listener must be a function");var h=new S(o,n||i,s),f=g?g+c:c;return i._events[f]?i._events[f].fn?i._events[f]=[i._events[f],h]:i._events[f].push(h):(i._events[f]=h,i._eventsCount++),i}function t(i,c){--i._eventsCount===0?i._events=new m:delete i._events[c]}function d(){this._events=new m,this._eventsCount=0}d.prototype.eventNames=function(){var c=[],o,n;if(this._eventsCount===0)return c;for(n in o=this._events)N.call(o,n)&&c.push(g?n.slice(1):n);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(o)):c},d.prototype.listeners=function(c){var o=g?g+c:c,n=this._events[o];if(!n)return[];if(n.fn)return[n.fn];for(var s=0,h=n.length,f=new Array(h);s<h;s++)f[s]=n[s].fn;return f},d.prototype.listenerCount=function(c){var o=g?g+c:c,n=this._events[o];return n?n.fn?1:n.length:0},d.prototype.emit=function(c,o,n,s,h,f){var l=g?g+c:c;if(!this._events[l])return!1;var a=this._events[l],r=arguments.length,x,y;if(a.fn){a.once&&this.removeListener(c,a.fn,void 0,!0);switch(r){case 1:return a.fn.call(a.context),!0;case 2:return a.fn.call(a.context,o),!0;case 3:return a.fn.call(a.context,o,n),!0;case 4:return a.fn.call(a.context,o,n,s),!0;case 5:return a.fn.call(a.context,o,n,s,h),!0;case 6:return a.fn.call(a.context,o,n,s,h,f),!0}for(y=1,x=new Array(r-1);y<r;y++)x[y-1]=arguments[y];a.fn.apply(a.context,x)}else{var p=a.length,R;for(y=0;y<p;y++){a[y].once&&this.removeListener(c,a[y].fn,void 0,!0);switch(r){case 1:a[y].fn.call(a[y].context);break;case 2:a[y].fn.call(a[y].context,o);break;case 3:a[y].fn.call(a[y].context,o,n);break;case 4:a[y].fn.call(a[y].context,o,n,s);break;default:if(!x)for(R=1,x=new Array(r-1);R<r;R++)x[R-1]=arguments[R];a[y].fn.apply(a[y].context,x)}}}return!0},d.prototype.on=function(c,o,n){return _(this,c,o,n,!1)},d.prototype.once=function(c,o,n){return _(this,c,o,n,!0)},d.prototype.removeListener=function(c,o,n,s){var h=g?g+c:c;if(!this._events[h])return this;if(!o)return t(this,h),this;var f=this._events[h];if(f.fn)f.fn===o&&(!s||f.once)&&(!n||f.context===n)&&t(this,h);else{for(var l=0,a=[],r=f.length;l<r;l++)(f[l].fn!==o||s&&!f[l].once||n&&f[l].context!==n)&&a.push(f[l]);a.length?this._events[h]=a.length===1?a[0]:a:t(this,h)}return this},d.prototype.removeAllListeners=function(c){var o;return c?(o=g?g+c:c,this._events[o]&&t(this,o)):(this._events=new m,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=g,d.EventEmitter=d,P.exports=d},"./node_modules/url-toolkit/src/url-toolkit.js":function(P,v,C){(function(N){var g=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,m=/^([^\/?#]*)([^]*)$/,S=/(?:\/|^)\.(?=\/)/g,_=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,t={buildAbsoluteURL:function(d,i,c){if(c=c||{},d=d.trim(),i=i.trim(),!i){if(!c.alwaysNormalize)return d;var o=t.parseURL(d);if(!o)throw new Error("Error trying to parse base URL.");return o.path=t.normalizePath(o.path),t.buildURLFromParts(o)}var n=t.parseURL(i);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return c.alwaysNormalize?(n.path=t.normalizePath(n.path),t.buildURLFromParts(n)):i;var s=t.parseURL(d);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&s.path[0]!=="/"){var h=m.exec(s.path);s.netLoc=h[1],s.path=h[2]}s.netLoc&&!s.path&&(s.path="/");var f={scheme:s.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(f.netLoc=s.netLoc,n.path[0]!=="/"))if(!n.path)f.path=s.path,n.params||(f.params=s.params,n.query||(f.query=s.query));else{var l=s.path,a=l.substring(0,l.lastIndexOf("/")+1)+n.path;f.path=t.normalizePath(a)}return f.path===null&&(f.path=c.alwaysNormalize?t.normalizePath(n.path):n.path),t.buildURLFromParts(f)},parseURL:function(d){var i=g.exec(d);return i?{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}:null},normalizePath:function(d){for(d=d.split("").reverse().join("").replace(S,"");d.length!==(d=d.replace(_,"")).length;);return d.split("").reverse().join("")},buildURLFromParts:function(d){return d.scheme+d.netLoc+d.path+d.params+d.query+d.fragment}};P.exports=t})(this)},"./node_modules/webworkify-webpack/index.js":function(P,v,C){function N(c){var o={};function n(h){if(o[h])return o[h].exports;var f=o[h]={i:h,l:!1,exports:{}};return c[h].call(f.exports,f,f.exports,n),f.l=!0,f.exports}n.m=c,n.c=o,n.i=function(h){return h},n.d=function(h,f,l){n.o(h,f)||Object.defineProperty(h,f,{configurable:!1,enumerable:!0,get:l})},n.r=function(h){Object.defineProperty(h,"__esModule",{value:!0})},n.n=function(h){var f=h&&h.__esModule?function(){return h.default}:function(){return h};return n.d(f,"a",f),f},n.o=function(h,f){return Object.prototype.hasOwnProperty.call(h,f)},n.p="/",n.oe=function(h){throw console.error(h),h};var s=n(n.s=ENTRY_MODULE);return s.default||s}var g="[\\.|\\-|\\+|\\w|/|@]+",m="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+g+").*?\\)";function S(c){return(c+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function _(c){return!isNaN(1*c)}function t(c,o,n){var s={};s[n]=[];var h=o.toString(),f=h.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!f)return s;for(var l=f[1],a=new RegExp("(\\\\n|\\W)"+S(l)+m,"g"),r;r=a.exec(h);){if(r[3]==="dll-reference")continue;s[n].push(r[3])}for(a=new RegExp("\\("+S(l)+'\\("(dll-reference\\s('+g+'))"\\)\\)'+m,"g");r=a.exec(h);)c[r[2]]||(s[n].push(r[1]),c[r[2]]=C(r[1]).m),s[r[2]]=s[r[2]]||[],s[r[2]].push(r[4]);for(var x=Object.keys(s),y=0;y<x.length;y++)for(var p=0;p<s[x[y]].length;p++)_(s[x[y]][p])&&(s[x[y]][p]=1*s[x[y]][p]);return s}function d(c){var o=Object.keys(c);return o.reduce(function(n,s){return n||c[s].length>0},!1)}function i(c,o){for(var n={main:[o]},s={main:[]},h={main:{}};d(n);)for(var f=Object.keys(n),l=0;l<f.length;l++){var a=f[l],r=n[a],x=r.pop();if(h[a]=h[a]||{},h[a][x]||!c[a][x])continue;h[a][x]=!0,s[a]=s[a]||[],s[a].push(x);for(var y=t(c,c[a][x],a),p=Object.keys(y),R=0;R<p.length;R++)n[p[R]]=n[p[R]]||[],n[p[R]]=n[p[R]].concat(y[p[R]])}return s}P.exports=function(c,o){o=o||{};var n={main:C.m},s=o.all?{main:Object.keys(n.main)}:i(n,c),h="";Object.keys(s).filter(function(x){return x!=="main"}).forEach(function(x){for(var y=0;s[x][y];)y++;s[x].push(y),n[x][y]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",h=h+"var "+x+" = ("+N.toString().replace("ENTRY_MODULE",JSON.stringify(y))+")({"+s[x].map(function(p){return""+JSON.stringify(p)+": "+n[x][p].toString()}).join(",")+`});
|
|
|
`}),h=h+"new (("+N.toString().replace("ENTRY_MODULE",JSON.stringify(c))+")({"+s.main.map(function(x){return""+JSON.stringify(x)+": "+n.main[x].toString()}).join(",")+"}))(self);";var f=new window.Blob([h],{type:"text/javascript"});if(o.bare)return f;var l=window.URL||window.webkitURL||window.mozURL||window.msURL,a=l.createObjectURL(f),r=new window.Worker(a);return r.objectURL=a,r}},"./src/config.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"hlsDefaultConfig",function(){return R}),C.d(v,"mergeConfig",function(){return b}),C.d(v,"enableStreamingMode",function(){return E});var N=C("./src/controller/abr-controller.ts"),g=C("./src/controller/audio-stream-controller.ts"),m=C("./src/controller/audio-track-controller.ts"),S=C("./src/controller/subtitle-stream-controller.ts"),_=C("./src/controller/subtitle-track-controller.ts"),t=C("./src/controller/buffer-controller.ts"),d=C("./src/controller/timeline-controller.ts"),i=C("./src/controller/cap-level-controller.ts"),c=C("./src/controller/fps-controller.ts"),o=C("./src/controller/eme-controller.ts"),n=C("./src/controller/cmcd-controller.ts"),s=C("./src/utils/xhr-loader.ts"),h=C("./src/utils/fetch-loader.ts"),f=C("./src/utils/cues.ts"),l=C("./src/utils/mediakeys-helper.ts"),a=C("./src/utils/logger.ts");function r(){return r=Object.assign||function(w){for(var T=1;T<arguments.length;T++){var F=arguments[T];for(var M in F)Object.prototype.hasOwnProperty.call(F,M)&&(w[M]=F[M])}return w},r.apply(this,arguments)}function x(w,T){var F=Object.keys(w);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(w);T&&(M=M.filter(function(L){return Object.getOwnPropertyDescriptor(w,L).enumerable})),F.push.apply(F,M)}return F}function y(w){for(var T=1;T<arguments.length;T++){var F=arguments[T]!=null?arguments[T]:{};T%2?x(Object(F),!0).forEach(function(M){p(w,M,F[M])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(F)):x(Object(F)).forEach(function(M){Object.defineProperty(w,M,Object.getOwnPropertyDescriptor(F,M))})}return w}function p(w,T,F){return T in w?Object.defineProperty(w,T,{value:F,enumerable:!0,configurable:!0,writable:!0}):w[T]=F,w}var R=y(y({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:s.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:N.default,bufferController:t.default,capLevelController:i.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:l.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},O()),{},{subtitleStreamController:S.SubtitleStreamController,subtitleTrackController:_.default,timelineController:d.TimelineController,audioStreamController:g.default,audioTrackController:m.default,emeController:o.default,cmcdController:n.default});function O(){return{cueHandler:f.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function b(w,T){if((T.liveSyncDurationCount||T.liveMaxLatencyDurationCount)&&(T.liveSyncDuration||T.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(T.liveMaxLatencyDurationCount!==void 0&&(T.liveSyncDurationCount===void 0||T.liveMaxLatencyDurationCount<=T.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(T.liveMaxLatencyDuration!==void 0&&(T.liveSyncDuration===void 0||T.liveMaxLatencyDuration<=T.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return r({},w,T)}function E(w){var T=w.loader;if(T!==h.default&&T!==s.default)a.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),w.progressive=!1;else{var F=Object(h.fetchSupported)();F&&(w.loader=h.default,w.progressive=!0,w.enableSoftwareAES=!0,a.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/polyfills/number.ts"),g=C("./src/utils/ewma-bandwidth-estimator.ts"),m=C("./src/events.ts"),S=C("./src/utils/buffer-helper.ts"),_=C("./src/errors.ts"),t=C("./src/types/loader.ts"),d=C("./src/utils/logger.ts");function i(n,s){for(var h=0;h<s.length;h++){var f=s[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(n,f.key,f)}}function c(n,s,h){return s&&i(n.prototype,s),h&&i(n,h),n}var o=function(){function n(h){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=h;var f=h.config;this.bwEstimator=new g.default(f.abrEwmaSlowVoD,f.abrEwmaFastVoD,f.abrEwmaDefaultEstimate),this.registerListeners()}var s=n.prototype;return s.registerListeners=function(){var f=this.hls;f.on(m.Events.FRAG_LOADING,this.onFragLoading,this),f.on(m.Events.FRAG_LOADED,this.onFragLoaded,this),f.on(m.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.on(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),f.on(m.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var f=this.hls;f.off(m.Events.FRAG_LOADING,this.onFragLoading,this),f.off(m.Events.FRAG_LOADED,this.onFragLoaded,this),f.off(m.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.off(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),f.off(m.Events.ERROR,this.onError,this)},s.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},s.onFragLoading=function(f,l){var a=l.frag;if(a.type===t.PlaylistLevelType.MAIN&&!this.timer){var r;this.fragCurrent=a,this.partCurrent=(r=l.part)!=null?r:null,this.timer=self.setInterval(this.onCheck,100)}},s.onLevelLoaded=function(f,l){var a=this.hls.config;l.details.live?this.bwEstimator.update(a.abrEwmaSlowLive,a.abrEwmaFastLive):this.bwEstimator.update(a.abrEwmaSlowVoD,a.abrEwmaFastVoD)},s._abandonRulesCheck=function(){var f=this.fragCurrent,l=this.partCurrent,a=this.hls,r=a.autoLevelEnabled,x=a.config,y=a.media;if(!f||!y)return;var p=l?l.stats:f.stats,R=l?l.duration:f.duration;if(p.aborted){d.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!r||y.paused||!y.playbackRate||!y.readyState)return;var O=performance.now()-p.loading.start,b=Math.abs(y.playbackRate);if(O<=500*R/b)return;var E=a.levels,w=a.minAutoLevel,T=E[f.level],F=p.total||Math.max(p.loaded,Math.round(R*T.maxBitrate/8)),M=Math.max(1,p.bwEstimate?p.bwEstimate/8:p.loaded*1e3/O),L=(F-p.loaded)/M,Y=y.currentTime,K=(S.BufferHelper.bufferInfo(y,Y,x.maxBufferHole).end-Y)/b;if(K>=2*R/b||L<=K)return;var A=Number.POSITIVE_INFINITY,H;for(H=f.level-1;H>w;H--){var U=E[H].maxBitrate;if(A=R*U/(8*.8*M),A<K)break}if(A>=L)return;var I=this.bwEstimator.getEstimate();d.logger.warn("Fragment "+f.sn+(l?" part "+l.index:"")+" of level "+f.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+H+`
|
|
|
Current BW estimate: `+(Object(N.isFiniteNumber)(I)?(I/1024).toFixed(3):"Unknown")+` Kb/s
|
|
|
Estimated load time for current fragment: `+L.toFixed(3)+` s
|
|
|
Estimated load time for the next fragment: `+A.toFixed(3)+` s
|
|
|
Time to underbuffer: `+K.toFixed(3)+" s"),a.nextLoadLevel=H,this.bwEstimator.sample(O,p.loaded),this.clearTimer(),f.loader&&(this.fragCurrent=this.partCurrent=null,f.loader.abort()),a.trigger(m.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:f,part:l,stats:p})},s.onFragLoaded=function(f,l){var a=l.frag,r=l.part;if(a.type===t.PlaylistLevelType.MAIN&&Object(N.isFiniteNumber)(a.sn)){var x=r?r.stats:a.stats,y=r?r.duration:a.duration;if(this.clearTimer(),this.lastLoadedFragLevel=a.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var p=this.hls.levels[a.level],R=(p.loaded?p.loaded.bytes:0)+x.loaded,O=(p.loaded?p.loaded.duration:0)+y;p.loaded={bytes:R,duration:O},p.realBitrate=Math.round(8*R/O)}if(a.bitrateTest){var b={stats:x,frag:a,part:r,id:a.type};this.onFragBuffered(m.Events.FRAG_BUFFERED,b),a.bitrateTest=!1}}},s.onFragBuffered=function(f,l){var a=l.frag,r=l.part,x=r?r.stats:a.stats;if(x.aborted)return;if(a.type!==t.PlaylistLevelType.MAIN||a.sn==="initSegment")return;var y=x.parsing.end-x.loading.start;this.bwEstimator.sample(y,x.loaded),x.bwEstimate=this.bwEstimator.getEstimate(),a.bitrateTest?this.bitrateTestDelay=y/1e3:this.bitrateTestDelay=0},s.onError=function(f,l){switch(l.details){case _.ErrorDetails.FRAG_LOAD_ERROR:case _.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},s.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},s.getNextABRAutoLevel=function(){var f=this.fragCurrent,l=this.partCurrent,a=this.hls,r=a.maxAutoLevel,x=a.config,y=a.minAutoLevel,p=a.media,R=l?l.duration:f?f.duration:0,O=p?p.currentTime:0,b=p&&p.playbackRate!==0?Math.abs(p.playbackRate):1,E=this.bwEstimator?this.bwEstimator.getEstimate():x.abrEwmaDefaultEstimate,w=(S.BufferHelper.bufferInfo(p,O,x.maxBufferHole).end-O)/b,T=this.findBestLevel(E,y,r,w,x.abrBandWidthFactor,x.abrBandWidthUpFactor);if(T>=0)return T;d.logger.trace((w?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var F=R?Math.min(R,x.maxStarvationDelay):x.maxStarvationDelay,M=x.abrBandWidthFactor,L=x.abrBandWidthUpFactor;if(!w){var Y=this.bitrateTestDelay;if(Y){var K=R?Math.min(R,x.maxLoadingDelay):x.maxLoadingDelay;F=K-Y,d.logger.trace("bitrate test took "+Math.round(1e3*Y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*F)+" ms"),M=L=1}}return T=this.findBestLevel(E,y,r,w+F,M,L),Math.max(T,0)},s.findBestLevel=function(f,l,a,r,x,y){for(var p,R=this.fragCurrent,O=this.partCurrent,b=this.lastLoadedFragLevel,E=this.hls.levels,w=E[b],T=!!(w!=null&&(p=w.details)!==null&&p!==void 0&&p.live),F=w==null?void 0:w.codecSet,M=O?O.duration:R?R.duration:0,L=a;L>=l;L--){var Y=E[L];if(!Y||F&&Y.codecSet!==F)continue;var K=Y.details,A=(O?K==null?void 0:K.partTarget:K==null?void 0:K.averagetargetduration)||M,H=void 0;L<=b?H=x*f:H=y*f;var U=E[L].maxBitrate,I=U*A/H;if(d.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+L+"/"+Math.round(H)+"/"+U+"/"+A+"/"+r+"/"+I),H>U&&(!I||T&&!this.bitrateTestDelay||I<r))return L}return-1},c(n,[{key:"nextAutoLevel",get:function(){var f=this._nextAutoLevel,l=this.bwEstimator;if(f!==-1&&(!l||!l.canEstimate()))return f;var a=this.getNextABRAutoLevel();return f!==-1&&(a=Math.min(f,a)),a},set:function(f){this._nextAutoLevel=f}}]),n}();v.default=o},"./src/controller/audio-stream-controller.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/polyfills/number.ts"),g=C("./src/controller/base-stream-controller.ts"),m=C("./src/events.ts"),S=C("./src/utils/buffer-helper.ts"),_=C("./src/controller/fragment-tracker.ts"),t=C("./src/types/level.ts"),d=C("./src/types/loader.ts"),i=C("./src/loader/fragment.ts"),c=C("./src/demux/chunk-cache.ts"),o=C("./src/demux/transmuxer-interface.ts"),n=C("./src/types/transmuxer.ts"),s=C("./src/controller/fragment-finders.ts"),h=C("./src/utils/discontinuities.ts"),f=C("./src/errors.ts"),l=C("./src/utils/logger.ts");function a(){return a=Object.assign||function(R){for(var O=1;O<arguments.length;O++){var b=arguments[O];for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(R[E]=b[E])}return R},a.apply(this,arguments)}function r(R,O){R.prototype=Object.create(O.prototype),R.prototype.constructor=R,x(R,O)}function x(R,O){return x=Object.setPrototypeOf||function(E,w){return E.__proto__=w,E},x(R,O)}var y=100,p=function(R){r(O,R);function O(E,w){var T;return T=R.call(this,E,w,"[audio-stream-controller]")||this,T.videoBuffer=null,T.videoTrackCC=-1,T.waitingVideoCC=-1,T.audioSwitch=!1,T.trackId=-1,T.waitingData=null,T.mainDetails=null,T.bufferFlushed=!1,T._registerListeners(),T}var b=O.prototype;return b.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},b._registerListeners=function(){var w=this.hls;w.on(m.Events.MEDIA_ATTACHED,this.onMediaAttached,this),w.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),w.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),w.on(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.on(m.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),w.on(m.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),w.on(m.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),w.on(m.Events.ERROR,this.onError,this),w.on(m.Events.BUFFER_RESET,this.onBufferReset,this),w.on(m.Events.BUFFER_CREATED,this.onBufferCreated,this),w.on(m.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),w.on(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),w.on(m.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b._unregisterListeners=function(){var w=this.hls;w.off(m.Events.MEDIA_ATTACHED,this.onMediaAttached,this),w.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),w.off(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),w.off(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.off(m.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),w.off(m.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),w.off(m.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),w.off(m.Events.ERROR,this.onError,this),w.off(m.Events.BUFFER_RESET,this.onBufferReset,this),w.off(m.Events.BUFFER_CREATED,this.onBufferCreated,this),w.off(m.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),w.off(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),w.off(m.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b.onInitPtsFound=function(w,T){var F=T.frag,M=T.id,L=T.initPTS;if(M==="main"){var Y=F.cc;this.initPTS[F.cc]=L,this.log("InitPTS for cc: "+Y+" found from main: "+L),this.videoTrackCC=Y,this.state===g.State.WAITING_INIT_PTS&&this.tick()}},b.startLoad=function(w){if(!this.levels){this.startPosition=w,this.state=g.State.STOPPED;return}var T=this.lastCurrentTime;this.stopLoad(),this.setInterval(y),this.fragLoadError=0,T>0&&w===-1?(this.log("Override startPosition with lastCurrentTime @"+T.toFixed(3)),this.state=g.State.IDLE):(this.loadedmetadata=!1,this.state=g.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=w,this.tick()},b.doTick=function(){switch(this.state){case g.State.IDLE:this.doTickIdle();break;case g.State.WAITING_TRACK:{var w,T=this.levels,F=this.trackId,M=T==null||((w=T[F])===null||w===void 0)?void 0:w.details;if(M){if(this.waitForCdnTuneIn(M))break;this.state=g.State.WAITING_INIT_PTS}break}case g.State.FRAG_LOADING_WAITING_RETRY:{var L,Y=performance.now(),K=this.retryDate;(!K||Y>=K||(L=this.media)!==null&&L!==void 0&&L.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=g.State.IDLE);break}case g.State.WAITING_INIT_PTS:{var A=this.waitingData;if(A){var H=A.frag,U=A.part,I=A.cache,G=A.complete;if(this.initPTS[H.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=g.State.FRAG_LOADING;var ne=I.flush(),oe={frag:H,part:U,payload:ne,networkDetails:null};this._handleFragmentLoadProgress(oe),G&&R.prototype._handleFragmentLoadComplete.call(this,oe)}else if(this.videoTrackCC!==this.waitingVideoCC)l.logger.log("Waiting fragment cc ("+H.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var de=this.getLoadPosition(),Oe=S.BufferHelper.bufferInfo(this.mediaBuffer,de,this.config.maxBufferHole),Ae=Object(s.fragmentWithinToleranceTest)(Oe.end,this.config.maxFragLookUpTolerance,H);Ae<0&&(l.logger.log("Waiting fragment cc ("+H.cc+") @ "+H.start+" cancelled because another fragment at "+Oe.end+" is needed"),this.clearWaitingFragment())}}else this.state=g.State.IDLE}}this.onTickEnd()},b.clearWaitingFragment=function(){var w=this.waitingData;w&&(this.fragmentTracker.removeFragment(w.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=g.State.IDLE)},b.onTickEnd=function(){var w=this.media;if(!w||!w.readyState)return;var T=this.mediaBuffer?this.mediaBuffer:w,F=T.buffered;!this.loadedmetadata&&F.length&&(this.loadedmetadata=!0),this.lastCurrentTime=w.currentTime},b.doTickIdle=function(){var w,T,F=this.hls,M=this.levels,L=this.media,Y=this.trackId,K=F.config;if(!M||!M[Y])return;if(!L&&(this.startFragRequested||!K.startFragPrefetch))return;var A=M[Y],H=A.details;if(!H||H.live&&this.levelLastLoaded!==Y||this.waitForCdnTuneIn(H)){this.state=g.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,i.ElementaryStreamTypes.AUDIO,d.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,d.PlaylistLevelType.AUDIO);if(U===null)return;var I=U.len,G=this.getMaxBufferLength(),ne=this.audioSwitch;if(I>=G&&!ne)return;if(!ne&&this._streamEnded(U,H)){F.trigger(m.Events.BUFFER_EOS,{type:"audio"}),this.state=g.State.ENDED;return}var oe=H.fragments,de=oe[0].start,Oe=U.end;if(ne){var Ae=this.getLoadPosition();Oe=Ae,H.PTSKnown&&Ae<de&&((U.end>de||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),L.currentTime=de+.05))}var pe=this.getNextFragment(Oe,H);if(!pe){this.bufferFlushed=!0;return}((w=pe.decryptdata)===null||w===void 0?void 0:w.keyFormat)==="identity"&&!((T=pe.decryptdata)!==null&&T!==void 0&&T.key)?this.loadKey(pe,H):this.loadFragment(pe,H,Oe)},b.getMaxBufferLength=function(){var w=R.prototype.getMaxBufferLength.call(this),T=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,d.PlaylistLevelType.MAIN);return T===null?w:Math.max(w,T.len)},b.onMediaDetaching=function(){this.videoBuffer=null,R.prototype.onMediaDetaching.call(this)},b.onAudioTracksUpdated=function(w,T){var F=T.audioTracks;this.resetTransmuxer(),this.levels=F.map(function(M){return new t.Level(M)})},b.onAudioTrackSwitching=function(w,T){var F=!!T.url;this.trackId=T.id;var M=this.fragCurrent;M!=null&&M.loader&&M.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),F?this.setInterval(y):this.resetTransmuxer(),F?(this.audioSwitch=!0,this.state=g.State.IDLE):this.state=g.State.STOPPED,this.tick()},b.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},b.onLevelLoaded=function(w,T){this.mainDetails=T.details},b.onAudioTrackLoaded=function(w,T){var F,M=this.levels,L=T.details,Y=T.id;if(!M){this.warn("Audio tracks were reset while loading level "+Y);return}this.log("Track "+Y+" loaded ["+L.startSN+","+L.endSN+"],duration:"+L.totalduration);var K=M[Y],A=0;if(L.live||(F=K.details)!==null&&F!==void 0&&F.live){var H=this.mainDetails;if(L.fragments[0]||(L.deltaUpdateFailed=!0),L.deltaUpdateFailed||!H)return;!K.details&&L.hasProgramDateTime&&H.hasProgramDateTime?(Object(h.alignMediaPlaylistByPDT)(L,H),A=L.fragments[0].start):A=this.alignPlaylists(L,K.details)}K.details=L,this.levelLastLoaded=Y,!this.startFragRequested&&(this.mainDetails||!L.live)&&this.setStartPosition(K.details,A),this.state===g.State.WAITING_TRACK&&!this.waitForCdnTuneIn(L)&&(this.state=g.State.IDLE),this.tick()},b._handleFragmentLoadProgress=function(w){var T,F=w.frag,M=w.part,L=w.payload,Y=this.config,K=this.trackId,A=this.levels;if(!A){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+F.sn+" of level "+F.level+" will not be buffered");return}var H=A[K];console.assert(H,"Audio track is defined on fragment load progress");var U=H.details;console.assert(U,"Audio track details are defined on fragment load progress");var I=Y.defaultAudioCodec||H.audioCodec||"mp4a.40.2",G=this.transmuxer;G||(G=this.transmuxer=new o.default(this.hls,d.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ne=this.initPTS[F.cc],oe=(T=F.initSegment)===null||T===void 0?void 0:T.data;if(ne!==void 0){var de=!1,Oe=M?M.index:-1,Ae=Oe!==-1,pe=new n.ChunkMetadata(F.level,F.sn,F.stats.chunkCount,L.byteLength,Oe,Ae);G.push(L,oe,I,"",F,M,U.totalduration,de,pe,ne)}else{l.logger.log("Unknown video PTS for cc "+F.cc+", waiting for video PTS before demuxing audio frag "+F.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+K);var Se=this.waitingData=this.waitingData||{frag:F,part:M,cache:new c.default,complete:!1},be=Se.cache;be.push(new Uint8Array(L)),this.waitingVideoCC=this.videoTrackCC,this.state=g.State.WAITING_INIT_PTS}},b._handleFragmentLoadComplete=function(w){if(this.waitingData){this.waitingData.complete=!0;return}R.prototype._handleFragmentLoadComplete.call(this,w)},b.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},b.onBufferCreated=function(w,T){var F=T.tracks.audio;F&&(this.mediaBuffer=F.buffer),T.tracks.video&&(this.videoBuffer=T.tracks.video.buffer)},b.onFragBuffered=function(w,T){var F=T.frag,M=T.part;if(F.type!==d.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(F)){this.warn("Fragment "+F.sn+(M?" p: "+M.index:"")+" of level "+F.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}F.sn!=="initSegment"&&(this.fragPrevious=F,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(m.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(F,M)},b.onError=function(w,T){switch(T.details){case f.ErrorDetails.FRAG_LOAD_ERROR:case f.ErrorDetails.FRAG_LOAD_TIMEOUT:case f.ErrorDetails.KEY_LOAD_ERROR:case f.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(d.PlaylistLevelType.AUDIO,T);break;case f.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case f.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==g.State.ERROR&&this.state!==g.State.STOPPED&&(this.state=T.fatal?g.State.ERROR:g.State.IDLE,this.warn(T.details+" while loading frag, switching to "+this.state+" state"));break;case f.ErrorDetails.BUFFER_FULL_ERROR:if(T.parent==="audio"&&(this.state===g.State.PARSING||this.state===g.State.PARSED)){var F=!0,M=this.getFwdBufferInfo(this.mediaBuffer,d.PlaylistLevelType.AUDIO);M&&M.len>.5&&(F=!this.reduceMaxBufferLength(M.len)),F&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},b.onBufferFlushed=function(w,T){var F=T.type;F===i.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},b._handleTransmuxComplete=function(w){var T,F="audio",M=this.hls,L=w.remuxResult,Y=w.chunkMeta,K=this.getCurrentContext(Y);if(!K){this.warn("The loading context changed while buffering fragment "+Y.sn+" of level "+Y.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(Y.level);return}var A=K.frag,H=K.part,U=L.audio,I=L.text,G=L.id3,ne=L.initSegment;if(this.fragContextChanged(A))return;if(this.state=g.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),ne!=null&&ne.tracks&&(this._bufferInitSegment(ne.tracks,A,Y),M.trigger(m.Events.FRAG_PARSING_INIT_SEGMENT,{frag:A,id:F,tracks:ne.tracks})),U){var oe=U.startPTS,de=U.endPTS,Oe=U.startDTS,Ae=U.endDTS;H&&(H.elementaryStreams[i.ElementaryStreamTypes.AUDIO]={startPTS:oe,endPTS:de,startDTS:Oe,endDTS:Ae}),A.setElementaryStreamInfo(i.ElementaryStreamTypes.AUDIO,oe,de,Oe,Ae),this.bufferFragmentData(U,A,H,Y)}if(G!=null&&(T=G.samples)!==null&&T!==void 0&&T.length){var pe=a({frag:A,id:F},G);M.trigger(m.Events.FRAG_PARSING_METADATA,pe)}if(I){var Se=a({frag:A,id:F},I);M.trigger(m.Events.FRAG_PARSING_USERDATA,Se)}},b._bufferInitSegment=function(w,T,F){if(this.state!==g.State.PARSING)return;w.video&&delete w.video;var M=w.audio;if(!M)return;M.levelCodec=M.codec,M.id="audio",this.log("Init audio buffer, container:"+M.container+", codecs[parsed]=["+M.codec+"]"),this.hls.trigger(m.Events.BUFFER_CODECS,w);var L=M.initSegment;if(L!=null&&L.byteLength){var Y={type:"audio",frag:T,part:null,chunkMeta:F,parent:T.type,data:L};this.hls.trigger(m.Events.BUFFER_APPENDING,Y)}this.tick()},b.loadFragment=function(w,T,F){var M=this.fragmentTracker.getState(w);this.fragCurrent=w,(this.audioSwitch||M===_.FragmentState.NOT_LOADED||M===_.FragmentState.PARTIAL)&&(w.sn==="initSegment"?this._loadInitSegment(w):T.live&&!Object(N.isFiniteNumber)(this.initPTS[w.cc])?(this.log("Waiting for video PTS in continuity counter "+w.cc+" of live stream before loading audio fragment "+w.sn+" of level "+this.trackId),this.state=g.State.WAITING_INIT_PTS):(this.startFragRequested=!0,R.prototype.loadFragment.call(this,w,T,F)))},b.completeAudioSwitch=function(){var w=this.hls,T=this.media,F=this.trackId;T&&(this.log("Switching audio track : flushing all audio"),R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,w.trigger(m.Events.AUDIO_TRACK_SWITCHED,{id:F})},O}(g.default);v.default=p},"./src/controller/audio-track-controller.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/events.ts"),g=C("./src/errors.ts"),m=C("./src/controller/base-playlist-controller.ts"),S=C("./src/types/loader.ts");function _(o,n){for(var s=0;s<n.length;s++){var h=n[s];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(o,h.key,h)}}function t(o,n,s){return n&&_(o.prototype,n),s&&_(o,s),o}function d(o,n){o.prototype=Object.create(n.prototype),o.prototype.constructor=o,i(o,n)}function i(o,n){return i=Object.setPrototypeOf||function(h,f){return h.__proto__=f,h},i(o,n)}var c=function(o){d(n,o);function n(h){var f;return f=o.call(this,h,"[audio-track-controller]")||this,f.tracks=[],f.groupId=null,f.tracksInGroup=[],f.trackId=-1,f.trackName="",f.selectDefaultTrack=!0,f.registerListeners(),f}var s=n.prototype;return s.registerListeners=function(){var f=this.hls;f.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),f.on(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.on(N.Events.LEVEL_LOADING,this.onLevelLoading,this),f.on(N.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),f.on(N.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),f.on(N.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var f=this.hls;f.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),f.off(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.off(N.Events.LEVEL_LOADING,this.onLevelLoading,this),f.off(N.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),f.off(N.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),f.off(N.Events.ERROR,this.onError,this)},s.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,o.prototype.destroy.call(this)},s.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},s.onManifestParsed=function(f,l){this.tracks=l.audioTracks||[]},s.onAudioTrackLoaded=function(f,l){var a=l.id,r=l.details,x=this.tracksInGroup[a];if(!x){this.warn("Invalid audio track id "+a);return}var y=x.details;x.details=l.details,this.log("audioTrack "+a+" loaded ["+r.startSN+"-"+r.endSN+"]"),a===this.trackId&&(this.retryCount=0,this.playlistLoaded(a,l,y))},s.onLevelLoading=function(f,l){this.switchLevel(l.level)},s.onLevelSwitching=function(f,l){this.switchLevel(l.level)},s.switchLevel=function(f){var l=this.hls.levels[f];if(!(l!=null&&l.audioGroupIds))return;var a=l.audioGroupIds[l.urlId];if(this.groupId!==a){this.groupId=a;var r=this.tracks.filter(function(y){return!a||y.groupId===a});this.selectDefaultTrack&&!r.some(function(y){return y.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=r;var x={audioTracks:r};this.log("Updating audio tracks, "+r.length+' track(s) found in "'+a+'" group-id'),this.hls.trigger(N.Events.AUDIO_TRACKS_UPDATED,x),this.selectInitialTrack()}},s.onError=function(f,l){if(o.prototype.onError.call(this,f,l),l.fatal||!l.context)return;l.context.type===S.PlaylistContextType.AUDIO_TRACK&&l.context.id===this.trackId&&l.context.groupId===this.groupId&&this.retryLoadingOrFail(l)},s.setAudioTrack=function(f){var l=this.tracksInGroup;if(f<0||f>=l.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var a=l[this.trackId];this.log("Now switching to audio-track index "+f);var r=l[f],x=r.id,y=r.groupId,p=y===void 0?"":y,R=r.name,O=r.type,b=r.url;if(this.trackId=f,this.trackName=R,this.selectDefaultTrack=!1,this.hls.trigger(N.Events.AUDIO_TRACK_SWITCHING,{id:x,groupId:p,name:R,type:O,url:b}),r.details&&!r.details.live)return;var E=this.switchParams(r.url,a==null?void 0:a.details);this.loadPlaylist(E)},s.selectInitialTrack=function(){var f=this.tracksInGroup;console.assert(f.length,"Initial audio track should be selected when tracks are known");var l=this.trackName,a=this.findTrackId(l)||this.findTrackId();a!==-1?this.setAudioTrack(a):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(N.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},s.findTrackId=function(f){for(var l=this.tracksInGroup,a=0;a<l.length;a++){var r=l[a];if((!this.selectDefaultTrack||r.default)&&(!f||f===r.name))return r.id}return-1},s.loadPlaylist=function(f){var l=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(l)){var a=l.id,r=l.groupId,x=l.url;if(f)try{x=f.addDirectives(x)}catch(y){this.warn("Could not construct new URL with HLS Delivery Directives: "+y)}this.log("loading audio-track playlist for id: "+a),this.clearTimer(),this.hls.trigger(N.Events.AUDIO_TRACK_LOADING,{url:x,id:a,groupId:r,deliveryDirectives:f||null})}},t(n,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(f){this.selectDefaultTrack=!1,this.setAudioTrack(f)}}]),n}(m.default);v.default=c},"./src/controller/base-playlist-controller.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return t});var N=C("./src/polyfills/number.ts"),g=C("./src/types/level.ts"),m=C("./src/controller/level-helper.ts"),S=C("./src/utils/logger.ts"),_=C("./src/errors.ts"),t=function(){function d(c,o){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,o+":"),this.warn=S.logger.warn.bind(S.logger,o+":"),this.hls=c}var i=d.prototype;return i.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},i.onError=function(o,n){n.fatal&&n.type===_.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},i.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},i.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},i.stopLoad=function(){this.canLoad=!1,this.clearTimer()},i.switchParams=function(o,n){var s=n==null?void 0:n.renditionReports;if(s)for(var h=0;h<s.length;h++){var f=s[h],l=""+f.URI;if(l===o.substr(-l.length)){var a=parseInt(f["LAST-MSN"]),r=parseInt(f["LAST-PART"]);if(n&&this.hls.config.lowLatencyMode){var x=Math.min(n.age-n.partTarget,n.targetduration);r!==void 0&&x>n.partTarget&&(r+=1)}if(Object(N.isFiniteNumber)(a))return new g.HlsUrlParameters(a,Object(N.isFiniteNumber)(r)?r:void 0,g.HlsSkip.No)}}},i.loadPlaylist=function(o){},i.shouldLoadTrack=function(o){return this.canLoad&&o&&!!o.url&&(!o.details||o.details.live)},i.playlistLoaded=function(o,n,s){var h=this,f=n.details,l=n.stats,a=l.loading.end?Math.max(0,self.performance.now()-l.loading.end):0;if(f.advancedDateTime=Date.now()-a,f.live||s!=null&&s.live){if(f.reloaded(s),s&&this.log("live playlist "+o+" "+(f.advanced?"REFRESHED "+f.lastPartSn+"-"+f.lastPartIndex:"MISSED")),s&&f.fragments.length>0&&Object(m.mergeDetails)(s,f),!this.canLoad||!f.live)return;var r,x=void 0,y=void 0;if(f.canBlockReload&&f.endSN&&f.advanced){var p=this.hls.config.lowLatencyMode,R=f.lastPartSn,O=f.endSN,b=f.lastPartIndex,E=b!==-1,w=R===O,T=p?0:b;E?(x=w?O+1:R,y=w?T:b+1):x=O+1;var F=f.age,M=F+f.ageHeader,L=Math.min(M-f.partTarget,f.targetduration*1.5);if(L>0){if(s&&L>s.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+s.tuneInGoal+" to: "+L+" with playlist age: "+f.age),L=0;else{var Y=Math.floor(L/f.targetduration);if(x+=Y,y!==void 0){var K=Math.round(L%f.targetduration/f.partTarget);y+=K}this.log("CDN Tune-in age: "+f.ageHeader+"s last advanced "+F.toFixed(2)+"s goal: "+L+" skip sn "+Y+" to part "+y)}f.tuneInGoal=L}if(r=this.getDeliveryDirectives(f,n.deliveryDirectives,x,y),p||!w){this.loadPlaylist(r);return}}else r=this.getDeliveryDirectives(f,n.deliveryDirectives,x,y);var A=Object(m.computeReloadInterval)(f,l);x!==void 0&&f.canBlockReload&&(A-=f.partTarget||1),this.log("reload live playlist "+o+" in "+Math.round(A)+" ms"),this.timer=self.setTimeout(function(){return h.loadPlaylist(r)},A)}else this.clearTimer()},i.getDeliveryDirectives=function(o,n,s,h){var f=Object(g.getSkipValue)(o,s);return n!=null&&n.skip&&o.deltaUpdateFailed&&(s=n.msn,h=n.part,f=g.HlsSkip.No),new g.HlsUrlParameters(s,h,f)},i.retryLoadingOrFail=function(o){var n=this,s=this.hls.config,h=this.retryCount<s.levelLoadingMaxRetry;if(h){var f;if(this.retryCount++,o.details.indexOf("LoadTimeOut")>-1&&(f=o.context)!==null&&f!==void 0&&f.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+o.details+'"'),this.loadPlaylist();else{var l=Math.min(Math.pow(2,this.retryCount)*s.levelLoadingRetryDelay,s.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return n.loadPlaylist()},l),this.warn("retry playlist loading #"+this.retryCount+" in "+l+' ms after "'+o.details+'"')}}else this.warn('cannot recover from error "'+o.details+'"'),this.clearTimer(),o.fatal=!0;return h},d}()},"./src/controller/base-stream-controller.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"State",function(){return O}),C.d(v,"default",function(){return b});var N=C("./src/polyfills/number.ts"),g=C("./src/task-loop.ts"),m=C("./src/controller/fragment-tracker.ts"),S=C("./src/utils/buffer-helper.ts"),_=C("./src/utils/logger.ts"),t=C("./src/events.ts"),d=C("./src/errors.ts"),i=C("./src/types/transmuxer.ts"),c=C("./src/utils/mp4-tools.ts"),o=C("./src/utils/discontinuities.ts"),n=C("./src/controller/fragment-finders.ts"),s=C("./src/controller/level-helper.ts"),h=C("./src/loader/fragment-loader.ts"),f=C("./src/crypt/decrypter.ts"),l=C("./src/utils/time-ranges.ts"),a=C("./src/types/loader.ts");function r(E,w){for(var T=0;T<w.length;T++){var F=w[T];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(E,F.key,F)}}function x(E,w,T){return w&&r(E.prototype,w),T&&r(E,T),E}function y(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function p(E,w){E.prototype=Object.create(w.prototype),E.prototype.constructor=E,R(E,w)}function R(E,w){return R=Object.setPrototypeOf||function(F,M){return F.__proto__=M,F},R(E,w)}var O={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},b=function(E){p(w,E);function w(F,M,L){var Y;return Y=E.call(this)||this,Y.hls=void 0,Y.fragPrevious=null,Y.fragCurrent=null,Y.fragmentTracker=void 0,Y.transmuxer=null,Y._state=O.STOPPED,Y.media=void 0,Y.mediaBuffer=void 0,Y.config=void 0,Y.bitrateTest=!1,Y.lastCurrentTime=0,Y.nextLoadPosition=0,Y.startPosition=0,Y.loadedmetadata=!1,Y.fragLoadError=0,Y.retryDate=0,Y.levels=null,Y.fragmentLoader=void 0,Y.levelLastLoaded=null,Y.startFragRequested=!1,Y.decrypter=void 0,Y.initPTS=[],Y.onvseeking=null,Y.onvended=null,Y.logPrefix="",Y.log=void 0,Y.warn=void 0,Y.logPrefix=L,Y.log=_.logger.log.bind(_.logger,L+":"),Y.warn=_.logger.warn.bind(_.logger,L+":"),Y.hls=F,Y.fragmentLoader=new h.default(F.config),Y.fragmentTracker=M,Y.config=F.config,Y.decrypter=new f.default(F,F.config),F.on(t.Events.KEY_LOADED,Y.onKeyLoaded,y(Y)),Y}var T=w.prototype;return T.doTick=function(){this.onTickEnd()},T.onTickEnd=function(){},T.startLoad=function(M){},T.stopLoad=function(){this.fragmentLoader.abort();var M=this.fragCurrent;M&&this.fragmentTracker.removeFragment(M),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=O.STOPPED},T._streamEnded=function(M,L){var Y=this.fragCurrent,K=this.fragmentTracker;if(!L.live&&Y&&Y.sn===L.endSN&&!M.nextStart){var A=K.getState(Y);return A===m.FragmentState.PARTIAL||A===m.FragmentState.OK}return!1},T.onMediaAttached=function(M,L){var Y=this.media=this.mediaBuffer=L.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),Y.addEventListener("seeking",this.onvseeking),Y.addEventListener("ended",this.onvended);var K=this.config;this.levels&&K.autoStartLoad&&this.state===O.STOPPED&&this.startLoad(K.startPosition)},T.onMediaDetaching=function(){var M=this.media;M!=null&&M.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),M&&(M.removeEventListener("seeking",this.onvseeking),M.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},T.onMediaSeeking=function(){var M=this.config,L=this.fragCurrent,Y=this.media,K=this.mediaBuffer,A=this.state,H=Y?Y.currentTime:0,U=S.BufferHelper.bufferInfo(K||Y,H,M.maxBufferHole);if(this.log("media seeking to "+(Object(N.isFiniteNumber)(H)?H.toFixed(3):H)+", state: "+A),A===O.ENDED)this.resetLoadingState();else if(L&&!U.len){var I=M.maxFragLookUpTolerance,G=L.start-I,ne=L.start+L.duration+I,oe=H>ne;(H<G||oe)&&(oe&&L.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),L.loader.abort()),this.resetLoadingState())}Y&&(this.lastCurrentTime=H),!this.loadedmetadata&&!U.len&&(this.nextLoadPosition=this.startPosition=H),this.tickImmediate()},T.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},T.onKeyLoaded=function(M,L){if(this.state!==O.KEY_LOADING||L.frag!==this.fragCurrent||!this.levels)return;this.state=O.IDLE;var Y=this.levels[L.frag.level].details;Y&&this.loadFragment(L.frag,Y,L.frag.start)},T.onHandlerDestroying=function(){this.stopLoad(),E.prototype.onHandlerDestroying.call(this)},T.onHandlerDestroyed=function(){this.state=O.STOPPED,this.hls.off(t.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,E.prototype.onHandlerDestroyed.call(this)},T.loadKey=function(M,L){this.log("Loading key for "+M.sn+" of ["+L.startSN+"-"+L.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+M.level),this.state=O.KEY_LOADING,this.fragCurrent=M,this.hls.trigger(t.Events.KEY_LOADING,{frag:M})},T.loadFragment=function(M,L,Y){this._loadFragForPlayback(M,L,Y)},T._loadFragForPlayback=function(M,L,Y){var K=this,A=function(U){if(K.fragContextChanged(M)){K.warn("Fragment "+M.sn+(U.part?" p: "+U.part.index:"")+" of level "+M.level+" was dropped during download."),K.fragmentTracker.removeFragment(M);return}M.stats.chunkCount++,K._handleFragmentLoadProgress(U)};this._doFragLoad(M,L,Y,A).then(function(H){if(!H)return;K.fragLoadError=0;var U=K.state;if(K.fragContextChanged(M)){(U===O.FRAG_LOADING||U===O.BACKTRACKING||!K.fragCurrent&&U===O.PARSING)&&(K.fragmentTracker.removeFragment(M),K.state=O.IDLE);return}if("payload"in H&&(K.log("Loaded fragment "+M.sn+" of level "+M.level),K.hls.trigger(t.Events.FRAG_LOADED,H),K.state===O.BACKTRACKING)){K.fragmentTracker.backtrack(M,H),K.resetFragmentLoading(M);return}K._handleFragmentLoadComplete(H)}).catch(function(H){K.warn(H),K.resetFragmentLoading(M)})},T.flushMainBuffer=function(M,L,Y){if(Y===void 0&&(Y=null),!(M-L))return;var K={startOffset:M,endOffset:L,type:Y};this.fragLoadError=0,this.hls.trigger(t.Events.BUFFER_FLUSHING,K)},T._loadInitSegment=function(M){var L=this;this._doFragLoad(M).then(function(Y){if(!Y||L.fragContextChanged(M)||!L.levels)throw new Error("init load aborted");return Y}).then(function(Y){var K=L.hls,A=Y.payload,H=M.decryptdata;if(A&&A.byteLength>0&&H&&H.key&&H.iv&&H.method==="AES-128"){var U=self.performance.now();return L.decrypter.webCryptoDecrypt(new Uint8Array(A),H.key.buffer,H.iv.buffer).then(function(I){var G=self.performance.now();return K.trigger(t.Events.FRAG_DECRYPTED,{frag:M,payload:I,stats:{tstart:U,tdecrypt:G}}),Y.payload=I,Y})}return Y}).then(function(Y){var K=L.fragCurrent,A=L.hls,H=L.levels;if(!H)throw new Error("init load aborted, missing levels");var U=H[M.level].details;console.assert(U,"Level details are defined when init segment is loaded");var I=M.stats;L.state=O.IDLE,L.fragLoadError=0,M.data=new Uint8Array(Y.payload),I.parsing.start=I.buffering.start=self.performance.now(),I.parsing.end=I.buffering.end=self.performance.now(),Y.frag===K&&A.trigger(t.Events.FRAG_BUFFERED,{stats:I,frag:K,part:null,id:M.type}),L.tick()}).catch(function(Y){L.warn(Y),L.resetFragmentLoading(M)})},T.fragContextChanged=function(M){var L=this.fragCurrent;return!M||!L||M.level!==L.level||M.sn!==L.sn||M.urlId!==L.urlId},T.fragBufferedComplete=function(M,L){var Y=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+M.type+" sn: "+M.sn+(L?" part: "+L.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+M.level+" "+l.default.toString(S.BufferHelper.getBuffered(Y))),this.state=O.IDLE,this.tick()},T._handleFragmentLoadComplete=function(M){var L=this.transmuxer;if(!L)return;var Y=M.frag,K=M.part,A=M.partsLoaded,H=!A||A.length===0||A.some(function(I){return!I}),U=new i.ChunkMetadata(Y.level,Y.sn,Y.stats.chunkCount+1,0,K?K.index:-1,!H);L.flush(U)},T._handleFragmentLoadProgress=function(M){},T._doFragLoad=function(M,L,Y,K){var A=this;if(Y===void 0&&(Y=null),!this.levels)throw new Error("frag load aborted, missing levels");if(Y=Math.max(M.start,Y||0),this.config.lowLatencyMode&&L){var H=L.partList;if(H&&K){Y>M.end&&L.fragmentHint&&(M=L.fragmentHint);var U=this.getNextPart(H,M,Y);if(U>-1){var I=H[U];return this.log("Loading part sn: "+M.sn+" p: "+I.index+" cc: "+M.cc+" of playlist ["+L.startSN+"-"+L.endSN+"] parts [0-"+U+"-"+(H.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+M.level+", target: "+parseFloat(Y.toFixed(3))),this.nextLoadPosition=I.start+I.duration,this.state=O.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:M,part:H[U],targetBufferTime:Y}),this.doFragPartsLoad(M,H,U,K).catch(function(G){return A.handleFragLoadError(G)})}else if(!M.url||this.loadedEndOfParts(H,Y))return Promise.resolve(null)}}return this.log("Loading fragment "+M.sn+" cc: "+M.cc+" "+(L?"of ["+L.startSN+"-"+L.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+M.level+", target: "+parseFloat(Y.toFixed(3))),Object(N.isFiniteNumber)(M.sn)&&!this.bitrateTest&&(this.nextLoadPosition=M.start+M.duration),this.state=O.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:M,targetBufferTime:Y}),this.fragmentLoader.load(M,K).catch(function(G){return A.handleFragLoadError(G)})},T.doFragPartsLoad=function(M,L,Y,K){var A=this;return new Promise(function(H,U){var I=[],G=function ne(oe){var de=L[oe];A.fragmentLoader.loadPart(M,de,K).then(function(Oe){I[de.index]=Oe;var Ae=Oe.part;A.hls.trigger(t.Events.FRAG_LOADED,Oe);var pe=L[oe+1];if(pe&&pe.fragment===M)ne(oe+1);else return H({frag:M,part:Ae,partsLoaded:I})}).catch(U)};G(Y)})},T.handleFragLoadError=function(M){var L=M.data;return L&&L.details===d.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(L.frag,L.part):this.hls.trigger(t.Events.ERROR,L),null},T._handleTransmuxerFlush=function(M){var L=this.getCurrentContext(M);if(!L||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var Y=L.frag,K=L.part,A=L.level,H=self.performance.now();Y.stats.parsing.end=H,K&&(K.stats.parsing.end=H),this.updateLevelTiming(Y,K,A,M.partial)},T.getCurrentContext=function(M){var L=this.levels,Y=M.level,K=M.sn,A=M.part;if(!L||!L[Y])return this.warn("Levels object was unset while buffering fragment "+K+" of level "+Y+". The current chunk will not be buffered."),null;var H=L[Y],U=A>-1?Object(s.getPartWith)(H,K,A):null,I=U?U.fragment:Object(s.getFragmentWithSN)(H,K,this.fragCurrent);return I?{frag:I,part:U,level:H}:null},T.bufferFragmentData=function(M,L,Y,K){if(!M||this.state!==O.PARSING)return;var A=M.data1,H=M.data2,U=A;if(A&&H&&(U=Object(c.appendUint8Array)(A,H)),!U||!U.length)return;var I={type:M.type,frag:L,part:Y,chunkMeta:K,parent:L.type,data:U};this.hls.trigger(t.Events.BUFFER_APPENDING,I),M.dropped&&M.independent&&!Y&&this.flushBufferGap(L)},T.flushBufferGap=function(M){var L=this.media;if(!L)return;if(!S.BufferHelper.isBuffered(L,L.currentTime)){this.flushMainBuffer(0,M.start);return}var Y=L.currentTime,K=S.BufferHelper.bufferInfo(L,Y,0),A=M.duration,H=Math.min(this.config.maxFragLookUpTolerance*2,A*.25),U=Math.max(Math.min(M.start-H,K.end-H),Y+H);M.start-U>H&&this.flushMainBuffer(U,M.start)},T.getFwdBufferInfo=function(M,L){var Y=this.config,K=this.getLoadPosition();if(!Object(N.isFiniteNumber)(K))return null;var A=S.BufferHelper.bufferInfo(M,K,Y.maxBufferHole);if(A.len===0&&A.nextStart!==void 0){var H=this.fragmentTracker.getBufferedFrag(K,L);if(H&&A.nextStart<H.end)return S.BufferHelper.bufferInfo(M,K,Math.max(A.nextStart,Y.maxBufferHole))}return A},T.getMaxBufferLength=function(M){var L=this.config,Y;return M?Y=Math.max(8*L.maxBufferSize/M,L.maxBufferLength):Y=L.maxBufferLength,Math.min(Y,L.maxMaxBufferLength)},T.reduceMaxBufferLength=function(M){var L=this.config,Y=M||L.maxBufferLength;return L.maxMaxBufferLength>=Y?(L.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+L.maxMaxBufferLength+"s"),!0):!1},T.getNextFragment=function(M,L){var Y,K,A=L.fragments,H=A.length;if(!H)return null;var U=this.config,I=A[0].start,G;if(L.live){var ne=U.initialLiveManifestSize;if(H<ne)return this.warn("Not enough fragments to start playback (have: "+H+", need: "+ne+")"),null;!L.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(G=this.getInitialLiveFragment(L,A),this.startPosition=G?this.hls.liveSyncPosition||G.start:M)}else M<=I&&(G=A[0]);if(!G){var oe=U.lowLatencyMode?L.partEnd:L.fragmentEnd;G=this.getFragmentAtPosition(M,oe,L)}return(Y=G)!==null&&Y!==void 0&&Y.initSegment&&!((K=G)!==null&&K!==void 0&&K.initSegment.data)&&!this.bitrateTest&&(G=G.initSegment),G},T.getNextPart=function(M,L,Y){for(var K=-1,A=!1,H=!0,U=0,I=M.length;U<I;U++){var G=M[U];if(H=H&&!G.independent,K>-1&&Y<G.start)break;var ne=G.loaded;!ne&&(A||G.independent||H)&&G.fragment===L&&(K=U),A=ne}return K},T.loadedEndOfParts=function(M,L){var Y=M[M.length-1];return Y&&L>Y.start&&Y.loaded},T.getInitialLiveFragment=function(M,L){var Y=this.fragPrevious,K=null;if(Y){if(M.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+Y.programDateTime),K=Object(n.findFragmentByPDT)(L,Y.endProgramDateTime,this.config.maxFragLookUpTolerance)),!K){var A=Y.sn+1;if(A>=M.startSN&&A<=M.endSN){var H=L[A-M.startSN];Y.cc===H.cc&&(K=H,this.log("Live playlist, switching playlist, load frag with next SN: "+K.sn))}K||(K=Object(n.findFragWithCC)(L,Y.cc),K&&this.log("Live playlist, switching playlist, load frag with same CC: "+K.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(K=this.getFragmentAtPosition(U,this.bitrateTest?M.fragmentEnd:M.edge,M))}return K},T.getFragmentAtPosition=function(M,L,Y){var K=this.config,A=this.fragPrevious,H=Y.fragments,U=Y.endSN,I=Y.fragmentHint,G=K.maxFragLookUpTolerance,ne=!!(K.lowLatencyMode&&Y.partList&&I);ne&&I&&!this.bitrateTest&&(H=H.concat(I),U=I.sn);var oe;if(M<L){var de=M>L-G?0:G;oe=Object(n.findFragmentByPTS)(A,H,M,de)}else oe=H[H.length-1];if(oe){var Oe=oe.sn-Y.startSN,Ae=A&&oe.level===A.level,pe=H[Oe+1],Se=this.fragmentTracker.getState(oe);if(Se===m.FragmentState.BACKTRACKED){oe=null;for(var be=Oe;H[be]&&this.fragmentTracker.getState(H[be])===m.FragmentState.BACKTRACKED;)A?oe=H[be--]:oe=H[--be];oe||(oe=pe)}else A&&oe.sn===A.sn&&!ne&&(Ae&&(oe.sn<U&&this.fragmentTracker.getState(pe)!==m.FragmentState.OK?(this.log("SN "+oe.sn+" just loaded, load next one: "+pe.sn),oe=pe):oe=null))}return oe},T.synchronizeToLiveEdge=function(M){var L=this.config,Y=this.media;if(!Y)return;var K=this.hls.liveSyncPosition,A=Y.currentTime,H=M.fragments[0].start,U=M.edge,I=A>=H-L.maxFragLookUpTolerance&&A<=U;if(K!==null&&Y.duration>K&&(A<K||!I)){var G=L.liveMaxLatencyDuration!==void 0?L.liveMaxLatencyDuration:L.liveMaxLatencyDurationCount*M.targetduration;(!I&&Y.readyState<4||A<U-G)&&(this.loadedmetadata||(this.nextLoadPosition=K),Y.readyState&&(this.warn("Playback: "+A.toFixed(3)+" is located too far from the end of live sliding playlist: "+U+", reset currentTime to : "+K.toFixed(3)),Y.currentTime=K))}},T.alignPlaylists=function(M,L){var Y=this.levels,K=this.levelLastLoaded,A=this.fragPrevious,H=K!==null?Y[K]:null,U=M.fragments.length;if(!U)return this.warn("No fragments in live playlist"),0;var I=M.fragments[0].start,G=!L,ne=M.alignedSliding&&Object(N.isFiniteNumber)(I);if(G||!ne&&!I){Object(o.alignStream)(A,H,M);var oe=M.fragments[0].start;return this.log("Live playlist sliding: "+oe.toFixed(2)+" start-sn: "+(L?L.startSN:"na")+"->"+M.startSN+" prev-sn: "+(A?A.sn:"na")+" fragments: "+U),oe}return I},T.waitForCdnTuneIn=function(M){var L=3;return M.live&&M.canBlockReload&&M.tuneInGoal>Math.max(M.partHoldBack,M.partTarget*L)},T.setStartPosition=function(M,L){var Y=this.startPosition;if(Y<L&&(Y=-1),Y===-1||this.lastCurrentTime===-1){var K=M.startTimeOffset;Object(N.isFiniteNumber)(K)?(Y=L+K,K<0&&(Y+=M.totalduration),Y=Math.min(Math.max(L,Y),L+M.totalduration),this.log("Start time offset "+K+" found in playlist, adjust startPosition to "+Y),this.startPosition=Y):M.live?Y=this.hls.liveSyncPosition||L:this.startPosition=Y=0,this.lastCurrentTime=Y}this.nextLoadPosition=Y},T.getLoadPosition=function(){var M=this.media,L=0;return this.loadedmetadata&&M?L=M.currentTime:this.nextLoadPosition&&(L=this.nextLoadPosition),L},T.handleFragLoadAborted=function(M,L){this.transmuxer&&M.sn!=="initSegment"&&M.stats.aborted&&(this.warn("Fragment "+M.sn+(L?" part"+L.index:"")+" of level "+M.level+" was aborted"),this.resetFragmentLoading(M))},T.resetFragmentLoading=function(M){(!this.fragCurrent||!this.fragContextChanged(M))&&(this.state=O.IDLE)},T.onFragmentOrKeyLoadError=function(M,L){if(L.fatal)return;var Y=L.frag;if(!Y||Y.type!==M)return;var K=this.fragCurrent;console.assert(K&&Y.sn===K.sn&&Y.level===K.level&&Y.urlId===K.urlId,"Frag load error must match current frag to retry");var A=this.config;if(this.fragLoadError+1<=A.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(Y.level))return;var H=Math.min(Math.pow(2,this.fragLoadError)*A.fragLoadingRetryDelay,A.fragLoadingMaxRetryTimeout);this.warn("Fragment "+Y.sn+" of "+M+" "+Y.level+" failed to load, retrying in "+H+"ms"),this.retryDate=self.performance.now()+H,this.fragLoadError++,this.state=O.FRAG_LOADING_WAITING_RETRY}else L.levelRetry?(M===a.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=O.IDLE):(_.logger.error(L.details+" reaches max retry, redispatch as fatal ..."),L.fatal=!0,this.hls.stopLoad(),this.state=O.ERROR)},T.afterBufferFlushed=function(M,L,Y){if(!M)return;var K=S.BufferHelper.getBuffered(M);this.fragmentTracker.detectEvictedFragments(L,K,Y),this.state===O.ENDED&&this.resetLoadingState()},T.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=O.IDLE},T.resetLiveStartWhenNotLoaded=function(M){if(!this.loadedmetadata){this.startFragRequested=!1;var L=this.levels?this.levels[M].details:null;if(L!=null&&L.live)return this.startPosition=-1,this.setStartPosition(L,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},T.updateLevelTiming=function(M,L,Y,K){var A=this,H=Y.details;console.assert(!!H,"level.details must be defined");var U=Object.keys(M.elementaryStreams).reduce(function(I,G){var ne=M.elementaryStreams[G];if(ne){var oe=ne.endPTS-ne.startPTS;if(oe<=0)return A.warn("Could not parse fragment "+M.sn+" "+G+" duration reliably ("+oe+") resetting transmuxer to fallback to playlist timing"),A.resetTransmuxer(),I||!1;var de=K?0:Object(s.updateFragPTSDTS)(H,M,ne.startPTS,ne.endPTS,ne.startDTS,ne.endDTS);return A.hls.trigger(t.Events.LEVEL_PTS_UPDATED,{details:H,level:Y,drift:de,type:G,frag:M,start:ne.startPTS,end:ne.endPTS}),!0}return I},!1);U?(this.state=O.PARSED,this.hls.trigger(t.Events.FRAG_PARSED,{frag:M,part:L})):this.resetLoadingState()},T.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},x(w,[{key:"state",get:function(){return this._state},set:function(M){var L=this._state;L!==M&&(this._state=M,this.log(L+"->"+M))}}]),w}(g.default)},"./src/controller/buffer-controller.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return n});var N=C("./src/polyfills/number.ts"),g=C("./src/events.ts"),m=C("./src/utils/logger.ts"),S=C("./src/errors.ts"),_=C("./src/utils/buffer-helper.ts"),t=C("./src/utils/mediasource-helper.ts"),d=C("./src/loader/fragment.ts"),i=C("./src/controller/buffer-operation-queue.ts"),c=Object(t.getMediaSource)(),o=/([ha]vc.)(?:\.[^.,]+)+/,n=function(){function s(f){var l=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=l.hls,r=l.media,x=l.mediaSource;m.logger.log("[buffer-controller]: Media source opened"),r&&(l.updateMediaElementDuration(),a.trigger(g.Events.MEDIA_ATTACHED,{media:r})),x&&x.removeEventListener("sourceopen",l._onMediaSourceOpen),l.checkPendingTracks()},this._onMediaSourceClose=function(){m.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){m.logger.log("[buffer-controller]: Media source ended")},this.hls=f,this._initSourceBuffer(),this.registerListeners()}var h=s.prototype;return h.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},h.destroy=function(){this.unregisterListeners(),this.details=null},h.registerListeners=function(){var l=this.hls;l.on(g.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.on(g.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(g.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(g.Events.BUFFER_RESET,this.onBufferReset,this),l.on(g.Events.BUFFER_APPENDING,this.onBufferAppending,this),l.on(g.Events.BUFFER_CODECS,this.onBufferCodecs,this),l.on(g.Events.BUFFER_EOS,this.onBufferEos,this),l.on(g.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),l.on(g.Events.LEVEL_UPDATED,this.onLevelUpdated,this),l.on(g.Events.FRAG_PARSED,this.onFragParsed,this),l.on(g.Events.FRAG_CHANGED,this.onFragChanged,this)},h.unregisterListeners=function(){var l=this.hls;l.off(g.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.off(g.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(g.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(g.Events.BUFFER_RESET,this.onBufferReset,this),l.off(g.Events.BUFFER_APPENDING,this.onBufferAppending,this),l.off(g.Events.BUFFER_CODECS,this.onBufferCodecs,this),l.off(g.Events.BUFFER_EOS,this.onBufferEos,this),l.off(g.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),l.off(g.Events.LEVEL_UPDATED,this.onLevelUpdated,this),l.off(g.Events.FRAG_PARSED,this.onFragParsed,this),l.off(g.Events.FRAG_CHANGED,this.onFragChanged,this)},h._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new i.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},h.onManifestParsed=function(l,a){var r=2;(a.audio&&!a.video||!a.altAudio)&&(r=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=r,this.details=null,m.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},h.onMediaAttaching=function(l,a){var r=this.media=a.media;if(r&&c){var x=this.mediaSource=new c;x.addEventListener("sourceopen",this._onMediaSourceOpen),x.addEventListener("sourceended",this._onMediaSourceEnded),x.addEventListener("sourceclose",this._onMediaSourceClose),r.src=self.URL.createObjectURL(x),this._objectUrl=r.src}},h.onMediaDetaching=function(){var l=this.media,a=this.mediaSource,r=this._objectUrl;if(a){if(m.logger.log("[buffer-controller]: media source detaching"),a.readyState==="open")try{a.endOfStream()}catch(x){m.logger.warn("[buffer-controller]: onMediaDetaching: "+x.message+" while calling endOfStream")}this.onBufferReset(),a.removeEventListener("sourceopen",this._onMediaSourceOpen),a.removeEventListener("sourceended",this._onMediaSourceEnded),a.removeEventListener("sourceclose",this._onMediaSourceClose),l&&(r&&self.URL.revokeObjectURL(r),l.src===r?(l.removeAttribute("src"),l.load()):m.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(g.Events.MEDIA_DETACHED,void 0)},h.onBufferReset=function(){var l=this;this.getSourceBufferTypes().forEach(function(a){var r=l.sourceBuffer[a];try{r&&(l.removeBufferListeners(a),l.mediaSource&&l.mediaSource.removeSourceBuffer(r),l.sourceBuffer[a]=void 0)}catch(x){m.logger.warn("[buffer-controller]: Failed to reset the "+a+" buffer",x)}}),this._initSourceBuffer()},h.onBufferCodecs=function(l,a){var r=this,x=this.getSourceBufferTypes().length;if(Object.keys(a).forEach(function(y){if(x){var p=r.tracks[y];if(p&&typeof p.buffer.changeType=="function"){var R=a[y],O=R.codec,b=R.levelCodec,E=R.container,w=(p.levelCodec||p.codec).replace(o,"$1"),T=(b||O).replace(o,"$1");if(w!==T){var F=E+";codecs="+(b||O);r.appendChangeType(y,F)}}}else r.pendingTracks[y]=a[y]}),x)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},h.appendChangeType=function(l,a){var r=this,x=this.operationQueue,y={execute:function(){var R=r.sourceBuffer[l];R&&(m.logger.log("[buffer-controller]: changing "+l+" sourceBuffer type to "+a),R.changeType(a)),x.shiftAndExecuteNext(l)},onStart:function(){},onComplete:function(){},onError:function(R){m.logger.warn("[buffer-controller]: Failed to change "+l+" SourceBuffer type",R)}};x.append(y,l)},h.onBufferAppending=function(l,a){var r=this,x=this.hls,y=this.operationQueue,p=this.tracks,R=a.data,O=a.type,b=a.frag,E=a.part,w=a.chunkMeta,T=w.buffering[O],F=self.performance.now();T.start=F;var M=b.stats.buffering,L=E?E.stats.buffering:null;M.start===0&&(M.start=F),L&&L.start===0&&(L.start=F);var Y=p.audio,K=O==="audio"&&w.id===1&&(Y==null?void 0:Y.container)==="audio/mpeg",A={execute:function(){if(T.executeStart=self.performance.now(),K){var U=r.sourceBuffer[O];if(U){var I=b.start-U.timestampOffset;Math.abs(I)>=.1&&(m.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+b.start+" (delta: "+I+") sn: "+b.sn+")"),U.timestampOffset=b.start)}}r.appendExecutor(R,O)},onStart:function(){},onComplete:function(){var U=self.performance.now();T.executeEnd=T.end=U,M.first===0&&(M.first=U),L&&L.first===0&&(L.first=U);var I=r.sourceBuffer,G={};for(var ne in I)G[ne]=_.BufferHelper.getBuffered(I[ne]);r.appendError=0,r.hls.trigger(g.Events.BUFFER_APPENDED,{type:O,frag:b,part:E,chunkMeta:w,parent:b.type,timeRanges:G})},onError:function(U){m.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",U);var I={type:S.ErrorTypes.MEDIA_ERROR,parent:b.type,details:S.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?I.details=S.ErrorDetails.BUFFER_FULL_ERROR:(r.appendError++,I.details=S.ErrorDetails.BUFFER_APPEND_ERROR,r.appendError>x.config.appendErrorMaxRetry&&(m.logger.error("[buffer-controller]: Failed "+x.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),I.fatal=!0)),x.trigger(g.Events.ERROR,I)}};y.append(A,O)},h.onBufferFlushing=function(l,a){var r=this,x=this.operationQueue,y=function(R){return{execute:r.removeExecutor.bind(r,R,a.startOffset,a.endOffset),onStart:function(){},onComplete:function(){r.hls.trigger(g.Events.BUFFER_FLUSHED,{type:R})},onError:function(b){m.logger.warn("[buffer-controller]: Failed to remove from "+R+" SourceBuffer",b)}}};a.type?x.append(y(a.type),a.type):this.getSourceBufferTypes().forEach(function(p){x.append(y(p),p)})},h.onFragParsed=function(l,a){var r=this,x=a.frag,y=a.part,p=[],R=y?y.elementaryStreams:x.elementaryStreams;R[d.ElementaryStreamTypes.AUDIOVIDEO]?p.push("audiovideo"):(R[d.ElementaryStreamTypes.AUDIO]&&p.push("audio"),R[d.ElementaryStreamTypes.VIDEO]&&p.push("video"));var O=function(){var E=self.performance.now();x.stats.buffering.end=E,y&&(y.stats.buffering.end=E);var w=y?y.stats:x.stats;r.hls.trigger(g.Events.FRAG_BUFFERED,{frag:x,part:y,stats:w,id:x.type})};p.length===0&&m.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+x.type+" level: "+x.level+" sn: "+x.sn),this.blockBuffers(O,p)},h.onFragChanged=function(l,a){this.flushBackBuffer()},h.onBufferEos=function(l,a){var r=this,x=this.getSourceBufferTypes().reduce(function(y,p){var R=r.sourceBuffer[p];return(!a.type||a.type===p)&&(R&&!R.ended&&(R.ended=!0,m.logger.log("[buffer-controller]: "+p+" sourceBuffer now EOS"))),y&&!!(!R||R.ended)},!0);x&&this.blockBuffers(function(){var y=r.mediaSource;if(!y||y.readyState!=="open")return;y.endOfStream()})},h.onLevelUpdated=function(l,a){var r=a.details;if(!r.fragments.length)return;this.details=r,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},h.flushBackBuffer=function(){var l=this.hls,a=this.details,r=this.media,x=this.sourceBuffer;if(!r||a===null)return;var y=this.getSourceBufferTypes();if(!y.length)return;var p=a.live&&l.config.liveBackBufferLength!==null?l.config.liveBackBufferLength:l.config.backBufferLength;if(!Object(N.isFiniteNumber)(p)||p<0)return;var R=r.currentTime,O=a.levelTargetDuration,b=Math.max(p,O),E=Math.floor(R/O)*O-b;y.forEach(function(w){var T=x[w];if(T){var F=_.BufferHelper.getBuffered(T);F.length>0&&E>F.start(0)&&(l.trigger(g.Events.BACK_BUFFER_REACHED,{bufferEnd:E}),a.live&&l.trigger(g.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:E}),l.trigger(g.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:E,type:w}))}})},h.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var l=this.details,a=this.hls,r=this.media,x=this.mediaSource,y=l.fragments[0].start+l.totalduration,p=r.duration,R=Object(N.isFiniteNumber)(x.duration)?x.duration:0;l.live&&a.config.liveDurationInfinity?(m.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),x.duration=Infinity,this.updateSeekableRange(l)):(y>R&&y>p||!Object(N.isFiniteNumber)(p))&&(m.logger.log("[buffer-controller]: Updating Media Source duration to "+y.toFixed(3)),x.duration=y)},h.updateSeekableRange=function(l){var a=this.mediaSource,r=l.fragments,x=r.length;if(x&&l.live&&a!==null&&a!==void 0&&a.setLiveSeekableRange){var y=Math.max(0,r[0].start),p=Math.max(y,y+l.totalduration);a.setLiveSeekableRange(y,p)}},h.checkPendingTracks=function(){var l=this.bufferCodecEventsExpected,a=this.operationQueue,r=this.pendingTracks,x=Object.keys(r).length;if(x&&!l||x===2){this.createSourceBuffers(r),this.pendingTracks={};var y=this.getSourceBufferTypes();if(y.length===0){this.hls.trigger(g.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}y.forEach(function(p){a.executeNext(p)})}},h.createSourceBuffers=function(l){var a=this.sourceBuffer,r=this.mediaSource;if(!r)throw Error("createSourceBuffers called when mediaSource was null");var x=0;for(var y in l)if(!a[y]){var p=l[y];if(!p)throw Error("source buffer exists for track "+y+", however track does not");var R=p.levelCodec||p.codec,O=p.container+";codecs="+R;m.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var b=a[y]=r.addSourceBuffer(O),E=y;this.addBufferListener(E,"updatestart",this._onSBUpdateStart),this.addBufferListener(E,"updateend",this._onSBUpdateEnd),this.addBufferListener(E,"error",this._onSBUpdateError),this.tracks[y]={buffer:b,codec:R,container:p.container,levelCodec:p.levelCodec,id:p.id},x++}catch(w){m.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+w.message),this.hls.trigger(g.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:w,mimeType:O})}}x&&this.hls.trigger(g.Events.BUFFER_CREATED,{tracks:this.tracks})},h._onSBUpdateStart=function(l){var a=this.operationQueue,r=a.current(l);r.onStart()},h._onSBUpdateEnd=function(l){var a=this.operationQueue,r=a.current(l);r.onComplete(),a.shiftAndExecuteNext(l)},h._onSBUpdateError=function(l,a){m.logger.error("[buffer-controller]: "+l+" SourceBuffer error",a),this.hls.trigger(g.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var r=this.operationQueue.current(l);r&&r.onError(a)},h.removeExecutor=function(l,a,r){var x=this.media,y=this.mediaSource,p=this.operationQueue,R=this.sourceBuffer,O=R[l];if(!x||!y||!O){m.logger.warn("[buffer-controller]: Attempting to remove from the "+l+" SourceBuffer, but it does not exist"),p.shiftAndExecuteNext(l);return}var b=Object(N.isFiniteNumber)(x.duration)?x.duration:Infinity,E=Object(N.isFiniteNumber)(y.duration)?y.duration:Infinity,w=Math.max(0,a),T=Math.min(r,b,E);T>w?(m.logger.log("[buffer-controller]: Removing ["+w+","+T+"] from the "+l+" SourceBuffer"),console.assert(!O.updating,l+" sourceBuffer must not be updating"),O.remove(w,T)):p.shiftAndExecuteNext(l)},h.appendExecutor=function(l,a){var r=this.operationQueue,x=this.sourceBuffer,y=x[a];if(!y){m.logger.warn("[buffer-controller]: Attempting to append to the "+a+" SourceBuffer, but it does not exist"),r.shiftAndExecuteNext(a);return}y.ended=!1,console.assert(!y.updating,a+" sourceBuffer must not be updating"),y.appendBuffer(l)},h.blockBuffers=function(l,a){var r=this;if(a===void 0&&(a=this.getSourceBufferTypes()),!a.length){m.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(l);return}var x=this.operationQueue,y=a.map(function(p){return x.appendBlocker(p)});Promise.all(y).then(function(){l(),a.forEach(function(p){var R=r.sourceBuffer[p];(!R||!R.updating)&&x.shiftAndExecuteNext(p)})})},h.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},h.addBufferListener=function(l,a,r){var x=this.sourceBuffer[l];if(!x)return;var y=r.bind(this,l);this.listeners[l].push({event:a,listener:y}),x.addEventListener(a,y)},h.removeBufferListeners=function(l){var a=this.sourceBuffer[l];if(!a)return;this.listeners[l].forEach(function(r){a.removeEventListener(r.event,r.listener)})},s}()},"./src/controller/buffer-operation-queue.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return g});var N=C("./src/utils/logger.ts"),g=function(){function m(_){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=_}var S=m.prototype;return S.append=function(t,d){var i=this.queues[d];i.push(t),i.length===1&&this.buffers[d]&&this.executeNext(d)},S.insertAbort=function(t,d){var i=this.queues[d];i.unshift(t),this.executeNext(d)},S.appendBlocker=function(t){var d,i=new Promise(function(o){d=o}),c={execute:d,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(c,t),i},S.executeNext=function(t){var d=this.buffers,i=this.queues,c=d[t],o=i[t];if(o.length){var n=o[0];try{n.execute()}catch(s){N.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),n.onError(s),(!c||!c.updating)&&(o.shift(),this.executeNext(t))}}},S.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},S.current=function(t){return this.queues[t][0]},m}()},"./src/controller/cap-level-controller.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/events.ts");function g(_,t){for(var d=0;d<t.length;d++){var i=t[d];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(_,i.key,i)}}function m(_,t,d){return t&&g(_.prototype,t),d&&g(_,d),_}var S=function(){function _(d){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=d,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var t=_.prototype;return t.setStreamController=function(i){this.streamController=i},t.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},t.registerListeners=function(){var i=this.hls;i.on(N.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.on(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(N.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.unregisterListener=function(){var i=this.hls;i.off(N.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.off(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(N.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.onFpsDropLevelCapping=function(i,c){_.isLevelAllowed(c.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(c.droppedLevel)},t.onMediaAttaching=function(i,c){this.media=c.media instanceof HTMLVideoElement?c.media:null},t.onManifestParsed=function(i,c){var o=this.hls;this.restrictedLevels=[],this.firstLevel=c.firstLevel,o.config.capLevelToPlayerSize&&c.video&&this.startCapping()},t.onBufferCodecs=function(i,c){var o=this.hls;o.config.capLevelToPlayerSize&&c.video&&this.startCapping()},t.onMediaDetaching=function(){this.stopCapping()},t.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var i=this.hls.levels;if(i.length){var c=this.hls;c.autoLevelCapping=this.getMaxLevel(i.length-1),c.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=c.autoLevelCapping}}},t.getMaxLevel=function(i){var c=this,o=this.hls.levels;if(!o.length)return-1;var n=o.filter(function(s,h){return _.isLevelAllowed(h,c.restrictedLevels)&&h<=i});return this.clientRect=null,_.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)},t.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()},t.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},t.getDimensions=function(){if(this.clientRect)return this.clientRect;var i=this.media,c={width:0,height:0};if(i){var o=i.getBoundingClientRect();c.width=o.width,c.height=o.height,!c.width&&!c.height&&(c.width=o.right-o.left||i.width||0,c.height=o.bottom-o.top||i.height||0)}return this.clientRect=c,c},_.isLevelAllowed=function(i,c){return c===void 0&&(c=[]),c.indexOf(i)===-1},_.getMaxLevelByMediaSize=function(i,c,o){if(!i||!i.length)return-1;for(var n=function(a,r){return r?a.width!==r.width||a.height!==r.height:!0},s=i.length-1,h=0;h<i.length;h+=1){var f=i[h];if((f.width>=c||f.height>=o)&&n(f,i[h+1])){s=h;break}}return s},m(_,[{key:"mediaWidth",get:function(){return this.getDimensions().width*_.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*_.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var i=1;try{i=self.devicePixelRatio}catch(c){}return i}}]),_}();v.default=S},"./src/controller/cmcd-controller.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return n});var N=C("./src/events.ts"),g=C("./src/types/cmcd.ts"),m=C("./src/utils/buffer-helper.ts"),S=C("./src/utils/logger.ts");function _(s,h){for(var f=0;f<h.length;f++){var l=h[f];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(s,l.key,l)}}function t(s,h,f){return h&&_(s.prototype,h),f&&_(s,f),s}function d(s,h){var f=typeof Symbol!="undefined"&&s[Symbol.iterator]||s["@@iterator"];if(f)return(f=f.call(s)).next.bind(f);if(Array.isArray(s)||(f=i(s))||h&&s&&typeof s.length=="number"){f&&(s=f);var l=0;return function(){return l>=s.length?{done:!0}:{done:!1,value:s[l++]}}}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 i(s,h){if(!s)return;if(typeof s=="string")return c(s,h);var f=Object.prototype.toString.call(s).slice(8,-1);if(f==="Object"&&s.constructor&&(f=s.constructor.name),f==="Map"||f==="Set")return Array.from(s);if(f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return c(s,h)}function c(s,h){(h==null||h>s.length)&&(h=s.length);for(var f=0,l=new Array(h);f<h;f++)l[f]=s[f];return l}function o(){return o=Object.assign||function(s){for(var h=1;h<arguments.length;h++){var f=arguments[h];for(var l in f)Object.prototype.hasOwnProperty.call(f,l)&&(s[l]=f[l])}return s},o.apply(this,arguments)}var n=function(){function s(f){var l=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(){l.initialized&&(l.starved=!0),l.buffering=!0},this.onPlaying=function(){l.initialized||(l.initialized=!0),l.buffering=!1},this.applyPlaylistData=function(x){try{l.apply(x,{ot:g.CMCDObjectType.MANIFEST,su:!l.initialized})}catch(y){S.logger.warn("Could not generate manifest CMCD data.",y)}},this.applyFragmentData=function(x){try{var y=x.frag,p=l.hls.levels[y.level],R=l.getObjectType(y),O={d:y.duration*1e3,ot:R};(R===g.CMCDObjectType.VIDEO||R===g.CMCDObjectType.AUDIO||R==g.CMCDObjectType.MUXED)&&(O.br=p.bitrate/1e3,O.tb=l.getTopBandwidth(R),O.bl=l.getBufferLength(R)),l.apply(x,O)}catch(b){S.logger.warn("Could not generate segment CMCD data.",b)}},this.hls=f;var a=this.config=f.config,r=a.cmcd;r!=null&&(a.pLoader=this.createPlaylistLoader(),a.fLoader=this.createFragmentLoader(),this.sid=r.sessionId||s.uuid(),this.cid=r.contentId,this.useHeaders=r.useHeaders===!0,this.registerListeners())}var h=s.prototype;return h.registerListeners=function(){var l=this.hls;l.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(N.Events.MEDIA_DETACHED,this.onMediaDetached,this),l.on(N.Events.BUFFER_CREATED,this.onBufferCreated,this)},h.unregisterListeners=function(){var l=this.hls;l.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(N.Events.MEDIA_DETACHED,this.onMediaDetached,this),l.off(N.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},h.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},h.onMediaAttached=function(l,a){this.media=a.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},h.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},h.onBufferCreated=function(l,a){var r,x;this.audioBuffer=(r=a.tracks.audio)===null||r===void 0?void 0:r.buffer,this.videoBuffer=(x=a.tracks.video)===null||x===void 0?void 0:x.buffer},h.createData=function(){var l;return{v:g.CMCDVersion,sf:g.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(l=this.media)===null||l===void 0?void 0:l.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},h.apply=function(l,a){a===void 0&&(a={}),o(a,this.createData());var r=a.ot===g.CMCDObjectType.INIT||a.ot===g.CMCDObjectType.VIDEO||a.ot===g.CMCDObjectType.MUXED;if(this.starved&&r&&(a.bs=!0,a.su=!0,this.starved=!1),a.su==null&&(a.su=this.buffering),this.useHeaders){var x=s.toHeaders(a);if(!Object.keys(x).length)return;l.headers||(l.headers={}),o(l.headers,x)}else{var y=s.toQuery(a);if(!y)return;l.url=s.appendQueryToUri(l.url,y)}},h.getObjectType=function(l){var a=l.type;return a==="subtitle"?g.CMCDObjectType.TIMED_TEXT:l.sn==="initSegment"?g.CMCDObjectType.INIT:a==="audio"?g.CMCDObjectType.AUDIO:a==="main"?this.hls.audioTracks.length?g.CMCDObjectType.VIDEO:g.CMCDObjectType.MUXED:void 0},h.getTopBandwidth=function(l){for(var a=0,r=l===g.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,x=d(r),y;!(y=x()).done;){var p=y.value;p.bitrate>a&&(a=p.bitrate)}return a>0?a:NaN},h.getBufferLength=function(l){var a=this.hls.media,r=l===g.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!r||!a)return NaN;var x=m.BufferHelper.bufferInfo(r,a.currentTime,this.config.maxBufferHole);return x.len*1e3},h.createPlaylistLoader=function(){var l=this.config.pLoader,a=this.applyPlaylistData,r=l||this.config.loader;return function(){function x(p){this.loader=void 0,this.loader=new r(p)}var y=x.prototype;return y.destroy=function(){this.loader.destroy()},y.abort=function(){this.loader.abort()},y.load=function(R,O,b){a(R),this.loader.load(R,O,b)},t(x,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),x}()},h.createFragmentLoader=function(){var l=this.config.fLoader,a=this.applyFragmentData,r=l||this.config.loader;return function(){function x(p){this.loader=void 0,this.loader=new r(p)}var y=x.prototype;return y.destroy=function(){this.loader.destroy()},y.abort=function(){this.loader.abort()},y.load=function(R,O,b){a(R),this.loader.load(R,O,b)},t(x,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),x}()},s.uuid=function(){var l=URL.createObjectURL(new Blob),a=l.toString();return URL.revokeObjectURL(l),a.substr(a.lastIndexOf("/")+1)},s.serialize=function(l){for(var a=[],r=function(K){return!Number.isNaN(K)&&K!=null&&K!==""&&K!==!1},x=function(K){return Math.round(K)},y=function(K){return x(K/100)*100},p=function(K){return encodeURIComponent(K)},R={br:x,d:x,bl:y,dl:y,mtp:y,nor:p,rtp:y,tb:x},O=Object.keys(l||{}).sort(),b=d(O),E;!(E=b()).done;){var w=E.value,T=l[w];if(!r(T))continue;if(w==="v"&&T===1)continue;if(w=="pr"&&T===1)continue;var F=R[w];F&&(T=F(T));var M=typeof T,L=void 0;w==="ot"||w==="sf"||w==="st"?L=w+"="+T:M==="boolean"?L=w:M==="number"?L=w+"="+T:L=w+"="+JSON.stringify(T),a.push(L)}return a.join(",")},s.toHeaders=function(l){for(var a=Object.keys(l),r={},x=["Object","Request","Session","Status"],y=[{},{},{},{}],p={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},R=0,O=a;R<O.length;R++){var b=O[R],E=p[b]!=null?p[b]:1;y[E][b]=l[b]}for(var w=0;w<y.length;w++){var T=s.serialize(y[w]);T&&(r["CMCD-"+x[w]]=T)}return r},s.toQuery=function(l){return"CMCD="+encodeURIComponent(s.serialize(l))},s.appendQueryToUri=function(l,a){if(!a)return l;var r=l.includes("?")?"&":"?";return""+l+r+a},s}()},"./src/controller/eme-controller.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/events.ts"),g=C("./src/errors.ts"),m=C("./src/utils/logger.ts"),S=C("./src/utils/mediakeys-helper.ts");function _(n,s){for(var h=0;h<s.length;h++){var f=s[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(n,f.key,f)}}function t(n,s,h){return s&&_(n.prototype,s),h&&_(n,h),n}var d=3,i=function(s,h,f){var l={audioCapabilities:[],videoCapabilities:[]};return s.forEach(function(a){l.audioCapabilities.push({contentType:'audio/mp4; codecs="'+a+'"',robustness:f.audioRobustness||""})}),h.forEach(function(a){l.videoCapabilities.push({contentType:'video/mp4; codecs="'+a+'"',robustness:f.videoRobustness||""})}),[l]},c=function(s,h,f,l){switch(s){case S.KeySystems.WIDEVINE:return i(h,f,l);default:throw new Error("Unknown key-system: "+s)}},o=function(){function n(h){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=h,this._config=h.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 s=n.prototype;return s.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},s._registerListeners=function(){this.hls.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(N.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(N.Events.MANIFEST_PARSED,this.onManifestParsed,this)},s._unregisterListeners=function(){this.hls.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(N.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(N.Events.MANIFEST_PARSED,this.onManifestParsed,this)},s.getLicenseServerUrl=function(f){switch(f){case S.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+f+'"')},s._attemptKeySystemAccess=function(f,l,a){var r=this,x=c(f,l,a,this._drmSystemOptions);m.logger.log("Requesting encrypted media key-system access");var y=this.requestMediaKeySystemAccess(f,x);this.mediaKeysPromise=y.then(function(p){return r._onMediaKeySystemAccessObtained(f,p)}),y.catch(function(p){m.logger.error('Failed to obtain key-system "'+f+'" access:',p)})},s._onMediaKeySystemAccessObtained=function(f,l){var a=this;m.logger.log('Access for key-system "'+f+'" obtained');var r={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:l,mediaKeySystemDomain:f};this._mediaKeysList.push(r);var x=Promise.resolve().then(function(){return l.createMediaKeys()}).then(function(y){return r.mediaKeys=y,m.logger.log('Media-keys created for key-system "'+f+'"'),a._onMediaKeysCreated(),y});return x.catch(function(y){m.logger.error("Failed to create media-keys:",y)}),x},s._onMediaKeysCreated=function(){var f=this;this._mediaKeysList.forEach(function(l){l.mediaKeysSession||(l.mediaKeysSession=l.mediaKeys.createSession(),f._onNewMediaKeySession(l.mediaKeysSession))})},s._onNewMediaKeySession=function(f){var l=this;m.logger.log("New key-system session "+f.sessionId),f.addEventListener("message",function(a){l._onKeySessionMessage(f,a.message)},!1)},s._onKeySessionMessage=function(f,l){m.logger.log("Got EME message event, creating license request"),this._requestLicense(l,function(a){m.logger.log("Received license data (length: "+(a&&a.byteLength)+"), updating key-session"),f.update(a)})},s.onMediaEncrypted=function(f){var l=this;if(m.logger.log('Media is encrypted using "'+f.initDataType+'" init data type'),!this.mediaKeysPromise){m.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(N.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var a=function(x){if(!l._media)return;l._attemptSetMediaKeys(x),l._generateRequestWithPreferredKeySession(f.initDataType,f.initData)};this.mediaKeysPromise.then(a).catch(a)},s._attemptSetMediaKeys=function(f){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var l=this._mediaKeysList[0];if(!l||!l.mediaKeys){m.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(N.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}m.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(l.mediaKeys),this._hasSetMediaKeys=!0}},s._generateRequestWithPreferredKeySession=function(f,l){var a=this,r=this._mediaKeysList[0];if(!r){m.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(N.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(r.mediaKeysSessionInitialized){m.logger.warn("Key-Session already initialized but requested again");return}var x=r.mediaKeysSession;if(!x){m.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(N.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!l){m.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(N.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}m.logger.log('Generating key-session request for "'+f+'" init data type'),r.mediaKeysSessionInitialized=!0,x.generateRequest(f,l).then(function(){m.logger.debug("Key-session generation succeeded")}).catch(function(y){m.logger.error("Error generating key-session request:",y),a.hls.trigger(N.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},s._createLicenseXhr=function(f,l,a){var r=new XMLHttpRequest;r.responseType="arraybuffer",r.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,r,f,l,a);var x=this._licenseXhrSetup;if(x)try{x.call(this.hls,r,f),x=void 0}catch(y){m.logger.error(y)}try{r.readyState||r.open("POST",f,!0),x&&x.call(this.hls,r,f)}catch(y){throw new Error("issue setting up KeySystem license XHR "+y)}return r},s._onLicenseRequestReadyStageChange=function(f,l,a,r){switch(f.readyState){case 4:if(f.status===200){this._requestLicenseFailureCount=0,m.logger.log("License request succeeded");var x=f.response,y=this._licenseResponseCallback;if(y)try{x=y.call(this.hls,f,l)}catch(R){m.logger.error(R)}r(x)}else{if(m.logger.error("License Request XHR failed ("+l+"). Status: "+f.status+" ("+f.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>d){this.hls.trigger(N.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var p=d-this._requestLicenseFailureCount+1;m.logger.warn("Retrying license request, "+p+" attempts left"),this._requestLicense(a,r)}break}},s._generateLicenseRequestChallenge=function(f,l){switch(f.mediaKeySystemDomain){case S.KeySystems.WIDEVINE:return l}throw new Error("unsupported key-system: "+f.mediaKeySystemDomain)},s._requestLicense=function(f,l){m.logger.log("Requesting content license for key-system");var a=this._mediaKeysList[0];if(!a){m.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(N.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var r=this.getLicenseServerUrl(a.mediaKeySystemDomain),x=this._createLicenseXhr(r,f,l);m.logger.log("Sending license request to URL: "+r);var y=this._generateLicenseRequestChallenge(a,f);x.send(y)}catch(p){m.logger.error("Failure requesting DRM license: "+p),this.hls.trigger(N.Events.ERROR,{type:g.ErrorTypes.KEY_SYSTEM_ERROR,details:g.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},s.onMediaAttached=function(f,l){if(!this._emeEnabled)return;var a=l.media;this._media=a,a.addEventListener("encrypted",this._onMediaEncrypted)},s.onMediaDetached=function(){var f=this._media,l=this._mediaKeysList;if(!f)return;f.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(l.map(function(a){if(a.mediaKeysSession)return a.mediaKeysSession.close().catch(function(){})})).then(function(){return f.setMediaKeys(null)}).catch(function(){})},s.onManifestParsed=function(f,l){if(!this._emeEnabled)return;var a=l.levels.map(function(x){return x.audioCodec}).filter(function(x){return!!x}),r=l.levels.map(function(x){return x.videoCodec}).filter(function(x){return!!x});this._attemptKeySystemAccess(S.KeySystems.WIDEVINE,a,r)},t(n,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),n}();v.default=o},"./src/controller/fps-controller.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/events.ts"),g=C("./src/utils/logger.ts"),m=function(){function S(t){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=t,this.registerListeners()}var _=S.prototype;return _.setStreamController=function(d){this.streamController=d},_.registerListeners=function(){this.hls.on(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},_.unregisterListeners=function(){this.hls.off(N.Events.MEDIA_ATTACHING,this.onMediaAttaching)},_.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},_.onMediaAttaching=function(d,i){var c=this.hls.config;if(c.capLevelOnFPSDrop){var o=i.media instanceof self.HTMLVideoElement?i.media:null;this.media=o,o&&typeof o.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),c.fpsDroppedMonitoringPeriod)}},_.checkFPS=function(d,i,c){var o=performance.now();if(i){if(this.lastTime){var n=o-this.lastTime,s=c-this.lastDroppedFrames,h=i-this.lastDecodedFrames,f=1e3*s/n,l=this.hls;if(l.trigger(N.Events.FPS_DROP,{currentDropped:s,currentDecoded:h,totalDroppedFrames:c}),f>0&&s>l.config.fpsDroppedMonitoringThreshold*h){var a=l.currentLevel;g.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+a),a>0&&(l.autoLevelCapping===-1||l.autoLevelCapping>=a)&&(a=a-1,l.trigger(N.Events.FPS_DROP_LEVEL_CAPPING,{level:a,droppedLevel:l.currentLevel}),l.autoLevelCapping=a,this.streamController.nextLevelSwitch())}}this.lastTime=o,this.lastDroppedFrames=c,this.lastDecodedFrames=i}},_.checkFPSInterval=function(){var d=this.media;if(d)if(this.isVideoPlaybackQualityAvailable){var i=d.getVideoPlaybackQuality();this.checkFPS(d,i.totalVideoFrames,i.droppedVideoFrames)}else this.checkFPS(d,d.webkitDecodedFrameCount,d.webkitDroppedFrameCount)},S}();v.default=m},"./src/controller/fragment-finders.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"findFragmentByPDT",function(){return m}),C.d(v,"findFragmentByPTS",function(){return S}),C.d(v,"fragmentWithinToleranceTest",function(){return _}),C.d(v,"pdtWithinToleranceTest",function(){return t}),C.d(v,"findFragWithCC",function(){return d});var N=C("./src/polyfills/number.ts"),g=C("./src/utils/binary-search.ts");function m(i,c,o){if(c===null||!Array.isArray(i)||!i.length||!Object(N.isFiniteNumber)(c))return null;var n=i[0].programDateTime;if(c<(n||0))return null;var s=i[i.length-1].endProgramDateTime;if(c>=(s||0))return null;o=o||0;for(var h=0;h<i.length;++h){var f=i[h];if(t(c,o,f))return f}return null}function S(i,c,o,n){o===void 0&&(o=0),n===void 0&&(n=0);var s=null;if(i?s=c[i.sn-c[0].sn+1]||null:o===0&&c[0].start===0&&(s=c[0]),s&&_(o,n,s)===0)return s;var h=g.default.search(c,_.bind(null,o,n));return h||s}function _(i,c,o){i===void 0&&(i=0),c===void 0&&(c=0);var n=Math.min(c,o.duration+(o.deltaPTS?o.deltaPTS:0));return o.start+o.duration-n<=i?1:o.start-n>i&&o.start?-1:0}function t(i,c,o){var n=Math.min(c,o.duration+(o.deltaPTS?o.deltaPTS:0))*1e3,s=o.endProgramDateTime||0;return s-n>i}function d(i,c){return g.default.search(i,function(o){return o.cc<c?1:o.cc>c?-1:0})}},"./src/controller/fragment-tracker.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"FragmentState",function(){return m}),C.d(v,"FragmentTracker",function(){return S});var N=C("./src/events.ts"),g=C("./src/types/loader.ts"),m;(function(d){d.NOT_LOADED="NOT_LOADED",d.BACKTRACKED="BACKTRACKED",d.APPENDING="APPENDING",d.PARTIAL="PARTIAL",d.OK="OK"})(m||(m={}));var S=function(){function d(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 i=d.prototype;return i._registerListeners=function(){var o=this.hls;o.on(N.Events.BUFFER_APPENDED,this.onBufferAppended,this),o.on(N.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.on(N.Events.FRAG_LOADED,this.onFragLoaded,this)},i._unregisterListeners=function(){var o=this.hls;o.off(N.Events.BUFFER_APPENDED,this.onBufferAppended,this),o.off(N.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.off(N.Events.FRAG_LOADED,this.onFragLoaded,this)},i.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},i.getAppendedFrag=function(o,n){if(n===g.PlaylistLevelType.MAIN){var s=this.activeFragment,h=this.activeParts;if(!s)return null;if(h)for(var f=h.length;f--;){var l=h[f],a=l?l.end:s.appendedPTS;if(l.start<=o&&a!==void 0&&o<=a)return f>9&&(this.activeParts=h.slice(f-9)),l}else if(s.start<=o&&s.appendedPTS!==void 0&&o<=s.appendedPTS)return s}return this.getBufferedFrag(o,n)},i.getBufferedFrag=function(o,n){for(var s=this.fragments,h=Object.keys(s),f=h.length;f--;){var l=s[h[f]];if((l==null?void 0:l.body.type)===n&&l.buffered){var a=l.body;if(a.start<=o&&o<=a.end)return a}}return null},i.detectEvictedFragments=function(o,n,s){var h=this;Object.keys(this.fragments).forEach(function(f){var l=h.fragments[f];if(!l)return;if(!l.buffered){l.body.type===s&&h.removeFragment(l.body);return}var a=l.range[o];if(!a)return;a.time.some(function(r){var x=!h.isTimeBuffered(r.startPTS,r.endPTS,n);return x&&h.removeFragment(l.body),x})})},i.detectPartialFragments=function(o){var n=this,s=this.timeRanges,h=o.frag,f=o.part;if(!s||h.sn==="initSegment")return;var l=t(h),a=this.fragments[l];if(!a)return;Object.keys(s).forEach(function(r){var x=h.elementaryStreams[r];if(!x)return;var y=s[r],p=f!==null||x.partial===!0;a.range[r]=n.getBufferedTimes(h,f,p,y)}),a.backtrack=a.loaded=null,Object.keys(a.range).length?a.buffered=!0:this.removeFragment(a.body)},i.fragBuffered=function(o){var n=t(o),s=this.fragments[n];s&&(s.backtrack=s.loaded=null,s.buffered=!0)},i.getBufferedTimes=function(o,n,s,h){for(var f={time:[],partial:s},l=n?n.start:o.start,a=n?n.end:o.end,r=o.minEndPTS||a,x=o.maxStartPTS||l,y=0;y<h.length;y++){var p=h.start(y)-this.bufferPadding,R=h.end(y)+this.bufferPadding;if(x>=p&&r<=R){f.time.push({startPTS:Math.max(l,h.start(y)),endPTS:Math.min(a,h.end(y))});break}else if(l<R&&a>p)f.partial=!0,f.time.push({startPTS:Math.max(l,h.start(y)),endPTS:Math.min(a,h.end(y))});else if(a<=p)break}return f},i.getPartialFragment=function(o){var n=null,s,h,f,l=0,a=this.bufferPadding,r=this.fragments;return Object.keys(r).forEach(function(x){var y=r[x];if(!y)return;_(y)&&(h=y.body.start-a,f=y.body.end+a,o>=h&&o<=f&&(s=Math.min(o-h,f-o),l<=s&&(n=y.body,l=s)))}),n},i.getState=function(o){var n=t(o),s=this.fragments[n];return s?s.buffered?_(s)?m.PARTIAL:m.OK:s.backtrack?m.BACKTRACKED:m.APPENDING:m.NOT_LOADED},i.backtrack=function(o,n){var s=t(o),h=this.fragments[s];if(!h||h.backtrack)return null;var f=h.backtrack=n||h.loaded;return h.loaded=null,f},i.getBacktrackData=function(o){var n=t(o),s=this.fragments[n];if(s){var h,f=s.backtrack;if(f!=null&&(h=f.payload)!==null&&h!==void 0&&h.byteLength)return f;this.removeFragment(o)}return null},i.isTimeBuffered=function(o,n,s){for(var h,f,l=0;l<s.length;l++){if(h=s.start(l)-this.bufferPadding,f=s.end(l)+this.bufferPadding,o>=h&&n<=f)return!0;if(n<=h)return!1}return!1},i.onFragLoaded=function(o,n){var s=n.frag,h=n.part;if(s.sn==="initSegment"||s.bitrateTest||h)return;var f=t(s);this.fragments[f]={body:s,loaded:n,backtrack:null,buffered:!1,range:Object.create(null)}},i.onBufferAppended=function(o,n){var s=this,h=n.frag,f=n.part,l=n.timeRanges;if(h.type===g.PlaylistLevelType.MAIN)if(this.activeFragment=h,f){var a=this.activeParts;a||(this.activeParts=a=[]),a.push(f)}else this.activeParts=null;this.timeRanges=l,Object.keys(l).forEach(function(r){var x=l[r];if(s.detectEvictedFragments(r,x),!f)for(var y=0;y<x.length;y++)h.appendedPTS=Math.max(x.end(y),h.appendedPTS||0)})},i.onFragBuffered=function(o,n){this.detectPartialFragments(n)},i.hasFragment=function(o){var n=t(o);return!!this.fragments[n]},i.removeFragmentsInRange=function(o,n,s){var h=this;Object.keys(this.fragments).forEach(function(f){var l=h.fragments[f];if(!l)return;if(l.buffered){var a=l.body;a.type===s&&a.start<n&&a.end>o&&h.removeFragment(a)}})},i.removeFragment=function(o){var n=t(o);o.stats.loaded=0,o.clearElementaryStreamInfo(),delete this.fragments[n]},i.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},d}();function _(d){var i,c;return d.buffered&&(((i=d.range.video)===null||i===void 0?void 0:i.partial)||((c=d.range.audio)===null||c===void 0?void 0:c.partial))}function t(d){return d.type+"_"+d.level+"_"+d.urlId+"_"+d.sn}},"./src/controller/gap-controller.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"STALL_MINIMUM_DURATION_MS",function(){return _}),C.d(v,"MAX_START_GAP_JUMP",function(){return t}),C.d(v,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return d}),C.d(v,"SKIP_BUFFER_RANGE_START",function(){return i}),C.d(v,"default",function(){return c});var N=C("./src/utils/buffer-helper.ts"),g=C("./src/errors.ts"),m=C("./src/events.ts"),S=C("./src/utils/logger.ts"),_=250,t=2,d=.1,i=.05,c=function(){function o(s,h,f,l){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=s,this.media=h,this.fragmentTracker=f,this.hls=l}var n=o.prototype;return n.destroy=function(){this.hls=this.fragmentTracker=this.media=null},n.poll=function(h){var f=this.config,l=this.media,a=this.stalled,r=l.currentTime,x=l.seeking,y=this.seeking&&!x,p=!this.seeking&&x;if(this.seeking=x,r!==h){if(this.moved=!0,a!==null){if(this.stallReported){var R=self.performance.now()-a;S.logger.warn("playback not stuck anymore @"+r+", after "+Math.round(R)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((p||y)&&(this.stalled=null),l.paused||l.ended||l.playbackRate===0||!N.BufferHelper.getBuffered(l).length)return;var O=N.BufferHelper.bufferInfo(l,r,0),b=O.len>0,E=O.nextStart||0;if(!b&&!E)return;if(x){var w=O.len>t,T=!E||E-r>t&&!this.fragmentTracker.getPartialFragment(r);if(w||T)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var F,M=Math.max(E,O.start||0)-r,L=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,Y=L==null||((F=L.details)===null||F===void 0)?void 0:F.live,K=Y?L.details.targetduration*2:t;if(M>0&&M<=K){this._trySkipBufferHole(null);return}}var A=self.performance.now();if(a===null){this.stalled=A;return}var H=A-a;!x&&H>=_&&this._reportStall(O.len);var U=N.BufferHelper.bufferInfo(l,r,f.maxBufferHole);this._tryFixBufferStall(U,H)},n._tryFixBufferStall=function(h,f){var l=this.config,a=this.fragmentTracker,r=this.media,x=r.currentTime,y=a.getPartialFragment(x);if(y){var p=this._trySkipBufferHole(y);if(p)return}h.len>l.maxBufferHole&&f>l.highBufferWatchdogPeriod*1e3&&(S.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},n._reportStall=function(h){var f=this.hls,l=this.media,a=this.stallReported;a||(this.stallReported=!0,S.logger.warn("Playback stalling at @"+l.currentTime+" due to low buffer (buffer="+h+")"),f.trigger(m.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:h}))},n._trySkipBufferHole=function(h){for(var f=this.config,l=this.hls,a=this.media,r=a.currentTime,x=0,y=N.BufferHelper.getBuffered(a),p=0;p<y.length;p++){var R=y.start(p);if(r+f.maxBufferHole>=x&&r<R){var O=Math.max(R+i,a.currentTime+d);return S.logger.warn("skipping hole, adjusting currentTime from "+r+" to "+O),this.moved=!0,this.stalled=null,a.currentTime=O,h&&l.trigger(m.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+r+" to "+O,frag:h}),O}x=y.end(p)}return 0},n._tryNudgeBuffer=function(){var h=this.config,f=this.hls,l=this.media,a=l.currentTime,r=(this.nudgeRetry||0)+1;if(this.nudgeRetry=r,r<h.nudgeMaxRetry){var x=a+r*h.nudgeOffset;S.logger.warn("Nudging 'currentTime' from "+a+" to "+x),l.currentTime=x,f.trigger(m.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else S.logger.error("Playhead still not moving while enough data buffered @"+a+" after "+h.nudgeMaxRetry+" nudges"),f.trigger(m.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},o}()},"./src/controller/id3-track-controller.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/events.ts"),g=C("./src/utils/texttrack-utils.ts"),m=C("./src/demux/id3.ts"),S=.25,_=function(){function t(i){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=i,this._registerListeners()}var d=t.prototype;return d.destroy=function(){this._unregisterListeners()},d._registerListeners=function(){var c=this.hls;c.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(N.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),c.on(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},d._unregisterListeners=function(){var c=this.hls;c.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(N.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),c.off(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},d.onMediaAttached=function(c,o){this.media=o.media},d.onMediaDetaching=function(){if(!this.id3Track)return;Object(g.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},d.getID3Track=function(c){if(!this.media)return;for(var o=0;o<c.length;o++){var n=c[o];if(n.kind==="metadata"&&n.label==="id3")return Object(g.sendAddTrackEvent)(n,this.media),n}return this.media.addTextTrack("metadata","id3")},d.onFragParsingMetadata=function(c,o){if(!this.media)return;var n=o.frag,s=o.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var h=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,f=0;f<s.length;f++){var l=m.getID3Frames(s[f].data);if(l){var a=s[f].pts,r=f<s.length-1?s[f+1].pts:n.end,x=r-a;x<=0&&(r=a+S);for(var y=0;y<l.length;y++){var p=l[y];if(!m.isTimeStampFrame(p)){var R=new h(a,r,"");R.value=p,this.id3Track.addCue(R)}}}}},d.onBufferFlushing=function(c,o){var n=o.startOffset,s=o.endOffset,h=o.type;if(!h||h==="audio"){var f=this.id3Track;f&&Object(g.removeCuesInRange)(f,n,s)}},t}();v.default=_},"./src/controller/latency-controller.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return t});var N=C("./src/errors.ts"),g=C("./src/events.ts"),m=C("./src/utils/logger.ts");function S(d,i){for(var c=0;c<i.length;c++){var o=i[c];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(d,o.key,o)}}function _(d,i,c){return i&&S(d.prototype,i),c&&S(d,c),d}var t=function(){function d(c){var o=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 o.timeupdate()},this.hls=c,this.config=c.config,this.registerListeners()}var i=d.prototype;return i.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},i.registerListeners=function(){this.hls.on(g.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(g.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(g.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(g.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){this.hls.off(g.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(g.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(g.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(g.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(g.Events.ERROR,this.onError)},i.onMediaAttached=function(o,n){this.media=n.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},i.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},i.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},i.onLevelUpdated=function(o,n){var s=n.details;this.levelDetails=s,s.advanced&&this.timeupdate(),!s.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},i.onError=function(o,n){if(n.details!==N.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,m.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},i.timeupdate=function(){var o=this.media,n=this.levelDetails;if(!o||!n)return;this.currentTime=o.currentTime;var s=this.computeLatency();if(s===null)return;this._latency=s;var h=this.config,f=h.lowLatencyMode,l=h.maxLiveSyncPlaybackRate;if(!f||l===1)return;var a=this.targetLatency;if(a===null)return;var r=s-a,x=Math.min(this.maxLatency,a+n.targetduration),y=r<x;if(n.live&&y&&r>.05&&this.forwardBufferLength>1){var p=Math.min(2,Math.max(1,l)),R=Math.round(2/(1+Math.exp(-.75*r-this.edgeStalled))*20)/20;o.playbackRate=Math.min(p,Math.max(1,R))}else o.playbackRate!==1&&o.playbackRate!==0&&(o.playbackRate=1)},i.estimateLiveEdge=function(){var o=this.levelDetails;return o===null?null:o.edge+o.age},i.computeLatency=function(){var o=this.estimateLiveEdge();return o===null?null:o-this.currentTime},_(d,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var o=this.config,n=this.levelDetails;return o.liveMaxLatencyDuration!==void 0?o.liveMaxLatencyDuration:n?o.liveMaxLatencyDurationCount*n.targetduration:0}},{key:"targetLatency",get:function(){var o=this.levelDetails;if(o===null)return null;var n=o.holdBack,s=o.partHoldBack,h=o.targetduration,f=this.config,l=f.liveSyncDuration,a=f.liveSyncDurationCount,r=f.lowLatencyMode,x=this.hls.userConfig,y=r&&s||n;(x.liveSyncDuration||x.liveSyncDurationCount||y===0)&&(y=l!==void 0?l:a*h);var p=h,R=1;return y+Math.min(this.stallCount*R,p)}},{key:"liveSyncPosition",get:function(){var o=this.estimateLiveEdge(),n=this.targetLatency,s=this.levelDetails;if(o===null||n===null||s===null)return null;var h=s.edge,f=o-n-this.edgeStalled,l=h-s.totalduration,a=h-(this.config.lowLatencyMode&&s.partTarget||s.targetduration);return Math.min(Math.max(l,f),a)}},{key:"drift",get:function(){var o=this.levelDetails;return o===null?1:o.drift}},{key:"edgeStalled",get:function(){var o=this.levelDetails;if(o===null)return 0;var n=(this.config.lowLatencyMode&&o.partTarget||o.targetduration)*3;return Math.max(o.age-n,0)}},{key:"forwardBufferLength",get:function(){var o=this.media,n=this.levelDetails;if(!o||!n)return 0;var s=o.buffered.length;return s?o.buffered.end(s-1):n.edge-this.currentTime}}]),d}()},"./src/controller/level-controller.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return f});var N=C("./src/types/level.ts"),g=C("./src/events.ts"),m=C("./src/errors.ts"),S=C("./src/utils/codecs.ts"),_=C("./src/controller/level-helper.ts"),t=C("./src/controller/base-playlist-controller.ts"),d=C("./src/types/loader.ts");function i(){return i=Object.assign||function(l){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var x in r)Object.prototype.hasOwnProperty.call(r,x)&&(l[x]=r[x])}return l},i.apply(this,arguments)}function c(l,a){for(var r=0;r<a.length;r++){var x=a[r];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(l,x.key,x)}}function o(l,a,r){return a&&c(l.prototype,a),r&&c(l,r),l}function n(l,a){l.prototype=Object.create(a.prototype),l.prototype.constructor=l,s(l,a)}function s(l,a){return s=Object.setPrototypeOf||function(x,y){return x.__proto__=y,x},s(l,a)}var h=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),f=function(l){n(a,l);function a(x){var y;return y=l.call(this,x,"[level-controller]")||this,y._levels=[],y._firstLevel=-1,y._startLevel=void 0,y.currentLevelIndex=-1,y.manualLevelIndex=-1,y.onParsedComplete=void 0,y._registerListeners(),y}var r=a.prototype;return r._registerListeners=function(){var y=this.hls;y.on(g.Events.MANIFEST_LOADED,this.onManifestLoaded,this),y.on(g.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(g.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.on(g.Events.FRAG_LOADED,this.onFragLoaded,this),y.on(g.Events.ERROR,this.onError,this)},r._unregisterListeners=function(){var y=this.hls;y.off(g.Events.MANIFEST_LOADED,this.onManifestLoaded,this),y.off(g.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(g.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.off(g.Events.FRAG_LOADED,this.onFragLoaded,this),y.off(g.Events.ERROR,this.onError,this)},r.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,l.prototype.destroy.call(this)},r.startLoad=function(){var y=this._levels;y.forEach(function(p){p.loadError=0}),l.prototype.startLoad.call(this)},r.onManifestLoaded=function(y,p){var R=[],O=[],b=[],E,w={},T,F=!1,M=!1,L=!1;if(p.levels.forEach(function(H){var U=H.attrs;F=F||!!(H.width&&H.height),M=M||!!H.videoCodec,L=L||!!H.audioCodec,h&&H.audioCodec&&H.audioCodec.indexOf("mp4a.40.34")!==-1&&(H.audioCodec=void 0);var I=H.bitrate+"-"+H.attrs.RESOLUTION+"-"+H.attrs.CODECS;T=w[I],T?T.url.push(H.url):(T=new N.Level(H),w[I]=T,R.push(T)),U&&(U.AUDIO&&Object(_.addGroupId)(T,"audio",U.AUDIO),U.SUBTITLES&&Object(_.addGroupId)(T,"text",U.SUBTITLES))}),(F||M)&&L&&(R=R.filter(function(H){var U=H.videoCodec,I=H.width,G=H.height;return!!U||!!(I&&G)})),R=R.filter(function(H){var U=H.audioCodec,I=H.videoCodec;return(!U||Object(S.isCodecSupportedInMp4)(U,"audio"))&&(!I||Object(S.isCodecSupportedInMp4)(I,"video"))}),p.audioTracks&&(O=p.audioTracks.filter(function(H){return!H.audioCodec||Object(S.isCodecSupportedInMp4)(H.audioCodec,"audio")}),Object(_.assignTrackIdsByGroup)(O)),p.subtitles&&(b=p.subtitles,Object(_.assignTrackIdsByGroup)(b)),R.length>0){E=R[0].bitrate,R.sort(function(H,U){return H.bitrate-U.bitrate}),this._levels=R;for(var Y=0;Y<R.length;Y++)if(R[Y].bitrate===E){this._firstLevel=Y,this.log("manifest loaded, "+R.length+" level(s) found, first bitrate: "+E);break}var K=L&&!M,A={levels:R,audioTracks:O,subtitleTracks:b,firstLevel:this._firstLevel,stats:p.stats,audio:L,video:M,altAudio:!K&&O.some(function(H){return!!H.url})};this.hls.trigger(g.Events.MANIFEST_PARSED,A),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(g.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:p.url,reason:"no level with compatible codecs found in manifest"})},r.onError=function(y,p){if(l.prototype.onError.call(this,y,p),p.fatal)return;var R=p.context,O=this._levels[this.currentLevelIndex];if(R&&(R.type===d.PlaylistContextType.AUDIO_TRACK&&O.audioGroupIds&&R.groupId===O.audioGroupIds[O.urlId]||R.type===d.PlaylistContextType.SUBTITLE_TRACK&&O.textGroupIds&&R.groupId===O.textGroupIds[O.urlId])){this.redundantFailover(this.currentLevelIndex);return}var b=!1,E=!0,w;switch(p.details){case m.ErrorDetails.FRAG_LOAD_ERROR:case m.ErrorDetails.FRAG_LOAD_TIMEOUT:case m.ErrorDetails.KEY_LOAD_ERROR:case m.ErrorDetails.KEY_LOAD_TIMEOUT:if(p.frag){var T=this._levels[p.frag.level];T?(T.fragmentError++,T.fragmentError>this.hls.config.fragLoadingMaxRetry&&(w=p.frag.level)):w=p.frag.level}break;case m.ErrorDetails.LEVEL_LOAD_ERROR:case m.ErrorDetails.LEVEL_LOAD_TIMEOUT:R&&(R.deliveryDirectives&&(E=!1),w=R.level),b=!0;break;case m.ErrorDetails.REMUX_ALLOC_ERROR:w=p.level,b=!0;break}w!==void 0&&this.recoverLevel(p,w,b,E)},r.recoverLevel=function(y,p,R,O){var b=y.details,E=this._levels[p];if(E.loadError++,R){var w=this.retryLoadingOrFail(y);if(w)y.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var T=E.url.length;if(T>1&&E.loadError<T)y.levelRetry=!0,this.redundantFailover(p);else if(this.manualLevelIndex===-1){var F=p===0?this._levels.length-1:p-1;this.currentLevelIndex!==F&&this._levels[F].loadError===0&&(this.warn(b+": switch to "+F),y.levelRetry=!0,this.hls.nextAutoLevel=F)}}},r.redundantFailover=function(y){var p=this._levels[y],R=p.url.length;if(R>1){var O=(p.urlId+1)%R;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(b){b.urlId=O}),this.level=y}},r.onFragLoaded=function(y,p){var R=p.frag;if(R!==void 0&&R.type===d.PlaylistLevelType.MAIN){var O=this._levels[R.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},r.onLevelLoaded=function(y,p){var R,O=p.level,b=p.details,E=this._levels[O];if(!E){var w;this.warn("Invalid level index "+O),(w=p.deliveryDirectives)!==null&&w!==void 0&&w.skip&&(b.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(E.fragmentError===0&&(E.loadError=0,this.retryCount=0),this.playlistLoaded(O,p,E.details)):(R=p.deliveryDirectives)!==null&&R!==void 0&&R.skip&&(b.deltaUpdateFailed=!0)},r.onAudioTrackSwitched=function(y,p){var R=this.hls.levels[this.currentLevelIndex];if(!R)return;if(R.audioGroupIds){for(var O=-1,b=this.hls.audioTracks[p.id].groupId,E=0;E<R.audioGroupIds.length;E++)if(R.audioGroupIds[E]===b){O=E;break}O!==R.urlId&&(R.urlId=O,this.startLoad())}},r.loadPlaylist=function(y){var p=this.currentLevelIndex,R=this._levels[p];if(this.canLoad&&R&&R.url.length>0){var O=R.urlId,b=R.url[O];if(y)try{b=y.addDirectives(b)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("Attempt loading level index "+p+(y?" at sn "+y.msn+" part "+y.part:"")+" with URL-id "+O+" "+b),this.clearTimer(),this.hls.trigger(g.Events.LEVEL_LOADING,{url:b,level:p,id:O,deliveryDirectives:y||null})}},r.removeLevel=function(y,p){var R=function(E,w){return w!==p},O=this._levels.filter(function(b,E){return E!==y?!0:b.url.length>1&&p!==void 0?(b.url=b.url.filter(R),b.audioGroupIds&&(b.audioGroupIds=b.audioGroupIds.filter(R)),b.textGroupIds&&(b.textGroupIds=b.textGroupIds.filter(R)),b.urlId=0,!0):!1}).map(function(b,E){var w=b.details;return w!=null&&w.fragments&&w.fragments.forEach(function(T){T.level=E}),b});this._levels=O,this.hls.trigger(g.Events.LEVELS_UPDATED,{levels:O})},o(a,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(y){var p,R=this._levels;if(R.length===0)return;if(this.currentLevelIndex===y&&(p=R[y])!==null&&p!==void 0&&p.details)return;if(y<0||y>=R.length){var O=y<0;if(this.hls.trigger(g.Events.ERROR,{type:m.ErrorTypes.OTHER_ERROR,details:m.ErrorDetails.LEVEL_SWITCH_ERROR,level:y,fatal:O,reason:"invalid level idx"}),O)return;y=Math.min(y,R.length-1)}this.clearTimer();var b=this.currentLevelIndex,E=R[b],w=R[y];this.log("switching to level "+y+" from "+b),this.currentLevelIndex=y;var T=i({},w,{level:y,maxBitrate:w.maxBitrate,uri:w.uri,urlId:w.urlId});delete T._urlId,this.hls.trigger(g.Events.LEVEL_SWITCHING,T);var F=w.details;if(!F||F.live){var M=this.switchParams(w.uri,E==null?void 0:E.details);this.loadPlaylist(M)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(y){this.manualLevelIndex=y,this._startLevel===void 0&&(this._startLevel=y),y!==-1&&(this.level=y)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(y){this._firstLevel=y}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var y=this.hls.config.startLevel;return y!==void 0?y:this._firstLevel}else return this._startLevel},set:function(y){this._startLevel=y}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(y){this.level=y,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=y)}}]),a}(t.default)},"./src/controller/level-helper.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"addGroupId",function(){return m}),C.d(v,"assignTrackIdsByGroup",function(){return S}),C.d(v,"updatePTS",function(){return _}),C.d(v,"updateFragPTSDTS",function(){return d}),C.d(v,"mergeDetails",function(){return i}),C.d(v,"mapPartIntersection",function(){return c}),C.d(v,"mapFragmentIntersection",function(){return o}),C.d(v,"adjustSliding",function(){return n}),C.d(v,"addSliding",function(){return s}),C.d(v,"computeReloadInterval",function(){return h}),C.d(v,"getFragmentWithSN",function(){return f}),C.d(v,"getPartWith",function(){return l});var N=C("./src/polyfills/number.ts"),g=C("./src/utils/logger.ts");function m(a,r,x){switch(r){case"audio":a.audioGroupIds||(a.audioGroupIds=[]),a.audioGroupIds.push(x);break;case"text":a.textGroupIds||(a.textGroupIds=[]),a.textGroupIds.push(x);break}}function S(a){var r={};a.forEach(function(x){var y=x.groupId||"";x.id=r[y]=r[y]||0,r[y]++})}function _(a,r,x){var y=a[r],p=a[x];t(y,p)}function t(a,r){var x=r.startPTS;if(Object(N.isFiniteNumber)(x)){var y=0,p;r.sn>a.sn?(y=x-a.start,p=a):(y=a.start-x,p=r),p.duration!==y&&(p.duration=y)}else if(r.sn>a.sn){var R=a.cc===r.cc;R&&a.minEndPTS?r.start=a.start+(a.minEndPTS-a.start):r.start=a.start+a.duration}else r.start=Math.max(a.start-r.duration,0)}function d(a,r,x,y,p,R){var O=y-x;O<=0&&(g.logger.warn("Fragment should have a positive duration",r),y=x+r.duration,R=p+r.duration);var b=x,E=y,w=r.startPTS,T=r.endPTS;if(Object(N.isFiniteNumber)(w)){var F=Math.abs(w-x);Object(N.isFiniteNumber)(r.deltaPTS)?r.deltaPTS=Math.max(F,r.deltaPTS):r.deltaPTS=F,b=Math.max(x,w),x=Math.min(x,w),p=Math.min(p,r.startDTS),E=Math.min(y,T),y=Math.max(y,T),R=Math.max(R,r.endDTS)}r.duration=y-x;var M=x-r.start;r.appendedPTS=y,r.start=r.startPTS=x,r.maxStartPTS=b,r.startDTS=p,r.endPTS=y,r.minEndPTS=E,r.endDTS=R;var L=r.sn;if(!a||L<a.startSN||L>a.endSN)return 0;var Y,K=L-a.startSN,A=a.fragments;for(A[K]=r,Y=K;Y>0;Y--)t(A[Y],A[Y-1]);for(Y=K;Y<A.length-1;Y++)t(A[Y],A[Y+1]);return a.fragmentHint&&t(A[A.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,M}function i(a,r){for(var x=null,y=a.fragments,p=y.length-1;p>=0;p--){var R=y[p].initSegment;if(R){x=R;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;var O=0,b;if(o(a,r,function(Y,K){Y.relurl&&(O=Y.cc-K.cc),Object(N.isFiniteNumber)(Y.startPTS)&&Object(N.isFiniteNumber)(Y.endPTS)&&(K.start=K.startPTS=Y.startPTS,K.startDTS=Y.startDTS,K.appendedPTS=Y.appendedPTS,K.maxStartPTS=Y.maxStartPTS,K.endPTS=Y.endPTS,K.endDTS=Y.endDTS,K.minEndPTS=Y.minEndPTS,K.duration=Y.endPTS-Y.startPTS,K.duration&&(b=K),r.PTSKnown=r.alignedSliding=!0),K.elementaryStreams=Y.elementaryStreams,K.loader=Y.loader,K.stats=Y.stats,K.urlId=Y.urlId,Y.initSegment&&(K.initSegment=Y.initSegment,x=Y.initSegment)}),x){var E=r.fragmentHint?r.fragments.concat(r.fragmentHint):r.fragments;E.forEach(function(Y){var K;(!Y.initSegment||Y.initSegment.relurl===((K=x)===null||K===void 0?void 0:K.relurl))&&(Y.initSegment=x)})}if(r.skippedSegments&&(r.deltaUpdateFailed=r.fragments.some(function(Y){return!Y}),r.deltaUpdateFailed)){g.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var w=r.skippedSegments;w--;)r.fragments.shift();r.startSN=r.fragments[0].sn,r.startCC=r.fragments[0].cc}var T=r.fragments;if(O){g.logger.warn("discontinuity sliding from playlist, take drift into account");for(var F=0;F<T.length;F++)T[F].cc+=O}r.skippedSegments&&(r.startCC=r.fragments[0].cc),c(a.partList,r.partList,function(Y,K){K.elementaryStreams=Y.elementaryStreams,K.stats=Y.stats}),b?d(r,b,b.startPTS,b.endPTS,b.startDTS,b.endDTS):n(a,r),T.length&&(r.totalduration=r.edge-T[0].start),r.driftStartTime=a.driftStartTime,r.driftStart=a.driftStart;var M=r.advancedDateTime;if(r.advanced&&M){var L=r.edge;r.driftStart||(r.driftStartTime=M,r.driftStart=L),r.driftEndTime=M,r.driftEnd=L}else r.driftEndTime=a.driftEndTime,r.driftEnd=a.driftEnd,r.advancedDateTime=a.advancedDateTime}function c(a,r,x){if(a&&r)for(var y=0,p=0,R=a.length;p<=R;p++){var O=a[p],b=r[p+y];O&&b&&O.index===b.index&&O.fragment.sn===b.fragment.sn?x(O,b):y--}}function o(a,r,x){for(var y=r.skippedSegments,p=Math.max(a.startSN,r.startSN)-r.startSN,R=(a.fragmentHint?1:0)+(y?r.endSN:Math.min(a.endSN,r.endSN))-r.startSN,O=r.startSN-a.startSN,b=r.fragmentHint?r.fragments.concat(r.fragmentHint):r.fragments,E=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments,w=p;w<=R;w++){var T=E[O+w],F=b[w];y&&!F&&w<y&&(F=r.fragments[w]=T),T&&F&&x(T,F)}}function n(a,r){var x=r.startSN+r.skippedSegments-a.startSN,y=a.fragments;if(x<0||x>=y.length)return;s(r,y[x].start)}function s(a,r){if(r){for(var x=a.fragments,y=a.skippedSegments;y<x.length;y++)x[y].start+=r;a.fragmentHint&&(a.fragmentHint.start+=r)}}function h(a,r){var x=1e3*a.levelTargetDuration,y=x/2,p=a.age,R=p>0&&p<x*3,O=r.loading.end-r.loading.start,b,E=a.availabilityDelay;if(a.updated===!1)if(R){var w=333*a.misses;b=Math.max(Math.min(y,O*2),w),a.availabilityDelay=(a.availabilityDelay||0)+b}else b=y;else R?(E=Math.min(E||x/2,p),a.availabilityDelay=E,b=E+x-p):b=x-O;return Math.round(b)}function f(a,r,x){if(!a||!a.details)return null;var y=a.details,p=y.fragments[r-y.startSN];return p||(p=y.fragmentHint,p&&p.sn===r?p:r<y.startSN&&x&&x.sn===r?x:null)}function l(a,r,x){if(!a||!a.details)return null;var y=a.details.partList;if(y)for(var p=y.length;p--;){var R=y[p];if(R.index===x&&R.fragment.sn===r)return R}return null}},"./src/controller/stream-controller.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return y});var N=C("./src/polyfills/number.ts"),g=C("./src/controller/base-stream-controller.ts"),m=C("./src/is-supported.ts"),S=C("./src/events.ts"),_=C("./src/utils/buffer-helper.ts"),t=C("./src/controller/fragment-tracker.ts"),d=C("./src/types/loader.ts"),i=C("./src/loader/fragment.ts"),c=C("./src/demux/transmuxer-interface.ts"),o=C("./src/types/transmuxer.ts"),n=C("./src/controller/gap-controller.ts"),s=C("./src/errors.ts"),h=C("./src/utils/logger.ts");function f(p,R){for(var O=0;O<R.length;O++){var b=R[O];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}function l(p,R,O){return R&&f(p.prototype,R),O&&f(p,O),p}function a(p,R){p.prototype=Object.create(R.prototype),p.prototype.constructor=p,r(p,R)}function r(p,R){return r=Object.setPrototypeOf||function(b,E){return b.__proto__=E,b},r(p,R)}var x=100,y=function(p){a(R,p);function R(b,E){var w;return w=p.call(this,b,E,"[stream-controller]")||this,w.audioCodecSwap=!1,w.gapController=null,w.level=-1,w._forceStartLoad=!1,w.altAudio=!1,w.audioOnly=!1,w.fragPlaying=null,w.onvplaying=null,w.onvseeked=null,w.fragLastKbps=0,w.stalled=!1,w.couldBacktrack=!1,w.audioCodecSwitch=!1,w.videoBuffer=null,w._registerListeners(),w}var O=R.prototype;return O._registerListeners=function(){var E=this.hls;E.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.on(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.on(S.Events.LEVEL_LOADING,this.onLevelLoading,this),E.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),E.on(S.Events.ERROR,this.onError,this),E.on(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.on(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.on(S.Events.BUFFER_CREATED,this.onBufferCreated,this),E.on(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.on(S.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),E.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O._unregisterListeners=function(){var E=this.hls;E.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),E.off(S.Events.ERROR,this.onError,this),E.off(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.off(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.off(S.Events.BUFFER_CREATED,this.onBufferCreated,this),E.off(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.off(S.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),E.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},O.startLoad=function(E){if(this.levels){var w=this.lastCurrentTime,T=this.hls;if(this.stopLoad(),this.setInterval(x),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var F=T.startLevel;F===-1&&(T.config.testBandwidth?(F=0,this.bitrateTest=!0):F=T.nextAutoLevel),this.level=T.nextLoadLevel=F,this.loadedmetadata=!1}w>0&&E===-1&&(this.log("Override startPosition with lastCurrentTime @"+w.toFixed(3)),E=w),this.state=g.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()}else this._forceStartLoad=!0,this.state=g.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,p.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case g.State.IDLE:this.doTickIdle();break;case g.State.WAITING_LEVEL:{var E,w=this.levels,T=this.level,F=w==null||((E=w[T])===null||E===void 0)?void 0:E.details;if(F&&(!F.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(F))break;this.state=g.State.IDLE;break}break}case g.State.FRAG_LOADING_WAITING_RETRY:{var M,L=self.performance.now(),Y=this.retryDate;(!Y||L>=Y||(M=this.media)!==null&&M!==void 0&&M.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=g.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){p.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var E,w,T=this.hls,F=this.levelLastLoaded,M=this.levels,L=this.media,Y=T.config,K=T.nextLoadLevel;if(F===null||!L&&(this.startFragRequested||!Y.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!M||!M[K])return;var A=M[K];this.level=T.nextLoadLevel=K;var H=A.details;if(!H||this.state===g.State.WAITING_LEVEL||H.live&&this.levelLastLoaded!==K){this.state=g.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:L,d.PlaylistLevelType.MAIN);if(U===null)return;var I=U.len,G=this.getMaxBufferLength(A.maxBitrate);if(I>=G)return;if(this._streamEnded(U,H)){var ne={};this.altAudio&&(ne.type="video"),this.hls.trigger(S.Events.BUFFER_EOS,ne),this.state=g.State.ENDED;return}var oe=U.end,de=this.getNextFragment(oe,H);if(this.couldBacktrack&&!this.fragPrevious&&de&&de.sn!=="initSegment"){var Oe=de.sn-H.startSN;Oe>1&&(de=H.fragments[Oe-1],this.fragmentTracker.removeFragment(de))}if(de&&this.fragmentTracker.getState(de)===t.FragmentState.OK&&this.nextLoadPosition>oe){var Ae=this.audioOnly&&!this.altAudio?i.ElementaryStreamTypes.AUDIO:i.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(L,Ae,d.PlaylistLevelType.MAIN),de=this.getNextFragment(this.nextLoadPosition,H)}if(!de)return;de.initSegment&&!de.initSegment.data&&!this.bitrateTest&&(de=de.initSegment),((E=de.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((w=de.decryptdata)!==null&&w!==void 0&&w.key)?this.loadKey(de,H):this.loadFragment(de,H,oe)},O.loadFragment=function(E,w,T){var F,M=this.fragmentTracker.getState(E);if(this.fragCurrent=E,M===t.FragmentState.BACKTRACKED){var L=this.fragmentTracker.getBacktrackData(E);if(L){this._handleFragmentLoadProgress(L),this._handleFragmentLoadComplete(L);return}else M=t.FragmentState.NOT_LOADED}M===t.FragmentState.NOT_LOADED||M===t.FragmentState.PARTIAL?E.sn==="initSegment"?this._loadInitSegment(E):this.bitrateTest?(E.bitrateTest=!0,this.log("Fragment "+E.sn+" of level "+E.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(E)):(this.startFragRequested=!0,p.prototype.loadFragment.call(this,E,w,T)):M===t.FragmentState.APPENDING?this.reduceMaxBufferLength(E.duration)&&this.fragmentTracker.removeFragment(E):((F=this.media)===null||F===void 0?void 0:F.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(E){var w=this.fragmentTracker.getAppendedFrag(E,d.PlaylistLevelType.MAIN);return w&&"fragment"in w?w.fragment:w},O.getBufferedFrag=function(E){return this.fragmentTracker.getBufferedFrag(E,d.PlaylistLevelType.MAIN)},O.followingBufferedFrag=function(E){return E?this.getBufferedFrag(E.end+.5):null},O.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},O.nextLevelSwitch=function(){var E=this.levels,w=this.media;if(w!=null&&w.readyState){var T,F=this.getAppendedFrag(w.currentTime);if(F&&F.start>1&&this.flushMainBuffer(0,F.start-1),!w.paused&&E){var M=this.hls.nextLoadLevel,L=E[M],Y=this.fragLastKbps;Y&&this.fragCurrent?T=this.fragCurrent.duration*L.maxBitrate/(1e3*Y)+1:T=0}else T=0;var K=this.getBufferedFrag(w.currentTime+T);if(K){var A=this.followingBufferedFrag(K);if(A){this.abortCurrentFrag();var H=A.maxStartPTS?A.maxStartPTS:A.start,U=A.duration,I=Math.max(K.end,H+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(I,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var E=this.fragCurrent;this.fragCurrent=null,E!=null&&E.loader&&E.loader.abort(),this.state===g.State.KEY_LOADING&&(this.state=g.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(E,w){p.prototype.flushMainBuffer.call(this,E,w,this.altAudio?"video":null)},O.onMediaAttached=function(E,w){p.prototype.onMediaAttached.call(this,E,w);var T=w.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),T.addEventListener("playing",this.onvplaying),T.addEventListener("seeked",this.onvseeked),this.gapController=new n.default(this.config,T,this.fragmentTracker,this.hls)},O.onMediaDetaching=function(){var E=this.media;E&&(E.removeEventListener("playing",this.onvplaying),E.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),p.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var E=this.media,w=E?E.currentTime:null;Object(N.isFiniteNumber)(w)&&this.log("Media seeked to "+w.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(E,w){var T=!1,F=!1,M;w.levels.forEach(function(L){M=L.audioCodec,M&&(M.indexOf("mp4a.40.2")!==-1&&(T=!0),M.indexOf("mp4a.40.5")!==-1&&(F=!0))}),this.audioCodecSwitch=T&&F&&!Object(m.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=w.levels,this.startFragRequested=!1},O.onLevelLoading=function(E,w){var T=this.levels;if(!T||this.state!==g.State.IDLE)return;var F=T[w.level];(!F.details||F.details.live&&this.levelLastLoaded!==w.level||this.waitForCdnTuneIn(F.details))&&(this.state=g.State.WAITING_LEVEL)},O.onLevelLoaded=function(E,w){var T,F=this.levels,M=w.level,L=w.details,Y=L.totalduration;if(!F){this.warn("Levels were reset while loading level "+M);return}this.log("Level "+M+" loaded ["+L.startSN+","+L.endSN+"], cc ["+L.startCC+", "+L.endCC+"] duration:"+Y);var K=this.fragCurrent;K&&(this.state===g.State.FRAG_LOADING||this.state===g.State.FRAG_LOADING_WAITING_RETRY)&&(K.level!==w.level&&K.loader&&(this.state=g.State.IDLE,K.loader.abort()));var A=F[M],H=0;if(L.live||(T=A.details)!==null&&T!==void 0&&T.live){if(L.fragments[0]||(L.deltaUpdateFailed=!0),L.deltaUpdateFailed)return;H=this.alignPlaylists(L,A.details)}if(A.details=L,this.levelLastLoaded=M,this.hls.trigger(S.Events.LEVEL_UPDATED,{details:L,level:M}),this.state===g.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(L))return;this.state=g.State.IDLE}this.startFragRequested?L.live&&this.synchronizeToLiveEdge(L):this.setStartPosition(L,H),this.tick()},O._handleFragmentLoadProgress=function(E){var w,T=E.frag,F=E.part,M=E.payload,L=this.levels;if(!L){this.warn("Levels were reset while fragment load was in progress. Fragment "+T.sn+" of level "+T.level+" will not be buffered");return}var Y=L[T.level],K=Y.details;if(!K){this.warn("Dropping fragment "+T.sn+" of level "+T.level+" after level details were reset");return}var A=Y.videoCodec,H=K.PTSKnown||!K.live,U=(w=T.initSegment)===null||w===void 0?void 0:w.data,I=this._getAudioCodec(Y),G=this.transmuxer=this.transmuxer||new c.default(this.hls,d.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ne=F?F.index:-1,oe=ne!==-1,de=new o.ChunkMetadata(T.level,T.sn,T.stats.chunkCount,M.byteLength,ne,oe),Oe=this.initPTS[T.cc];G.push(M,U,I,A,T,F,K.totalduration,H,de,Oe)},O.onAudioTrackSwitching=function(E,w){var T=this.altAudio,F=!!w.url,M=w.id;if(!F){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var L=this.fragCurrent;L!=null&&L.loader&&(this.log("Switching to main audio track, cancel main fragment load"),L.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var Y=this.hls;T&&Y.trigger(S.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),Y.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:M})}},O.onAudioTrackSwitched=function(E,w){var T=w.id,F=!!this.hls.audioTracks[T].url;if(F){var M=this.videoBuffer;M&&this.mediaBuffer!==M&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=M)}this.altAudio=F,this.tick()},O.onBufferCreated=function(E,w){var T=w.tracks,F,M,L=!1;for(var Y in T){var K=T[Y];if(K.id==="main"){if(M=Y,F=K,Y==="video"){var A=T[Y];A&&(this.videoBuffer=A.buffer)}}else L=!0}L&&F?(this.log("Alternate track found, use "+M+".buffered to schedule main fragment loading"),this.mediaBuffer=F.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(E,w){var T=w.frag,F=w.part;if(T&&T.type!==d.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(T)){this.warn("Fragment "+T.sn+(F?" p: "+F.index:"")+" of level "+T.level+" finished buffering, but was aborted. state: "+this.state),this.state===g.State.PARSED&&(this.state=g.State.IDLE);return}var M=F?F.stats:T.stats;this.fragLastKbps=Math.round(8*M.total/(M.buffering.end-M.loading.first)),T.sn!=="initSegment"&&(this.fragPrevious=T),this.fragBufferedComplete(T,F)},O.onError=function(E,w){switch(w.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(d.PlaylistLevelType.MAIN,w);break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==g.State.ERROR&&(w.fatal?(this.warn(""+w.details),this.state=g.State.ERROR):!w.levelRetry&&this.state===g.State.WAITING_LEVEL&&(this.state=g.State.IDLE));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(w.parent==="main"&&(this.state===g.State.PARSING||this.state===g.State.PARSED)){var T=!0,F=this.getFwdBufferInfo(this.media,d.PlaylistLevelType.MAIN);F&&F.len>.5&&(T=!this.reduceMaxBufferLength(F.len)),T&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},O.checkBuffer=function(){var E=this.media,w=this.gapController;if(!E||!w||!E.readyState)return;var T=_.BufferHelper.getBuffered(E);!this.loadedmetadata&&T.length?(this.loadedmetadata=!0,this.seekToStartPos()):w.poll(this.lastCurrentTime),this.lastCurrentTime=E.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=g.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(E,w){var T=w.type;if(T!==i.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var F=(T===i.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(F,T,d.PlaylistLevelType.MAIN)}},O.onLevelsUpdated=function(E,w){this.levels=w.levels},O.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},O.seekToStartPos=function(){var E=this.media,w=E.currentTime,T=this.startPosition;if(T>=0&&w<T){if(E.seeking){h.logger.log("could not seek to "+T+", already seeking at "+w);return}var F=_.BufferHelper.getBuffered(E),M=F.length?F.start(0):0,L=M-T;L>0&&(L<this.config.maxBufferHole||L<this.config.maxFragLookUpTolerance)&&(h.logger.log("adjusting start position by "+L+" to match buffer start"),T+=L,this.startPosition=T),this.log("seek to target start position "+T+" from current time "+w),E.currentTime=T}},O._getAudioCodec=function(E){var w=this.config.defaultAudioCodec||E.audioCodec;return this.audioCodecSwap&&w&&(this.log("Swapping audio codec"),w.indexOf("mp4a.40.5")!==-1?w="mp4a.40.2":w="mp4a.40.5"),w},O._loadBitrateTestFrag=function(E){var w=this;this._doFragLoad(E).then(function(T){var F=w.hls;if(!T||F.nextLoadLevel||w.fragContextChanged(E))return;w.fragLoadError=0,w.state=g.State.IDLE,w.startFragRequested=!1,w.bitrateTest=!1;var M=E.stats;M.parsing.start=M.parsing.end=M.buffering.start=M.buffering.end=self.performance.now(),F.trigger(S.Events.FRAG_LOADED,T)})},O._handleTransmuxComplete=function(E){var w,T="main",F=this.hls,M=E.remuxResult,L=E.chunkMeta,Y=this.getCurrentContext(L);if(!Y){this.warn("The loading context changed while buffering fragment "+L.sn+" of level "+L.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(L.level);return}var K=Y.frag,A=Y.part,H=Y.level,U=M.video,I=M.text,G=M.id3,ne=M.initSegment,oe=this.altAudio?void 0:M.audio;if(this.fragContextChanged(K))return;if(this.state=g.State.PARSING,ne){ne.tracks&&(this._bufferInitSegment(H,ne.tracks,K,L),F.trigger(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:K,id:T,tracks:ne.tracks}));var de=ne.initPTS,Oe=ne.timescale;Object(N.isFiniteNumber)(de)&&(this.initPTS[K.cc]=de,F.trigger(S.Events.INIT_PTS_FOUND,{frag:K,id:T,initPTS:de,timescale:Oe}))}if(U&&M.independent!==!1){if(H.details){var Ae=U.startPTS,pe=U.endPTS,Se=U.startDTS,be=U.endDTS;if(A)A.elementaryStreams[U.type]={startPTS:Ae,endPTS:pe,startDTS:Se,endDTS:be};else if(U.firstKeyFrame&&U.independent&&(this.couldBacktrack=!0),U.dropped&&U.independent){var se=this.getLoadPosition()+this.config.maxBufferHole;if(se<Ae){this.backtrack(K);return}K.setElementaryStreamInfo(U.type,K.start,pe,K.start,be,!0)}K.setElementaryStreamInfo(U.type,Ae,pe,Se,be),this.bufferFragmentData(U,K,A,L)}}else if(M.independent===!1){this.backtrack(K);return}if(oe){var ee=oe.startPTS,B=oe.endPTS,V=oe.startDTS,X=oe.endDTS;A&&(A.elementaryStreams[i.ElementaryStreamTypes.AUDIO]={startPTS:ee,endPTS:B,startDTS:V,endDTS:X}),K.setElementaryStreamInfo(i.ElementaryStreamTypes.AUDIO,ee,B,V,X),this.bufferFragmentData(oe,K,A,L)}if(G!=null&&(w=G.samples)!==null&&w!==void 0&&w.length){var Q={frag:K,id:T,samples:G.samples};F.trigger(S.Events.FRAG_PARSING_METADATA,Q)}if(I){var Z={frag:K,id:T,samples:I.samples};F.trigger(S.Events.FRAG_PARSING_USERDATA,Z)}},O._bufferInitSegment=function(E,w,T,F){var M=this;if(this.state!==g.State.PARSING)return;this.audioOnly=!!w.audio&&!w.video,this.altAudio&&!this.audioOnly&&delete w.audio;var L=w.audio,Y=w.video,K=w.audiovideo;if(L){var A=E.audioCodec,H=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(A&&(A.indexOf("mp4a.40.5")!==-1?A="mp4a.40.2":A="mp4a.40.5"),L.metadata.channelCount!==1&&H.indexOf("firefox")===-1&&(A="mp4a.40.5")),H.indexOf("android")!==-1&&L.container!=="audio/mpeg"&&(A="mp4a.40.2",this.log("Android: force audio codec to "+A)),E.audioCodec&&E.audioCodec!==A&&this.log('Swapping manifest audio codec "'+E.audioCodec+'" for "'+A+'"'),L.levelCodec=A,L.id="main",this.log("Init audio buffer, container:"+L.container+", codecs[selected/level/parsed]=["+(A||"")+"/"+(E.audioCodec||"")+"/"+L.codec+"]")}Y&&(Y.levelCodec=E.videoCodec,Y.id="main",this.log("Init video buffer, container:"+Y.container+", codecs[level/parsed]=["+(E.videoCodec||"")+"/"+Y.codec+"]")),K&&this.log("Init audiovideo buffer, container:"+K.container+", codecs[level/parsed]=["+(E.attrs.CODECS||"")+"/"+K.codec+"]"),this.hls.trigger(S.Events.BUFFER_CODECS,w),Object.keys(w).forEach(function(U){var I=w[U],G=I.initSegment;G!=null&&G.byteLength&&M.hls.trigger(S.Events.BUFFER_APPENDING,{type:U,data:G,frag:T,part:null,chunkMeta:F,parent:T.type})}),this.tick()},O.backtrack=function(E){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(E);var w=this.fragmentTracker.backtrack(E);this.fragPrevious=null,this.nextLoadPosition=E.start,w?this.resetFragmentLoading(E):this.state=g.State.BACKTRACKING},O.checkFragmentChanged=function(){var E=this.media,w=null;if(E&&E.readyState>1&&E.seeking===!1){var T=E.currentTime;if(_.BufferHelper.isBuffered(E,T)?w=this.getAppendedFrag(T):_.BufferHelper.isBuffered(E,T+.1)&&(w=this.getAppendedFrag(T+.1)),w){var F=this.fragPlaying,M=w.level;(!F||w.sn!==F.sn||F.level!==M||w.urlId!==F.urlId)&&(this.hls.trigger(S.Events.FRAG_CHANGED,{frag:w}),(!F||F.level!==M)&&this.hls.trigger(S.Events.LEVEL_SWITCHED,{level:M}),this.fragPlaying=w)}}},l(R,[{key:"nextLevel",get:function(){var E=this.nextBufferedFrag;return E?E.level:-1}},{key:"currentLevel",get:function(){var E=this.media;if(E){var w=this.getAppendedFrag(E.currentTime);if(w)return w.level}return-1}},{key:"nextBufferedFrag",get:function(){var E=this.media;if(E){var w=this.getAppendedFrag(E.currentTime);return this.followingBufferedFrag(w)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),R}(g.default)},"./src/controller/subtitle-stream-controller.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"SubtitleStreamController",function(){return a});var N=C("./src/events.ts"),g=C("./src/utils/logger.ts"),m=C("./src/utils/buffer-helper.ts"),S=C("./src/controller/fragment-finders.ts"),_=C("./src/utils/discontinuities.ts"),t=C("./src/controller/level-helper.ts"),d=C("./src/controller/fragment-tracker.ts"),i=C("./src/controller/base-stream-controller.ts"),c=C("./src/types/loader.ts"),o=C("./src/types/level.ts");function n(r,x){for(var y=0;y<x.length;y++){var p=x[y];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(r,p.key,p)}}function s(r,x,y){return x&&n(r.prototype,x),y&&n(r,y),r}function h(r,x){r.prototype=Object.create(x.prototype),r.prototype.constructor=r,f(r,x)}function f(r,x){return f=Object.setPrototypeOf||function(p,R){return p.__proto__=R,p},f(r,x)}var l=500,a=function(r){h(x,r);function x(p,R){var O;return O=r.call(this,p,R,"[subtitle-stream-controller]")||this,O.levels=[],O.currentTrackId=-1,O.tracksBuffered=[],O.mainDetails=null,O._registerListeners(),O}var y=x.prototype;return y.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},y._registerListeners=function(){var R=this.hls;R.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.on(N.Events.LEVEL_LOADED,this.onLevelLoaded,this),R.on(N.Events.ERROR,this.onError,this),R.on(N.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),R.on(N.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),R.on(N.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.on(N.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),R.on(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y._unregisterListeners=function(){var R=this.hls;R.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.off(N.Events.LEVEL_LOADED,this.onLevelLoaded,this),R.off(N.Events.ERROR,this.onError,this),R.off(N.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),R.off(N.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),R.off(N.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.off(N.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),R.off(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y.startLoad=function(){this.stopLoad(),this.state=i.State.IDLE,this.setInterval(l),this.tick()},y.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},y.onLevelLoaded=function(R,O){this.mainDetails=O.details},y.onSubtitleFragProcessed=function(R,O){var b=O.frag,E=O.success;if(this.fragPrevious=b,this.state=i.State.IDLE,!E)return;var w=this.tracksBuffered[this.currentTrackId];if(!w)return;for(var T,F=b.start,M=0;M<w.length;M++)if(F>=w[M].start&&F<=w[M].end){T=w[M];break}var L=b.start+b.duration;T?T.end=L:(T={start:F,end:L},w.push(T)),this.fragmentTracker.fragBuffered(b)},y.onBufferFlushing=function(R,O){var b=O.startOffset,E=O.endOffset;if(b===0&&E!==Number.POSITIVE_INFINITY){var w=this.currentTrackId,T=this.levels;if(!T.length||!T[w]||!T[w].details)return;var F=T[w].details,M=F.targetduration,L=E-M;if(L<=0)return;O.endOffsetSubtitles=Math.max(0,L),this.tracksBuffered.forEach(function(Y){for(var K=0;K<Y.length;){if(Y[K].end<=L){Y.shift();continue}else if(Y[K].start<L)Y[K].start=L;else break;K++}}),this.fragmentTracker.removeFragmentsInRange(b,L,c.PlaylistLevelType.SUBTITLE)}},y.onError=function(R,O){var b,E=O.frag;if(!E||E.type!==c.PlaylistLevelType.SUBTITLE)return;(b=this.fragCurrent)!==null&&b!==void 0&&b.loader&&this.fragCurrent.loader.abort(),this.state=i.State.IDLE},y.onSubtitleTracksUpdated=function(R,O){var b=this,E=O.subtitleTracks;this.tracksBuffered=[],this.levels=E.map(function(w){return new o.Level(w)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(w){b.tracksBuffered[w.id]=[]}),this.mediaBuffer=null},y.onSubtitleTrackSwitch=function(R,O){if(this.currentTrackId=O.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var b=this.levels[this.currentTrackId];b!=null&&b.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,b&&this.setInterval(l)},y.onSubtitleTrackLoaded=function(R,O){var b,E=O.details,w=O.id,T=this.currentTrackId,F=this.levels;if(!F.length)return;var M=F[T];if(w>=F.length||w!==T||!M)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,E.live||(b=M.details)!==null&&b!==void 0&&b.live){var L=this.mainDetails;if(E.deltaUpdateFailed||!L)return;var Y=L.fragments[0];if(!M.details)E.hasProgramDateTime&&L.hasProgramDateTime?Object(_.alignMediaPlaylistByPDT)(E,L):Y&&Object(t.addSliding)(E,Y.start);else{var K=this.alignPlaylists(E,M.details);K===0&&Y&&Object(t.addSliding)(E,Y.start)}}if(M.details=E,this.levelLastLoaded=w,this.tick(),E.live&&!this.fragCurrent&&this.media&&this.state===i.State.IDLE){var A=Object(S.findFragmentByPTS)(null,E.fragments,this.media.currentTime,0);A||(this.warn("Subtitle playlist not aligned with playback"),M.details=void 0)}},y._handleFragmentLoadComplete=function(R){var O=R.frag,b=R.payload,E=O.decryptdata,w=this.hls;if(this.fragContextChanged(O))return;if(b&&b.byteLength>0&&E&&E.key&&E.iv&&E.method==="AES-128"){var T=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(b),E.key.buffer,E.iv.buffer).then(function(F){var M=performance.now();w.trigger(N.Events.FRAG_DECRYPTED,{frag:O,payload:F,stats:{tstart:T,tdecrypt:M}})})}},y.doTick=function(){if(!this.media){this.state=i.State.IDLE;return}if(this.state===i.State.IDLE){var R,O=this.currentTrackId,b=this.levels;if(!b.length||!b[O]||!b[O].details)return;var E=b[O].details,w=E.targetduration,T=this.config,F=this.media,M=m.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,F.currentTime-w,T.maxBufferHole),L=M.end,Y=M.len,K=this.getMaxBufferLength()+w;if(Y>K)return;console.assert(E,"Subtitle track details are defined on idle subtitle stream controller tick");var A=E.fragments,H=A.length,U=E.edge,I,G=this.fragPrevious;if(L<U){var ne=T.maxFragLookUpTolerance;G&&E.hasProgramDateTime&&(I=Object(S.findFragmentByPDT)(A,G.endProgramDateTime,ne)),I||(I=Object(S.findFragmentByPTS)(G,A,L,ne),!I&&G&&G.start<A[0].start&&(I=A[0]))}else I=A[H-1];(R=I)!==null&&R!==void 0&&R.encrypted?(g.logger.log("Loading key for "+I.sn),this.state=i.State.KEY_LOADING,this.hls.trigger(N.Events.KEY_LOADING,{frag:I})):I&&this.fragmentTracker.getState(I)===d.FragmentState.NOT_LOADED&&this.loadFragment(I,E,L)}},y.loadFragment=function(R,O,b){this.fragCurrent=R,r.prototype.loadFragment.call(this,R,O,b)},s(x,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),x}(i.default)},"./src/controller/subtitle-track-controller.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/events.ts"),g=C("./src/utils/texttrack-utils.ts"),m=C("./src/controller/base-playlist-controller.ts"),S=C("./src/types/loader.ts");function _(n,s){for(var h=0;h<s.length;h++){var f=s[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(n,f.key,f)}}function t(n,s,h){return s&&_(n.prototype,s),h&&_(n,h),n}function d(n,s){n.prototype=Object.create(s.prototype),n.prototype.constructor=n,i(n,s)}function i(n,s){return i=Object.setPrototypeOf||function(f,l){return f.__proto__=l,f},i(n,s)}var c=function(n){d(s,n);function s(f){var l;return l=n.call(this,f,"[subtitle-track-controller]")||this,l.media=null,l.tracks=[],l.groupId=null,l.tracksInGroup=[],l.trackId=-1,l.selectDefaultTrack=!0,l.queuedDefaultTrack=-1,l.trackChangeListener=function(){return l.onTextTracksChanged()},l.asyncPollTrackChange=function(){return l.pollTrackChange(0)},l.useTextTrackPolling=!1,l.subtitlePollingInterval=-1,l.subtitleDisplay=!0,l.registerListeners(),l}var h=s.prototype;return h.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,n.prototype.destroy.call(this)},h.registerListeners=function(){var l=this.hls;l.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(N.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(N.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.on(N.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),l.on(N.Events.ERROR,this.onError,this)},h.unregisterListeners=function(){var l=this.hls;l.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(N.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(N.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.off(N.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),l.off(N.Events.ERROR,this.onError,this)},h.onMediaAttached=function(l,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)},h.pollTrackChange=function(l){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,l)},h.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 l=o(this.media.textTracks);l.forEach(function(a){Object(g.clearCurrentCues)(a)}),this.subtitleTrack=-1,this.media=null},h.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},h.onManifestParsed=function(l,a){this.tracks=a.subtitleTracks},h.onSubtitleTrackLoaded=function(l,a){var r=a.id,x=a.details,y=this.trackId,p=this.tracksInGroup[y];if(!p){this.warn("Invalid subtitle track id "+r);return}var R=p.details;p.details=a.details,this.log("subtitle track "+r+" loaded ["+x.startSN+"-"+x.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,a,R))},h.onLevelLoading=function(l,a){this.switchLevel(a.level)},h.onLevelSwitching=function(l,a){this.switchLevel(a.level)},h.switchLevel=function(l){var a=this.hls.levels[l];if(!(a!=null&&a.textGroupIds))return;var r=a.textGroupIds[a.urlId];if(this.groupId!==r){var x=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,y=this.tracks.filter(function(O){return!r||O.groupId===r});this.tracksInGroup=y;var p=this.findTrackId(x==null?void 0:x.name)||this.findTrackId();this.groupId=r;var R={subtitleTracks:y};this.log("Updating subtitle tracks, "+y.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(N.Events.SUBTITLE_TRACKS_UPDATED,R),p!==-1&&this.setSubtitleTrack(p,x)}},h.findTrackId=function(l){for(var a=this.tracksInGroup,r=0;r<a.length;r++){var x=a[r];if((!this.selectDefaultTrack||x.default)&&(!l||l===x.name))return x.id}return-1},h.onError=function(l,a){if(n.prototype.onError.call(this,l,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)},h.loadPlaylist=function(l){var a=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(a)){var r=a.id,x=a.groupId,y=a.url;if(l)try{y=l.addDirectives(y)}catch(p){this.warn("Could not construct new URL with HLS Delivery Directives: "+p)}this.log("Loading subtitle playlist for id "+r),this.hls.trigger(N.Events.SUBTITLE_TRACK_LOADING,{url:y,id:r,groupId:x,deliveryDirectives:l||null})}},h.toggleTrackModes=function(l){var a=this,r=this.media,x=this.subtitleDisplay,y=this.trackId;if(!r)return;var p=o(r.textTracks),R=p.filter(function(E){return E.groupId===a.groupId});if(l===-1)[].slice.call(p).forEach(function(E){E.mode="disabled"});else{var O=R[y];O&&(O.mode="disabled")}var b=R[l];b&&(b.mode=x?"showing":"hidden")},h.setSubtitleTrack=function(l,a){var r,x=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=l;return}if(this.trackId!==l&&this.toggleTrackModes(l),this.trackId===l&&(l===-1||(r=x[l])!==null&&r!==void 0&&r.details)||l<-1||l>=x.length)return;this.clearTimer();var y=x[l];if(this.log("Switching to subtitle track "+l),this.trackId=l,y){var p=y.id,R=y.groupId,O=R===void 0?"":R,b=y.name,E=y.type,w=y.url;this.hls.trigger(N.Events.SUBTITLE_TRACK_SWITCH,{id:p,groupId:O,name:b,type:E,url:w});var T=this.switchParams(y.url,a==null?void 0:a.details);this.loadPlaylist(T)}else this.hls.trigger(N.Events.SUBTITLE_TRACK_SWITCH,{id:l})},h.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var l=-1,a=o(this.media.textTracks),r=0;r<a.length;r++)if(a[r].mode==="hidden")l=r;else if(a[r].mode==="showing"){l=r;break}this.subtitleTrack!==l&&(this.subtitleTrack=l)},t(s,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(l){this.selectDefaultTrack=!1;var a=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(l,a)}}]),s}(m.default);function o(n){for(var s=[],h=0;h<n.length;h++){var f=n[h];f.kind==="subtitles"&&f.label&&s.push(n[h])}return s}v.default=c},"./src/controller/timeline-controller.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"TimelineController",function(){return o});var N=C("./src/polyfills/number.ts"),g=C("./src/events.ts"),m=C("./src/utils/cea-608-parser.ts"),S=C("./src/utils/output-filter.ts"),_=C("./src/utils/webvtt-parser.ts"),t=C("./src/utils/texttrack-utils.ts"),d=C("./src/utils/imsc1-ttml-parser.ts"),i=C("./src/types/loader.ts"),c=C("./src/utils/logger.ts"),o=function(){function f(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=h(),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 r=new S.default(this,"textTrack1"),x=new S.default(this,"textTrack2"),y=new S.default(this,"textTrack3"),p=new S.default(this,"textTrack4");this.cea608Parser1=new m.default(1,r,x),this.cea608Parser2=new m.default(3,y,p)}a.on(g.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(g.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(g.Events.MANIFEST_LOADED,this.onManifestLoaded,this),a.on(g.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),a.on(g.Events.FRAG_LOADING,this.onFragLoading,this),a.on(g.Events.FRAG_LOADED,this.onFragLoaded,this),a.on(g.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),a.on(g.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),a.on(g.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),a.on(g.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),a.on(g.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var l=f.prototype;return l.destroy=function(){var r=this.hls;r.off(g.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(g.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(g.Events.MANIFEST_LOADED,this.onManifestLoaded,this),r.off(g.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),r.off(g.Events.FRAG_LOADING,this.onFragLoading,this),r.off(g.Events.FRAG_LOADED,this.onFragLoaded,this),r.off(g.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),r.off(g.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),r.off(g.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),r.off(g.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),r.off(g.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},l.addCues=function(r,x,y,p,R){for(var O=!1,b=R.length;b--;){var E=R[b],w=s(E[0],E[1],x,y);if(w>=0&&(E[0]=Math.min(E[0],x),E[1]=Math.max(E[1],y),O=!0,w/(y-x)>.5))return}if(O||R.push([x,y]),this.config.renderTextTracksNatively){var T=this.captionsTracks[r];this.Cues.newCue(T,x,y,p)}else{var F=this.Cues.newCue(null,x,y,p);this.hls.trigger(g.Events.CUES_PARSED,{type:"captions",cues:F,track:r})}},l.onInitPtsFound=function(r,x){var y=this,p=x.frag,R=x.id,O=x.initPTS,b=x.timescale,E=this.unparsedVttFrags;R==="main"&&(this.initPTS[p.cc]=O,this.timescale[p.cc]=b),E.length&&(this.unparsedVttFrags=[],E.forEach(function(w){y.onFragLoaded(g.Events.FRAG_LOADED,w)}))},l.getExistingTrack=function(r){var x=this.media;if(x)for(var y=0;y<x.textTracks.length;y++){var p=x.textTracks[y];if(p[r])return p}return null},l.createCaptionsTrack=function(r){this.config.renderTextTracksNatively?this.createNativeTrack(r):this.createNonNativeTrack(r)},l.createNativeTrack=function(r){if(this.captionsTracks[r])return;var x=this.captionsProperties,y=this.captionsTracks,p=this.media,R=x[r],O=R.label,b=R.languageCode,E=this.getExistingTrack(r);if(E)y[r]=E,Object(t.clearCurrentCues)(y[r]),Object(t.sendAddTrackEvent)(y[r],p);else{var w=this.createTextTrack("captions",O,b);w&&(w[r]=!0,y[r]=w)}},l.createNonNativeTrack=function(r){if(this.nonNativeCaptionsTracks[r])return;var x=this.captionsProperties[r];if(!x)return;var y=x.label,p={_id:r,label:y,kind:"captions",default:x.media?!!x.media.default:!1,closedCaptions:x.media};this.nonNativeCaptionsTracks[r]=p,this.hls.trigger(g.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[p]})},l.createTextTrack=function(r,x,y){var p=this.media;return p?p.addTextTrack(r,x,y):void 0},l.onMediaAttaching=function(r,x){this.media=x.media,this._cleanTracks()},l.onMediaDetaching=function(){var r=this.captionsTracks;Object.keys(r).forEach(function(x){Object(t.clearCurrentCues)(r[x]),delete r[x]}),this.nonNativeCaptionsTracks={}},l.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=h(),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())},l._cleanTracks=function(){var r=this.media;if(!r)return;var x=r.textTracks;if(x)for(var y=0;y<x.length;y++)Object(t.clearCurrentCues)(x[y])},l.onSubtitleTracksUpdated=function(r,x){var y=this;this.textTracks=[];var p=x.subtitleTracks||[],R=p.some(function(w){return w.textCodec===d.IMSC1_CODEC});if(this.config.enableWebVTT||R&&this.config.enableIMSC1){var O=this.tracks&&p&&this.tracks.length===p.length;if(this.tracks=p||[],this.config.renderTextTracksNatively){var b=this.media?this.media.textTracks:[];this.tracks.forEach(function(w,T){var F;if(T<b.length){for(var M=null,L=0;L<b.length;L++)if(n(b[L],w)){M=b[L];break}M&&(F=M)}F?Object(t.clearCurrentCues)(F):(F=y.createTextTrack("subtitles",w.name,w.lang),F&&(F.mode="disabled")),F&&(F.groupId=w.groupId,y.textTracks.push(F))})}else if(!O&&this.tracks&&this.tracks.length){var E=this.tracks.map(function(w){return{label:w.name,kind:w.type.toLowerCase(),default:w.default,subtitleTrack:w}});this.hls.trigger(g.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:E})}}},l.onManifestLoaded=function(r,x){var y=this;this.config.enableCEA708Captions&&x.captions&&x.captions.forEach(function(p){var R=/(?:CC|SERVICE)([1-4])/.exec(p.instreamId);if(!R)return;var O="textTrack"+R[1],b=y.captionsProperties[O];if(!b)return;b.label=p.name,p.lang&&(b.languageCode=p.lang),b.media=p})},l.onFragLoading=function(r,x){var y=this.cea608Parser1,p=this.cea608Parser2,R=this.lastSn,O=this.lastPartIndex;if(!this.enabled||!(y&&p))return;if(x.frag.type===i.PlaylistLevelType.MAIN){var b,E,w=x.frag.sn,T=(b=x==null||((E=x.part)===null||E===void 0)?void 0:E.index)!=null?b:-1;w===R+1||w===R&&T===O+1||(y.reset(),p.reset()),this.lastSn=w,this.lastPartIndex=T}},l.onFragLoaded=function(r,x){var y=x.frag,p=x.payload,R=this.initPTS,O=this.unparsedVttFrags;if(y.type===i.PlaylistLevelType.SUBTITLE)if(p.byteLength){if(!Object(N.isFiniteNumber)(R[y.cc])){O.push(x),R.length&&this.hls.trigger(g.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:y,error:new Error("Missing initial subtitle PTS")});return}var b=y.decryptdata;if(b==null||b.key==null||b.method!=="AES-128"){var E=this.tracks[y.level],w=this.vttCCs;w[y.cc]||(w[y.cc]={start:y.start,prevCC:this.prevCC,new:!0},this.prevCC=y.cc),E&&E.textCodec===d.IMSC1_CODEC?this._parseIMSC1(y,p):this._parseVTTs(y,p,w)}}else this.hls.trigger(g.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:y,error:new Error("Empty subtitle payload")})},l._parseIMSC1=function(r,x){var y=this,p=this.hls;Object(d.parseIMSC1)(x,this.initPTS[r.cc],this.timescale[r.cc],function(R){y._appendCues(R,r.level),p.trigger(g.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},function(R){c.logger.log("Failed to parse IMSC1: "+R),p.trigger(g.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:R})})},l._parseVTTs=function(r,x,y){var p=this,R=this.hls;Object(_.parseWebVTT)(x,this.initPTS[r.cc],this.timescale[r.cc],y,r.cc,r.start,function(O){p._appendCues(O,r.level),R.trigger(g.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},function(O){p._fallbackToIMSC1(r,x),c.logger.log("Failed to parse VTT cue: "+O),R.trigger(g.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:O})})},l._fallbackToIMSC1=function(r,x){var y=this,p=this.tracks[r.level];p.textCodec||Object(d.parseIMSC1)(x,this.initPTS[r.cc],this.timescale[r.cc],function(){p.textCodec=d.IMSC1_CODEC,y._parseIMSC1(r,x)},function(){p.textCodec="wvtt"})},l._appendCues=function(r,x){var y=this.hls;if(this.config.renderTextTracksNatively){var p=this.textTracks[x];if(p.mode==="disabled")return;r.forEach(function(b){return Object(t.addCueToTrack)(p,b)})}else{var R=this.tracks[x],O=R.default?"default":"subtitles"+x;y.trigger(g.Events.CUES_PARSED,{type:"subtitles",cues:r,track:O})}},l.onFragDecrypted=function(r,x){var y=x.frag;if(y.type===i.PlaylistLevelType.SUBTITLE){if(!Object(N.isFiniteNumber)(this.initPTS[y.cc])){this.unparsedVttFrags.push(x);return}this.onFragLoaded(g.Events.FRAG_LOADED,x)}},l.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},l.onFragParsingUserdata=function(r,x){var y=this.cea608Parser1,p=this.cea608Parser2;if(!this.enabled||!(y&&p))return;for(var R=0;R<x.samples.length;R++){var O=x.samples[R].bytes;if(O){var b=this.extractCea608Data(O);y.addData(x.samples[R].pts,b[0]),p.addData(x.samples[R].pts,b[1])}}},l.onBufferFlushing=function(r,x){var y=x.startOffset,p=x.endOffset,R=x.endOffsetSubtitles,O=x.type,b=this.media;if(!b||b.currentTime<p)return;if(!O||O==="video"){var E=this.captionsTracks;Object.keys(E).forEach(function(T){return Object(t.removeCuesInRange)(E[T],y,p)})}if(this.config.renderTextTracksNatively&&(y===0&&R!==void 0)){var w=this.textTracks;Object.keys(w).forEach(function(T){return Object(t.removeCuesInRange)(w[T],y,R)})}},l.extractCea608Data=function(r){for(var x=r[0]&31,y=2,p=[[],[]],R=0;R<x;R++){var O=r[y++],b=127&r[y++],E=127&r[y++],w=(4&O)!==0,T=3&O;if(b===0&&E===0)continue;w&&((T===0||T===1)&&(p[T].push(b),p[T].push(E)))}return p},f}();function n(f,l){return f&&f.label===l.name&&!(f.textTrack1||f.textTrack2)}function s(f,l,a,r){return Math.min(l,r)-Math.max(f,a)}function h(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return N});var N=function(){function g(S,_){this.subtle=void 0,this.aesIV=void 0,this.subtle=S,this.aesIV=_}var m=g.prototype;return m.decrypt=function(_,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,_)},g}()},"./src/crypt/aes-decryptor.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"removePadding",function(){return g}),C.d(v,"default",function(){return m});var N=C("./src/utils/typed-array.ts");function g(S){var _=S.byteLength,t=_&&new DataView(S.buffer).getUint8(_-1);return t?Object(N.sliceUint8)(S,0,_-t):S}var m=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 _=S.prototype;return _.uint8ArrayToUint32Array_=function(d){for(var i=new DataView(d),c=new Uint32Array(4),o=0;o<4;o++)c[o]=i.getUint32(o*4);return c},_.initTable=function(){var d=this.sBox,i=this.invSBox,c=this.subMix,o=c[0],n=c[1],s=c[2],h=c[3],f=this.invSubMix,l=f[0],a=f[1],r=f[2],x=f[3],y=new Uint32Array(256),p=0,R=0,O=0;for(O=0;O<256;O++)O<128?y[O]=O<<1:y[O]=O<<1^283;for(O=0;O<256;O++){var b=R^R<<1^R<<2^R<<3^R<<4;b=b>>>8^b&255^99,d[p]=b,i[b]=p;var E=y[p],w=y[E],T=y[w],F=y[b]*257^b*16843008;o[p]=F<<24|F>>>8,n[p]=F<<16|F>>>16,s[p]=F<<8|F>>>24,h[p]=F,F=T*16843009^w*65537^E*257^p*16843008,l[b]=F<<24|F>>>8,a[b]=F<<16|F>>>16,r[b]=F<<8|F>>>24,x[b]=F,p?(p=E^y[y[y[T^E]]],R^=y[y[R]]):p=R=1}},_.expandKey=function(d){for(var i=this.uint8ArrayToUint32Array_(d),c=!0,o=0;o<i.length&&c;)c=i[o]===this.key[o],o++;if(c)return;this.key=i;var n=this.keySize=i.length;if(n!==4&&n!==6&&n!==8)throw new Error("Invalid aes key size="+n);var s=this.ksRows=(n+6+1)*4,h,f,l=this.keySchedule=new Uint32Array(s),a=this.invKeySchedule=new Uint32Array(s),r=this.sBox,x=this.rcon,y=this.invSubMix,p=y[0],R=y[1],O=y[2],b=y[3],E,w;for(h=0;h<s;h++){if(h<n){E=l[h]=i[h];continue}w=E,h%n===0?(w=w<<8|w>>>24,w=r[w>>>24]<<24|r[w>>>16&255]<<16|r[w>>>8&255]<<8|r[w&255],w^=x[h/n|0]<<24):n>6&&h%n===4&&(w=r[w>>>24]<<24|r[w>>>16&255]<<16|r[w>>>8&255]<<8|r[w&255]),l[h]=E=(l[h-n]^w)>>>0}for(f=0;f<s;f++)h=s-f,f&3?w=l[h]:w=l[h-4],f<4||h<=4?a[f]=w:a[f]=p[r[w>>>24]]^R[r[w>>>16&255]]^O[r[w>>>8&255]]^b[r[w&255]],a[f]=a[f]>>>0},_.networkToHostOrderSwap=function(d){return d<<24|(d&65280)<<8|(d&16711680)>>8|d>>>24},_.decrypt=function(d,i,c){for(var o=this.keySize+6,n=this.invKeySchedule,s=this.invSBox,h=this.invSubMix,f=h[0],l=h[1],a=h[2],r=h[3],x=this.uint8ArrayToUint32Array_(c),y=x[0],p=x[1],R=x[2],O=x[3],b=new Int32Array(d),E=new Int32Array(b.length),w,T,F,M,L,Y,K,A,H,U,I,G,ne,oe,de=this.networkToHostOrderSwap;i<b.length;){for(H=de(b[i]),U=de(b[i+1]),I=de(b[i+2]),G=de(b[i+3]),L=H^n[0],Y=G^n[1],K=I^n[2],A=U^n[3],ne=4,oe=1;oe<o;oe++)w=f[L>>>24]^l[Y>>16&255]^a[K>>8&255]^r[A&255]^n[ne],T=f[Y>>>24]^l[K>>16&255]^a[A>>8&255]^r[L&255]^n[ne+1],F=f[K>>>24]^l[A>>16&255]^a[L>>8&255]^r[Y&255]^n[ne+2],M=f[A>>>24]^l[L>>16&255]^a[Y>>8&255]^r[K&255]^n[ne+3],L=w,Y=T,K=F,A=M,ne=ne+4;w=s[L>>>24]<<24^s[Y>>16&255]<<16^s[K>>8&255]<<8^s[A&255]^n[ne],T=s[Y>>>24]<<24^s[K>>16&255]<<16^s[A>>8&255]<<8^s[L&255]^n[ne+1],F=s[K>>>24]<<24^s[A>>16&255]<<16^s[L>>8&255]<<8^s[Y&255]^n[ne+2],M=s[A>>>24]<<24^s[L>>16&255]<<16^s[Y>>8&255]<<8^s[K&255]^n[ne+3],E[i]=de(w^y),E[i+1]=de(M^p),E[i+2]=de(F^R),E[i+3]=de(T^O),y=H,p=U,R=I,O=G,i=i+4}return E.buffer},S}()},"./src/crypt/decrypter.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return i});var N=C("./src/crypt/aes-crypto.ts"),g=C("./src/crypt/fast-aes-key.ts"),m=C("./src/crypt/aes-decryptor.ts"),S=C("./src/utils/logger.ts"),_=C("./src/utils/mp4-tools.ts"),t=C("./src/utils/typed-array.ts"),d=16,i=function(){function c(n,s,h){var f=h===void 0?{}:h,l=f.removePKCS7Padding,a=l===void 0?!0:l;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=n,this.config=s,this.removePKCS7Padding=a,a)try{var r=self.crypto;r&&(this.subtle=r.subtle||r.webkitSubtle)}catch(x){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var o=c.prototype;return o.destroy=function(){this.observer=null},o.isSync=function(){return this.config.enableSoftwareAES},o.flush=function(){var s=this.currentResult;if(!s){this.reset();return}var h=new Uint8Array(s);return this.reset(),this.removePKCS7Padding?Object(m.removePadding)(h):h},o.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},o.decrypt=function(s,h,f,l){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(s),h,f);var a=this.flush();a&&l(a.buffer)}else this.webCryptoDecrypt(new Uint8Array(s),h,f).then(l)},o.softwareDecrypt=function(s,h,f){var l=this.currentIV,a=this.currentResult,r=this.remainderData;this.logOnce("JS AES decrypt"),r&&(s=Object(_.appendUint8Array)(r,s),this.remainderData=null);var x=this.getValidChunk(s);if(!x.length)return null;l&&(f=l);var y=this.softwareDecrypter;y||(y=this.softwareDecrypter=new m.default),y.expandKey(h);var p=a;return this.currentResult=y.decrypt(x.buffer,0,f),this.currentIV=Object(t.sliceUint8)(x,-16).buffer,p||null},o.webCryptoDecrypt=function(s,h,f){var l=this,a=this.subtle;return(this.key!==h||!this.fastAesKey)&&(this.key=h,this.fastAesKey=new g.default(a,h)),this.fastAesKey.expandKey().then(function(r){if(!a)return Promise.reject(new Error("web crypto not initialized"));var x=new N.default(a,f);return x.decrypt(s.buffer,r)}).catch(function(r){return l.onWebCryptoError(r,s,h,f)})},o.onWebCryptoError=function(s,h,f,l){return S.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",s),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(h,f,l)},o.getValidChunk=function(s){var h=s,f=s.length-s.length%d;return f!==s.length&&(h=Object(t.sliceUint8)(s,0,f),this.remainderData=Object(t.sliceUint8)(s,f)),h},o.logOnce=function(s){if(!this.logEnabled)return;S.logger.log("[decrypter.ts]: "+s),this.logEnabled=!1},c}()},"./src/crypt/fast-aes-key.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return N});var N=function(){function g(S,_){this.subtle=void 0,this.key=void 0,this.subtle=S,this.key=_}var m=g.prototype;return m.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},g}()},"./src/demux/aacdemuxer.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/demux/base-audio-demuxer.ts"),g=C("./src/demux/adts.ts"),m=C("./src/utils/logger.ts"),S=C("./src/demux/id3.ts");function _(i,c){i.prototype=Object.create(c.prototype),i.prototype.constructor=i,t(i,c)}function t(i,c){return t=Object.setPrototypeOf||function(n,s){return n.__proto__=s,n},t(i,c)}var d=function(i){_(c,i);function c(n,s){var h;return h=i.call(this)||this,h.observer=void 0,h.config=void 0,h.observer=n,h.config=s,h}var o=c.prototype;return o.resetInitSegment=function(s,h,f){i.prototype.resetInitSegment.call(this,s,h,f),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:s,duration:f,inputTimeScale:9e4,dropped:0}},c.probe=function(s){if(!s)return!1;for(var h=S.getID3Data(s,0)||[],f=h.length,l=s.length;f<l;f++)if(g.probe(s,f))return m.logger.log("ADTS sync word found !"),!0;return!1},o.canParse=function(s,h){return g.canParse(s,h)},o.appendFrame=function(s,h,f){g.initTrackConfig(s,this.observer,h,f,s.manifestCodec);var l=g.appendFrame(s,h,f,this.initPTS,this.frameIndex);if(l&&l.missing===0)return l},c}(N.default);d.minProbeByteLength=9,v.default=d},"./src/demux/adts.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"getAudioConfig",function(){return S}),C.d(v,"isHeaderPattern",function(){return _}),C.d(v,"getHeaderLength",function(){return t}),C.d(v,"getFullFrameLength",function(){return d}),C.d(v,"canGetFrameLength",function(){return i}),C.d(v,"isHeader",function(){return c}),C.d(v,"canParse",function(){return o}),C.d(v,"probe",function(){return n}),C.d(v,"initTrackConfig",function(){return s}),C.d(v,"getFrameDuration",function(){return h}),C.d(v,"parseFrameHeader",function(){return f}),C.d(v,"appendFrame",function(){return l});var N=C("./src/utils/logger.ts"),g=C("./src/errors.ts"),m=C("./src/events.ts");function S(a,r,x,y){var p,R,O,b,E=navigator.userAgent.toLowerCase(),w=y,T=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];p=((r[x+2]&192)>>>6)+1;var F=(r[x+2]&60)>>>2;if(F>T.length-1){a.trigger(m.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+F});return}return O=(r[x+2]&1)<<2,O|=(r[x+3]&192)>>>6,N.logger.log("manifest codec:"+y+", ADTS type:"+p+", samplingIndex:"+F),/firefox/i.test(E)?F>=6?(p=5,b=new Array(4),R=F-3):(p=2,b=new Array(2),R=F):E.indexOf("android")!==-1?(p=2,b=new Array(2),R=F):(p=5,b=new Array(4),y&&(y.indexOf("mp4a.40.29")!==-1||y.indexOf("mp4a.40.5")!==-1)||!y&&F>=6?R=F-3:((y&&y.indexOf("mp4a.40.2")!==-1&&(F>=6&&O===1||/vivaldi/i.test(E))||!y&&O===1)&&(p=2,b=new Array(2)),R=F)),b[0]=p<<3,b[0]|=(F&14)>>1,b[1]|=(F&1)<<7,b[1]|=O<<3,p===5&&(b[1]|=(R&14)>>1,b[2]=(R&1)<<7,b[2]|=2<<2,b[3]=0),{config:b,samplerate:T[F],channelCount:O,codec:"mp4a.40."+p,manifestCodec:w}}function _(a,r){return a[r]===255&&(a[r+1]&246)===240}function t(a,r){return a[r+1]&1?7:9}function d(a,r){return(a[r+3]&3)<<11|a[r+4]<<3|(a[r+5]&224)>>>5}function i(a,r){return r+5<a.length}function c(a,r){return r+1<a.length&&_(a,r)}function o(a,r){return i(a,r)&&_(a,r)&&d(a,r)<=a.length-r}function n(a,r){if(c(a,r)){var x=t(a,r);if(r+x>=a.length)return!1;var y=d(a,r);if(y<=x)return!1;var p=r+y;return p===a.length||c(a,p)}return!1}function s(a,r,x,y,p){if(!a.samplerate){var R=S(r,x,y,p);if(!R)return;a.config=R.config,a.samplerate=R.samplerate,a.channelCount=R.channelCount,a.codec=R.codec,a.manifestCodec=R.manifestCodec,N.logger.log("parsed codec:"+a.codec+", rate:"+R.samplerate+", channels:"+R.channelCount)}}function h(a){return 1024*9e4/a}function f(a,r,x,y,p){var R=t(a,r),O=d(a,r);if(O-=R,O>0){var b=x+y*p;return{headerLength:R,frameLength:O,stamp:b}}}function l(a,r,x,y,p){var R=h(a.samplerate),O=f(r,x,y,p,R);if(O){var b=O.frameLength,E=O.headerLength,w=O.stamp,T=E+b,F=Math.max(0,x+T-r.length),M;F?(M=new Uint8Array(T-E),M.set(r.subarray(x+E,r.length),0)):M=r.subarray(x+E,x+T);var L={unit:M,pts:w};return F||a.samples.push(L),{sample:L,length:T,missing:F}}}},"./src/demux/base-audio-demuxer.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"initPTSFn",function(){return d});var N=C("./src/polyfills/number.ts"),g=C("./src/demux/id3.ts"),m=C("./src/demux/dummy-demuxed-track.ts"),S=C("./src/utils/mp4-tools.ts"),_=C("./src/utils/typed-array.ts"),t=function(){function i(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var c=i.prototype;return c.resetInitSegment=function(n,s,h){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},c.resetTimeStamp=function(){},c.resetContiguity=function(){},c.canParse=function(n,s){return!1},c.appendFrame=function(n,s,h){},c.demux=function(n,s){this.cachedData&&(n=Object(S.appendUint8Array)(this.cachedData,n),this.cachedData=null);var h=g.getID3Data(n,0),f=h?h.length:0,l,a,r=this._audioTrack,x=this._id3Track,y=h?g.getTimeStamp(h):void 0,p=n.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=d(y,s)),h&&h.length>0&&x.samples.push({pts:this.initPTS,dts:this.initPTS,data:h}),a=this.initPTS;f<p;){if(this.canParse(n,f)){var R=this.appendFrame(r,n,f);R?(this.frameIndex++,a=R.sample.pts,f+=R.length,l=f):f=p}else g.canParse(n,f)?(h=g.getID3Data(n,f),x.samples.push({pts:a,dts:a,data:h}),f+=h.length,l=f):f++;if(f===p&&l!==p){var O=Object(_.sliceUint8)(n,l);this.cachedData?this.cachedData=Object(S.appendUint8Array)(this.cachedData,O):this.cachedData=O}}return{audioTrack:r,avcTrack:Object(m.dummyTrack)(),id3Track:x,textTrack:Object(m.dummyTrack)()}},c.demuxSampleAes=function(n,s,h){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},c.flush=function(n){var s=this.cachedData;return s&&(this.cachedData=null,this.demux(s,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(m.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(m.dummyTrack)()}},c.destroy=function(){},i}(),d=function(c,o){return Object(N.isFiniteNumber)(c)?c*90:o*9e4};v.default=t},"./src/demux/chunk-cache.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return N});var N=function(){function m(){this.chunks=[],this.dataLength=0}var S=m.prototype;return S.push=function(t){this.chunks.push(t),this.dataLength+=t.length},S.flush=function(){var t=this.chunks,d=this.dataLength,i;if(t.length)t.length===1?i=t[0]:i=g(t,d);else return new Uint8Array(0);return this.reset(),i},S.reset=function(){this.chunks.length=0,this.dataLength=0},m}();function g(m,S){for(var _=new Uint8Array(S),t=0,d=0;d<m.length;d++){var i=m[d];_.set(i,t),t+=i.length}return _}},"./src/demux/dummy-demuxed-track.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"dummyTrack",function(){return N});function N(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/utils/logger.ts"),g=function(){function m(_){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=_,this.bytesAvailable=_.byteLength,this.word=0,this.bitsAvailable=0}var S=m.prototype;return S.loadWord=function(){var t=this.data,d=this.bytesAvailable,i=t.byteLength-d,c=new Uint8Array(4),o=Math.min(4,d);if(o===0)throw new Error("no bytes available");c.set(t.subarray(i,i+o)),this.word=new DataView(c.buffer).getUint32(0),this.bitsAvailable=o*8,this.bytesAvailable-=o},S.skipBits=function(t){var d;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,d=t>>3,t-=d>>3,this.bytesAvailable-=d,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},S.readBits=function(t){var d=Math.min(this.bitsAvailable,t),i=this.word>>>32-d;return t>32&&N.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=d,this.bitsAvailable>0?this.word<<=d:this.bytesAvailable>0&&this.loadWord(),d=t-d,d>0&&this.bitsAvailable?i<<d|this.readBits(d):i},S.skipLZ=function(){var t;for(t=0;t<this.bitsAvailable;++t)if((this.word&2147483648>>>t)!==0)return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},S.skipUEG=function(){this.skipBits(1+this.skipLZ())},S.skipEG=function(){this.skipBits(1+this.skipLZ())},S.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},S.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>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(t){for(var d=8,i=8,c,o=0;o<t;o++)i!==0&&(c=this.readEG(),i=(d+c+256)%256),d=i===0?d:i},S.readSPS=function(){var t=0,d=0,i=0,c=0,o,n,s,h=this.readUByte.bind(this),f=this.readBits.bind(this),l=this.readUEG.bind(this),a=this.readBoolean.bind(this),r=this.skipBits.bind(this),x=this.skipEG.bind(this),y=this.skipUEG.bind(this),p=this.skipScalingList.bind(this);h();var R=h();if(f(5),r(3),h(),y(),R===100||R===110||R===122||R===244||R===44||R===83||R===86||R===118||R===128){var O=l();if(O===3&&r(1),y(),y(),r(1),a())for(n=O!==3?8:12,s=0;s<n;s++)a()&&(s<6?p(16):p(64))}y();var b=l();if(b===0)l();else if(b===1)for(r(1),x(),x(),o=l(),s=0;s<o;s++)x();y(),r(1);var E=l(),w=l(),T=f(1);T===0&&r(1),r(1),a()&&(t=l(),d=l(),i=l(),c=l());var F=[1,1];if(a()&&a()){var M=h();switch(M){case 1:F=[1,1];break;case 2:F=[12,11];break;case 3:F=[10,11];break;case 4:F=[16,11];break;case 5:F=[40,33];break;case 6:F=[24,11];break;case 7:F=[20,11];break;case 8:F=[32,11];break;case 9:F=[80,33];break;case 10:F=[18,11];break;case 11:F=[15,11];break;case 12:F=[64,33];break;case 13:F=[160,99];break;case 14:F=[4,3];break;case 15:F=[3,2];break;case 16:F=[2,1];break;case 255:{F=[h()<<8|h(),h()<<8|h()];break}}}return{width:Math.ceil((E+1)*16-t*2-d*2),height:(2-T)*(w+1)*16-(T?2:4)*(i+c),pixelRatio:F}},S.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},m}();v.default=g},"./src/demux/id3.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"isHeader",function(){return N}),C.d(v,"isFooter",function(){return g}),C.d(v,"getID3Data",function(){return m}),C.d(v,"canParse",function(){return _}),C.d(v,"getTimeStamp",function(){return t}),C.d(v,"isTimeStampFrame",function(){return d}),C.d(v,"getID3Frames",function(){return c}),C.d(v,"decodeFrame",function(){return o}),C.d(v,"utf8ArrayToStr",function(){return l}),C.d(v,"testables",function(){return a});var N=function(p,R){return R+10<=p.length&&(p[R]===73&&p[R+1]===68&&p[R+2]===51&&(p[R+3]<255&&p[R+4]<255&&(p[R+6]<128&&p[R+7]<128&&p[R+8]<128&&p[R+9]<128)))},g=function(p,R){return R+10<=p.length&&(p[R]===51&&p[R+1]===68&&p[R+2]===73&&(p[R+3]<255&&p[R+4]<255&&(p[R+6]<128&&p[R+7]<128&&p[R+8]<128&&p[R+9]<128)))},m=function(p,R){for(var O=R,b=0;N(p,R);){b+=10;var E=S(p,R+6);b+=E,g(p,R+10)&&(b+=10),R+=b}return b>0?p.subarray(O,O+b):void 0},S=function(p,R){var O=0;return O=(p[R]&127)<<21,O|=(p[R+1]&127)<<14,O|=(p[R+2]&127)<<7,O|=p[R+3]&127,O},_=function(p,R){return N(p,R)&&S(p,R+6)+10<=p.length-R},t=function(p){for(var R=c(p),O=0;O<R.length;O++){var b=R[O];if(d(b))return f(b)}return},d=function(p){return p&&p.key==="PRIV"&&p.info==="com.apple.streaming.transportStreamTimestamp"},i=function(p){var R=String.fromCharCode(p[0],p[1],p[2],p[3]),O=S(p,4),b=10;return{type:R,size:O,data:p.subarray(b,b+O)}},c=function(p){for(var R=0,O=[];N(p,R);){var b=S(p,R+6);R+=10;for(var E=R+b;R+8<E;){var w=i(p.subarray(R)),T=o(w);T&&O.push(T),R+=w.size+10}g(p,R)&&(R+=10)}return O},o=function(p){return p.type==="PRIV"?n(p):p.type[0]==="W"?h(p):s(p)},n=function(p){if(p.size<2)return;var R=l(p.data,!0),O=new Uint8Array(p.data.subarray(R.length+1));return{key:p.type,info:R,data:O.buffer}},s=function(p){if(p.size<2)return;if(p.type==="TXXX"){var R=1,O=l(p.data.subarray(R),!0);R+=O.length+1;var b=l(p.data.subarray(R));return{key:p.type,info:O,data:b}}var E=l(p.data.subarray(1));return{key:p.type,data:E}},h=function(p){if(p.type==="WXXX"){if(p.size<2)return;var R=1,O=l(p.data.subarray(R),!0);R+=O.length+1;var b=l(p.data.subarray(R));return{key:p.type,info:O,data:b}}var E=l(p.data);return{key:p.type,data:E}},f=function(p){if(p.data.byteLength===8){var R=new Uint8Array(p.data),O=R[3]&1,b=(R[4]<<23)+(R[5]<<15)+(R[6]<<7)+R[7];return b/=45,O&&(b+=4772185884e-2),Math.round(b)}return},l=function(p,R){R===void 0&&(R=!1);var O=x();if(O){var b=O.decode(p);if(R){var E=b.indexOf("\0");return E!==-1?b.substring(0,E):b}return b.replace(/\0/g,"")}for(var w=p.length,T,F,M,L="",Y=0;Y<w;){if(T=p[Y++],T===0&&R)return L;if(T===0||T===3)continue;switch(T>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:L+=String.fromCharCode(T);break;case 12:case 13:F=p[Y++],L+=String.fromCharCode((T&31)<<6|F&63);break;case 14:F=p[Y++],M=p[Y++],L+=String.fromCharCode((T&15)<<12|(F&63)<<6|(M&63)<<0);break;default:}}return L},a={decodeTextFrame:s},r;function x(){return!r&&typeof self.TextDecoder!="undefined"&&(r=new self.TextDecoder("utf-8")),r}},"./src/demux/mp3demuxer.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/demux/base-audio-demuxer.ts"),g=C("./src/demux/id3.ts"),m=C("./src/utils/logger.ts"),S=C("./src/demux/mpegaudio.ts");function _(i,c){i.prototype=Object.create(c.prototype),i.prototype.constructor=i,t(i,c)}function t(i,c){return t=Object.setPrototypeOf||function(n,s){return n.__proto__=s,n},t(i,c)}var d=function(i){_(c,i);function c(){return i.apply(this,arguments)||this}var o=c.prototype;return o.resetInitSegment=function(s,h,f){i.prototype.resetInitSegment.call(this,s,h,f),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:s,duration:f,inputTimeScale:9e4,dropped:0}},c.probe=function(s){if(!s)return!1;for(var h=g.getID3Data(s,0)||[],f=h.length,l=s.length;f<l;f++)if(S.probe(s,f))return m.logger.log("MPEG Audio sync word found !"),!0;return!1},o.canParse=function(s,h){return S.canParse(s,h)},o.appendFrame=function(s,h,f){return this.initPTS===null?void 0:S.appendFrame(s,h,f,this.initPTS,this.frameIndex)},c}(N.default);d.minProbeByteLength=4,v.default=d},"./src/demux/mp4demuxer.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/utils/mp4-tools.ts"),g=C("./src/demux/dummy-demuxed-track.ts"),m=function(){function S(t,d){this.remainderData=null,this.config=void 0,this.config=d}var _=S.prototype;return _.resetTimeStamp=function(){},_.resetInitSegment=function(){},_.resetContiguity=function(){},S.probe=function(d){return Object(N.findBox)({data:d,start:0,end:Math.min(d.length,16384)},["moof"]).length>0},_.demux=function(d){var i=d,c=Object(g.dummyTrack)();if(this.config.progressive){this.remainderData&&(i=Object(N.appendUint8Array)(this.remainderData,d));var o=Object(N.segmentValidRange)(i);this.remainderData=o.remainder,c.samples=o.valid||new Uint8Array}else c.samples=i;return{audioTrack:Object(g.dummyTrack)(),avcTrack:c,id3Track:Object(g.dummyTrack)(),textTrack:Object(g.dummyTrack)()}},_.flush=function(){var d=Object(g.dummyTrack)();return d.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(g.dummyTrack)(),avcTrack:d,id3Track:Object(g.dummyTrack)(),textTrack:Object(g.dummyTrack)()}},_.demuxSampleAes=function(d,i,c){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},_.destroy=function(){},S}();m.minProbeByteLength=1024,v.default=m},"./src/demux/mpegaudio.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"appendFrame",function(){return t}),C.d(v,"parseHeader",function(){return d}),C.d(v,"isHeaderPattern",function(){return i}),C.d(v,"isHeader",function(){return c}),C.d(v,"canParse",function(){return o}),C.d(v,"probe",function(){return n});var N=null,g=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],m=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],S=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],_=[0,1,1,4];function t(s,h,f,l,a){if(f+24>h.length)return;var r=d(h,f);if(r&&f+r.frameLength<=h.length){var x=r.samplesPerFrame*9e4/r.sampleRate,y=l+a*x,p={unit:h.subarray(f,f+r.frameLength),pts:y,dts:y};return s.config=[],s.channelCount=r.channelCount,s.samplerate=r.sampleRate,s.samples.push(p),{sample:p,length:r.frameLength,missing:0}}}function d(s,h){var f=s[h+1]>>3&3,l=s[h+1]>>1&3,a=s[h+2]>>4&15,r=s[h+2]>>2&3;if(f!==1&&a!==0&&a!==15&&r!==3){var x=s[h+2]>>1&1,y=s[h+3]>>6,p=f===3?3-l:l===3?3:4,R=g[p*14+a-1]*1e3,O=f===3?0:f===2?1:2,b=m[O*3+r],E=y===3?1:2,w=S[f][l],T=_[l],F=w*8*T,M=Math.floor(w*R/b+x)*T;if(N===null){var L=navigator.userAgent||"",Y=L.match(/Chrome\/(\d+)/i);N=Y?parseInt(Y[1]):0}var K=!!N&&N<=87;return K&&l===2&&R>=224e3&&y===0&&(s[h+3]=s[h+3]|128),{sampleRate:b,channelCount:E,frameLength:M,samplesPerFrame:F}}}function i(s,h){return s[h]===255&&(s[h+1]&224)===224&&(s[h+1]&6)!==0}function c(s,h){return h+1<s.length&&i(s,h)}function o(s,h){var f=4;return i(s,h)&&f<=s.length-h}function n(s,h){if(h+1<s.length&&i(s,h)){var f=4,l=d(s,h),a=f;l!=null&&l.frameLength&&(a=l.frameLength);var r=h+a;return r===s.length||c(s,r)}return!1}},"./src/demux/sample-aes.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/crypt/decrypter.ts"),g=C("./src/demux/tsdemuxer.ts"),m=function(){function S(t,d,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new N.default(t,d,{removePKCS7Padding:!1})}var _=S.prototype;return _.decryptBuffer=function(d,i){this.decrypter.decrypt(d,this.keyData.key.buffer,this.keyData.iv.buffer,i)},_.decryptAacSample=function(d,i,c,o){var n=d[i].unit,s=n.subarray(16,n.length-n.length%16),h=s.buffer.slice(s.byteOffset,s.byteOffset+s.length),f=this;this.decryptBuffer(h,function(l){var a=new Uint8Array(l);n.set(a,16),o||f.decryptAacSamples(d,i+1,c)})},_.decryptAacSamples=function(d,i,c){for(;;i++){if(i>=d.length){c();return}if(d[i].unit.length<32)continue;var o=this.decrypter.isSync();if(this.decryptAacSample(d,i,c,o),!o)return}},_.getAvcEncryptedData=function(d){for(var i=Math.floor((d.length-48)/160)*16+16,c=new Int8Array(i),o=0,n=32;n<=d.length-16;n+=160,o+=16)c.set(d.subarray(n,n+16),o);return c},_.getAvcDecryptedUnit=function(d,i){for(var c=new Uint8Array(i),o=0,n=32;n<=d.length-16;n+=160,o+=16)d.set(c.subarray(o,o+16),n);return d},_.decryptAvcSample=function(d,i,c,o,n,s){var h=Object(g.discardEPB)(n.data),f=this.getAvcEncryptedData(h),l=this;this.decryptBuffer(f.buffer,function(a){n.data=l.getAvcDecryptedUnit(h,a),s||l.decryptAvcSamples(d,i,c+1,o)})},_.decryptAvcSamples=function(d,i,c,o){if(d instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;i++,c=0){if(i>=d.length){o();return}for(var n=d[i].units;!(c>=n.length);c++){var s=n[c];if(s.data.length<=48||s.type!==1&&s.type!==5)continue;var h=this.decrypter.isSync();if(this.decryptAvcSample(d,i,c,o,s,h),!h)return}}},S}();v.default=m},"./src/demux/transmuxer-interface.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return n});var N=C("./node_modules/webworkify-webpack/index.js"),g=C.n(N),m=C("./src/events.ts"),S=C("./src/demux/transmuxer.ts"),_=C("./src/utils/logger.ts"),t=C("./src/errors.ts"),d=C("./src/utils/mediasource-helper.ts"),i=C("./node_modules/eventemitter3/index.js"),c=C.n(i),o=Object(d.getMediaSource)()||{isTypeSupported:function(){return!1}},n=function(){function s(f,l,a,r){var x=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=f,this.id=l,this.onTransmuxComplete=a,this.onFlush=r;var y=f.config,p=function(w,T){T=T||{},T.frag=x.frag,T.id=x.id,f.trigger(w,T)};this.observer=new i.EventEmitter,this.observer.on(m.Events.FRAG_DECRYPTED,p),this.observer.on(m.Events.ERROR,p);var R={mp4:o.isTypeSupported("video/mp4"),mpeg:o.isTypeSupported("audio/mpeg"),mp3:o.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(y.enableWorker&&typeof Worker!="undefined"){_.logger.log("demuxing in webworker");var b;try{b=this.worker=N("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),b.addEventListener("message",this.onwmsg),b.onerror=function(E){f.trigger(m.Events.ERROR,{type:t.ErrorTypes.OTHER_ERROR,details:t.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(E.message+" ("+E.filename+":"+E.lineno+")")})},b.postMessage({cmd:"init",typeSupported:R,vendor:O,id:l,config:JSON.stringify(y)})}catch(E){_.logger.warn("Error in worker:",E),_.logger.error("Error while initializing DemuxerWorker, fallback to inline"),b&&self.URL.revokeObjectURL(b.objectURL),this.transmuxer=new S.default(this.observer,R,y,O,l),this.worker=null}}else this.transmuxer=new S.default(this.observer,R,y,O,l)}var h=s.prototype;return h.destroy=function(){var l=this.worker;if(l)l.removeEventListener("message",this.onwmsg),l.terminate(),this.worker=null;else{var a=this.transmuxer;a&&(a.destroy(),this.transmuxer=null)}var r=this.observer;r&&r.removeAllListeners(),this.observer=null},h.push=function(l,a,r,x,y,p,R,O,b,E){var w=this;b.transmuxing.start=self.performance.now();var T=this.transmuxer,F=this.worker,M=p?p.start:y.start,L=y.decryptdata,Y=this.frag,K=!(Y&&y.cc===Y.cc),A=!(Y&&b.level===Y.level),H=Y?b.sn-Y.sn:-1,U=this.part?b.part-this.part.index:1,I=!A&&(H===1||H===0&&U===1),G=self.performance.now();(A||H||y.stats.parsing.start===0)&&(y.stats.parsing.start=G),p&&(U||!I)&&(p.stats.parsing.start=G);var ne=new S.TransmuxState(K,I,O,A,M);if(!I||K){_.logger.log("[transmuxer-interface, "+y.type+"]: Starting new transmux session for sn: "+b.sn+" p: "+b.part+" level: "+b.level+" id: "+b.id+`
|
|
|
discontinuity: `+K+`
|
|
|
trackSwitch: `+A+`
|
|
|
contiguous: `+I+`
|
|
|
accurateTimeOffset: `+O+`
|
|
|
timeOffset: `+M);var oe=new S.TransmuxConfig(r,x,a,R,E);this.configureTransmuxer(oe)}if(this.frag=y,this.part=p,F)F.postMessage({cmd:"demux",data:l,decryptdata:L,chunkMeta:b,state:ne},l instanceof ArrayBuffer?[l]:[]);else if(T){var de=T.push(l,L,b,ne);Object(S.isPromise)(de)?de.then(function(Oe){w.handleTransmuxComplete(Oe)}):this.handleTransmuxComplete(de)}},h.flush=function(l){var a=this;l.transmuxing.start=self.performance.now();var r=this.transmuxer,x=this.worker;if(x)x.postMessage({cmd:"flush",chunkMeta:l});else if(r){var y=r.flush(l);Object(S.isPromise)(y)?y.then(function(p){a.handleFlushResult(p,l)}):this.handleFlushResult(y,l)}},h.handleFlushResult=function(l,a){var r=this;l.forEach(function(x){r.handleTransmuxComplete(x)}),this.onFlush(a)},h.onWorkerMessage=function(l){var a=l.data,r=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,r.trigger(a.event,a.data);break}}},h.configureTransmuxer=function(l){var a=this.worker,r=this.transmuxer;a?a.postMessage({cmd:"configure",config:l}):r&&r.configure(l)},h.handleTransmuxComplete=function(l){l.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(l)},s}()},"./src/demux/transmuxer-worker.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return t});var N=C("./src/demux/transmuxer.ts"),g=C("./src/events.ts"),m=C("./src/utils/logger.ts"),S=C("./node_modules/eventemitter3/index.js"),_=C.n(S);function t(n){var s=new S.EventEmitter,h=function(l,a){n.postMessage({event:l,data:a})};s.on(g.Events.FRAG_DECRYPTED,h),s.on(g.Events.ERROR,h),n.addEventListener("message",function(f){var l=f.data;switch(l.cmd){case"init":{var a=JSON.parse(l.config);n.transmuxer=new N.default(s,l.typeSupported,a,l.vendor,l.id),Object(m.enableLogs)(a.debug),h("init",null);break}case"configure":{n.transmuxer.configure(l.config);break}case"demux":{var r=n.transmuxer.push(l.data,l.decryptdata,l.chunkMeta,l.state);Object(N.isPromise)(r)?r.then(function(p){d(n,p)}):d(n,r);break}case"flush":{var x=l.chunkMeta,y=n.transmuxer.flush(x);Object(N.isPromise)(y)?y.then(function(p){c(n,p,x)}):c(n,y,x);break}default:break}})}function d(n,s){if(o(s.remuxResult))return;var h=[],f=s.remuxResult,l=f.audio,a=f.video;l&&i(h,l),a&&i(h,a),n.postMessage({event:"transmuxComplete",data:s},h)}function i(n,s){s.data1&&n.push(s.data1.buffer),s.data2&&n.push(s.data2.buffer)}function c(n,s,h){s.forEach(function(f){d(n,f)}),n.postMessage({event:"flush",data:h})}function o(n){return!n.audio&&!n.video&&!n.text&&!n.id3&&!n.initSegment}},"./src/demux/transmuxer.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return a}),C.d(v,"isPromise",function(){return y}),C.d(v,"TransmuxConfig",function(){return p}),C.d(v,"TransmuxState",function(){return R});var N=C("./src/events.ts"),g=C("./src/errors.ts"),m=C("./src/crypt/decrypter.ts"),S=C("./src/demux/aacdemuxer.ts"),_=C("./src/demux/mp4demuxer.ts"),t=C("./src/demux/tsdemuxer.ts"),d=C("./src/demux/mp3demuxer.ts"),i=C("./src/remux/mp4-remuxer.ts"),c=C("./src/remux/passthrough-remuxer.ts"),o=C("./src/demux/chunk-cache.ts"),n=C("./src/utils/mp4-tools.ts"),s=C("./src/utils/logger.ts"),h;try{h=self.performance.now.bind(self.performance)}catch(O){s.logger.debug("Unable to use Performance API on this environment"),h=self.Date.now}var f=[{demux:t.default,remux:i.default},{demux:_.default,remux:c.default},{demux:S.default,remux:i.default},{demux:d.default,remux:i.default}],l=1024;f.forEach(function(O){var b=O.demux;l=Math.max(l,b.minProbeByteLength)});var a=function(){function O(E,w,T,F,M){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 o.default,this.observer=E,this.typeSupported=w,this.config=T,this.vendor=F,this.id=M}var b=O.prototype;return b.configure=function(w){this.transmuxConfig=w,this.decrypter&&this.decrypter.reset()},b.push=function(w,T,F,M){var L=this,Y=F.transmuxing;Y.executeStart=h();var K=new Uint8Array(w),A=this.cache,H=this.config,U=this.currentTransmuxState,I=this.transmuxConfig;M&&(this.currentTransmuxState=M);var G=r(K,T);if(G&&G.method==="AES-128"){var ne=this.getDecrypter();if(H.enableSoftwareAES){var oe=ne.softwareDecrypt(K,G.key.buffer,G.iv.buffer);if(!oe)return Y.executeEnd=h(),x(F);K=new Uint8Array(oe)}else return this.decryptionPromise=ne.webCryptoDecrypt(K,G.key.buffer,G.iv.buffer).then(function(re){var $=L.push(re,null,F);return L.decryptionPromise=null,$}),this.decryptionPromise}var de=M||U,Oe=de.contiguous,Ae=de.discontinuity,pe=de.trackSwitch,Se=de.accurateTimeOffset,be=de.timeOffset,se=I.audioCodec,ee=I.videoCodec,B=I.defaultInitPts,V=I.duration,X=I.initSegmentData;if((Ae||pe)&&this.resetInitSegment(X,se,ee,V),Ae&&this.resetInitialTimestamp(B),Oe||this.resetContiguity(),this.needsProbing(K,Ae,pe)){if(A.dataLength){var Q=A.flush();K=Object(n.appendUint8Array)(Q,K)}this.configureTransmuxer(K,I)}var Z=this.transmux(K,G,be,Se,F),ie=this.currentTransmuxState;return ie.contiguous=!0,ie.discontinuity=!1,ie.trackSwitch=!1,Y.executeEnd=h(),Z},b.flush=function(w){var T=this,F=w.transmuxing;F.executeStart=h();var M=this.decrypter,L=this.cache,Y=this.currentTransmuxState,K=this.decryptionPromise;if(K)return K.then(function(){return T.flush(w)});var A=[],H=Y.timeOffset;if(M){var U=M.flush();U&&A.push(this.push(U,null,w))}var I=L.dataLength;L.reset();var G=this.demuxer,ne=this.remuxer;if(!G||!ne)return I>=l&&this.observer.emit(N.Events.ERROR,N.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),F.executeEnd=h(),[x(w)];var oe=G.flush(H);return y(oe)?oe.then(function(de){return T.flushRemux(A,de,w),A}):(this.flushRemux(A,oe,w),A)},b.flushRemux=function(w,T,F){var M=T.audioTrack,L=T.avcTrack,Y=T.id3Track,K=T.textTrack,A=this.currentTransmuxState,H=A.accurateTimeOffset,U=A.timeOffset;s.logger.log("[transmuxer.ts]: Flushed fragment "+F.sn+(F.part>-1?" p: "+F.part:"")+" of level "+F.level);var I=this.remuxer.remux(M,L,Y,K,U,H,!0,this.id);w.push({remuxResult:I,chunkMeta:F}),F.transmuxing.executeEnd=h()},b.resetInitialTimestamp=function(w){var T=this.demuxer,F=this.remuxer;if(!T||!F)return;T.resetTimeStamp(w),F.resetTimeStamp(w)},b.resetContiguity=function(){var w=this.demuxer,T=this.remuxer;if(!w||!T)return;w.resetContiguity(),T.resetNextTimestamp()},b.resetInitSegment=function(w,T,F,M){var L=this.demuxer,Y=this.remuxer;if(!L||!Y)return;L.resetInitSegment(T,F,M),Y.resetInitSegment(w,T,F)},b.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},b.transmux=function(w,T,F,M,L){var Y;return T&&T.method==="SAMPLE-AES"?Y=this.transmuxSampleAes(w,T,F,M,L):Y=this.transmuxUnencrypted(w,F,M,L),Y},b.transmuxUnencrypted=function(w,T,F,M){var L=this.demuxer.demux(w,T,!1,!this.config.progressive),Y=L.audioTrack,K=L.avcTrack,A=L.id3Track,H=L.textTrack,U=this.remuxer.remux(Y,K,A,H,T,F,!1,this.id);return{remuxResult:U,chunkMeta:M}},b.transmuxSampleAes=function(w,T,F,M,L){var Y=this;return this.demuxer.demuxSampleAes(w,T,F).then(function(K){var A=Y.remuxer.remux(K.audioTrack,K.avcTrack,K.id3Track,K.textTrack,F,M,!1,Y.id);return{remuxResult:A,chunkMeta:L}})},b.configureTransmuxer=function(w,T){for(var F=this.config,M=this.observer,L=this.typeSupported,Y=this.vendor,K=T.audioCodec,A=T.defaultInitPts,H=T.duration,U=T.initSegmentData,I=T.videoCodec,G,ne=0,oe=f.length;ne<oe;ne++)if(f[ne].demux.probe(w)){G=f[ne];break}G||(s.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),G={demux:_.default,remux:c.default});var de=this.demuxer,Oe=this.remuxer,Ae=G.remux,pe=G.demux;(!Oe||!(Oe instanceof Ae))&&(this.remuxer=new Ae(M,F,L,Y)),(!de||!(de instanceof pe))&&(this.demuxer=new pe(M,F,L),this.probe=pe.probe),this.resetInitSegment(U,K,I,H),this.resetInitialTimestamp(A)},b.needsProbing=function(w,T,F){return!this.demuxer||!this.remuxer||T||F},b.getDecrypter=function(){var w=this.decrypter;return w||(w=this.decrypter=new m.default(this.observer,this.config)),w},O}();function r(O,b){var E=null;return O.byteLength>0&&b!=null&&b.key!=null&&b.iv!==null&&b.method!=null&&(E=b),E}var x=function(b){return{remuxResult:{},chunkMeta:b}};function y(O){return"then"in O&&O.then instanceof Function}var p=function(b,E,w,T,F){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=b,this.videoCodec=E,this.initSegmentData=w,this.duration=T,this.defaultInitPts=F},R=function(b,E,w,T,F){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=b,this.contiguous=E,this.accurateTimeOffset=w,this.trackSwitch=T,this.timeOffset=F}},"./src/demux/tsdemuxer.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"discardEPB",function(){return x});var N=C("./src/demux/adts.ts"),g=C("./src/demux/mpegaudio.ts"),m=C("./src/demux/exp-golomb.ts"),S=C("./src/demux/id3.ts"),_=C("./src/demux/sample-aes.ts"),t=C("./src/events.ts"),d=C("./src/utils/mp4-tools.ts"),i=C("./src/utils/logger.ts"),c=C("./src/errors.ts"),o={video:1,audio:2,id3:3,text:4},n=function(){function y(R,O,b){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=R,this.config=O,this.typeSupported=b}y.probe=function(O){var b=y.syncOffset(O);return b<0?!1:(b&&i.logger.warn("MPEG2-TS detected but first sync word found @ offset "+b+", junk ahead ?"),!0)},y.syncOffset=function(O){for(var b=Math.min(1e3,O.length-3*188),E=0;E<b;){if(O[E]===71&&O[E+188]===71&&O[E+2*188]===71)return E;E++}return-1},y.createTrack=function(O,b){return{container:O==="video"||O==="audio"?"video/mp2t":void 0,type:O,id:o[O],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:O==="audio"?b:void 0}};var p=y.prototype;return p.resetInitSegment=function(O,b,E){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=y.createTrack("video",E),this._audioTrack=y.createTrack("audio",E),this._id3Track=y.createTrack("id3",E),this._txtTrack=y.createTrack("text",E),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=O,this.videoCodec=b,this._duration=E},p.resetTimeStamp=function(){},p.resetContiguity=function(){var O=this._audioTrack,b=this._avcTrack,E=this._id3Track;O&&(O.pesData=null),b&&(b.pesData=null),E&&(E.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},p.demux=function(O,b,E,w){E===void 0&&(E=!1),w===void 0&&(w=!1),E||(this.sampleAes=null);var T,F=this._avcTrack,M=this._audioTrack,L=this._id3Track,Y=F.pid,K=F.pesData,A=M.pid,H=L.pid,U=M.pesData,I=L.pesData,G=!1,ne=this.pmtParsed,oe=this._pmtId,de=O.length;if(this.remainderData&&(O=Object(d.appendUint8Array)(this.remainderData,O),de=O.length,this.remainderData=null),de<188&&!w)return this.remainderData=O,{audioTrack:M,avcTrack:F,id3Track:L,textTrack:this._txtTrack};var Oe=Math.max(0,y.syncOffset(O));de-=(de+Oe)%188,de<O.byteLength&&!w&&(this.remainderData=new Uint8Array(O.buffer,de,O.buffer.byteLength-de));for(var Ae=Oe;Ae<de;Ae+=188)if(O[Ae]===71){var pe=!!(O[Ae+1]&64),Se=((O[Ae+1]&31)<<8)+O[Ae+2],be=(O[Ae+3]&48)>>4,se=void 0;if(be>1){if(se=Ae+5+O[Ae+4],se===Ae+188)continue}else se=Ae+4;switch(Se){case Y:pe&&(K&&(T=l(K))&&this.parseAVCPES(T,!1),K={data:[],size:0}),K&&(K.data.push(O.subarray(se,Ae+188)),K.size+=Ae+188-se);break;case A:pe&&(U&&(T=l(U))&&(M.isAAC?this.parseAACPES(T):this.parseMPEGPES(T)),U={data:[],size:0}),U&&(U.data.push(O.subarray(se,Ae+188)),U.size+=Ae+188-se);break;case H:pe&&(I&&(T=l(I))&&this.parseID3PES(T),I={data:[],size:0}),I&&(I.data.push(O.subarray(se,Ae+188)),I.size+=Ae+188-se);break;case 0:pe&&(se+=O[se]+1),oe=this._pmtId=h(O,se);break;case oe:{pe&&(se+=O[se]+1);var ee=f(O,se,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,E);Y=ee.avc,Y>0&&(F.pid=Y),A=ee.audio,A>0&&(M.pid=A,M.isAAC=ee.isAAC),H=ee.id3,H>0&&(L.pid=H),G&&!ne&&(i.logger.log("reparse from beginning"),G=!1,Ae=Oe-188),ne=this.pmtParsed=!0;break}case 17:case 8191:break;default:G=!0;break}}else this.observer.emit(t.Events.ERROR,t.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});F.pesData=K,M.pesData=U,L.pesData=I;var B={audioTrack:M,avcTrack:F,id3Track:L,textTrack:this._txtTrack};return w&&this.extractRemainingSamples(B),B},p.flush=function(){var O=this.remainderData;this.remainderData=null;var b;return O?b=this.demux(O,-1,!1,!0):b={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(b),this.sampleAes?this.decrypt(b,this.sampleAes):b},p.extractRemainingSamples=function(O){var b=O.audioTrack,E=O.avcTrack,w=O.id3Track,T=E.pesData,F=b.pesData,M=w.pesData,L;T&&(L=l(T))?(this.parseAVCPES(L,!0),E.pesData=null):E.pesData=T,F&&(L=l(F))?(b.isAAC?this.parseAACPES(L):this.parseMPEGPES(L),b.pesData=null):(F!=null&&F.size&&i.logger.log("last AAC PES packet truncated,might overlap between fragments"),b.pesData=F),M&&(L=l(M))?(this.parseID3PES(L),w.pesData=null):w.pesData=M},p.demuxSampleAes=function(O,b,E){var w=this.demux(O,E,!0,!this.config.progressive),T=this.sampleAes=new _.default(this.observer,this.config,b);return this.decrypt(w,T)},p.decrypt=function(O,b){return new Promise(function(E){var w=O.audioTrack,T=O.avcTrack;w.samples&&w.isAAC?b.decryptAacSamples(w.samples,0,function(){T.samples?b.decryptAvcSamples(T.samples,0,0,function(){E(O)}):E(O)}):T.samples&&b.decryptAvcSamples(T.samples,0,0,function(){E(O)})})},p.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},p.parseAVCPES=function(O,b){var E=this,w=this._avcTrack,T=this.parseAVCNALu(O.data),F=!1,M=this.avcSample,L,Y=!1;O.data=null,M&&T.length&&!w.audFound&&(a(M,w),M=this.avcSample=s(!1,O.pts,O.dts,"")),T.forEach(function(K){switch(K.type){case 1:{L=!0,M||(M=E.avcSample=s(!0,O.pts,O.dts,"")),F&&(M.debug+="NDR "),M.frame=!0;var A=K.data;if(Y&&A.length>4){var H=new m.default(A).readSliceType();(H===2||H===4||H===7||H===9)&&(M.key=!0)}break}case 5:L=!0,M||(M=E.avcSample=s(!0,O.pts,O.dts,"")),F&&(M.debug+="IDR "),M.key=!0,M.frame=!0;break;case 6:{L=!0,F&&M&&(M.debug+="SEI ");var U=new m.default(x(K.data));U.readUByte();for(var I=0,G=0,ne=!1,oe=0;!ne&&U.bytesAvailable>1;){I=0;do oe=U.readUByte(),I+=oe;while(oe===255);G=0;do oe=U.readUByte(),G+=oe;while(oe===255);if(I===4&&U.bytesAvailable!==0){ne=!0;var de=U.readUByte();if(de===181){var Oe=U.readUShort();if(Oe===49){var Ae=U.readUInt();if(Ae===1195456820){var pe=U.readUByte();if(pe===3){for(var Se=U.readUByte(),be=U.readUByte(),se=31&Se,ee=[Se,be],B=0;B<se;B++)ee.push(U.readUByte()),ee.push(U.readUByte()),ee.push(U.readUByte());r(E._txtTrack.samples,{type:3,pts:O.pts,bytes:ee})}}}}}else if(I===5&&U.bytesAvailable!==0){if(ne=!0,G>16){for(var V=[],X=0;X<16;X++)V.push(U.readUByte().toString(16)),(X===3||X===5||X===7||X===9)&&V.push("-");for(var Q=G-16,Z=new Uint8Array(Q),ie=0;ie<Q;ie++)Z[ie]=U.readUByte();r(E._txtTrack.samples,{pts:O.pts,payloadType:I,uuid:V.join(""),userData:Object(S.utf8ArrayToStr)(Z),userDataBytes:Z})}}else if(G<U.bytesAvailable)for(var re=0;re<G;re++)U.readUByte()}break}case 7:if(L=!0,Y=!0,F&&M&&(M.debug+="SPS "),!w.sps){var $=new m.default(K.data),J=$.readSPS();w.width=J.width,w.height=J.height,w.pixelRatio=J.pixelRatio,w.sps=[K.data],w.duration=E._duration;for(var le=K.data.subarray(1,4),ue="avc1.",xe=0;xe<3;xe++){var Me=le[xe].toString(16);Me.length<2&&(Me="0"+Me),ue+=Me}w.codec=ue}break;case 8:L=!0,F&&M&&(M.debug+="PPS "),w.pps||(w.pps=[K.data]);break;case 9:L=!1,w.audFound=!0,M&&a(M,w),M=E.avcSample=s(!1,O.pts,O.dts,F?"AUD ":"");break;case 12:L=!1;break;default:L=!1,M&&(M.debug+="unknown NAL "+K.type+" ");break}if(M&&L){var Xe=M.units;Xe.push(K)}}),b&&M&&(a(M,w),this.avcSample=null)},p.getLastNalUnit=function(){var O,b=this.avcSample,E;if(!b||b.units.length===0){var w=this._avcTrack.samples;b=w[w.length-1]}if((O=b)!==null&&O!==void 0&&O.units){var T=b.units;E=T[T.length-1]}return E},p.parseAVCNALu=function(O){var b=O.byteLength,E=this._avcTrack,w=E.naluState||0,T=w,F=[],M=0,L,Y,K,A=-1,H=0;for(w===-1&&(A=0,H=O[0]&31,w=0,M=1);M<b;){if(L=O[M++],!w){w=L?0:1;continue}if(w===1){w=L?0:2;continue}if(!L)w=3;else if(L===1){if(A>=0){var U={data:O.subarray(A,M-w-1),type:H};F.push(U)}else{var I=this.getLastNalUnit();if(I&&(T&&M<=4-T&&(I.state&&(I.data=I.data.subarray(0,I.data.byteLength-T))),Y=M-w-1,Y>0)){var G=new Uint8Array(I.data.byteLength+Y);G.set(I.data,0),G.set(O.subarray(0,Y),I.data.byteLength),I.data=G,I.state=0}}M<b?(K=O[M]&31,A=M,H=K,w=0):w=-1}else w=0}if(A>=0&&w>=0){var ne={data:O.subarray(A,b),type:H,state:w};F.push(ne)}if(F.length===0){var oe=this.getLastNalUnit();if(oe){var de=new Uint8Array(oe.data.byteLength+O.byteLength);de.set(oe.data,0),de.set(O,oe.data.byteLength),oe.data=de}}return E.naluState=w,F},p.parseAACPES=function(O){var b=0,E=this._audioTrack,w=this.aacOverFlow,T=O.data;if(w){this.aacOverFlow=null;var F=w.sample.unit.byteLength,M=Math.min(w.missing,F),L=F-M;w.sample.unit.set(T.subarray(0,M),L),E.samples.push(w.sample),b=w.missing}var Y,K;for(Y=b,K=T.length;Y<K-1&&!N.isHeader(T,Y);Y++);if(Y!==b){var A,H;if(Y<K-1?(A="AAC PES did not start with ADTS header,offset:"+Y,H=!1):(A="no ADTS header found in AAC PES",H=!0),i.logger.warn("parsing error:"+A),this.observer.emit(t.Events.ERROR,t.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:H,reason:A}),H)return}N.initTrackConfig(E,this.observer,T,Y,this.audioCodec);var U;if(O.pts!==void 0)U=O.pts;else if(w){var I=N.getFrameDuration(E.samplerate);U=w.sample.pts+I}else{i.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var G=0;Y<K;)if(N.isHeader(T,Y)){if(Y+5<K){var ne=N.appendFrame(E,T,Y,U,G);if(ne)if(ne.missing)this.aacOverFlow=ne;else{Y+=ne.length,G++;continue}}break}else Y++},p.parseMPEGPES=function(O){var b=O.data,E=b.length,w=0,T=0,F=O.pts;if(F===void 0){i.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;T<E;)if(g.isHeader(b,T)){var M=g.appendFrame(this._audioTrack,b,T,F,w);if(M)T+=M.length,w++;else break}else T++},p.parseID3PES=function(O){if(O.pts===void 0){i.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(O)},y}();n.minProbeByteLength=188;function s(y,p,R,O){return{key:y,frame:!1,pts:p,dts:R,units:[],debug:O,length:0}}function h(y,p){return(y[p+10]&31)<<8|y[p+11]}function f(y,p,R,O){var b={audio:-1,avc:-1,id3:-1,isAAC:!0},E=(y[p+1]&15)<<8|y[p+2],w=p+3+E-4,T=(y[p+10]&15)<<8|y[p+11];for(p+=12+T;p<w;){var F=(y[p+1]&31)<<8|y[p+2];switch(y[p]){case 207:if(!O){i.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:b.audio===-1&&(b.audio=F);break;case 21:b.id3===-1&&(b.id3=F);break;case 219:if(!O){i.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:b.avc===-1&&(b.avc=F);break;case 3:case 4:R?b.audio===-1&&(b.audio=F,b.isAAC=!1):i.logger.log("MPEG audio found, not supported in this browser");break;case 36:i.logger.warn("Unsupported HEVC stream type found");break;default:break}p+=((y[p+3]&15)<<8|y[p+4])+5}return b}function l(y){var p=0,R,O,b,E,w,T=y.data;if(!y||y.size===0)return null;for(;T[0].length<19&&T.length>1;){var F=new Uint8Array(T[0].length+T[1].length);F.set(T[0]),F.set(T[1],T[0].length),T[0]=F,T.splice(1,1)}R=T[0];var M=(R[0]<<16)+(R[1]<<8)+R[2];if(M===1){if(O=(R[4]<<8)+R[5],O&&O>y.size-6)return null;var L=R[7];L&192&&(E=(R[9]&14)*536870912+(R[10]&255)*4194304+(R[11]&254)*16384+(R[12]&255)*128+(R[13]&254)/2,L&64?(w=(R[14]&14)*536870912+(R[15]&255)*4194304+(R[16]&254)*16384+(R[17]&255)*128+(R[18]&254)/2,E-w>60*9e4&&(i.logger.warn(Math.round((E-w)/9e4)+"s delta between PTS and DTS, align them"),E=w)):w=E),b=R[8];var Y=b+9;if(y.size<=Y)return null;y.size-=Y;for(var K=new Uint8Array(y.size),A=0,H=T.length;A<H;A++){R=T[A];var U=R.byteLength;if(Y)if(Y>U){Y-=U;continue}else R=R.subarray(Y),U-=Y,Y=0;K.set(R,p),p+=U}return O&&(O-=b+3),{data:K,pts:E,dts:w,len:O}}return null}function a(y,p){if(y.units.length&&y.frame){if(y.pts===void 0){var R=p.samples,O=R.length;if(O){var b=R[O-1];y.pts=b.pts,y.dts=b.dts}else{p.dropped++;return}}p.samples.push(y)}y.debug.length&&i.logger.log(y.pts+"/"+y.dts+":"+y.debug)}function r(y,p){var R=y.length;if(R>0){if(p.pts>=y[R-1].pts)y.push(p);else for(var O=R-1;O>=0;O--)if(p.pts<y[O].pts){y.splice(O,0,p);break}}else y.push(p)}function x(y){for(var p=y.byteLength,R=[],O=1;O<p-2;)y[O]===0&&y[O+1]===0&&y[O+2]===3?(R.push(O+2),O+=2):O++;if(R.length===0)return y;var b=p-R.length,E=new Uint8Array(b),w=0;for(O=0;O<b;w++,O++)w===R[0]&&(w++,R.shift()),E[O]=y[w];return E}v.default=n},"./src/errors.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"ErrorTypes",function(){return N}),C.d(v,"ErrorDetails",function(){return g});var N;(function(m){m.NETWORK_ERROR="networkError",m.MEDIA_ERROR="mediaError",m.KEY_SYSTEM_ERROR="keySystemError",m.MUX_ERROR="muxError",m.OTHER_ERROR="otherError"})(N||(N={}));var g;(function(m){m.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",m.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",m.KEY_SYSTEM_NO_SESSION="keySystemNoSession",m.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",m.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",m.MANIFEST_LOAD_ERROR="manifestLoadError",m.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",m.MANIFEST_PARSING_ERROR="manifestParsingError",m.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",m.LEVEL_EMPTY_ERROR="levelEmptyError",m.LEVEL_LOAD_ERROR="levelLoadError",m.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",m.LEVEL_SWITCH_ERROR="levelSwitchError",m.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",m.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",m.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",m.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",m.FRAG_LOAD_ERROR="fragLoadError",m.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",m.FRAG_DECRYPT_ERROR="fragDecryptError",m.FRAG_PARSING_ERROR="fragParsingError",m.REMUX_ALLOC_ERROR="remuxAllocError",m.KEY_LOAD_ERROR="keyLoadError",m.KEY_LOAD_TIMEOUT="keyLoadTimeOut",m.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",m.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",m.BUFFER_APPEND_ERROR="bufferAppendError",m.BUFFER_APPENDING_ERROR="bufferAppendingError",m.BUFFER_STALLED_ERROR="bufferStalledError",m.BUFFER_FULL_ERROR="bufferFullError",m.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",m.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",m.INTERNAL_EXCEPTION="internalException",m.INTERNAL_ABORTED="aborted",m.UNKNOWN="unknown"})(g||(g={}))},"./src/events.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"Events",function(){return N});var N;(function(g){g.MEDIA_ATTACHING="hlsMediaAttaching",g.MEDIA_ATTACHED="hlsMediaAttached",g.MEDIA_DETACHING="hlsMediaDetaching",g.MEDIA_DETACHED="hlsMediaDetached",g.BUFFER_RESET="hlsBufferReset",g.BUFFER_CODECS="hlsBufferCodecs",g.BUFFER_CREATED="hlsBufferCreated",g.BUFFER_APPENDING="hlsBufferAppending",g.BUFFER_APPENDED="hlsBufferAppended",g.BUFFER_EOS="hlsBufferEos",g.BUFFER_FLUSHING="hlsBufferFlushing",g.BUFFER_FLUSHED="hlsBufferFlushed",g.MANIFEST_LOADING="hlsManifestLoading",g.MANIFEST_LOADED="hlsManifestLoaded",g.MANIFEST_PARSED="hlsManifestParsed",g.LEVEL_SWITCHING="hlsLevelSwitching",g.LEVEL_SWITCHED="hlsLevelSwitched",g.LEVEL_LOADING="hlsLevelLoading",g.LEVEL_LOADED="hlsLevelLoaded",g.LEVEL_UPDATED="hlsLevelUpdated",g.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",g.LEVELS_UPDATED="hlsLevelsUpdated",g.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",g.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",g.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",g.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",g.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",g.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",g.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",g.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",g.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",g.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",g.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",g.CUES_PARSED="hlsCuesParsed",g.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",g.INIT_PTS_FOUND="hlsInitPtsFound",g.FRAG_LOADING="hlsFragLoading",g.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",g.FRAG_LOADED="hlsFragLoaded",g.FRAG_DECRYPTED="hlsFragDecrypted",g.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",g.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",g.FRAG_PARSING_METADATA="hlsFragParsingMetadata",g.FRAG_PARSED="hlsFragParsed",g.FRAG_BUFFERED="hlsFragBuffered",g.FRAG_CHANGED="hlsFragChanged",g.FPS_DROP="hlsFpsDrop",g.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",g.ERROR="hlsError",g.DESTROYING="hlsDestroying",g.KEY_LOADING="hlsKeyLoading",g.KEY_LOADED="hlsKeyLoaded",g.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",g.BACK_BUFFER_REACHED="hlsBackBufferReached"})(N||(N={}))},"./src/hls.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return y});var N=C("./node_modules/url-toolkit/src/url-toolkit.js"),g=C.n(N),m=C("./src/loader/playlist-loader.ts"),S=C("./src/loader/key-loader.ts"),_=C("./src/controller/id3-track-controller.ts"),t=C("./src/controller/latency-controller.ts"),d=C("./src/controller/level-controller.ts"),i=C("./src/controller/fragment-tracker.ts"),c=C("./src/controller/stream-controller.ts"),o=C("./src/is-supported.ts"),n=C("./src/utils/logger.ts"),s=C("./src/config.ts"),h=C("./node_modules/eventemitter3/index.js"),f=C.n(h),l=C("./src/events.ts"),a=C("./src/errors.ts");function r(p,R){for(var O=0;O<R.length;O++){var b=R[O];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}function x(p,R,O){return R&&r(p.prototype,R),O&&r(p,O),p}var y=function(){p.isSupported=function(){return Object(o.isSupported)()};function p(O){O===void 0&&(O={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new h.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var b=this.config=Object(s.mergeConfig)(p.DefaultConfig,O);this.userConfig=O,Object(n.enableLogs)(b.debug),this._autoLevelCapping=-1,b.progressive&&Object(s.enableStreamingMode)(b);var E=b.abrController,w=b.bufferController,T=b.capLevelController,F=b.fpsController,M=this.abrController=new E(this),L=this.bufferController=new w(this),Y=this.capLevelController=new T(this),K=new F(this),A=new m.default(this),H=new S.default(this),U=new _.default(this),I=this.levelController=new d.default(this),G=new i.FragmentTracker(this),ne=this.streamController=new c.default(this,G);Y.setStreamController(ne),K.setStreamController(ne);var oe=[I,ne];this.networkControllers=oe;var de=[A,H,M,L,Y,K,U,G];this.audioTrackController=this.createController(b.audioTrackController,null,oe),this.createController(b.audioStreamController,G,oe),this.subtitleTrackController=this.createController(b.subtitleTrackController,null,oe),this.createController(b.subtitleStreamController,G,oe),this.createController(b.timelineController,null,de),this.emeController=this.createController(b.emeController,null,de),this.cmcdController=this.createController(b.cmcdController,null,de),this.latencyController=this.createController(t.default,null,de),this.coreComponents=de}var R=p.prototype;return R.createController=function(b,E,w){if(b){var T=E?new b(this,E):new b(this);return w&&w.push(T),T}return null},R.on=function(b,E,w){w===void 0&&(w=this),this._emitter.on(b,E,w)},R.once=function(b,E,w){w===void 0&&(w=this),this._emitter.once(b,E,w)},R.removeAllListeners=function(b){this._emitter.removeAllListeners(b)},R.off=function(b,E,w,T){w===void 0&&(w=this),this._emitter.off(b,E,w,T)},R.listeners=function(b){return this._emitter.listeners(b)},R.emit=function(b,E,w){return this._emitter.emit(b,E,w)},R.trigger=function(b,E){if(this.config.debug)return this.emit(b,b,E);try{return this.emit(b,b,E)}catch(w){n.logger.error("An internal error happened while handling event "+b+'. Error message: "'+w.message+'". Here is a stacktrace:',w),this.trigger(l.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:b,error:w})}return!1},R.listenerCount=function(b){return this._emitter.listenerCount(b)},R.destroy=function(){n.logger.log("destroy"),this.trigger(l.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(b){return b.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(b){return b.destroy()}),this.coreComponents.length=0},R.attachMedia=function(b){n.logger.log("attachMedia"),this._media=b,this.trigger(l.Events.MEDIA_ATTACHING,{media:b})},R.detachMedia=function(){n.logger.log("detachMedia"),this.trigger(l.Events.MEDIA_DETACHING,void 0),this._media=null},R.loadSource=function(b){this.stopLoad();var E=this.media,w=this.url,T=this.url=N.buildAbsoluteURL(self.location.href,b,{alwaysNormalize:!0});n.logger.log("loadSource:"+T),E&&w&&w!==T&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(E)),this.trigger(l.Events.MANIFEST_LOADING,{url:b})},R.startLoad=function(b){b===void 0&&(b=-1),n.logger.log("startLoad("+b+")"),this.networkControllers.forEach(function(E){E.startLoad(b)})},R.stopLoad=function(){n.logger.log("stopLoad"),this.networkControllers.forEach(function(b){b.stopLoad()})},R.swapAudioCodec=function(){n.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},R.recoverMediaError=function(){n.logger.log("recoverMediaError");var b=this._media;this.detachMedia(),b&&this.attachMedia(b)},R.removeLevel=function(b,E){E===void 0&&(E=0),this.levelController.removeLevel(b,E)},x(p,[{key:"levels",get:function(){var b=this.levelController.levels;return b||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(b){n.logger.log("set currentLevel:"+b),this.loadLevel=b,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(b){n.logger.log("set nextLevel:"+b),this.levelController.manualLevel=b,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(b){n.logger.log("set loadLevel:"+b),this.levelController.manualLevel=b}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(b){this.levelController.nextLoadLevel=b}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(b){n.logger.log("set firstLevel:"+b),this.levelController.firstLevel=b}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(b){n.logger.log("set startLevel:"+b),b!==-1&&(b=Math.max(b,this.minAutoLevel)),this.levelController.startLevel=b}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(b){var E=!!b;E!==this.config.capLevelToPlayerSize&&(E?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=E)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(b){this._autoLevelCapping!==b&&(n.logger.log("set autoLevelCapping:"+b),this._autoLevelCapping=b)}},{key:"bandwidthEstimate",get:function(){var b=this.abrController.bwEstimator;return b?b.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var b=this.levels,E=this.config.minAutoBitrate;if(!b)return 0;for(var w=b.length,T=0;T<w;T++)if(b[T].maxBitrate>E)return T;return 0}},{key:"maxAutoLevel",get:function(){var b=this.levels,E=this.autoLevelCapping,w;return E===-1&&b&&b.length?w=b.length-1:w=E,w}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(b){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,b)}},{key:"audioTracks",get:function(){var b=this.audioTrackController;return b?b.audioTracks:[]}},{key:"audioTrack",get:function(){var b=this.audioTrackController;return b?b.audioTrack:-1},set:function(b){var E=this.audioTrackController;E&&(E.audioTrack=b)}},{key:"subtitleTracks",get:function(){var b=this.subtitleTrackController;return b?b.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var b=this.subtitleTrackController;return b?b.subtitleTrack:-1},set:function(b){var E=this.subtitleTrackController;E&&(E.subtitleTrack=b)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var b=this.subtitleTrackController;return b?b.subtitleDisplay:!1},set:function(b){var E=this.subtitleTrackController;E&&(E.subtitleDisplay=b)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(b){this.config.lowLatencyMode=b}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return l.Events}},{key:"ErrorTypes",get:function(){return a.ErrorTypes}},{key:"ErrorDetails",get:function(){return a.ErrorDetails}},{key:"DefaultConfig",get:function(){return p.defaultConfig?p.defaultConfig:s.hlsDefaultConfig},set:function(b){p.defaultConfig=b}}]),p}();y.defaultConfig=void 0},"./src/is-supported.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"isSupported",function(){return m}),C.d(v,"changeTypeSupported",function(){return S});var N=C("./src/utils/mediasource-helper.ts");function g(){return self.SourceBuffer||self.WebKitSourceBuffer}function m(){var _=Object(N.getMediaSource)();if(!_)return!1;var t=g(),d=_&&typeof _.isTypeSupported=="function"&&_.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!t||t.prototype&&typeof t.prototype.appendBuffer=="function"&&typeof t.prototype.remove=="function";return!!d&&!!i}function S(){var _,t=g();return typeof(t==null||((_=t.prototype)===null||_===void 0)?void 0:_.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return n}),C.d(v,"LoadError",function(){return h});var N=C("./src/polyfills/number.ts"),g=C("./src/errors.ts");function m(f,l){f.prototype=Object.create(l.prototype),f.prototype.constructor=f,i(f,l)}function S(f){var l=typeof Map=="function"?new Map:void 0;return S=function(r){if(r===null||!d(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l!="undefined"){if(l.has(r))return l.get(r);l.set(r,x)}function x(){return _(r,arguments,c(this).constructor)}return x.prototype=Object.create(r.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),i(x,r)},S(f)}function _(f,l,a){return t()?_=Reflect.construct:_=function(x,y,p){var R=[null];R.push.apply(R,y);var O=Function.bind.apply(x,R),b=new O;return p&&i(b,p.prototype),b},_.apply(null,arguments)}function t(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(f){return!1}}function d(f){return Function.toString.call(f).indexOf("[native code]")!==-1}function i(f,l){return i=Object.setPrototypeOf||function(r,x){return r.__proto__=x,r},i(f,l)}function c(f){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},c(f)}var o=Math.pow(2,17),n=function(){function f(a){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=a}var l=f.prototype;return l.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},l.abort=function(){this.loader&&this.loader.abort()},l.load=function(r,x){var y=this,p=r.url;if(!p)return Promise.reject(new h({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:r,networkDetails:null},"Fragment does not have a "+(p?"part list":"url")));this.abort();var R=this.config,O=R.fLoader,b=R.loader;return new Promise(function(E,w){y.loader&&y.loader.destroy();var T=y.loader=r.loader=O?new O(R):new b(R),F=s(r),M={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:o};r.stats=T.stats,T.load(F,M,{onSuccess:function(Y,K,A,H){y.resetLoader(r,T),E({frag:r,part:null,payload:Y.data,networkDetails:H})},onError:function(Y,K,A){y.resetLoader(r,T),w(new h({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:r,response:Y,networkDetails:A}))},onAbort:function(Y,K,A){y.resetLoader(r,T),w(new h({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:r,networkDetails:A}))},onTimeout:function(Y,K,A){y.resetLoader(r,T),w(new h({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:r,networkDetails:A}))},onProgress:function(Y,K,A,H){x&&x({frag:r,part:null,payload:A,networkDetails:H})}})})},l.loadPart=function(r,x,y){var p=this;this.abort();var R=this.config,O=R.fLoader,b=R.loader;return new Promise(function(E,w){p.loader&&p.loader.destroy();var T=p.loader=r.loader=O?new O(R):new b(R),F=s(r,x),M={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:o};x.stats=T.stats,T.load(F,M,{onSuccess:function(Y,K,A,H){p.resetLoader(r,T),p.updateStatsFromPart(r,x);var U={frag:r,part:x,payload:Y.data,networkDetails:H};y(U),E(U)},onError:function(Y,K,A){p.resetLoader(r,T),w(new h({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:r,part:x,response:Y,networkDetails:A}))},onAbort:function(Y,K,A){r.stats.aborted=x.stats.aborted,p.resetLoader(r,T),w(new h({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:r,part:x,networkDetails:A}))},onTimeout:function(Y,K,A){p.resetLoader(r,T),w(new h({type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:r,part:x,networkDetails:A}))}})})},l.updateStatsFromPart=function(r,x){var y=r.stats,p=x.stats,R=p.total;if(y.loaded+=p.loaded,R){var O=Math.round(r.duration/x.duration),b=Math.min(Math.round(y.loaded/R),O),E=O-b,w=E*Math.round(y.loaded/b);y.total=y.loaded+w}else y.total=Math.max(y.loaded,y.total);var T=y.loading,F=p.loading;T.start?T.first+=F.first-F.start:(T.start=F.start,T.first=F.first),T.end=F.end},l.resetLoader=function(r,x){r.loader=null,this.loader===x&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),x.destroy()},f}();function s(f,l){l===void 0&&(l=null);var a=l||f,r={frag:f,part:l,responseType:"arraybuffer",url:a.url,headers:{},rangeStart:0,rangeEnd:0},x=a.byteRangeStartOffset,y=a.byteRangeEndOffset;return Object(N.isFiniteNumber)(x)&&Object(N.isFiniteNumber)(y)&&(r.rangeStart=x,r.rangeEnd=y),r}var h=function(f){m(l,f);function l(a){for(var r,x=arguments.length,y=new Array(x>1?x-1:0),p=1;p<x;p++)y[p-1]=arguments[p];return r=f.call.apply(f,[this].concat(y))||this,r.data=void 0,r.data=a,r}return l}(S(Error))},"./src/loader/fragment.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"ElementaryStreamTypes",function(){return n}),C.d(v,"BaseSegment",function(){return s}),C.d(v,"Fragment",function(){return h}),C.d(v,"Part",function(){return f});var N=C("./src/polyfills/number.ts"),g=C("./node_modules/url-toolkit/src/url-toolkit.js"),m=C.n(g),S=C("./src/utils/logger.ts"),_=C("./src/loader/level-key.ts"),t=C("./src/loader/load-stats.ts");function d(l,a){l.prototype=Object.create(a.prototype),l.prototype.constructor=l,i(l,a)}function i(l,a){return i=Object.setPrototypeOf||function(x,y){return x.__proto__=y,x},i(l,a)}function c(l,a){for(var r=0;r<a.length;r++){var x=a[r];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(l,x.key,x)}}function o(l,a,r){return a&&c(l.prototype,a),r&&c(l,r),l}var n;(function(l){l.AUDIO="audio",l.VIDEO="video",l.AUDIOVIDEO="audiovideo"})(n||(n={}));var s=function(){function l(r){var x;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(x={},x[n.AUDIO]=null,x[n.VIDEO]=null,x[n.AUDIOVIDEO]=null,x),this.baseurl=r}var a=l.prototype;return a.setByteRange=function(x,y){var p=x.split("@",2),R=[];p.length===1?R[0]=y?y.byteRangeEndOffset:0:R[0]=parseInt(p[1]),R[1]=parseInt(p[0])+R[0],this._byteRange=R},o(l,[{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(g.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(x){this._url=x}}]),l}(),h=function(l){d(a,l);function a(x,y){var p;return p=l.call(this,y)||this,p._decryptdata=null,p.rawProgramDateTime=null,p.programDateTime=null,p.tagList=[],p.duration=0,p.sn=0,p.levelkey=void 0,p.type=void 0,p.loader=null,p.level=-1,p.cc=0,p.startPTS=void 0,p.endPTS=void 0,p.appendedPTS=void 0,p.startDTS=void 0,p.endDTS=void 0,p.start=0,p.deltaPTS=void 0,p.maxStartPTS=void 0,p.minEndPTS=void 0,p.stats=new t.LoadStats,p.urlId=0,p.data=void 0,p.bitrateTest=!1,p.title=null,p.initSegment=null,p.type=x,p}var r=a.prototype;return r.createInitializationVector=function(y){for(var p=new Uint8Array(16),R=12;R<16;R++)p[R]=y>>8*(15-R)&255;return p},r.setDecryptDataFromLevelKey=function(y,p){var R=y;return(y==null?void 0:y.method)==="AES-128"&&y.uri&&!y.iv&&(R=_.LevelKey.fromURI(y.uri),R.method=y.method,R.iv=this.createInitializationVector(p),R.keyFormat="identity"),R},r.setElementaryStreamInfo=function(y,p,R,O,b,E){E===void 0&&(E=!1);var w=this.elementaryStreams,T=w[y];if(!T){w[y]={startPTS:p,endPTS:R,startDTS:O,endDTS:b,partial:E};return}T.startPTS=Math.min(T.startPTS,p),T.endPTS=Math.max(T.endPTS,R),T.startDTS=Math.min(T.startDTS,O),T.endDTS=Math.max(T.endDTS,b)},r.clearElementaryStreamInfo=function(){var y=this.elementaryStreams;y[n.AUDIO]=null,y[n.VIDEO]=null,y[n.AUDIOVIDEO]=null},o(a,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var y=this.sn;typeof y!="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'),y=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,y)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(N.isFiniteNumber)(this.programDateTime))return null;var y=Object(N.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+y*1e3}},{key:"encrypted",get:function(){var y;return!!((y=this.decryptdata)!==null&&y!==void 0&&y.keyFormat&&this.decryptdata.uri)}}]),a}(s),f=function(l){d(a,l);function a(r,x,y,p,R){var O;O=l.call(this,y)||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 t.LoadStats,O.duration=r.decimalFloatingPoint("DURATION"),O.gap=r.bool("GAP"),O.independent=r.bool("INDEPENDENT"),O.relurl=r.enumeratedString("URI"),O.fragment=x,O.index=p;var b=r.enumeratedString("BYTERANGE");return b&&O.setByteRange(b,R),R&&(O.fragOffset=R.fragOffset+R.duration),O}return o(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 x=this.elementaryStreams;return!!(x.audio||x.video||x.audiovideo)}}]),a}(s)},"./src/loader/key-loader.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return S});var N=C("./src/events.ts"),g=C("./src/errors.ts"),m=C("./src/utils/logger.ts"),S=function(){function _(d){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=d,this._registerListeners()}var t=_.prototype;return t._registerListeners=function(){this.hls.on(N.Events.KEY_LOADING,this.onKeyLoading,this)},t._unregisterListeners=function(){this.hls.off(N.Events.KEY_LOADING,this.onKeyLoading)},t.destroy=function(){this._unregisterListeners();for(var i in this.loaders){var c=this.loaders[i];c&&c.destroy()}this.loaders={}},t.onKeyLoading=function(i,c){var o=c.frag,n=o.type,s=this.loaders[n];if(!o.decryptdata){m.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var h=o.decryptdata.uri;if(h!==this.decrypturl||this.decryptkey===null){var f=this.hls.config;if(s&&(m.logger.warn("abort previous key loader for type:"+n),s.abort()),!h){m.logger.warn("key uri is falsy");return}var l=f.loader,a=o.loader=this.loaders[n]=new l(f);this.decrypturl=h,this.decryptkey=null;var r={url:h,frag:o,responseType:"arraybuffer"},x={timeout:f.fragLoadingTimeOut,maxRetry:0,retryDelay:f.fragLoadingRetryDelay,maxRetryDelay:f.fragLoadingMaxRetryTimeout,highWaterMark:0},y={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};a.load(r,x,y)}else this.decryptkey&&(o.decryptdata.key=this.decryptkey,this.hls.trigger(N.Events.KEY_LOADED,{frag:o}))},t.loadsuccess=function(i,c,o){var n=o.frag;if(!n.decryptdata){m.logger.error("after key load, decryptdata unset");return}this.decryptkey=n.decryptdata.key=new Uint8Array(i.data),n.loader=null,delete this.loaders[n.type],this.hls.trigger(N.Events.KEY_LOADED,{frag:n})},t.loaderror=function(i,c){var o=c.frag,n=o.loader;n&&n.abort(),delete this.loaders[o.type],this.hls.trigger(N.Events.ERROR,{type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:o,response:i})},t.loadtimeout=function(i,c){var o=c.frag,n=o.loader;n&&n.abort(),delete this.loaders[o.type],this.hls.trigger(N.Events.ERROR,{type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:o})},_}()},"./src/loader/level-details.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"LevelDetails",function(){return _});var N=C("./src/polyfills/number.ts");function g(t,d){for(var i=0;i<d.length;i++){var c=d[i];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(t,c.key,c)}}function m(t,d,i){return d&&g(t.prototype,d),i&&g(t,i),t}var S=10,_=function(){function t(i){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=i}var d=t.prototype;return d.reloaded=function(c){if(!c){this.advanced=!0,this.updated=!0;return}var o=this.lastPartSn-c.lastPartSn,n=this.lastPartIndex-c.lastPartIndex;this.updated=this.endSN!==c.endSN||!!n||!!o,this.advanced=this.endSN>c.endSN||o>0||o===0&&n>0,this.updated||this.advanced?this.misses=Math.floor(c.misses*.6):this.misses=c.misses+1,this.availabilityDelay=c.availabilityDelay},m(t,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(N.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 o=this.driftEnd-this.driftStart;return o*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}}]),t}()},"./src/loader/level-key.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"LevelKey",function(){return _});var N=C("./node_modules/url-toolkit/src/url-toolkit.js"),g=C.n(N);function m(t,d){for(var i=0;i<d.length;i++){var c=d[i];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(t,c.key,c)}}function S(t,d,i){return d&&m(t.prototype,d),i&&m(t,i),t}var _=function(){t.fromURL=function(i,c){return new t(i,c)},t.fromURI=function(i){return new t(i)};function t(d,i){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,i?this._uri=Object(N.buildAbsoluteURL)(d,i,{alwaysNormalize:!0}):this._uri=d}return S(t,[{key:"uri",get:function(){return this._uri}}]),t}()},"./src/loader/load-stats.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"LoadStats",function(){return N});var N=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return a});var N=C("./src/polyfills/number.ts"),g=C("./node_modules/url-toolkit/src/url-toolkit.js"),m=C.n(g),S=C("./src/loader/fragment.ts"),_=C("./src/loader/level-details.ts"),t=C("./src/loader/level-key.ts"),d=C("./src/utils/attr-list.ts"),i=C("./src/utils/logger.ts"),c=C("./src/utils/codecs.ts"),o=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,n=/#EXT-X-MEDIA:(.*)/g,s=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),h=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("|")),f=/\.(mp4|m4s|m4v|m4a)$/i;function l(R){var O,b;return f.test((O=(b=g.parseURL(R))===null||b===void 0?void 0:b.path)!=null?O:"")}var a=function(){function R(){}return R.findGroup=function(b,E){for(var w=0;w<b.length;w++){var T=b[w];if(T.id===E)return T}},R.convertAVC1ToAVCOTI=function(b){var E=b.split(".");if(E.length>2){var w=E.shift()+".";return w+=parseInt(E.shift()).toString(16),w+=("000"+parseInt(E.shift()).toString(16)).substr(-4),w}return b},R.resolve=function(b,E){return g.buildAbsoluteURL(E,b,{alwaysNormalize:!0})},R.parseMasterPlaylist=function(b,E){var w=[],T={},F=!1;o.lastIndex=0;for(var M;(M=o.exec(b))!=null;)if(M[1]){var L=new d.AttrList(M[1]),Y={attrs:L,bitrate:L.decimalInteger("AVERAGE-BANDWIDTH")||L.decimalInteger("BANDWIDTH"),name:L.NAME,url:R.resolve(M[2],E)},K=L.decimalResolution("RESOLUTION");K&&(Y.width=K.width,Y.height=K.height),r((L.CODECS||"").split(/[ ,]+/).filter(function(H){return H}),Y),Y.videoCodec&&Y.videoCodec.indexOf("avc1")!==-1&&(Y.videoCodec=R.convertAVC1ToAVCOTI(Y.videoCodec)),w.push(Y)}else if(M[3]){var A=new d.AttrList(M[3]);A["DATA-ID"]&&(F=!0,T[A["DATA-ID"]]=A)}return{levels:w,sessionData:F?T:null}},R.parseMasterPlaylistMedia=function(b,E,w,T){T===void 0&&(T=[]);var F,M=[],L=0;for(n.lastIndex=0;(F=n.exec(b))!==null;){var Y=new d.AttrList(F[1]);if(Y.TYPE===w){var K={attrs:Y,bitrate:0,id:L++,groupId:Y["GROUP-ID"],instreamId:Y["INSTREAM-ID"],name:Y.NAME||Y.LANGUAGE||"",type:w,default:Y.bool("DEFAULT"),autoselect:Y.bool("AUTOSELECT"),forced:Y.bool("FORCED"),lang:Y.LANGUAGE,url:Y.URI?R.resolve(Y.URI,E):""};if(T.length){var A=R.findGroup(T,K.groupId)||T[0];x(K,A,"audioCodec"),x(K,A,"textCodec")}M.push(K)}}return M},R.parseLevelPlaylist=function(b,E,w,T,F){var M=new _.LevelDetails(E),L=M.fragments,Y=null,K=0,A=0,H=0,U=0,I=null,G=new S.Fragment(T,E),ne,oe,de,Oe=-1,Ae=!1;for(s.lastIndex=0,M.m3u8=b;(ne=s.exec(b))!==null;){Ae&&(Ae=!1,G=new S.Fragment(T,E),G.start=H,G.sn=K,G.cc=U,G.level=w,Y&&(G.initSegment=Y,G.rawProgramDateTime=Y.rawProgramDateTime));var pe=ne[1];if(pe){G.duration=parseFloat(pe);var Se=(" "+ne[2]).slice(1);G.title=Se||null,G.tagList.push(Se?["INF",pe,Se]:["INF",pe])}else if(ne[3])Object(N.isFiniteNumber)(G.duration)&&(G.start=H,de&&(G.levelkey=de),G.sn=K,G.level=w,G.cc=U,G.urlId=F,L.push(G),G.relurl=(" "+ne[3]).slice(1),p(G,I),I=G,H+=G.duration,K++,A=0,Ae=!0);else if(ne[4]){var be=(" "+ne[4]).slice(1);I?G.setByteRange(be,I):G.setByteRange(be)}else if(ne[5])G.rawProgramDateTime=(" "+ne[5]).slice(1),G.tagList.push(["PROGRAM-DATE-TIME",G.rawProgramDateTime]),Oe===-1&&(Oe=L.length);else{if(ne=ne[0].match(h),!ne){i.logger.warn("No matches on slow regex match for level playlist!");continue}for(oe=1;oe<ne.length&&!(typeof ne[oe]!="undefined");oe++);var se=(" "+ne[oe]).slice(1),ee=(" "+ne[oe+1]).slice(1),B=ne[oe+2]?(" "+ne[oe+2]).slice(1):"";switch(se){case"PLAYLIST-TYPE":M.type=ee.toUpperCase();break;case"MEDIA-SEQUENCE":K=M.startSN=parseInt(ee);break;case"SKIP":{var V=new d.AttrList(ee),X=V.decimalInteger("SKIPPED-SEGMENTS");if(Object(N.isFiniteNumber)(X)){M.skippedSegments=X;for(var Q=X;Q--;)L.unshift(null);K+=X}var Z=V.enumeratedString("RECENTLY-REMOVED-DATERANGES");Z&&(M.recentlyRemovedDateranges=Z.split(" "));break}case"TARGETDURATION":M.targetduration=parseFloat(ee);break;case"VERSION":M.version=parseInt(ee);break;case"EXTM3U":break;case"ENDLIST":M.live=!1;break;case"#":(ee||B)&&G.tagList.push(B?[ee,B]:[ee]);break;case"DIS":U++;case"GAP":G.tagList.push([se]);break;case"BITRATE":G.tagList.push([se,ee]);break;case"DISCONTINUITY-SEQ":U=parseInt(ee);break;case"KEY":{var ie,re=new d.AttrList(ee),$=re.enumeratedString("METHOD"),J=re.URI,le=re.hexadecimalInteger("IV"),ue=re.enumeratedString("KEYFORMATVERSIONS"),xe=re.enumeratedString("KEYID"),Me=(ie=re.enumeratedString("KEYFORMAT"))!=null?ie:"identity",Xe=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Xe.indexOf(Me)>-1){i.logger.warn("Keyformat "+Me+" is not supported from the manifest");continue}else if(Me!=="identity")continue;$&&(de=t.LevelKey.fromURL(E,J),J&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf($)>=0&&(de.method=$,de.keyFormat=Me,xe&&(de.keyID=xe),ue&&(de.keyFormatVersions=ue),de.iv=le));break}case"START":{var $e=new d.AttrList(ee),Je=$e.decimalFloatingPoint("TIME-OFFSET");Object(N.isFiniteNumber)(Je)&&(M.startTimeOffset=Je);break}case"MAP":{var rt=new d.AttrList(ee);G.relurl=rt.URI,rt.BYTERANGE&&G.setByteRange(rt.BYTERANGE),G.level=w,G.sn="initSegment",de&&(G.levelkey=de),G.initSegment=null,Y=G,Ae=!0;break}case"SERVER-CONTROL":{var it=new d.AttrList(ee);M.canBlockReload=it.bool("CAN-BLOCK-RELOAD"),M.canSkipUntil=it.optionalFloat("CAN-SKIP-UNTIL",0),M.canSkipDateRanges=M.canSkipUntil>0&&it.bool("CAN-SKIP-DATERANGES"),M.partHoldBack=it.optionalFloat("PART-HOLD-BACK",0),M.holdBack=it.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var je=new d.AttrList(ee);M.partTarget=je.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ie=M.partList;Ie||(Ie=M.partList=[]);var qe=A>0?Ie[Ie.length-1]:void 0,st=A++,Ee=new S.Part(new d.AttrList(ee),G,E,st,qe);Ie.push(Ee),G.duration+=Ee.duration;break}case"PRELOAD-HINT":{var ce=new d.AttrList(ee);M.preloadHint=ce;break}case"RENDITION-REPORT":{var fe=new d.AttrList(ee);M.renditionReports=M.renditionReports||[],M.renditionReports.push(fe);break}default:i.logger.warn("line parsed but not handled: "+ne);break}}}I&&!I.relurl?(L.pop(),H-=I.duration,M.partList&&(M.fragmentHint=I)):M.partList&&(p(G,I),G.cc=U,M.fragmentHint=G);var ve=L.length,Ce=L[0],ge=L[ve-1];if(H+=M.skippedSegments*M.targetduration,H>0&&ve&&ge){M.averagetargetduration=H/ve;var ye=ge.sn;M.endSN=ye!=="initSegment"?ye:0,Ce&&(M.startCC=Ce.cc,Ce.initSegment||M.fragments.every(function(Re){return Re.relurl&&l(Re.relurl)})&&(i.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),G=new S.Fragment(T,E),G.relurl=ge.relurl,G.level=w,G.sn="initSegment",Ce.initSegment=G,M.needSidxRanges=!0))}else M.endSN=0,M.startCC=0;return M.fragmentHint&&(H+=M.fragmentHint.duration),M.totalduration=H,M.endCC=U,Oe>0&&y(L,Oe),M},R}();function r(R,O){["video","audio","text"].forEach(function(b){var E=R.filter(function(T){return Object(c.isCodecType)(T,b)});if(E.length){var w=E.filter(function(T){return T.lastIndexOf("avc1",0)===0||T.lastIndexOf("mp4a",0)===0});O[b+"Codec"]=w.length>0?w[0]:E[0],R=R.filter(function(T){return E.indexOf(T)===-1})}}),O.unknownCodecs=R}function x(R,O,b){var E=O[b];E&&(R[b]=E)}function y(R,O){for(var b=R[O],E=O;E--;){var w=R[E];if(!w)return;w.programDateTime=b.programDateTime-w.duration*1e3,b=w}}function p(R,O){R.rawProgramDateTime?R.programDateTime=Date.parse(R.rawProgramDateTime):O!=null&&O.programDateTime&&(R.programDateTime=O.endProgramDateTime),Object(N.isFiniteNumber)(R.programDateTime)||(R.programDateTime=null,R.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/polyfills/number.ts"),g=C("./src/events.ts"),m=C("./src/errors.ts"),S=C("./src/utils/logger.ts"),_=C("./src/utils/mp4-tools.ts"),t=C("./src/loader/m3u8-parser.ts"),d=C("./src/types/loader.ts"),i=C("./src/utils/attr-list.ts");function c(s){var h=s.type;switch(h){case d.PlaylistContextType.AUDIO_TRACK:return d.PlaylistLevelType.AUDIO;case d.PlaylistContextType.SUBTITLE_TRACK:return d.PlaylistLevelType.SUBTITLE;default:return d.PlaylistLevelType.MAIN}}function o(s,h){var f=s.url;return(f===void 0||f.indexOf("data:")===0)&&(f=h.url),f}var n=function(){function s(f){this.hls=void 0,this.loaders=Object.create(null),this.hls=f,this.registerListeners()}var h=s.prototype;return h.registerListeners=function(){var l=this.hls;l.on(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(g.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(g.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),l.on(g.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},h.unregisterListeners=function(){var l=this.hls;l.off(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(g.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(g.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),l.off(g.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},h.createInternalLoader=function(l){var a=this.hls.config,r=a.pLoader,x=a.loader,y=r||x,p=new y(a);return l.loader=p,this.loaders[l.type]=p,p},h.getInternalLoader=function(l){return this.loaders[l.type]},h.resetInternalLoader=function(l){this.loaders[l]&&delete this.loaders[l]},h.destroyInternalLoaders=function(){for(var l in this.loaders){var a=this.loaders[l];a&&a.destroy(),this.resetInternalLoader(l)}},h.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},h.onManifestLoading=function(l,a){var r=a.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:d.PlaylistContextType.MANIFEST,url:r,deliveryDirectives:null})},h.onLevelLoading=function(l,a){var r=a.id,x=a.level,y=a.url,p=a.deliveryDirectives;this.load({id:r,groupId:null,level:x,responseType:"text",type:d.PlaylistContextType.LEVEL,url:y,deliveryDirectives:p})},h.onAudioTrackLoading=function(l,a){var r=a.id,x=a.groupId,y=a.url,p=a.deliveryDirectives;this.load({id:r,groupId:x,level:null,responseType:"text",type:d.PlaylistContextType.AUDIO_TRACK,url:y,deliveryDirectives:p})},h.onSubtitleTrackLoading=function(l,a){var r=a.id,x=a.groupId,y=a.url,p=a.deliveryDirectives;this.load({id:r,groupId:x,level:null,responseType:"text",type:d.PlaylistContextType.SUBTITLE_TRACK,url:y,deliveryDirectives:p})},h.load=function(l){var a,r=this.hls.config,x=this.getInternalLoader(l);if(x){var y=x.context;if(y&&y.url===l.url){S.logger.trace("[playlist-loader]: playlist request ongoing");return}S.logger.log("[playlist-loader]: aborting previous loader for type: "+l.type),x.abort()}var p,R,O,b;switch(l.type){case d.PlaylistContextType.MANIFEST:p=r.manifestLoadingMaxRetry,R=r.manifestLoadingTimeOut,O=r.manifestLoadingRetryDelay,b=r.manifestLoadingMaxRetryTimeout;break;case d.PlaylistContextType.LEVEL:case d.PlaylistContextType.AUDIO_TRACK:case d.PlaylistContextType.SUBTITLE_TRACK:p=0,R=r.levelLoadingTimeOut;break;default:p=r.levelLoadingMaxRetry,R=r.levelLoadingTimeOut,O=r.levelLoadingRetryDelay,b=r.levelLoadingMaxRetryTimeout;break}if(x=this.createInternalLoader(l),(a=l.deliveryDirectives)!==null&&a!==void 0&&a.part){var E;if(l.type===d.PlaylistContextType.LEVEL&&l.level!==null?E=this.hls.levels[l.level].details:l.type===d.PlaylistContextType.AUDIO_TRACK&&l.id!==null?E=this.hls.audioTracks[l.id].details:l.type===d.PlaylistContextType.SUBTITLE_TRACK&&l.id!==null&&(E=this.hls.subtitleTracks[l.id].details),E){var w=E.partTarget,T=E.targetduration;w&&T&&(R=Math.min(Math.max(w*3,T*.8)*1e3,R))}}var F={timeout:R,maxRetry:p,retryDelay:O,maxRetryDelay:b,highWaterMark:0},M={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};x.load(l,F,M)},h.loadsuccess=function(l,a,r,x){if(x===void 0&&(x=null),r.isSidxRequest){this.handleSidxRequest(l,r),this.handlePlaylistLoaded(l,a,r,x);return}this.resetInternalLoader(r.type);var y=l.data;if(y.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(l,r,"no EXTM3U delimiter",x);return}a.parsing.start=performance.now(),y.indexOf("#EXTINF:")>0||y.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(l,a,r,x):this.handleMasterPlaylist(l,a,r,x)},h.loaderror=function(l,a,r){r===void 0&&(r=null),this.handleNetworkError(a,r,!1,l)},h.loadtimeout=function(l,a,r){r===void 0&&(r=null),this.handleNetworkError(a,r,!0)},h.handleMasterPlaylist=function(l,a,r,x){var y=this.hls,p=l.data,R=o(l,r),O=t.default.parseMasterPlaylist(p,R),b=O.levels,E=O.sessionData;if(!b.length){this.handleManifestParsingError(l,r,"no level found in manifest",x);return}var w=b.map(function(K){return{id:K.attrs.AUDIO,audioCodec:K.audioCodec}}),T=b.map(function(K){return{id:K.attrs.SUBTITLES,textCodec:K.textCodec}}),F=t.default.parseMasterPlaylistMedia(p,R,"AUDIO",w),M=t.default.parseMasterPlaylistMedia(p,R,"SUBTITLES",T),L=t.default.parseMasterPlaylistMedia(p,R,"CLOSED-CAPTIONS");if(F.length){var Y=F.some(function(K){return!K.url});!Y&&b[0].audioCodec&&!b[0].attrs.AUDIO&&(S.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),F.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new i.AttrList({}),bitrate:0,url:""}))}y.trigger(g.Events.MANIFEST_LOADED,{levels:b,audioTracks:F,subtitles:M,captions:L,url:R,stats:a,networkDetails:x,sessionData:E})},h.handleTrackOrLevelPlaylist=function(l,a,r,x){var y=this.hls,p=r.id,R=r.level,O=r.type,b=o(l,r),E=Object(N.isFiniteNumber)(p)?p:0,w=Object(N.isFiniteNumber)(R)?R:E,T=c(r),F=t.default.parseLevelPlaylist(l.data,b,w,T,E);if(!F.fragments.length){y.trigger(g.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:b,reason:"no fragments found in level",level:typeof r.level=="number"?r.level:void 0});return}if(O===d.PlaylistContextType.MANIFEST){var M={attrs:new i.AttrList({}),bitrate:0,details:F,name:"",url:b};y.trigger(g.Events.MANIFEST_LOADED,{levels:[M],audioTracks:[],url:b,stats:a,networkDetails:x,sessionData:null})}if(a.parsing.end=performance.now(),F.needSidxRanges){var L,Y=(L=F.fragments[0].initSegment)===null||L===void 0?void 0:L.url;this.load({url:Y,isSidxRequest:!0,type:O,level:R,levelDetails:F,id:p,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}r.levelDetails=F,this.handlePlaylistLoaded(l,a,r,x)},h.handleSidxRequest=function(l,a){var r=Object(_.parseSegmentIndex)(new Uint8Array(l.data));if(!r)return;var x=r.references,y=a.levelDetails;x.forEach(function(p,R){var O=p.info,b=y.fragments[R];b.byteRange.length===0&&b.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),b.initSegment&&b.initSegment.setByteRange(String(r.moovEndOffset)+"@0")})},h.handleManifestParsingError=function(l,a,r,x){this.hls.trigger(g.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:a.type===d.PlaylistContextType.MANIFEST,url:l.url,reason:r,response:l,context:a,networkDetails:x})},h.handleNetworkError=function(l,a,r,x){r===void 0&&(r=!1),S.logger.warn("[playlist-loader]: A network "+(r?"timeout":"error")+" occurred while loading "+l.type+" level: "+l.level+" id: "+l.id+' group-id: "'+l.groupId+'"');var y=m.ErrorDetails.UNKNOWN,p=!1,R=this.getInternalLoader(l);switch(l.type){case d.PlaylistContextType.MANIFEST:y=r?m.ErrorDetails.MANIFEST_LOAD_TIMEOUT:m.ErrorDetails.MANIFEST_LOAD_ERROR,p=!0;break;case d.PlaylistContextType.LEVEL:y=r?m.ErrorDetails.LEVEL_LOAD_TIMEOUT:m.ErrorDetails.LEVEL_LOAD_ERROR,p=!1;break;case d.PlaylistContextType.AUDIO_TRACK:y=r?m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,p=!1;break;case d.PlaylistContextType.SUBTITLE_TRACK:y=r?m.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:m.ErrorDetails.SUBTITLE_LOAD_ERROR,p=!1;break}R&&this.resetInternalLoader(l.type);var O={type:m.ErrorTypes.NETWORK_ERROR,details:y,fatal:p,url:l.url,loader:R,context:l,networkDetails:a};x&&(O.response=x),this.hls.trigger(g.Events.ERROR,O)},h.handlePlaylistLoaded=function(l,a,r,x){var y=r.type,p=r.level,R=r.id,O=r.groupId,b=r.loader,E=r.levelDetails,w=r.deliveryDirectives;if(!(E!=null&&E.targetduration)){this.handleManifestParsingError(l,r,"invalid target duration",x);return}if(!b)return;E.live&&(b.getCacheAge&&(E.ageHeader=b.getCacheAge()||0),(!b.getCacheAge||isNaN(E.ageHeader))&&(E.ageHeader=0));switch(y){case d.PlaylistContextType.MANIFEST:case d.PlaylistContextType.LEVEL:this.hls.trigger(g.Events.LEVEL_LOADED,{details:E,level:p||0,id:R||0,stats:a,networkDetails:x,deliveryDirectives:w});break;case d.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(g.Events.AUDIO_TRACK_LOADED,{details:E,id:R||0,groupId:O||"",stats:a,networkDetails:x,deliveryDirectives:w});break;case d.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(g.Events.SUBTITLE_TRACK_LOADED,{details:E,id:R||0,groupId:O||"",stats:a,networkDetails:x,deliveryDirectives:w});break}},s}();v.default=n},"./src/polyfills/number.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"isFiniteNumber",function(){return N}),C.d(v,"MAX_SAFE_INTEGER",function(){return g});var N=Number.isFinite||function(m){return typeof m=="number"&&isFinite(m)},g=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(P,v,C){"use strict";C.r(v);var N=function(){function g(){}return g.getSilentFrame=function(S,_){switch(S){case"mp4a.40.2":if(_===1)return new Uint8Array([0,200,0,128,35,128]);if(_===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(_===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(_===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(_===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(_===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(_===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(_===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(_===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},g}();v.default=N},"./src/remux/mp4-generator.ts":function(P,v,C){"use strict";C.r(v);var N=Math.pow(2,32)-1,g=function(){function m(){}return m.init=function(){m.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var _;for(_ in m.types)m.types.hasOwnProperty(_)&&(m.types[_]=[_.charCodeAt(0),_.charCodeAt(1),_.charCodeAt(2),_.charCodeAt(3)]);var t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),d=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);m.HDLR_TYPES={video:t,audio:d};var i=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]);m.STTS=m.STSC=m.STCO=c,m.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),m.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),m.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),m.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),s=new Uint8Array([0,0,0,1]);m.FTYP=m.box(m.types.ftyp,o,s,o,n),m.DINF=m.box(m.types.dinf,m.box(m.types.dref,i))},m.box=function(_){for(var t=8,d=arguments.length,i=new Array(d>1?d-1:0),c=1;c<d;c++)i[c-1]=arguments[c];for(var o=i.length,n=o;o--;)t+=i[o].byteLength;var s=new Uint8Array(t);for(s[0]=t>>24&255,s[1]=t>>16&255,s[2]=t>>8&255,s[3]=t&255,s.set(_,4),o=0,t=8;o<n;o++)s.set(i[o],t),t+=i[o].byteLength;return s},m.hdlr=function(_){return m.box(m.types.hdlr,m.HDLR_TYPES[_])},m.mdat=function(_){return m.box(m.types.mdat,_)},m.mdhd=function(_,t){t*=_;var d=Math.floor(t/(N+1)),i=Math.floor(t%(N+1));return m.box(m.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,_>>24&255,_>>16&255,_>>8&255,_&255,d>>24,d>>16&255,d>>8&255,d&255,i>>24,i>>16&255,i>>8&255,i&255,85,196,0,0]))},m.mdia=function(_){return m.box(m.types.mdia,m.mdhd(_.timescale,_.duration),m.hdlr(_.type),m.minf(_))},m.mfhd=function(_){return m.box(m.types.mfhd,new Uint8Array([0,0,0,0,_>>24,_>>16&255,_>>8&255,_&255]))},m.minf=function(_){return _.type==="audio"?m.box(m.types.minf,m.box(m.types.smhd,m.SMHD),m.DINF,m.stbl(_)):m.box(m.types.minf,m.box(m.types.vmhd,m.VMHD),m.DINF,m.stbl(_))},m.moof=function(_,t,d){return m.box(m.types.moof,m.mfhd(_),m.traf(d,t))},m.moov=function(_){for(var t=_.length,d=[];t--;)d[t]=m.trak(_[t]);return m.box.apply(null,[m.types.moov,m.mvhd(_[0].timescale,_[0].duration)].concat(d).concat(m.mvex(_)))},m.mvex=function(_){for(var t=_.length,d=[];t--;)d[t]=m.trex(_[t]);return m.box.apply(null,[m.types.mvex].concat(d))},m.mvhd=function(_,t){t*=_;var d=Math.floor(t/(N+1)),i=Math.floor(t%(N+1)),c=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,_>>24&255,_>>16&255,_>>8&255,_&255,d>>24,d>>16&255,d>>8&255,d&255,i>>24,i>>16&255,i>>8&255,i&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return m.box(m.types.mvhd,c)},m.sdtp=function(_){var t=_.samples||[],d=new Uint8Array(4+t.length),i,c;for(i=0;i<t.length;i++)c=t[i].flags,d[i+4]=c.dependsOn<<4|c.isDependedOn<<2|c.hasRedundancy;return m.box(m.types.sdtp,d)},m.stbl=function(_){return m.box(m.types.stbl,m.stsd(_),m.box(m.types.stts,m.STTS),m.box(m.types.stsc,m.STSC),m.box(m.types.stsz,m.STSZ),m.box(m.types.stco,m.STCO))},m.avc1=function(_){var t=[],d=[],i,c,o;for(i=0;i<_.sps.length;i++)c=_.sps[i],o=c.byteLength,t.push(o>>>8&255),t.push(o&255),t=t.concat(Array.prototype.slice.call(c));for(i=0;i<_.pps.length;i++)c=_.pps[i],o=c.byteLength,d.push(o>>>8&255),d.push(o&255),d=d.concat(Array.prototype.slice.call(c));var n=m.box(m.types.avcC,new Uint8Array([1,t[3],t[4],t[5],252|3,224|_.sps.length].concat(t).concat([_.pps.length]).concat(d))),s=_.width,h=_.height,f=_.pixelRatio[0],l=_.pixelRatio[1];return m.box(m.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,s>>8&255,s&255,h>>8&255,h&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]),n,m.box(m.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),m.box(m.types.pasp,new Uint8Array([f>>24,f>>16&255,f>>8&255,f&255,l>>24,l>>16&255,l>>8&255,l&255])))},m.esds=function(_){var t=_.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(_.config).concat([6,1,2]))},m.mp4a=function(_){var t=_.samplerate;return m.box(m.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,_.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]),m.box(m.types.esds,m.esds(_)))},m.mp3=function(_){var t=_.samplerate;return m.box(m.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,_.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]))},m.stsd=function(_){return _.type==="audio"?!_.isAAC&&_.codec==="mp3"?m.box(m.types.stsd,m.STSD,m.mp3(_)):m.box(m.types.stsd,m.STSD,m.mp4a(_)):m.box(m.types.stsd,m.STSD,m.avc1(_))},m.tkhd=function(_){var t=_.id,d=_.duration*_.timescale,i=_.width,c=_.height,o=Math.floor(d/(N+1)),n=Math.floor(d%(N+1));return m.box(m.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,o>>24,o>>16&255,o>>8&255,o&255,n>>24,n>>16&255,n>>8&255,n&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,i>>8&255,i&255,0,0,c>>8&255,c&255,0,0]))},m.traf=function(_,t){var d=m.sdtp(_),i=_.id,c=Math.floor(t/(N+1)),o=Math.floor(t%(N+1));return m.box(m.types.traf,m.box(m.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,i&255])),m.box(m.types.tfdt,new Uint8Array([1,0,0,0,c>>24,c>>16&255,c>>8&255,c&255,o>>24,o>>16&255,o>>8&255,o&255])),m.trun(_,d.length+16+20+8+16+8+8),d)},m.trak=function(_){return _.duration=_.duration||4294967295,m.box(m.types.trak,m.tkhd(_),m.mdia(_))},m.trex=function(_){var t=_.id;return m.box(m.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},m.trun=function(_,t){var d=_.samples||[],i=d.length,c=12+16*i,o=new Uint8Array(c),n,s,h,f,l,a;for(t+=8+c,o.set([0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,i&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),n=0;n<i;n++)s=d[n],h=s.duration,f=s.size,l=s.flags,a=s.cts,o.set([h>>>24&255,h>>>16&255,h>>>8&255,h&255,f>>>24&255,f>>>16&255,f>>>8&255,f&255,l.isLeading<<2|l.dependsOn,l.isDependedOn<<6|l.hasRedundancy<<4|l.paddingValue<<1|l.isNonSync,l.degradPrio&240<<8,l.degradPrio&15,a>>>24&255,a>>>16&255,a>>>8&255,a&255],12+16*n);return m.box(m.types.trun,o)},m.initSegment=function(_){m.types||m.init();var t=m.moov(_),d=new Uint8Array(m.FTYP.byteLength+t.byteLength);return d.set(m.FTYP),d.set(t,m.FTYP.byteLength),d},m}();g.types=void 0,g.HDLR_TYPES=void 0,g.STTS=void 0,g.STSC=void 0,g.STCO=void 0,g.STSZ=void 0,g.VMHD=void 0,g.SMHD=void 0,g.STSD=void 0,g.FTYP=void 0,g.DINF=void 0,v.default=g},"./src/remux/mp4-remuxer.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return a}),C.d(v,"normalizePts",function(){return r});var N=C("./src/polyfills/number.ts"),g=C("./src/remux/aac-helper.ts"),m=C("./src/remux/mp4-generator.ts"),S=C("./src/events.ts"),_=C("./src/errors.ts"),t=C("./src/utils/logger.ts"),d=C("./src/types/loader.ts"),i=C("./src/utils/timescale-conversion.ts");function c(){return c=Object.assign||function(R){for(var O=1;O<arguments.length;O++){var b=arguments[O];for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(R[E]=b[E])}return R},c.apply(this,arguments)}var o=10*1e3,n=1024,s=1152,h=null,f=null,l=!1,a=function(){function R(b,E,w,T){if(T===void 0&&(T=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=b,this.config=E,this.typeSupported=w,this.ISGenerated=!1,h===null){var F=navigator.userAgent||"",M=F.match(/Chrome\/(\d+)/i);h=M?parseInt(M[1]):0}if(f===null){var L=navigator.userAgent.match(/Safari\/(\d+)/i);f=L?parseInt(L[1]):0}l=!!h&&h<75||!!f&&f<600}var O=R.prototype;return O.destroy=function(){},O.resetTimeStamp=function(E){t.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=E},O.resetNextTimestamp=function(){t.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},O.resetInitSegment=function(){t.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},O.getVideoStartPts=function(E){var w=!1,T=E.reduce(function(F,M){var L=M.pts-F;return L<-4294967296?(w=!0,r(F,M.pts)):L>0?F:M.pts},E[0].pts);return w&&t.logger.debug("PTS rollover detected"),T},O.remux=function(E,w,T,F,M,L,Y,K){var A,H,U,I,G,ne,oe=M,de=M,Oe=E.pid>-1,Ae=w.pid>-1,pe=w.samples.length,Se=E.samples.length>0,be=pe>1,se=(!Oe||Se)&&(!Ae||be)||this.ISGenerated||Y;if(se){this.ISGenerated||(U=this.generateIS(E,w,M));var ee=this.isVideoContiguous,B=-1;if(be&&(B=x(w.samples),!ee&&this.config.forceKeyFrameOnDiscontinuity))if(ne=!0,B>0){t.logger.warn("[mp4-remuxer]: Dropped "+B+" out of "+pe+" video samples due to a missing keyframe");var V=this.getVideoStartPts(w.samples);w.samples=w.samples.slice(B),w.dropped+=B,de+=(w.samples[0].pts-V)/(w.timescale||9e4)}else B===-1&&(t.logger.warn("[mp4-remuxer]: No keyframe found out of "+pe+" video samples"),ne=!1);if(this.ISGenerated){if(Se&&be){var X=this.getVideoStartPts(w.samples),Q=r(E.samples[0].pts,X)-X,Z=Q/w.inputTimeScale;oe+=Math.max(0,Z),de+=Math.max(0,-Z)}if(Se){if(E.samplerate||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(E,w,M)),H=this.remuxAudio(E,oe,this.isAudioContiguous,L,Ae||be||K===d.PlaylistLevelType.AUDIO?de:void 0),be){var ie=H?H.endPTS-H.startPTS:0;w.inputTimeScale||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(E,w,M)),A=this.remuxVideo(w,de,ee,ie)}}else be&&(A=this.remuxVideo(w,de,ee,0));A&&(A.firstKeyFrame=B,A.independent=B!==-1)}}return this.ISGenerated&&(T.samples.length&&(G=this.remuxID3(T,M)),F.samples.length&&(I=this.remuxText(F,M))),{audio:H,video:A,initSegment:U,independent:ne,text:I,id3:G}},O.generateIS=function(E,w,T){var F=E.samples,M=w.samples,L=this.typeSupported,Y={},K=!Object(N.isFiniteNumber)(this._initPTS),A="audio/mp4",H,U,I;if(K&&(H=U=Infinity),E.config&&F.length&&(E.timescale=E.samplerate,E.isAAC||(L.mpeg?(A="audio/mpeg",E.codec=""):L.mp3&&(E.codec="mp3")),Y.audio={id:"audio",container:A,codec:E.codec,initSegment:!E.isAAC&&L.mpeg?new Uint8Array(0):m.default.initSegment([E]),metadata:{channelCount:E.channelCount}},K&&(I=E.inputTimeScale,H=U=F[0].pts-Math.round(I*T))),w.sps&&w.pps&&M.length&&(w.timescale=w.inputTimeScale,Y.video={id:"main",container:"video/mp4",codec:w.codec,initSegment:m.default.initSegment([w]),metadata:{width:w.width,height:w.height}},K)){I=w.inputTimeScale;var G=this.getVideoStartPts(M),ne=Math.round(I*T);U=Math.min(U,r(M[0].dts,G)-ne),H=Math.min(H,G-ne)}if(Object.keys(Y).length)return this.ISGenerated=!0,K&&(this._initPTS=H,this._initDTS=U),{tracks:Y,initPTS:H,timescale:I}},O.remuxVideo=function(E,w,T,F){var M=E.inputTimeScale,L=E.samples,Y=[],K=L.length,A=this._initPTS,H=this.nextAvcDts,U=8,I,G,ne,oe=Number.POSITIVE_INFINITY,de=Number.NEGATIVE_INFINITY,Oe=0,Ae=!1;if(!T||H===null){var pe=w*M,Se=L[0].pts-r(L[0].dts,L[0].pts);H=pe-Se}for(var be=0;be<K;be++){var se=L[be];if(se.pts=r(se.pts-A,H),se.dts=r(se.dts-A,H),se.dts>se.pts){var ee=9e4*.2;Oe=Math.max(Math.min(Oe,se.pts-se.dts),-1*ee)}se.dts<L[be>0?be-1:be].dts&&(Ae=!0)}Ae&&L.sort(function(ir,Gt){var yt=ir.dts-Gt.dts,Fr=ir.pts-Gt.pts;return yt||Fr}),G=L[0].dts,ne=L[L.length-1].dts;var B=Math.round((ne-G)/(K-1));if(Oe<0){if(Oe<B*-2){t.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(i.toMsFromMpegTsClock)(-B,!0)+" ms");for(var V=Oe,X=0;X<K;X++)L[X].dts=V=Math.max(V,L[X].pts-B),L[X].pts=Math.max(V,L[X].pts)}else{t.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(i.toMsFromMpegTsClock)(Oe,!0)+" ms to overcome this issue");for(var Q=0;Q<K;Q++)L[Q].dts=L[Q].dts+Oe}G=L[0].dts}if(T){var Z=G-H,ie=Z>B,re=Z<-1;if(ie||re){ie?t.logger.warn("AVC: "+Object(i.toMsFromMpegTsClock)(Z,!0)+" ms ("+Z+"dts) hole between fragments detected, filling it"):t.logger.warn("AVC: "+Object(i.toMsFromMpegTsClock)(-Z,!0)+" ms ("+Z+"dts) overlapping between fragments detected"),G=H;var $=L[0].pts-Z;L[0].dts=G,L[0].pts=$,t.logger.log("Video: First PTS/DTS adjusted: "+Object(i.toMsFromMpegTsClock)($,!0)+"/"+Object(i.toMsFromMpegTsClock)(G,!0)+", delta: "+Object(i.toMsFromMpegTsClock)(Z,!0)+" ms")}}l&&(G=Math.max(0,G));for(var J=0,le=0,ue=0;ue<K;ue++){for(var xe=L[ue],Me=xe.units,Xe=Me.length,$e=0,Je=0;Je<Xe;Je++)$e+=Me[Je].data.length;le+=$e,J+=Xe,xe.length=$e,xe.dts=Math.max(xe.dts,G),xe.pts=Math.max(xe.pts,xe.dts,0),oe=Math.min(xe.pts,oe),de=Math.max(xe.pts,de)}ne=L[K-1].dts;var rt=le+4*J+8,it;try{it=new Uint8Array(rt)}catch(ir){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:_.ErrorTypes.MUX_ERROR,details:_.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:rt,reason:"fail allocating video mdat "+rt});return}var je=new DataView(it.buffer);je.setUint32(0,rt),it.set(m.default.types.mdat,4);for(var Ie=0;Ie<K;Ie++){for(var qe=L[Ie],st=qe.units,Ee=0,ce=0,fe=st.length;ce<fe;ce++){var ve=st[ce],Ce=ve.data,ge=ve.data.byteLength;je.setUint32(U,ge),U+=4,it.set(Ce,U),U+=ge,Ee+=4+ge}if(Ie<K-1)I=L[Ie+1].dts-qe.dts;else{var ye=this.config,Re=qe.dts-L[Ie>0?Ie-1:Ie].dts;if(ye.stretchShortVideoTrack&&this.nextAudioPts!==null){var De=Math.floor(ye.maxBufferHole*M),Pe=(F?oe+F*M:this.nextAudioPts)-qe.pts;Pe>De?(I=Pe-Re,I<0&&(I=Re),t.logger.log("[mp4-remuxer]: It is approximately "+Pe/90+" ms to the next segment; using duration "+I/90+" ms for the last video frame.")):I=Re}else I=Re}var ze=Math.round(qe.pts-qe.dts);Y.push(new y(qe.key,I,Ee,ze))}if(Y.length&&h&&h<70){var at=Y[0].flags;at.dependsOn=2,at.isNonSync=0}console.assert(I!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=H=ne+I,this.isVideoContiguous=!0;var lt=m.default.moof(E.sequenceNumber++,G,c({},E,{samples:Y})),St="video",Ot={data1:lt,data2:it,startPTS:oe/M,endPTS:(de+I)/M,startDTS:G/M,endDTS:H/M,type:St,hasAudio:!1,hasVideo:!0,nb:Y.length,dropped:E.dropped};return E.samples=[],E.dropped=0,console.assert(it.length,"MDAT length must not be zero"),Ot},O.remuxAudio=function(E,w,T,F,M){var L=E.inputTimeScale,Y=E.samplerate?E.samplerate:L,K=L/Y,A=E.isAAC?n:s,H=A*K,U=this._initPTS,I=!E.isAAC&&this.typeSupported.mpeg,G=[],ne=E.samples,oe=I?0:8,de=this.nextAudioPts||-1,Oe=w*L;if(this.isAudioContiguous=T=T||ne.length&&de>0&&(F&&Math.abs(Oe-de)<9e3||Math.abs(r(ne[0].pts-U,Oe)-de)<20*H),ne.forEach(function(Ce){Ce.pts=r(Ce.pts-U,Oe)}),!T||de<0){if(ne=ne.filter(function(Ce){return Ce.pts>=0}),!ne.length)return;M===0?de=0:F?de=Math.max(0,Oe):de=ne[0].pts}if(E.isAAC)for(var Ae=M!==void 0,pe=this.config.maxAudioFramesDrift,Se=0,be=de;Se<ne.length;Se++){var se=ne[Se],ee=se.pts,B=ee-be,V=Math.abs(1e3*B/L);if(B<=-pe*H&&Ae)Se===0&&(t.logger.warn("Audio frame @ "+(ee/L).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*B/L)+" ms."),this.nextAudioPts=de=be=ee);else if(B>=pe*H&&V<o&&Ae){var X=Math.round(B/H);be=ee-X*H,be<0&&(X--,be+=H),Se===0&&(this.nextAudioPts=de=be),t.logger.warn("[mp4-remuxer]: Injecting "+X+" audio frame @ "+(be/L).toFixed(3)+"s due to "+Math.round(1e3*B/L)+" ms gap.");for(var Q=0;Q<X;Q++){var Z=Math.max(be,0),ie=g.default.getSilentFrame(E.manifestCodec||E.codec,E.channelCount);ie||(t.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ie=se.unit.subarray()),ne.splice(Se,0,{unit:ie,pts:Z}),be+=H,Se++}}se.pts=be,be+=H}for(var re=null,$=null,J,le=0,ue=ne.length;ue--;)le+=ne[ue].unit.byteLength;for(var xe=0,Me=ne.length;xe<Me;xe++){var Xe=ne[xe],$e=Xe.unit,Je=Xe.pts;if($!==null){var rt=G[xe-1];rt.duration=Math.round((Je-$)/K)}else if(T&&E.isAAC&&(Je=de),re=Je,le>0){le+=oe;try{J=new Uint8Array(le)}catch(Ce){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:_.ErrorTypes.MUX_ERROR,details:_.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:le,reason:"fail allocating audio mdat "+le});return}if(!I){var it=new DataView(J.buffer);it.setUint32(0,le),J.set(m.default.types.mdat,4)}}else return;J.set($e,oe);var je=$e.byteLength;oe+=je,G.push(new y(!0,A,je,0)),$=Je}var Ie=G.length;if(!Ie)return;var qe=G[G.length-1];this.nextAudioPts=de=$+K*qe.duration;var st=I?new Uint8Array(0):m.default.moof(E.sequenceNumber++,re/K,c({},E,{samples:G}));E.samples=[];var Ee=re/L,ce=de/L,fe="audio",ve={data1:st,data2:J,startPTS:Ee,endPTS:ce,startDTS:Ee,endDTS:ce,type:fe,hasAudio:!0,hasVideo:!1,nb:Ie};return this.isAudioContiguous=!0,console.assert(J.length,"MDAT length must not be zero"),ve},O.remuxEmptyAudio=function(E,w,T,F){var M=E.inputTimeScale,L=E.samplerate?E.samplerate:M,Y=M/L,K=this.nextAudioPts,A=(K!==null?K:F.startDTS*M)+this._initDTS,H=F.endDTS*M+this._initDTS,U=Y*n,I=Math.ceil((H-A)/U),G=g.default.getSilentFrame(E.manifestCodec||E.codec,E.channelCount);if(t.logger.warn("[mp4-remuxer]: remux empty Audio"),!G){t.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ne=[],oe=0;oe<I;oe++){var de=A+oe*U;ne.push({unit:G,pts:de,dts:de})}return E.samples=ne,this.remuxAudio(E,w,T,!1)},O.remuxID3=function(E,w){var T=E.samples.length;if(!T)return;for(var F=E.inputTimeScale,M=this._initPTS,L=this._initDTS,Y=0;Y<T;Y++){var K=E.samples[Y];K.pts=r(K.pts-M,w*F)/F,K.dts=r(K.dts-L,w*F)/F}var A=E.samples;return E.samples=[],{samples:A}},O.remuxText=function(E,w){var T=E.samples.length;if(!T)return;for(var F=E.inputTimeScale,M=this._initPTS,L=0;L<T;L++){var Y=E.samples[L];Y.pts=r(Y.pts-M,w*F)/F}E.samples.sort(function(A,H){return A.pts-H.pts});var K=E.samples;return E.samples=[],{samples:K}},R}();function r(R,O){var b;if(O===null)return R;for(O<R?b=-8589934592:b=8589934592;Math.abs(R-O)>4294967296;)R+=b;return R}function x(R){for(var O=0;O<R.length;O++)if(R[O].key)return O;return-1}var y=function(O,b,E,w){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=b,this.size=E,this.cts=w,this.flags=new p(O)},p=function(O){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=O?2:1,this.isNonSync=O?0:1}},"./src/remux/passthrough-remuxer.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/polyfills/number.ts"),g=C("./src/utils/mp4-tools.ts"),m=C("./src/loader/fragment.ts"),S=C("./src/utils/logger.ts"),_=function(){function i(){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=i.prototype;return c.destroy=function(){},c.resetTimeStamp=function(n){this.initPTS=n,this.lastEndDTS=null},c.resetNextTimestamp=function(){this.lastEndDTS=null},c.resetInitSegment=function(n,s,h){this.audioCodec=s,this.videoCodec=h,this.generateInitSegment(n),this.emitInitSegment=!0},c.generateInitSegment=function(n){var s=this.audioCodec,h=this.videoCodec;if(!n||!n.byteLength){this.initTracks=void 0,this.initData=void 0;return}var f=this.initData=Object(g.parseInitSegment)(n);s||(s=d(f.audio,m.ElementaryStreamTypes.AUDIO)),h||(h=d(f.video,m.ElementaryStreamTypes.VIDEO));var l={};f.audio&&f.video?l.audiovideo={container:"video/mp4",codec:s+","+h,initSegment:n,id:"main"}:f.audio?l.audio={container:"audio/mp4",codec:s,initSegment:n,id:"audio"}:f.video?l.video={container:"video/mp4",codec:h,initSegment:n,id:"main"}:S.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=l},c.remux=function(n,s,h,f,l){var a=this.initPTS,r=this.lastEndDTS,x={audio:void 0,video:void 0,text:f,id3:h,initSegment:void 0};Object(N.isFiniteNumber)(r)||(r=this.lastEndDTS=l||0);var y=s.samples;if(!y||!y.length)return x;var p={initPTS:void 0,timescale:1},R=this.initData;if((!R||!R.length)&&(this.generateInitSegment(y),R=this.initData),!R||!R.length)return S.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),x;this.emitInitSegment&&(p.tracks=this.initTracks,this.emitInitSegment=!1),Object(N.isFiniteNumber)(a)||(this.initPTS=p.initPTS=a=t(R,y,r));var O=Object(g.getDuration)(y,R),b=r,E=O+b;Object(g.offsetStartDTS)(R,y,a),O>0?this.lastEndDTS=E:(S.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var w=!!R.audio,T=!!R.video,F="";w&&(F+="audio"),T&&(F+="video");var M={data1:y,startPTS:b,startDTS:b,endPTS:E,endDTS:E,type:F,hasAudio:w,hasVideo:T,nb:1,dropped:0};return x.audio=M.type==="audio"?M:void 0,x.video=M.type!=="audio"?M:void 0,x.text=f,x.id3=h,x.initSegment=p,x},i}(),t=function(c,o,n){return Object(g.getStartDTS)(c,o)-n};function d(i,c){var o=i==null?void 0:i.codec;return o&&o.length>4?o:o==="hvc1"?"hvc1.1.c.L120.90":o==="av01"?"av01.0.04M.08":o==="avc1"||c===m.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}v.default=_},"./src/task-loop.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return N});var N=function(){function g(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var m=g.prototype;return m.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},m.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},m.onHandlerDestroyed=function(){},m.hasInterval=function(){return!!this._tickInterval},m.hasNextTick=function(){return!!this._tickTimer},m.setInterval=function(_){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,_),!0)},m.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},m.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},m.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},m.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},m.doTick=function(){},g}()},"./src/types/cmcd.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"CMCDVersion",function(){return N}),C.d(v,"CMCDObjectType",function(){return g}),C.d(v,"CMCDStreamingFormat",function(){return m}),C.d(v,"CMCDStreamType",function(){return S});var N=1,g;(function(_){_.MANIFEST="m",_.AUDIO="a",_.VIDEO="v",_.MUXED="av",_.INIT="i",_.CAPTION="c",_.TIMED_TEXT="tt",_.KEY="k",_.OTHER="o"})(g||(g={}));var m;(function(_){_.DASH="d",_.HLS="h",_.SMOOTH="s",_.OTHER="o"})(m||(m={}));var S;(function(_){_.VOD="v",_.LIVE="l"})(S||(S={}))},"./src/types/level.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"HlsSkip",function(){return m}),C.d(v,"getSkipValue",function(){return S}),C.d(v,"HlsUrlParameters",function(){return _}),C.d(v,"Level",function(){return t});function N(d,i){for(var c=0;c<i.length;c++){var o=i[c];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(d,o.key,o)}}function g(d,i,c){return i&&N(d.prototype,i),c&&N(d,c),d}var m;(function(d){d.No="",d.Yes="YES",d.v2="v2"})(m||(m={}));function S(d,i){var c=d.canSkipUntil,o=d.canSkipDateRanges,n=d.endSN,s=i!==void 0?i-n:0;return c&&s<c?o?m.v2:m.Yes:m.No}var _=function(){function d(c,o,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=c,this.part=o,this.skip=n}var i=d.prototype;return i.addDirectives=function(o){var n=new self.URL(o);return this.msn!==void 0&&n.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&n.searchParams.set("_HLS_part",this.part.toString()),this.skip&&n.searchParams.set("_HLS_skip",this.skip),n.toString()},d}(),t=function(){function d(i){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=[i.url],this.attrs=i.attrs,this.bitrate=i.bitrate,i.details&&(this.details=i.details),this.id=i.id||0,this.name=i.name,this.width=i.width||0,this.height=i.height||0,this.audioCodec=i.audioCodec,this.videoCodec=i.videoCodec,this.unknownCodecs=i.unknownCodecs,this.codecSet=[i.videoCodec,i.audioCodec].filter(function(c){return c}).join(",").replace(/\.[^.,]+/g,"")}return g(d,[{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 o=c%this.url.length;this._urlId!==o&&(this.details=void 0,this._urlId=o)}}]),d}()},"./src/types/loader.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"PlaylistContextType",function(){return N}),C.d(v,"PlaylistLevelType",function(){return g});var N;(function(m){m.MANIFEST="manifest",m.LEVEL="level",m.AUDIO_TRACK="audioTrack",m.SUBTITLE_TRACK="subtitleTrack"})(N||(N={}));var g;(function(m){m.MAIN="main",m.AUDIO="audio",m.SUBTITLE="subtitle"})(g||(g={}))},"./src/types/transmuxer.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"ChunkMetadata",function(){return N});var N=function(S,_,t,d,i,c){d===void 0&&(d=0),i===void 0&&(i=-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=g(),this.buffering={audio:g(),video:g(),audiovideo:g()},this.level=S,this.sn=_,this.id=t,this.size=d,this.part=i,this.partial=c};function g(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"AttrList",function(){return m});var N=/^(\d+)x(\d+)$/,g=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,m=function(){function S(t){typeof t=="string"&&(t=S.parseAttrList(t));for(var d in t)t.hasOwnProperty(d)&&(this[d]=t[d])}var _=S.prototype;return _.decimalInteger=function(d){var i=parseInt(this[d],10);return i>Number.MAX_SAFE_INTEGER?Infinity:i},_.hexadecimalInteger=function(d){if(this[d]){var i=(this[d]||"0x").slice(2);i=(i.length&1?"0":"")+i;for(var c=new Uint8Array(i.length/2),o=0;o<i.length/2;o++)c[o]=parseInt(i.slice(o*2,o*2+2),16);return c}else return null},_.hexadecimalIntegerAsNumber=function(d){var i=parseInt(this[d],16);return i>Number.MAX_SAFE_INTEGER?Infinity:i},_.decimalFloatingPoint=function(d){return parseFloat(this[d])},_.optionalFloat=function(d,i){var c=this[d];return c?parseFloat(c):i},_.enumeratedString=function(d){return this[d]},_.bool=function(d){return this[d]==="YES"},_.decimalResolution=function(d){var i=N.exec(this[d]);return i===null?void 0:{width:parseInt(i[1],10),height:parseInt(i[2],10)}},S.parseAttrList=function(d){var i,c={},o='"';for(g.lastIndex=0;(i=g.exec(d))!==null;){var n=i[2];n.indexOf(o)===0&&n.lastIndexOf(o)===n.length-1&&(n=n.slice(1,-1)),c[i[1]]=n}return c},S}()},"./src/utils/binary-search.ts":function(P,v,C){"use strict";C.r(v);var N={search:function(m,S){for(var _=0,t=m.length-1,d=null,i=null;_<=t;){d=(_+t)/2|0,i=m[d];var c=S(i);if(c>0)_=d+1;else if(c<0)t=d-1;else return i}return null}};v.default=N},"./src/utils/buffer-helper.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"BufferHelper",function(){return m});var N=C("./src/utils/logger.ts"),g={length:0,start:function(){return 0},end:function(){return 0}},m=function(){function S(){}return S.isBuffered=function(t,d){try{if(t){for(var i=S.getBuffered(t),c=0;c<i.length;c++)if(d>=i.start(c)&&d<=i.end(c))return!0}}catch(o){}return!1},S.bufferInfo=function(t,d,i){try{if(t){var c=S.getBuffered(t),o=[],n;for(n=0;n<c.length;n++)o.push({start:c.start(n),end:c.end(n)});return this.bufferedInfo(o,d,i)}}catch(s){}return{len:0,start:d,end:d,nextStart:void 0}},S.bufferedInfo=function(t,d,i){d=Math.max(0,d),t.sort(function(p,R){var O=p.start-R.start;return O||R.end-p.end});var c=[];if(i)for(var o=0;o<t.length;o++){var n=c.length;if(n){var s=c[n-1].end;t[o].start-s<i?t[o].end>s&&(c[n-1].end=t[o].end):c.push(t[o])}else c.push(t[o])}else c=t;for(var h=0,f,l=d,a=d,r=0;r<c.length;r++){var x=c[r].start,y=c[r].end;if(d+i>=x&&d<y)l=x,a=y,h=a-d;else if(d+i<x){f=x;break}}return{len:h,start:l||0,end:a||0,nextStart:f}},S.getBuffered=function(t){try{return t.buffered}catch(d){return N.logger.log("failed to get media.buffered",d),g}},S}()},"./src/utils/cea-608-parser.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"Row",function(){return a}),C.d(v,"CaptionScreen",function(){return r});var N=C("./src/utils/logger.ts"),g={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},m=function(E){var w=E;return g.hasOwnProperty(E)&&(w=g[E]),String.fromCharCode(w)},S=15,_=100,t={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},d={17:2,18:4,21:6,22:8,23:10,19:13,20:15},i={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},o=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],n;(function(b){b[b.ERROR=0]="ERROR",b[b.TEXT=1]="TEXT",b[b.WARNING=2]="WARNING",b[b.INFO=2]="INFO",b[b.DEBUG=3]="DEBUG",b[b.DATA=3]="DATA"})(n||(n={}));var s=function(){function b(){this.time=null,this.verboseLevel=n.ERROR}var E=b.prototype;return E.log=function(T,F){this.verboseLevel>=T&&N.logger.log(this.time+" ["+T+"] "+F)},b}(),h=function(E){for(var w=[],T=0;T<E.length;T++)w.push(E[T].toString(16));return w},f=function(){function b(w,T,F,M,L){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=w||"white",this.underline=T||!1,this.italics=F||!1,this.background=M||"black",this.flash=L||!1}var E=b.prototype;return E.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},E.setStyles=function(T){for(var F=["foreground","underline","italics","background","flash"],M=0;M<F.length;M++){var L=F[M];T.hasOwnProperty(L)&&(this[L]=T[L])}},E.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},E.equals=function(T){return this.foreground===T.foreground&&this.underline===T.underline&&this.italics===T.italics&&this.background===T.background&&this.flash===T.flash},E.copy=function(T){this.foreground=T.foreground,this.underline=T.underline,this.italics=T.italics,this.background=T.background,this.flash=T.flash},E.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},b}(),l=function(){function b(w,T,F,M,L,Y){this.uchar=void 0,this.penState=void 0,this.uchar=w||" ",this.penState=new f(T,F,M,L,Y)}var E=b.prototype;return E.reset=function(){this.uchar=" ",this.penState.reset()},E.setChar=function(T,F){this.uchar=T,this.penState.copy(F)},E.setPenState=function(T){this.penState.copy(T)},E.equals=function(T){return this.uchar===T.uchar&&this.penState.equals(T.penState)},E.copy=function(T){this.uchar=T.uchar,this.penState.copy(T.penState)},E.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},b}(),a=function(){function b(w){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var T=0;T<_;T++)this.chars.push(new l);this.logger=w,this.pos=0,this.currPenState=new f}var E=b.prototype;return E.equals=function(T){for(var F=!0,M=0;M<_;M++)if(!this.chars[M].equals(T.chars[M])){F=!1;break}return F},E.copy=function(T){for(var F=0;F<_;F++)this.chars[F].copy(T.chars[F])},E.isEmpty=function(){for(var T=!0,F=0;F<_;F++)if(!this.chars[F].isEmpty()){T=!1;break}return T},E.setCursor=function(T){this.pos!==T&&(this.pos=T),this.pos<0?(this.logger.log(n.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>_&&(this.logger.log(n.DEBUG,"Too large cursor position "+this.pos),this.pos=_)},E.moveCursor=function(T){var F=this.pos+T;if(T>1)for(var M=this.pos+1;M<F+1;M++)this.chars[M].setPenState(this.currPenState);this.setCursor(F)},E.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},E.insertChar=function(T){T>=144&&this.backSpace();var F=m(T);if(this.pos>=_){this.logger.log(n.ERROR,"Cannot insert "+T.toString(16)+" ("+F+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(F,this.currPenState),this.moveCursor(1)},E.clearFromPos=function(T){var F;for(F=T;F<_;F++)this.chars[F].reset()},E.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},E.clearToEndOfRow=function(){this.clearFromPos(this.pos)},E.getTextString=function(){for(var T=[],F=!0,M=0;M<_;M++){var L=this.chars[M].uchar;L!==" "&&(F=!1),T.push(L)}return F?"":T.join("")},E.setPenStyles=function(T){this.currPenState.setStyles(T);var F=this.chars[this.pos];F.setPenState(this.currPenState)},b}(),r=function(){function b(w){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var T=0;T<S;T++)this.rows.push(new a(w));this.logger=w,this.currRow=S-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var E=b.prototype;return E.reset=function(){for(var T=0;T<S;T++)this.rows[T].clear();this.currRow=S-1},E.equals=function(T){for(var F=!0,M=0;M<S;M++)if(!this.rows[M].equals(T.rows[M])){F=!1;break}return F},E.copy=function(T){for(var F=0;F<S;F++)this.rows[F].copy(T.rows[F])},E.isEmpty=function(){for(var T=!0,F=0;F<S;F++)if(!this.rows[F].isEmpty()){T=!1;break}return T},E.backSpace=function(){var T=this.rows[this.currRow];T.backSpace()},E.clearToEndOfRow=function(){var T=this.rows[this.currRow];T.clearToEndOfRow()},E.insertChar=function(T){var F=this.rows[this.currRow];F.insertChar(T)},E.setPen=function(T){var F=this.rows[this.currRow];F.setPenStyles(T)},E.moveCursor=function(T){var F=this.rows[this.currRow];F.moveCursor(T)},E.setCursor=function(T){this.logger.log(n.INFO,"setCursor: "+T);var F=this.rows[this.currRow];F.setCursor(T)},E.setPAC=function(T){this.logger.log(n.INFO,"pacData = "+JSON.stringify(T));var F=T.row-1;if(this.nrRollUpRows&&F<this.nrRollUpRows-1&&(F=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==F){for(var M=0;M<S;M++)this.rows[M].clear();var L=this.currRow+1-this.nrRollUpRows,Y=this.lastOutputScreen;if(Y){var K=Y.rows[L].cueStartTime,A=this.logger.time;if(K&&A!==null&&K<A)for(var H=0;H<this.nrRollUpRows;H++)this.rows[F-this.nrRollUpRows+H+1].copy(Y.rows[L+H])}}this.currRow=F;var U=this.rows[this.currRow];if(T.indent!==null){var I=T.indent,G=Math.max(I-1,0);U.setCursor(T.indent),T.color=U.chars[G].penState.foreground}var ne={foreground:T.color,underline:T.underline,italics:T.italics,background:"black",flash:!1};this.setPen(ne)},E.setBkgData=function(T){this.logger.log(n.INFO,"bkgData = "+JSON.stringify(T)),this.backSpace(),this.setPen(T),this.insertChar(32)},E.setRollUpRows=function(T){this.nrRollUpRows=T},E.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(n.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(n.TEXT,this.getDisplayText());var T=this.currRow+1-this.nrRollUpRows,F=this.rows.splice(T,1)[0];F.clear(),this.rows.splice(this.currRow,0,F),this.logger.log(n.INFO,"Rolling up")},E.getDisplayText=function(T){T=T||!1;for(var F=[],M="",L=-1,Y=0;Y<S;Y++){var K=this.rows[Y].getTextString();K&&(L=Y+1,T?F.push("Row "+L+": '"+K+"'"):F.push(K.trim()))}return F.length>0&&(T?M="["+F.join(" | ")+"]":M=F.join(`
|
|
|
`)),M},E.getTextAndFormat=function(){return this.rows},b}(),x=function(){function b(w,T,F){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=w,this.outputFilter=T,this.mode=null,this.verbose=0,this.displayedMemory=new r(F),this.nonDisplayedMemory=new r(F),this.lastOutputScreen=new r(F),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=F}var E=b.prototype;return E.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},E.getHandler=function(){return this.outputFilter},E.setHandler=function(T){this.outputFilter=T},E.setPAC=function(T){this.writeScreen.setPAC(T)},E.setBkgData=function(T){this.writeScreen.setBkgData(T)},E.setMode=function(T){if(T===this.mode)return;this.mode=T,this.logger.log(n.INFO,"MODE="+T),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=T},E.insertChars=function(T){for(var F=0;F<T.length;F++)this.writeScreen.insertChar(T[F]);var M=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(n.INFO,M+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(n.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},E.ccRCL=function(){this.logger.log(n.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},E.ccBS=function(){if(this.logger.log(n.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},E.ccAOF=function(){},E.ccAON=function(){},E.ccDER=function(){this.logger.log(n.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},E.ccRU=function(T){this.logger.log(n.INFO,"RU("+T+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(T)},E.ccFON=function(){this.logger.log(n.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},E.ccRDC=function(){this.logger.log(n.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},E.ccTR=function(){this.logger.log(n.INFO,"TR"),this.setMode("MODE_TEXT")},E.ccRTD=function(){this.logger.log(n.INFO,"RTD"),this.setMode("MODE_TEXT")},E.ccEDM=function(){this.logger.log(n.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},E.ccCR=function(){this.logger.log(n.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},E.ccENM=function(){this.logger.log(n.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},E.ccEOC=function(){if(this.logger.log(n.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var T=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=T,this.writeScreen=this.nonDisplayedMemory,this.logger.log(n.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},E.ccTO=function(T){this.logger.log(n.INFO,"TO("+T+") - Tab Offset"),this.writeScreen.moveCursor(T)},E.ccMIDROW=function(T){var F={flash:!1};if(F.underline=T%2===1,F.italics=T>=46,F.italics)F.foreground="white";else{var M=Math.floor(T/2)-16,L=["white","green","blue","cyan","red","yellow","magenta"];F.foreground=L[M]}this.logger.log(n.INFO,"MIDROW: "+JSON.stringify(F)),this.writeScreen.setPen(F)},E.outputDataUpdate=function(T){T===void 0&&(T=!1);var F=this.logger.time;if(F===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=F:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,F,this.lastOutputScreen),T&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:F),this.lastOutputScreen.copy(this.displayedMemory))},E.cueSplitAtTime=function(T){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,T,this.displayedMemory),this.cueStartTime=T))},b}(),y=function(){function b(w,T,F){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var M=new s;this.channels=[null,new x(w,T,M),new x(w+1,F,M)],this.cmdHistory=O(),this.logger=M}var E=b.prototype;return E.getHandler=function(T){return this.channels[T].getHandler()},E.setHandler=function(T,F){this.channels[T].setHandler(F)},E.addData=function(T,F){var M,L,Y,K=!1;this.logger.time=T;for(var A=0;A<F.length;A+=2){if(L=F[A]&127,Y=F[A+1]&127,L===0&&Y===0)continue;if(this.logger.log(n.DATA,"["+h([F[A],F[A+1]])+"] -> ("+h([L,Y])+")"),M=this.parseCmd(L,Y),M||(M=this.parseMidrow(L,Y)),M||(M=this.parsePAC(L,Y)),M||(M=this.parseBackgroundAttributes(L,Y)),!M&&(K=this.parseChars(L,Y),K)){var H=this.currentChannel;if(H&&H>0){var U=this.channels[H];U.insertChars(K)}else this.logger.log(n.WARNING,"No channel found yet. TEXT-MODE?")}!M&&!K&&this.logger.log(n.WARNING,"Couldn't parse cleaned data "+h([L,Y])+" orig: "+h([F[A],F[A+1]]))}},E.parseCmd=function(T,F){var M=this.cmdHistory,L=(T===20||T===28||T===21||T===29)&&F>=32&&F<=47,Y=(T===23||T===31)&&F>=33&&F<=35;if(!(L||Y))return!1;if(R(T,F,M))return p(null,null,M),this.logger.log(n.DEBUG,"Repeated command ("+h([T,F])+") is dropped"),!0;var K=T===20||T===21||T===23?1:2,A=this.channels[K];return T===20||T===21||T===28||T===29?F===32?A.ccRCL():F===33?A.ccBS():F===34?A.ccAOF():F===35?A.ccAON():F===36?A.ccDER():F===37?A.ccRU(2):F===38?A.ccRU(3):F===39?A.ccRU(4):F===40?A.ccFON():F===41?A.ccRDC():F===42?A.ccTR():F===43?A.ccRTD():F===44?A.ccEDM():F===45?A.ccCR():F===46?A.ccENM():F===47&&A.ccEOC():A.ccTO(F-32),p(T,F,M),this.currentChannel=K,!0},E.parseMidrow=function(T,F){var M=0;if((T===17||T===25)&&F>=32&&F<=47){if(T===17?M=1:M=2,M!==this.currentChannel)return this.logger.log(n.ERROR,"Mismatch channel in midrow parsing"),!1;var L=this.channels[M];return L?(L.ccMIDROW(F),this.logger.log(n.DEBUG,"MIDROW ("+h([T,F])+")"),!0):!1}return!1},E.parsePAC=function(T,F){var M,L=this.cmdHistory,Y=(T>=17&&T<=23||T>=25&&T<=31)&&F>=64&&F<=127,K=(T===16||T===24)&&F>=64&&F<=95;if(!(Y||K))return!1;if(R(T,F,L))return p(null,null,L),!0;var A=T<=23?1:2;F>=64&&F<=95?M=A===1?t[T]:i[T]:M=A===1?d[T]:c[T];var H=this.channels[A];return H?(H.setPAC(this.interpretPAC(M,F)),p(T,F,L),this.currentChannel=A,!0):!1},E.interpretPAC=function(T,F){var M,L={color:null,italics:!1,indent:null,underline:!1,row:T};return F>95?M=F-96:M=F-64,L.underline=(M&1)===1,M<=13?L.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(M/2)]:M<=15?(L.italics=!0,L.color="white"):L.indent=Math.floor((M-16)/2)*4,L},E.parseChars=function(T,F){var M,L=null,Y=null;if(T>=25?(M=2,Y=T-8):(M=1,Y=T),Y>=17&&Y<=19){var K;Y===17?K=F+80:Y===18?K=F+112:K=F+144,this.logger.log(n.INFO,"Special char '"+m(K)+"' in channel "+M),L=[K]}else T>=32&&T<=127&&(L=F===0?[T]:[T,F]);if(L){var A=h(L);this.logger.log(n.DEBUG,"Char codes = "+A.join(",")),p(T,F,this.cmdHistory)}return L},E.parseBackgroundAttributes=function(T,F){var M=(T===16||T===24)&&F>=32&&F<=47,L=(T===23||T===31)&&F>=45&&F<=47;if(!(M||L))return!1;var Y,K={};T===16||T===24?(Y=Math.floor((F-32)/2),K.background=o[Y],F%2===1&&(K.background=K.background+"_semi")):F===45?K.background="transparent":(K.foreground="black",F===47&&(K.underline=!0));var A=T<=23?1:2,H=this.channels[A];return H.setBkgData(K),p(T,F,this.cmdHistory),!0},E.reset=function(){for(var T=0;T<Object.keys(this.channels).length;T++){var F=this.channels[T];F&&F.reset()}this.cmdHistory=O()},E.cueSplitAtTime=function(T){for(var F=0;F<this.channels.length;F++){var M=this.channels[F];M&&M.cueSplitAtTime(T)}},b}();function p(b,E,w){w.a=b,w.b=E}function R(b,E,w){return w.a===b&&w.b===E}function O(){return{a:null,b:null}}v.default=y},"./src/utils/codecs.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"isCodecType",function(){return g}),C.d(v,"isCodecSupportedInMp4",function(){return m});var N={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 g(S,_){var t=N[_];return!!t&&t[S.slice(0,4)]===!0}function m(S,_){return MediaSource.isTypeSupported((_||"video")+'/mp4;codecs="'+S+'"')}},"./src/utils/cues.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/utils/vttparser.ts"),g=C("./src/utils/webvtt-parser.ts"),m=C("./src/utils/texttrack-utils.ts"),S=/\s/,_={newCue:function(d,i,c,o){for(var n=[],s,h,f,l,a,r=self.VTTCue||self.TextTrackCue,x=0;x<o.rows.length;x++)if(s=o.rows[x],f=!0,l=0,a="",!s.isEmpty()){for(var y=0;y<s.chars.length;y++)S.test(s.chars[y].uchar)&&f?l++:(a+=s.chars[y].uchar,f=!1);s.cueStartTime=i,i===c&&(c+=1e-4),l>=16?l--:l++;var p=Object(N.fixLineBreaks)(a.trim()),R=Object(g.generateCueId)(i,c,p);(!d||!d.cues||!d.cues.getCueById(R))&&(h=new r(i,c,p),h.id=R,h.line=x+1,h.align="left",h.position=10+Math.min(80,Math.floor(l*8/32)*10),n.push(h))}return d&&n.length&&(n.sort(function(O,b){return O.line==="auto"||b.line==="auto"?0:O.line>8&&b.line>8?b.line-O.line:O.line-b.line}),n.forEach(function(O){return Object(m.addCueToTrack)(d,O)})),n}};v.default=_},"./src/utils/discontinuities.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"findFirstFragWithCC",function(){return S}),C.d(v,"shouldAlignOnDiscontinuities",function(){return _}),C.d(v,"findDiscontinuousReferenceFrag",function(){return t}),C.d(v,"adjustSlidingStart",function(){return i}),C.d(v,"alignStream",function(){return c}),C.d(v,"alignPDT",function(){return n}),C.d(v,"alignFragmentByPDTDelta",function(){return s}),C.d(v,"alignMediaPlaylistByPDT",function(){return h});var N=C("./src/polyfills/number.ts"),g=C("./src/utils/logger.ts"),m=C("./src/controller/level-helper.ts");function S(f,l){for(var a=null,r=0,x=f.length;r<x;r++){var y=f[r];if(y&&y.cc===l){a=y;break}}return a}function _(f,l,a){return!!(l.details&&(a.endCC>a.startCC||f&&f.cc<a.startCC))}function t(f,l){var a=f.fragments,r=l.fragments;if(!r.length||!a.length){g.logger.log("No fragments to align");return}var x=S(a,r[0].cc);if(!x||x&&!x.startPTS){g.logger.log("No frag in previous level to align on");return}return x}function d(f,l){if(f){var a=f.start+l;f.start=f.startPTS=a,f.endPTS=a+f.duration}}function i(f,l){for(var a=l.fragments,r=0,x=a.length;r<x;r++)d(a[r],f);l.fragmentHint&&d(l.fragmentHint,f),l.alignedSliding=!0}function c(f,l,a){if(!l)return;o(f,a,l),!a.alignedSliding&&l.details&&n(a,l.details),!a.alignedSliding&&l.details&&!a.skippedSegments&&Object(m.adjustSliding)(l.details,a)}function o(f,l,a){if(_(f,a,l)){var r=t(a.details,l);r&&Object(N.isFiniteNumber)(r.start)&&(g.logger.log("Adjusting PTS using last level due to CC increase within current level "+l.url),i(r.start,l))}}function n(f,l){if(!l.fragments.length||!f.hasProgramDateTime||!l.hasProgramDateTime)return;var a=l.fragments[0].programDateTime,r=f.fragments[0].programDateTime,x=(r-a)/1e3+l.fragments[0].start;x&&Object(N.isFiniteNumber)(x)&&(g.logger.log("Adjusting PTS using programDateTime delta "+(r-a)+"ms, sliding:"+x.toFixed(3)+" "+f.url+" "),i(x,f))}function s(f,l){var a=f.programDateTime;if(!a)return;var r=(a-l)/1e3;f.start=f.startPTS=r,f.endPTS=r+f.duration}function h(f,l){if(!l.fragments.length||!f.hasProgramDateTime||!l.hasProgramDateTime)return;var a=l.fragments[0].programDateTime,r=l.fragments[0].start,x=a-r*1e3;f.fragments.forEach(function(y){s(y,x)}),f.fragmentHint&&s(f.fragmentHint,x),f.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/utils/ewma.ts"),g=function(){function m(_,t,d){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=d,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new N.default(_),this.fast_=new N.default(t)}var S=m.prototype;return S.update=function(t,d){var i=this.slow_,c=this.fast_;this.slow_.halfLife!==t&&(this.slow_=new N.default(t,i.getEstimate(),i.getTotalWeight())),this.fast_.halfLife!==d&&(this.fast_=new N.default(d,c.getEstimate(),c.getTotalWeight()))},S.sample=function(t,d){t=Math.max(t,this.minDelayMs_);var i=8*d,c=t/1e3,o=i/c;this.fast_.sample(c,o),this.slow_.sample(c,o)},S.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},S.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},S.destroy=function(){},m}();v.default=g},"./src/utils/ewma.ts":function(P,v,C){"use strict";C.r(v);var N=function(){function g(S,_,t){_===void 0&&(_=0),t===void 0&&(t=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_=_,this.totalWeight_=t}var m=g.prototype;return m.sample=function(_,t){var d=Math.pow(this.alpha_,_);this.estimate_=t*(1-d)+d*this.estimate_,this.totalWeight_+=_},m.getTotalWeight=function(){return this.totalWeight_},m.getEstimate=function(){if(this.alpha_){var _=1-Math.pow(this.alpha_,this.totalWeight_);if(_)return this.estimate_/_}return this.estimate_},g}();v.default=N},"./src/utils/fetch-loader.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"fetchSupported",function(){return s});var N=C("./src/polyfills/number.ts"),g=C("./src/loader/load-stats.ts"),m=C("./src/demux/chunk-cache.ts");function S(r,x){r.prototype=Object.create(x.prototype),r.prototype.constructor=r,c(r,x)}function _(r){var x=typeof Map=="function"?new Map:void 0;return _=function(p){if(p===null||!i(p))return p;if(typeof p!="function")throw new TypeError("Super expression must either be null or a function");if(typeof x!="undefined"){if(x.has(p))return x.get(p);x.set(p,R)}function R(){return t(p,arguments,o(this).constructor)}return R.prototype=Object.create(p.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),c(R,p)},_(r)}function t(r,x,y){return d()?t=Reflect.construct:t=function(R,O,b){var E=[null];E.push.apply(E,O);var w=Function.bind.apply(R,E),T=new w;return b&&c(T,b.prototype),T},t.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(r){return!1}}function i(r){return Function.toString.call(r).indexOf("[native code]")!==-1}function c(r,x){return c=Object.setPrototypeOf||function(p,R){return p.__proto__=R,p},c(r,x)}function o(r){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},o(r)}function n(){return n=Object.assign||function(r){for(var x=1;x<arguments.length;x++){var y=arguments[x];for(var p in y)Object.prototype.hasOwnProperty.call(y,p)&&(r[p]=y[p])}return r},n.apply(this,arguments)}function s(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(r){}return!1}var h=function(){function r(y){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=y.fetchSetup||l,this.controller=new self.AbortController,this.stats=new g.LoadStats}var x=r.prototype;return x.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},x.abortInternal=function(){var p=this.response;(!p||!p.ok)&&(this.stats.aborted=!0,this.controller.abort())},x.abort=function(){var p;this.abortInternal(),(p=this.callbacks)!==null&&p!==void 0&&p.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},x.load=function(p,R,O){var b=this,E=this.stats;if(E.loading.start)throw new Error("Loader can only be used once.");E.loading.start=self.performance.now();var w=f(p,this.controller.signal),T=O.onProgress,F=p.responseType==="arraybuffer",M=F?"byteLength":"length";this.context=p,this.config=R,this.callbacks=O,this.request=this.fetchSetup(p,w),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){b.abortInternal(),O.onTimeout(E,p,b.response)},R.timeout),self.fetch(this.request).then(function(L){if(b.response=b.loader=L,!L.ok){var Y=L.status,K=L.statusText;throw new a(K||"fetch, bad network response",Y,L)}return E.loading.first=Math.max(self.performance.now(),E.loading.start),E.total=parseInt(L.headers.get("Content-Length")||"0"),T&&Object(N.isFiniteNumber)(R.highWaterMark)?b.loadProgressively(L,E,p,R.highWaterMark,T):F?L.arrayBuffer():L.text()}).then(function(L){var Y=b.response;self.clearTimeout(b.requestTimeout),E.loading.end=Math.max(self.performance.now(),E.loading.first),E.loaded=E.total=L[M];var K={url:Y.url,data:L};T&&!Object(N.isFiniteNumber)(R.highWaterMark)&&T(E,p,L,Y),O.onSuccess(K,E,p,Y)}).catch(function(L){if(self.clearTimeout(b.requestTimeout),E.aborted)return;var Y=L.code||0;O.onError({code:Y,text:L.message},p,L.details)})},x.getCacheAge=function(){var p=null;if(this.response){var R=this.response.headers.get("age");p=R?parseFloat(R):null}return p},x.loadProgressively=function(p,R,O,b,E){b===void 0&&(b=0);var w=new m.default,T=p.body.getReader(),F=function M(){return T.read().then(function(L){if(L.done)return w.dataLength&&E(R,O,w.flush(),p),Promise.resolve(new ArrayBuffer(0));var Y=L.value,K=Y.length;return R.loaded+=K,K<b||w.dataLength?(w.push(Y),w.dataLength>=b&&E(R,O,w.flush(),p)):E(R,O,Y,p),M()}).catch(function(){return Promise.reject()})};return F()},r}();function f(r,x){var y={method:"GET",mode:"cors",credentials:"same-origin",signal:x,headers:new self.Headers(n({},r.headers))};return r.rangeEnd&&y.headers.set("Range","bytes="+r.rangeStart+"-"+String(r.rangeEnd-1)),y}function l(r,x){return new self.Request(r.url,x)}var a=function(r){S(x,r);function x(y,p,R){var O;return O=r.call(this,y)||this,O.code=void 0,O.details=void 0,O.code=p,O.details=R,O}return x}(_(Error));v.default=h},"./src/utils/imsc1-ttml-parser.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"IMSC1_CODEC",function(){return i}),C.d(v,"parseIMSC1",function(){return s});var N=C("./src/utils/mp4-tools.ts"),g=C("./src/utils/vttparser.ts"),m=C("./src/utils/vttcue.ts"),S=C("./src/demux/id3.ts"),_=C("./src/utils/timescale-conversion.ts"),t=C("./src/utils/webvtt-parser.ts");function d(){return d=Object.assign||function(b){for(var E=1;E<arguments.length;E++){var w=arguments[E];for(var T in w)Object.prototype.hasOwnProperty.call(w,T)&&(b[T]=w[T])}return b},d.apply(this,arguments)}var i="stpp.ttml.im1t",c=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,o=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,n={left:"start",center:"center",right:"end",start:"start",end:"end"};function s(b,E,w,T,F){var M=Object(N.findBox)(new Uint8Array(b),["mdat"]);if(M.length===0){F(new Error("Could not parse IMSC1 mdat"));return}var L=M[0],Y=Object(S.utf8ArrayToStr)(new Uint8Array(b,L.start,L.end-L.start)),K=Object(_.toTimescaleFromScale)(E,1,w);try{T(h(Y,K))}catch(A){F(A)}}function h(b,E){var w=new DOMParser,T=w.parseFromString(b,"text/xml"),F=T.getElementsByTagName("tt")[0];if(!F)throw new Error("Invalid ttml");var M={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},L=Object.keys(M).reduce(function(U,I){return U[I]=F.getAttribute("ttp:"+I)||M[I],U},{}),Y=F.getAttribute("xml:space")!=="preserve",K=l(f(F,"styling","style")),A=l(f(F,"layout","region")),H=f(F,"body","[begin]");return[].map.call(H,function(U){var I=a(U,Y);if(!I||!U.hasAttribute("begin"))return null;var G=p(U.getAttribute("begin"),L),ne=p(U.getAttribute("dur"),L),oe=p(U.getAttribute("end"),L);if(G===null)throw y(U);if(oe===null){if(ne===null)throw y(U);oe=G+ne}var de=new m.default(G-E,oe-E,I);de.id=Object(t.generateCueId)(de.startTime,de.endTime,de.text);var Oe=A[U.getAttribute("region")],Ae=K[U.getAttribute("style")];de.position=10,de.size=80;var pe=r(Oe,Ae),Se=pe.textAlign;if(Se){var be=n[Se];be&&(de.lineAlign=be),de.align=Se}return d(de,pe),de}).filter(function(U){return U!==null})}function f(b,E,w){var T=b.getElementsByTagName(E)[0];return T?[].slice.call(T.querySelectorAll(w)):[]}function l(b){return b.reduce(function(E,w){var T=w.getAttribute("xml:id");return T&&(E[T]=w),E},{})}function a(b,E){return[].slice.call(b.childNodes).reduce(function(w,T,F){var M;return T.nodeName==="br"&&F?w+`
|
|
|
`:(M=T.childNodes)!==null&&M!==void 0&&M.length?a(T,E):E?w+T.textContent.trim().replace(/\s+/g," "):w+T.textContent},"")}function r(b,E){var w="http://www.w3.org/ns/ttml#styling",T=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return T.reduce(function(F,M){var L=x(E,w,M)||x(b,w,M);return L&&(F[M]=L),F},{})}function x(b,E,w){return b.hasAttributeNS(E,w)?b.getAttributeNS(E,w):null}function y(b){return new Error("Could not parse ttml timestamp "+b)}function p(b,E){if(!b)return null;var w=Object(g.parseTimeStamp)(b);return w===null&&(c.test(b)?w=R(b,E):o.test(b)&&(w=O(b,E))),w}function R(b,E){var w=c.exec(b),T=(w[4]|0)+(w[5]|0)/E.subFrameRate;return(w[1]|0)*3600+(w[2]|0)*60+(w[3]|0)+T/E.frameRate}function O(b,E){var w=o.exec(b),T=Number(w[1]),F=w[2];switch(F){case"h":return T*3600;case"m":return T*60;case"ms":return T*1e3;case"f":return T/E.frameRate;case"t":return T/E.tickRate}return T}},"./src/utils/logger.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"enableLogs",function(){return t}),C.d(v,"logger",function(){return d});var N=function(){},g={trace:N,debug:N,log:N,warn:N,info:N,error:N},m=g;function S(i){var c=self.console[i];return c?c.bind(self.console,"["+i+"] >"):N}function _(i){for(var c=arguments.length,o=new Array(c>1?c-1:0),n=1;n<c;n++)o[n-1]=arguments[n];o.forEach(function(s){m[s]=i[s]?i[s].bind(i):S(s)})}function t(i){if(self.console&&i===!0||typeof i=="object"){_(i,"debug","log","info","warn","error");try{m.log()}catch(c){m=g}}else m=g}var d=m},"./src/utils/mediakeys-helper.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"KeySystems",function(){return N}),C.d(v,"requestMediaKeySystemAccess",function(){return g});var N;(function(m){m.WIDEVINE="com.widevine.alpha",m.PLAYREADY="com.microsoft.playready"})(N||(N={}));var g=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"getMediaSource",function(){return N});function N(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"bin2str",function(){return _}),C.d(v,"readUint16",function(){return t}),C.d(v,"readUint32",function(){return d}),C.d(v,"writeUint32",function(){return i}),C.d(v,"findBox",function(){return c}),C.d(v,"parseSegmentIndex",function(){return o}),C.d(v,"parseInitSegment",function(){return n}),C.d(v,"getStartDTS",function(){return s}),C.d(v,"getDuration",function(){return h}),C.d(v,"computeRawDurationFromSamples",function(){return f}),C.d(v,"offsetStartDTS",function(){return l}),C.d(v,"segmentValidRange",function(){return a}),C.d(v,"appendUint8Array",function(){return r});var N=C("./src/utils/typed-array.ts"),g=C("./src/loader/fragment.ts"),m=Math.pow(2,32)-1,S=[].push;function _(x){return String.fromCharCode.apply(null,x)}function t(x,y){"data"in x&&(y+=x.start,x=x.data);var p=x[y]<<8|x[y+1];return p<0?65536+p:p}function d(x,y){"data"in x&&(y+=x.start,x=x.data);var p=x[y]<<24|x[y+1]<<16|x[y+2]<<8|x[y+3];return p<0?4294967296+p:p}function i(x,y,p){"data"in x&&(y+=x.start,x=x.data),x[y]=p>>24,x[y+1]=p>>16&255,x[y+2]=p>>8&255,x[y+3]=p&255}function c(x,y){var p=[];if(!y.length)return p;var R,O,b;"data"in x?(R=x.data,O=x.start,b=x.end):(R=x,O=0,b=R.byteLength);for(var E=O;E<b;){var w=d(R,E),T=_(R.subarray(E+4,E+8)),F=w>1?E+w:b;if(T===y[0])if(y.length===1)p.push({data:R,start:E+8,end:F});else{var M=c({data:R,start:E+8,end:F},y.slice(1));M.length&&S.apply(p,M)}E=F}return p}function o(x){var y=c(x,["moov"]),p=y[0],R=p?p.end:null,O=c(x,["sidx"]);if(!O||!O[0])return null;var b=[],E=O[0],w=E.data[0],T=w===0?8:16,F=d(E,T);T+=4;var M=0,L=0;w===0?T+=8:T+=16,T+=2;var Y=E.end+L,K=t(E,T);T+=2;for(var A=0;A<K;A++){var H=T,U=d(E,H);H+=4;var I=U&2147483647,G=(U&2147483648)>>>31;if(G===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ne=d(E,H);H+=4,b.push({referenceSize:I,subsegmentDuration:ne,info:{duration:ne/F,start:Y,end:Y+I-1}}),Y+=I,H+=4,T=H}return{earliestPresentationTime:M,timescale:F,version:w,referencesCount:K,references:b,moovEndOffset:R}}function n(x){for(var y=[],p=c(x,["moov","trak"]),R=0;R<p.length;R++){var O=p[R],b=c(O,["tkhd"])[0];if(b){var E=b.data[b.start],w=E===0?12:20,T=d(b,w),F=c(O,["mdia","mdhd"])[0];if(F){E=F.data[F.start],w=E===0?12:20;var M=d(F,w),L=c(O,["mdia","hdlr"])[0];if(L){var Y=_(L.data.subarray(L.start+8,L.start+12)),K={soun:g.ElementaryStreamTypes.AUDIO,vide:g.ElementaryStreamTypes.VIDEO}[Y];if(K){var A=c(O,["mdia","minf","stbl","stsd"])[0],H=void 0;A&&(H=_(A.data.subarray(A.start+12,A.start+16))),y[T]={timescale:M,type:K},y[K]={timescale:M,id:T,codec:H}}}}}}var U=c(x,["moov","mvex","trex"]);return U.forEach(function(I){var G=d(I,4),ne=y[G];ne&&(ne.default={duration:d(I,12),flags:d(I,20)})}),y}function s(x,y){return c(y,["moof","traf"]).reduce(function(p,R){var O=c(R,["tfdt"])[0],b=O.data[O.start],E=c(R,["tfhd"]).reduce(function(w,T){var F=d(T,4),M=x[F];if(M){var L=d(O,4);b===1&&(L*=Math.pow(2,32),L+=d(O,8));var Y=M.timescale||9e4,K=L/Y;if(isFinite(K)&&(w===null||K<w))return K}return w},null);return E!==null&&isFinite(E)&&(p===null||E<p)?E:p},null)||0}function h(x,y){for(var p=0,R=0,O=0,b=c(x,["moof","traf"]),E=0;E<b.length;E++){var w=b[E],T=c(w,["tfhd"])[0],F=d(T,4),M=y[F];if(!M)continue;var L=M.default,Y=d(T,0)|(L==null?void 0:L.flags),K=L==null?void 0:L.duration;Y&8&&(Y&2?K=d(T,12):K=d(T,8));for(var A=M.timescale||9e4,H=c(w,["trun"]),U=0;U<H.length;U++){if(K){var I=d(H[U],4);p=K*I}else p=f(H[U]);M.type===g.ElementaryStreamTypes.VIDEO?R+=p/A:M.type===g.ElementaryStreamTypes.AUDIO&&(O+=p/A)}}if(R===0&&O===0){var G=o(x);if(G!=null&&G.references)return G.references.reduce(function(ne,oe){return ne+oe.info.duration||0},0)}return R||O}function f(x){var y=d(x,0),p=8;y&1&&(p+=4),y&4&&(p+=4);for(var R=0,O=d(x,4),b=0;b<O;b++){if(y&256){var E=d(x,p);R+=E,p+=4}y&512&&(p+=4),y&1024&&(p+=4),y&2048&&(p+=4)}return R}function l(x,y,p){c(y,["moof","traf"]).forEach(function(R){c(R,["tfhd"]).forEach(function(O){var b=d(O,4),E=x[b];if(!E)return;var w=E.timescale||9e4;c(R,["tfdt"]).forEach(function(T){var F=T.data[T.start],M=d(T,4);if(F===0)i(T,4,M-p*w);else{M*=Math.pow(2,32),M+=d(T,8),M-=p*w,M=Math.max(M,0);var L=Math.floor(M/(m+1)),Y=Math.floor(M%(m+1));i(T,4,L),i(T,8,Y)}})})})}function a(x){var y={valid:null,remainder:null},p=c(x,["moof"]);if(p){if(p.length<2)return y.remainder=x,y}else return y;var R=p[p.length-1];return y.valid=Object(N.sliceUint8)(x,0,R.start-8),y.remainder=Object(N.sliceUint8)(x,R.start-8),y}function r(x,y){var p=new Uint8Array(x.length+y.length);return p.set(x),p.set(y,x.length),p}},"./src/utils/output-filter.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"default",function(){return N});var N=function(){function g(S,_){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=S,this.trackName=_}var m=g.prototype;return m.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},m.newCue=function(_,t,d){(this.startTime===null||this.startTime>_)&&(this.startTime=_),this.endTime=t,this.screen=d,this.timelineController.createCaptionsTrack(this.trackName)},m.reset=function(){this.cueRanges=[]},g}()},"./src/utils/texttrack-utils.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"sendAddTrackEvent",function(){return g}),C.d(v,"addCueToTrack",function(){return m}),C.d(v,"clearCurrentCues",function(){return S}),C.d(v,"removeCuesInRange",function(){return _}),C.d(v,"getCuesInRange",function(){return d});var N=C("./src/utils/logger.ts");function g(i,c){var o;try{o=new Event("addtrack")}catch(n){o=document.createEvent("Event"),o.initEvent("addtrack",!1,!1)}o.track=i,c.dispatchEvent(o)}function m(i,c){var o=i.mode;if(o==="disabled"&&(i.mode="hidden"),i.cues&&!i.cues.getCueById(c.id))try{if(i.addCue(c),!i.cues.getCueById(c.id))throw new Error("addCue is failed for: "+c)}catch(s){N.logger.debug("[texttrack-utils]: "+s);var n=new self.TextTrackCue(c.startTime,c.endTime,c.text);n.id=c.id,i.addCue(n)}o==="disabled"&&(i.mode=o)}function S(i){var c=i.mode;if(c==="disabled"&&(i.mode="hidden"),i.cues)for(var o=i.cues.length;o--;)i.removeCue(i.cues[o]);c==="disabled"&&(i.mode=c)}function _(i,c,o){var n=i.mode;if(n==="disabled"&&(i.mode="hidden"),i.cues&&i.cues.length>0)for(var s=d(i.cues,c,o),h=0;h<s.length;h++)i.removeCue(s[h]);n==="disabled"&&(i.mode=n)}function t(i,c){if(c<i[0].startTime)return 0;var o=i.length-1;if(c>i[o].endTime)return-1;for(var n=0,s=o;n<=s;){var h=Math.floor((s+n)/2);if(c<i[h].startTime)s=h-1;else if(c>i[h].startTime&&n<o)n=h+1;else return h}return i[n].startTime-c<c-i[s].startTime?n:s}function d(i,c,o){var n=[],s=t(i,c);if(s>-1)for(var h=s,f=i.length;h<f;h++){var l=i[h];if(l.startTime>=c&&l.endTime<=o)n.push(l);else if(l.startTime>o)return n}return n}},"./src/utils/time-ranges.ts":function(P,v,C){"use strict";C.r(v);var N={toString:function(m){for(var S="",_=m.length,t=0;t<_;t++)S+="["+m.start(t).toFixed(3)+","+m.end(t).toFixed(3)+"]";return S}};v.default=N},"./src/utils/timescale-conversion.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"toTimescaleFromBase",function(){return g}),C.d(v,"toTimescaleFromScale",function(){return m}),C.d(v,"toMsFromMpegTsClock",function(){return S}),C.d(v,"toMpegTsClockFromTimescale",function(){return _});var N=9e4;function g(t,d,i,c){i===void 0&&(i=1),c===void 0&&(c=!1);var o=t*d*i;return c?Math.round(o):o}function m(t,d,i,c){return i===void 0&&(i=1),c===void 0&&(c=!1),g(t,d,1/i,c)}function S(t,d){return d===void 0&&(d=!1),g(t,1e3,1/N,d)}function _(t,d){return d===void 0&&(d=1),g(t,N,1/d)}},"./src/utils/typed-array.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"sliceUint8",function(){return N});function N(g,m,S){return Uint8Array.prototype.slice?g.slice(m,S):new Uint8Array(Array.prototype.slice.call(g,m,S))}},"./src/utils/vttcue.ts":function(P,v,C){"use strict";C.r(v),v.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var N=["","lr","rl"],g=["start","middle","end","left","right"];function m(i,c){if(typeof c!="string")return!1;if(!Array.isArray(i))return!1;var o=c.toLowerCase();return~i.indexOf(o)?o:!1}function S(i){return m(N,i)}function _(i){return m(g,i)}function t(i){for(var c=arguments.length,o=new Array(c>1?c-1:0),n=1;n<c;n++)o[n-1]=arguments[n];for(var s=1;s<arguments.length;s++){var h=arguments[s];for(var f in h)i[f]=h[f]}return i}function d(i,c,o){var n=this,s={enumerable:!0};n.hasBeenReset=!1;var h="",f=!1,l=i,a=c,r=o,x=null,y="",p=!0,R="auto",O="start",b=50,E="middle",w=50,T="middle";Object.defineProperty(n,"id",t({},s,{get:function(){return h},set:function(M){h=""+M}})),Object.defineProperty(n,"pauseOnExit",t({},s,{get:function(){return f},set:function(M){f=!!M}})),Object.defineProperty(n,"startTime",t({},s,{get:function(){return l},set:function(M){if(typeof M!="number")throw new TypeError("Start time must be set to a number.");l=M,this.hasBeenReset=!0}})),Object.defineProperty(n,"endTime",t({},s,{get:function(){return a},set:function(M){if(typeof M!="number")throw new TypeError("End time must be set to a number.");a=M,this.hasBeenReset=!0}})),Object.defineProperty(n,"text",t({},s,{get:function(){return r},set:function(M){r=""+M,this.hasBeenReset=!0}})),Object.defineProperty(n,"region",t({},s,{get:function(){return x},set:function(M){x=M,this.hasBeenReset=!0}})),Object.defineProperty(n,"vertical",t({},s,{get:function(){return y},set:function(M){var L=S(M);if(L===!1)throw new SyntaxError("An invalid or illegal string was specified.");y=L,this.hasBeenReset=!0}})),Object.defineProperty(n,"snapToLines",t({},s,{get:function(){return p},set:function(M){p=!!M,this.hasBeenReset=!0}})),Object.defineProperty(n,"line",t({},s,{get:function(){return R},set:function(M){if(typeof M!="number"&&M!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");R=M,this.hasBeenReset=!0}})),Object.defineProperty(n,"lineAlign",t({},s,{get:function(){return O},set:function(M){var L=_(M);if(!L)throw new SyntaxError("An invalid or illegal string was specified.");O=L,this.hasBeenReset=!0}})),Object.defineProperty(n,"position",t({},s,{get:function(){return b},set:function(M){if(M<0||M>100)throw new Error("Position must be between 0 and 100.");b=M,this.hasBeenReset=!0}})),Object.defineProperty(n,"positionAlign",t({},s,{get:function(){return E},set:function(M){var L=_(M);if(!L)throw new SyntaxError("An invalid or illegal string was specified.");E=L,this.hasBeenReset=!0}})),Object.defineProperty(n,"size",t({},s,{get:function(){return w},set:function(M){if(M<0||M>100)throw new Error("Size must be between 0 and 100.");w=M,this.hasBeenReset=!0}})),Object.defineProperty(n,"align",t({},s,{get:function(){return T},set:function(M){var L=_(M);if(!L)throw new SyntaxError("An invalid or illegal string was specified.");T=L,this.hasBeenReset=!0}})),n.displayState=void 0}return d.prototype.getCueAsHTML=function(){var i=self.WebVTT;return i.convertCueToDOMTree(self,this.text)},d}()},"./src/utils/vttparser.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"parseTimeStamp",function(){return m}),C.d(v,"fixLineBreaks",function(){return c}),C.d(v,"VTTParser",function(){return o});var N=C("./src/utils/vttcue.ts"),g=function(){function n(){}var s=n.prototype;return s.decode=function(f,l){if(!f)return"";if(typeof f!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(f))},n}();function m(n){function s(f,l,a,r){return(f|0)*3600+(l|0)*60+(a|0)+parseFloat(r||0)}var h=n.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return h?parseFloat(h[2])>59?s(h[2],h[3],0,h[4]):s(h[1],h[2],h[3],h[4]):null}var S=function(){function n(){this.values=Object.create(null)}var s=n.prototype;return s.set=function(f,l){!this.get(f)&&l!==""&&(this.values[f]=l)},s.get=function(f,l,a){return a?this.has(f)?this.values[f]:l[a]:this.has(f)?this.values[f]:l},s.has=function(f){return f in this.values},s.alt=function(f,l,a){for(var r=0;r<a.length;++r)if(l===a[r]){this.set(f,l);break}},s.integer=function(f,l){/^-?\d+$/.test(l)&&this.set(f,parseInt(l,10))},s.percent=function(f,l){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(l)){var a=parseFloat(l);if(a>=0&&a<=100)return this.set(f,a),!0}return!1},n}();function _(n,s,h,f){var l=f?n.split(f):[n];for(var a in l){if(typeof l[a]!="string")continue;var r=l[a].split(h);if(r.length!==2)continue;var x=r[0],y=r[1];s(x,y)}}var t=new N.default(0,0,""),d=t.align==="middle"?"middle":"center";function i(n,s,h){var f=n;function l(){var x=m(n);if(x===null)throw new Error("Malformed timestamp: "+f);return n=n.replace(/^[^\sa-zA-Z-]+/,""),x}function a(x,y){var p=new S;_(x,function(b,E){var w;switch(b){case"region":for(var T=h.length-1;T>=0;T--)if(h[T].id===E){p.set(b,h[T].region);break}break;case"vertical":p.alt(b,E,["rl","lr"]);break;case"line":w=E.split(","),p.integer(b,w[0]),p.percent(b,w[0])&&p.set("snapToLines",!1),p.alt(b,w[0],["auto"]),w.length===2&&p.alt("lineAlign",w[1],["start",d,"end"]);break;case"position":w=E.split(","),p.percent(b,w[0]),w.length===2&&p.alt("positionAlign",w[1],["start",d,"end","line-left","line-right","auto"]);break;case"size":p.percent(b,E);break;case"align":p.alt(b,E,["start",d,"end","left","right"]);break}},/:/,/\s/),y.region=p.get("region",null),y.vertical=p.get("vertical","");var R=p.get("line","auto");R==="auto"&&t.line===-1&&(R=-1),y.line=R,y.lineAlign=p.get("lineAlign","start"),y.snapToLines=p.get("snapToLines",!0),y.size=p.get("size",100),y.align=p.get("align",d);var O=p.get("position","auto");O==="auto"&&t.position===50&&(O=y.align==="start"||y.align==="left"?0:y.align==="end"||y.align==="right"?100:50),y.position=O}function r(){n=n.replace(/^\s+/,"")}if(r(),s.startTime=l(),r(),n.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+f);n=n.substr(3),r(),s.endTime=l(),r(),a(n,s)}function c(n){return n.replace(/<br(?: \/)?>/gi,`
|
|
|
`)}var o=function(){function n(){this.state="INITIAL",this.buffer="",this.decoder=new g,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var s=n.prototype;return s.parse=function(f){var l=this;f&&(l.buffer+=l.decoder.decode(f,{stream:!0}));function a(){var O=l.buffer,b=0;for(O=c(O);b<O.length&&O[b]!=="\r"&&O[b]!==`
|
|
|
`;)++b;var E=O.substr(0,b);return O[b]==="\r"&&++b,O[b]===`
|
|
|
`&&++b,l.buffer=O.substr(b),E}function r(O){_(O,function(b,E){},/:/)}try{var x="";if(l.state==="INITIAL"){if(!/\r\n|\n/.test(l.buffer))return this;x=a();var y=x.match(/^()?WEBVTT([ \t].*)?$/);if(!y||!y[0])throw new Error("Malformed WebVTT signature.");l.state="HEADER"}for(var p=!1;l.buffer;){if(!/\r\n|\n/.test(l.buffer))return this;p?p=!1:x=a();switch(l.state){case"HEADER":/:/.test(x)?r(x):x||(l.state="ID");continue;case"NOTE":x||(l.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(x)){l.state="NOTE";break}if(!x)continue;if(l.cue=new N.default(0,0,""),l.state="CUE",x.indexOf("-->")===-1){l.cue.id=x;continue}case"CUE":if(!l.cue){l.state="BADCUE";continue}try{i(x,l.cue,l.regionList)}catch(O){l.cue=null,l.state="BADCUE";continue}l.state="CUETEXT";continue;case"CUETEXT":{var R=x.indexOf("-->")!==-1;if(!x||R&&(p=!0)){l.oncue&&l.cue&&l.oncue(l.cue),l.cue=null,l.state="ID";continue}if(l.cue===null)continue;l.cue.text&&(l.cue.text+=`
|
|
|
`),l.cue.text+=x}continue;case"BADCUE":x||(l.state="ID")}}}catch(O){l.state==="CUETEXT"&&l.cue&&l.oncue&&l.oncue(l.cue),l.cue=null,l.state=l.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},s.flush=function(){var f=this;try{if((f.cue||f.state==="HEADER")&&(f.buffer+=`
|
|
|
|
|
|
`,f.parse()),f.state==="INITIAL"||f.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(l){f.onparsingerror&&f.onparsingerror(l)}return f.onflush&&f.onflush(),this},n}()},"./src/utils/webvtt-parser.ts":function(P,v,C){"use strict";C.r(v),C.d(v,"generateCueId",function(){return o}),C.d(v,"parseWebVTT",function(){return s});var N=C("./src/polyfills/number.ts"),g=C("./src/utils/vttparser.ts"),m=C("./src/demux/id3.ts"),S=C("./src/utils/timescale-conversion.ts"),_=C("./src/remux/mp4-remuxer.ts"),t=/\r\n|\n\r|\n|\r/g,d=function(f,l,a){return a===void 0&&(a=0),f.substr(a,l.length)===l},i=function(f){var l=parseInt(f.substr(-3)),a=parseInt(f.substr(-6,2)),r=parseInt(f.substr(-9,2)),x=f.length>9?parseInt(f.substr(0,f.indexOf(":"))):0;if(!Object(N.isFiniteNumber)(l)||!Object(N.isFiniteNumber)(a)||!Object(N.isFiniteNumber)(r)||!Object(N.isFiniteNumber)(x))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+f);return l+=1e3*a,l+=60*1e3*r,l+=60*60*1e3*x,l},c=function(f){for(var l=5381,a=f.length;a;)l=l*33^f.charCodeAt(--a);return(l>>>0).toString()};function o(h,f,l){return c(h.toString())+c(f.toString())+c(l)}var n=function(f,l,a){var r=f[l],x=f[r.prevCC];if(!x||!x.new&&r.new){f.ccOffset=f.presentationOffset=r.start,r.new=!1;return}for(;(y=x)!==null&&y!==void 0&&y.new;){var y;f.ccOffset+=r.start-x.start,r.new=!1,r=x,x=f[r.prevCC]}f.presentationOffset=a};function s(h,f,l,a,r,x,y,p){var R=new g.VTTParser,O=Object(m.utf8ArrayToStr)(new Uint8Array(h)).trim().replace(t,`
|
|
|
`).split(`
|
|
|
`),b=[],E=Object(S.toMpegTsClockFromTimescale)(f,l),w="00:00.000",T=0,F=0,M,L=!0,Y=!1;R.oncue=function(K){var A=a[r],H=a.ccOffset,U=(T-E)/9e4;if(A!=null&&A.new&&(F!==void 0?H=a.ccOffset=A.start:n(a,r,U)),U&&(H=U-a.presentationOffset),Y){var I=K.endTime-K.startTime,G=Object(_.normalizePts)((K.startTime+H-F)*9e4,x*9e4)/9e4;K.startTime=G,K.endTime=G+I}var ne=K.text.trim();K.text=decodeURIComponent(encodeURIComponent(ne)),K.id||(K.id=o(K.startTime,K.endTime,ne)),K.endTime>0&&b.push(K)},R.onparsingerror=function(K){M=K},R.onflush=function(){if(M){p(M);return}y(b)},O.forEach(function(K){if(L)if(d(K,"X-TIMESTAMP-MAP=")){L=!1,Y=!0,K.substr(16).split(",").forEach(function(A){d(A,"LOCAL:")?w=A.substr(6):d(A,"MPEGTS:")&&(T=parseInt(A.substr(7)))});try{F=i(w)/1e3}catch(A){Y=!1,M=A}return}else K===""&&(L=!1);R.parse(K+`
|
|
|
`)}),R.flush()}},"./src/utils/xhr-loader.ts":function(P,v,C){"use strict";C.r(v);var N=C("./src/utils/logger.ts"),g=C("./src/loader/load-stats.ts"),m=/^age:\s*[\d.]+\s*$/m,S=function(){function _(d){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=d?d.xhrSetup:null,this.stats=new g.LoadStats,this.retryDelay=0}var t=_.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var i=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),i&&(i.onreadystatechange=null,i.onprogress=null,i.readyState!==4&&(this.stats.aborted=!0,i.abort()))},t.abort=function(){var i;this.abortInternal(),(i=this.callbacks)!==null&&i!==void 0&&i.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(i,c,o){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=i,this.config=c,this.callbacks=o,this.retryDelay=c.retryDelay,this.loadInternal()},t.loadInternal=function(){var i=this.config,c=this.context;if(!i)return;var o=this.loader=new self.XMLHttpRequest,n=this.stats;n.loading.first=0,n.loaded=0;var s=this.xhrSetup;try{if(s)try{s(o,c.url)}catch(l){o.open("GET",c.url,!0),s(o,c.url)}o.readyState||o.open("GET",c.url,!0);var h=this.context.headers;if(h)for(var f in h)o.setRequestHeader(f,h[f])}catch(l){this.callbacks.onError({code:o.status,text:l.message},c,o);return}c.rangeEnd&&o.setRequestHeader("Range","bytes="+c.rangeStart+"-"+(c.rangeEnd-1)),o.onreadystatechange=this.readystatechange.bind(this),o.onprogress=this.loadprogress.bind(this),o.responseType=c.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout),o.send()},t.readystatechange=function(){var i=this.context,c=this.loader,o=this.stats;if(!i||!c)return;var n=c.readyState,s=this.config;if(o.aborted)return;if(n>=2)if(self.clearTimeout(this.requestTimeout),o.loading.first===0&&(o.loading.first=Math.max(self.performance.now(),o.loading.start)),n===4){c.onreadystatechange=null,c.onprogress=null;var h=c.status;if(h>=200&&h<300){o.loading.end=Math.max(self.performance.now(),o.loading.first);var f,l;if(i.responseType==="arraybuffer"?(f=c.response,l=f.byteLength):(f=c.responseText,l=f.length),o.loaded=o.total=l,!this.callbacks)return;var a=this.callbacks.onProgress;if(a&&a(o,i,f,c),!this.callbacks)return;var r={url:c.responseURL,data:f};this.callbacks.onSuccess(r,o,i,c)}else o.retry>=s.maxRetry||h>=400&&h<499?(N.logger.error(h+" while loading "+i.url),this.callbacks.onError({code:h,text:c.statusText},i,c)):(N.logger.warn(h+" while loading "+i.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,s.maxRetryDelay),o.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)},t.loadtimeout=function(){N.logger.warn("timeout while loading "+this.context.url);var i=this.callbacks;i&&(this.abortInternal(),i.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(i){var c=this.stats;c.loaded=i.loaded,i.lengthComputable&&(c.total=i.total)},t.getCacheAge=function(){var i=null;if(this.loader&&m.test(this.loader.getAllResponseHeaders())){var c=this.loader.getResponseHeader("age");i=c?parseFloat(c):null}return i},_}();v.default=S}}).default})},vHTk:function(W,q,D){W.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(P){return function(){var v=P,C=v.lib,N=C.StreamCipher,g=v.algo,m=g.RC4=N.extend({_doReset:function(){for(var t=this._key,d=t.words,i=t.sigBytes,c=this._S=[],o=0;o<256;o++)c[o]=o;for(var o=0,n=0;o<256;o++){var s=o%i,h=d[s>>>2]>>>24-s%4*8&255;n=(n+c[o]+h)%256;var f=c[o];c[o]=c[n],c[n]=f}this._i=this._j=0},_doProcessBlock:function(t,d){t[d]^=S.call(this)},keySize:256/32,ivSize:0});function S(){for(var t=this._S,d=this._i,i=this._j,c=0,o=0;o<4;o++){d=(d+1)%256,i=(i+t[d])%256;var n=t[d];t[d]=t[i],t[i]=n,c|=t[(t[d]+t[i])%256]<<24-o*8}return this._i=d,this._j=i,c}v.RC4=N._createHelper(m);var _=g.RC4Drop=m.extend({cfg:m.cfg.extend({drop:192}),_doReset:function(){m._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)S.call(this)}});v.RC4Drop=N._createHelper(_)}(),P.RC4})},wCXF:function(W,q,D){"use strict";D.d(q,"a",function(){return $e});var P=D("rePB"),v=D("VTBJ"),C=D("KQm4"),N=D("U8pU"),g=D("ODXe"),m=D("q1tI"),S=D("TSYQ"),_=D.n(S),t=D("Gytx"),d=D.n(t),i=D("Kwbf"),c=D("t23M"),o=D("qx4F"),n=D("6eGT"),s=D("IBYe"),h=D("Ff2n"),f=D("c+Xe"),l=D("fyJ8"),a=D("biw7");function r(je,Ie,qe,st,Ee){var ce=qe[je]||{},fe=qe[Ie]||{},ve,Ce;ce.fixed==="left"?ve=st.left[je]:fe.fixed==="right"&&(Ce=st.right[Ie]);var ge=!1,ye=!1,Re=!1,De=!1,Pe=qe[Ie+1],ze=qe[je-1];if(Ee==="rtl"){if(ve!==void 0){var at=ze&&ze.fixed==="left";De=!at}else if(Ce!==void 0){var lt=Pe&&Pe.fixed==="right";Re=!lt}}else if(ve!==void 0){var St=Pe&&Pe.fixed==="left";ge=!St}else if(Ce!==void 0){var Ot=ze&&ze.fixed==="right";ye=!Ot}return{fixLeft:ve,fixRight:Ce,lastFixLeft:ge,firstFixRight:ye,lastFixRight:Re,firstFixLeft:De,isSticky:st.isSticky}}var x=D("sR1s");function y(je){var Ie=je.cells,qe=je.stickyOffsets,st=je.flattenColumns,Ee=je.rowComponent,ce=je.cellComponent,fe=je.onHeaderRow,ve=je.index,Ce=m.useContext(a.a),ge=Ce.prefixCls,ye=Ce.direction,Re;fe&&(Re=fe(Ie.map(function(Pe){return Pe.column}),ve));var De=Object(x.a)(Ie.map(function(Pe){return Pe.column}));return m.createElement(Ee,Object.assign({},Re),Ie.map(function(Pe,ze){var at=Pe.column,lt=r(Pe.colStart,Pe.colEnd,st,qe,ye),St;return at&&at.onHeaderCell&&(St=Pe.column.onHeaderCell(at)),m.createElement(l.a,Object.assign({},Pe,{ellipsis:at.ellipsis,align:at.align,component:ce,prefixCls:ge,key:De[ze]},lt,{additionalProps:St,rowType:"header"}))}))}y.displayName="HeaderRow";var p=y;function R(je){var Ie=[];function qe(fe,ve){var Ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ie[Ce]=Ie[Ce]||[];var ge=ve,ye=fe.filter(Boolean).map(function(Re){var De={key:Re.key,className:Re.className||"",children:Re.title,column:Re,colStart:ge},Pe=1,ze=Re.children;return ze&&ze.length>0&&(Pe=qe(ze,ge,Ce+1).reduce(function(at,lt){return at+lt},0),De.hasSubColumns=!0),"colSpan"in Re&&(Pe=Re.colSpan),"rowSpan"in Re&&(De.rowSpan=Re.rowSpan),De.colSpan=Pe,De.colEnd=De.colStart+Pe-1,Ie[Ce].push(De),ge+=Pe,Pe});return ye}qe(je,0);for(var st=Ie.length,Ee=function(ve){Ie[ve].forEach(function(Ce){!("rowSpan"in Ce)&&!Ce.hasSubColumns&&(Ce.rowSpan=st-ve)})},ce=0;ce<st;ce+=1)Ee(ce);return Ie}function O(je){var Ie=je.stickyOffsets,qe=je.columns,st=je.flattenColumns,Ee=je.onHeaderRow,ce=m.useContext(a.a),fe=ce.prefixCls,ve=ce.getComponent,Ce=m.useMemo(function(){return R(qe)},[qe]),ge=ve(["header","wrapper"],"thead"),ye=ve(["header","row"],"tr"),Re=ve(["header","cell"],"th");return m.createElement(ge,{className:"".concat(fe,"-thead")},Ce.map(function(De,Pe){var ze=m.createElement(p,{key:Pe,flattenColumns:st,cells:De,stickyOffsets:Ie,rowComponent:ye,cellComponent:Re,onHeaderRow:Ee,index:Pe});return ze}))}var b=O,E=D("hW8S");function w(je){for(var Ie=je.colWidths,qe=je.columns,st=je.columCount,Ee=[],ce=st||qe.length,fe=!1,ve=ce-1;ve>=0;ve-=1){var Ce=Ie[ve],ge=qe&&qe[ve],ye=ge&&ge[E.a];(Ce||ye||fe)&&(Ee.unshift(m.createElement("col",Object.assign({key:ve,style:{width:Ce,minWidth:Ce}},ye))),fe=!0)}return m.createElement("colgroup",null,Ee)}var T=w;function F(je,Ie){return Object(m.useMemo)(function(){for(var qe=[],st=0;st<Ie;st+=1){var Ee=je[st];if(Ee!==void 0)qe[st]=Ee;else return null}return qe},[je.join("_"),Ie])}var M=m.forwardRef(function(je,Ie){var qe=je.noData,st=je.columns,Ee=je.flattenColumns,ce=je.colWidths,fe=je.columCount,ve=je.stickyOffsets,Ce=je.direction,ge=je.fixHeader,ye=je.offsetHeader,Re=je.stickyClassName,De=je.onScroll,Pe=Object(h.a)(je,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),ze=m.useContext(a.a),at=ze.prefixCls,lt=ze.scrollbarSize,St=ze.isSticky,Ot=St&&!ge?0:lt,ir=m.useRef(null),Gt=m.useCallback(function(an){Object(f.b)(Ie,an),Object(f.b)(ir,an)},[]);m.useEffect(function(){var an;function tn(Ir){var hn=Ir.currentTarget,lr=Ir.deltaX;lr&&(De({currentTarget:hn,scrollLeft:hn.scrollLeft+lr}),Ir.preventDefault())}return(an=ir.current)===null||an===void 0||an.addEventListener("wheel",tn),function(){var Ir;(Ir=ir.current)===null||Ir===void 0||Ir.removeEventListener("wheel",tn)}},[]);var yt=Ee[Ee.length-1],Fr={fixed:yt?yt.fixed:null,onHeaderCell:function(){return{className:"".concat(at,"-cell-scrollbar")}}},Pr=Object(m.useMemo)(function(){return Ot?[].concat(Object(C.a)(st),[Fr]):st},[Ot,st]),jr=Object(m.useMemo)(function(){return Ot?[].concat(Object(C.a)(Ee),[Fr]):Ee},[Ot,Ee]),un=Object(m.useMemo)(function(){var an=ve.right,tn=ve.left;return Object(v.a)(Object(v.a)({},ve),{},{left:Ce==="rtl"?[].concat(Object(C.a)(tn.map(function(Ir){return Ir+Ot})),[0]):tn,right:Ce==="rtl"?an:[].concat(Object(C.a)(an.map(function(Ir){return Ir+Ot})),[0]),isSticky:St})},[Ot,ve,St]),xr=F(ce,fe);return m.createElement("div",{style:Object(v.a)({overflow:"hidden"},St?{top:ye}:{}),ref:Gt,className:_()("".concat(at,"-header"),Object(P.a)({},Re,!!Re))},m.createElement("table",{style:{tableLayout:"fixed",visibility:qe||xr?null:"hidden"}},m.createElement(T,{colWidths:xr?[].concat(Object(C.a)(xr),[Ot]):[],columCount:fe+1,columns:jr}),m.createElement(b,Object.assign({},Pe,{stickyOffsets:un,columns:Pr,flattenColumns:jr}))))});M.displayName="FixedHeader";var L=M,Y=m.createContext(null),K=Y;function A(je){var Ie=je.prefixCls,qe=je.children,st=je.component,Ee=je.cellComponent,ce=je.fixHeader,fe=je.fixColumn,ve=je.horizonScroll,Ce=je.className,ge=je.expanded,ye=je.componentWidth,Re=je.colSpan,De=m.useContext(a.a),Pe=De.scrollbarSize;return m.useMemo(function(){var ze=qe;return fe&&(ze=m.createElement("div",{style:{width:ye-(ce?Pe:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ie,"-expanded-row-fixed")},ze)),m.createElement(st,{className:Ce,style:{display:ge?null:"none"}},m.createElement(l.a,{component:Ee,prefixCls:Ie,colSpan:Re},ze))},[qe,st,ce,ve,Ce,ge,ye,Re,Pe])}var H=A;function U(je){var Ie=je.className,qe=je.style,st=je.record,Ee=je.index,ce=je.rowKey,fe=je.getRowKey,ve=je.rowExpandable,Ce=je.expandedKeys,ge=je.onRow,ye=je.indent,Re=ye===void 0?0:ye,De=je.rowComponent,Pe=je.cellComponent,ze=je.childrenColumnName,at=m.useContext(a.a),lt=at.prefixCls,St=at.fixedInfoList,Ot=m.useContext(K),ir=Ot.fixHeader,Gt=Ot.fixColumn,yt=Ot.horizonScroll,Fr=Ot.componentWidth,Pr=Ot.flattenColumns,jr=Ot.expandableType,un=Ot.expandRowByClick,xr=Ot.onTriggerExpand,an=Ot.rowClassName,tn=Ot.expandedRowClassName,Ir=Ot.indentSize,hn=Ot.expandIcon,lr=Ot.expandedRowRender,Cr=Ot.expandIconColumnIndex,gr=m.useState(!1),xn=Object(g.a)(gr,2),Wn=xn[0],gn=xn[1],Bt=Ce&&Ce.has(je.recordKey);m.useEffect(function(){Bt&&gn(!0)},[Bt]);var Kr=jr==="row"&&(!ve||ve(st)),rn=jr==="nest",Or=ze&&st&&st[ze],Lr=Kr||rn,Wr;ge&&(Wr=ge(st,Ee));var Fn=function(wr){if(un&&Lr&&xr(st,wr),Wr&&Wr.onClick){for(var si,It=arguments.length,Zn=new Array(It>1?It-1:0),Bn=1;Bn<It;Bn++)Zn[Bn-1]=arguments[Bn];(si=Wr).onClick.apply(si,[wr].concat(Zn))}},yn;typeof an=="string"?yn=an:typeof an=="function"&&(yn=an(st,Ee,Re));var Ct=Object(x.a)(Pr),ur=m.createElement(De,Object.assign({},Wr,{"data-row-key":ce,className:_()(Ie,"".concat(lt,"-row"),"".concat(lt,"-row-level-").concat(Re),yn,Wr&&Wr.className),style:Object(v.a)(Object(v.a)({},qe),Wr?Wr.style:null),onClick:Fn}),Pr.map(function(Un,wr){var si=Un.render,It=Un.dataIndex,Zn=Un.className,Bn=Ct[wr],zi=St[wr],Ti;wr===(Cr||0)&&rn&&(Ti=m.createElement(m.Fragment,null,m.createElement("span",{style:{paddingLeft:"".concat(Ir*Re,"px")},className:"".concat(lt,"-row-indent indent-level-").concat(Re)}),hn({prefixCls:lt,expanded:Bt,expandable:Or,record:st,onExpand:xr})));var ri;return Un.onCell&&(ri=Un.onCell(st,Ee)),m.createElement(l.a,Object.assign({className:Zn,ellipsis:Un.ellipsis,align:Un.align,component:Pe,prefixCls:lt,key:Bn,record:st,index:Ee,dataIndex:It,render:si,shouldCellUpdate:Un.shouldCellUpdate},zi,{appendNode:Ti,additionalProps:ri}))})),oi;if(Kr&&(Wn||Bt)){var wi=lr(st,Ee,Re+1,Bt),Pi=tn&&tn(st,Ee,Re);oi=m.createElement(H,{expanded:Bt,className:_()("".concat(lt,"-expanded-row"),"".concat(lt,"-expanded-row-level-").concat(Re+1),Pi),prefixCls:lt,fixHeader:ir,fixColumn:Gt,horizonScroll:yt,component:De,componentWidth:Fr,cellComponent:Pe,colSpan:Pr.length},wi)}var vi;return Or&&Bt&&(vi=(st[ze]||[]).map(function(Un,wr){var si=fe(Un,wr);return m.createElement(U,Object.assign({},je,{key:si,rowKey:si,record:Un,recordKey:si,index:wr,indent:Re+1}))})),m.createElement(m.Fragment,null,ur,oi,vi)}U.displayName="BodyRow";var I=U,G=m.createContext(null),ne=G;function oe(je){var Ie=je.columnKey,qe=je.onColumnResize,st=m.useRef();return m.useEffect(function(){st.current&&qe(Ie,st.current.offsetWidth)},[]),m.createElement(c.a,{onResize:function(ce){var fe=ce.offsetWidth;qe(Ie,fe)}},m.createElement("td",{ref:st,style:{padding:0,border:0,height:0}},m.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function de(je){var Ie=je.data,qe=je.getRowKey,st=je.measureColumnWidth,Ee=je.expandedKeys,ce=je.onRow,fe=je.rowExpandable,ve=je.emptyNode,Ce=je.childrenColumnName,ge=m.useContext(ne),ye=ge.onColumnResize,Re=m.useContext(a.a),De=Re.prefixCls,Pe=Re.getComponent,ze=m.useContext(K),at=ze.fixHeader,lt=ze.horizonScroll,St=ze.flattenColumns,Ot=ze.componentWidth;return m.useMemo(function(){var ir=Pe(["body","wrapper"],"tbody"),Gt=Pe(["body","row"],"tr"),yt=Pe(["body","cell"],"td"),Fr;Ie.length?Fr=Ie.map(function(jr,un){var xr=qe(jr,un);return m.createElement(I,{key:xr,rowKey:xr,record:jr,recordKey:xr,index:un,rowComponent:Gt,cellComponent:yt,expandedKeys:Ee,onRow:ce,getRowKey:qe,rowExpandable:fe,childrenColumnName:Ce})}):Fr=m.createElement(H,{expanded:!0,className:"".concat(De,"-placeholder"),prefixCls:De,fixHeader:at,fixColumn:lt,horizonScroll:lt,component:Gt,componentWidth:Ot,cellComponent:yt,colSpan:St.length},ve);var Pr=Object(x.a)(St);return m.createElement(ir,{className:"".concat(De,"-tbody")},st&&m.createElement("tr",{"aria-hidden":"true",className:"".concat(De,"-measure-row"),style:{height:0}},Pr.map(function(jr){return m.createElement(oe,{key:jr,columnKey:jr,onColumnResize:ye})})),Fr)},[Ie,De,ce,st,Ee,qe,Pe,Ot,ve,St])}var Oe=m.memo(de);Oe.displayName="Body";var Ae=Oe,pe=D("wRmb"),Se=D("xEkU"),be=D.n(Se);function se(je){var Ie=Object(m.useRef)(je),qe=Object(m.useState)({}),st=Object(g.a)(qe,2),Ee=st[1],ce=Object(m.useRef)(null),fe=Object(m.useRef)([]);function ve(Ce){ce.current===null&&(fe.current=[],ce.current=be()(function(){fe.current.forEach(function(ge){Ie.current=ge(Ie.current)}),ce.current=null,Ee({})})),fe.current.push(Ce)}return Object(m.useEffect)(function(){return function(){be.a.cancel(ce.current)}},[]),[Ie.current,ve]}function ee(je){var Ie=Object(m.useRef)(je),qe=Object(m.useRef)(null);function st(){window.clearTimeout(qe.current)}function Ee(fe){Ie.current=fe,st(),qe.current=window.setTimeout(function(){Ie.current=null,qe.current=null},100)}function ce(){return Ie.current}return Object(m.useEffect)(function(){return st},[]),[Ee,ce]}function B(je,Ie,qe){var st=Object(m.useMemo)(function(){for(var Ee=[],ce=[],fe=0,ve=0,Ce=0;Ce<Ie;Ce+=1)if(qe==="rtl"){ce[Ce]=ve,ve+=je[Ce]||0;var ge=Ie-Ce-1;Ee[ge]=fe,fe+=je[ge]||0}else{Ee[Ce]=fe,fe+=je[Ce]||0;var ye=Ie-Ce-1;ce[ye]=ve,ve+=je[ye]||0}return{left:Ee,right:ce}},[je,Ie,qe]);return st}var V=B;function X(je){var Ie=je.className,qe=je.children;return m.createElement("div",{className:Ie},qe)}var Q=X,Z=D("n6Qo");function ie(je){var Ie,qe=je.prefixCls,st=je.record,Ee=je.onExpand,ce=je.expanded,fe=je.expandable,ve="".concat(qe,"-row-expand-icon");if(!fe)return m.createElement("span",{className:_()(ve,"".concat(qe,"-row-spaced"))});var Ce=function(ye){Ee(st,ye),ye.stopPropagation()};return m.createElement("span",{className:_()(ve,(Ie={},Object(P.a)(Ie,"".concat(qe,"-row-expanded"),ce),Object(P.a)(Ie,"".concat(qe,"-row-collapsed"),!ce),Ie)),onClick:Ce})}function re(je,Ie,qe){var st=[];function Ee(ce){(ce||[]).forEach(function(fe,ve){st.push(Ie(fe,ve)),Ee(fe[qe])})}return Ee(je),st}var $=D("zT1h"),J=D("y0+3"),le=function(Ie,qe){var st,Ee,ce=Ie.scrollBodyRef,fe=Ie.onScroll,ve=Ie.offsetScroll,Ce=m.useContext(a.a),ge=Ce.prefixCls,ye=((st=ce.current)===null||st===void 0?void 0:st.scrollWidth)||0,Re=((Ee=ce.current)===null||Ee===void 0?void 0:Ee.clientWidth)||0,De=ye&&Re*(Re/ye),Pe=m.useRef(),ze=se({scrollLeft:0,isHiddenScrollBar:!1}),at=Object(g.a)(ze,2),lt=at[0],St=at[1],Ot=m.useRef({delta:0,x:0}),ir=m.useState(!1),Gt=Object(g.a)(ir,2),yt=Gt[0],Fr=Gt[1],Pr=function(){Fr(!1)},jr=function(Ir){Ir.persist(),Ot.current.delta=Ir.pageX-lt.scrollLeft,Ot.current.x=0,Fr(!0),Ir.preventDefault()},un=function(Ir){var hn,lr=Ir||((hn=window)===null||hn===void 0?void 0:hn.event),Cr=lr.buttons;if(!yt||Cr===0){yt&&Fr(!1);return}var gr=Ot.current.x+Ir.pageX-Ot.current.x-Ot.current.delta;gr<=0&&(gr=0),gr+De>=Re&&(gr=Re-De),fe({scrollLeft:gr/Re*(ye+2)}),Ot.current.x=Ir.pageX},xr=function(){var Ir=Object(J.b)(ce.current).top,hn=Ir+ce.current.offsetHeight,lr=document.documentElement.scrollTop+window.innerHeight;hn-Object(o.a)()<=lr||Ir>=lr-ve?St(function(Cr){return Object(v.a)(Object(v.a)({},Cr),{},{isHiddenScrollBar:!0})}):St(function(Cr){return Object(v.a)(Object(v.a)({},Cr),{},{isHiddenScrollBar:!1})})},an=function(Ir){St(function(hn){return Object(v.a)(Object(v.a)({},hn),{},{scrollLeft:Ir/ye*Re||0})})};return m.useImperativeHandle(qe,function(){return{setScrollLeft:an}}),m.useEffect(function(){var tn=Object($.a)(document.body,"mouseup",Pr,!1),Ir=Object($.a)(document.body,"mousemove",un,!1);return xr(),function(){tn.remove(),Ir.remove()}},[De,yt]),m.useEffect(function(){var tn=Object($.a)(window,"scroll",xr,!1),Ir=Object($.a)(window,"resize",xr,!1);return function(){tn.remove(),Ir.remove()}},[]),m.useEffect(function(){lt.isHiddenScrollBar||St(function(tn){var Ir,hn;return Object(v.a)(Object(v.a)({},tn),{},{scrollLeft:ce.current.scrollLeft/((Ir=ce.current)===null||Ir===void 0?void 0:Ir.scrollWidth)*((hn=ce.current)===null||hn===void 0?void 0:hn.clientWidth)})})},[lt.isHiddenScrollBar]),ye<=Re||!De||lt.isHiddenScrollBar?null:m.createElement("div",{style:{height:Object(o.a)(),width:Re,bottom:ve},className:"".concat(ge,"-sticky-scroll")},m.createElement("div",{onMouseDown:jr,ref:Pe,className:_()("".concat(ge,"-sticky-scroll-bar"),Object(P.a)({},"".concat(ge,"-sticky-scroll-bar-active"),yt)),style:{width:"".concat(De,"px"),transform:"translate3d(".concat(lt.scrollLeft,"px, 0, 0)")}}))},ue=m.forwardRef(le);function xe(je,Ie){return m.useMemo(function(){var qe=!!je;return{isSticky:qe,stickyClassName:qe?"".concat(Ie,"-sticky-header"):"",offsetHeader:Object(N.a)(je)==="object"&&je.offsetHeader||0,offsetScroll:Object(N.a)(je)==="object"&&je.offsetScroll||0}},[je,Ie])}var Me=[],Xe={},$e="rc-table-internal-hook",Je=m.memo(function(je){var Ie=je.children;return Ie},function(je,Ie){return d()(je.props,Ie.props)?je.pingLeft!==Ie.pingLeft||je.pingRight!==Ie.pingRight:!1});function rt(je){var Ie,qe=je.prefixCls,st=je.className,Ee=je.rowClassName,ce=je.style,fe=je.data,ve=je.rowKey,Ce=je.scroll,ge=je.tableLayout,ye=je.direction,Re=je.title,De=je.footer,Pe=je.summary,ze=je.id,at=je.showHeader,lt=je.components,St=je.emptyText,Ot=je.onRow,ir=je.onHeaderRow,Gt=je.internalHooks,yt=je.transformColumns,Fr=je.internalRefs,Pr=je.sticky,jr=fe||Me,un=!!jr.length,xr=m.useState(0),an=Object(g.a)(xr,2),tn=an[0],Ir=an[1];m.useEffect(function(){Ir(Object(o.a)())});var hn=m.useMemo(function(){return Object(x.c)(lt,{})},[lt]),lr=m.useCallback(function(Tr,Rt){return Object(x.b)(hn,Tr)||Rt},[hn]),Cr=m.useMemo(function(){return typeof ve=="function"?ve:function(Tr){var Rt=Tr&&Tr[ve];return Rt}},[ve]),gr=Object(E.c)(je),xn=gr.expandIcon,Wn=gr.expandedRowKeys,gn=gr.defaultExpandedRowKeys,Bt=gr.defaultExpandAllRows,Kr=gr.expandedRowRender,rn=gr.onExpand,Or=gr.onExpandedRowsChange,Lr=gr.expandRowByClick,Wr=gr.rowExpandable,Fn=gr.expandIconColumnIndex,yn=gr.expandedRowClassName,Ct=gr.childrenColumnName,ur=gr.indentSize,oi=xn||ie,wi=Ct||"children",Pi=m.useMemo(function(){return Kr?"row":je.expandable&&Gt===$e&&je.expandable.__PARENT_RENDER_ICON__||jr.some(function(Tr){return Tr&&Object(N.a)(Tr)==="object"&&Tr[wi]})?"nest":!1},[!!Kr,jr]),vi=m.useState(function(){return gn||(Bt?re(jr,Cr,wi):[])}),Un=Object(g.a)(vi,2),wr=Un[0],si=Un[1],It=m.useMemo(function(){return new Set(Wn||wr||[])},[Wn,wr]),Zn=m.useCallback(function(Tr){var Rt=Cr(Tr,jr.indexOf(Tr)),Ht,ar=It.has(Rt);ar?(It.delete(Rt),Ht=Object(C.a)(It)):Ht=[].concat(Object(C.a)(It),[Rt]),si(Ht),rn&&rn(!ar,Tr),Or&&Or(Ht)},[Cr,It,jr,rn,Or]),Bn=m.useState(0),zi=Object(g.a)(Bn,2),Ti=zi[0],ri=zi[1],Qi=Object(pe.b)(Object(v.a)(Object(v.a)(Object(v.a)({},je),gr),{},{expandable:!!Kr,expandedKeys:It,getRowKey:Cr,onTriggerExpand:Zn,expandIcon:oi,expandIconColumnIndex:Fn,direction:ye}),Gt===$e?yt:null),Zi=Object(g.a)(Qi,2),li=Zi[0],In=Zi[1],ui=m.useMemo(function(){return{columns:li,flattenColumns:In}},[li,In]),Mi=m.useRef(),yi=m.useRef(),bi=m.useRef(),Da=m.useState(!1),Vi=Object(g.a)(Da,2),zn=Vi[0],Gi=Vi[1],_a=m.useState(!1),Ni=Object(g.a)(_a,2),ci=Ni[0],oa=Ni[1],pa=se(new Map),sa=Object(g.a)(pa,2),ma=sa[0],qi=sa[1],Si=Object(x.a)(In),ea=Si.map(function(Tr){return ma.get(Tr)}),Ea=m.useMemo(function(){return ea},[ea.join("_")]),mt=V(Ea,In.length,ye),tt=Ce&&Object(x.d)(Ce.y),pt=Ce&&Object(x.d)(Ce.x),Et=pt&&In.some(function(Tr){var Rt=Tr.fixed;return Rt}),Ut=m.useRef(),Dt=xe(Pr,qe),Xt=Dt.isSticky,Pt=Dt.offsetHeader,ut=Dt.offsetScroll,vt=Dt.stickyClassName,bt,tr,Qt;tt&&(tr={overflowY:"scroll",maxHeight:Ce.y}),pt&&(bt={overflowX:"auto"},tt||(tr={overflowY:"hidden"}),Qt={width:Ce.x===!0?"auto":Ce.x,minWidth:"100%"});var Wt=m.useCallback(function(Tr,Rt){qi(function(Ht){var ar=new Map(Ht);return ar.set(Tr,Rt),ar})},[]),jt=ee(null),Yt=Object(g.a)(jt,2),qt=Yt[0],et=Yt[1];function vr(Tr,Rt){if(!Rt)return;typeof Rt=="function"?Rt(Tr):Rt.scrollLeft!==Tr&&(Rt.scrollLeft=Tr)}var Ar=function(Rt){var Ht=Rt.currentTarget,ar=Rt.scrollLeft,Vt=typeof ar=="number"?ar:Ht.scrollLeft,ct=Ht||Xe;if(!et()||et()===ct){var dt;qt(ct),vr(Vt,yi.current),vr(Vt,bi.current),vr(Vt,(dt=Ut.current)===null||dt===void 0?void 0:dt.setScrollLeft)}if(Ht){var Mt=Ht.scrollWidth,wt=Ht.clientWidth;Gi(Vt>0),oa(Vt<Mt-wt)}},cr=function(){bi.current&&Ar({currentTarget:bi.current})},ht=function(Rt){var Ht=Rt.width;cr(),ri(Mi.current?Mi.current.offsetWidth:Ht)};m.useEffect(function(){return cr},[]),m.useEffect(function(){pt&&cr()},[pt]),m.useEffect(function(){Gt===$e&&Fr&&(Fr.body.current=bi.current)});var _t=lr(["table"],"table"),ft=m.useMemo(function(){return ge||(Et?Ce.x==="max-content"?"auto":"fixed":tt||In.some(function(Tr){var Rt=Tr.ellipsis;return Rt})?"fixed":"auto")},[tt,Et,In,ge]),Tt,zt={colWidths:Ea,columCount:In.length,stickyOffsets:mt,onHeaderRow:ir,fixHeader:tt},rr=m.useMemo(function(){return un?null:typeof St=="function"?St():St},[un,St]),Kt=m.createElement(Ae,{data:jr,measureColumnWidth:tt||pt||Xt,expandedKeys:It,rowExpandable:Wr,getRowKey:Cr,onRow:Ot,emptyNode:rr,childrenColumnName:wi}),yr=m.createElement(T,{colWidths:In.map(function(Tr){var Rt=Tr.width;return Rt}),columns:In}),kr=Pe&&m.createElement(Z.b,null,Pe(jr)),sr=lr(["body"]);if(tt||Xt){var Ze;typeof sr=="function"?(Ze=sr(jr,{scrollbarSize:tn,ref:bi,onScroll:Ar}),zt.colWidths=In.map(function(Tr,Rt){var Ht=Tr.width,ar=Rt===li.length-1?Ht-tn:Ht;return typeof ar=="number"&&!Number.isNaN(ar)?ar:(Object(i.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Ze=m.createElement("div",{style:Object(v.a)(Object(v.a)({},bt),tr),onScroll:Ar,ref:bi,className:_()("".concat(qe,"-body"))},m.createElement(_t,{style:Object(v.a)(Object(v.a)({},Qt),{},{tableLayout:ft})},yr,Kt,kr),Xt&&m.createElement(ue,{ref:Ut,offsetScroll:ut,scrollBodyRef:bi,onScroll:Ar})),Tt=m.createElement(m.Fragment,null,at!==!1&&m.createElement(L,Object.assign({noData:!jr.length},zt,ui,{direction:ye,offsetHeader:Pt,stickyClassName:vt,ref:yi,onScroll:Ar})),Ze)}else Tt=m.createElement("div",{style:Object(v.a)(Object(v.a)({},bt),tr),className:_()("".concat(qe,"-content")),onScroll:Ar,ref:bi},m.createElement(_t,{style:Object(v.a)(Object(v.a)({},Qt),{},{tableLayout:ft})},yr,at!==!1&&m.createElement(b,Object.assign({},zt,ui)),Kt,kr));var kt=Object(E.b)(je),Zr=m.createElement("div",Object.assign({className:_()(qe,st,(Ie={},Object(P.a)(Ie,"".concat(qe,"-rtl"),ye==="rtl"),Object(P.a)(Ie,"".concat(qe,"-ping-left"),zn),Object(P.a)(Ie,"".concat(qe,"-ping-right"),ci),Object(P.a)(Ie,"".concat(qe,"-layout-fixed"),ge==="fixed"),Object(P.a)(Ie,"".concat(qe,"-fixed-header"),tt),Object(P.a)(Ie,"".concat(qe,"-fixed-column"),Et),Object(P.a)(Ie,"".concat(qe,"-scroll-horizontal"),pt),Object(P.a)(Ie,"".concat(qe,"-has-fix-left"),In[0]&&In[0].fixed),Object(P.a)(Ie,"".concat(qe,"-has-fix-right"),In[In.length-1]&&In[In.length-1].fixed==="right"),Ie)),style:ce,id:ze,ref:Mi},kt),m.createElement(Je,{pingLeft:zn,pingRight:ci,props:Object(v.a)(Object(v.a)({},je),{},{stickyOffsets:mt,mergedExpandedKeys:It})},Re&&m.createElement(Q,{className:"".concat(qe,"-title")},Re(jr)),m.createElement("div",{className:"".concat(qe,"-container")},Tt),De&&m.createElement(Q,{className:"".concat(qe,"-footer")},De(jr))));pt&&(Zr=m.createElement(c.a,{onResize:ht},Zr));var Vr=m.useMemo(function(){return{prefixCls:qe,getComponent:lr,scrollbarSize:tn,direction:ye,fixedInfoList:In.map(function(Tr,Rt){return r(Rt,Rt,In,mt,ye)}),isSticky:Xt}},[qe,lr,tn,ye,In,mt,ye,Xt]),nr=m.useMemo(function(){return Object(v.a)(Object(v.a)({},ui),{},{tableLayout:ft,rowClassName:Ee,expandedRowClassName:yn,componentWidth:Ti,fixHeader:tt,fixColumn:Et,horizonScroll:pt,expandIcon:oi,expandableType:Pi,expandRowByClick:Lr,expandedRowRender:Kr,onTriggerExpand:Zn,expandIconColumnIndex:Fn,indentSize:ur})},[ui,ft,Ee,yn,Ti,tt,Et,pt,oi,Pi,Lr,Kr,Zn,Fn,ur]),br=m.useMemo(function(){return{onColumnResize:Wt}},[Wt]);return m.createElement(a.a.Provider,{value:Vr},m.createElement(K.Provider,{value:nr},m.createElement(ne.Provider,{value:br},Zr)))}rt.Column=s.a,rt.ColumnGroup=n.a,rt.Summary=Z.a,rt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var it=q.b=rt},wRmb:function(W,q,D){"use strict";D.d(q,"a",function(){return d});var P=D("rePB"),v=D("KQm4"),C=D("VTBJ"),N=D("Ff2n"),g=D("q1tI"),m=D.n(g),S=D("Kwbf"),_=D("Zm9Q"),t=D("hW8S");function d(s){return Object(_.a)(s).filter(function(h){return g.isValidElement(h)}).map(function(h){var f=h.key,l=h.props,a=l.children,r=Object(N.a)(l,["children"]),x=Object(C.a)({key:f},r);return a&&(x.children=d(a)),x})}function i(s){return s.reduce(function(h,f){var l=f.fixed,a=l===!0?"left":l,r=f.children;return r&&r.length>0?[].concat(Object(v.a)(h),Object(v.a)(i(r).map(function(x){return Object(C.a)({fixed:a},x)}))):[].concat(Object(v.a)(h),[Object(C.a)(Object(C.a)({},f),{},{fixed:a})])},[])}function c(s){for(var h=!0,f=0;f<s.length;f+=1){var l=s[f];if(h&&l.fixed!=="left")h=!1;else if(!h&&l.fixed==="left"){Object(S.a)(!1,"Index ".concat(f-1," of `columns` missing `fixed='left'` prop."));break}}for(var a=!0,r=s.length-1;r>=0;r-=1){var x=s[r];if(a&&x.fixed!=="right")a=!1;else if(!a&&x.fixed==="right"){Object(S.a)(!1,"Index ".concat(r+1," of `columns` missing `fixed='right'` prop."));break}}}function o(s){return s.map(function(h){var f=h.fixed,l=Object(N.a)(h,["fixed"]),a=f;return f==="left"?a="right":f==="right"&&(a="left"),Object(C.a)({fixed:a},l)})}function n(s,h){var f=s.prefixCls,l=s.columns,a=s.children,r=s.expandable,x=s.expandedKeys,y=s.getRowKey,p=s.onTriggerExpand,R=s.expandIcon,O=s.rowExpandable,b=s.expandIconColumnIndex,E=s.direction,w=s.expandRowByClick,T=g.useMemo(function(){return l||d(a)},[l,a]),F=g.useMemo(function(){if(r){var Y,K=b||0,A=T[K],H=(Y={},Object(P.a)(Y,t.a,{className:"".concat(f,"-expand-icon-col")}),Object(P.a)(Y,"title",""),Object(P.a)(Y,"fixed",A?A.fixed:null),Object(P.a)(Y,"className","".concat(f,"-row-expand-icon-cell")),Object(P.a)(Y,"render",function(G,ne,oe){var de=y(ne,oe),Oe=x.has(de),Ae=O?O(ne):!0,pe=R({prefixCls:f,expanded:Oe,expandable:Ae,record:ne,onExpand:p});return w?g.createElement("span",{onClick:function(be){return be.stopPropagation()}},pe):pe}),Y),U=T.slice();return K>=0&&U.splice(K,0,H),U}return T},[r,T,y,x,R,E]),M=g.useMemo(function(){var Y=F;return h&&(Y=h(Y)),Y.length||(Y=[{render:function(){return null}}]),Y},[h,F,E]),L=g.useMemo(function(){return E==="rtl"?o(i(M)):i(M)},[M,E]);return[M,L]}q.b=n},wZgz:function(W,q,D){(function(P,v,C){W.exports=q=v(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(P){return function(){var v=P,C=v.lib,N=C.BlockCipher,g=v.algo,m=[],S=[],_=[],t=[],d=[],i=[],c=[],o=[],n=[],s=[];(function(){for(var l=[],a=0;a<256;a++)a<128?l[a]=a<<1:l[a]=a<<1^283;for(var r=0,x=0,a=0;a<256;a++){var y=x^x<<1^x<<2^x<<3^x<<4;y=y>>>8^y&255^99,m[r]=y,S[y]=r;var p=l[r],R=l[p],O=l[R],b=l[y]*257^y*16843008;_[r]=b<<24|b>>>8,t[r]=b<<16|b>>>16,d[r]=b<<8|b>>>24,i[r]=b;var b=O*16843009^R*65537^p*257^r*16843008;c[y]=b<<24|b>>>8,o[y]=b<<16|b>>>16,n[y]=b<<8|b>>>24,s[y]=b,r?(r=p^l[l[l[O^p]]],x^=l[l[x]]):r=x=1}})();var h=[0,1,2,4,8,16,32,64,128,27,54],f=g.AES=N.extend({_doReset:function(){var l;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var a=this._keyPriorReset=this._key,r=a.words,x=a.sigBytes/4,y=this._nRounds=x+6,p=(y+1)*4,R=this._keySchedule=[],O=0;O<p;O++)O<x?R[O]=r[O]:(l=R[O-1],O%x?x>6&&O%x==4&&(l=m[l>>>24]<<24|m[l>>>16&255]<<16|m[l>>>8&255]<<8|m[l&255]):(l=l<<8|l>>>24,l=m[l>>>24]<<24|m[l>>>16&255]<<16|m[l>>>8&255]<<8|m[l&255],l^=h[O/x|0]<<24),R[O]=R[O-x]^l);for(var b=this._invKeySchedule=[],E=0;E<p;E++){var O=p-E;if(E%4)var l=R[O];else var l=R[O-4];E<4||O<=4?b[E]=l:b[E]=c[m[l>>>24]]^o[m[l>>>16&255]]^n[m[l>>>8&255]]^s[m[l&255]]}},encryptBlock:function(l,a){this._doCryptBlock(l,a,this._keySchedule,_,t,d,i,m)},decryptBlock:function(l,a){var r=l[a+1];l[a+1]=l[a+3],l[a+3]=r,this._doCryptBlock(l,a,this._invKeySchedule,c,o,n,s,S);var r=l[a+1];l[a+1]=l[a+3],l[a+3]=r},_doCryptBlock:function(l,a,r,x,y,p,R,O){for(var b=this._nRounds,E=l[a]^r[0],w=l[a+1]^r[1],T=l[a+2]^r[2],F=l[a+3]^r[3],M=4,L=1;L<b;L++){var Y=x[E>>>24]^y[w>>>16&255]^p[T>>>8&255]^R[F&255]^r[M++],K=x[w>>>24]^y[T>>>16&255]^p[F>>>8&255]^R[E&255]^r[M++],A=x[T>>>24]^y[F>>>16&255]^p[E>>>8&255]^R[w&255]^r[M++],H=x[F>>>24]^y[E>>>16&255]^p[w>>>8&255]^R[T&255]^r[M++];E=Y,w=K,T=A,F=H}var Y=(O[E>>>24]<<24|O[w>>>16&255]<<16|O[T>>>8&255]<<8|O[F&255])^r[M++],K=(O[w>>>24]<<24|O[T>>>16&255]<<16|O[F>>>8&255]<<8|O[E&255])^r[M++],A=(O[T>>>24]<<24|O[F>>>16&255]<<16|O[E>>>8&255]<<8|O[w&255])^r[M++],H=(O[F>>>24]<<24|O[E>>>16&255]<<16|O[w>>>8&255]<<8|O[T&255])^r[M++];l[a]=Y,l[a+1]=K,l[a+2]=A,l[a+3]=H},keySize:256/32});v.AES=N._createHelper(f)}(),P.AES})},wbyO:function(W,q,D){(function(P,v){W.exports=q=v(D("Ib8C"))})(this,function(P){return function(){var v=P,C=v.lib,N=C.WordArray,g=v.enc,m=g.Base64url={stringify:function(_,t=!0){var d=_.words,i=_.sigBytes,c=t?this._safe_map:this._map;_.clamp();for(var o=[],n=0;n<i;n+=3)for(var s=d[n>>>2]>>>24-n%4*8&255,h=d[n+1>>>2]>>>24-(n+1)%4*8&255,f=d[n+2>>>2]>>>24-(n+2)%4*8&255,l=s<<16|h<<8|f,a=0;a<4&&n+a*.75<i;a++)o.push(c.charAt(l>>>6*(3-a)&63));var r=c.charAt(64);if(r)for(;o.length%4;)o.push(r);return o.join("")},parse:function(_,t=!0){var d=_.length,i=t?this._safe_map:this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var o=0;o<i.length;o++)c[i.charCodeAt(o)]=o}var n=i.charAt(64);if(n){var s=_.indexOf(n);s!==-1&&(d=s)}return S(_,d,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function S(_,t,d){for(var i=[],c=0,o=0;o<t;o++)if(o%4){var n=d[_.charCodeAt(o-1)]<<o%4*2,s=d[_.charCodeAt(o)]>>>6-o%4*2,h=n|s;i[c>>>2]|=h<<24-c%4*8,c++}return N.create(i,c)}}(),P.enc.Base64url})},"y0+3":function(W,q,D){"use strict";D.d(q,"a",function(){return i}),D.d(q,"b",function(){return o});var P=/margin|padding|width|height|max|min|offset/,v={left:!0,top:!0},C={cssFloat:1,styleFloat:1,float:1};function N(n){return n.nodeType===1?n.ownerDocument.defaultView.getComputedStyle(n,null):{}}function g(n,s,h){if(s=s.toLowerCase(),h==="auto"){if(s==="height")return n.offsetHeight;if(s==="width")return n.offsetWidth}return s in v||(v[s]=P.test(s)),v[s]?parseFloat(h)||0:h}function m(n,s){var h=arguments.length,f=N(n);return s=C[s]?"cssFloat"in n.style?"cssFloat":"styleFloat":s,h===1?f:g(n,s,f[s]||n.style[s])}function S(n,s,h){var f=arguments.length;if(s=C[s]?"cssFloat"in n.style?"cssFloat":"styleFloat":s,f===3)return typeof h=="number"&&P.test(s)&&(h="".concat(h,"px")),n.style[s]=h,h;for(var l in s)s.hasOwnProperty(l)&&S(n,l,s[l]);return N(n)}function _(n){return n===document.body?document.documentElement.clientWidth:n.offsetWidth}function t(n){return n===document.body?window.innerHeight||document.documentElement.clientHeight:n.offsetHeight}function d(){var n=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),s=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:n,height:s}}function i(){var n=document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight;return{width:n,height:s}}function c(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function o(n){var s=n.getBoundingClientRect(),h=document.documentElement;return{left:s.left+(window.pageXOffset||h.scrollLeft)-(h.clientLeft||document.body.clientLeft||0),top:s.top+(window.pageYOffset||h.scrollTop)-(h.clientTop||document.body.clientTop||0)}}},"yTi+":function(W,q,D){W.exports=D.p+"static/AssistantCode3.fdd8db3c.jpeg"},zrhs:function(W,q,D){"use strict";var P=D("2qtc"),v=D("kLXV"),C=D("PpiC"),N=D("q1tI"),g=D.n(N),m=D("9kvl"),S=function(t){var d=t.shixunsDetail,i=t.globalSetting,c=t.loading,o=t.dispatch,n=Object(C.a)(t,["shixunsDetail","globalSetting","loading","dispatch"]);return g.a.createElement(v.a,{centered:!0,keyboard:!1,closable:!1,zIndex:6666,title:"\u63D0\u793A",visible:d.actionTabs.key==="Banner-Auth",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){o({type:"shixunsDetail/setActionTabs",payload:{}}),window.location.href="/account/certification"},onCancel:function(){o({type:"shixunsDetail/setActionTabs",payload:{}})}},g.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",g.a.createElement("br",null),"\u8BF7\u95EE\u662F\u5426\u524D\u5F80\u8FDB\u884C\u8BA4\u8BC1\uFF1F"))};q.a=Object(m.a)(function(_){var t=_.shixunsDetail,d=_.loading,i=_.globalSetting;return{shixunsDetail:t,globalSetting:i,loading:d.models.index}})(S)}}]);
|