|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[239,4,6,7,8,11,15],{"+NIl":function(B,Q,D){(function(N){N(D("VrN/"))})(function(N){"use strict";N.defineMode("stex",function(g,w){"use strict";function k(n,l){n.cmdState.push(l)}function b(n){return n.cmdState.length>0?n.cmdState[n.cmdState.length-1]:null}function m(n){var l=n.cmdState.pop();l&&l.closeBracket()}function T(n){for(var l=n.cmdState,f=l.length-1;f>=0;f--){var d=l[f];if(d.name=="DEFAULT")continue;return d}return{styleIdentifier:function(){return null}}}function _(n,l,f){return function(){this.name=n,this.bracketNo=0,this.style=l,this.styles=f,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 h(n,l){n.f=l}function r(n,l){var f;if(n.match(/^\\[a-zA-Z@]+/)){var d=n.current().slice(1);return f=t.hasOwnProperty(d)?t[d]:t.DEFAULT,f=new f,k(l,f),h(l,i),f.style}if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/\\]/))return"tag";if(n.match("\\["))return h(l,function(o,s){return c(o,s,"\\]")}),"keyword";if(n.match("\\("))return h(l,function(o,s){return c(o,s,"\\)")}),"keyword";if(n.match("$$"))return h(l,function(o,s){return c(o,s,"$$")}),"keyword";if(n.match("$"))return h(l,function(o,s){return c(o,s,"$")}),"keyword";var u=n.next();if(u=="%")return n.skipToEnd(),"comment";if(u=="}"||u=="]"){if(f=b(l),f)f.closeBracket(u),h(l,i);else return"error";return"bracket"}else return u=="{"||u=="["?(f=t.DEFAULT,f=new f,k(l,f),"bracket"):/\d/.test(u)?(n.eatWhile(/[\w.%]/),"atom"):(n.eatWhile(/[\w\-_]/),f=T(l),f.name=="begin"&&(f.argument=n.current()),f.styleIdentifier())}function c(n,l,f){if(n.eatSpace())return null;if(f&&n.match(f))return h(l,r),"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 d=n.next();return d=="{"||d=="}"||d=="["||d=="]"||d=="("||d==")"?"bracket":d=="%"?(n.skipToEnd(),"comment"):"error"}function i(n,l){var f=n.peek(),d;return f=="{"||f=="["?(d=b(l),d.openBracket(f),n.eat(f),h(l,r),"bracket"):/[ \t\r]/.test(f)?(n.eat(f),null):(h(l,r),m(l),r(n,l))}return{startState:function(){var n=w.inMathMode?function(l,f){return c(l,f)}:r;return{cmdState:[],f:n}},copyState:function(n){return{cmdState:n.cmdState.slice(),f:n.f}},token:function(n,l){return l.f(n,l)},blankLine:function(n){n.f=r,n.cmdState.length=0},lineComment:"%"}}),N.defineMIME("text/x-stex","stex"),N.defineMIME("text/x-latex","stex")})},"+ua5":function(B,Q,D){},"/cxE":function(B,Q,D){"use strict";D.d(Q,"f",function(){return w}),D.d(Q,"g",function(){return k}),D.d(Q,"h",function(){return b}),D.d(Q,"e",function(){return T}),D.d(Q,"b",function(){return _}),D.d(Q,"c",function(){return t}),D.d(Q,"d",function(){return h}),D.d(Q,"a",function(){return r});class N{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(c){setTimeout(()=>{throw c.stack?new Error(c.message+`
|
|
|
|
|
|
`+c.stack):c},0)}}emit(c){this.listeners.forEach(i=>{i(c)})}onUnexpectedError(c){this.unexpectedErrorHandler(c),this.emit(c)}onUnexpectedExternalError(c){this.unexpectedErrorHandler(c)}}const g=new N;function w(c){T(c)||g.onUnexpectedError(c);return}function k(c){T(c)||g.onUnexpectedExternalError(c);return}function b(c){if(c instanceof Error){let{name:i,message:n}=c;const l=c.stacktrace||c.stack;return{$isError:!0,name:i,message:n,stack:l}}return c}const m="Canceled";function T(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 h(c){return c?new Error(`Illegal state: ${c}`):new Error("Illegal state")}class r extends Error{constructor(c){super("NotSupported");c&&(this.message=c)}}},"19Vz":function(B,Q,D){(function(N){N(D("VrN/"))})(function(N){N.defineOption("placeholder","",function(_,t,h){var r=h&&h!=N.Init;if(t&&!r)_.on("blur",b),_.on("change",m),_.on("swapDoc",m),N.on(_.getInputField(),"compositionupdate",_.state.placeholderCompose=function(){k(_)}),m(_);else if(!t&&r){_.off("blur",b),_.off("change",m),_.off("swapDoc",m),N.off(_.getInputField(),"compositionupdate",_.state.placeholderCompose),g(_);var c=_.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}t&&!_.hasFocus()&&b(_)});function g(_){_.state.placeholder&&(_.state.placeholder.parentNode.removeChild(_.state.placeholder),_.state.placeholder=null)}function w(_){g(_);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 h=_.getOption("placeholder");typeof h=="string"&&(h=document.createTextNode(h)),t.appendChild(h),_.display.lineSpace.insertBefore(t,_.display.lineSpace.firstChild)}function k(_){setTimeout(function(){var t=!1,h=_.getInputField();h.nodeName=="TEXTAREA"?t=!h.value:_.lineCount()==1&&(t=!/[^\u200b]/.test(h.querySelector(".CodeMirror-line").textContent)),t?w(_):g(_)},20)}function b(_){T(_)&&w(_)}function m(_){var t=_.getWrapperElement(),h=T(_);t.className=t.className.replace(" CodeMirror-empty","")+(h?" CodeMirror-empty":""),h?w(_):g(_)}function T(_){return _.lineCount()===1&&_.getLine(0)===""}})},"1T2W":function(B,Q,D){B.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"1eCo":function(B,Q,D){(function(N){N(D("VrN/"))})(function(N){"use strict";var g={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},w={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};N.defineMode("xml",function(k,b){var m=k.indentUnit,T={},_=b.htmlMode?g:w;for(var t in _)T[t]=_[t];for(var t in b)T[t]=b[t];var h,r;function c(S,F){function j(z){return F.tokenize=z,z(S,F)}var A=S.next();if(A=="<")return S.eat("!")?S.eat("[")?S.match("CDATA[")?j(l("atom","]]>")):null:S.match("--")?j(l("comment","-->")):S.match("DOCTYPE",!0,!0)?(S.eatWhile(/[\w\._\-]/),j(f(1))):null:S.eat("?")?(S.eatWhile(/[\w\._\-]/),F.tokenize=l("meta","?>"),"meta"):(h=S.eat("/")?"closeTag":"openTag",F.tokenize=i,"tag bracket");if(A=="&"){var Y;return S.eat("#")?S.eat("x")?Y=S.eatWhile(/[a-fA-F\d]/)&&S.eat(";"):Y=S.eatWhile(/[\d]/)&&S.eat(";"):Y=S.eatWhile(/[\w\.\-:]/)&&S.eat(";"),Y?"atom":"error"}else return S.eatWhile(/[^&<]/),null}c.isInText=!0;function i(S,F){var j=S.next();if(j==">"||j=="/"&&S.eat(">"))return F.tokenize=c,h=j==">"?"endTag":"selfcloseTag","tag bracket";if(j=="=")return h="equals",null;if(j=="<"){F.tokenize=c,F.state=s,F.tagName=F.tagStart=null;var A=F.tokenize(S,F);return A?A+" tag error":"tag error"}else return/[\'\"]/.test(j)?(F.tokenize=n(j),F.stringStartCol=S.column(),F.tokenize(S,F)):(S.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function n(S){var F=function(j,A){for(;!j.eol();)if(j.next()==S){A.tokenize=i;break}return"string"};return F.isInAttribute=!0,F}function l(S,F){return function(j,A){for(;!j.eol();){if(j.match(F)){A.tokenize=c;break}j.next()}return S}}function f(S){return function(F,j){for(var A;(A=F.next())!=null;){if(A=="<")return j.tokenize=f(S+1),j.tokenize(F,j);if(A==">")if(S==1){j.tokenize=c;break}else return j.tokenize=f(S-1),j.tokenize(F,j)}return"meta"}}function d(S,F,j){this.prev=S.context,this.tagName=F,this.indent=S.indented,this.startOfLine=j,(T.doNotIndent.hasOwnProperty(F)||S.context&&S.context.noIndent)&&(this.noIndent=!0)}function u(S){S.context&&(S.context=S.context.prev)}function o(S,F){for(var j;;){if(!S.context)return;if(j=S.context.tagName,!T.contextGrabbers.hasOwnProperty(j)||!T.contextGrabbers[j].hasOwnProperty(F))return;u(S)}}function s(S,F,j){return S=="openTag"?(j.tagStart=F.column(),E):S=="closeTag"?v:s}function E(S,F,j){return S=="word"?(j.tagName=F.current(),r="tag",R):T.allowMissingTagName&&S=="endTag"?(r="tag bracket",R(S,F,j)):(r="error",E)}function v(S,F,j){if(S=="word"){var A=F.current();return j.context&&j.context.tagName!=A&&T.implicitlyClosed.hasOwnProperty(j.context.tagName)&&u(j),j.context&&j.context.tagName==A||T.matchClosing===!1?(r="tag",p):(r="tag error",I)}else return T.allowMissingTagName&&S=="endTag"?(r="tag bracket",p(S,F,j)):(r="error",I)}function p(S,F,j){return S!="endTag"?(r="error",p):(u(j),s)}function I(S,F,j){return r="error",p(S,F,j)}function R(S,F,j){if(S=="word")return r="attribute",y;if(S=="endTag"||S=="selfcloseTag"){var A=j.tagName,Y=j.tagStart;return j.tagName=j.tagStart=null,S=="selfcloseTag"||T.autoSelfClosers.hasOwnProperty(A)?o(j,A):(o(j,A),j.context=new d(j,A,Y==j.indented)),s}return r="error",R}function y(S,F,j){return S=="equals"?x:(T.allowMissing||(r="error"),R(S,F,j))}function x(S,F,j){return S=="string"?C:S=="word"&&T.allowUnquoted?(r="string",R):(r="error",R(S,F,j))}function C(S,F,j){return S=="string"?C:R(S,F,j)}return{startState:function(S){var F={tokenize:c,state:s,indented:S||0,tagName:null,tagStart:null,context:null};return S!=null&&(F.baseIndent=S),F},token:function(S,F){if(!F.tagName&&S.sol()&&(F.indented=S.indentation()),S.eatSpace())return null;h=null;var j=F.tokenize(S,F);return(j||h)&&j!="comment"&&(r=null,F.state=F.state(h||j,S,F),r&&(j=r=="error"?j+" error":r)),j},indent:function(S,F,j){var A=S.context;if(S.tokenize.isInAttribute)return S.tagStart==S.indented?S.stringStartCol+1:S.indented+m;if(A&&A.noIndent)return N.Pass;if(S.tokenize!=i&&S.tokenize!=c)return j?j.match(/^(\s*)/)[0].length:0;if(S.tagName)return T.multilineTagIndentPastTag!==!1?S.tagStart+S.tagName.length+2:S.tagStart+m*(T.multilineTagIndentFactor||1);if(T.alignCDATA&&/<!\[CDATA\[/.test(F))return 0;var Y=F&&/^<(\/)?([\w_:\.-]*)/.exec(F);if(Y&&Y[1])for(;A;)if(A.tagName==Y[2]){A=A.prev;break}else if(T.implicitlyClosed.hasOwnProperty(A.tagName))A=A.prev;else break;else if(Y)for(;A;){var z=T.contextGrabbers[A.tagName];if(z&&z.hasOwnProperty(Y[2]))A=A.prev;else break}for(;A&&A.prev&&!A.startOfLine;)A=A.prev;return A?A.indent+m:S.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:T.htmlMode?"html":"xml",helperType:T.htmlMode?"html":"xml",skipAttribute:function(S){S.state==x&&(S.state=R)},xmlCurrentTag:function(S){return S.tagName?{name:S.tagName,close:S.type=="closeTag"}:null},xmlCurrentContext:function(S){for(var F=[],j=S.context;j;j=j.prev)j.tagName&&F.push(j.tagName);return F.reverse()}}}),N.defineMIME("text/xml","xml"),N.defineMIME("application/xml","xml"),N.mimeModes.hasOwnProperty("text/html")||N.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("MlIO"))})(this,function(N){return function(){var g=N,w=g.lib,k=w.Hasher,b=g.x64,m=b.Word,T=b.WordArray,_=g.algo;function t(){return m.create.apply(m,arguments)}var h=[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)],r=[];(function(){for(var i=0;i<80;i++)r[i]=t()})();var c=_.SHA512=k.extend({_doReset:function(){this._hash=new T.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(i,n){for(var l=this._hash.words,f=l[0],d=l[1],u=l[2],o=l[3],s=l[4],E=l[5],v=l[6],p=l[7],I=f.high,R=f.low,y=d.high,x=d.low,C=u.high,S=u.low,F=o.high,j=o.low,A=s.high,Y=s.low,z=E.high,O=E.low,H=v.high,U=v.low,L=p.high,K=p.low,ee=I,oe=R,ae=y,be=x,_e=C,fe=S,Re=F,Ce=j,ce=A,te=Y,W=z,X=O,V=H,Z=U,q=L,ie=K,ne=0;ne<80;ne++){var J,$,le=r[ne];if(ne<16)$=le.high=i[n+ne*2]|0,J=le.low=i[n+ne*2+1]|0;else{var he=r[ne-15],Se=he.high,Ue=he.low,Xe=(Se>>>1|Ue<<31)^(Se>>>8|Ue<<24)^Se>>>7,$e=(Ue>>>1|Se<<31)^(Ue>>>8|Se<<24)^(Ue>>>7|Se<<25),Ye=r[ne-2],et=Ye.high,qe=Ye.low,Pe=(et>>>19|qe<<13)^(et<<3|qe>>>29)^et>>>6,Ie=(qe>>>19|et<<13)^(qe<<3|et>>>29)^(qe>>>6|et<<26),Ze=r[ne-7],nt=Ze.high,ye=Ze.low,ue=r[ne-16],pe=ue.high,me=ue.low;J=$e+ye,$=Xe+nt+(J>>>0<$e>>>0?1:0),J=J+Ie,$=$+Pe+(J>>>0<Ie>>>0?1:0),J=J+me,$=$+pe+(J>>>0<me>>>0?1:0),le.high=$,le.low=J}var Oe=ce&W^~ce&V,ve=te&X^~te&Z,xe=ee&ae^ee&_e^ae&_e,Ae=oe&be^oe&fe^be&fe,Le=(ee>>>28|oe<<4)^(ee<<30|oe>>>2)^(ee<<25|oe>>>7),Me=(oe>>>28|ee<<4)^(oe<<30|ee>>>2)^(oe<<25|ee>>>7),We=(ce>>>14|te<<18)^(ce>>>18|te<<14)^(ce<<23|te>>>9),rt=(te>>>14|ce<<18)^(te>>>18|ce<<14)^(te<<23|ce>>>9),at=h[ne],it=at.high,st=at.low,Ct=ie+rt,yt=q+We+(Ct>>>0<ie>>>0?1:0),Ct=Ct+ve,yt=yt+Oe+(Ct>>>0<ve>>>0?1:0),Ct=Ct+st,yt=yt+it+(Ct>>>0<st>>>0?1:0),Ct=Ct+J,yt=yt+$+(Ct>>>0<J>>>0?1:0),ht=Me+Ae,Ut=Le+xe+(ht>>>0<Me>>>0?1:0);q=V,ie=Z,V=W,Z=X,W=ce,X=te,te=Ce+Ct|0,ce=Re+yt+(te>>>0<Ce>>>0?1:0)|0,Re=_e,Ce=fe,_e=ae,fe=be,ae=ee,be=oe,oe=Ct+ht|0,ee=yt+Ut+(oe>>>0<Ct>>>0?1:0)|0}R=f.low=R+oe,f.high=I+ee+(R>>>0<oe>>>0?1:0),x=d.low=x+be,d.high=y+ae+(x>>>0<be>>>0?1:0),S=u.low=S+fe,u.high=C+_e+(S>>>0<fe>>>0?1:0),j=o.low=j+Ce,o.high=F+Re+(j>>>0<Ce>>>0?1:0),Y=s.low=Y+te,s.high=A+ce+(Y>>>0<te>>>0?1:0),O=E.low=O+X,E.high=z+W+(O>>>0<X>>>0?1:0),U=v.low=U+Z,v.high=H+V+(U>>>0<Z>>>0?1:0),K=p.low=K+ie,p.high=L+q+(K>>>0<ie>>>0?1:0)},_doFinalize:function(){var i=this._data,n=i.words,l=this._nDataBytes*8,f=i.sigBytes*8;n[f>>>5]|=128<<24-f%32,n[(f+128>>>10<<5)+30]=Math.floor(l/4294967296),n[(f+128>>>10<<5)+31]=l,i.sigBytes=n.length*4,this._process();var d=this._hash.toX32();return d},clone:function(){var i=k.clone.call(this);return i._hash=this._hash.clone(),i},blockSize:1024/32});g.SHA512=k._createHelper(c),g.HmacSHA512=k._createHmacHelper(c)}(),N.SHA512})},"24hK":function(B,Q,D){"use strict";D.d(Q,"a",function(){return g});class N{constructor(w){this.element=w,this.next=N.Undefined,this.prev=N.Undefined}}N.Undefined=new N(void 0);class g{constructor(){this._first=N.Undefined,this._last=N.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===N.Undefined}clear(){let w=this._first;for(;w!==N.Undefined;){const k=w.next;w.prev=N.Undefined,w.next=N.Undefined,w=k}this._first=N.Undefined,this._last=N.Undefined,this._size=0}unshift(w){return this._insert(w,!1)}push(w){return this._insert(w,!0)}_insert(w,k){const b=new N(w);if(this._first===N.Undefined)this._first=b,this._last=b;else if(k){const T=this._last;this._last=b,b.prev=T,T.next=b}else{const T=this._first;this._first=b,b.next=T,T.prev=b}this._size+=1;let m=!1;return()=>{m||(m=!0,this._remove(b))}}shift(){if(this._first===N.Undefined)return;{const w=this._first.element;return this._remove(this._first),w}}pop(){if(this._last===N.Undefined)return;{const w=this._last.element;return this._remove(this._last),w}}_remove(w){if(w.prev!==N.Undefined&&w.next!==N.Undefined){const k=w.prev;k.next=w.next,w.next.prev=k}else w.prev===N.Undefined&&w.next===N.Undefined?(this._first=N.Undefined,this._last=N.Undefined):w.next===N.Undefined?(this._last=this._last.prev,this._last.next=N.Undefined):w.prev===N.Undefined&&(this._first=this._first.next,this._first.prev=N.Undefined);this._size-=1}*[Symbol.iterator](){let w=this._first;for(;w!==N.Undefined;)yield w.element,w=w.next}}},"3/fG":function(B,Q,D){"use strict";D.d(Q,"a",function(){return g});function N(w,k){let b;return k.length===0?b=w:b=w.replace(/\{(\d+)\}/g,function(m,T){const _=T[0];return typeof k[_]!="undefined"?k[_]:m}),b}function g(w,k,...b){return N(k,b)}},"3y9D":function(B,Q,D){(function(N,g){B.exports=Q=g(D("Ib8C"))})(this,function(N){return function(){var g=N,w=g.lib,k=w.WordArray,b=w.Hasher,m=g.algo,T=[],_=m.SHA1=b.extend({_doReset:function(){this._hash=new k.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,h){for(var r=this._hash.words,c=r[0],i=r[1],n=r[2],l=r[3],f=r[4],d=0;d<80;d++){if(d<16)T[d]=t[h+d]|0;else{var u=T[d-3]^T[d-8]^T[d-14]^T[d-16];T[d]=u<<1|u>>>31}var o=(c<<5|c>>>27)+f+T[d];d<20?o+=(i&n|~i&l)+1518500249:d<40?o+=(i^n^l)+1859775393:d<60?o+=(i&n|i&l|n&l)-1894007588:o+=(i^n^l)-899497514,f=l,l=n,n=i<<30|i>>>2,i=c,c=o}r[0]=r[0]+c|0,r[1]=r[1]+i|0,r[2]=r[2]+n|0,r[3]=r[3]+l|0,r[4]=r[4]+f|0},_doFinalize:function(){var t=this._data,h=t.words,r=this._nDataBytes*8,c=t.sigBytes*8;return h[c>>>5]|=128<<24-c%32,h[(c+64>>>9<<4)+14]=Math.floor(r/4294967296),h[(c+64>>>9<<4)+15]=r,t.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var t=b.clone.call(this);return t._hash=this._hash.clone(),t}});g.SHA1=b._createHelper(_),g.HmacSHA1=b._createHmacHelper(_)}(),N.SHA1})},4:function(B,Q){},"5VLF":function(B,Q,D){"use strict";var N,g;function w(k,b,m){var T=function(_,t){return k.js_beautify(_,t)};return T.js=k.js_beautify,T.css=b.css_beautify,T.html=m.html_beautify,T.js_beautify=k.js_beautify,T.css_beautify=b.css_beautify,T.html_beautify=m.html_beautify,T}!(N=[D("6UM0"),D("TXwP"),D("psGv")],g=function(k,b,m){return w(k,b,m)}.apply(Q,N),g!==void 0&&(B.exports=g))},"5Y4S":function(B,Q,D){"use strict";D.d(Q,"a",function(){return w});var N=D("MNsG");const g=N.b.performance&&typeof N.b.performance.now=="function";class w{constructor(k){this._highResolution=g&&k,this._startTime=this._now(),this._stopTime=-1}static create(k=!0){return new w(k)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?N.b.performance.now():Date.now()}}},"5hvy":function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("MlIO"))})(this,function(N){return function(g){var w=N,k=w.lib,b=k.WordArray,m=k.Hasher,T=w.x64,_=T.Word,t=w.algo,h=[],r=[],c=[];(function(){for(var l=1,f=0,d=0;d<24;d++){h[l+5*f]=(d+1)*(d+2)/2%64;var u=f%5,o=(2*l+3*f)%5;l=u,f=o}for(var l=0;l<5;l++)for(var f=0;f<5;f++)r[l+5*f]=f+(2*l+3*f)%5*5;for(var s=1,E=0;E<24;E++){for(var v=0,p=0,I=0;I<7;I++){if(s&1){var R=(1<<I)-1;R<32?p^=1<<R:v^=1<<R-32}s&128?s=s<<1^113:s<<=1}c[E]=_.create(v,p)}})();var i=[];(function(){for(var l=0;l<25;l++)i[l]=_.create()})();var n=t.SHA3=m.extend({cfg:m.cfg.extend({outputLength:512}),_doReset:function(){for(var l=this._state=[],f=0;f<25;f++)l[f]=new _.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(l,f){for(var d=this._state,u=this.blockSize/2,o=0;o<u;o++){var s=l[f+2*o],E=l[f+2*o+1];s=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360;var v=d[o];v.high^=E,v.low^=s}for(var p=0;p<24;p++){for(var I=0;I<5;I++){for(var R=0,y=0,x=0;x<5;x++){var v=d[I+5*x];R^=v.high,y^=v.low}var C=i[I];C.high=R,C.low=y}for(var I=0;I<5;I++)for(var S=i[(I+4)%5],F=i[(I+1)%5],j=F.high,A=F.low,R=S.high^(j<<1|A>>>31),y=S.low^(A<<1|j>>>31),x=0;x<5;x++){var v=d[I+5*x];v.high^=R,v.low^=y}for(var Y=1;Y<25;Y++){var R,y,v=d[Y],z=v.high,O=v.low,H=h[Y];H<32?(R=z<<H|O>>>32-H,y=O<<H|z>>>32-H):(R=O<<H-32|z>>>64-H,y=z<<H-32|O>>>64-H);var U=i[r[Y]];U.high=R,U.low=y}var L=i[0],K=d[0];L.high=K.high,L.low=K.low;for(var I=0;I<5;I++)for(var x=0;x<5;x++){var Y=I+5*x,v=d[Y],ee=i[Y],oe=i[(I+1)%5+5*x],ae=i[(I+2)%5+5*x];v.high=ee.high^~oe.high&ae.high,v.low=ee.low^~oe.low&ae.low}var v=d[0],be=c[p];v.high^=be.high,v.low^=be.low}},_doFinalize:function(){var l=this._data,f=l.words,d=this._nDataBytes*8,u=l.sigBytes*8,o=this.blockSize*32;f[u>>>5]|=1<<24-u%32,f[(g.ceil((u+1)/o)*o>>>5)-1]|=128,l.sigBytes=f.length*4,this._process();for(var s=this._state,E=this.cfg.outputLength/8,v=E/8,p=[],I=0;I<v;I++){var R=s[I],y=R.high,x=R.low;y=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,p.push(x),p.push(y)}return new b.init(p,E)},clone:function(){for(var l=m.clone.call(this),f=l._state=this._state.slice(0),d=0;d<25;d++)f[d]=f[d].clone();return l}});w.SHA3=m._createHelper(n),w.HmacSHA3=m._createHmacHelper(n)}(Math),N.SHA3})},"5nXd":function(B,Q,D){var N=D("MFOe"),g=N.slice,w=N.pluck,k=N.each,b=N.bind,m=N.create,T=N.isList,_=N.isFunction,t=N.isObject;B.exports={createStore:c};var h={version:"2.0.12",enabled:!1,get:function(i,n){var l=this.storage.read(this._namespacePrefix+i);return this._deserialize(l,n)},set:function(i,n){return n===void 0?this.remove(i):(this.storage.write(this._namespacePrefix+i,this._serialize(n)),n)},remove:function(i){this.storage.remove(this._namespacePrefix+i)},each:function(i){var n=this;this.storage.each(function(l,f){i.call(n,n._deserialize(l),(f||"").replace(n._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(i){return this._namespacePrefix=="__storejs_"+i+"_"},createStore:function(){return c.apply(this,arguments)},addPlugin:function(i){this._addPlugin(i)},namespace:function(i){return c(this.storage,this.plugins,i)}};function r(){var i=typeof console=="undefined"?null:console;if(!i)return;var n=i.warn?i.warn:i.log;n.apply(i,arguments)}function c(i,n,l){l||(l=""),i&&!T(i)&&(i=[i]),n&&!T(n)&&(n=[n]);var f=l?"__storejs_"+l+"_":"",d=l?new RegExp("^"+f):null,u=/^[a-zA-Z0-9_\-]*$/;if(!u.test(l))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var o={_namespacePrefix:f,_namespaceRegexp:d,_testStorage:function(E){try{var v="__storejs__test__";E.write(v,v);var p=E.read(v)===v;return E.remove(v),p}catch(I){return!1}},_assignPluginFnProp:function(E,v){var p=this[v];this[v]=function(){var R=g(arguments,0),y=this;function x(){return p?(k(arguments,function(S,F){R[F]=S}),p.apply(y,R)):void 0}var C=[x].concat(R);return E.apply(y,C)}},_serialize:function(E){return JSON.stringify(E)},_deserialize:function(E,v){if(!E)return v;var p="";try{p=JSON.parse(E)}catch(I){p=E}return p!==void 0?p:v},_addStorage:function(E){if(this.enabled)return;this._testStorage(E)&&(this.storage=E,this.enabled=!0)},_addPlugin:function(E){var v=this;if(T(E)){k(E,function(R){v._addPlugin(R)});return}var p=w(this.plugins,function(R){return E===R});if(p)return;if(this.plugins.push(E),!_(E))throw new Error("Plugins must be function values that return objects");var I=E.call(this);if(!t(I))throw new Error("Plugins must return an object of function properties");k(I,function(R,y){if(!_(R))throw new Error("Bad plugin property: "+y+" from plugin "+E.name+". Plugins should only return functions.");v._assignPluginFnProp(R,y)})},addStorage:function(E){r("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(E)}},s=m(o,h,{plugins:[]});return s.raw={},k(s,function(E,v){_(E)&&(s.raw[v]=b(s,E))}),k(i,function(E){s._addStorage(E)}),k(n,function(E){s._addPlugin(E)}),s}},"6RRn":function(B,Q,D){"use strict";var N=D("wCXF"),g=D("n6Qo");D.d(Q,"b",function(){return g.a});var w=D("IBYe"),k=D("6eGT"),b=D("hW8S");D.d(Q,"a",function(){return b.a}),Q.c=N.b},"6UM0":function(B,Q,D){var N,g;(function(){var w;(function(){"use strict";var b=[function(t,h,r){var c=r(1).Beautifier,i=r(5).Options;function n(l,f){var d=new c(l,f);return d.beautify()}t.exports=n,t.exports.defaultOptions=function(){return new i}},function(t,h,r){var c=r(2).Output,i=r(3).Token,n=r(4),l=r(5).Options,f=r(7).Tokenizer,d=r(7).line_starters,u=r(7).positionable_operators,o=r(7).TOKEN;function s(L,K){return K.indexOf(L)!==-1}function E(L){return L.replace(/^\s+/g,"")}function v(L){for(var K={},ee=0;ee<L.length;ee++)K[L[ee].replace(/-/g,"_")]=L[ee];return K}function p(L,K){return L&&L.type===o.RESERVED&&L.text===K}function I(L,K){return L&&L.type===o.RESERVED&&s(L.text,K)}var R=["case","return","do","if","throw","else","await","break","continue","async"],y=["before-newline","after-newline","preserve-newline"],x=v(y),C=[x.before_newline,x.preserve_newline],S={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function F(L,K){if(K.multiline_frame||K.mode===S.ForInitializer||K.mode===S.Conditional)return;L.remove_indent(K.start_line_index)}function j(L){L=L.replace(n.allLineBreaks,`
|
|
|
`);for(var K=[],ee=L.indexOf(`
|
|
|
`);ee!==-1;)K.push(L.substring(0,ee)),L=L.substring(ee+1),ee=L.indexOf(`
|
|
|
`);return L.length&&K.push(L),K}function A(L){return L===S.ArrayLiteral}function Y(L){return s(L,[S.Expression,S.ForInitializer,S.Conditional])}function z(L,K){for(var ee=0;ee<L.length;ee++){var oe=L[ee].trim();if(oe.charAt(0)!==K)return!1}return!0}function O(L,K){for(var ee=0,oe=L.length,ae;ee<oe;ee++)if(ae=L[ee],ae&&ae.indexOf(K)!==0)return!1;return!0}function H(L,K){K=K||{},this._source_text=L||"",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 l(K)}H.prototype.create_flags=function(L,K){var ee=0;L&&(ee=L.indentation_level,!this._output.just_added_newline()&&L.line_indent_level>ee&&(ee=L.line_indent_level));var oe={mode:K,parent:L,last_token:L?L.last_token:new i(o.START_BLOCK,""),last_word:L?L.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:ee,alignment:0,line_indent_level:L?L.line_indent_level:ee,start_line_index:this._output.get_line_number(),ternary_depth:0};return oe},H.prototype._reset=function(L){var K=L.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new c(this._options,K),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(S.BlockStatement);var ee=new f(L,this._options);return this._tokens=ee.tokenize(),L},H.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var L,K=this._reset(this._source_text),ee=this._options.eol;this._options.eol==="auto"&&(ee=`
|
|
|
`,K&&n.lineBreak.test(K||"")&&(ee=K.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 L=this._output.get_code(ee),L},H.prototype.handle_token=function(L,K){L.type===o.START_EXPR?this.handle_start_expr(L):L.type===o.END_EXPR?this.handle_end_expr(L):L.type===o.START_BLOCK?this.handle_start_block(L):L.type===o.END_BLOCK?this.handle_end_block(L):L.type===o.WORD?this.handle_word(L):L.type===o.RESERVED?this.handle_word(L):L.type===o.SEMICOLON?this.handle_semicolon(L):L.type===o.STRING?this.handle_string(L):L.type===o.EQUALS?this.handle_equals(L):L.type===o.OPERATOR?this.handle_operator(L):L.type===o.COMMA?this.handle_comma(L):L.type===o.BLOCK_COMMENT?this.handle_block_comment(L,K):L.type===o.COMMENT?this.handle_comment(L,K):L.type===o.DOT?this.handle_dot(L):L.type===o.EOF?this.handle_eof(L):L.type===o.UNKNOWN?this.handle_unknown(L,K):this.handle_unknown(L,K)},H.prototype.handle_whitespace_and_comments=function(L,K){var ee=L.newlines,oe=this._options.keep_array_indentation&&A(this._flags.mode);if(L.comments_before)for(var ae=L.comments_before.next();ae;)this.handle_whitespace_and_comments(ae,K),this.handle_token(ae,K),ae=L.comments_before.next();if(oe)for(var be=0;be<ee;be+=1)this.print_newline(be>0,K);else if(this._options.max_preserve_newlines&&ee>this._options.max_preserve_newlines&&(ee=this._options.max_preserve_newlines),this._options.preserve_newlines&&ee>1){this.print_newline(!1,K);for(var _e=1;_e<ee;_e+=1)this.print_newline(!0,K)}};var U=["async","break","continue","return","throw","yield"];H.prototype.allow_wrap_or_preserved_newline=function(L,K){if(K=K===void 0?!1:K,this._output.just_added_newline())return;var ee=this._options.preserve_newlines&&L.newlines||K,oe=s(this._flags.last_token.text,u)||s(L.text,u);if(oe){var ae=s(this._flags.last_token.text,u)&&s(this._options.operator_position,C)||s(L.text,u);ee=ee&&ae}if(ee)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(I(this._flags.last_token,U))return;this._output.set_wrap_point()}},H.prototype.print_newline=function(L,K){if(!K&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==o.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var ee=this._tokens.peek();this._flags.mode===S.Statement&&!(this._flags.if_block&&p(ee,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(L)&&(this._flags.multiline_frame=!0)},H.prototype.print_token_line_indentation=function(L){this._output.just_added_newline()&&(this._options.keep_array_indentation&&L.newlines&&(L.text==="["||A(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(L.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(L){if(this._output.raw){this._output.add_raw_token(L);return}if(this._options.comma_first&&L.previous&&L.previous.type===o.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var K=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(K),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(L),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(L),this._output.non_breaking_space=!0,this._output.add_token(L.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(L){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,L),this._flags=this.create_flags(this._previous_flags,L),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===S.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===S.ObjectLiteral&&this._flags.mode===S.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||I(this._flags.last_token,["get","set"]))},H.prototype.start_of_statement=function(L){var K=!1;return K=K||I(this._flags.last_token,["var","let","const"])&&L.type===o.WORD,K=K||p(this._flags.last_token,"do"),K=K||!(this._flags.parent.mode===S.ObjectLiteral&&this._flags.mode===S.Statement)&&I(this._flags.last_token,U)&&!L.newlines,K=K||p(this._flags.last_token,"else")&&!(p(L,"if")&&!L.comments_before),K=K||this._flags.last_token.type===o.END_EXPR&&(this._previous_flags.mode===S.ForInitializer||this._previous_flags.mode===S.Conditional),K=K||this._flags.last_token.type===o.WORD&&this._flags.mode===S.BlockStatement&&!this._flags.in_case&&!(L.text==="--"||L.text==="++")&&this._last_last_text!=="function"&&L.type!==o.WORD&&L.type!==o.RESERVED,K=K||this._flags.mode===S.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||I(this._flags.last_token,["get","set"])),K?(this.set_mode(S.Statement),this.indent(),this.handle_whitespace_and_comments(L,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L,I(L,["do","for","if","while"])),!0):!1},H.prototype.handle_start_expr=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L);var K=S.Expression;if(L.text==="["){if(this._flags.last_token.type===o.WORD||this._flags.last_token.text===")"){I(this._flags.last_token,d)&&(this._output.space_before_token=!0),this.print_token(L),this.set_mode(K),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}K=S.ArrayLiteral,A(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),s(this._flags.last_token.type,[o.START_EXPR,o.END_EXPR,o.WORD,o.OPERATOR,o.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===o.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,K=S.ForInitializer):s(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,K=S.Conditional):s(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&L.whitespace_before===""?this._output.space_before_token=!1:(s(this._flags.last_token.text,d)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===o.EQUALS||this._flags.last_token.type===o.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L);else if(this._flags.last_token.type===o.WORD){this._output.space_before_token=!1;var ee=this._tokens.peek(-3);if(this._options.space_after_named_function&&ee){var oe=this._tokens.peek(-4);I(ee,["async","function"])||ee.text==="*"&&I(oe,["async","function"])?this._output.space_before_token=!0:this._flags.mode===S.ObjectLiteral?(ee.text==="{"||ee.text===","||ee.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(L);(this._flags.last_token.type===o.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===S.ObjectLiteral&&s(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===o.START_BLOCK?this.print_newline():(this._flags.last_token.type===o.END_EXPR||this._flags.last_token.type===o.START_EXPR||this._flags.last_token.type===o.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===o.COMMA)&&this.allow_wrap_or_preserved_newline(L,L.newlines),this.print_token(L),this.set_mode(K),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},H.prototype.handle_end_expr=function(L){for(;this._flags.mode===S.Statement;)this.restore_mode();this.handle_whitespace_and_comments(L),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(L,L.text==="]"&&A(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===o.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(L),this.restore_mode(),F(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===S.Conditional&&(this._previous_flags.mode=S.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},H.prototype.handle_start_block=function(L){this.handle_whitespace_and_comments(L);var K=this._tokens.peek(),ee=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===o.END_EXPR?(this.set_mode(S.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(S.BlockStatement):ee&&(s(ee.text,[":",","])&&s(K.type,[o.STRING,o.WORD,o.RESERVED])||s(K.text,["get","set","..."])&&s(ee.type,[o.WORD,o.RESERVED]))?s(this._last_last_text,["class","interface"])&&!s(ee.text,[":",","])?this.set_mode(S.BlockStatement):this.set_mode(S.ObjectLiteral):this._flags.last_token.type===o.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(S.BlockStatement):s(this._flags.last_token.type,[o.EQUALS,o.START_EXPR,o.COMMA,o.OPERATOR])||I(this._flags.last_token,["return","throw","import","default"])?this.set_mode(S.ObjectLiteral):this.set_mode(S.BlockStatement),this._flags.last_token&&(I(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var oe=!K.comments_before&&K.text==="}",ae=oe&&this._flags.last_word==="function"&&this._flags.last_token.type===o.END_EXPR;if(this._options.brace_preserve_inline){var be=0,_e=null;this._flags.inline_frame=!0;do if(be+=1,_e=this._tokens.peek(be-1),_e.newlines){this._flags.inline_frame=!1;break}while(_e.type!==o.EOF&&!(_e.type===o.END_BLOCK&&_e.opened===L))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&L.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==o.OPERATOR&&(ae||this._flags.last_token.type===o.EQUALS||I(this._flags.last_token,R)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(A(this._previous_flags.mode)&&(this._flags.last_token.type===o.START_EXPR||this._flags.last_token.type===o.COMMA)&&((this._flags.last_token.type===o.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===o.COMMA||this._flags.last_token.type===o.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(L),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==o.OPERATOR&&this._flags.last_token.type!==o.START_EXPR&&(this._flags.last_token.type===o.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(L),this.indent(),!oe&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},H.prototype.handle_end_block=function(L){for(this.handle_whitespace_and_comments(L);this._flags.mode===S.Statement;)this.restore_mode();var K=this._flags.last_token.type===o.START_BLOCK;this._flags.inline_frame&&!K?this._output.space_before_token=!0:this._options.brace_style==="expand"?K||this.print_newline():K||(A(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(L)},H.prototype.handle_word=function(L){if(L.type===o.RESERVED){if(s(L.text,["set","get"])&&this._flags.mode!==S.ObjectLiteral)L.type=o.WORD;else if(L.text==="import"&&s(this._tokens.peek().text,["(","."]))L.type=o.WORD;else if(s(L.text,["as","from"])&&!this._flags.import_block)L.type=o.WORD;else if(this._flags.mode===S.ObjectLiteral){var K=this._tokens.peek();K.text===":"&&(L.type=o.WORD)}}if(this.start_of_statement(L)?I(this._flags.last_token,["var","let","const"])&&L.type===o.WORD&&(this._flags.declaration_statement=!0):L.newlines&&!Y(this._flags.mode)&&(this._flags.last_token.type!==o.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==o.EQUALS&&(this._options.preserve_newlines||!I(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(L),this.print_newline()):this.handle_whitespace_and_comments(L),this._flags.do_block&&!this._flags.do_while)if(p(L,"while")){this._output.space_before_token=!0,this.print_token(L),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(L,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===S.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&I(L,["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(L),this._flags.in_case=!0;return}if((this._flags.last_token.type===o.COMMA||this._flags.last_token.type===o.START_EXPR||this._flags.last_token.type===o.EQUALS||this._flags.last_token.type===o.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L)),p(L,"function")){(s(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(s(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===o.OPERATOR))&&(!this._output.just_added_blankline()&&!L.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===o.RESERVED||this._flags.last_token.type===o.WORD?I(this._flags.last_token,["get","set","new","export"])||I(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===o.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(Y(this._flags.mode)||A(this._flags.mode))||this.print_newline(),this.print_token(L),this._flags.last_word=L.text;return}var ee="NONE";if(this._flags.last_token.type===o.END_BLOCK?this._previous_flags.inline_frame?ee="SPACE":I(L,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&L.newlines?ee="NEWLINE":(ee="SPACE",this._output.space_before_token=!0):ee="NEWLINE":this._flags.last_token.type===o.SEMICOLON&&this._flags.mode===S.BlockStatement?ee="NEWLINE":this._flags.last_token.type===o.SEMICOLON&&Y(this._flags.mode)?ee="SPACE":this._flags.last_token.type===o.STRING?ee="NEWLINE":this._flags.last_token.type===o.RESERVED||this._flags.last_token.type===o.WORD||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===S.ObjectLiteral&&s(this._last_last_text,["{",","]))?ee="SPACE":this._flags.last_token.type===o.START_BLOCK?this._flags.inline_frame?ee="SPACE":ee="NEWLINE":this._flags.last_token.type===o.END_EXPR&&(this._output.space_before_token=!0,ee="NEWLINE"),I(L,d)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ee="SPACE":ee="NEWLINE"),I(L,["else","catch","finally"]))if((!(this._flags.last_token.type===o.END_BLOCK&&this._previous_flags.mode===S.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&L.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 ee==="NEWLINE"?I(this._flags.last_token,R)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&I(L,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==o.END_EXPR?(this._flags.last_token.type!==o.START_EXPR||!I(L,["var","let","const"]))&&this._flags.last_token.text!==":"&&(p(L,"if")&&p(L.previous,"else")?this._output.space_before_token=!0:this.print_newline()):I(L,d)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&A(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ee==="SPACE"&&(this._output.space_before_token=!0);L.previous&&(L.previous.type===o.WORD||L.previous.type===o.RESERVED)&&(this._output.space_before_token=!0),this.print_token(L),this._flags.last_word=L.text,L.type===o.RESERVED&&(L.text==="do"?this._flags.do_block=!0:L.text==="if"?this._flags.if_block=!0:L.text==="import"?this._flags.import_block=!0:this._flags.import_block&&p(L,"from")&&(this._flags.import_block=!1))},H.prototype.handle_semicolon=function(L){this.start_of_statement(L)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(L);for(var K=this._tokens.peek();this._flags.mode===S.Statement&&!(this._flags.if_block&&p(K,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(L)},H.prototype.handle_string=function(L){L.text.startsWith("`")&&L.newlines===0&&L.whitespace_before===""&&(L.previous.text===")"||this._flags.last_token.type===o.WORD)||(this.start_of_statement(L)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(L),this._flags.last_token.type===o.RESERVED||this._flags.last_token.type===o.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===o.COMMA||this._flags.last_token.type===o.START_EXPR||this._flags.last_token.type===o.EQUALS||this._flags.last_token.type===o.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L):L.text.startsWith("`")&&this._flags.last_token.type===o.END_EXPR&&(L.previous.text==="]"||L.previous.text===")")&&L.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(L)},H.prototype.handle_equals=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0},H.prototype.handle_comma=function(L){this.handle_whitespace_and_comments(L,!0),this.print_token(L),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(L)):this._flags.mode===S.ObjectLiteral||this._flags.mode===S.Statement&&this._flags.parent.mode===S.ObjectLiteral?(this._flags.mode===S.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(L)},H.prototype.handle_operator=function(L){var K=L.text==="*"&&(I(this._flags.last_token,["function","yield"])||s(this._flags.last_token.type,[o.START_BLOCK,o.COMMA,o.END_BLOCK,o.SEMICOLON])),ee=s(L.text,["-","+"])&&(s(this._flags.last_token.type,[o.START_BLOCK,o.START_EXPR,o.EQUALS,o.OPERATOR])||s(this._flags.last_token.text,d)||this._flags.last_token.text===",");if(!this.start_of_statement(L)){var oe=!K;this.handle_whitespace_and_comments(L,oe)}if(L.text==="*"&&this._flags.last_token.type===o.DOT){this.print_token(L);return}if(L.text==="::"){this.print_token(L);return}if(this._flags.last_token.type===o.OPERATOR&&s(this._options.operator_position,C)&&this.allow_wrap_or_preserved_newline(L),L.text===":"&&this._flags.in_case){this.print_token(L),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==o.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 ae=!0,be=!0,_e=!1;if(L.text===":"?this._flags.ternary_depth===0?ae=!1:(this._flags.ternary_depth-=1,_e=!0):L.text==="?"&&(this._flags.ternary_depth+=1),!ee&&!K&&this._options.preserve_newlines&&s(L.text,u)){var fe=L.text===":",Re=fe&&_e,Ce=fe&&!_e;switch(this._options.operator_position){case x.before_newline:this._output.space_before_token=!Ce,this.print_token(L),(!fe||Re)&&this.allow_wrap_or_preserved_newline(L),this._output.space_before_token=!0;return;case x.after_newline:this._output.space_before_token=!0,!fe||Re?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(L):this._output.space_before_token=!1,this.print_token(L),this._output.space_before_token=!0;return;case x.preserve_newline:Ce||this.allow_wrap_or_preserved_newline(L),ae=!(this._output.just_added_newline()||Ce),this._output.space_before_token=ae,this.print_token(L),this._output.space_before_token=!0;return}}if(K){this.allow_wrap_or_preserved_newline(L),ae=!1;var ce=this._tokens.peek();be=ce&&s(ce.type,[o.WORD,o.RESERVED])}else if(L.text==="...")this.allow_wrap_or_preserved_newline(L),ae=this._flags.last_token.type===o.START_BLOCK,be=!1;else if(s(L.text,["--","++","!","~"])||ee){if((this._flags.last_token.type===o.COMMA||this._flags.last_token.type===o.START_EXPR)&&this.allow_wrap_or_preserved_newline(L),ae=!1,be=!1,L.newlines&&(L.text==="--"||L.text==="++"||L.text==="~")){var te=I(this._flags.last_token,R)&&L.newlines;te&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(te,!0)}this._flags.last_token.text===";"&&Y(this._flags.mode)&&(ae=!0),this._flags.last_token.type===o.RESERVED?ae=!0:this._flags.last_token.type===o.END_EXPR?ae=!(this._flags.last_token.text==="]"&&(L.text==="--"||L.text==="++")):this._flags.last_token.type===o.OPERATOR&&(ae=s(L.text,["--","-","++","+"])&&s(this._flags.last_token.text,["--","-","++","+"]),s(L.text,["+","-"])&&s(this._flags.last_token.text,["--","++"])&&(be=!0)),(this._flags.mode===S.BlockStatement&&!this._flags.inline_frame||this._flags.mode===S.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||ae,this.print_token(L),this._output.space_before_token=be},H.prototype.handle_block_comment=function(L,K){if(this._output.raw){this._output.add_raw_token(L),L.directives&&L.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(L.directives){this.print_newline(!1,K),this.print_token(L),L.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!n.newline.test(L.text)&&!L.newlines){this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0;return}else this.print_block_commment(L,K)},H.prototype.print_block_commment=function(L,K){var ee=j(L.text),oe,ae=!1,be=!1,_e=L.whitespace_before,fe=_e.length;if(this.print_newline(!1,K),this.print_token_line_indentation(L),this._output.add_token(ee[0]),this.print_newline(!1,K),ee.length>1){for(ee=ee.slice(1),ae=z(ee,"*"),be=O(ee,_e),ae&&(this._flags.alignment=1),oe=0;oe<ee.length;oe++)ae?(this.print_token_line_indentation(L),this._output.add_token(E(ee[oe]))):be&&ee[oe]?(this.print_token_line_indentation(L),this._output.add_token(ee[oe].substring(fe))):(this._output.current_line.set_indent(-1),this._output.add_token(ee[oe])),this.print_newline(!1,K);this._flags.alignment=0}},H.prototype.handle_comment=function(L,K){L.newlines?this.print_newline(!1,K):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(L),this.print_newline(!1,K)},H.prototype.handle_dot=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),I(this._flags.last_token,R)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(L,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(L)},H.prototype.handle_unknown=function(L,K){this.print_token(L),L.text[L.text.length-1]===`
|
|
|
`&&this.print_newline(!1,K)},H.prototype.handle_eof=function(L){for(;this._flags.mode===S.Statement;)this.restore_mode();this.handle_whitespace_and_comments(L)},t.exports.Beautifier=H},function(t){function h(i){this.__parent=i,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=[]}h.prototype.clone_empty=function(){var i=new h(this.__parent);return i.set_indent(this.__indent_count,this.__alignment_count),i},h.prototype.item=function(i){return i<0?this.__items[this.__items.length+i]:this.__items[i]},h.prototype.has_match=function(i){for(var n=this.__items.length-1;n>=0;n--)if(this.__items[n].match(i))return!0;return!1},h.prototype.set_indent=function(i,n){this.is_empty()&&(this.__indent_count=i||0,this.__alignment_count=n||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},h.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)},h.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},h.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var i=this.__parent.current_line;return i.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),i.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),i.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,i.__items[0]===" "&&(i.__items.splice(0,1),i.__character_count-=1),!0}return!1},h.prototype.is_empty=function(){return this.__items.length===0},h.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},h.prototype.push=function(i){this.__items.push(i);var n=i.lastIndexOf(`
|
|
|
`);n!==-1?this.__character_count=i.length-n:this.__character_count+=i.length},h.prototype.pop=function(){var i=null;return this.is_empty()||(i=this.__items.pop(),this.__character_count-=i.length),i},h.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},h.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},h.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},h.prototype.toString=function(){var i="";return this.is_empty()?this.__parent.indent_empty_lines&&(i=this.__parent.get_indent_string(this.__indent_count)):(i=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),i+=this.__items.join("")),i};function r(i,n){this.__cache=[""],this.__indent_size=i.indent_size,this.__indent_string=i.indent_char,i.indent_with_tabs||(this.__indent_string=new Array(i.indent_size+1).join(i.indent_char)),n=n||"",i.indent_level>0&&(n=new Array(i.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}r.prototype.get_indent_size=function(i,n){var l=this.__base_string_length;return n=n||0,i<0&&(l=0),l+=i*this.__indent_size,l+=n,l},r.prototype.get_indent_string=function(i,n){var l=this.__base_string;return n=n||0,i<0&&(i=0,l=""),n+=i*this.__indent_size,this.__ensure_cache(n),l+=this.__cache[n],l},r.prototype.__ensure_cache=function(i){for(;i>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var i=this.__cache.length,n=0,l="";this.__indent_size&&i>=this.__indent_size&&(n=Math.floor(i/this.__indent_size),i-=n*this.__indent_size,l=new Array(n+1).join(this.__indent_string)),i&&(l+=new Array(i+1).join(" ")),this.__cache.push(l)};function c(i,n){this.__indent_cache=new r(i,n),this.raw=!1,this._end_with_newline=i.end_with_newline,this.indent_size=i.indent_size,this.wrap_line_length=i.wrap_line_length,this.indent_empty_lines=i.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new h(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(i,n){return this.__indent_cache.get_indent_string(i,n)},c.prototype.get_indent_size=function(i,n){return this.__indent_cache.get_indent_size(i,n)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(i){return this.is_empty()||!i&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(i){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 l=this.__lines.join(`
|
|
|
`);return i!==`
|
|
|
`&&(l=l.replace(/[\n]/g,i)),l},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(i,n){return i=i||0,n=n||0,this.next_line.set_indent(i,n),this.__lines.length>1?(this.current_line.set_indent(i,n),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(i){for(var n=0;n<i.newlines;n++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(i.whitespace_before),this.current_line.push(i.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},c.prototype.add_token=function(i){this.__add_space_before_token(),this.current_line.push(i),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(i){for(var n=this.__lines.length;i<n;)this.__lines[i]._remove_indent(),i++;this.current_line._remove_wrap_indent()},c.prototype.trim=function(i){for(i=i===void 0?!1:i,this.current_line.trim();i&&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(i,n){for(var l=this.__lines.length-2;l>=0;){var f=this.__lines[l];if(f.is_empty())break;if(f.item(0).indexOf(i)!==0&&f.item(-1)!==n){this.__lines.splice(l+1,0,new h(this)),this.previous_line=this.__lines[this.__lines.length-2];break}l--}},t.exports.Output=c},function(t){function h(r,c,i,n){this.type=r,this.text=c,this.comments_before=null,this.newlines=i||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=h},function(t,h){var r="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",c="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",i="\\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",l="(?:\\\\u[0-9a-fA-F]{4}|["+r+i+"])",f="(?:\\\\u[0-9a-fA-F]{4}|["+c+i+n+"])*";h.identifier=new RegExp(l+f,"g"),h.identifierStart=new RegExp(l),h.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+c+i+n+"])+");var d=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;h.newline=/[\n\r\u2028\u2029]/,h.lineBreak=new RegExp(`\r
|
|
|
|`+h.newline.source),h.allLineBreaks=new RegExp(h.lineBreak.source,"g")},function(t,h,r){var c=r(6).Options,i=["before-newline","after-newline","preserve-newline"];function n(l){c.call(this,l,"js");var f=this.raw_options.brace_style||null;f==="expand-strict"?this.raw_options.brace_style="expand":f==="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 d=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var u=0;u<d.length;u++)d[u]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=d[u];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",i),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 h(i,n){this.raw_options=r(i,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"])}h.prototype._get_array=function(i,n){var l=this.raw_options[i],f=n||[];return typeof l=="object"?l!==null&&typeof l.concat=="function"&&(f=l.concat()):typeof l=="string"&&(f=l.split(/[^a-zA-Z0-9_\/\-]+/)),f},h.prototype._get_boolean=function(i,n){var l=this.raw_options[i],f=l===void 0?!!n:!!l;return f},h.prototype._get_characters=function(i,n){var l=this.raw_options[i],f=n||"";return typeof l=="string"&&(f=l.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),f},h.prototype._get_number=function(i,n){var l=this.raw_options[i];n=parseInt(n,10),isNaN(n)&&(n=0);var f=parseInt(l,10);return isNaN(f)&&(f=n),f},h.prototype._get_selection=function(i,n,l){var f=this._get_selection_list(i,n,l);if(f.length!==1)throw new Error("Invalid Option Value: The option '"+i+`' can only be one of the following values:
|
|
|
`+n+`
|
|
|
You passed in: '`+this.raw_options[i]+"'");return f[0]},h.prototype._get_selection_list=function(i,n,l){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(l=l||[n[0]],!this._is_valid_selection(l,n))throw new Error("Invalid Default Value!");var f=this._get_array(i,l);if(!this._is_valid_selection(f,n))throw new Error("Invalid Option Value: The option '"+i+`' can contain only the following values:
|
|
|
`+n+`
|
|
|
You passed in: '`+this.raw_options[i]+"'");return f},h.prototype._is_valid_selection=function(i,n){return i.length&&n.length&&!i.some(function(l){return n.indexOf(l)===-1})};function r(i,n){var l={};i=c(i);var f;for(f in i)f!==n&&(l[f]=i[f]);if(n&&i[n])for(f in i[n])l[f]=i[n][f];return l}function c(i){var n={},l;for(l in i){var f=l.replace(/-/g,"_");n[f]=i[l]}return n}t.exports.Options=h,t.exports.normalizeOpts=c,t.exports.mergeOpts=r},function(t,h,r){var c=r(8).InputScanner,i=r(9).Tokenizer,n=r(9).TOKEN,l=r(13).Directives,f=r(4),d=r(12).Pattern,u=r(14).TemplatablePattern;function o(z,O){return O.indexOf(z)!==-1}var s={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},E=new l(/\/\*/,/\*\//),v=/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]/,I=/[^\d\.]/,R=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),y=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";y=y.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),y="\\?\\.(?!\\d) "+y,y=y.replace(/ /g,"|");var x=new RegExp(y),C="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),S=C.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),F=new RegExp("^(?:"+S.join("|")+")$"),j,A=function(z,O){i.call(this,z,O),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var H=new d(this._input),U=new u(this._input).read_options(this._options);this.__patterns={template:U,identifier:U.starting_with(f.identifier).matching(f.identifierMatch),number:H.matching(v),punct:H.matching(x),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(f.lineBreak),shebang:H.starting_with(/#!/).until_after(f.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(/[`}\\]/)}};A.prototype=new i,A.prototype._is_comment=function(z){return z.type===s.COMMENT||z.type===s.BLOCK_COMMENT||z.type===s.UNKNOWN},A.prototype._is_opening=function(z){return z.type===s.START_BLOCK||z.type===s.START_EXPR},A.prototype._is_closing=function(z,O){return(z.type===s.END_BLOCK||z.type===s.END_EXPR)&&O&&(z.text==="]"&&O.text==="["||z.text===")"&&O.text==="("||z.text==="}"&&O.text==="{")},A.prototype._reset=function(){j=!1},A.prototype._get_next_token=function(z,O){var H=null;this._readWhitespace();var U=this._input.peek();return U===null?this._create_token(s.EOF,""):(H=H||this._read_non_javascript(U),H=H||this._read_string(U),H=H||this._read_word(z),H=H||this._read_singles(U),H=H||this._read_comment(U),H=H||this._read_regexp(U,z),H=H||this._read_xml(U,z),H=H||this._read_punctuation(),H=H||this._create_token(s.UNKNOWN,this._input.next()),H)},A.prototype._read_word=function(z){var O;if(O=this.__patterns.identifier.read(),O!=="")return O=O.replace(f.allLineBreaks,`
|
|
|
`),!(z.type===s.DOT||z.type===s.RESERVED&&(z.text==="set"||z.text==="get"))&&F.test(O)?(O==="in"||O==="of")&&(z.type===s.WORD||z.type===s.STRING)?this._create_token(s.OPERATOR,O):this._create_token(s.RESERVED,O):this._create_token(s.WORD,O);if(O=this.__patterns.number.read(),O!=="")return this._create_token(s.WORD,O)},A.prototype._read_singles=function(z){var O=null;return z==="("||z==="["?O=this._create_token(s.START_EXPR,z):z===")"||z==="]"?O=this._create_token(s.END_EXPR,z):z==="{"?O=this._create_token(s.START_BLOCK,z):z==="}"?O=this._create_token(s.END_BLOCK,z):z===";"?O=this._create_token(s.SEMICOLON,z):z==="."&&I.test(this._input.peek(1))?O=this._create_token(s.DOT,z):z===","&&(O=this._create_token(s.COMMA,z)),O&&this._input.next(),O},A.prototype._read_punctuation=function(){var z=this.__patterns.punct.read();if(z!=="")return z==="="?this._create_token(s.EQUALS,z):z==="?."?this._create_token(s.DOT,z):this._create_token(s.OPERATOR,z)},A.prototype._read_non_javascript=function(z){var O="";if(z==="#"){if(this._is_first_token()&&(O=this.__patterns.shebang.read(),O))return this._create_token(s.UNKNOWN,O.trim()+`
|
|
|
`);if(O=this.__patterns.include.read(),O)return this._create_token(s.UNKNOWN,O.trim()+`
|
|
|
`);z=this._input.next();var H="#";if(this._input.hasNext()&&this._input.testChar(p)){do z=this._input.next(),H+=z;while(this._input.hasNext()&&z!=="#"&&z!=="=");return z==="#"||(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(s.WORD,H)}this._input.back()}else if(z==="<"&&this._is_first_token()){if(O=this.__patterns.html_comment_start.read(),O){for(;this._input.hasNext()&&!this._input.testChar(f.newline);)O+=this._input.next();return j=!0,this._create_token(s.COMMENT,O)}}else if(j&&z==="-"&&(O=this.__patterns.html_comment_end.read(),O))return j=!1,this._create_token(s.COMMENT,O);return null},A.prototype._read_comment=function(z){var O=null;if(z==="/"){var H="";if(this._input.peek(1)==="*"){H=this.__patterns.block_comment.read();var U=E.get_directives(H);U&&U.ignore==="start"&&(H+=E.readIgnored(this._input)),H=H.replace(f.allLineBreaks,`
|
|
|
`),O=this._create_token(s.BLOCK_COMMENT,H),O.directives=U}else this._input.peek(1)==="/"&&(H=this.__patterns.comment.read(),O=this._create_token(s.COMMENT,H))}return O},A.prototype._read_string=function(z){if(z==="`"||z==="'"||z==='"'){var O=this._input.next();return this.has_char_escapes=!1,z==="`"?O+=this._read_string_recursive("`",!0,"${"):O+=this._read_string_recursive(z),this.has_char_escapes&&this._options.unescape_strings&&(O=Y(O)),this._input.peek()===z&&(O+=this._input.next()),O=O.replace(f.allLineBreaks,`
|
|
|
`),this._create_token(s.STRING,O)}return null},A.prototype._allow_regexp_or_xml=function(z){return z.type===s.RESERVED&&o(z.text,["return","case","throw","else","do","typeof","yield"])||z.type===s.END_EXPR&&z.text===")"&&z.opened.previous.type===s.RESERVED&&o(z.opened.previous.text,["if","while","for"])||o(z.type,[s.COMMENT,s.START_EXPR,s.START_BLOCK,s.START,s.END_BLOCK,s.OPERATOR,s.EQUALS,s.EOF,s.SEMICOLON,s.COMMA])},A.prototype._read_regexp=function(z,O){if(z==="/"&&this._allow_regexp_or_xml(O)){for(var H=this._input.next(),U=!1,L=!1;this._input.hasNext()&&(U||L||this._input.peek()!==z)&&!this._input.testChar(f.newline);)H+=this._input.peek(),U?U=!1:(U=this._input.peek()==="\\",this._input.peek()==="["?L=!0:this._input.peek()==="]"&&(L=!1)),this._input.next();return this._input.peek()===z&&(H+=this._input.next(),H+=this._input.read(f.identifier)),this._create_token(s.STRING,H)}return null},A.prototype._read_xml=function(z,O){if(this._options.e4x&&z==="<"&&this._allow_regexp_or_xml(O)){var H="",U=this.__patterns.xml.read_match();if(U){for(var L=U[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),K=L.indexOf("{")===0,ee=0;U;){var oe=!!U[1],ae=U[2],be=!!U[U.length-1]||ae.slice(0,8)==="![CDATA[";if(!be&&(ae===L||K&&ae.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(oe?--ee:++ee),H+=U[0],ee<=0)break;U=this.__patterns.xml.read_match()}return U||(H+=this._input.match(/[\s\S]*/g)[0]),H=H.replace(f.allLineBreaks,`
|
|
|
`),this._create_token(s.STRING,H)}}return null};function Y(z){for(var O="",H=0,U=new c(z),L=null;U.hasNext();)if(L=U.match(/([\s]|[^\\]|\\\\)+/g),L&&(O+=L[0]),U.peek()==="\\"){if(U.next(),U.peek()==="x")L=U.match(/x([0-9A-Fa-f]{2})/g);else if(U.peek()==="u")L=U.match(/u([0-9A-Fa-f]{4})/g);else{O+="\\",U.hasNext()&&(O+=U.next());continue}if(!L)return z;if(H=parseInt(L[1],16),H>126&&H<=255&&L[0].indexOf("x")===0)return z;if(H>=0&&H<32){O+="\\"+L[0];continue}else H===34||H===39||H===92?O+="\\"+String.fromCharCode(H):O+=String.fromCharCode(H)}return O}A.prototype._read_string_recursive=function(z,O,H){var U,L;z==="'"?L=this.__patterns.single_quote:z==='"'?L=this.__patterns.double_quote:z==="`"?L=this.__patterns.template_text:z==="}"&&(L=this.__patterns.template_expression);for(var K=L.read(),ee="";this._input.hasNext();){if(ee=this._input.next(),ee===z||!O&&f.newline.test(ee)){this._input.back();break}else ee==="\\"&&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(),ee+=this._input.next()):H&&(H==="${"&&ee==="$"&&this._input.peek()==="{"&&(ee+=this._input.next()),H===ee&&(z==="`"?ee+=this._read_string_recursive("}",O,"`"):ee+=this._read_string_recursive("`",O,"${"),this._input.hasNext()&&(ee+=this._input.next())));ee+=L.read(),K+=ee}return K},t.exports.Tokenizer=A,t.exports.TOKEN=s,t.exports.positionable_operators=R.slice(),t.exports.line_starters=C.slice()},function(t){var h=RegExp.prototype.hasOwnProperty("sticky");function r(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position<this.__input_length},r.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__input.charAt(this.__position),this.__position+=1),c},r.prototype.peek=function(c){var i=null;return c=c||0,c+=this.__position,c>=0&&c<this.__input_length&&(i=this.__input.charAt(c)),i},r.prototype.__match=function(c,i){c.lastIndex=i;var n=c.exec(this.__input);return n&&!(h&&c.sticky)&&(n.index!==i&&(n=null)),n},r.prototype.test=function(c,i){return i=i||0,i+=this.__position,i>=0&&i<this.__input_length?!!this.__match(c,i):!1},r.prototype.testChar=function(c,i){var n=this.peek(i);return c.lastIndex=0,n!==null&&c.test(n)},r.prototype.match=function(c){var i=this.__match(c,this.__position);return i?this.__position+=i[0].length:i=null,i},r.prototype.read=function(c,i,n){var l="",f;return c&&(f=this.match(c),f&&(l+=f[0])),i&&(f||!c)&&(l+=this.readUntil(i,n)),l},r.prototype.readUntil=function(c,i){var n="",l=this.__position;c.lastIndex=this.__position;var f=c.exec(this.__input);return f?(l=f.index,i&&(l+=f[0].length)):l=this.__input_length,n=this.__input.substring(this.__position,l),this.__position=l,n},r.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},r.prototype.get_regexp=function(c,i){var n=null,l="g";return i&&h&&(l="y"),typeof c=="string"&&c!==""?n=new RegExp(c,l):c&&(n=new RegExp(c.source,l)),n},r.prototype.get_literal_regexp=function(c){return RegExp(c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},r.prototype.peekUntilAfter=function(c){var i=this.__position,n=this.readUntilAfter(c);return this.__position=i,n},r.prototype.lookBack=function(c){var i=this.__position-1;return i>=c.length&&this.__input.substring(i-c.length,i).toLowerCase()===c},t.exports.InputScanner=r},function(t,h,r){var c=r(8).InputScanner,i=r(3).Token,n=r(10).TokenStream,l=r(11).WhitespacePattern,f={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},d=function(u,o){this._input=new c(u),this._options=o||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new l(this._input)};d.prototype.tokenize=function(){this._input.restart(),this.__tokens=new n,this._reset();for(var u,o=new i(f.START,""),s=null,E=[],v=new n;o.type!==f.EOF;){for(u=this._get_next_token(o,s);this._is_comment(u);)v.add(u),u=this._get_next_token(o,s);v.isEmpty()||(u.comments_before=v,v=new n),u.parent=s,this._is_opening(u)?(E.push(s),s=u):s&&this._is_closing(u,s)&&(u.opened=s,s.closed=u,s=E.pop(),u.parent=s),u.previous=o,o.next=u,this.__tokens.add(u),o=u}return this.__tokens},d.prototype._is_first_token=function(){return this.__tokens.isEmpty()},d.prototype._reset=function(){},d.prototype._get_next_token=function(u,o){this._readWhitespace();var s=this._input.read(/.+/g);return s?this._create_token(f.RAW,s):this._create_token(f.EOF,"")},d.prototype._is_comment=function(u){return!1},d.prototype._is_opening=function(u){return!1},d.prototype._is_closing=function(u,o){return!1},d.prototype._create_token=function(u,o){var s=new i(u,o,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return s},d.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=d,t.exports.TOKEN=f},function(t){function h(r){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=r}h.prototype.restart=function(){this.__position=0},h.prototype.isEmpty=function(){return this.__tokens_length===0},h.prototype.hasNext=function(){return this.__position<this.__tokens_length},h.prototype.next=function(){var r=null;return this.hasNext()&&(r=this.__tokens[this.__position],this.__position+=1),r},h.prototype.peek=function(r){var c=null;return r=r||0,r+=this.__position,r>=0&&r<this.__tokens_length&&(c=this.__tokens[r]),c},h.prototype.add=function(r){this.__parent_token&&(r.parent=this.__parent_token),this.__tokens.push(r),this.__tokens_length+=1},t.exports.TokenStream=h},function(t,h,r){var c=r(12).Pattern;function i(n,l){c.call(this,n,l),l?this._line_regexp=this._input.get_regexp(l._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}i.prototype=new c,i.prototype.__set_whitespace_patterns=function(n,l){n+="\\t ",l+="\\n\\r",this._match_pattern=this._input.get_regexp("["+n+l+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+l+"]")},i.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 l=this.__split(this._newline_regexp,n);this.newline_count=l.length-1,this.whitespace_before_token=l[this.newline_count]}return n},i.prototype.matching=function(n,l){var f=this._create();return f.__set_whitespace_patterns(n,l),f._update(),f},i.prototype._create=function(){return new i(this._input,this)},i.prototype.__split=function(n,l){n.lastIndex=0;for(var f=0,d=[],u=n.exec(l);u;)d.push(l.substring(f,u.index)),f=u.index+u[0].length,u=n.exec(l);return f<l.length?d.push(l.substring(f,l.length)):d.push(""),d},t.exports.WhitespacePattern=i},function(t){function h(r,c){this._input=r,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)}h.prototype.read=function(){var r=this._input.read(this._starting_pattern);return(!this._starting_pattern||r)&&(r+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),r},h.prototype.read_match=function(){return this._input.match(this._match_pattern)},h.prototype.until_after=function(r){var c=this._create();return c._until_after=!0,c._until_pattern=this._input.get_regexp(r),c._update(),c},h.prototype.until=function(r){var c=this._create();return c._until_after=!1,c._until_pattern=this._input.get_regexp(r),c._update(),c},h.prototype.starting_with=function(r){var c=this._create();return c._starting_pattern=this._input.get_regexp(r,!0),c._update(),c},h.prototype.matching=function(r){var c=this._create();return c._match_pattern=this._input.get_regexp(r,!0),c._update(),c},h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){},t.exports.Pattern=h},function(t){function h(r,c){r=typeof r=="string"?r:r.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(r+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(r+/\sbeautify\signore:end\s/.source+c,"g")}h.prototype.get_directives=function(r){if(!r.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var i=this.__directive_pattern.exec(r);i;)c[i[1]]=i[2],i=this.__directive_pattern.exec(r);return c},h.prototype.readIgnored=function(r){return r.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=h},function(t,h,r){var c=r(12).Pattern,i={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function n(l,f){c.call(this,l,f),this.__template_pattern=null,this._disabled=Object.assign({},i),this._excluded=Object.assign({},i),f&&(this.__template_pattern=this._input.get_regexp(f.__template_pattern),this._excluded=Object.assign(this._excluded,f._excluded),this._disabled=Object.assign(this._disabled,f._disabled));var d=new c(l);this.__patterns={handlebars_comment:d.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:d.starting_with(/{{{/).until_after(/}}}/),handlebars:d.starting_with(/{{/).until_after(/}}/),php:d.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:d.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:d.starting_with(/{%/).until_after(/%}/),django_value:d.starting_with(/{{/).until_after(/}}/),django_comment:d.starting_with(/{#/).until_after(/#}/),smarty:d.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:d.starting_with(/{\*/).until_after(/\*}/),smarty_literal:d.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(l){var f=this._create();return f._disabled[l]=!0,f._update(),f},n.prototype.read_options=function(l){var f=this._create();for(var d in i)f._disabled[d]=l.templating.indexOf(d)===-1;return f._update(),f},n.prototype.exclude=function(l){var f=this._create();return f._excluded[l]=!0,f._update(),f},n.prototype.read=function(){var l="";this._match_pattern?l=this._input.read(this._starting_pattern):l=this._input.read(this._starting_pattern,this.__template_pattern);for(var f=this._read_template();f;)this._match_pattern?f+=this._input.read(this._match_pattern):f+=this._input.readUntil(this.__template_pattern),l+=f,f=this._read_template();return this._until_after&&(l+=this._input.readUntilAfter(this._until_pattern)),l},n.prototype.__set_templated_pattern=function(){var l=[];this._disabled.php||l.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||l.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||l.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(l.push(this.__patterns.django._starting_pattern.source),l.push(this.__patterns.django_value._starting_pattern.source),l.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||l.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&l.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+l.join("|")+")")},n.prototype._read_template=function(){var l="",f=this._input.peek();if(f==="<"){var d=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&d==="?"&&(l=l||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&d==="%"&&(l=l||this.__patterns.erb.read())}else f==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(l=l||this.__patterns.handlebars_comment.read(),l=l||this.__patterns.handlebars_unescaped.read(),l=l||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(l=l||this.__patterns.django_value.read()),this._excluded.django||(l=l||this.__patterns.django_comment.read(),l=l||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(l=l||this.__patterns.smarty_comment.read(),l=l||this.__patterns.smarty_literal.read(),l=l||this.__patterns.smarty.read()));return l},t.exports.TemplatablePattern=n}],m={};function T(t){var h=m[t];if(h!==void 0)return h.exports;var r=m[t]={exports:{}};return b[t](r,r.exports,T),r.exports}var _=T(0);w=_})();var k=w;!(N=[],g=function(){return{js_beautify:k}}.apply(Q,N),g!==void 0&&(B.exports=g))})()},"6eGT":function(B,Q,D){"use strict";function N(g){return null}Q.a=N},"746U":function(B,Q,D){"use strict";D.d(Q,"f",function(){return N}),D.d(Q,"l",function(){return g}),D.d(Q,"k",function(){return w}),D.d(Q,"j",function(){return k}),D.d(Q,"g",function(){return b}),D.d(Q,"m",function(){return m}),D.d(Q,"h",function(){return T}),D.d(Q,"n",function(){return _}),D.d(Q,"c",function(){return t}),D.d(Q,"a",function(){return h}),D.d(Q,"i",function(){return r}),D.d(Q,"o",function(){return c}),D.d(Q,"e",function(){return l}),D.d(Q,"d",function(){return f}),D.d(Q,"p",function(){return d}),D.d(Q,"b",function(){return u});function N(o){return Array.isArray(o)}function g(o){return typeof o=="string"}function w(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function k(o){return typeof o=="number"&&!isNaN(o)}function b(o){return o===!0||o===!1}function m(o){return typeof o=="undefined"}function T(o){return!_(o)}function _(o){return m(o)||o===null}function t(o,s){if(!o)throw new Error(s?`Unexpected type, expected '${s}'`:"Unexpected type")}function h(o){if(_(o))throw new Error("Assertion Failed: argument is undefined or null");return o}function r(o){return typeof o=="function"}function c(o,s){const E=Math.min(o.length,s.length);for(let v=0;v<E;v++)i(o[v],s[v])}function i(o,s){if(g(s)){if(typeof o!==s)throw new Error(`argument does not match constraint: typeof ${s}`)}else if(r(s)){try{if(o instanceof s)return}catch(E){}if(!_(o)&&o.constructor===s)return;if(s.length===1&&s.call(void 0,o)===!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(o){let s=[],E=Object.getPrototypeOf(o);for(;Object.prototype!==E;)s=s.concat(Object.getOwnPropertyNames(E)),E=Object.getPrototypeOf(E);return s}function l(o){const s=[];for(const E of n(o))typeof o[E]=="function"&&s.push(E);return s}function f(o,s){const E=p=>function(){const I=Array.prototype.slice.call(arguments,0);return s(p,I)};let v={};for(const p of o)v[p]=E(p);return v}function d(o){return o===null?void 0:o}function u(o,s="Unreachable"){throw new Error(s)}},"7Cbv":function(B,Q,D){"use strict";var N=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),g=new Uint8Array(16);function w(){if(!N)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return N(g)}var k=/^(?:[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 b(i){return typeof i=="string"&&k.test(i)}for(var m=b,T=[],_=0;_<256;++_)T.push((_+256).toString(16).substr(1));function t(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=(T[i[n+0]]+T[i[n+1]]+T[i[n+2]]+T[i[n+3]]+"-"+T[i[n+4]]+T[i[n+5]]+"-"+T[i[n+6]]+T[i[n+7]]+"-"+T[i[n+8]]+T[i[n+9]]+"-"+T[i[n+10]]+T[i[n+11]]+T[i[n+12]]+T[i[n+13]]+T[i[n+14]]+T[i[n+15]]).toLowerCase();if(!m(l))throw TypeError("Stringified UUID is invalid");return l}var h=t;function r(i,n,l){i=i||{};var f=i.random||(i.rng||w)();if(f[6]=f[6]&15|64,f[8]=f[8]&63|128,n){l=l||0;for(var d=0;d<16;++d)n[l+d]=f[d];return n}return h(f)}var c=Q.a=r},"7ahc":function(B,Q,D){"use strict";D.d(Q,"a",function(){return E});var N=D("k1fw"),g=D("0Owb"),w=D("+L6B"),k=D("2/Rp"),b=D("y8nQ"),m=D("Vl3Y"),T=D("tJVT"),_=D("OaEy"),t=D("2fM7"),h=D("q1tI"),r=D.n(h),c=D("VrN/"),i=D.n(c),n=D("p77/"),l=D.n(n),f=D("c5Ni"),d=D.n(f),u=t.a.Option,o={labelCol:{span:4},wrapperCol:{span:20}},s={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(v){var p=v.callback,I=v.onCancel,R=Object(h.useState)("python"),y=Object(T.a)(R,2),x=y[0],C=y[1];function S(j){C(s[j][1])}function F(j){p(j)}return r.a.createElement(m.a,Object(g.a)({},o,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:F}),r.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},r.a.createElement(t.a,{onChange:S},Object.keys(s).map(function(j){return r.a.createElement(u,{key:j,value:j},s[j][0])}))),r.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},r.a.createElement(E,{mode:x})),r.a.createElement("div",{className:"flex-container flex-end"},r.a.createElement(k.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),r.a.createElement(k.a,{type:"ghost",onClick:I},"\u53D6\u6D88")))};function E(v){var p=v.value,I=v.onChange,R=v.mode,y=v.options,x=y===void 0?{}:y,C=Object(h.useRef)(),S=Object(h.useState)(),F=Object(T.a)(S,2),j=F[0],A=F[1];return Object(h.useEffect)(function(){if(j){function Y(z){var O=z.getValue();I&&I(O)}return j.on("change",Y),function(){j.off("change",Y)}}},[j,I]),Object(h.useEffect)(function(){j&&j.setOption("mode",R)},[j,R]),Object(h.useEffect)(function(){j&&((p!==j.getValue()||p==="")&&setTimeout(function(){j.setValue(p||" ")},300))},[j,p]),Object(h.useEffect)(function(){if(C.current&&!j){var Y=i.a.fromTextArea(C.current,Object(N.a)({mode:R,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},x));A(Y)}},[C.current,j]),r.a.createElement("div",{className:"my-codemirror-container"},r.a.createElement("textarea",{ref:C}))}},"815F":function(B,Q,D){"use strict";D.d(Q,"e",function(){return T}),D.d(Q,"c",function(){return t}),D.d(Q,"d",function(){return h}),D.d(Q,"a",function(){return c}),D.d(Q,"f",function(){return i}),D.d(Q,"b",function(){return n});var N=D("KQm4"),g=D("VTBJ"),w=D("Ff2n"),k=D("Zm9Q"),b=D("Kwbf"),m=D("OZM5");function T(l,f){return l!=null?l:f}function _(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=new Map;function d(u){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(u||[]).forEach(function(s){var E=s.key,v=s.children;Object(b.a)(E!=null,"Tree node must have a certain key: [".concat(o).concat(E,"]"));var p=String(E);Object(b.a)(!f.has(p)||E===null||E===void 0,"Same 'key' exist in the Tree: ".concat(p)),f.set(p,!0),d(v,"".concat(o).concat(p," > "))})}d(l)}function t(l){function f(d){var u=Object(k.a)(d);return u.map(function(o){if(!Object(m.i)(o))return Object(b.a)(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var s=o.key,E=o.props,v=E.children,p=Object(w.a)(E,["children"]),I=Object(g.a)({key:s},p),R=f(v);return R.length&&(I.children=R),I}).filter(function(o){return o})}return f(l)}function h(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],d=new Set(f===!0?[]:f),u=[];function o(s){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return s.map(function(v,p){var I=Object(m.h)(E?E.pos:"0",p),R=T(v.key,I),y=Object(g.a)(Object(g.a)({},v),{},{parent:E,pos:I,children:null,data:v,isStart:[].concat(Object(N.a)(E?E.isStart:[]),[p===0]),isEnd:[].concat(Object(N.a)(E?E.isEnd:[]),[p===s.length-1])});return u.push(y),f===!0||d.has(R)?y.children=o(v.children||[],y):y.children=[],y})}return o(l),u}function r(l,f,d){var u;d?typeof d=="string"?u=function(E){return E[d]}:typeof d=="function"&&(u=function(E){return d(E)}):u=function(E,v){return T(E.key,v)};function o(s,E,v){var p=s?s.children:l,I=s?Object(m.h)(v.pos,E):"0";if(s){var R=u(s,I),y={node:s,index:E,pos:I,key:R,parentPos:v.node?v.pos:null,level:v.level+1};f(y)}p&&p.forEach(function(x,C){o(x,C,{node:s,pos:I,level:v?v.level+1:-1})})}o(null)}function c(l){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=f.initWrapper,u=f.processEntity,o=f.onProcessFinished,s=arguments.length>2?arguments[2]:void 0,E={},v={},p={posEntities:E,keyEntities:v};return d&&(p=d(p)||p),r(l,function(I){var R=I.node,y=I.index,x=I.pos,C=I.key,S=I.parentPos,F=I.level,j={node:R,index:y,key:C,pos:x,level:F},A=T(C,x);E[x]=j,v[A]=j,j.parent=E[S],j.parent&&(j.parent.children=j.parent.children||[],j.parent.children.push(j)),u&&u(j,p)},s),o&&o(p),p}function i(l,f){var d=f.expandedKeys,u=f.selectedKeys,o=f.loadedKeys,s=f.loadingKeys,E=f.checkedKeys,v=f.halfCheckedKeys,p=f.dragOverNodeKey,I=f.dropPosition,R=f.keyEntities,y=R[l],x={eventKey:l,expanded:d.indexOf(l)!==-1,selected:u.indexOf(l)!==-1,loaded:o.indexOf(l)!==-1,loading:s.indexOf(l)!==-1,checked:E.indexOf(l)!==-1,halfChecked:v.indexOf(l)!==-1,pos:String(y?y.pos:""),dragOver:p===l&&I===0,dragOverGapTop:p===l&&I===-1,dragOverGapBottom:p===l&&I===1};return x}function n(l){var f=l.data,d=l.expanded,u=l.selected,o=l.checked,s=l.loaded,E=l.loading,v=l.halfChecked,p=l.dragOver,I=l.dragOverGapTop,R=l.dragOverGapBottom,y=l.pos,x=l.active,C=Object(g.a)(Object(g.a)({},f),{},{expanded:d,selected:u,checked:o,loaded:s,loading:E,halfChecked:v,dragOver:p,dragOverGapTop:I,dragOverGapBottom:R,pos:y,active:x});return"props"in C||Object.defineProperty(C,"props",{get:function(){return Object(b.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),l}}),C}},"8EBN":function(B,Q,D){(function(N){N(D("VrN/"))})(function(N){"use strict";N.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var g=0;g<N.modeInfo.length;g++){var w=N.modeInfo[g];w.mimes&&(w.mime=w.mimes[0])}N.findModeByMIME=function(k){k=k.toLowerCase();for(var b=0;b<N.modeInfo.length;b++){var m=N.modeInfo[b];if(m.mime==k)return m;if(m.mimes){for(var T=0;T<m.mimes.length;T++)if(m.mimes[T]==k)return m}}if(/\+xml$/.test(k))return N.findModeByMIME("application/xml");if(/\+json$/.test(k))return N.findModeByMIME("application/json")},N.findModeByExtension=function(k){k=k.toLowerCase();for(var b=0;b<N.modeInfo.length;b++){var m=N.modeInfo[b];if(m.ext){for(var T=0;T<m.ext.length;T++)if(m.ext[T]==k)return m}}},N.findModeByFileName=function(k){for(var b=0;b<N.modeInfo.length;b++){var m=N.modeInfo[b];if(m.file&&m.file.test(k))return m}var T=k.lastIndexOf("."),_=T>-1&&k.substring(T+1,k.length);if(_)return N.findModeByExtension(_)},N.findModeByName=function(k){k=k.toLowerCase();for(var b=0;b<N.modeInfo.length;b++){var m=N.modeInfo[b];if(m.name.toLowerCase()==k)return m;if(m.alias){for(var T=0;T<m.alias.length;T++)if(m.alias[T].toLowerCase()==k)return m}}}})},"8HAY":function(B,Q,D){"use strict";D.d(Q,"a",function(){return b}),D.d(Q,"b",function(){return m}),D.d(Q,"d",function(){return T}),D.d(Q,"e",function(){return _}),D.d(Q,"c",function(){return t});var N=D("MI8n"),g=D("pmY6"),w=D("3/fG"),k=function(h,r,c,i){function n(l){return l instanceof c?l:new c(function(f){f(l)})}return new(c||(c=Promise))(function(l,f){function d(s){try{o(i.next(s))}catch(E){f(E)}}function u(s){try{o(i.throw(s))}catch(E){f(E)}}function o(s){s.done?l(s.value):n(s.value).then(d,u)}o((i=i.apply(h,r||[])).next())})};class b extends g.a{constructor(h,r="",c="",i=!0,n){super();this._onDidChange=this._register(new N.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=h,this._label=r,this._cssClass=c,this._enabled=i,this._actionCallback=n}get id(){return this._id}get label(){return this._label}set label(h){this._setLabel(h)}_setLabel(h){this._label!==h&&(this._label=h,this._onDidChange.fire({label:h}))}get tooltip(){return this._tooltip||""}set tooltip(h){this._setTooltip(h)}_setTooltip(h){this._tooltip!==h&&(this._tooltip=h,this._onDidChange.fire({tooltip:h}))}get class(){return this._cssClass}set class(h){this._setClass(h)}_setClass(h){this._cssClass!==h&&(this._cssClass=h,this._onDidChange.fire({class:h}))}get enabled(){return this._enabled}set enabled(h){this._setEnabled(h)}_setEnabled(h){this._enabled!==h&&(this._enabled=h,this._onDidChange.fire({enabled:h}))}get checked(){return this._checked}set checked(h){this._setChecked(h)}_setChecked(h){this._checked!==h&&(this._checked=h,this._onDidChange.fire({checked:h}))}run(h,r){return k(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(h))})}}class m extends g.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new N.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new N.b),this.onDidRun=this._onDidRun.event}run(h,r){return k(this,void 0,void 0,function*(){if(!h.enabled)return;this._onBeforeRun.fire({action:h});let c;try{yield this.runAction(h,r)}catch(i){c=i}this._onDidRun.fire({action:h,error:c})})}runAction(h,r){return k(this,void 0,void 0,function*(){yield h.run(r)})}}class T extends b{constructor(h){super(T.ID,h,h?"separator text":"separator");this.checked=!1,this.enabled=!1}}T.ID="vs.actions.separator";class _{constructor(h,r,c,i){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=h,this.label=r,this.class=i,this._actions=c}get actions(){return this._actions}dispose(){}run(){return k(this,void 0,void 0,function*(){})}}class t extends b{constructor(){super(t.ID,w.a("submenu.empty","(empty)"),void 0,!1)}}t.ID="vs.actions.empty"},"8hTe":function(B,Q,D){B.exports={button:"button___1wy9m"}},"9Bee":function(B,Q,D){"use strict";var N=D("DYRE"),g=D("zeV3"),w=D("+L6B"),k=D("2/Rp"),b=D("k1fw"),m=D("9og8"),T=D("tJVT"),_=D("WmNS"),t=D.n(_),h=D("q1tI"),r=D.n(h),c=D("vg9a"),i=D("DlQD"),n=D.n(i),l=D("rUJ1");function f(ye,ue){var pe=ye.match(/^(\s+)(?:```)/);if(pe===null)return ue;var me=pe[1];return ue.split(`
|
|
|
`).map(function(Oe){var ve=Oe.match(/^\s+/);if(ve===null)return Oe;var xe=Object(T.a)(ve,1),Ae=xe[0];return Ae.length>=me.length?Oe.slice(me.length):Oe}).join(`
|
|
|
`)}var d=[],u=["<ul>"],o=new n.a.Renderer,s=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function E(){d.length=0,u=["<ul>"]}var v={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function p(ye,ue,pe,me){if(ue>=ye.length||ye[ue].level<=pe)return ue;var Oe=ye[ue];me.push("<li><a href='#"+Oe.anchor+"'>"+Oe.text+"</a>"),ue++;var ve=[];return ue=p(ye,ue,Oe.level,ve),ve.length>0&&(me.push("<ul>"),ve.forEach(function(xe){me.push(xe)}),me.push("</ul>")),me.push("</li>"),ue=p(ye,ue,pe,me),ue}function I(){return p(d,0,0,u),u.push("</ul>"),u.join("")}var R={heading:function(ue){var pe=s.exec(ue);if(pe)return{type:"heading",raw:pe[0],depth:pe[1].length,text:pe[2]}},fences:function(ue){var pe=this.rules.block.fences.exec(ue);if(pe){var me=pe[0],Oe=f(me,pe[3]||""),ve=pe[2]?pe[2].trim():pe[2];if(["latex","katex","math"].indexOf(ve)>=0){var xe=C(),Ae=Oe;Oe=xe,S[xe]={type:"block",expression:Ae}}return{type:"code",raw:me,lang:ve,text:Oe}}}},y=/(?:\${2})([^\n`]+?)(?:\${2})/gi,x=0,C=function(){return"__special_katext_id_".concat(x++,"__")},S={};function F(){return S}function j(){x=0,S={}}function A(ye){return ye=ye.replace(y,function(ue,pe){var me=C();return S[me]={type:"inline",expression:pe},me}),ye}var Y=o.listitem;o.listitem=function(ye){return Y(A(ye))};var z=o.paragraph;o.paragraph=function(ye){return z(A(ye))};var O=o.tablecell;o.tablecell=function(ye,ue){return O(A(ye),ue)},o.code=function(ye,ue,pe){var me=(ue||"").match(/\S*/)[0];return me?["latex","katex","math"].indexOf(me)>=0?"<p class='editormd-tex'>".concat(ye,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(ue,'">').concat(pe?ye:Object(l.escape)(ye,!0),`</code></pre>
|
|
|
`):'<pre class="prettyprint linenums"><code>'+(pe?ye:Object(l.escape)(ye,!0))+"</code></pre>"},o.heading=function(ye,ue,pe){var me=this.options.headerPrefix+pe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return d.push({anchor:me,level:ue,text:ye}),"<h"+ue+' id="'+me+'">'+ye+"</h"+ue+">"},n.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),n.a.use({tokenizer:R,renderer:o});var H=n.a,U=D("SJMd"),L=D("ulZh"),K=D.n(L),ee=D("m3rI"),oe=D("Oy/b"),ae=D("p5ED"),be=D("ErOA"),_e=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 fe=function(ye,ue){return(fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(pe,me){pe.__proto__=me}||function(pe,me){for(var Oe in me)Object.prototype.hasOwnProperty.call(me,Oe)&&(pe[Oe]=me[Oe])})(ye,ue)};function Re(ye,ue){if(typeof ue!="function"&&ue!==null)throw new TypeError("Class extends value "+String(ue)+" is not a constructor or null");function pe(){this.constructor=ye}fe(ye,ue),ye.prototype=ue===null?Object.create(ue):(pe.prototype=ue.prototype,new pe)}function Ce(ye,ue,pe,me){return new(pe||(pe=Promise))(function(Oe,ve){function xe(Me){try{Le(me.next(Me))}catch(We){ve(We)}}function Ae(Me){try{Le(me.throw(Me))}catch(We){ve(We)}}function Le(Me){var We;Me.done?Oe(Me.value):(We=Me.value,We instanceof pe?We:new pe(function(rt){rt(We)})).then(xe,Ae)}Le((me=me.apply(ye,ue||[])).next())})}function ce(ye,ue){var pe,me,Oe,ve,xe={label:0,sent:function(){if(1&Oe[0])throw Oe[1];return Oe[1]},trys:[],ops:[]};return ve={next:Ae(0),throw:Ae(1),return:Ae(2)},typeof Symbol=="function"&&(ve[Symbol.iterator]=function(){return this}),ve;function Ae(Le){return function(Me){return function(We){if(pe)throw new TypeError("Generator is already executing.");for(;xe;)try{if(pe=1,me&&(Oe=2&We[0]?me.return:We[0]?me.throw||((Oe=me.return)&&Oe.call(me),0):me.next)&&!(Oe=Oe.call(me,We[1])).done)return Oe;switch(me=0,Oe&&(We=[2&We[0],Oe.value]),We[0]){case 0:case 1:Oe=We;break;case 4:return xe.label++,{value:We[1],done:!1};case 5:xe.label++,me=We[1],We=[0];continue;case 7:We=xe.ops.pop(),xe.trys.pop();continue;default:if(!(Oe=xe.trys,(Oe=Oe.length>0&&Oe[Oe.length-1])||We[0]!==6&&We[0]!==2)){xe=0;continue}if(We[0]===3&&(!Oe||We[1]>Oe[0]&&We[1]<Oe[3])){xe.label=We[1];break}if(We[0]===6&&xe.label<Oe[1]){xe.label=Oe[1],Oe=We;break}if(Oe&&xe.label<Oe[2]){xe.label=Oe[2],xe.ops.push(We);break}Oe[2]&&xe.ops.pop(),xe.trys.pop();continue}We=ue.call(ye,xe)}catch(rt){We=[6,rt],me=0}finally{pe=Oe=0}if(5&We[0])throw We[1];return{value:We[0]?We[1]:void 0,done:!0}}([Le,Me])}}}var te=function(){function ye(){}return ye.addKey=function(ue){ye.key=ue},Object.defineProperty(ye,"isLicensed",{get:function(){return!!ye.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ye.key)},enumerable:!1,configurable:!0}),ye}(),W=function(){function ye(){}return ye.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ye.setAttributes=function(ue,pe){for(var me=0,Oe=pe;me<Oe.length;me++){var ve=Oe[me],xe=ve[0],Ae=ve[1];ue.setAttribute(xe,Ae)}},ye.createRect=function(ue,pe,me){var Oe=document.createElementNS("http://www.w3.org/2000/svg","rect");return Oe.setAttribute("width",ue.toString()),Oe.setAttribute("height",pe.toString()),me&&ye.setAttributes(Oe,me),Oe},ye.createLine=function(ue,pe,me,Oe,ve){var xe=document.createElementNS("http://www.w3.org/2000/svg","line");return xe.setAttribute("x1",ue.toString()),xe.setAttribute("y1",pe.toString()),xe.setAttribute("x2",me.toString()),xe.setAttribute("y2",Oe.toString()),ve&&ye.setAttributes(xe,ve),xe},ye.createPolygon=function(ue,pe){var me=document.createElementNS("http://www.w3.org/2000/svg","polygon");return me.setAttribute("points",ue),pe&&ye.setAttributes(me,pe),me},ye.createCircle=function(ue,pe){var me=document.createElementNS("http://www.w3.org/2000/svg","circle");return me.setAttribute("cx",(ue/2).toString()),me.setAttribute("cy",(ue/2).toString()),me.setAttribute("r",ue.toString()),pe&&ye.setAttributes(me,pe),me},ye.createEllipse=function(ue,pe,me){var Oe=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Oe.setAttribute("cx",(ue/2).toString()),Oe.setAttribute("cy",(pe/2).toString()),Oe.setAttribute("rx",(ue/2).toString()),Oe.setAttribute("ry",(pe/2).toString()),me&&ye.setAttributes(Oe,me),Oe},ye.createGroup=function(ue){var pe=document.createElementNS("http://www.w3.org/2000/svg","g");return ue&&ye.setAttributes(pe,ue),pe},ye.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ye.createMarker=function(ue,pe,me,Oe,ve,xe,Ae){var Le=document.createElementNS("http://www.w3.org/2000/svg","marker");return ye.setAttributes(Le,[["id",ue],["orient",pe],["markerWidth",me.toString()],["markerHeight",Oe.toString()],["refX",ve.toString()],["refY",xe.toString()]]),Le.appendChild(Ae),Le},ye.createText=function(ue){var pe=document.createElementNS("http://www.w3.org/2000/svg","text");return pe.setAttribute("x","0"),pe.setAttribute("y","0"),ue&&ye.setAttributes(pe,ue),pe},ye.createTSpan=function(ue,pe){var me=document.createElementNS("http://www.w3.org/2000/svg","tspan");return me.textContent=ue,pe&&ye.setAttributes(me,pe),me},ye.createImage=function(ue){var pe=document.createElementNS("http://www.w3.org/2000/svg","image");return ue&&ye.setAttributes(pe,ue),pe},ye.createPoint=function(ue,pe){var me=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return me.x=ue,me.y=pe,me},ye.createPath=function(ue,pe){var me=document.createElementNS("http://www.w3.org/2000/svg","path");return me.setAttribute("d",ue),pe&&ye.setAttributes(me,pe),me},ye.createElement=function(ue,pe){var me=document.createElementNS("http://www.w3.org/2000/svg",ue);return pe&&ye.setAttributes(me,pe),me},ye.getHollowRectanglePath=function(ue,pe,me,Oe,ve,xe,Ae,Le){return"M"+ue+","+pe+"V"+(pe+Oe)+"H"+(ue+me)+"V"+pe+"H"+ve+"V"+xe+"H"+(ve+Ae)+"V"+(xe+Le)+"H"+ve+"V"+pe+"Z"},ye}(),X=function(){function ye(ue){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ue+"_"}return Object.defineProperty(ye.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ye.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(ye.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),ye.prototype.addClass=function(ue){return this.styleSheet===void 0&&this.addStyleSheet(),ue.name=""+this.classNamePrefix+ue.localName,this.classes.push(ue),this.styleSheet.sheet.insertRule("."+ue.name+" {"+ue.style+"}",this.styleSheet.sheet.cssRules.length),ue},ye.prototype.addRule=function(ue){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ue),this.styleSheet.sheet.insertRule(ue.selector+" {"+ue.style+"}",this.styleSheet.sheet.cssRules.length)},ye.prototype.addStyleSheet=function(){var ue;this.styleSheet=document.createElement("style"),((ue=this.styleSheetRoot)!==null&&ue!==void 0?ue:document.head).appendChild(this.styleSheet),this.addRule(new V("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new V("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new V("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new Z("_fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new Z("_fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},ye.prototype.removeStyleSheet=function(){var ue;this.styleSheet&&(((ue=this.styleSheetRoot)!==null&&ue!==void 0?ue:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ye}(),V=function(ye,ue){this.selector=ye,this.style=ue},Z=function(ye,ue){this.localName=ye,this.style=ue},q=function(){function ye(){this.blocks=[],this.display=""}return ye.prototype.addButtonBlock=function(ue){ue.className=this.blockClassName,ue.buttonClassName=this.buttonClassName,ue.buttonColorsClassName=this.buttonColorsClassName,ue.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(ue)},ye.prototype.addElementBlock=function(ue){ue.className===void 0&&(ue.className=this.blockClassName),this.blocks.push(ue)},ye.prototype.getUI=function(){var ue=document.createElement("div");return ue.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,ue.style.display=this.display,this.blocks.forEach(function(pe){return ue.appendChild(pe.getUI())}),ue},ye}(),ie=function(){function ye(){}return ye.prototype.getUI=function(){var ue=document.createElement("div");if(ue.className=this.className,this.minWidth!==void 0&&(ue.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":ue.style.justifyContent="flex-start";break;case"center":ue.style.justifyContent="center";break;case"end":ue.style.justifyContent="flex-end"}return ue.style.whiteSpace="nowrap",ue},ye}(),ne=function(ye){function ue(){var pe=ye!==null&&ye.apply(this,arguments)||this;return pe.buttons=[],pe}return Re(ue,ye),ue.prototype.addButton=function(pe){pe.className=this.buttonClassName,pe.colorsClassName=this.buttonColorsClassName,pe.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(pe)},ue.prototype.getUI=function(){var pe=ye.prototype.getUI.call(this);return this.buttons.forEach(function(me){return pe.appendChild(me.getUI())}),pe},ue}(ie),J=function(){function ye(ue,pe){this._isActive=!1,this._isHidden=!1,this._icon=ue,this.title=pe,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(ye.prototype,"icon",{get:function(){return this._icon},set:function(ue){this._icon=ue,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"isActive",{get:function(){return this._isActive},set:function(ue){this._isActive=ue,this.adjustClassName()},enumerable:!1,configurable:!0}),ye.prototype.getUI=function(){var ue=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 ue.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},ye.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,"")))},ye.prototype.hide=function(){this._isHidden=!0},ye}(),$=function(ye){function ue(){var pe=ye!==null&&ye.apply(this,arguments)||this;return pe.elements=[],pe}return Re(ue,ye),ue.prototype.addElement=function(pe){this.elements.push(pe)},ue.prototype.getUI=function(){var pe=ye.prototype.getUI.call(this);return this.elements.forEach(function(me){return pe.appendChild(me)}),pe},ue}(ie),le=function(){function ye(ue,pe){this.horizontal=ue,this.vertical=pe}return Object.defineProperty(ye.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),ye.prototype.getVerticalLength=function(ue){return ue/this.ratio},ye.prototype.getHorizontalLength=function(ue){return ue*this.ratio},ye}(),he=function(){function ye(){}return ye.getIcon=function(ue,pe){if(ue>0&&pe>0){var me=new le(ue,pe),Oe=me.ratio>=1?20:me.getHorizontalLength(20),ve=me.ratio<1?20:me.getVerticalLength(20),xe=document.createElementNS("http://www.w3.org/2000/svg","svg");xe.setAttribute("xmlns","http://www.w3.org/2000/svg"),xe.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(xe);var Ae=W.createDefs();xe.appendChild(Ae);var Le=W.createElement("clipPath",[["id","text-bg-clip"]]);Ae.appendChild(Le);var Me=W.createPath(W.getHollowRectanglePath((24-Oe)/2,(24-ve)/2,Oe,ve,(24-Oe)/2+2,(24-ve)/2+2,Oe-4,ve-4));xe.appendChild(Me);var We=W.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);We.appendChild(W.createTSpan(ue+":"+pe)),xe.appendChild(We);var rt=We.getBBox();W.setAttributes(We,[["x",((24-rt.width)/2).toString()],["y",((24-rt.height)/2-rt.y).toString()]]);var at=W.createPath(W.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(rt.width))/2,(24-Math.ceil(rt.height))/2,Math.ceil(rt.width),Math.ceil(rt.height)));return Le.appendChild(at),W.setAttributes(Me,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(xe),xe.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>'},ye}(),Se=function(ye){function ue(pe,me,Oe){var ve=ye.call(this,pe,me)||this;return ve.isDropdownOpen=!1,ve.onClick=ve.dropdownButtonClicked,ve.dropdownButtons=Oe,ve}return Re(ue,ye),ue.prototype.setupDropdown=function(){var pe=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(me){me.className=pe.className,me.colorsClassName=pe.colorsClassName,pe.dropdownBlock.appendChild(me.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},ue.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},ue.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},ue.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},ue.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},ue.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},ue}(J),Ue=function(){function ye(ue,pe){this.GRIP_SIZE=10,this.color=ue,this.fillColor=pe,this.visual=W.createGroup(),this.visual.appendChild(W.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(W.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ye.prototype.ownsTarget=function(ue){return ue===this.visual||ue===this.visual.childNodes[0]||ue===this.visual.childNodes[1]},ye.prototype.setCenter=function(ue,pe){this.visual.childNodes.forEach(function(me){return W.setAttributes(me,[["cx",ue.toString()],["cy",pe.toString()]])})},ye}(),Xe=function(){function ye(ue,pe,me,Oe){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=ue,this.canvasHeight=pe,this.margin=me,this.container=Oe,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(ye.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(ue){this._aspectRatio=ue,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ue){this._isGridVisible=ue,this.gridContainer&&W.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(ue){this._zoomFactor=ue,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),ye.prototype.open=function(){var ue=this;this.cropShadeElement=W.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=W.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var pe=0;pe<this.numberOfGridLines;pe++)this.horizontalGridLines.push(W.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(W.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(me){return ue.gridContainer.appendChild(me)}),this.verticalGridLines.forEach(function(me){return ue.gridContainer.appendChild(me)}),this.cropRectElement=W.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Ue(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Ue(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Ue(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Ue(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},ye.prototype.setCropRectangle=function(ue){this.cropRect=ue;var pe=Object.assign({},this.cropRect);this.zoomFactor!==1&&(pe.width=this.cropRect.width*this.zoomFactor,pe.height=this.cropRect.height*this.zoomFactor,pe.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-pe.width/2,pe.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-pe.height/2),W.setAttributes(this.cropRectElement,[["x",pe.x.toString()],["y",pe.y.toString()],["width",pe.width.toString()],["height",pe.height.toString()]]);var me=pe.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ve,xe){var Ae=pe.y+me*(xe+1);W.setAttributes(ve,[["x1",""+pe.x],["y1",""+Ae],["x2",""+(pe.x+pe.width)],["y2",""+Ae]])});var Oe=pe.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ve,xe){var Ae=pe.x+Oe*(xe+1);W.setAttributes(ve,[["x1",""+Ae],["y1",""+pe.y],["x2",""+Ae],["y2",""+(pe.y+pe.height)]])}),W.setAttributes(this.cropShadeElement,[["d",W.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,pe.x,pe.y,pe.width,pe.height)]]),this.topLeftGrip.setCenter(pe.x,pe.y),this.topRightGrip.setCenter(pe.x+pe.width,pe.y),this.bottomLeftGrip.setCenter(pe.x,pe.y+pe.height),this.bottomRightGrip.setCenter(pe.x+pe.width,pe.y+pe.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},ye.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)},ye.prototype.clientToLocalCoordinates=function(ue,pe){var me=this.container.getBoundingClientRect();return{x:ue-me.left+this.margin,y:pe-me.top+this.margin}},ye.prototype.onPointerDown=function(ue){this.container.setPointerCapture(ue.pointerId),this.previousPoint=this.clientToLocalCoordinates(ue.clientX,ue.clientY),this.cropRectElement===ue.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(ue.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(ue.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(ue.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(ue.target)&&(this.activeGrip=this.bottomRightGrip)},ye.prototype.onPointerMove=function(ue){if(this.isMoving)this.move(this.clientToLocalCoordinates(ue.clientX,ue.clientY));else if(this.activeGrip){var pe=this.clientToLocalCoordinates(ue.clientX,ue.clientY);this.resize(pe)}ue.preventDefault()},ye.prototype.onPointerUp=function(ue){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(ue.pointerId)},ye.prototype.move=function(ue){var pe=ue.x-this.previousPoint.x,me=ue.y-this.previousPoint.y;this.zoomFactor!==1&&(pe=-pe/this.zoomFactor,me=-me/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+pe),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+me),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=ue},ye.prototype.resize=function(ue){var pe=Object.assign({},this.cropRect),me=ue.x-this.previousPoint.x,Oe=ue.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:pe.x+me<this.margin&&(me=this.margin-pe.x),pe.x+=me,pe.width=this.cropRect.x+this.cropRect.width-pe.x;break;case this.bottomRightGrip:case this.topRightGrip:pe.width+me>this.canvasWidth*this.zoomFactor&&(me=this.canvasWidth*this.zoomFactor-pe.width),pe.width+=me}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(pe.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(me),pe.height=this.aspectRatio.getVerticalLength(pe.width)):(pe.y+=Oe,pe.height=this.cropRect.y+this.cropRect.height-pe.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?pe.height=this.aspectRatio.getVerticalLength(pe.width):pe.height+=Oe}pe.width<10&&(pe.x=this.cropRect.x,pe.width=10),pe.height<10&&(pe.y=this.cropRect.y,pe.height=10),this.previousPoint=ue,pe.x>=this.margin&&pe.y>=this.margin&&pe.x-this.margin+pe.width<=this.canvasWidth&&pe.y-this.margin+pe.height<=this.canvasHeight&&(this.cropRect=pe,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},ye.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var ue=this.cropRect.x+this.cropRect.width/2,pe=this.cropRect.y+this.cropRect.height/2,me=this.aspectRatio.getHorizontalLength(this.cropRect.height),Oe=this.aspectRatio.getVerticalLength(this.cropRect.width);me/this.canvasWidth<Oe/this.canvasHeight?this.cropRect.width=me:this.cropRect.height=Oe,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=ue-this.cropRect.width/2,this.cropRect.y=pe-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)}},ye.prototype.getRescaledRect=function(ue,pe,me,Oe,ve,xe){var Ae=me/ue,Le=Oe/pe;return{x:(ve.x-xe)*Ae+xe,y:(ve.y-xe)*Le+xe,width:ve.width*Ae,height:ve.height*Le}},ye.prototype.scaleCanvas=function(ue,pe){var me=this.getRescaledRect(this.canvasWidth,this.canvasHeight,ue,pe,this.cropRect,this.margin);this.canvasWidth=ue,this.canvasHeight=pe,this.onCropChange&&this.onCropChange(me),this.setCropRectangle(me)},ye}(),$e=function(){function ye(ue){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=ue,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(ye.prototype,"angle",{get:function(){return this._angle},set:function(ue){this._angle=ue,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),ye.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},ye.prototype.onPointerDown=function(ue){this.controlContainer.setPointerCapture(ue.pointerId),this.isDragging=!0,this.previousPoint={x:ue.clientX,y:ue.clientY}},ye.prototype.onPointerMove=function(ue){this.isDragging&&(this.onAngleChange&&this.onAngleChange((ue.clientX-this.previousPoint.x)/5),this.previousPoint.x=ue.clientX)},ye.prototype.onPointerUp=function(ue){this.isDragging&&this.onAngleChange&&this.onAngleChange((ue.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(ue.pointerId)},ye.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var ue=this.angleLabelText.getBBox();W.setAttributes(this.angleLabelElement,[["x",((this.width-ue.width)/2).toString()],["y",(this.height/2).toString()]])}},ye.prototype.positionScaleShape=function(){if(this.scaleShape){var ue=this.scaleShape.transform.baseVal.getItem(0);ue.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(ue,0)}},ye.prototype.getVisual=function(){var ue=document.createElementNS("http://www.w3.org/2000/svg","svg");ue.setAttribute("xmlns","http://www.w3.org/2000/svg"),ue.setAttribute("width",this.width+"px"),ue.setAttribute("height",this.height+"px"),ue.setAttribute("viewBox","0 0 "+this.width+" "+this.height),ue.style.flexShrink="0",document.body.appendChild(ue);for(var pe="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,me=1;me<=this.width/5+10;me++){var Oe=me%5==0?this.height/3:this.height/6;pe+="h4v"+-Oe+"h1v"+Oe}pe+="v1H0Z",this.scaleShape=W.createPath(pe);var ve=W.createTransform();this.scaleShape.transform.baseVal.appendItem(ve),ue.appendChild(this.scaleShape),this.angleLabelElement=W.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=W.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var xe=W.createTSpan("");return xe.innerHTML="°",this.angleLabelElement.appendChild(xe),ue.appendChild(this.angleLabelElement),document.body.removeChild(ue),ue},ye}(),Ye=function(){function ye(){this.naturalSize=!1,this.imageType="image/png"}return ye.prototype.rasterize=function(ue,pe,me,Oe,ve,xe,Ae){var Le=this;return new Promise(function(Me){var We=document.createElement("canvas");We.width=ue.width.baseVal.value-2*Oe,We.height=ue.height.baseVal.value-2*Oe;var rt=1,at=1;Le.naturalSize===!0?(rt=pe.naturalWidth/(ue.width.baseVal.value-2*Oe)/xe,at=pe.naturalHeight/(ue.height.baseVal.value-2*Oe)/Ae,We.width=pe.naturalWidth/xe,We.height=pe.naturalHeight/Ae):Le.width!==void 0&&Le.height!==void 0&&(rt=Le.width/me.width,at=Le.height/me.height,We.width*=rt,We.height*=at);var it=We.getContext("2d");it.translate(We.width/2,We.height/2),it.rotate(ve*Math.PI/180),it.scale(xe,Ae),it.translate(-We.width/2,-We.height/2),it.drawImage(pe,0,0,We.width,We.height);var st=document.createElement("canvas");st.width=me.width*rt,st.height=me.height*at,st.getContext("2d").putImageData(it.getImageData((me.x-Oe)*rt,(me.y-Oe)*at,me.width*rt,me.height*at),0,0),Me(st.toDataURL(Le.imageType,Le.imageQuality))})},ye}(),et=function(){function ye(ue){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=ye.instanceCounter++,this.styles=new X(this.instanceNo),this.target=ue,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(ye.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(ue){this._zoomToCropEnabled=ue,ue?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ue){this._isGridVisible=ue,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"gridLines",{get:function(){return this._gridLines},set:function(ue){this._gridLines=ue,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(ue){this._rotationAngle=ue,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"aspectRatio",{get:function(){var ue;return(ue=this._aspectRatio)!==null&&ue!==void 0?ue:this.aspectRatios[0]},set:function(ue){this._aspectRatio=ue},enumerable:!1,configurable:!0}),ye.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},ye.prototype.show=function(){this.showUI(),this.open()},ye.prototype.close=function(ue){ue===void 0&&(ue=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),ue||this.closeEventListeners.forEach(function(pe){return pe()}),this._isOpen=!1)},ye.prototype.addRenderEventListener=function(ue){this.renderEventListeners.push(ue)},ye.prototype.removeRenderEventListener=function(ue){this.renderEventListeners.indexOf(ue)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(ue),1)},ye.prototype.addCloseEventListener=function(ue){this.closeEventListeners.push(ue)},ye.prototype.removeCloseEventListener=function(ue){this.closeEventListeners.indexOf(ue)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(ue),1)},ye.prototype.setupResizeObserver=function(){var ue=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ue.resize(ue.target.clientWidth,ue.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))},ye.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var ue=1*this.target.clientWidth/this.target.clientHeight,pe=this.contentDiv.clientWidth/ue>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*ue:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,me=pe+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/ue;this.resize(pe,me)}},ye.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ye.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",W.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},ye.prototype.resize=function(ue,pe){this.imageWidth=Math.round(ue),this.imageHeight=Math.round(pe),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()},ye.prototype.setEditingTarget=function(){var ue=document.createElement("canvas");ue.width=this.target.naturalWidth,ue.height=this.target.naturalHeight,ue.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var pe=ue.toDataURL();W.setAttributes(this.editingTarget,[["href",pe]]),this.setEditingTargetSize()},ye.prototype.setTopLeft=function(){var ue=this.target.getBoundingClientRect(),pe=this.editorCanvas.getBoundingClientRect();this.left=ue.left-pe.left-this.CANVAS_MARGIN,this.top=ue.top-pe.top-this.CANVAS_MARGIN},ye.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=W.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=W.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=W.createGroup(),this.editingTargetRotationScaleContainer=W.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var ue=W.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(ue);var pe=W.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(pe),this.editingTargetContainer=W.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)},ye.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},ye.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=W.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()},ye.prototype.zoomToCrop=function(){if(this.cropRect){var ue=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,pe=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=ue+"px "+pe+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-ue+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-pe+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},ye.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)},ye.prototype.cropRectChanged=function(ue){this.cropRect=ue,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},ye.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},ye.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"},ye.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ye.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 ue=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,pe=this.target.offsetTop>ue+this.CANVAS_MARGIN?this.target.offsetTop-(ue+this.CANVAS_MARGIN):0;this.coverDiv.style.top=pe+"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},ye.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},ye.prototype.addTopToolbar=function(){var ue=this;this.topToolbar=new q,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 pe=new ne;pe.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(pe);var me=[];this.aspectRatios.forEach(function(at){var it=new J(he.getIcon(at.horizontal,at.vertical),at.horizontal===0&&at.vertical===0?"FREE":at.horizontal+":"+at.vertical);it.onClick=function(){return ue.ratioButtonClicked(at)},me.push(it)}),this.aspectRatioButton=new Se(he.getIcon(0,0),"Aspect ratio",me),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,pe.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var Oe=new J('<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");Oe.isActive=this.isGridVisible,Oe.onClick=function(){ue.isGridVisible=!ue.isGridVisible,Oe.isActive=ue.isGridVisible},pe.addButton(Oe);var ve=new J('<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(ve.isActive=this.zoomToCropEnabled,ve.onClick=function(){ue.zoomToCropEnabled=!ue.zoomToCropEnabled,ve.isActive=ue.zoomToCropEnabled},pe.addButton(ve),!te.isLicensed){var xe=new $;this.topToolbar.addElementBlock(xe);var Ae=document.createElement("div");Ae.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Le=document.createElement("a");Le.style.color="currentColor",Le.href="https://markerjs.com/products/cropro",Le.target="_blank",Le.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>',Ae.appendChild(Le),xe.addElement(Ae)}var Me=new ne;Me.minWidth=3*this.toolbarHeight+"px",Me.contentAlign="end",this.topToolbar.addButtonBlock(Me);var We=new J('<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");We.onClick=this.startRenderAndClose,Me.addButton(We),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(We.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var rt=new J('<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");rt.onClick=this.close,Me.addButton(rt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(rt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},ye.prototype.addBottomToolbar=function(){var ue=this;this.bottomToolbar=new q,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 pe=new ne;pe.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(pe);var me=new J('<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");me.onClick=this.rotateLeftButtonClicked,pe.addButton(me);var Oe=new J('<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");Oe.onClick=this.rotateRightButtonClicked,pe.addButton(Oe);var ve=new $;ve.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ve),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(Me){ue.rotateBy(Me),ue.straightener.angle=ue.rotationAngle},ve.addElement(this.straightener.getUI());var xe=new ne;xe.minWidth=2*this.toolbarHeight+"px",xe.contentAlign="end",this.bottomToolbar.addButtonBlock(xe);var Ae=new J('<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");Ae.onClick=this.flipHorizontallyButtonClicked,xe.addButton(Ae);var Le=new J('<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");Le.onClick=this.flipVerticallyButtonClicked,xe.addButton(Le)},ye.prototype.ratioButtonClicked=function(ue){this.aspectRatio=ue,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},ye.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=he.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},ye.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)},ye.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ye.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},ye.prototype.restoreState=function(ue){if(ue){var pe=this.cropLayer.getRescaledRect(ue.width,ue.height,this.imageWidth,this.imageHeight,ue.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(pe),this.cropRectChanged(pe),this.flippedHorizontally=ue.flippedHorizontally,this.flippedVertically=ue.flippedVertically,this.applyFlip(),this.rotationAngle=ue.rotationAngle,this.applyRotation()}},ye.prototype.clientToLocalCoordinates=function(ue,pe){var me=this.cropImage.getBoundingClientRect();return{x:ue-me.left,y:pe-me.top}},ye.prototype.onWindowResize=function(){this.positionUI()},ye.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var ue=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=ue+"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()},ye.prototype.rotateLeftButtonClicked=function(){var ue=this.rotationAngle-90;this.rotationAngle%90!=0&&(ue+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(ue)},ye.prototype.rotateRightButtonClicked=function(){var ue=this.rotationAngle+90;this.rotationAngle%90!=0&&(ue-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(ue)},ye.prototype.rotateTo=function(ue){ue=(ue=ue>180?ue-360:ue)<=-180?ue+360:ue,this.rotationAngle=ue,this.applyRotation()},ye.prototype.rotateBy=function(ue){this.rotateTo((this.rotationAngle+ue)%360)},ye.prototype.applyRotation=function(){var ue=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var pe=this.editingTargetRotationContainer.transform.baseVal.getItem(0);pe.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(pe,0);var me=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/me.width,this.imageHeight/me.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=ue},ye.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},ye.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},ye.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},ye.prototype.startRenderAndClose=function(){return Ce(this,void 0,void 0,function(){var ue,pe;return ce(this,function(me){switch(me.label){case 0:return[4,this.render()];case 1:return ue=me.sent(),pe=this.getState(),this.renderEventListeners.forEach(function(Oe){return Oe(ue,pe)}),this.close(!0),[2]}})})},ye.prototype.render=function(){return Ce(this,void 0,void 0,function(){var ue;return ce(this,function(pe){switch(pe.label){case 0:return(ue=new Ye).naturalSize=this.renderAtNaturalSize,ue.imageType=this.renderImageType,ue.imageQuality=this.renderImageQuality,ue.width=this.renderWidth,ue.height=this.renderHeight,this.unzoomFromCrop(),W.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,ue.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 pe.sent(),[4,ue.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,pe.sent()]}})})},ye.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Z("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 Z("toolbar_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Z("toolbar-block",`
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
box-sizing: content-box;
|
|
|
`));var ue=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Z("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.toolbarHeight-2*ue)+`px;
|
|
|
height: `+(this.toolbarHeight-2*ue)+`px;
|
|
|
padding: `+ue+`px;
|
|
|
cursor: default;
|
|
|
user-select: none;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Z("toolbar_button_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Z("toolbar_active_button",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
|
`)),this.styles.addRule(new V("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new V("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Z("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 Z("toolbar_dropdown_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Z("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 Z("toolbar_straightener",`
|
|
|
display: flex;
|
|
|
overflow: hidden;
|
|
|
justify-content: center;
|
|
|
height: `+(this.toolbarHeight-2*ue)+`px;
|
|
|
padding: `+ue+`px;
|
|
|
cursor: default;
|
|
|
user-select: none;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Z("toolbar_straightener_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`))},ye.instanceCounter=0,ye}(),qe=D("8hTe"),Pe=D.n(qe),Ie=/<pre[^>]*>/g;function Ze(ye){var ue=document.createElement("div");return ue.innerHTML=ye,ue.childNodes.length===0?"":ue.childNodes[0].nodeValue}var nt=Q.a=function(ye){var ue=ye.value,pe=ue===void 0?"":ue,me=ye.edit,Oe=me===void 0?!1:me,ve=ye.className,xe=ye.showTextOnly,Ae=ye.showLines,Le=ye.replaces,Me=ye.zoomImg,We=ye.hasMask,rt=ye.style,at=rt===void 0?{}:rt,it=ye.stylesPrev,st=it===void 0?{}:it,Ct=String(pe),yt=Object(h.useRef)(),ht=Object(h.useRef)(),Ut=Object(h.useState)(""),kt=Object(T.a)(Ut,2),Yt=kt[0],Zt=kt[1],Mt=Object(h.useState)("office"),wt=Object(T.a)(Mt,2),$t=wt[0],Dt=wt[1],Tt=function(){var Ht=new et(ht.current);Ht.displayMode="popup",Ht.addRenderEventListener(function(){var Gt=Object(m.a)(t.a.mark(function vt(xt){var Kt;return t.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return yt.current.style.display="none",qt.next=3,Object(be.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xt}});case 3:Kt=qt.sent,Kt!=null&&Kt.id&&Le(ht.current.getAttribute("src").replace(ee.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 5:case"end":return qt.stop()}},vt)}));return function(vt){return Gt.apply(this,arguments)}}()),Ht.show()},_t=function(){var Ht=new _e.a(ht.current);Ht.settings.displayMode="popup",Ht.addEventListener("render",function(){var Gt=Object(m.a)(t.a.mark(function vt(xt){var Kt;return t.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:if(yt.current.style.display="none",!ht.current){qt.next=6;break}return qt.next=4,Object(be.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xt.dataUrl}});case 4:Kt=qt.sent,Kt!=null&&Kt.id&&Le(ht.current.getAttribute("src").replace(ee.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 6:case"end":return qt.stop()}},vt)}));return function(vt){return Gt.apply(this,arguments)}}()),Ht.show(),window.markerArea=Ht},Et=Object(h.useMemo)(function(){yt.current&&(yt.current.style.zIndex=-1);try{var dt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ht=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Gt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Ct=Ct.replace(dt,"("+ee.a.API_SERVER+"/api/attachments/").replace(Ht,'"'+ee.a.API_SERVER+"/api/attachments/").replace(Gt,'"'+ee.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(Ar){}var vt=H(Ct),xt=F();if(Ct.match(/\[TOC\]/)&&(vt=vt.replace("<p>[TOC]</p>",I()),E()),vt=vt.replace(/(__special_katext_id_\d+__)/g,function(Ar,qt){var ut=xt[qt],Lt=ut.type,Hr=ut.expression;return Object(oe.renderToString)(Ze(Hr)||"",{displayMode:Lt==="block",throwOnError:!1,output:"html"})}),vt=vt.replace(/▁/g,"\u2581\u2581\u2581"),j(),xe){var Kt=document.createElement("div");return Kt.innerHTML=vt,Kt.innerText}return setTimeout(function(){return pt()},500),vt},[Ct]),Bt=Object(h.useRef)();v.WebkitLineClamp=Ae,Ae&&(at=Object(b.a)(Object(b.a)({},at),v));function Dr(dt){var Ht=dt.target;if(Ht.tagName.toUpperCase()==="IMG"){if(Me){var Gt=Ht.getAttribute("src");Zt(Gt),Dt("image")}}else if(Ht.tagName.toUpperCase()==="A"){var vt=Ht.getAttribute("href");if(vt.indexOf("office")>-1)dt.preventDefault(),Zt(vt),Dt("office");else if(vt.indexOf("application/pdf")>-1)dt.preventDefault(),Zt(vt),Dt("pdf");else if(vt.indexOf("text/html")>-1)dt.preventDefault(),Zt(vt),Dt("html");else if(vt.startsWith("#")){dt.preventDefault();var xt=document.getElementById(vt.replace("#",""));xt&&xt.scrollIntoView(!0)}}}var pt=function(){var Ht,Gt=(Ht=Bt.current)===null||Ht===void 0?void 0:Ht.querySelectorAll("video");Gt==null||Gt.forEach(function(vt){if(vt.oncontextmenu=function(){return!1},vt.src.indexOf(".m3u8")>-1&&!vt.canPlayType("application/vnd.apple.mpegurl")){if(K.a.isSupported()){var xt=new K.a;xt.loadSource(vt.src),xt.attachMedia(vt)}}})};Object(h.useEffect)(function(){if(Bt.current&&Et&&(Et.match(Ie)&&window.PR.prettyPrint()),Bt.current)return Bt.current.addEventListener("click",Dr),function(){Bt.current.removeEventListener("click",Dr),j(),E()}},[Et,Bt.current,Dr]);var St=function(Ht){if(!Oe)return;Ht.target.nodeName==="IMG"?(yt.current.style.zIndex=1,yt.current.style.display="flex",yt.current.style.width=Ht.target.clientWidth+"px",yt.current.style.height=Ht.target.clientHeight+"px",yt.current.style.top=Ht.target.offsetTop+"px",yt.current.style.left=Ht.target.offsetLeft+"px",ht.current.src=Ht.target.getAttribute("src")):yt.current.style.display="none"};return r.a.createElement("div",{style:{position:"relative"}},r.a.createElement("div",{ref:Bt,style:Object(b.a)({},at),className:"".concat(ve||""," markdown-body ").concat(Pe.a.mdBody),onMouseOver:St,dangerouslySetInnerHTML:{__html:Et}}),r.a.createElement("div",{ref:yt,className:Pe.a.button},r.a.createElement(g.a,null,r.a.createElement(k.a,{onClick:function(){return Tt()}},"\u88C1\u526A"),r.a.createElement(k.a,{onClick:function(){return _t()}},"\u7F16\u8F91"))),r.a.createElement("img",{ref:ht,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),r.a.createElement(ae.a,{close:!0,data:Yt,type:Yt!=null&&Yt.length?$t:"",style:Object(b.a)({},st),onClose:function(){return Zt("")}}))}},"9OqN":function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("OLod"))})(this,function(N){return N.mode.CTR=function(){var g=N.lib.BlockCipherMode.extend(),w=g.Encryptor=g.extend({processBlock:function(k,b){var m=this._cipher,T=m.blockSize,_=this._iv,t=this._counter;_&&(t=this._counter=_.slice(0),this._iv=void 0);var h=t.slice(0);m.encryptBlock(h,0),t[T-1]=t[T-1]+1|0;for(var r=0;r<T;r++)k[b+r]^=h[r]}});return g.Decryptor=w,g}(),N.mode.CTR})},"9VGf":function(B,Q,D){"use strict";D.d(Q,"a",function(){return w});var N=D("q1tI"),g=D.n(N);function w(k,b){var m=Object(N.useRef)();Object(N.useEffect)(function(){m.current=k}),Object(N.useEffect)(function(){function T(){m.current()}if(b!==null){var _=setInterval(T,b);return function(){return clearInterval(_)}}},[b])}},ALsQ:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("OLod"))})(this,function(N){return N.mode.CFB=function(){var g=N.lib.BlockCipherMode.extend();g.Encryptor=g.extend({processBlock:function(k,b){var m=this._cipher,T=m.blockSize;w.call(this,k,b,T,m),this._prevBlock=k.slice(b,b+T)}}),g.Decryptor=g.extend({processBlock:function(k,b){var m=this._cipher,T=m.blockSize,_=k.slice(b,b+T);w.call(this,k,b,T,m),this._prevBlock=_}});function w(k,b,m,T){var _,t=this._iv;t?(_=t.slice(0),this._iv=void 0):_=this._prevBlock,T.encryptBlock(_,0);for(var h=0;h<m;h++)k[b+h]^=_[h]}return g}(),N.mode.CFB})},B7Ph:function(B,Q,D){"use strict";D.d(Q,"a",function(){return oe});var N=D("5NDa"),g=D("5rEg"),w=D("sRBo"),k=D("kaz8"),b=D("5Dmo"),m=D("3S7+"),T=D("14J3"),_=D("BMrR"),t=D("7Kak"),h=D("9yH6"),r=D("+L6B"),c=D("2/Rp"),i=D("2qtc"),n=D("kLXV"),l=D("miYZ"),f=D("tsqr"),d=D("k1fw"),u=D("9og8"),o=D("tJVT"),s=D("oBTY"),E=D("DZo9"),v=D("8z0m"),p=D("WmNS"),I=D.n(p),R=D("q1tI"),y=D.n(R),x=D("Bvq2"),C=D.n(x),S=D("nj2k"),F=D.n(S),j=D("mxV5"),A=D.n(j),Y=D("KhGG"),z=D("ErOA"),O=D("7Cbv"),H=D("1vsH"),U=D("p5ED"),L=v.a.Dragger,K=function(be){for(var _e=function(q){return q&&q.substring(0,q.lastIndexOf("."))},fe=Object(s.a)(be),Re=0,Ce=[],ce=0;ce<fe.length;ce++){for(var te="",W=0;W<Ce.length;W++)if(_e(Ce[W][0].name)==_e(fe[ce].name)){Re=1,te=W;break}if(Re==1)Ce[te].push(fe[ce]),Re=0;else if(Re==0){var X=new Array;X.push(fe[ce]),Ce.push(X)}}var V=Ce.map(function(Z){if(Z[0].name.includes(".in"))return Z.length===2?Z:[Z[0],{}];if(Z[0].name.includes(".out"))return Z.length===2?Z.reverse():[{},Z[0]]});return V},ee=function(be){var _e=be.onClose,fe=be.onOK,Re=be.visible,Ce=be.wrapClassName,ce=be.rootIdentifier,te=be.multiple,W=te===void 0?!1:te,X=be.defaultMultipleValue,V=X===void 0?!0:X,Z=Object(R.useState)([]),q=Object(o.a)(Z,2),ie=q[0],ne=q[1],J=Object(R.useState)({}),$=Object(o.a)(J,2),le=$[0],he=$[1],Se=Object(R.useState)(!1),Ue=Object(o.a)(Se,2),Xe=Ue[0],$e=Ue[1],Ye=Object(R.useState)(!0),et=Object(o.a)(Ye,2),qe=et[0],Pe=et[1],Ie=Object(R.useState)(null),Ze=Object(o.a)(Ie,2),nt=Ze[0],ye=Ze[1],ue=Object(R.useRef)([]),pe=Object(R.useRef)(0),me=function(){_e()};Object(R.useEffect)(function(){Oe()},[]),Object(R.useEffect)(function(){Re&&(ue.current=[],pe.current=0,ne([]),Pe(V))},[Re]);var Oe=function(){var at=Object(u.a)(I.a.mark(function it(){var st,Ct;return I.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:return ht.prev=0,ht.next=3,Object(z.a)("/api/buckets/get_upload_token_for_big_files",{method:"get"});case 3:st=ht.sent,(st==null?void 0:st.status)===0&&(st!=null&&st.is_oss?(Ct=JSON.parse(Object(Y.a)(st.data)),he(Ct),ye(!1)):ye(!0)),ht.next=9;break;case 7:ht.prev=7,ht.t0=ht.catch(0);case 9:case"end":return ht.stop()}},it,null,[[0,7]])}));return function(){return at.apply(this,arguments)}}(),ve=function(it){return it&&it.substring(0,it.lastIndexOf("."))},xe=function(it){var st,Ct,yt=ve((st=it[0])===null||st===void 0?void 0:st.name)||ve((Ct=it[1])===null||Ct===void 0?void 0:Ct.name),ht=ie.filter(function(Ut){return ve(Ut.name)!==yt});ue.current=Object(s.a)(ht),ne(Object(s.a)(ht))},Ae=function(it){if(!qe){var st=new FormData;st.append("file",it.file);var Ct=Object(z.a)("/api/attachments/get_file_content.json",{method:"post",body:st},!0);Ct.then(function(wt){if(wt.status===0){pe.current=pe.current+1;var $t=ue.current.map(function(Tt){if(Tt.name===it.name){var _t,Et=Object(d.a)({},Tt);return it!=null&&(_t=it.name)!==null&&_t!==void 0&&_t.includes(".in")?Et.input=wt==null?void 0:wt.content:Et.output=wt==null?void 0:wt.content,Et}return Tt});if(ue.current=Object(s.a)($t),ne(Object(s.a)($t)),pe.current>0&&pe.current===ie.length){$e(!1);var Dt=K($t);Dt=Dt.filter(function(Tt){var _t,Et;return!!((_t=Tt[0])!==null&&_t!==void 0&&_t.name&&(Et=Tt[1])!==null&&Et!==void 0&&Et.name)}),Dt=Dt.map(function(Tt){return Object(d.a)(Object(d.a)(Object(d.a)({},Tt[0]),Tt[1]),{},{is_file:!1})}),fe(Dt),_e()}}else $e(!1),_e()});return}if(nt){var yt=new FormData;yt.append("file",it.file),yt.append("identifier",ce);var ht=Object(z.a)("/api/attachments.json",{method:"post",body:yt},!0);ht.then(function(wt){if(wt.filename){pe.current=pe.current+1;var $t=ue.current.map(function(Tt){if(Tt.name===(wt==null?void 0:wt.filename)){var _t,Et=Object(d.a)(Object(d.a)({},Tt),{},{is_oss:!nt});return wt!=null&&(_t=wt.filename)!==null&&_t!==void 0&&_t.includes(".in")?(Et.in_object_key=wt==null?void 0:wt.object,Et.in_object_size=wt==null?void 0:wt.size,Et.input=wt==null?void 0:wt.filename,Et.in_file=it):(Et.out_object_key=wt==null?void 0:wt.object,Et.out_object_size=wt==null?void 0:wt.size,Et.output=wt==null?void 0:wt.filename,Et.out_file=it),Et}return Tt});if(ue.current=Object(s.a)($t),ne(Object(s.a)($t)),pe.current>0&&pe.current===ie.length){$e(!1);var Dt=K($t);Dt=Dt.filter(function(Tt){var _t,Et;return!!((_t=Tt[0])!==null&&_t!==void 0&&_t.name&&(Et=Tt[1])!==null&&Et!==void 0&&Et.name)}),Dt=Dt.map(function(Tt){return Object(d.a)(Object(d.a)(Object(d.a)({},Tt[0]),Tt[1]),{},{is_file:!0})}),fe(Dt),_e()}}else $e(!1),_e()});return}var Ut=new A.a({endpoint:le.end_point,region:le.region,accessKeyId:le.access_key_id,accessKeySecret:le.access_key_secret,bucket:le.bucket,stsToken:le.security_token}),kt=it.name,Yt={container_type:"TestSet",file_name:kt},Zt=Object(O.a)(),Mt="testsets/".concat(ce,"/").concat(Zt).concat(kt.indexOf(".")>-1?"."+kt.split(".").pop():"");ce===null&&(Mt="testsets/".concat(Zt).concat(kt.indexOf(".")>-1?"."+kt.split(".").pop():"")),Ut.multipartUpload(Mt,new Blob([it.file],{type:it.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:kt+""},url:le==null?void 0:le.callback_url,host:le==null?void 0:le.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(z.e)(Yt)}}).then(function(wt){if(wt.data.status===0){pe.current=pe.current+1;var $t=ue.current.map(function(Tt){var _t,Et;if(Tt.name===((_t=wt.data)===null||_t===void 0||((Et=_t.data)===null||Et===void 0)?void 0:Et.file_name)){var Bt,Dr,pt,St=Object(d.a)(Object(d.a)({},Tt),{},{is_oss:!nt});if((Bt=wt.data)!==null&&Bt!==void 0&&(Dr=Bt.data)!==null&&Dr!==void 0&&(pt=Dr.file_name)!==null&&pt!==void 0&&pt.includes(".in")){var dt,Ht,Gt,vt,xt,Kt;St.in_object_key=(dt=wt.data)===null||dt===void 0||((Ht=dt.data)===null||Ht===void 0)?void 0:Ht.object,St.in_object_size=(Gt=wt.data)===null||Gt===void 0||((vt=Gt.data)===null||vt===void 0)?void 0:vt.size,St.input=(xt=wt.data)===null||xt===void 0||((Kt=xt.data)===null||Kt===void 0)?void 0:Kt.file_name,St.in_file=it}else{var Ar,qt,ut,Lt,Hr,Yr;St.out_object_key=(Ar=wt.data)===null||Ar===void 0||((qt=Ar.data)===null||qt===void 0)?void 0:qt.object,St.out_object_size=(ut=wt.data)===null||ut===void 0||((Lt=ut.data)===null||Lt===void 0)?void 0:Lt.size,St.output=(Hr=wt.data)===null||Hr===void 0||((Yr=Hr.data)===null||Yr===void 0)?void 0:Yr.file_name,St.out_file=it}return St}return Tt});if(ue.current=Object(s.a)($t),ne(Object(s.a)($t)),pe.current>0&&pe.current===ie.length){$e(!1);var Dt=K($t);Dt=Dt.filter(function(Tt){var _t,Et;return!!((_t=Tt[0])!==null&&_t!==void 0&&_t.name&&(Et=Tt[1])!==null&&Et!==void 0&&Et.name)}),Dt=Dt.map(function(Tt){return Object(d.a)(Object(d.a)(Object(d.a)({},Tt[0]),Tt[1]),{},{is_file:!0})}),fe(Dt),_e()}}})},Le=function(it){return new Promise(function(st,Ct){for(var yt=0,ht=[],Ut=function(Zt){it[Zt].file.slice(0,1).arrayBuffer().then(function(){yt++,yt===it.length&&(ht.length?(f.b.warn("".concat(ht.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Ct()):st(it))}).catch(function(Mt){console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",Mt),yt++,ht.push(it[Zt].name),yt===it.length&&(ht.length?(f.b.warn("".concat(ht.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Ct()):st(it))})},kt=0;kt<it.length;kt++)Ut(kt)})},Me=function(){var at=Object(u.a)(I.a.mark(function it(){var st;return I.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:if(!(ie.length===0)){yt.next=3;break}return f.b.warn("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6"),yt.abrupt("return");case 3:return yt.next=5,Le(ie);case 5:if($e(!0),st=K(ie),!st.some(function(ht){var Ut,kt;return!((Ut=ht[0])!==null&&Ut!==void 0&&Ut.name&&(kt=ht[1])!==null&&kt!==void 0&&kt.name)})){yt.next=10;break}return n.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u4E0A\u4F20\u7684\u6D4B\u8BD5\u7528\u4F8B\u4E2D\u5B58\u5728\u672A\u914D\u5BF9\u7684\u6587\u4EF6\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4EC5\u4FDD\u5B58\u5DF2\u914D\u5BF9\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF1F",onOk:function(){var ht=Object(u.a)(I.a.mark(function kt(){return I.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:ie.map(function(){var Mt=Object(u.a)(I.a.mark(function wt($t){return I.a.wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:Ae($t);case 1:case"end":return Tt.stop()}},wt)}));return function(wt){return Mt.apply(this,arguments)}}());case 1:case"end":return Zt.stop()}},kt)}));function Ut(){return ht.apply(this,arguments)}return Ut}(),onCancel:function(){$e(!1)}}),yt.abrupt("return");case 10:ie.map(function(){var ht=Object(u.a)(I.a.mark(function Ut(kt){return I.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:Ae(kt);case 1:case"end":return Zt.stop()}},Ut)}));return function(Ut){return ht.apply(this,arguments)}}());case 11:case"end":return yt.stop()}},it)}));return function(){return at.apply(this,arguments)}}(),We={name:"file",fileList:ie,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:function(it){if(ie!=null&&ie.some(function(Ct){return Ct.name===it.name}))return f.b.info("".concat(it.name,"\u6587\u4EF6\u5DF2\u5B58\u5728")),!1;if(it.size/1024/1024>100)return f.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(it.name))return f.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var st={name:it.name,uid:it.uid,file:it,percent:0};return ie.push(st),ue.current=Object(s.a)(ie),ne(Object(s.a)(ie)),!1}},rt=K(ie);return console.log(ie,rt,"fileList"),y.a.createElement(n.a,{visible:Re,wrapClassName:Ce,onOk:Me,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:Xe},onCancel:me,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},y.a.createElement("div",{className:C.a.wrap},ie.length?y.a.createElement("div",null,y.a.createElement(_.a,{justify:"space-between",align:"middle",className:"mb20"},y.a.createElement("div",{style:{visibility:W?"visible":"hidden"}},"\u6D4B\u8BD5\u7528\u4F8B\u7C7B\u578B\uFF1A",y.a.createElement(h.a.Group,{className:"ml10",value:qe,onChange:function(it){return Pe(it.target.value)}},y.a.createElement(h.a,{value:!1},"\u6587\u672C"),y.a.createElement(h.a,{value:!0},"\u6587\u4EF6"))),y.a.createElement(v.a,We,y.a.createElement(c.a,{className:C.a.btnS},"\u4E0A\u4F20\u6587\u4EF6"))),y.a.createElement(oe,{data:rt,onRemove:xe})):y.a.createElement("div",{className:C.a.noData},y.a.createElement("img",{src:F.a,alt:""}),y.a.createElement(v.a,We,y.a.createElement(c.a,{className:C.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),y.a.createElement("div",{className:C.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",y.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",y.a.createElement("br",null),"2\u3001\u4E0A\u4F20\u7684\u6587\u4EF6\u7F16\u7801\u4EC5\u652F\u6301UTF-8\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6587\u672C\u4E71\u7801\u3002",y.a.createElement("br",null),"3\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",y.a.createElement("br",null),"4\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002",y.a.createElement("br",null))))},oe=function(be){var _e=be.data,fe=_e===void 0?[]:_e,Re=be.onRemove,Ce=be.width,ce=Ce===void 0?"auto":Ce,te=be.showScore,W=te===void 0?!1:te,X=be.disabled,V=X===void 0?!1:X,Z=be.inputChange,q=be.onEvaluatingChange,ie=be.showEvaluatingSetting,ne=ie===void 0?!1:ie,J={value:"",filename:"",dataUrl:""},$=Object(R.useState)(Object(d.a)({},J)),le=Object(o.a)($,2),he=le[0],Se=le[1],Ue=function(et){var qe=document.createElement("a");document.body.appendChild(qe);var Pe=URL.createObjectURL(et.file);qe.href=Pe,qe.download=et.name,qe.click(),URL.revokeObjectURL(Pe),document.body.removeChild(qe)},Xe=function(et,qe){Object(H.y)(et,qe)},$e=function(et,qe){n.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:y.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){Re(et,qe)},onCancel:function(){}})};return fe.length?y.a.createElement("div",{style:{width:ce}},y.a.createElement("div",{className:C.a.head},ne&&y.a.createElement("div",{style:{width:"10%"}},"\u9690\u85CF",y.a.createElement(m.a,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},y.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),y.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),y.a.createElement("div",{style:{width:W?"25%":"35%",padding:"0 12px"}},"\u8F93\u5165"),y.a.createElement("div",{style:{width:W?"25%":"35%",padding:"0 12px"}},"\u8F93\u51FA"),W&&y.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),ne&&y.a.createElement("div",{style:{width:"20%"}},"\u9884\u671F\u8F93\u51FA",y.a.createElement(m.a,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},y.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ne&&y.a.createElement("div",{style:{width:"20%"}},"\u7279\u6B8A\u5224\u5B9A",y.a.createElement(m.a,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},y.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),y.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),fe.map(function(Ye,et){var qe,Pe,Ie,Ze;return y.a.createElement("div",{key:et,className:C.a.list},ne&&y.a.createElement("div",{style:{width:"10%"}},y.a.createElement(k.a,{checked:!!Ye.hidden,onChange:function(ye){q(ye.target.checked?1:0,et,"hidden")}})),y.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",et+1),y.a.createElement("div",{className:C.a.info,style:{width:W?"25%":"35%"}},y.a.createElement("span",{title:Ye.input||((qe=Ye[0])===null||qe===void 0?void 0:qe.name),onClick:Object(u.a)(I.a.mark(function nt(){var ye,ue;return I.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:if(Ye.input?Ye.input_file_url?ye=Ye.input_file_url:ye=Ye.in_file:ye=Ye[0],!(typeof ye=="string")){me.next=14;break}return me.next=4,fetch(ye,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return ue=me.sent,me.t0=Se,me.next=8,ue.text();case 8:me.t1=me.sent,me.t2=ye,me.t3={value:me.t1,filename:"",dataUrl:me.t2},(0,me.t0)(me.t3),me.next=18;break;case 14:return me.next=16,Object(H.G)(ye.file);case 16:ue=me.sent,Se({value:ue.text,filename:ye.name,dataUrl:ue.link});case 18:case"end":return me.stop()}},nt)}))},Ye.input||((Pe=Ye[0])===null||Pe===void 0?void 0:Pe.name))),y.a.createElement("div",{className:C.a.info,style:{width:W?"25%":"35%"}},y.a.createElement("span",{title:Ye.output||((Ie=Ye[1])===null||Ie===void 0?void 0:Ie.name),onClick:Object(u.a)(I.a.mark(function nt(){var ye,ue;return I.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:if(Ye.input?Ye.output_file_url?ye=Ye.output_file_url:ye=Ye.out_file:ye=Ye[1],!(typeof ye=="string")){me.next=14;break}return me.next=4,fetch(ye,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return ue=me.sent,me.t0=Se,me.next=8,ue.text();case 8:me.t1=me.sent,me.t2=ye,me.t3={value:me.t1,filename:"",dataUrl:me.t2},(0,me.t0)(me.t3),me.next=18;break;case 14:return me.next=16,Object(H.G)(ye.file);case 16:ue=me.sent,Se({value:ue.text,filename:ye.name,dataUrl:ue.link});case 18:case"end":return me.stop()}},nt)}))},Ye.output||((Ze=Ye[1])===null||Ze===void 0?void 0:Ze.name))),W&&y.a.createElement("div",{style:{width:"20%"}},y.a.createElement(g.a,{disabled:V,style:{width:"70%"},onChange:function(ye){return Z(ye,et)},value:Ye.score}),y.a.createElement("span",null,"\xA0%")),ne&&y.a.createElement("div",{style:{width:"20%"}},y.a.createElement(k.a,{checked:Ye.is_invisible||!1,onChange:function(ye){q(ye.target.checked,et,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),ne&&y.a.createElement("div",{style:{width:"20%"}},y.a.createElement(k.a,{checked:Ye.last_match_rule||!1,onChange:function(ye){q(ye.target.checked,et,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),y.a.createElement("div",{onClick:function(){return $e(Ye,et)},style:{width:"10%"}},y.a.createElement("span",{className:C.a.del},"\u5220\u9664")))}),y.a.createElement(U.a,{close:!0,data:he.dataUrl,filename:he.filename,type:he.dataUrl.length?"txt":"",onClose:function(){return Se(Object(d.a)({},J))},monacoEditor:{value:he.value,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):y.a.createElement(y.a.Fragment,null)};Q.b=ee},BU3w:function(B,Q,D){"use strict";D.d(Q,"a",function(){return m});var N=D("MNnm"),g="rc-util-key";function w(T){if(T.attachTo)return T.attachTo;var _=document.querySelector("head");return _||document.body}function k(T){var _,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(N.a)())return null;var h=document.createElement("style");if((_=t.csp)===null||_===void 0?void 0:_.nonce){var r;h.nonce=(r=t.csp)===null||r===void 0?void 0:r.nonce}h.innerHTML=T;var c=w(t),i=c.firstChild;return t.prepend&&c.prepend?c.prepend(h):t.prepend&&i?c.insertBefore(h,i):c.appendChild(h),h}var b=new Map;function m(T,_){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h=w(t);if(!b.has(h)){var r=k("",t),c=r.parentNode;b.set(h,c),c.removeChild(r)}var i=Array.from(b.get(h).children).find(function(u){return u.tagName==="STYLE"&&u[g]===_});if(i){var n,l;if(((n=t.csp)===null||n===void 0?void 0:n.nonce)&&i.nonce!==((l=t.csp)===null||l===void 0?void 0:l.nonce)){var f;i.nonce=(f=t.csp)===null||f===void 0?void 0:f.nonce}return i.innerHTML!==T&&(i.innerHTML=T),i}var d=k(T,t);return d[g]=_,d}},Bd2K:function(B,Q,D){(function(N){N(D("VrN/"),D("osHv"))})(function(N){N.defineOption("autoCloseTags",!1,function(t,h,r){if(r!=N.Init&&r&&t.removeKeyMap("autoCloseTags"),!h)return;var c={name:"autoCloseTags"};(typeof h!="object"||h.whenClosing!==!1)&&(c["'/'"]=function(i){return m(i)}),(typeof h!="object"||h.whenOpening!==!1)&&(c["'>'"]=function(i){return k(i)}),t.addKeyMap(c)});var g=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],w=["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 k(t){if(t.getOption("disableInput"))return N.Pass;for(var h=t.listSelections(),r=[],c=t.getOption("autoCloseTags"),i=0;i<h.length;i++){if(!h[i].empty())return N.Pass;var n=h[i].head,l=t.getTokenAt(n),f=N.innerMode(t.getMode(),l.state),d=f.state,u=f.mode.xmlCurrentTag&&f.mode.xmlCurrentTag(d),o=u&&u.name;if(!o)return N.Pass;var s=f.mode.configuration=="html",E=typeof c=="object"&&c.dontCloseTags||s&&g,v=typeof c=="object"&&c.indentTags||s&&w;l.end>n.ch&&(o=o.slice(0,o.length-l.end+n.ch));var p=o.toLowerCase();if(!o||l.type=="string"&&(l.end!=n.ch||!/[\"\']/.test(l.string.charAt(l.string.length-1))||l.string.length==1)||l.type=="tag"&&u.close||l.string.indexOf("/")==n.ch-l.start-1||E&&T(E,p)>-1||_(t,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(d)||[],o,n,!0))return N.Pass;var I=typeof c=="object"&&c.emptyTags;if(I&&T(I,o)>-1){r[i]={text:"/>",newPos:N.Pos(n.line,n.ch+2)};continue}var R=v&&T(v,p)>-1;r[i]={indent:R,text:">"+(R?`
|
|
|
|
|
|
`:"")+"</"+o+">",newPos:R?N.Pos(n.line+1,0):N.Pos(n.line,n.ch+1)}}for(var y=typeof c=="object"&&c.dontIndentOnAutoClose,i=h.length-1;i>=0;i--){var x=r[i];t.replaceRange(x.text,h[i].head,h[i].anchor,"+insert");var C=t.listSelections().slice(0);C[i]={head:x.newPos,anchor:x.newPos},t.setSelections(C),!y&&x.indent&&(t.indentLine(x.newPos.line,null,!0),t.indentLine(x.newPos.line+1,null,!0))}}function b(t,h){for(var r=t.listSelections(),c=[],i=h?"/":"</",n=t.getOption("autoCloseTags"),l=typeof n=="object"&&n.dontIndentOnSlash,f=0;f<r.length;f++){if(!r[f].empty())return N.Pass;var d=r[f].head,u=t.getTokenAt(d),o=N.innerMode(t.getMode(),u.state),s=o.state;if(h&&(u.type=="string"||u.string.charAt(0)!="<"||u.start!=d.ch-1))return N.Pass;var E,v=o.mode.name!="xml"&&t.getMode().name=="htmlmixed";if(v&&o.mode.name=="javascript")E=i+"script";else if(v&&o.mode.name=="css")E=i+"style";else{var p=o.mode.xmlCurrentContext&&o.mode.xmlCurrentContext(s);if(!p||p.length&&_(t,p,p[p.length-1],d))return N.Pass;E=i+p[p.length-1]}t.getLine(d.line).charAt(u.end)!=">"&&(E+=">"),c[f]=E}if(t.replaceSelections(c),r=t.listSelections(),!l)for(var f=0;f<r.length;f++)(f==r.length-1||r[f].head.line<r[f+1].head.line)&&t.indentLine(r[f].head.line)}function m(t){return t.getOption("disableInput")?N.Pass:b(t,!0)}N.commands.closeTag=function(t){return b(t)};function T(t,h){if(t.indexOf)return t.indexOf(h);for(var r=0,c=t.length;r<c;++r)if(t[r]==h)return r;return-1}function _(t,h,r,c,i){if(!N.scanForClosingTag)return!1;var n=Math.min(t.lastLine()+1,c.line+500),l=N.scanForClosingTag(t,c,null,n);if(!l||l.tag!=r)return!1;for(var f=i?1:0,d=h.length-1;d>=0&&h[d]==r;d--)++f;c=l.to;for(var d=1;d<f;d++){var u=N.scanForClosingTag(t,c,null,n);if(!u||u.tag!=r)return!1;c=u.to}return!0}})},BjJ7:function(B,Q,D){"use strict";D.d(Q,"d",function(){return g}),D.d(Q,"c",function(){return w}),D.d(Q,"e",function(){return k}),D.d(Q,"b",function(){return b}),D.d(Q,"a",function(){return T});var N=D("m3rI");function g(_){var t=!0;if(_.length>0){for(var h=0;h<_.length;h++)if(_[h].compile_success==0||!_[h].compile_success){t=!1;break}}else t=!1;return t}function w(_){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",h=[],r=0;r<_.length;r++){var c=_[r],i=t?"".concat(t,"/").concat(c.name):"".concat(c.name);h.push({title:c.name,isLeaf:!(c.type==="tree"),key:i})}return h}function k(_,t,h){for(var r=0;r<_.length;r++){var c=_[r];if(c.key===t){c.children=h;break}c.children&&k(c.children,t,h)}return _}function b(_,t,h){var r;return function(){var c=this,i=arguments,n=function(){r=null,h||_.apply(c,i)},l=h&&!r;clearTimeout(r),r=setTimeout(n,t),l&&_.apply(c,i)}}var m=!0,T=N.a.API_SERVER},Bvq2:function(B,Q,D){B.exports={wrap:"wrap___2zRY4",colorBlue:"colorBlue___XalpT",repeatedName:"repeatedName___2Tfh4",text:"text___1sYHg",noData:"noData___3pdB4",btn:"btn___3WWjB",btnS:"btnS___2M_9t",head:"head____NWmz",list:"list___2fE4M",del:"del___2BO6Y",info:"info___3GJ70"}},"C+DQ":function(B,Q,D){},"C/vA":function(B,Q,D){"use strict";D.d(Q,"a",function(){return N});function N(g){const w=this;let k=!1,b;return function(){return k||(k=!0,b=g.apply(w,arguments)),b}}},"Cg/j":function(B,Q,D){"use strict";D.d(Q,"b",function(){return N}),D.d(Q,"a",function(){return g}),D.d(Q,"c",function(){return k}),D.d(Q,"d",function(){return b});var N;(function(m){m.serviceIds=new Map,m.DI_TARGET="$di$target",m.DI_DEPENDENCIES="$di$dependencies";function T(_){return _[m.DI_DEPENDENCIES]||[]}m.getServiceDependencies=T})(N||(N={}));const g=k("instantiationService");function w(m,T,_,t){T[N.DI_TARGET]===T?T[N.DI_DEPENDENCIES].push({id:m,index:_,optional:t}):(T[N.DI_DEPENDENCIES]=[{id:m,index:_,optional:t}],T[N.DI_TARGET]=T)}function k(m){if(N.serviceIds.has(m))return N.serviceIds.get(m);const T=function(_,t,h){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");w(T,_,h,!1)};return T.toString=()=>m,N.serviceIds.set(m,T),T}function b(m){return function(T,_,t){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");w(m,T,t,!0)}}},CrYA:function(B,Q,D){var N=D("MFOe"),g=N.Global;B.exports={name:"sessionStorage",read:k,write:b,each:m,remove:T,clearAll:_};function w(){return g.sessionStorage}function k(t){return w().getItem(t)}function b(t,h){return w().setItem(t,h)}function m(t){for(var h=w().length-1;h>=0;h--){var r=w().key(h);t(k(r),r)}}function T(t){return w().removeItem(t)}function _(){return w().clear()}},DlQD:function(B,Q,D){(function(N,g){B.exports=g()})(this,function(){"use strict";function N(pe,me){for(var Oe=0;Oe<me.length;Oe++){var ve=me[Oe];ve.enumerable=ve.enumerable||!1,ve.configurable=!0,"value"in ve&&(ve.writable=!0),Object.defineProperty(pe,ve.key,ve)}}function g(pe,me,Oe){return me&&N(pe.prototype,me),Oe&&N(pe,Oe),pe}function w(pe,me){if(!pe)return;if(typeof pe=="string")return k(pe,me);var Oe=Object.prototype.toString.call(pe).slice(8,-1);if(Oe==="Object"&&pe.constructor&&(Oe=pe.constructor.name),Oe==="Map"||Oe==="Set")return Array.from(pe);if(Oe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oe))return k(pe,me)}function k(pe,me){(me==null||me>pe.length)&&(me=pe.length);for(var Oe=0,ve=new Array(me);Oe<me;Oe++)ve[Oe]=pe[Oe];return ve}function b(pe,me){var Oe;if(typeof Symbol=="undefined"||pe[Symbol.iterator]==null){if(Array.isArray(pe)||(Oe=w(pe))||me&&pe&&typeof pe.length=="number"){Oe&&(pe=Oe);var ve=0;return function(){return ve>=pe.length?{done:!0}:{done:!1,value:pe[ve++]}}}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 Oe=pe[Symbol.iterator](),Oe.next.bind(Oe)}function m(pe,me){return me={exports:{}},pe(me,me.exports),me.exports}var T=m(function(pe){function me(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function Oe(ve){pe.exports.defaults=ve}pe.exports={defaults:me(),getDefaults:me,changeDefaults:Oe}}),_=T.defaults,t=T.getDefaults,h=T.changeDefaults,r=/[&<>"']/,c=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,n=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},f=function(me){return l[me]};function d(pe,me){if(me){if(r.test(pe))return pe.replace(c,f)}else if(i.test(pe))return pe.replace(n,f);return pe}var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function o(pe){return pe.replace(u,function(me,Oe){return Oe=Oe.toLowerCase(),Oe==="colon"?":":Oe.charAt(0)==="#"?Oe.charAt(1)==="x"?String.fromCharCode(parseInt(Oe.substring(2),16)):String.fromCharCode(+Oe.substring(1)):""})}var s=/(^|[^\[])\^/g;function E(pe,me){pe=pe.source||pe,me=me||"";var Oe={replace:function(xe,Ae){return Ae=Ae.source||Ae,Ae=Ae.replace(s,"$1"),pe=pe.replace(xe,Ae),Oe},getRegex:function(){return new RegExp(pe,me)}};return Oe}var v=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function I(pe,me,Oe){if(pe){var ve;try{ve=decodeURIComponent(o(Oe)).replace(v,"").toLowerCase()}catch(xe){return null}if(ve.indexOf("javascript:")===0||ve.indexOf("vbscript:")===0||ve.indexOf("data:")===0)return null}me&&!p.test(Oe)&&(Oe=S(me,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(xe){return null}return Oe}var R={},y=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,C=/^([^:]+:\/*[^/]*)[\s\S]*$/;function S(pe,me){R[" "+pe]||(y.test(pe)?R[" "+pe]=pe+"/":R[" "+pe]=Y(pe,"/",!0)),pe=R[" "+pe];var Oe=pe.indexOf(":")===-1;return me.substring(0,2)==="//"?Oe?me:pe.replace(x,"$1")+me:me.charAt(0)==="/"?Oe?me:pe.replace(C,"$1")+me:pe+me}var F={exec:function(){}};function j(pe){for(var me=1,Oe,ve;me<arguments.length;me++){Oe=arguments[me];for(ve in Oe)Object.prototype.hasOwnProperty.call(Oe,ve)&&(pe[ve]=Oe[ve])}return pe}function A(pe,me){var Oe=pe.replace(/\|/g,function(Ae,Le,Me){for(var We=!1,rt=Le;--rt>=0&&Me[rt]==="\\";)We=!We;return We?"|":" |"}),ve=Oe.split(/ \|/),xe=0;if(ve.length>me)ve.splice(me);else for(;ve.length<me;)ve.push("");for(;xe<ve.length;xe++)ve[xe]=ve[xe].trim().replace(/\\\|/g,"|");return ve}function Y(pe,me,Oe){var ve=pe.length;if(ve===0)return"";for(var xe=0;xe<ve;){var Ae=pe.charAt(ve-xe-1);if(Ae===me&&!Oe)xe++;else if(Ae!==me&&Oe)xe++;else break}return pe.substr(0,ve-xe)}function z(pe,me){if(pe.indexOf(me[1])===-1)return-1;for(var Oe=pe.length,ve=0,xe=0;xe<Oe;xe++)if(pe[xe]==="\\")xe++;else if(pe[xe]===me[0])ve++;else if(pe[xe]===me[1]&&(ve--,ve<0))return xe;return-1}function O(pe){pe&&pe.sanitize&&!pe.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:d,unescape:o,edit:E,cleanUrl:I,resolveUrl:S,noopTest:F,merge:j,splitCells:A,rtrim:Y,findClosingBracket:z,checkSanitizeDeprecation:O},U=T.defaults,L=H.rtrim,K=H.splitCells,ee=H.escape,oe=H.findClosingBracket;function ae(pe,me,Oe){var ve=me.href,xe=me.title?ee(me.title):null,Ae=pe[1].replace(/\\([\[\]])/g,"$1");return pe[0].charAt(0)!=="!"?{type:"link",raw:Oe,href:ve,title:xe,text:Ae}:{type:"image",raw:Oe,href:ve,title:xe,text:ee(Ae)}}function be(pe,me){var Oe=pe.match(/^(\s+)(?:```)/);if(Oe===null)return me;var ve=Oe[1];return me.split(`
|
|
|
`).map(function(xe){var Ae=xe.match(/^\s+/);if(Ae===null)return xe;var Le=Ae[0];return Le.length>=ve.length?xe.slice(ve.length):xe}).join(`
|
|
|
`)}var _e=function(){function pe(Oe){this.options=Oe||U}var me=pe.prototype;return me.space=function(ve){var xe=this.rules.block.newline.exec(ve);if(xe)return xe[0].length>1?{type:"space",raw:xe[0]}:{raw:`
|
|
|
`}},me.code=function(ve,xe){var Ae=this.rules.block.code.exec(ve);if(Ae){var Le=xe[xe.length-1];if(Le&&Le.type==="paragraph")return{raw:Ae[0],text:Ae[0].trimRight()};var Me=Ae[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ae[0],codeBlockStyle:"indented",text:this.options.pedantic?Me:L(Me,`
|
|
|
`)}}},me.fences=function(ve){var xe=this.rules.block.fences.exec(ve);if(xe){var Ae=xe[0],Le=be(Ae,xe[3]||"");return{type:"code",raw:Ae,lang:xe[2]?xe[2].trim():xe[2],text:Le}}},me.heading=function(ve){var xe=this.rules.block.heading.exec(ve);if(xe)return{type:"heading",raw:xe[0],depth:xe[1].length,text:xe[2]}},me.nptable=function(ve){var xe=this.rules.block.nptable.exec(ve);if(xe){var Ae={type:"table",header:K(xe[1].replace(/^ *| *\| *$/g,"")),align:xe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:xe[3]?xe[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:xe[0]};if(Ae.header.length===Ae.align.length){var Le=Ae.align.length,Me;for(Me=0;Me<Le;Me++)/^ *-+: *$/.test(Ae.align[Me])?Ae.align[Me]="right":/^ *:-+: *$/.test(Ae.align[Me])?Ae.align[Me]="center":/^ *:-+ *$/.test(Ae.align[Me])?Ae.align[Me]="left":Ae.align[Me]=null;for(Le=Ae.cells.length,Me=0;Me<Le;Me++)Ae.cells[Me]=K(Ae.cells[Me],Ae.header.length);return Ae}}},me.hr=function(ve){var xe=this.rules.block.hr.exec(ve);if(xe)return{type:"hr",raw:xe[0]}},me.blockquote=function(ve){var xe=this.rules.block.blockquote.exec(ve);if(xe){var Ae=xe[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:xe[0],text:Ae}}},me.list=function(ve){var xe=this.rules.block.list.exec(ve);if(xe){for(var Ae=xe[0],Le=xe[2],Me=Le.length>1,We=Le[Le.length-1]===")",rt={type:"list",raw:Ae,ordered:Me,start:Me?+Le.slice(0,-1):"",loose:!1,items:[]},at=xe[0].match(this.rules.block.item),it=!1,st,Ct,yt,ht,Ut,kt,Yt,Zt=at.length,Mt=0;Mt<Zt;Mt++)st=at[Mt],Ae=st,Ct=st.length,st=st.replace(/^ *([*+-]|\d+[.)]) */,""),~st.indexOf(`
|
|
|
`)&&(Ct-=st.length,st=this.options.pedantic?st.replace(/^ {1,4}/gm,""):st.replace(new RegExp("^ {1,"+Ct+"}","gm"),"")),Mt!==Zt-1&&(yt=this.rules.block.bullet.exec(at[Mt+1])[0],(Me?yt.length===1||!We&&yt[yt.length-1]===")":yt.length>1||this.options.smartLists&&yt!==Le)&&(ht=at.slice(Mt+1).join(`
|
|
|
`),rt.raw=rt.raw.substring(0,rt.raw.length-ht.length),Mt=Zt-1)),Ut=it||/\n\n(?!\s*$)/.test(st),Mt!==Zt-1&&(it=st.charAt(st.length-1)===`
|
|
|
`,Ut||(Ut=it)),Ut&&(rt.loose=!0),kt=/^\[[ xX]\] /.test(st),Yt=void 0,kt&&(Yt=st[1]!==" ",st=st.replace(/^\[[ xX]\] +/,"")),rt.items.push({type:"list_item",raw:Ae,task:kt,checked:Yt,loose:Ut,text:st});return rt}},me.html=function(ve){var xe=this.rules.block.html.exec(ve);if(xe)return{type:this.options.sanitize?"paragraph":"html",raw:xe[0],pre:!this.options.sanitizer&&(xe[1]==="pre"||xe[1]==="script"||xe[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(xe[0]):ee(xe[0]):xe[0]}},me.def=function(ve){var xe=this.rules.block.def.exec(ve);if(xe){xe[3]&&(xe[3]=xe[3].substring(1,xe[3].length-1));var Ae=xe[1].toLowerCase().replace(/\s+/g," ");return{tag:Ae,raw:xe[0],href:xe[2],title:xe[3]}}},me.table=function(ve){var xe=this.rules.block.table.exec(ve);if(xe){var Ae={type:"table",header:K(xe[1].replace(/^ *| *\| *$/g,"")),align:xe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:xe[3]?xe[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(Ae.header.length===Ae.align.length){Ae.raw=xe[0];var Le=Ae.align.length,Me;for(Me=0;Me<Le;Me++)/^ *-+: *$/.test(Ae.align[Me])?Ae.align[Me]="right":/^ *:-+: *$/.test(Ae.align[Me])?Ae.align[Me]="center":/^ *:-+ *$/.test(Ae.align[Me])?Ae.align[Me]="left":Ae.align[Me]=null;for(Le=Ae.cells.length,Me=0;Me<Le;Me++)Ae.cells[Me]=K(Ae.cells[Me].replace(/^ *\| *| *\| *$/g,""),Ae.header.length);return Ae}}},me.lheading=function(ve){var xe=this.rules.block.lheading.exec(ve);if(xe)return{type:"heading",raw:xe[0],depth:xe[2].charAt(0)==="="?1:2,text:xe[1]}},me.paragraph=function(ve){var xe=this.rules.block.paragraph.exec(ve);if(xe)return{type:"paragraph",raw:xe[0],text:xe[1].charAt(xe[1].length-1)===`
|
|
|
`?xe[1].slice(0,-1):xe[1]}},me.text=function(ve,xe){var Ae=this.rules.block.text.exec(ve);if(Ae){var Le=xe[xe.length-1];return Le&&Le.type==="text"?{raw:Ae[0],text:Ae[0]}:{type:"text",raw:Ae[0],text:Ae[0]}}},me.escape=function(ve){var xe=this.rules.inline.escape.exec(ve);if(xe)return{type:"escape",raw:xe[0],text:ee(xe[1])}},me.tag=function(ve,xe,Ae){var Le=this.rules.inline.tag.exec(ve);if(Le)return!xe&&/^<a /i.test(Le[0])?xe=!0:xe&&/^<\/a>/i.test(Le[0])&&(xe=!1),!Ae&&/^<(pre|code|kbd|script)(\s|>)/i.test(Le[0])?Ae=!0:Ae&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Le[0])&&(Ae=!1),{type:this.options.sanitize?"text":"html",raw:Le[0],inLink:xe,inRawBlock:Ae,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):ee(Le[0]):Le[0]}},me.link=function(ve){var xe=this.rules.inline.link.exec(ve);if(xe){var Ae=oe(xe[2],"()");if(Ae>-1){var Le=xe[0].indexOf("!")===0?5:4,Me=Le+xe[1].length+Ae;xe[2]=xe[2].substring(0,Ae),xe[0]=xe[0].substring(0,Me).trim(),xe[3]=""}var We=xe[2],rt="";if(this.options.pedantic){var at=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(We);at?(We=at[1],rt=at[3]):rt=""}else rt=xe[3]?xe[3].slice(1,-1):"";We=We.trim().replace(/^<([\s\S]*)>$/,"$1");var it=ae(xe,{href:We&&We.replace(this.rules.inline._escapes,"$1"),title:rt&&rt.replace(this.rules.inline._escapes,"$1")},xe[0]);return it}},me.reflink=function(ve,xe){var Ae;if((Ae=this.rules.inline.reflink.exec(ve))||(Ae=this.rules.inline.nolink.exec(ve))){var Le=(Ae[2]||Ae[1]).replace(/\s+/g," ");if(Le=xe[Le.toLowerCase()],!Le||!Le.href){var Me=Ae[0].charAt(0);return{type:"text",raw:Me,text:Me}}var We=ae(Ae,Le,Ae[0]);return We}},me.strong=function(ve,xe,Ae){Ae===void 0&&(Ae="");var Le=this.rules.inline.strong.start.exec(ve);if(Le&&(!Le[1]||Le[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){xe=xe.slice(-1*ve.length);var Me=Le[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Me.lastIndex=0;for(var We;(Le=Me.exec(xe))!=null;)if(We=this.rules.inline.strong.middle.exec(xe.slice(0,Le.index+3)),We)return{type:"strong",raw:ve.slice(0,We[0].length),text:ve.slice(2,We[0].length-2)}}},me.em=function(ve,xe,Ae){Ae===void 0&&(Ae="");var Le=this.rules.inline.em.start.exec(ve);if(Le&&(!Le[1]||Le[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){xe=xe.slice(-1*ve.length);var Me=Le[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Me.lastIndex=0;for(var We;(Le=Me.exec(xe))!=null;)if(We=this.rules.inline.em.middle.exec(xe.slice(0,Le.index+2)),We)return{type:"em",raw:ve.slice(0,We[0].length),text:ve.slice(1,We[0].length-1)}}},me.codespan=function(ve){var xe=this.rules.inline.code.exec(ve);if(xe){var Ae=xe[2].replace(/\n/g," "),Le=/[^ ]/.test(Ae),Me=Ae.startsWith(" ")&&Ae.endsWith(" ");return Le&&Me&&(Ae=Ae.substring(1,Ae.length-1)),Ae=ee(Ae,!0),{type:"codespan",raw:xe[0],text:Ae}}},me.br=function(ve){var xe=this.rules.inline.br.exec(ve);if(xe)return{type:"br",raw:xe[0]}},me.del=function(ve){var xe=this.rules.inline.del.exec(ve);if(xe)return{type:"del",raw:xe[0],text:xe[1]}},me.autolink=function(ve,xe){var Ae=this.rules.inline.autolink.exec(ve);if(Ae){var Le,Me;return Ae[2]==="@"?(Le=ee(this.options.mangle?xe(Ae[1]):Ae[1]),Me="mailto:"+Le):(Le=ee(Ae[1]),Me=Le),{type:"link",raw:Ae[0],text:Le,href:Me,tokens:[{type:"text",raw:Le,text:Le}]}}},me.url=function(ve,xe){var Ae;if(Ae=this.rules.inline.url.exec(ve)){var Le,Me;if(Ae[2]==="@")Le=ee(this.options.mangle?xe(Ae[0]):Ae[0]),Me="mailto:"+Le;else{var We;do We=Ae[0],Ae[0]=this.rules.inline._backpedal.exec(Ae[0])[0];while(We!==Ae[0]);Le=ee(Ae[0]),Ae[1]==="www."?Me="http://"+Le:Me=Le}return{type:"link",raw:Ae[0],text:Le,href:Me,tokens:[{type:"text",raw:Le,text:Le}]}}},me.inlineText=function(ve,xe,Ae){var Le=this.rules.inline.text.exec(ve);if(Le){var Me;return xe?Me=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):ee(Le[0]):Le[0]:Me=ee(this.options.smartypants?Ae(Le[0]):Le[0]),{type:"text",raw:Le[0],text:Me}}},pe}(),fe=H.noopTest,Re=H.edit,Ce=H.merge,ce={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:fe,table:fe,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ce._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ce._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ce.def=Re(ce.def).replace("label",ce._label).replace("title",ce._title).getRegex(),ce.bullet=/(?:[*+-]|\d{1,9}[.)])/,ce.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ce.item=Re(ce.item,"gm").replace(/bull/g,ce.bullet).getRegex(),ce.list=Re(ce.list).replace(/bull/g,ce.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ce.def.source+")").getRegex(),ce._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",ce._comment=/<!--(?!-?>)[\s\S]*?-->/,ce.html=Re(ce.html,"i").replace("comment",ce._comment).replace("tag",ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ce.paragraph=Re(ce._paragraph).replace("hr",ce.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",ce._tag).getRegex(),ce.blockquote=Re(ce.blockquote).replace("paragraph",ce.paragraph).getRegex(),ce.normal=Ce({},ce),ce.gfm=Ce({},ce.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*|$)"}),ce.gfm.nptable=Re(ce.gfm.nptable).replace("hr",ce.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",ce._tag).getRegex(),ce.gfm.table=Re(ce.gfm.table).replace("hr",ce.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",ce._tag).getRegex(),ce.pedantic=Ce({},ce.normal,{html:Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ce._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:fe,paragraph:Re(ce.normal._paragraph).replace("hr",ce.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",ce.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var te={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:fe,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:fe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};te._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",te.punctuation=Re(te.punctuation).replace(/punctuation/g,te._punctuation).getRegex(),te._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",te._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",te.em.start=Re(te.em.start).replace(/punctuation/g,te._punctuation).getRegex(),te.em.middle=Re(te.em.middle).replace(/punctuation/g,te._punctuation).replace(/overlapSkip/g,te._overlapSkip).getRegex(),te.em.endAst=Re(te.em.endAst,"g").replace(/punctuation/g,te._punctuation).getRegex(),te.em.endUnd=Re(te.em.endUnd,"g").replace(/punctuation/g,te._punctuation).getRegex(),te.strong.start=Re(te.strong.start).replace(/punctuation/g,te._punctuation).getRegex(),te.strong.middle=Re(te.strong.middle).replace(/punctuation/g,te._punctuation).replace(/blockSkip/g,te._blockSkip).getRegex(),te.strong.endAst=Re(te.strong.endAst,"g").replace(/punctuation/g,te._punctuation).getRegex(),te.strong.endUnd=Re(te.strong.endUnd,"g").replace(/punctuation/g,te._punctuation).getRegex(),te.blockSkip=Re(te._blockSkip,"g").getRegex(),te.overlapSkip=Re(te._overlapSkip,"g").getRegex(),te._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,te._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,te._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])?)+(?![-_])/,te.autolink=Re(te.autolink).replace("scheme",te._scheme).replace("email",te._email).getRegex(),te._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,te.tag=Re(te.tag).replace("comment",ce._comment).replace("attribute",te._attribute).getRegex(),te._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,te._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,te._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,te.link=Re(te.link).replace("label",te._label).replace("href",te._href).replace("title",te._title).getRegex(),te.reflink=Re(te.reflink).replace("label",te._label).getRegex(),te.reflinkSearch=Re(te.reflinkSearch,"g").replace("reflink",te.reflink).replace("nolink",te.nolink).getRegex(),te.normal=Ce({},te),te.pedantic=Ce({},te.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:Re(/^!?\[(label)\]\((.*?)\)/).replace("label",te._label).getRegex(),reflink:Re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",te._label).getRegex()}),te.gfm=Ce({},te.normal,{escape:Re(te.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),te.gfm.url=Re(te.gfm.url,"i").replace("email",te.gfm._extended_email).getRegex(),te.breaks=Ce({},te.gfm,{br:Re(te.br).replace("{2,}","*").getRegex(),text:Re(te.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var W={block:ce,inline:te},X=T.defaults,V=W.block,Z=W.inline;function q(pe){return pe.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(pe){var me="",Oe,ve,xe=pe.length;for(Oe=0;Oe<xe;Oe++)ve=pe.charCodeAt(Oe),Math.random()>.5&&(ve="x"+ve.toString(16)),me+="&#"+ve+";";return me}var ne=function(){function pe(Oe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Oe||X,this.options.tokenizer=this.options.tokenizer||new _e,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ve={block:V.normal,inline:Z.normal};this.options.pedantic?(ve.block=V.pedantic,ve.inline=Z.pedantic):this.options.gfm&&(ve.block=V.gfm,this.options.breaks?ve.inline=Z.breaks:ve.inline=Z.gfm),this.tokenizer.rules=ve}pe.lex=function(ve,xe){var Ae=new pe(xe);return Ae.lex(ve)};var me=pe.prototype;return me.lex=function(ve){return ve=ve.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(ve,this.tokens,!0),this.inline(this.tokens),this.tokens},me.blockTokens=function(ve,xe,Ae){xe===void 0&&(xe=[]),Ae===void 0&&(Ae=!0),ve=ve.replace(/^ +$/gm,"");for(var Le,Me,We,rt;ve;){if(Le=this.tokenizer.space(ve)){ve=ve.substring(Le.raw.length),Le.type&&xe.push(Le);continue}if(Le=this.tokenizer.code(ve,xe)){ve=ve.substring(Le.raw.length),Le.type?xe.push(Le):(rt=xe[xe.length-1],rt.raw+=`
|
|
|
`+Le.raw,rt.text+=`
|
|
|
`+Le.text);continue}if(Le=this.tokenizer.fences(ve)){ve=ve.substring(Le.raw.length),xe.push(Le);continue}if(Le=this.tokenizer.heading(ve)){ve=ve.substring(Le.raw.length),xe.push(Le);continue}if(Le=this.tokenizer.nptable(ve)){ve=ve.substring(Le.raw.length),xe.push(Le);continue}if(Le=this.tokenizer.hr(ve)){ve=ve.substring(Le.raw.length),xe.push(Le);continue}if(Le=this.tokenizer.blockquote(ve)){ve=ve.substring(Le.raw.length),Le.tokens=this.blockTokens(Le.text,[],Ae),xe.push(Le);continue}if(Le=this.tokenizer.list(ve)){for(ve=ve.substring(Le.raw.length),We=Le.items.length,Me=0;Me<We;Me++)Le.items[Me].tokens=this.blockTokens(Le.items[Me].text,[],!1);xe.push(Le);continue}if(Le=this.tokenizer.html(ve)){ve=ve.substring(Le.raw.length),xe.push(Le);continue}if(Ae&&(Le=this.tokenizer.def(ve))){ve=ve.substring(Le.raw.length),this.tokens.links[Le.tag]||(this.tokens.links[Le.tag]={href:Le.href,title:Le.title});continue}if(Le=this.tokenizer.table(ve)){ve=ve.substring(Le.raw.length),xe.push(Le);continue}if(Le=this.tokenizer.lheading(ve)){ve=ve.substring(Le.raw.length),xe.push(Le);continue}if(Ae&&(Le=this.tokenizer.paragraph(ve))){ve=ve.substring(Le.raw.length),xe.push(Le);continue}if(Le=this.tokenizer.text(ve,xe)){ve=ve.substring(Le.raw.length),Le.type?xe.push(Le):(rt=xe[xe.length-1],rt.raw+=`
|
|
|
`+Le.raw,rt.text+=`
|
|
|
`+Le.text);continue}if(ve){var at="Infinite loop on byte: "+ve.charCodeAt(0);if(this.options.silent){console.error(at);break}else throw new Error(at)}}return xe},me.inline=function(ve){var xe,Ae,Le,Me,We,rt,at=ve.length;for(xe=0;xe<at;xe++){rt=ve[xe];switch(rt.type){case"paragraph":case"text":case"heading":{rt.tokens=[],this.inlineTokens(rt.text,rt.tokens);break}case"table":{for(rt.tokens={header:[],cells:[]},Me=rt.header.length,Ae=0;Ae<Me;Ae++)rt.tokens.header[Ae]=[],this.inlineTokens(rt.header[Ae],rt.tokens.header[Ae]);for(Me=rt.cells.length,Ae=0;Ae<Me;Ae++)for(We=rt.cells[Ae],rt.tokens.cells[Ae]=[],Le=0;Le<We.length;Le++)rt.tokens.cells[Ae][Le]=[],this.inlineTokens(We[Le],rt.tokens.cells[Ae][Le]);break}case"blockquote":{this.inline(rt.tokens);break}case"list":{for(Me=rt.items.length,Ae=0;Ae<Me;Ae++)this.inline(rt.items[Ae].tokens);break}}}return ve},me.inlineTokens=function(ve,xe,Ae,Le,Me){xe===void 0&&(xe=[]),Ae===void 0&&(Ae=!1),Le===void 0&&(Le=!1),Me===void 0&&(Me="");var We,rt=ve,at;if(this.tokens.links){var it=Object.keys(this.tokens.links);if(it.length>0)for(;(at=this.tokenizer.rules.inline.reflinkSearch.exec(rt))!=null;)it.includes(at[0].slice(at[0].lastIndexOf("[")+1,-1))&&(rt=rt.slice(0,at.index)+"["+"a".repeat(at[0].length-2)+"]"+rt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(at=this.tokenizer.rules.inline.blockSkip.exec(rt))!=null;)rt=rt.slice(0,at.index)+"["+"a".repeat(at[0].length-2)+"]"+rt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ve;){if(We=this.tokenizer.escape(ve)){ve=ve.substring(We.raw.length),xe.push(We);continue}if(We=this.tokenizer.tag(ve,Ae,Le)){ve=ve.substring(We.raw.length),Ae=We.inLink,Le=We.inRawBlock,xe.push(We);continue}if(We=this.tokenizer.link(ve)){ve=ve.substring(We.raw.length),We.type==="link"&&(We.tokens=this.inlineTokens(We.text,[],!0,Le)),xe.push(We);continue}if(We=this.tokenizer.reflink(ve,this.tokens.links)){ve=ve.substring(We.raw.length),We.type==="link"&&(We.tokens=this.inlineTokens(We.text,[],!0,Le)),xe.push(We);continue}if(We=this.tokenizer.strong(ve,rt,Me)){ve=ve.substring(We.raw.length),We.tokens=this.inlineTokens(We.text,[],Ae,Le),xe.push(We);continue}if(We=this.tokenizer.em(ve,rt,Me)){ve=ve.substring(We.raw.length),We.tokens=this.inlineTokens(We.text,[],Ae,Le),xe.push(We);continue}if(We=this.tokenizer.codespan(ve)){ve=ve.substring(We.raw.length),xe.push(We);continue}if(We=this.tokenizer.br(ve)){ve=ve.substring(We.raw.length),xe.push(We);continue}if(We=this.tokenizer.del(ve)){ve=ve.substring(We.raw.length),We.tokens=this.inlineTokens(We.text,[],Ae,Le),xe.push(We);continue}if(We=this.tokenizer.autolink(ve,ie)){ve=ve.substring(We.raw.length),xe.push(We);continue}if(!Ae&&(We=this.tokenizer.url(ve,ie))){ve=ve.substring(We.raw.length),xe.push(We);continue}if(We=this.tokenizer.inlineText(ve,Le,q)){ve=ve.substring(We.raw.length),Me=We.raw.slice(-1),xe.push(We);continue}if(ve){var st="Infinite loop on byte: "+ve.charCodeAt(0);if(this.options.silent){console.error(st);break}else throw new Error(st)}}return xe},g(pe,null,[{key:"rules",get:function(){return{block:V,inline:Z}}}]),pe}(),J=T.defaults,$=H.cleanUrl,le=H.escape,he=function(){function pe(Oe){this.options=Oe||J}var me=pe.prototype;return me.code=function(ve,xe,Ae){var Le=(xe||"").match(/\S*/)[0];if(this.options.highlight){var Me=this.options.highlight(ve,Le);Me!=null&&Me!==ve&&(Ae=!0,ve=Me)}return Le?'<pre><code class="'+this.options.langPrefix+le(Le,!0)+'">'+(Ae?ve:le(ve,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(Ae?ve:le(ve,!0))+`</code></pre>
|
|
|
`},me.blockquote=function(ve){return`<blockquote>
|
|
|
`+ve+`</blockquote>
|
|
|
`},me.html=function(ve){return ve},me.heading=function(ve,xe,Ae,Le){return this.options.headerIds?"<h"+xe+' id="'+this.options.headerPrefix+Le.slug(Ae)+'">'+ve+"</h"+xe+`>
|
|
|
`:"<h"+xe+">"+ve+"</h"+xe+`>
|
|
|
`},me.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},me.list=function(ve,xe,Ae){var Le=xe?"ol":"ul",Me=xe&&Ae!==1?' start="'+Ae+'"':"";return"<"+Le+Me+`>
|
|
|
`+ve+"</"+Le+`>
|
|
|
`},me.listitem=function(ve){return"<li>"+ve+`</li>
|
|
|
`},me.checkbox=function(ve){return"<input "+(ve?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},me.paragraph=function(ve){return"<p>"+ve+`</p>
|
|
|
`},me.table=function(ve,xe){return xe&&(xe="<tbody>"+xe+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+ve+`</thead>
|
|
|
`+xe+`</table>
|
|
|
`},me.tablerow=function(ve){return`<tr>
|
|
|
`+ve+`</tr>
|
|
|
`},me.tablecell=function(ve,xe){var Ae=xe.header?"th":"td",Le=xe.align?"<"+Ae+' align="'+xe.align+'">':"<"+Ae+">";return Le+ve+"</"+Ae+`>
|
|
|
`},me.strong=function(ve){return"<strong>"+ve+"</strong>"},me.em=function(ve){return"<em>"+ve+"</em>"},me.codespan=function(ve){return"<code>"+ve+"</code>"},me.br=function(){return this.options.xhtml?"<br/>":"<br>"},me.del=function(ve){return"<del>"+ve+"</del>"},me.link=function(ve,xe,Ae){if(ve=$(this.options.sanitize,this.options.baseUrl,ve),ve===null)return Ae;var Le='<a href="'+le(ve)+'"';return xe&&(Le+=' title="'+xe+'"'),Le+=">"+Ae+"</a>",Le},me.image=function(ve,xe,Ae){if(ve=$(this.options.sanitize,this.options.baseUrl,ve),ve===null)return Ae;var Le='<img src="'+ve+'" alt="'+Ae+'"';return xe&&(Le+=' title="'+xe+'"'),Le+=this.options.xhtml?"/>":">",Le},me.text=function(ve){return ve},pe}(),Se=function(){function pe(){}var me=pe.prototype;return me.strong=function(ve){return ve},me.em=function(ve){return ve},me.codespan=function(ve){return ve},me.del=function(ve){return ve},me.html=function(ve){return ve},me.text=function(ve){return ve},me.link=function(ve,xe,Ae){return""+Ae},me.image=function(ve,xe,Ae){return""+Ae},me.br=function(){return""},pe}(),Ue=function(){function pe(){this.seen={}}var me=pe.prototype;return me.slug=function(ve){var xe=ve.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(xe)){var Ae=xe;do this.seen[Ae]++,xe=Ae+"-"+this.seen[Ae];while(this.seen.hasOwnProperty(xe))}return this.seen[xe]=0,xe},pe}(),Xe=T.defaults,$e=H.unescape,Ye=function(){function pe(Oe){this.options=Oe||Xe,this.options.renderer=this.options.renderer||new he,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Se,this.slugger=new Ue}pe.parse=function(ve,xe){var Ae=new pe(xe);return Ae.parse(ve)};var me=pe.prototype;return me.parse=function(ve,xe){xe===void 0&&(xe=!0);var Ae="",Le,Me,We,rt,at,it,st,Ct,yt,ht,Ut,kt,Yt,Zt,Mt,wt,$t,Dt,Tt=ve.length;for(Le=0;Le<Tt;Le++){ht=ve[Le];switch(ht.type){case"space":continue;case"hr":{Ae+=this.renderer.hr();continue}case"heading":{Ae+=this.renderer.heading(this.parseInline(ht.tokens),ht.depth,$e(this.parseInline(ht.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ae+=this.renderer.code(ht.text,ht.lang,ht.escaped);continue}case"table":{for(Ct="",st="",rt=ht.header.length,Me=0;Me<rt;Me++)st+=this.renderer.tablecell(this.parseInline(ht.tokens.header[Me]),{header:!0,align:ht.align[Me]});for(Ct+=this.renderer.tablerow(st),yt="",rt=ht.cells.length,Me=0;Me<rt;Me++){for(it=ht.tokens.cells[Me],st="",at=it.length,We=0;We<at;We++)st+=this.renderer.tablecell(this.parseInline(it[We]),{header:!1,align:ht.align[We]});yt+=this.renderer.tablerow(st)}Ae+=this.renderer.table(Ct,yt);continue}case"blockquote":{yt=this.parse(ht.tokens),Ae+=this.renderer.blockquote(yt);continue}case"list":{for(Ut=ht.ordered,kt=ht.start,Yt=ht.loose,rt=ht.items.length,yt="",Me=0;Me<rt;Me++)Mt=ht.items[Me],wt=Mt.checked,$t=Mt.task,Zt="",Mt.task&&(Dt=this.renderer.checkbox(wt),Yt?Mt.tokens.length>0&&Mt.tokens[0].type==="text"?(Mt.tokens[0].text=Dt+" "+Mt.tokens[0].text,Mt.tokens[0].tokens&&Mt.tokens[0].tokens.length>0&&Mt.tokens[0].tokens[0].type==="text"&&(Mt.tokens[0].tokens[0].text=Dt+" "+Mt.tokens[0].tokens[0].text)):Mt.tokens.unshift({type:"text",text:Dt}):Zt+=Dt),Zt+=this.parse(Mt.tokens,Yt),yt+=this.renderer.listitem(Zt,$t,wt);Ae+=this.renderer.list(yt,Ut,kt);continue}case"html":{Ae+=this.renderer.html(ht.text);continue}case"paragraph":{Ae+=this.renderer.paragraph(this.parseInline(ht.tokens));continue}case"text":{for(yt=ht.tokens?this.parseInline(ht.tokens):ht.text;Le+1<Tt&&ve[Le+1].type==="text";)ht=ve[++Le],yt+=`
|
|
|
`+(ht.tokens?this.parseInline(ht.tokens):ht.text);Ae+=xe?this.renderer.paragraph(yt):yt;continue}default:{var _t='Token with "'+ht.type+'" type was not found.';if(this.options.silent){console.error(_t);return}else throw new Error(_t)}}}return Ae},me.parseInline=function(ve,xe){xe=xe||this.renderer;var Ae="",Le,Me,We=ve.length;for(Le=0;Le<We;Le++){Me=ve[Le];switch(Me.type){case"escape":{Ae+=xe.text(Me.text);break}case"html":{Ae+=xe.html(Me.text);break}case"link":{Ae+=xe.link(Me.href,Me.title,this.parseInline(Me.tokens,xe));break}case"image":{Ae+=xe.image(Me.href,Me.title,Me.text);break}case"strong":{Ae+=xe.strong(this.parseInline(Me.tokens,xe));break}case"em":{Ae+=xe.em(this.parseInline(Me.tokens,xe));break}case"codespan":{Ae+=xe.codespan(Me.text);break}case"br":{Ae+=xe.br();break}case"del":{Ae+=xe.del(this.parseInline(Me.tokens,xe));break}case"text":{Ae+=xe.text(Me.text);break}default:{var rt='Token with "'+Me.type+'" type was not found.';if(this.options.silent){console.error(rt);return}else throw new Error(rt)}}}return Ae},pe}(),et=H.merge,qe=H.checkSanitizeDeprecation,Pe=H.escape,Ie=T.getDefaults,Ze=T.changeDefaults,nt=T.defaults;function ye(pe,me,Oe){if(typeof pe=="undefined"||pe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof pe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(pe)+", string expected");if(typeof me=="function"&&(Oe=me,me=null),me=et({},ye.defaults,me||{}),qe(me),Oe){var ve=me.highlight,xe;try{xe=ne.lex(pe,me)}catch(We){return Oe(We)}var Ae=function(rt){var at;if(!rt)try{at=Ye.parse(xe,me)}catch(it){rt=it}return me.highlight=ve,rt?Oe(rt):Oe(null,at)};if(!ve||ve.length<3)return Ae();if(delete me.highlight,!xe.length)return Ae();var Le=0;ye.walkTokens(xe,function(We){We.type==="code"&&(Le++,setTimeout(function(){ve(We.text,We.lang,function(rt,at){if(rt)return Ae(rt);at!=null&&at!==We.text&&(We.text=at,We.escaped=!0),Le--,Le===0&&Ae()})},0))}),Le===0&&Ae();return}try{var Me=ne.lex(pe,me);return me.walkTokens&&ye.walkTokens(Me,me.walkTokens),Ye.parse(Me,me)}catch(We){if(We.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,me.silent)return"<p>An error occurred:</p><pre>"+Pe(We.message+"",!0)+"</pre>";throw We}}ye.options=ye.setOptions=function(pe){return et(ye.defaults,pe),Ze(ye.defaults),ye},ye.getDefaults=Ie,ye.defaults=nt,ye.use=function(pe){var me=et({},pe);if(pe.renderer&&function(){var ve=ye.defaults.renderer||new he,xe=function(Me){var We=ve[Me];ve[Me]=function(){for(var rt=arguments.length,at=new Array(rt),it=0;it<rt;it++)at[it]=arguments[it];var st=pe.renderer[Me].apply(ve,at);return st===!1&&(st=We.apply(ve,at)),st}};for(var Ae in pe.renderer)xe(Ae);me.renderer=ve}(),pe.tokenizer&&function(){var ve=ye.defaults.tokenizer||new _e,xe=function(Me){var We=ve[Me];ve[Me]=function(){for(var rt=arguments.length,at=new Array(rt),it=0;it<rt;it++)at[it]=arguments[it];var st=pe.tokenizer[Me].apply(ve,at);return st===!1&&(st=We.apply(ve,at)),st}};for(var Ae in pe.tokenizer)xe(Ae);me.tokenizer=ve}(),pe.walkTokens){var Oe=ye.defaults.walkTokens;me.walkTokens=function(ve){pe.walkTokens(ve),Oe&&Oe(ve)}}ye.setOptions(me)},ye.walkTokens=function(pe,me){for(var Oe=b(pe),ve;!(ve=Oe()).done;){var xe=ve.value;me(xe);switch(xe.type){case"table":{for(var Ae=b(xe.tokens.header),Le;!(Le=Ae()).done;){var Me=Le.value;ye.walkTokens(Me,me)}for(var We=b(xe.tokens.cells),rt;!(rt=We()).done;)for(var at=rt.value,it=b(at),st;!(st=it()).done;){var Ct=st.value;ye.walkTokens(Ct,me)}break}case"list":{ye.walkTokens(xe.items,me);break}default:xe.tokens&&ye.walkTokens(xe.tokens,me)}}},ye.Parser=Ye,ye.parser=Ye.parse,ye.Renderer=he,ye.TextRenderer=Se,ye.Lexer=ne,ye.lexer=ne.lex,ye.Tokenizer=_e,ye.Slugger=Ue,ye.parse=ye;var ue=ye;return ue})},"DlR+":function(B,Q,D){var N=D("MFOe"),g=N.Global,w=N.trim;B.exports={name:"cookieStorage",read:b,write:T,each:m,remove:_,clearAll:t};var k=g.document;function b(r){if(!r||!h(r))return null;var c="(?:^|.*;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(k.cookie.replace(new RegExp(c),"$1"))}function m(r){for(var c=k.cookie.split(/; ?/g),i=c.length-1;i>=0;i--){if(!w(c[i]))continue;var n=c[i].split("="),l=unescape(n[0]),f=unescape(n[1]);r(f,l)}}function T(r,c){if(!r)return;k.cookie=escape(r)+"="+escape(c)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function _(r){if(!r||!h(r))return;k.cookie=escape(r)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function t(){m(function(r,c){_(c)})}function h(r){return new RegExp("(?:^|;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(k.cookie)}},E4JC:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(N){return function(){var g=N,w=g.lib,k=w.StreamCipher,b=g.algo,m=[],T=[],_=[],t=b.Rabbit=k.extend({_doReset:function(){for(var r=this._key.words,c=this.cfg.iv,i=0;i<4;i++)r[i]=(r[i]<<8|r[i]>>>24)&16711935|(r[i]<<24|r[i]>>>8)&4278255360;var n=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],l=this._C=[r[2]<<16|r[2]>>>16,r[0]&4294901760|r[1]&65535,r[3]<<16|r[3]>>>16,r[1]&4294901760|r[2]&65535,r[0]<<16|r[0]>>>16,r[2]&4294901760|r[3]&65535,r[1]<<16|r[1]>>>16,r[3]&4294901760|r[0]&65535];this._b=0;for(var i=0;i<4;i++)h.call(this);for(var i=0;i<8;i++)l[i]^=n[i+4&7];if(c){var f=c.words,d=f[0],u=f[1],o=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,s=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,E=o>>>16|s&4294901760,v=s<<16|o&65535;l[0]^=o,l[1]^=E,l[2]^=s,l[3]^=v,l[4]^=o,l[5]^=E,l[6]^=s,l[7]^=v;for(var i=0;i<4;i++)h.call(this)}},_doProcessBlock:function(r,c){var i=this._X;h.call(this),m[0]=i[0]^i[5]>>>16^i[3]<<16,m[1]=i[2]^i[7]>>>16^i[5]<<16,m[2]=i[4]^i[1]>>>16^i[7]<<16,m[3]=i[6]^i[3]>>>16^i[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,r[c+n]^=m[n]},blockSize:128/32,ivSize:64/32});function h(){for(var r=this._X,c=this._C,i=0;i<8;i++)T[i]=c[i];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0<T[0]>>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0<T[1]>>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0<T[2]>>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0<T[3]>>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0<T[4]>>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0<T[5]>>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0<T[6]>>>0?1:0)|0,this._b=c[7]>>>0<T[7]>>>0?1:0;for(var i=0;i<8;i++){var n=r[i]+c[i],l=n&65535,f=n>>>16,d=((l*l>>>17)+l*f>>>15)+f*f,u=((n&4294901760)*n|0)+((n&65535)*n|0);_[i]=d^u}r[0]=_[0]+(_[7]<<16|_[7]>>>16)+(_[6]<<16|_[6]>>>16)|0,r[1]=_[1]+(_[0]<<8|_[0]>>>24)+_[7]|0,r[2]=_[2]+(_[1]<<16|_[1]>>>16)+(_[0]<<16|_[0]>>>16)|0,r[3]=_[3]+(_[2]<<8|_[2]>>>24)+_[1]|0,r[4]=_[4]+(_[3]<<16|_[3]>>>16)+(_[2]<<16|_[2]>>>16)|0,r[5]=_[5]+(_[4]<<8|_[4]>>>24)+_[3]|0,r[6]=_[6]+(_[5]<<16|_[5]>>>16)+(_[4]<<16|_[4]>>>16)|0,r[7]=_[7]+(_[6]<<8|_[6]>>>24)+_[5]|0}g.Rabbit=k._createHelper(t)}(),N.Rabbit})},ELLl:function(B,Q,D){(function(N){N(D("VrN/"))})(function(N){var g={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},w=N.Pos;N.defineOption("autoCloseBrackets",!1,function(l,f,d){d&&d!=N.Init&&(l.removeKeyMap(b),l.state.closeBrackets=null),f&&(m(k(f,"pairs")),l.state.closeBrackets=f,l.addKeyMap(b))});function k(l,f){return f=="pairs"&&typeof l=="string"?l:typeof l=="object"&&l[f]!=null?l[f]:g[f]}var b={Backspace:t,Enter:h};function m(l){for(var f=0;f<l.length;f++){var d=l.charAt(f),u="'"+d+"'";b[u]||(b[u]=T(d))}}m(g.pairs+"`");function T(l){return function(f){return c(f,l)}}function _(l){var f=l.state.closeBrackets;if(!f||f.override)return f;var d=l.getModeAt(l.getCursor());return d.closeBrackets||f}function t(l){var f=_(l);if(!f||l.getOption("disableInput"))return N.Pass;for(var d=k(f,"pairs"),u=l.listSelections(),o=0;o<u.length;o++){if(!u[o].empty())return N.Pass;var s=i(l,u[o].head);if(!s||d.indexOf(s)%2!=0)return N.Pass}for(var o=u.length-1;o>=0;o--){var E=u[o].head;l.replaceRange("",w(E.line,E.ch-1),w(E.line,E.ch+1),"+delete")}}function h(l){var f=_(l),d=f&&k(f,"explode");if(!d||l.getOption("disableInput"))return N.Pass;for(var u=l.listSelections(),o=0;o<u.length;o++){if(!u[o].empty())return N.Pass;var s=i(l,u[o].head);if(!s||d.indexOf(s)%2!=0)return N.Pass}l.operation(function(){var E=l.lineSeparator()||`
|
|
|
`;l.replaceSelection(E+E,null),l.execCommand("goCharLeft"),u=l.listSelections();for(var v=0;v<u.length;v++){var p=u[v].head.line;l.indentLine(p,null,!0),l.indentLine(p+1,null,!0)}})}function r(l){var f=N.cmpPos(l.anchor,l.head)>0;return{anchor:new w(l.anchor.line,l.anchor.ch+(f?-1:1)),head:new w(l.head.line,l.head.ch+(f?1:-1))}}function c(l,f){var d=_(l);if(!d||l.getOption("disableInput"))return N.Pass;var u=k(d,"pairs"),o=u.indexOf(f);if(o==-1)return N.Pass;for(var s=k(d,"closeBefore"),E=k(d,"triples"),v=u.charAt(o+1)==f,p=l.listSelections(),I=o%2==0,R,y=0;y<p.length;y++){var x=p[y],C=x.head,S,F=l.getRange(C,w(C.line,C.ch+1));if(I&&!x.empty())S="surround";else if((v||!I)&&F==f)v&&n(l,C)?S="both":E.indexOf(f)>=0&&l.getRange(C,w(C.line,C.ch+3))==f+f+f?S="skipThree":S="skip";else if(v&&C.ch>1&&E.indexOf(f)>=0&&l.getRange(w(C.line,C.ch-2),C)==f+f){if(C.ch>2&&/\bstring/.test(l.getTokenTypeAt(w(C.line,C.ch-2))))return N.Pass;S="addFour"}else if(v){var j=C.ch==0?" ":l.getRange(w(C.line,C.ch-1),C);if(!N.isWordChar(F)&&j!=f&&!N.isWordChar(j))S="both";else return N.Pass}else if(I&&(F.length===0||/\s/.test(F)||s.indexOf(F)>-1))S="both";else return N.Pass;if(!R)R=S;else if(R!=S)return N.Pass}var A=o%2?u.charAt(o-1):f,Y=o%2?f:u.charAt(o+1);l.operation(function(){if(R=="skip")l.execCommand("goCharRight");else if(R=="skipThree")for(var z=0;z<3;z++)l.execCommand("goCharRight");else if(R=="surround"){for(var O=l.getSelections(),z=0;z<O.length;z++)O[z]=A+O[z]+Y;l.replaceSelections(O,"around"),O=l.listSelections().slice();for(var z=0;z<O.length;z++)O[z]=r(O[z]);l.setSelections(O)}else R=="both"?(l.replaceSelection(A+Y,null),l.triggerElectric(A+Y),l.execCommand("goCharLeft")):R=="addFour"&&(l.replaceSelection(A+A+A+A,"before"),l.execCommand("goCharRight"))})}function i(l,f){var d=l.getRange(w(f.line,f.ch-1),w(f.line,f.ch+1));return d.length==2?d:null}function n(l,f){var d=l.getTokenAt(w(f.line,f.ch+1));return/\bstring/.test(d.type)&&d.start==f.ch&&(f.ch==0||!/\bstring/.test(l.getTokenTypeAt(f)))}})},ELcG:function(B,Q,D){(function(N,g){B.exports=Q=g(D("Ib8C"))})(this,function(N){/** @preserve
|
|
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
|
|
|
|
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
|
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
*/return function(g){var w=N,k=w.lib,b=k.WordArray,m=k.Hasher,T=w.algo,_=b.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=b.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]),h=b.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]),r=b.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=b.create([0,1518500249,1859775393,2400959708,2840853838]),i=b.create([1352829926,1548603684,1836072691,2053994217,0]),n=T.RIPEMD160=m.extend({_doReset:function(){this._hash=b.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(E,v){for(var p=0;p<16;p++){var I=v+p,R=E[I];E[I]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360}var y=this._hash.words,x=c.words,C=i.words,S=_.words,F=t.words,j=h.words,A=r.words,Y,z,O,H,U,L,K,ee,oe,ae;L=Y=y[0],K=z=y[1],ee=O=y[2],oe=H=y[3],ae=U=y[4];for(var be,p=0;p<80;p+=1)be=Y+E[v+S[p]]|0,p<16?be+=l(z,O,H)+x[0]:p<32?be+=f(z,O,H)+x[1]:p<48?be+=d(z,O,H)+x[2]:p<64?be+=u(z,O,H)+x[3]:be+=o(z,O,H)+x[4],be=be|0,be=s(be,j[p]),be=be+U|0,Y=U,U=H,H=s(O,10),O=z,z=be,be=L+E[v+F[p]]|0,p<16?be+=o(K,ee,oe)+C[0]:p<32?be+=u(K,ee,oe)+C[1]:p<48?be+=d(K,ee,oe)+C[2]:p<64?be+=f(K,ee,oe)+C[3]:be+=l(K,ee,oe)+C[4],be=be|0,be=s(be,A[p]),be=be+ae|0,L=ae,ae=oe,oe=s(ee,10),ee=K,K=be;be=y[1]+O+oe|0,y[1]=y[2]+H+ae|0,y[2]=y[3]+U+L|0,y[3]=y[4]+Y+K|0,y[4]=y[0]+z+ee|0,y[0]=be},_doFinalize:function(){var E=this._data,v=E.words,p=this._nDataBytes*8,I=E.sigBytes*8;v[I>>>5]|=128<<24-I%32,v[(I+64>>>9<<4)+14]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,E.sigBytes=(v.length+1)*4,this._process();for(var R=this._hash,y=R.words,x=0;x<5;x++){var C=y[x];y[x]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}return R},clone:function(){var E=m.clone.call(this);return E._hash=this._hash.clone(),E}});function l(E,v,p){return E^v^p}function f(E,v,p){return E&v|~E&p}function d(E,v,p){return(E|~v)^p}function u(E,v,p){return E&p|v&~p}function o(E,v,p){return E^(v|~p)}function s(E,v){return E<<v|E>>>32-v}w.RIPEMD160=m._createHelper(n),w.HmacRIPEMD160=m._createHmacHelper(n)}(Math),N.RIPEMD160})},ETIr:function(B,Q,D){(function(N,g){B.exports=Q=g(D("Ib8C"))})(this,function(N){return function(){var g=N,w=g.lib,k=w.WordArray,b=g.enc,m=b.Base64={stringify:function(_){var t=_.words,h=_.sigBytes,r=this._map;_.clamp();for(var c=[],i=0;i<h;i+=3)for(var n=t[i>>>2]>>>24-i%4*8&255,l=t[i+1>>>2]>>>24-(i+1)%4*8&255,f=t[i+2>>>2]>>>24-(i+2)%4*8&255,d=n<<16|l<<8|f,u=0;u<4&&i+u*.75<h;u++)c.push(r.charAt(d>>>6*(3-u)&63));var o=r.charAt(64);if(o)for(;c.length%4;)c.push(o);return c.join("")},parse:function(_){var t=_.length,h=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var c=0;c<h.length;c++)r[h.charCodeAt(c)]=c}var i=h.charAt(64);if(i){var n=_.indexOf(i);n!==-1&&(t=n)}return T(_,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function T(_,t,h){for(var r=[],c=0,i=0;i<t;i++)if(i%4){var n=h[_.charCodeAt(i-1)]<<i%4*2,l=h[_.charCodeAt(i)]>>>6-i%4*2,f=n|l;r[c>>>2]|=f<<24-c%4*8,c++}return k.create(r,c)}}(),N.enc.Base64})},"F+F2":function(B,Q,D){(function(N,g){B.exports=Q=g(D("Ib8C"))})(this,function(N){return function(){if(typeof ArrayBuffer!="function")return;var g=N,w=g.lib,k=w.WordArray,b=k.init,m=k.init=function(T){if(T instanceof ArrayBuffer&&(T=new Uint8Array(T)),(T instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&T instanceof Uint8ClampedArray||T instanceof Int16Array||T instanceof Uint16Array||T instanceof Int32Array||T instanceof Uint32Array||T instanceof Float32Array||T instanceof Float64Array)&&(T=new Uint8Array(T.buffer,T.byteOffset,T.byteLength)),T instanceof Uint8Array){for(var _=T.byteLength,t=[],h=0;h<_;h++)t[h>>>2]|=T[h]<<24-h%4*8;b.call(this,t,_)}else b.apply(this,arguments)};m.prototype=k}(),N.lib.WordArray})},FWmy:function(B,Q,D){"use strict";D.d(Q,"a",function(){return N});function N(g,w){if(!g)throw new Error(w?`Assertion failed (${w})`:"Assertion Failed")}},GRuw:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("lPiR"))})(this,function(N){return function(){var g=N,w=g.lib,k=w.WordArray,b=g.algo,m=b.SHA256,T=b.SHA224=m.extend({_doReset:function(){this._hash=new k.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var _=m._doFinalize.call(this);return _.sigBytes-=4,_}});g.SHA224=m._createHelper(T),g.HmacSHA224=m._createHmacHelper(T)}(),N.SHA224})},GfqC:function(B,Q,D){"use strict";var N=D("q1tI"),g=D.n(N),w=D("TSYQ"),k=D.n(w);function b(H,U){var L="cannot "+H.method+" "+H.action+" "+U.status+"'",K=new Error(L);return K.status=U.status,K.method=H.method,K.url=H.action,K}function m(H){var U=H.responseText||H.response;if(!U)return U;try{return JSON.parse(U)}catch(L){return U}}function T(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 L=new FormData;H.data&&Object.keys(H.data).forEach(function(ee){var oe=H.data[ee];if(Array.isArray(oe)){oe.forEach(function(ae){L.append(ee+"[]",ae)});return}L.append(ee,H.data[ee])}),H.file instanceof Blob?L.append(H.filename,H.file,H.file.name):L.append(H.filename,H.file),U.onerror=function(oe){H.onError(oe)},U.onload=function(){return U.status<200||U.status>=300?H.onError(b(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 K=H.headers||{};return K["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(K).forEach(function(ee){K[ee]!==null&&U.setRequestHeader(ee,K[ee])}),U.send(L),{abort:function(){U.abort()}}}var _=+new Date,t=0;function h(){return"rc-upload-"+_+"-"+ ++t}function r(H,U){return H.indexOf(U,H.length-U.length)!==-1}var c=function(H,U){if(H&&U){var L=Array.isArray(U)?U:U.split(","),K=H.name||"",ee=H.type||"",oe=ee.replace(/\/.*$/,"");return L.some(function(ae){var be=ae.trim();return be.charAt(0)==="."?r(K.toLowerCase(),be.toLowerCase()):/\/\*$/.test(be)?oe===be.replace(/\/.*$/,""):ee===be})}return!0};function i(H,U){var L=H.createReader(),K=[];function ee(){L.readEntries(function(oe){var ae=Array.prototype.slice.apply(oe);K=K.concat(ae);var be=!ae.length;be?U(K):ee()})}ee()}var n=function(U,L,K){var ee=function oe(ae,be){be=be||"",ae.isFile?ae.file(function(_e){K(_e)&&(ae.fullPath&&!_e.webkitRelativePath&&(Object.defineProperties(_e,{webkitRelativePath:{writable:!0}}),_e.webkitRelativePath=ae.fullPath.replace(/^\//,""),Object.defineProperties(_e,{webkitRelativePath:{writable:!1}})),L([_e]))}):ae.isDirectory&&i(ae,function(_e){_e.forEach(function(fe){oe(fe,""+be+ae.name+"/")})})};U.forEach(function(oe){ee(oe.webkitGetAsEntry())})},l=n,f=Object.assign||function(H){for(var U=1;U<arguments.length;U++){var L=arguments[U];for(var K in L)Object.prototype.hasOwnProperty.call(L,K)&&(H[K]=L[K])}return H},d=function(){function H(U,L){var K=[],ee=!0,oe=!1,ae=void 0;try{for(var be=U[Symbol.iterator](),_e;!(ee=(_e=be.next()).done)&&!(K.push(_e.value),L&&K.length===L);ee=!0);}catch(fe){oe=!0,ae=fe}finally{try{!ee&&be.return&&be.return()}finally{if(oe)throw ae}}return K}return function(U,L){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return H(U,L);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function H(U,L){for(var K=0;K<L.length;K++){var ee=L[K];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(U,ee.key,ee)}}return function(U,L,K){return L&&H(U.prototype,L),K&&H(U,K),U}}();function o(H,U,L){return U in H?Object.defineProperty(H,U,{value:L,enumerable:!0,configurable:!0,writable:!0}):H[U]=L,H}function s(H,U){var L={};for(var K in H){if(U.indexOf(K)>=0)continue;if(!Object.prototype.hasOwnProperty.call(H,K))continue;L[K]=H[K]}return L}function E(H,U){if(!(H instanceof U))throw new TypeError("Cannot call a class as a function")}function v(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 I=function(U){return Object.keys(U).reduce(function(L,K){return(K.substr(0,5)==="data-"||K.substr(0,5)==="aria-"||K==="role")&&(L[K]=U[K]),L},{})},R=function(H){p(U,H);function U(){var L,K,ee,oe;E(this,U);for(var ae=arguments.length,be=Array(ae),_e=0;_e<ae;_e++)be[_e]=arguments[_e];return oe=(K=(ee=v(this,(L=U.__proto__||Object.getPrototypeOf(U)).call.apply(L,[this].concat(be))),ee),ee.state={uid:h()},ee.reqs={},ee.onChange=function(fe){var Re=fe.target.files;ee.uploadFiles(Re),ee.reset()},ee.onClick=function(fe){var Re=ee.fileInput;if(!Re)return;var Ce=ee.props,ce=Ce.children,te=Ce.onClick;ce&&ce.type==="button"&&(Re.parentNode.focus(),Re.parentNode.querySelector("button").blur()),Re.click(),te&&te(fe)},ee.onKeyDown=function(fe){fe.key==="Enter"&&ee.onClick()},ee.onFileDrop=function(fe){var Re=ee.props.multiple;if(fe.preventDefault(),fe.type==="dragover")return;if(ee.props.directory)l(Array.prototype.slice.call(fe.dataTransfer.items),ee.uploadFiles,function(ce){return c(ce,ee.props.accept)});else{var Ce=Array.prototype.slice.call(fe.dataTransfer.files).filter(function(ce){return c(ce,ee.props.accept)});Re===!1&&(Ce=Ce.slice(0,1)),ee.uploadFiles(Ce)}},ee.uploadFiles=function(fe){var Re=Array.prototype.slice.call(fe);Re.map(function(Ce){return Ce.uid=h(),Ce}).forEach(function(Ce){ee.upload(Ce,Re)})},ee.saveFileInput=function(fe){ee.fileInput=fe},K),v(ee,oe)}return u(U,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(K,ee){var oe=this,ae=this.props;if(!ae.beforeUpload)return setTimeout(function(){return oe.post(K)},0);var be=ae.beforeUpload(K,ee);be&&be.then?be.then(function(_e){var fe=Object.prototype.toString.call(_e);return fe==="[object File]"||fe==="[object Blob]"?oe.post(_e):oe.post(K)}).catch(function(_e){console.log(_e)}):be!==!1&&setTimeout(function(){return oe.post(K)},0);return}},{key:"post",value:function(K){var ee=this;if(!this._isMounted)return;var oe=this.props,ae=oe.onStart,be=oe.onProgress,_e=oe.transformFile,fe=_e===void 0?function(Re){return Re}:_e;new Promise(function(Re){var Ce=oe.action;return typeof Ce=="function"&&(Ce=Ce(K)),Re(Ce)}).then(function(Re){var Ce=K.uid,ce=oe.customRequest||T,te=Promise.resolve(fe(K)).then(function(W){var X=oe.data;return typeof X=="function"&&(X=X(W)),Promise.all([W,X])}).catch(function(W){console.error(W)});te.then(function(W){var X=d(W,2),V=X[0],Z=X[1],q={action:Re,filename:oe.name,data:Z,file:V,headers:oe.headers,withCredentials:oe.withCredentials,method:oe.method||"post",onProgress:be?function(ie){be(ie,K)}:null,onSuccess:function(ne,J){delete ee.reqs[Ce],oe.onSuccess(ne,K,J)},onError:function(ne,J){delete ee.reqs[Ce],oe.onError(ne,J,K)}};ae(K),ee.reqs[Ce]=ce(q)})})}},{key:"reset",value:function(){this.setState({uid:h()})}},{key:"abort",value:function(K){var ee=this.reqs;if(K){var oe=K;K&&K.uid&&(oe=K.uid),ee[oe]&&ee[oe].abort&&ee[oe].abort(),delete ee[oe]}else Object.keys(ee).forEach(function(ae){ee[ae]&&ee[ae].abort&&ee[ae].abort(),delete ee[ae]})}},{key:"render",value:function(){var K,ee=this.props,oe=ee.component,ae=ee.prefixCls,be=ee.className,_e=ee.disabled,fe=ee.id,Re=ee.style,Ce=ee.multiple,ce=ee.accept,te=ee.children,W=ee.directory,X=ee.openFileDialogOnClick,V=ee.onMouseEnter,Z=ee.onMouseLeave,q=s(ee,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),ie=k()((K={},o(K,ae,!0),o(K,ae+"-disabled",_e),o(K,be,be),K)),ne=_e?{}:{onClick:X?this.onClick:function(){},onKeyDown:X?this.onKeyDown:function(){},onMouseEnter:V,onMouseLeave:Z,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return g.a.createElement(oe,f({},ne,{className:ie,role:"button",style:Re}),g.a.createElement("input",f({},I(q),{id:fe,type:"file",ref:this.saveFileInput,onClick:function($){return $.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:ce,directory:W?"directory":null,webkitdirectory:W?"webkitdirectory":null,multiple:Ce,onChange:this.onChange})),te)}}]),U}(N.Component),y=R,x=Object.assign||function(H){for(var U=1;U<arguments.length;U++){var L=arguments[U];for(var K in L)Object.prototype.hasOwnProperty.call(L,K)&&(H[K]=L[K])}return H},C=function(){function H(U,L){for(var K=0;K<L.length;K++){var ee=L[K];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(U,ee.key,ee)}}return function(U,L,K){return L&&H(U.prototype,L),K&&H(U,K),U}}();function S(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 j(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 A(){}var Y=function(H){j(U,H);function U(){var L,K,ee,oe;S(this,U);for(var ae=arguments.length,be=Array(ae),_e=0;_e<ae;_e++)be[_e]=arguments[_e];return oe=(K=(ee=F(this,(L=U.__proto__||Object.getPrototypeOf(U)).call.apply(L,[this].concat(be))),ee),ee.saveUploader=function(fe){ee.uploader=fe},K),F(ee,oe)}return C(U,[{key:"abort",value:function(K){this.uploader.abort(K)}},{key:"render",value:function(){return g.a.createElement(y,x({},this.props,{ref:this.saveUploader}))}}]),U}(N.Component);Y.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:A,onError:A,onSuccess:A,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var z=Y,O=Q.a=z},HmJG:function(B,Q,D){},IBYe:function(B,Q,D){"use strict";function N(g){return null}Q.a=N},Ib8C:function(B,Q,D){(function(N){(function(g,w){B.exports=Q=w()})(this,function(){var g=g||function(w,k){var b;if(typeof window!="undefined"&&window.crypto&&(b=window.crypto),typeof self!="undefined"&&self.crypto&&(b=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(b=globalThis.crypto),!b&&typeof window!="undefined"&&window.msCrypto&&(b=window.msCrypto),!b&&typeof N!="undefined"&&N.crypto&&(b=N.crypto),!b&&!0)try{b=D(4)}catch(o){}var m=function(){if(b){if(typeof b.getRandomValues=="function")try{return b.getRandomValues(new Uint32Array(1))[0]}catch(o){}if(typeof b.randomBytes=="function")try{return b.randomBytes(4).readInt32LE()}catch(o){}}throw new Error("Native crypto module could not be used to get secure random number.")},T=Object.create||function(){function o(){}return function(s){var E;return o.prototype=s,E=new o,o.prototype=null,E}}(),_={},t=_.lib={},h=t.Base=function(){return{extend:function(o){var s=T(this);return o&&s.mixIn(o),(!s.hasOwnProperty("init")||this.init===s.init)&&(s.init=function(){s.$super.init.apply(this,arguments)}),s.init.prototype=s,s.$super=this,s},create:function(){var o=this.extend();return o.init.apply(o,arguments),o},init:function(){},mixIn:function(o){for(var s in o)o.hasOwnProperty(s)&&(this[s]=o[s]);o.hasOwnProperty("toString")&&(this.toString=o.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),r=t.WordArray=h.extend({init:function(o,s){o=this.words=o||[],s!=k?this.sigBytes=s:this.sigBytes=o.length*4},toString:function(o){return(o||i).stringify(this)},concat:function(o){var s=this.words,E=o.words,v=this.sigBytes,p=o.sigBytes;if(this.clamp(),v%4)for(var I=0;I<p;I++){var R=E[I>>>2]>>>24-I%4*8&255;s[v+I>>>2]|=R<<24-(v+I)%4*8}else for(var y=0;y<p;y+=4)s[v+y>>>2]=E[y>>>2];return this.sigBytes+=p,this},clamp:function(){var o=this.words,s=this.sigBytes;o[s>>>2]&=4294967295<<32-s%4*8,o.length=w.ceil(s/4)},clone:function(){var o=h.clone.call(this);return o.words=this.words.slice(0),o},random:function(o){for(var s=[],E=0;E<o;E+=4)s.push(m());return new r.init(s,o)}}),c=_.enc={},i=c.Hex={stringify:function(o){for(var s=o.words,E=o.sigBytes,v=[],p=0;p<E;p++){var I=s[p>>>2]>>>24-p%4*8&255;v.push((I>>>4).toString(16)),v.push((I&15).toString(16))}return v.join("")},parse:function(o){for(var s=o.length,E=[],v=0;v<s;v+=2)E[v>>>3]|=parseInt(o.substr(v,2),16)<<24-v%8*4;return new r.init(E,s/2)}},n=c.Latin1={stringify:function(o){for(var s=o.words,E=o.sigBytes,v=[],p=0;p<E;p++){var I=s[p>>>2]>>>24-p%4*8&255;v.push(String.fromCharCode(I))}return v.join("")},parse:function(o){for(var s=o.length,E=[],v=0;v<s;v++)E[v>>>2]|=(o.charCodeAt(v)&255)<<24-v%4*8;return new r.init(E,s)}},l=c.Utf8={stringify:function(o){try{return decodeURIComponent(escape(n.stringify(o)))}catch(s){throw new Error("Malformed UTF-8 data")}},parse:function(o){return n.parse(unescape(encodeURIComponent(o)))}},f=t.BufferedBlockAlgorithm=h.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(o){typeof o=="string"&&(o=l.parse(o)),this._data.concat(o),this._nDataBytes+=o.sigBytes},_process:function(o){var s,E=this._data,v=E.words,p=E.sigBytes,I=this.blockSize,R=I*4,y=p/R;o?y=w.ceil(y):y=w.max((y|0)-this._minBufferSize,0);var x=y*I,C=w.min(x*4,p);if(x){for(var S=0;S<x;S+=I)this._doProcessBlock(v,S);s=v.splice(0,x),E.sigBytes-=C}return new r.init(s,C)},clone:function(){var o=h.clone.call(this);return o._data=this._data.clone(),o},_minBufferSize:0}),d=t.Hasher=f.extend({cfg:h.extend(),init:function(o){this.cfg=this.cfg.extend(o),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(o){return this._append(o),this._process(),this},finalize:function(o){o&&this._append(o);var s=this._doFinalize();return s},blockSize:512/32,_createHelper:function(o){return function(s,E){return new o.init(E).finalize(s)}},_createHmacHelper:function(o){return function(s,E){return new u.HMAC.init(o,E).finalize(s)}}}),u=_.algo={};return _}(Math);return g})}).call(this,D("IyRk"))},J66h:function(B,Q,D){(function(N){var g,w;(function(k,b){B.exports=b(k)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof N!="undefined"?N:this,function(k){"use strict";k=k||{};var b=k.Base64,m="2.6.4",T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=function(A){for(var Y={},z=0,O=A.length;z<O;z++)Y[A.charAt(z)]=z;return Y}(T),t=String.fromCharCode,h=function(A){if(A.length<2){var Y=A.charCodeAt(0);return Y<128?A:Y<2048?t(192|Y>>>6)+t(128|Y&63):t(224|Y>>>12&15)+t(128|Y>>>6&63)+t(128|Y&63)}else{var Y=65536+(A.charCodeAt(0)-55296)*1024+(A.charCodeAt(1)-56320);return t(240|Y>>>18&7)+t(128|Y>>>12&63)+t(128|Y>>>6&63)+t(128|Y&63)}},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,c=function(A){return A.replace(r,h)},i=function(A){var Y=[0,2,1][A.length%3],z=A.charCodeAt(0)<<16|(A.length>1?A.charCodeAt(1):0)<<8|(A.length>2?A.charCodeAt(2):0),O=[T.charAt(z>>>18),T.charAt(z>>>12&63),Y>=2?"=":T.charAt(z>>>6&63),Y>=1?"=":T.charAt(z&63)];return O.join("")},n=k.btoa&&typeof k.btoa=="function"?function(A){return k.btoa(A)}:function(A){if(A.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return A.replace(/[\s\S]{1,3}/g,i)},l=function(A){return n(c(String(A)))},f=function(A){return A.replace(/[+\/]/g,function(Y){return Y=="+"?"-":"_"}).replace(/=/g,"")},d=function(A,Y){return Y?f(l(A)):l(A)},u=function(A){return d(A,!0)},o;k.Uint8Array&&(o=function(A,Y){for(var z="",O=0,H=A.length;O<H;O+=3){var U=A[O],L=A[O+1],K=A[O+2],ee=U<<16|L<<8|K;z+=T.charAt(ee>>>18)+T.charAt(ee>>>12&63)+(typeof L!="undefined"?T.charAt(ee>>>6&63):"=")+(typeof K!="undefined"?T.charAt(ee&63):"=")}return Y?f(z):z});var s=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,E=function(A){switch(A.length){case 4:var Y=(7&A.charCodeAt(0))<<18|(63&A.charCodeAt(1))<<12|(63&A.charCodeAt(2))<<6|63&A.charCodeAt(3),z=Y-65536;return t((z>>>10)+55296)+t((z&1023)+56320);case 3:return t((15&A.charCodeAt(0))<<12|(63&A.charCodeAt(1))<<6|63&A.charCodeAt(2));default:return t((31&A.charCodeAt(0))<<6|63&A.charCodeAt(1))}},v=function(A){return A.replace(s,E)},p=function(A){var Y=A.length,z=Y%4,O=(Y>0?_[A.charAt(0)]<<18:0)|(Y>1?_[A.charAt(1)]<<12:0)|(Y>2?_[A.charAt(2)]<<6:0)|(Y>3?_[A.charAt(3)]:0),H=[t(O>>>16),t(O>>>8&255),t(O&255)];return H.length-=[0,0,2,1][z],H.join("")},I=k.atob&&typeof k.atob=="function"?function(A){return k.atob(A)}:function(A){return A.replace(/\S{1,4}/g,p)},R=function(A){return I(String(A).replace(/[^A-Za-z0-9\+\/]/g,""))},y=function(A){return v(I(A))},x=function(A){return String(A).replace(/[-_]/g,function(Y){return Y=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},C=function(A){return y(x(A))},S;k.Uint8Array&&(S=function(A){return Uint8Array.from(R(x(A)),function(Y){return Y.charCodeAt(0)})});var F=function(){var A=k.Base64;return k.Base64=b,A};if(k.Base64={VERSION:m,atob:R,btoa:n,fromBase64:C,toBase64:d,utob:c,encode:d,encodeURI:u,btou:v,decode:C,noConflict:F,fromUint8Array:o,toUint8Array:S},typeof Object.defineProperty=="function"){var j=function(A){return{value:A,enumerable:!1,writable:!0,configurable:!0}};k.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",j(function(){return C(this)})),Object.defineProperty(String.prototype,"toBase64",j(function(A){return d(this,A)})),Object.defineProperty(String.prototype,"toBase64URI",j(function(){return d(this,!0)}))}}return k.Meteor&&(Base64=k.Base64),B.exports?B.exports.Base64=k.Base64:!(g=[],w=function(){return k.Base64}.apply(Q,g),w!==void 0&&(B.exports=w)),{Base64:k.Base64}})}).call(this,D("IyRk"))},JYp7:function(B,Q,D){"use strict";D.d(Q,"a",function(){return N});var N;(function(g){function w(s){return s&&typeof s=="object"&&typeof s[Symbol.iterator]=="function"}g.is=w;const k=Object.freeze([]);function b(){return k}g.empty=b;function*m(s){yield s}g.single=m;function T(s){return s||k}g.from=T;function _(s){return!s||s[Symbol.iterator]().next().done===!0}g.isEmpty=_;function t(s){return s[Symbol.iterator]().next().value}g.first=t;function h(s,E){for(const v of s)if(E(v))return!0;return!1}g.some=h;function r(s,E){for(const v of s)if(E(v))return v;return}g.find=r;function*c(s,E){for(const v of s)E(v)&&(yield v)}g.filter=c;function*i(s,E){let v=0;for(const p of s)yield E(p,v++)}g.map=i;function*n(...s){for(const E of s)for(const v of E)yield v}g.concat=n;function*l(s){for(const E of s)for(const v of E)yield v}g.concatNested=l;function f(s,E,v){let p=v;for(const I of s)p=E(p,I);return p}g.reduce=f;function*d(s,E,v=s.length){for(E<0&&(E+=s.length),v<0?v+=s.length:v>s.length&&(v=s.length);E<v;E++)yield s[E]}g.slice=d;function u(s,E=Number.POSITIVE_INFINITY){const v=[];if(E===0)return[v,s];const p=s[Symbol.iterator]();for(let I=0;I<E;I++){const R=p.next();if(R.done)return[v,g.empty()];v.push(R.value)}return[v,{[Symbol.iterator](){return p}}]}g.consume=u;function o(s,E,v=(p,I)=>p===I){const p=s[Symbol.iterator](),I=E[Symbol.iterator]();for(;;){const R=p.next(),y=I.next();if(R.done!==y.done)return!1;if(R.done)return!0;if(!v(R.value,y.value))return!1}}g.equals=o})(N||(N={}))},K3mO:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("3y9D"),D("WYAk"))})(this,function(N){return function(){var g=N,w=g.lib,k=w.Base,b=w.WordArray,m=g.algo,T=m.MD5,_=m.EvpKDF=k.extend({cfg:k.extend({keySize:128/32,hasher:T,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,h){for(var r,c=this.cfg,i=c.hasher.create(),n=b.create(),l=n.words,f=c.keySize,d=c.iterations;l.length<f;){r&&i.update(r),r=i.update(t).finalize(h),i.reset();for(var u=1;u<d;u++)r=i.finalize(r),i.reset();n.concat(r)}return n.sigBytes=f*4,n}});g.EvpKDF=function(t,h,r){return _.create(r).compute(t,h)}}(),N.EvpKDF})},KhGG:function(B,Q,D){"use strict";D.d(Q,"a",function(){return p}),D.d(Q,"c",function(){return y});var N=D("0Owb"),g=D("miYZ"),w=D("tsqr"),k=D("oBTY"),b=D("tJVT"),m=D("PpiC"),T=D("k1fw"),_=D("9og8"),t=D("DZo9"),h=D("8z0m"),r=D("WmNS"),c=D.n(r),i=D("q1tI"),n=D.n(i),l=D("ErOA"),f=D("NFKh"),d=D.n(f),u=D("7Cbv"),o=D("9kvl"),s=D("mxV5"),E=D.n(s),v=h.a.Dragger,p=function(S){var F="bf3c199c2470cb477d907b1e0917c17b",j="5183666c72eec9e4",A=d.a.enc.Utf8.parse(F),Y=d.a.enc.Utf8.parse(j),z=d.a.AES.decrypt(S,A,{iv:Y,mode:d.a.mode.CBC});return z.toString(d.a.enc.Utf8)},I,R=function(){var C=Object(_.a)(c.a.mark(function S(F){var j,A,Y,z,O,H,U,L,K,ee,oe;return c.a.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:return U=F.identifier,L=F.oldFilename,K=F.newFilename,be.next=3,Object(l.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 3:return ee=be.sent,ee.data=JSON.parse(p(ee.data)),oe=new E.a({endpoint:ee==null||((j=ee.data)===null||j===void 0)?void 0:j.end_point,region:ee==null||((A=ee.data)===null||A===void 0)?void 0:A.region,accessKeyId:ee==null||((Y=ee.data)===null||Y===void 0)?void 0:Y.access_key_id,accessKeySecret:ee==null||((z=ee.data)===null||z===void 0)?void 0:z.access_key_secret,bucket:ee==null||((O=ee.data)===null||O===void 0)?void 0:O.bucket,stsToken:ee==null||((H=ee.data)===null||H===void 0)?void 0:H.security_token}),be.abrupt("return",new Promise(function(_e,fe){console.log(11111,"".concat(U,"/").concat(L),"".concat(U,"/").concat(K),ee.data),oe.copy("/".concat(U,"/").concat(L),"/".concat(U,"/").concat(K)).then(function(Re){console.log("\u62F7\u8D1D\u6210\u529F",Re)}).catch(function(Re){console.log(Re)})}));case 7:case"end":return be.stop()}},S)}));return function(F){return C.apply(this,arguments)}}(),y=function(){var C=Object(_.a)(c.a.mark(function S(F,j,A){var Y,z,O,H,U,L,K,ee,oe,ae;return c.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:return j.file_name=F.name,_e.next=3,Object(l.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return K=_e.sent,console.log("decrypt(res.data):",p(K.data)),K.data=JSON.parse(p(K.data)),ee=F.name.split("."),ee.pop(),oe=j.realFileName?ee:Object(u.a)(),ae=new E.a({endpoint:K==null||((Y=K.data)===null||Y===void 0)?void 0:Y.end_point,region:K==null||((z=K.data)===null||z===void 0)?void 0:z.region,accessKeyId:K==null||((O=K.data)===null||O===void 0)?void 0:O.access_key_id,accessKeySecret:K==null||((H=K.data)===null||H===void 0)?void 0:H.access_key_secret,bucket:K==null||((U=K.data)===null||U===void 0)?void 0:U.bucket,stsToken:K==null||((L=K.data)===null||L===void 0)?void 0:L.security_token}),_e.abrupt("return",new Promise(function(fe,Re){var Ce;ae.multipartUpload("".concat(oe),new Blob([F],{type:F.type}),Object(T.a)(Object(T.a)({timeout:200*1e3,partSize:102400},A),{},{callback:{url:K==null||((Ce=K.data)===null||Ce===void 0)?void 0:Ce.callback_url,host:K==null?void 0:K.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(l.e)(j)}})).then(function(ce){var te;F.response=(te=ce.data)===null||te===void 0?void 0:te.data,fe(ce==null?void 0:ce.data)}).catch(function(ce){Re(ce),console.log("err:",ce)})}));case 11:case"end":return _e.stop()}},S)}));return function(F,j,A){return C.apply(this,arguments)}}(),x=function(S){var F=S.user,j=S.cancelUpload,A=Object(m.a)(S,["user","cancelUpload"]),Y=Object(i.useState)([]),z=Object(b.a)(Y,2),O=z[0],H=z[1],U=Object(i.useState)(),L=Object(b.a)(U,2),K=L[0],ee=L[1],oe={onRemove:function(_e){H(Object(k.a)(O.filter(function(fe){return fe.name!==_e.name}))),A.onChange(O.filter(function(fe){return fe.name!==_e.name}))},disabled:A.disabled,multiple:!0,fileList:O==null?void 0:O.map(function(be){return be.file}),customRequest:function(){},beforeUpload:function(){var be=Object(_.a)(c.a.mark(function fe(Re){var Ce;return c.a.wrap(function(te){for(;;)switch(te.prev=te.next){case 0:if(Ce=A.maxSize||1024*1024*1024*1,!O.filter(function(W){return W.name===Re.name}).length){te.next=4;break}return w.b.info("".concat(Re.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),te.abrupt("return");case 4:if(!((Re==null?void 0:Re.size)>Ce)){te.next=7;break}return w.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(Ce/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),te.abrupt("return",!1);case 7:return O.push({name:Re.name,file:Re}),H(Object(k.a)(O)),A.onChange(O),te.abrupt("return",!1);case 11:case"end":return te.stop()}},fe)}));function _e(fe){return be.apply(this,arguments)}return _e}()},ae=function(){var be=Object(_.a)(c.a.mark(function _e(fe,Re){var Ce,ce,te,W,X,V,Z,q,ie,ne;return c.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return Re.file_name=fe.name,Z=fe.name,$.next=4,Object(l.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(q=$.sent,q.data=JSON.parse(p(q.data)),!((q==null?void 0:q.status)!==0)){$.next=12;break}return O[O.findIndex(function(le){return le.name===Z})].status="error",O[O.findIndex(function(le){return le.name===Z})].file.status="error",A.onChange(O),w.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),$.abrupt("return");case 12:return K=new E.a({endpoint:q==null||((Ce=q.data)===null||Ce===void 0)?void 0:Ce.end_point,region:q==null||((ce=q.data)===null||ce===void 0)?void 0:ce.region,accessKeyId:q==null||((te=q.data)===null||te===void 0)?void 0:te.access_key_id,accessKeySecret:q==null||((W=q.data)===null||W===void 0)?void 0:W.access_key_secret,bucket:q==null||((X=q.data)===null||X===void 0)?void 0:X.bucket,stsToken:q==null||((V=q.data)===null||V===void 0)?void 0:V.security_token}),console.log(fe,"file"),ee(K),ie=fe.name.split("."),ie.pop(),ne=Re.realFileName?ie:Object(u.a)(),$.abrupt("return",new Promise(function(le,he){try{var Se;K.multipartUpload("".concat(A.identifier,"/").concat(ne).concat(Z.indexOf(".")>-1?"."+Z.split(".").pop():""),new Blob([fe.file],{type:fe.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Xe,$e,Ye){try{console.log("\u8FDB\u5EA6",Xe,$e,Ye);var et=O.findIndex(function(qe){return qe.name===Z});O[et].file.percent=Xe*100,O[et].tempCheckpoint=$e,H(Object(k.a)(O))}catch(qe){}},checkpoint:O[O.findIndex(function(Ue){return Ue.name===Z})].tempCheckpoint,callback:{customValue:{id:Z+""},url:q==null||((Se=q.data)===null||Se===void 0)?void 0:Se.callback_url,host:q==null?void 0:q.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(l.e)(Re)}}).then(function(Ue){var Xe,$e=O.findIndex(function(Ie){return Ie.name===Z}),Ye="done";if(((Xe=Ue.data)===null||Xe===void 0?void 0:Xe.status)===0){var et;fe.response=(et=Ue.data)===null||et===void 0?void 0:et.data;var qe=O.findIndex(function(Ie){return Ie.name===Z});O[qe].status="done",O[qe].file.status="done"}else{var Pe;w.b.warn((Pe=Ue.data)===null||Pe===void 0?void 0:Pe.message),Ye="error"}O[$e].status=Ye,O[$e].file.status=Ye,A.onChange(O),le(Ue==null?void 0:Ue.data)}).catch(function(Ue){O[O.findIndex(function(Xe){return Xe.name===Z})].status="error",O[O.findIndex(function(Xe){return Xe.name===Z})].file.status="error",w.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),H(Object(k.a)(O)),A.onChange(O),he(Ue),console.log("err:",Ue)})}catch(Ue){}}));case 19:case"end":return $.stop()}},_e)}));return function(fe,Re){return be.apply(this,arguments)}}();return Object(i.useEffect)(function(){O.every(function(be){return be==="done"||be==="error"})&&A.onComplete(O)},[O]),Object(i.useEffect)(function(){if(j){var be;(be=K)===null||be===void 0||be.cancel()}},[j]),Object(i.useEffect)(function(){A.uploading&&O.map(function(){var be=Object(_.a)(c.a.mark(function _e(fe){var Re,Ce;return c.a.wrap(function(te){for(;;)switch(te.prev=te.next){case 0:if(!((!fe.status||fe.status==="error")&&!j)){te.next=6;break}return fe.status="uploading",fe.file.status="uploading",te.next=5,ae(fe,{login:F==null||((Re=F.userInfo)===null||Re===void 0)?void 0:Re.login,container_type:A.container_type,container_id:A.container_id,description:A.description,realFileName:A.realFileName});case 5:Ce=te.sent;case 6:case"end":return te.stop()}},_e)}));return function(_e){return be.apply(this,arguments)}}())},[A.uploading]),n.a.createElement(v,Object(N.a)({},oe,{height:A.height,className:A.className}),n.a.createElement("p",{className:"ant-upload-hint"},A.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};Q.b=Object(o.a)(function(C){var S=C.loading,F=C.globalSetting,j=C.user;return{globalSetting:F,loading:S.models.competitions,user:j}})(x)},KmYQ:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("OLod"))})(this,function(N){return N.pad.ZeroPadding={pad:function(g,w){var k=w*4;g.clamp(),g.sigBytes+=k-(g.sigBytes%k||k)},unpad:function(g){for(var w=g.words,k=g.sigBytes-1,k=g.sigBytes-1;k>=0;k--)if(w[k>>>2]>>>24-k%4*8&255){g.sigBytes=k+1;break}}},N.pad.ZeroPadding})},L9qf:function(B,Q,D){B.exports={flex_box_center:"flex_box_center___3J7Qj",flex_space_between:"flex_space_between___3P3xx",flex_box_vertical_center:"flex_box_vertical_center___3QrMz",flex_box_center_end:"flex_box_center_end___37g4V",flex_box_column:"flex_box_column___2PxMN",wrap:"wrap___1xDeN",in:"in___364z1",btns:"btns___8vHXH",customModal:"customModal___2Vkln"}},M8RZ:function(B,Q,D){"use strict";D.d(Q,"a",function(){return t});var N=D("fWQN"),g=D("mtLc"),w=D("yKVA"),k=D("879j"),b=D("q1tI"),m=D.n(b),T=D("i8i4"),_=D.n(T),t=function(h){Object(w.a)(c,h);var r=Object(k.a)(c);function c(i){var n;Object(N.a)(this,c),n=r.call(this,i);var l=window.document;return n.node=l.createElement("div"),l.body.appendChild(n.node),n}return Object(g.a)(c,[{key:"render",value:function(){var n=this.props.children;return Object(T.createPortal)(n,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),c}(m.a.Component)},MFOe:function(B,Q,D){(function(N){var g=m(),w=T(),k=_(),b=typeof window!="undefined"?window:N;B.exports={assign:g,create:w,trim:k,bind:t,slice:h,each:r,map:c,pluck:i,isList:n,isFunction:l,isObject:f,Global:b};function m(){return Object.assign?Object.assign:function(u,o,s,E){for(var v=1;v<arguments.length;v++)r(Object(arguments[v]),function(p,I){u[I]=p});return u}}function T(){if(Object.create)return function(o,s,E,v){var p=h(arguments,1);return g.apply(this,[Object.create(o)].concat(p))};{function d(){}return function(o,s,E,v){var p=h(arguments,1);return d.prototype=o,g.apply(this,[new d].concat(p))}}}function _(){return String.prototype.trim?function(u){return String.prototype.trim.call(u)}:function(u){return u.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function t(d,u){return function(){return u.apply(d,Array.prototype.slice.call(arguments,0))}}function h(d,u){return Array.prototype.slice.call(d,u||0)}function r(d,u){i(d,function(o,s){return u(o,s),!1})}function c(d,u){var o=n(d)?[]:{};return i(d,function(s,E){return o[E]=u(s,E),!1}),o}function i(d,u){if(n(d)){for(var o=0;o<d.length;o++)if(u(d[o],o))return d[o]}else for(var s in d)if(d.hasOwnProperty(s)&&u(d[s],s))return d[s]}function n(d){return d!=null&&typeof d!="function"&&typeof d.length=="number"}function l(d){return d&&{}.toString.call(d)==="[object Function]"}function f(d){return d&&{}.toString.call(d)==="[object Object]"}}).call(this,D("IyRk"))},MI8n:function(B,Q,D){"use strict";D.d(Q,"c",function(){return b}),D.d(Q,"b",function(){return t}),D.d(Q,"e",function(){return h}),D.d(Q,"a",function(){return r}),D.d(Q,"d",function(){return c}),D.d(Q,"f",function(){return i});var N=D("/cxE"),g=D("pmY6"),w=D("24hK"),k=D("5Y4S"),b;(function(n){n.None=()=>g.a.None;function l(A){return(Y,z=null,O)=>{let H=!1,U;return U=A(L=>H?void 0:(U?U.dispose():H=!0,Y.call(z,L)),null,O),H&&U.dispose(),U}}n.once=l;function f(A,Y){return v((z,O=null,H)=>A(U=>z.call(O,Y(U)),null,H))}n.map=f;function d(A,Y){return v((z,O=null,H)=>A(U=>{Y(U),z.call(O,U)},null,H))}n.forEach=d;function u(A,Y){return v((z,O=null,H)=>A(U=>Y(U)&&z.call(O,U),null,H))}n.filter=u;function o(A){return A}n.signal=o;function s(...A){return(Y,z=null,O)=>Object(g.e)(...A.map(H=>H(U=>Y.call(z,U),null,O)))}n.any=s;function E(A,Y,z){let O=z;return f(A,H=>(O=Y(O,H),O))}n.reduce=E;function v(A){let Y;const z=new t({onFirstListenerAdd(){Y=A(z.fire,z)},onLastListenerRemove(){Y.dispose()}});return z.event}function p(A,Y,z=100,O=!1,H){let U,L,K,ee=0;const oe=new t({leakWarningThreshold:H,onFirstListenerAdd(){U=A(ae=>{ee++,L=Y(L,ae),O&&!K&&(oe.fire(L),L=void 0),clearTimeout(K),K=setTimeout(()=>{const be=L;L=void 0,K=void 0,(!O||ee>1)&&oe.fire(be),ee=0},z)})},onLastListenerRemove(){U.dispose()}});return oe.event}n.debounce=p;function I(A,Y=(z,O)=>z===O){let z=!0,O;return u(A,H=>{const U=z||!Y(H,O);return z=!1,O=H,U})}n.latch=I;function R(A,Y){return[n.filter(A,Y),n.filter(A,z=>!Y(z))]}n.split=R;function y(A,Y=!1,z=[]){let O=z.slice(),H=A(K=>{O?O.push(K):L.fire(K)});const U=()=>{O&&O.forEach(K=>L.fire(K)),O=null},L=new t({onFirstListenerAdd(){H||(H=A(K=>L.fire(K)))},onFirstListenerDidAdd(){O&&(Y?setTimeout(U):U())},onLastListenerRemove(){H&&H.dispose(),H=null}});return L.event}n.buffer=y;class x{constructor(A){this.event=A}map(A){return new x(f(this.event,A))}forEach(A){return new x(d(this.event,A))}filter(A){return new x(u(this.event,A))}reduce(A,Y){return new x(E(this.event,A,Y))}latch(){return new x(I(this.event))}debounce(A,Y=100,z=!1,O){return new x(p(this.event,A,Y,z,O))}on(A,Y,z){return this.event(A,Y,z)}once(A,Y,z){return l(this.event)(A,Y,z)}}function C(A){return new x(A)}n.chain=C;function S(A,Y,z=O=>O){const O=(...K)=>L.fire(z(...K)),H=()=>A.on(Y,O),U=()=>A.removeListener(Y,O),L=new t({onFirstListenerAdd:H,onLastListenerRemove:U});return L.event}n.fromNodeEventEmitter=S;function F(A,Y,z=O=>O){const O=(...K)=>L.fire(z(...K)),H=()=>A.addEventListener(Y,O),U=()=>A.removeEventListener(Y,O),L=new t({onFirstListenerAdd:H,onLastListenerRemove:U});return L.event}n.fromDOMEventEmitter=F;function j(A){return new Promise(Y=>l(A)(Y))}n.toPromise=j})(b||(b={}));class m{constructor(n){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${n}_${m._idPool++}`}start(n){this._stopWatch=new k.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 T=-1;class _{constructor(n,l=Math.random().toString(18).slice(2,5)){this.customThreshold=n,this.name=l,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(n){let l=T;if(typeof this.customThreshold=="number"&&(l=this.customThreshold),l<=0||n<l)return;this._stacks||(this._stacks=new Map);const f=new Error().stack.split(`
|
|
|
`).slice(3).join(`
|
|
|
`),d=this._stacks.get(f)||0;if(this._stacks.set(f,d+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=l*.5;let u,o=0;for(const[s,E]of this._stacks)(!u||o<E)&&(u=s,o=E);console.warn(`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${o}):`),console.warn(u)}return()=>{const u=this._stacks.get(f)||0;this._stacks.set(f,u-1)}}}class t{constructor(n){var l;this._disposed=!1,this._options=n,this._leakageMon=T>0?new _(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((l=this._options)===null||l===void 0?void 0:l._profName)?new m(this._options._profName):void 0}get event(){return this._event||(this._event=(n,l,f)=>{var d;this._listeners||(this._listeners=new w.a);const u=this._listeners.isEmpty();u&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const o=this._listeners.push(l?[n,l]:n);u&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,n,l);const s=(d=this._leakageMon)===null||d===void 0?void 0:d.check(this._listeners.size),E=Object(g.i)(()=>{if(s&&s(),!this._disposed&&(o(),this._options&&this._options.onLastListenerRemove)){const v=this._listeners&&!this._listeners.isEmpty();v||this._options.onLastListenerRemove(this)}});return f instanceof g.b?f.add(E):Array.isArray(f)&&f.push(E),E}),this._event}fire(n){var l,f;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new w.a);for(let d of this._listeners)this._deliveryQueue.push([d,n]);for((l=this._perfMon)===null||l===void 0||l.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[d,u]=this._deliveryQueue.shift();try{typeof d=="function"?d.call(void 0,u):d[0].call(d[1],u)}catch(o){Object(N.f)(o)}}(f=this._perfMon)===null||f===void 0||f.stop()}}dispose(){var n,l,f,d,u;this._disposed||(this._disposed=!0,(n=this._listeners)===null||n===void 0||n.clear(),(l=this._deliveryQueue)===null||l===void 0||l.clear(),(d=(f=this._options)===null||f===void 0?void 0:f.onLastListenerRemove)===null||d===void 0||d.call(f),(u=this._leakageMon)===null||u===void 0||u.dispose())}}class h extends t{constructor(n){super(n);this._isPaused=0,this._eventQueue=new w.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 r extends h{constructor(n){var l;super(n);this._delay=(l=n.delay)!==null&&l!==void 0?l: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(l,f,d)=>n(u=>{const o=this.buffers[this.buffers.length-1];o?o.push(()=>l.call(f,u)):l.call(f,u)},void 0,d)}bufferEvents(n){const l=[];this.buffers.push(l);const f=n();return this.buffers.pop(),l.forEach(d=>d()),f}}class i{constructor(){this.listening=!1,this.inputEvent=b.None,this.inputEventListener=g.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(B,Q,D){"use strict";(function(N,g){D.d(Q,"b",function(){return f}),D.d(Q,"i",function(){return s}),D.d(Q,"f",function(){return E}),D.d(Q,"d",function(){return v}),D.d(Q,"g",function(){return p}),D.d(Q,"h",function(){return I}),D.d(Q,"c",function(){return R}),D.d(Q,"k",function(){return y}),D.d(Q,"j",function(){return x}),D.d(Q,"a",function(){return C}),D.d(Q,"e",function(){return j});var w;const k="en";let b=!1,m=!1,T=!1,_=!1,t=!1,h=!1,r=!1,c,i=k,n,l;const f=typeof self=="object"?self:typeof N=="object"?N:{};let d;typeof f.vscode!="undefined"&&typeof f.vscode.process!="undefined"?d=f.vscode.process:typeof g!="undefined"&&(d=g);const u=typeof((w=d==null?void 0:d.versions)===null||w===void 0?void 0:w.electron)=="string"&&d.type==="renderer";if(typeof navigator=="object"&&!u)l=navigator.userAgent,b=l.indexOf("Windows")>=0,m=l.indexOf("Macintosh")>=0,r=(l.indexOf("Macintosh")>=0||l.indexOf("iPad")>=0||l.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,T=l.indexOf("Linux")>=0,h=!0,c=navigator.language,i=c;else if(typeof d=="object"){b=d.platform==="win32",m=d.platform==="darwin",T=d.platform==="linux",_=T&&!!d.env.SNAP&&!!d.env.SNAP_REVISION,c=k,i=k;const A=d.env.VSCODE_NLS_CONFIG;if(A)try{const Y=JSON.parse(A),z=Y.availableLanguages["*"];c=Y.locale,i=z||k,n=Y._translationsConfigFile}catch(Y){}t=!0}else console.error("Unable to resolve platform.");let o=0;m?o=1:b?o=3:T&&(o=2);const s=b,E=m,v=T,p=t,I=h,R=r,y=l,x=function(){if(f.setImmediate)return f.setImmediate.bind(f);if(typeof f.postMessage=="function"&&!f.importScripts){let z=[];f.addEventListener("message",H=>{if(H.data&&H.data.vscodeSetImmediateId)for(let U=0,L=z.length;U<L;U++){const K=z[U];if(K.id===H.data.vscodeSetImmediateId){z.splice(U,1),K.callback();return}}});let O=0;return H=>{const U=++O;z.push({id:U,callback:H}),f.postMessage({vscodeSetImmediateId:U},"*")}}if(typeof(d==null?void 0:d.nextTick)=="function")return d.nextTick.bind(d);const Y=Promise.resolve();return z=>Y.then(z)}(),C=m||r?2:b?1:3;let S=!0,F=!1;function j(){if(!F){F=!0;const A=new Uint8Array(2);A[0]=1,A[1]=2;const Y=new Uint16Array(A.buffer);S=Y[0]===(2<<8)+1}return S}}).call(this,D("IyRk"),D("Q2Ig"))},MlIO:function(B,Q,D){(function(N,g){B.exports=Q=g(D("Ib8C"))})(this,function(N){return function(g){var w=N,k=w.lib,b=k.Base,m=k.WordArray,T=w.x64={},_=T.Word=b.extend({init:function(h,r){this.high=h,this.low=r}}),t=T.WordArray=b.extend({init:function(h,r){h=this.words=h||[],r!=g?this.sigBytes=r:this.sigBytes=h.length*8},toX32:function(){for(var h=this.words,r=h.length,c=[],i=0;i<r;i++){var n=h[i];c.push(n.high),c.push(n.low)}return m.create(c,this.sigBytes)},clone:function(){for(var h=b.clone.call(this),r=h.words=this.words.slice(0),c=r.length,i=0;i<c;i++)r[i]=r[i].clone();return h}})}(),N})},N0LK:function(B,Q,D){"use strict";D.d(Q,"C",function(){return N}),D.d(Q,"v",function(){return w}),D.d(Q,"s",function(){return k}),D.d(Q,"t",function(){return b}),D.d(Q,"U",function(){return m}),D.d(Q,"J",function(){return T}),D.d(Q,"O",function(){return _}),D.d(Q,"p",function(){return t}),D.d(Q,"T",function(){return h}),D.d(Q,"q",function(){return r}),D.d(Q,"N",function(){return c}),D.d(Q,"M",function(){return i}),D.d(Q,"Q",function(){return n}),D.d(Q,"u",function(){return l}),D.d(Q,"x",function(){return f}),D.d(Q,"I",function(){return d}),D.d(Q,"f",function(){return u}),D.d(Q,"h",function(){return o}),D.d(Q,"g",function(){return s}),D.d(Q,"i",function(){return E}),D.d(Q,"G",function(){return v}),D.d(Q,"H",function(){return p}),D.d(Q,"r",function(){return I}),D.d(Q,"R",function(){return R}),D.d(Q,"d",function(){return y}),D.d(Q,"e",function(){return x}),D.d(Q,"E",function(){return C}),D.d(Q,"F",function(){return S}),D.d(Q,"j",function(){return F}),D.d(Q,"z",function(){return j}),D.d(Q,"K",function(){return Y}),D.d(Q,"L",function(){return z}),D.d(Q,"m",function(){return H}),D.d(Q,"k",function(){return L}),D.d(Q,"A",function(){return ee}),D.d(Q,"a",function(){return oe}),D.d(Q,"n",function(){return ae}),D.d(Q,"l",function(){return be}),D.d(Q,"D",function(){return _e}),D.d(Q,"B",function(){return fe}),D.d(Q,"b",function(){return Re}),D.d(Q,"S",function(){return Ce}),D.d(Q,"o",function(){return ce}),D.d(Q,"P",function(){return te}),D.d(Q,"w",function(){return W}),D.d(Q,"c",function(){return X}),D.d(Q,"y",function(){return q});function N($){return!$||typeof $!="string"?!0:$.trim().length===0}const g=/{(\d+)}/g;function w($,...le){return le.length===0?$:$.replace(g,function(he,Se){const Ue=parseInt(Se,10);return isNaN(Ue)||Ue<0||Ue>=le.length?he:le[Ue]})}function k($){return $.replace(/[<>&]/g,function(le){switch(le){case"<":return"<";case">":return">";case"&":return"&";default:return le}})}function b($){return $.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function m($,le=" "){const he=T($,le);return _(he,le)}function T($,le){if(!$||!le)return $;const he=le.length;if(he===0||$.length===0)return $;let Se=0;for(;$.indexOf(le,Se)===Se;)Se=Se+he;return $.substring(Se)}function _($,le){if(!$||!le)return $;const he=le.length,Se=$.length;if(he===0||Se===0)return $;let Ue=Se,Xe=-1;for(;!(Xe=$.lastIndexOf(le,Ue-1),Xe===-1||Xe+he!==Ue);){if(Xe===0)return"";Ue=Xe}return $.substring(0,Ue)}function t($){return $.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function h($){return $.replace(/\*/g,"")}function r($,le,he={}){if(!$)throw new Error("Cannot create regex from empty string");le||($=b($)),he.wholeWord&&(/\B/.test($.charAt(0))||($="\\b"+$),/\B/.test($.charAt($.length-1))||($=$+"\\b"));let Se="";return he.global&&(Se+="g"),he.matchCase||(Se+="i"),he.multiline&&(Se+="m"),he.unicode&&(Se+="u"),new RegExp($,Se)}function c($){if($.source==="^"||$.source==="^$"||$.source==="$"||$.source==="^\\s*$")return!1;const le=$.exec("");return!!(le&&$.lastIndex===0)}function i($){return($.global?"g":"")+($.ignoreCase?"i":"")+($.multiline?"m":"")+($.unicode?"u":"")}function n($){return $.split(/\r\n|\r|\n/)}function l($){for(let le=0,he=$.length;le<he;le++){const Se=$.charCodeAt(le);if(Se!==32&&Se!==9)return le}return-1}function f($,le=0,he=$.length){for(let Se=le;Se<he;Se++){const Ue=$.charCodeAt(Se);if(Ue!==32&&Ue!==9)return $.substring(le,Se)}return $.substring(le,he)}function d($,le=$.length-1){for(let he=le;he>=0;he--){const Se=$.charCodeAt(he);if(Se!==32&&Se!==9)return he}return-1}function u($,le){return $<le?-1:$>le?1:0}function o($,le,he=0,Se=$.length,Ue=0,Xe=le.length){for(;he<Se&&Ue<Xe;he++,Ue++){let et=$.charCodeAt(he),qe=le.charCodeAt(Ue);if(et<qe)return-1;if(et>qe)return 1}const $e=Se-he,Ye=Xe-Ue;return $e<Ye?-1:$e>Ye?1:0}function s($,le){return E($,le,0,$.length,0,le.length)}function E($,le,he=0,Se=$.length,Ue=0,Xe=le.length){for(;he<Se&&Ue<Xe;he++,Ue++){let et=$.charCodeAt(he),qe=le.charCodeAt(Ue);if(et===qe)continue;if(et>=128||qe>=128)return o($.toLowerCase(),le.toLowerCase(),he,Se,Ue,Xe);v(et)&&(et-=32),v(qe)&&(qe-=32);const Pe=et-qe;if(Pe===0)continue;return Pe}const $e=Se-he,Ye=Xe-Ue;return $e<Ye?-1:$e>Ye?1:0}function v($){return $>=97&&$<=122}function p($){return $>=65&&$<=90}function I($,le){return $.length===le.length&&E($,le)===0}function R($,le){const he=le.length;return le.length>$.length?!1:E($,le,0,he)===0}function y($,le){let he,Se=Math.min($.length,le.length);for(he=0;he<Se;he++)if($.charCodeAt(he)!==le.charCodeAt(he))return he;return Se}function x($,le){let he,Se=Math.min($.length,le.length);const Ue=$.length-1,Xe=le.length-1;for(he=0;he<Se;he++)if($.charCodeAt(Ue-he)!==le.charCodeAt(Xe-he))return he;return Se}function C($){return 55296<=$&&$<=56319}function S($){return 56320<=$&&$<=57343}function F($,le){return($-55296<<10)+(le-56320)+65536}function j($,le,he){const Se=$.charCodeAt(he);if(C(Se)&&he+1<le){const Ue=$.charCodeAt(he+1);if(S(Ue))return F(Se,Ue)}return Se}function A($,le){const he=$.charCodeAt(le-1);if(S(he)&&le>1){const Se=$.charCodeAt(le-2);if(C(Se))return F(Se,he)}return he}function Y($,le){const he=V.getInstance(),Se=le,Ue=$.length,Xe=j($,Ue,le);le+=Xe>=65536?2:1;let $e=he.getGraphemeBreakType(Xe);for(;le<Ue;){const Ye=j($,Ue,le),et=he.getGraphemeBreakType(Ye);if(X($e,et))break;le+=Ye>=65536?2:1,$e=et}return le-Se}function z($,le){const he=V.getInstance(),Se=le,Ue=A($,le);le-=Ue>=65536?2:1;let Xe=he.getGraphemeBreakType(Ue);for(;le>0;){const $e=A($,le),Ye=he.getGraphemeBreakType($e);if(X(Ye,Xe))break;le-=$e>=65536?2:1,Xe=Ye}return Se-le}const O=/(?:[\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($){return O.test($)}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 L($){return U.test($)}const K=/^[\t\n\r\x20-\x7E]*$/;function ee($){return K.test($)}const oe=/[\u2028\u2029]/;function ae($){return oe.test($)}function be($){for(let le=0,he=$.length;le<he;le++)if(_e($.charCodeAt(le)))return!0;return!1}function _e($){return $=+$,$>=11904&&$<=55215||$>=63744&&$<=64255||$>=65281&&$<=65374}function fe($){return $>=127462&&$<=127487||$===8986||$===8987||$===9200||$===9203||$>=9728&&$<=10175||$===11088||$===11093||$>=127744&&$<=128591||$>=128640&&$<=128764||$>=128992&&$<=129003||$>=129280&&$<=129535||$>=129648&&$<=129750}const Re=String.fromCharCode(65279);function Ce($){return!!($&&$.length>0&&$.charCodeAt(0)===65279)}function ce($,le=!1){return $?(le&&($=$.replace(/\\./g,"")),$.toLowerCase()!==$):!1}function te($){const le=90-65+1;return $=$%(2*le),$<le?String.fromCharCode(97+$):String.fromCharCode(65+$-le)}function W($){const le=V.getInstance();return le.getGraphemeBreakType($)}function X($,le){return $===0?le!==5&&le!==7:$===2&&le===3?!1:$===4||$===2||$===3||(le===4||le===2||le===3)?!0:$===8&&(le===8||le===9||le===11||le===12)||(($===11||$===9)&&(le===9||le===10)||(($===12||$===10)&&le===10||(le===5||le===13||(le===7||($===1||$===13&&le===14)))))?!1:!($===6&&le===6)}class V{constructor(){this._data=Z()}static getInstance(){return V._INSTANCE||(V._INSTANCE=new V),V._INSTANCE}getGraphemeBreakType($){if($<32)return $===10?3:$===13?2:4;if($<127)return 0;const le=this._data,he=le.length/3;let Se=1;for(;Se<=he;)if($<le[3*Se])Se=2*Se;else if($>le[3*Se+1])Se=2*Se+1;else return le[3*Se+2];return 0}}V._INSTANCE=null;function Z(){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 q($,le){if($===0)return 0;const he=ie($,le);if(he!==void 0)return he;const Se=A(le,$);return $-=ne(Se),$}function ie($,le){let he=A(le,$);for($-=ne(he);J(he)||he===65039||he===8419;){if($===0)return;he=A(le,$),$-=ne(he)}if(!fe(he))return;if($>=0){const Se=A(le,$);Se===8205&&($-=ne(Se))}return $}function ne($){return $>=65536?2:1}function J($){return 127995<=$&&$<=127999}},NFKh:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("MlIO"),D("F+F2"),D("qM6L"),D("ETIr"),D("wbyO"),D("cv67"),D("3y9D"),D("lPiR"),D("GRuw"),D("1uat"),D("uGsb"),D("5hvy"),D("ELcG"),D("WYAk"),D("e7zE"),D("K3mO"),D("OLod"),D("ALsQ"),D("9OqN"),D("qu8F"),D("S6kV"),D("gb/T"),D("qBft"),D("oRuE"),D("jO9C"),D("KmYQ"),D("uGxW"),D("bQjk"),D("wZgz"),D("pA7S"),D("w7YG"),D("E4JC"),D("PVpz"))})(this,function(N){return N})},NvD2:function(B,Q,D){"use strict";D.d(Q,"a",function(){return m});var N=D("Kwbf");function g(T,_){var t=new Set;return T.forEach(function(h){_.has(h)||t.add(h)}),t}function w(T){var _=T||{},t=_.disabled,h=_.disableCheckbox,r=_.checkable;return!!(t||h)||r===!1}function k(T,_,t,h){for(var r=new Set(T),c=new Set,i=0;i<=t;i+=1){var n=_.get(i)||new Set;n.forEach(function(u){var o=u.key,s=u.node,E=u.children,v=E===void 0?[]:E;r.has(o)&&!h(s)&&v.filter(function(p){return!h(p.node)}).forEach(function(p){r.add(p.key)})})}for(var l=new Set,f=t;f>=0;f-=1){var d=_.get(f)||new Set;d.forEach(function(u){var o=u.parent,s=u.node;if(h(s)||!u.parent||l.has(u.parent.key))return;if(h(u.parent.node)){l.add(o.key);return}var E=!0,v=!1;(o.children||[]).filter(function(p){return!h(p.node)}).forEach(function(p){var I=p.key,R=r.has(I);E&&!R&&(E=!1),!v&&(R||c.has(I))&&(v=!0)}),E&&r.add(o.key),v&&c.add(o.key),l.add(o.key)})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(g(c,r))}}function b(T,_,t,h,r){for(var c=new Set(T),i=new Set(_),n=0;n<=h;n+=1){var l=t.get(n)||new Set;l.forEach(function(o){var s=o.key,E=o.node,v=o.children,p=v===void 0?[]:v;!c.has(s)&&!i.has(s)&&!r(E)&&p.filter(function(I){return!r(I.node)}).forEach(function(I){c.delete(I.key)})})}i=new Set;for(var f=new Set,d=h;d>=0;d-=1){var u=t.get(d)||new Set;u.forEach(function(o){var s=o.parent,E=o.node;if(r(E)||!o.parent||f.has(o.parent.key))return;if(r(o.parent.node)){f.add(s.key);return}var v=!0,p=!1;(s.children||[]).filter(function(I){return!r(I.node)}).forEach(function(I){var R=I.key,y=c.has(R);v&&!y&&(v=!1),!p&&(y||i.has(R))&&(p=!0)}),v||c.delete(s.key),p&&i.add(s.key),f.add(s.key)})}return{checkedKeys:Array.from(c),halfCheckedKeys:Array.from(g(i,c))}}function m(T,_,t,h){var r=[],c;h?c=h:c=w;var i=new Set(T.filter(function(d){var u=!!t[d];return u||r.push(d),u})),n=new Map,l=0;Object.keys(t).forEach(function(d){var u=t[d],o=u.level,s=n.get(o);s||(s=new Set,n.set(o,s)),s.add(u),l=Math.max(l,o)}),Object(N.a)(!r.length,"Tree missing follow keys: ".concat(r.slice(0,100).map(function(d){return"'".concat(d,"'")}).join(", ")));var f;return _===!0?f=k(i,n,l,c):f=b(i,_.halfCheckedKeys,n,l,c),f}},OLod:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("K3mO"))})(this,function(N){N.lib.Cipher||function(g){var w=N,k=w.lib,b=k.Base,m=k.WordArray,T=k.BufferedBlockAlgorithm,_=w.enc,t=_.Utf8,h=_.Base64,r=w.algo,c=r.EvpKDF,i=k.Cipher=T.extend({cfg:b.extend(),createEncryptor:function(C,S){return this.create(this._ENC_XFORM_MODE,C,S)},createDecryptor:function(C,S){return this.create(this._DEC_XFORM_MODE,C,S)},init:function(C,S,F){this.cfg=this.cfg.extend(F),this._xformMode=C,this._key=S,this.reset()},reset:function(){T.reset.call(this),this._doReset()},process:function(C){return this._append(C),this._process()},finalize:function(C){C&&this._append(C);var S=this._doFinalize();return S},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function C(S){return typeof S=="string"?x:I}return function(S){return{encrypt:function(F,j,A){return C(j).encrypt(S,F,j,A)},decrypt:function(F,j,A){return C(j).decrypt(S,F,j,A)}}}}()}),n=k.StreamCipher=i.extend({_doFinalize:function(){var C=this._process(!0);return C},blockSize:1}),l=w.mode={},f=k.BlockCipherMode=b.extend({createEncryptor:function(C,S){return this.Encryptor.create(C,S)},createDecryptor:function(C,S){return this.Decryptor.create(C,S)},init:function(C,S){this._cipher=C,this._iv=S}}),d=l.CBC=function(){var C=f.extend();C.Encryptor=C.extend({processBlock:function(F,j){var A=this._cipher,Y=A.blockSize;S.call(this,F,j,Y),A.encryptBlock(F,j),this._prevBlock=F.slice(j,j+Y)}}),C.Decryptor=C.extend({processBlock:function(F,j){var A=this._cipher,Y=A.blockSize,z=F.slice(j,j+Y);A.decryptBlock(F,j),S.call(this,F,j,Y),this._prevBlock=z}});function S(F,j,A){var Y,z=this._iv;z?(Y=z,this._iv=g):Y=this._prevBlock;for(var O=0;O<A;O++)F[j+O]^=Y[O]}return C}(),u=w.pad={},o=u.Pkcs7={pad:function(C,S){for(var F=S*4,j=F-C.sigBytes%F,A=j<<24|j<<16|j<<8|j,Y=[],z=0;z<j;z+=4)Y.push(A);var O=m.create(Y,j);C.concat(O)},unpad:function(C){var S=C.words[C.sigBytes-1>>>2]&255;C.sigBytes-=S}},s=k.BlockCipher=i.extend({cfg:i.cfg.extend({mode:d,padding:o}),reset:function(){var C;i.reset.call(this);var S=this.cfg,F=S.iv,j=S.mode;this._xformMode==this._ENC_XFORM_MODE?C=j.createEncryptor:(C=j.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==C?this._mode.init(this,F&&F.words):(this._mode=C.call(j,this,F&&F.words),this._mode.__creator=C)},_doProcessBlock:function(C,S){this._mode.processBlock(C,S)},_doFinalize:function(){var C,S=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(S.pad(this._data,this.blockSize),C=this._process(!0)):(C=this._process(!0),S.unpad(C)),C},blockSize:128/32}),E=k.CipherParams=b.extend({init:function(C){this.mixIn(C)},toString:function(C){return(C||this.formatter).stringify(this)}}),v=w.format={},p=v.OpenSSL={stringify:function(C){var S,F=C.ciphertext,j=C.salt;return j?S=m.create([1398893684,1701076831]).concat(j).concat(F):S=F,S.toString(h)},parse:function(C){var S,F=h.parse(C),j=F.words;return j[0]==1398893684&&j[1]==1701076831&&(S=m.create(j.slice(2,4)),j.splice(0,4),F.sigBytes-=16),E.create({ciphertext:F,salt:S})}},I=k.SerializableCipher=b.extend({cfg:b.extend({format:p}),encrypt:function(C,S,F,j){j=this.cfg.extend(j);var A=C.createEncryptor(F,j),Y=A.finalize(S),z=A.cfg;return E.create({ciphertext:Y,key:F,iv:z.iv,algorithm:C,mode:z.mode,padding:z.padding,blockSize:C.blockSize,formatter:j.format})},decrypt:function(C,S,F,j){j=this.cfg.extend(j),S=this._parse(S,j.format);var A=C.createDecryptor(F,j).finalize(S.ciphertext);return A},_parse:function(C,S){return typeof C=="string"?S.parse(C,this):C}}),R=w.kdf={},y=R.OpenSSL={execute:function(C,S,F,j){j||(j=m.random(64/8));var A=c.create({keySize:S+F}).compute(C,j),Y=m.create(A.words.slice(S),F*4);return A.sigBytes=S*4,E.create({key:A,iv:Y,salt:j})}},x=k.PasswordBasedCipher=I.extend({cfg:I.cfg.extend({kdf:y}),encrypt:function(C,S,F,j){j=this.cfg.extend(j);var A=j.kdf.execute(F,C.keySize,C.ivSize);j.iv=A.iv;var Y=I.encrypt.call(this,C,S,A.key,j);return Y.mixIn(A),Y},decrypt:function(C,S,F,j){j=this.cfg.extend(j),S=this._parse(S,j.format);var A=j.kdf.execute(F,C.keySize,C.ivSize,S.salt);j.iv=A.iv;var Y=I.decrypt.call(this,C,S,A.key,j);return Y}})}()})},OZM5:function(B,Q,D){"use strict";D.d(Q,"b",function(){return h}),D.d(Q,"a",function(){return r}),D.d(Q,"k",function(){return c}),D.d(Q,"h",function(){return i}),D.d(Q,"i",function(){return n}),D.d(Q,"g",function(){return l}),D.d(Q,"c",function(){return f}),D.d(Q,"d",function(){return d}),D.d(Q,"j",function(){return s}),D.d(Q,"e",function(){return E}),D.d(Q,"f",function(){return v});var N=D("KQm4"),g=D("U8pU"),w=D("Ff2n"),k=D("q1tI"),b=D.n(k),m=D("Kwbf"),T=D("WaYH"),_=.25,t=2;function h(p,I){var R=p.slice(),y=R.indexOf(I);return y>=0&&R.splice(y,1),R}function r(p,I){var R=p.slice();return R.indexOf(I)===-1&&R.push(I),R}function c(p){return p.split("-")}function i(p,I){return"".concat(p,"-").concat(I)}function n(p){return p&&p.type&&p.type.isTreeNode}function l(p,I){var R=[p],y=I[p];function x(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];C.forEach(function(S){var F=S.key,j=S.children;R.push(F),x(j)})}return x(y.children),R}function f(p,I){var R=p.clientY,y=I.selectHandle.getBoundingClientRect(),x=y.top,C=y.bottom,S=y.height,F=Math.max(S*_,t);return R<=x+F?-1:R>=C-F?1:0}function d(p,I){if(!p)return;var R=I.multiple;return R?p.slice():p.length?[p[0]]:p}var u=function(I){return I};function o(p,I){if(!p)return[];var R=I||{},y=R.processProps,x=y===void 0?u:y,C=Array.isArray(p)?p:[p];return C.map(function(S){var F=S.children,j=Object(w.a)(S,["children"]),A=o(F,I);return b.a.createElement(T.a,Object.assign({},x(j)),A)})}function s(p){if(!p)return null;var I;if(Array.isArray(p))I={checkedKeys:p,halfCheckedKeys:void 0};else if(Object(g.a)(p)==="object")I={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 I}function E(p,I){var R=new Set;function y(x){if(R.has(x))return;var C=I[x];if(!C)return;R.add(x);var S=C.parent,F=C.node;if(F.disabled)return;S&&y(S.key)}return(p||[]).forEach(function(x){y(x)}),Object(N.a)(R)}function v(p){var I={};return Object.keys(p).forEach(function(R){(R.startsWith("data-")||R.startsWith("aria-"))&&(I[R]=p[R])}),I}},Ot1p:function(B,Q,D){"use strict";var N=D("2qtc"),g=D("kLXV"),w=D("rAM+"),k=D("miYZ"),b=D("tsqr"),m=D("9og8"),T=D("tJVT"),_=D("jrin"),t=D("WmNS"),h=D.n(t),r=D("q1tI"),c=D.n(r),i=D("VrN/"),n=D.n(i),l=D("bdgK"),f=D("p77/"),d=D("Bd2K"),u=D("ELLl"),o=D("19Vz"),s=D("lZu9"),E=D("+NIl"),v=D("kSUc"),p=D("9Bee"),I=function(Me){var We=Me.value,rt=We===void 0?"":We,at=Me.className,it=Me.showTextOnly,st=Me.showLines,Ct=Me.style,yt=Ct===void 0?{}:Ct,ht=Object(r.useMemo)(function(){return""},[rt]);return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{dangerouslySetInnerHTML:{__html:ht}}))},R=D("0Owb"),y=D("dejd"),x=D("C+DQ"),C=D("1vsH"),S=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 j(Me){var We=Me.onActionCallback,rt=Me.title,at=Me.icon,it=Me.actionName,st=Me.className,Ct=st===void 0?"":st,yt=Me.children;function ht(){We(it)}return c.a.createElement("a",{title:rt,className:Ct,onClick:ht},c.a.createElement("i",{className:"md-iconfont ".concat(at)}),yt)}var A=function(Me){var We=Me.watch,rt=Me.showNullButton,at=Me.onActionCallback,it=Me.fullScreen,st=Me.insertTemp,Ct=Me.hidetoolBar,yt=Me.uuid,ht=Me.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(C.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(C.F)("_educoder_session"),"&key=").concat(yt,"&api=").concat(encodeURIComponent(S.a.PROXY_SERVER)));var Ut=[].concat(F,[{title:"".concat(We?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(We?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return c.a.createElement("ul",{className:"markdown-toolbar-container"},!Ct&&Ut.map(function(kt,Yt){return c.a.createElement("li",{key:Yt},kt.actionName?c.a.createElement(j,Object(R.a)({},kt,{onActionCallback:at})):c.a.createElement("span",{className:"v-line"}))}),rt?c.a.createElement("li",null,c.a.createElement(j,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:at},c.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,st&&c.a.createElement("li",null,c.a.createElement(j,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(st),onActionCallback:at},c.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),c.a.createElement("li",{className:"btn-full-screen"},c.a.createElement(j,{icon:"".concat(it?"icon-shrink":"icon-enlarge"),title:it?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:at})))},Y=D("M8RZ"),z=D("+L6B"),O=D("2/Rp"),H=D("y8nQ"),U=D("Vl3Y"),L=D("5NDa"),K=D("5rEg"),ee={labelCol:{span:4},wrapperCol:{span:20}},oe=function(Me){var We=Me.callback,rt=Me.onCancel;function at(it){We(it)}return c.a.createElement(U.a,Object(R.a)({},ee,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:at}),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(K.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(K.a,null)),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(O.a,{type:"ghost",onClick:rt},"\u53D6\u6D88")))},ae=D("7ahc"),be=D("HmJG"),_e=D("BjJ7"),fe=U.a.useForm,Re={width:280,marginRight:10},Ce={labelCol:{span:5},wrapperCol:{span:19}},ce=function(Me){var We=Me.callback,rt=Me.onCancel,at=fe(),it=Object(T.a)(at,1),st=it[0];function Ct(Ut){We(Ut)}function yt(Ut,kt){if(Ut.status===-1){b.b.error(Ut.message);return}st.setFieldsValue({src:"/api/attachments/".concat(Ut.id),type:kt.type})}function ht(Ut){var kt=Ut.target.files[0];W(kt,yt)}return c.a.createElement(U.a,Object(R.a)({form:st},Ce,{className:"upload-image-panel",onFinish:Ct}),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(K.a,{style:Re})),c.a.createElement(te,{onFileChange:ht}))),c.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},c.a.createElement(K.a,{style:{width:264}})),c.a.createElement(U.a.Item,{style:{textAlign:"right"}},c.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(O.a,{type:"ghost",onClick:rt},"\u53D6\u6D88")))};function te(Me){var We=Me.onFileChange;return c.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",c.a.createElement("input",{type:"file",onChange:We}))}function W(Me,We){if(!Me)throw new String("\u6CA1\u6709\u6587\u4EF6");var rt=new FormData;rt.append("editormd-image-file",Me),rt.append("file_param_name","editormd-image-file"),rt.append("byxhr","true");var at=new window.XMLHttpRequest;at.withCredentials=!0,at.addEventListener("load",function(it){We(JSON.parse(it.target.responseText),Me)},!1),at.addEventListener("error",function(it){console.error(it)},!1),at.open("POST","".concat(_e.a,"/api/attachments.json")),at.send(rt)}var X=D("giR+"),V=D("fyUT"),Z=D("7Kak"),q=D("9yH6"),ie=q.a.Group,ne={margin:"0 8px"},J=function(Me){var We=Me.callback,rt=Me.onCancel;function at(it){We(it)}return c.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:at},c.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},c.a.createElement("span",{style:ne},"\u5355\u5143\u683C\u6570\uFF1A"),c.a.createElement("span",{style:ne},"\u884C\u6570"),c.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},c.a.createElement(V.a,null)),c.a.createElement("span",{style:ne},"\u5217\u6570"),c.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},c.a.createElement(V.a,null))),c.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},c.a.createElement("span",{style:ne},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),c.a.createElement(U.a.Item,{name:"align"},c.a.createElement(ie,null,c.a.createElement(q.a,{value:"default"},c.a.createElement("i",{className:"fa fa-align-justify"})),c.a.createElement(q.a,{value:"left"},c.a.createElement("i",{className:"fa fa-align-left"})),c.a.createElement(q.a,{value:"center"},c.a.createElement("i",{className:"fa fa-align-center"})),c.a.createElement(q.a,{value:"right"},c.a.createElement("i",{className:"fa fa-align-right"}))))),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(O.a,{type:"ghost",onClick:rt},"\u53D6\u6D88")))},$=D("ErOA"),le=D("7Cbv"),he="link",Se="upload-image",Ue="code-block",Xe="add-table",$e="------------",Ye={default:$e,left:":".concat($e),center:":".concat($e,":"),right:"".concat($e,":")},et=D("9VGf"),qe,Pe;function Ie(){}var Ze=0,nt=1e4,ye="\u2581",ue=`
|
|
|
**\u6A21\u677F\u6807\u9898**
|
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function pe(Me){return/^\d+$/.test(Me)?"".concat(Me,"px"):Me}var me=navigator.platform.toUpperCase().indexOf("MAC")>=0,Oe=me?"Cmd":"Ctrl",ve=["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"],xe=(qe={},Object(_.a)(qe,Oe+"-B","bold"),Object(_.a)(qe,Oe+"-I","italic"),qe),Ae=(Pe={},Object(_.a)(Pe,he,"\u6DFB\u52A0\u94FE\u63A5"),Object(_.a)(Pe,Ue,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(_.a)(Pe,Se,"\u6DFB\u52A0\u6587\u4EF6"),Object(_.a)(Pe,Xe,"\u6DFB\u52A0\u8868\u683C"),Pe),Le=Q.a=function(Me){var We=Me.defaultValue,rt=We===void 0?"":We,at=Me.onChange,it=Me.width,st=it===void 0?"100%":it,Ct=Me.height,yt=Ct===void 0?400:Ct,ht=Me.miniToolbar,Ut=ht===void 0?!1:ht,kt=Me.isFocus,Yt=kt===void 0?!1:kt,Zt=Me.watch,Mt=Me.insertTemp,wt=Me.mode,$t=wt===void 0?"markdown":wt,Dt=Me.id,Tt=Dt===void 0?"markdown-editor-id":Dt,_t=Me.showResizeBar,Et=_t===void 0?!1:_t,Bt=Me.noStorage,Dr=Bt===void 0?!1:Bt,pt=Me.showNullButton,St=pt===void 0?!1:pt,dt=Me.hidetoolBar,Ht=dt===void 0?!1:dt,Gt=Me.fullScreen,vt=Gt===void 0?!1:Gt,xt=Me.onBlur,Kt=Me.onCMBeforeChange,Ar=Me.onFullScreen,qt=Me.className,ut=qt===void 0?"":qt,Lt=Me.disablePaste,Hr=Lt===void 0?!1:Lt,Yr=Me.placeholder,On=Yr===void 0?"":Yr,cn=Me.values,zr=cn===void 0?"":cn,Pt=Object(r.useState)(null),dn=Object(T.a)(Pt,2),ct=dn[0],jr=dn[1],xr=Object(r.useState)(rt),Gn=Object(T.a)(xr,2),An=Gn[0],hn=Gn[1],Ei=Object(r.useState)(Zt),Kn=Object(T.a)(Ei,2),bn=Kn[0],Fr=Kn[1],di=Object(r.useState)(vt),fn=Object(T.a)(di,2),Vr=fn[0],dr=fn[1],nn=Object(r.useState)(""),_n=Object(T.a)(nn,2),jt=_n[0],lr=_n[1],ur=Object(r.useState)(0),Rr=Object(T.a)(ur,2),br=Rr[0],hi=Rr[1],Fn=Object(r.useState)(yt),$i=Object(T.a)(Fn,2),Ji=$i[0],Oi=$i[1],pn=Object(r.useState)(!1),Ki=Object(T.a)(pn,2),Zr=Ki[0],ri=Ki[1],kn=Object(r.useRef)(Object(le.a)()),sn=Object(r.useRef)(!1),Tn=Object(r.useRef)(),fi=Object(r.useRef)(),zn=Object(r.useRef)(),Vn=Object(r.useRef)(),ki=Object(r.useRef)(),Mi=function(){var Ft=Object(m.a)(h.a.mark(function er(){var zt,ar;return h.a.wrap(function(Lr){for(;;)switch(Lr.prev=Lr.next){case 0:return Lr.next=2,Object($.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:kn.current}});case 2:ar=Lr.sent,ar!=null&&(zt=ar.attachments)!==null&&zt!==void 0&&zt.length&&(console.log("cm:",ct,fi),ar.attachments.map(function(mr){mr.content_type.indexOf("image")>-1?ct.replaceSelection(".concat(mr.content_type,")")):mr.content_type.indexOf("video")>-1?ct.replaceSelection('<video width="100%" controls src="'.concat(S.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):mr.content_type.indexOf("pdf")>-1?ct.replaceSelection('<a href="'.concat(S.a.API_SERVER,"/api/attachments/").concat(mr.id,"?type=").concat(mr.content_type,'&disposition=inline" target="_blank">').concat(mr.name,"</a>")):ct.replaceSelection("[".concat(mr.name,"](").concat(S.a.API_SERVER,"/api/attachments/").concat(mr.id,"?type=").concat(mr.content_type,")"))}));case 4:case"end":return Lr.stop()}},er)}));return function(){return Ft.apply(this,arguments)}}();Object(r.useEffect)(function(){hn(zr),ct==null||ct.setValue(zr)},[zr]),Object(r.useEffect)(function(){Ar==null||Ar(Vr)},[Vr]),Object(r.useEffect)(function(){if(fi.current){var Ft=n.a.fromTextArea(fi.current,{mode:$t,lineNumbers:!Ut,lineWrapping:!0,value:rt,autoCloseTags:!0,autoCloseBrackets:!0});Yt&&Ft.focus();function er(zt,ar){if(Hr){ar.preventDefault();return}var _r=ar.clipboardData;if(_r){var Lr=_r.types.toString(),mr=_r.items;if(Lr==="Files"||_r.types.indexOf("Files")>-1){if(ar.preventDefault(),$t=="stex")return;try{var qr,Un=mr[1];((qr=mr[0])===null||qr===void 0?void 0:qr.kind)==="file"&&(Un=mr[0]);var hr=Un.getAsFile(),vi=hr.name.split(".").pop();W(hr,function(kr){if(kr.id){var Sn,Rn,li;(hr==null||((Sn=hr.type)===null||Sn===void 0)?void 0:Sn.indexOf("image"))>-1?Ft.replaceSelection(".concat(kr.content_type,")")):(hr==null||((Rn=hr.type)===null||Rn===void 0)?void 0:Rn.indexOf("video"))>-1?Ft.replaceSelection('<video width="100%" controls src="'.concat(S.a.API_SERVER,"/api/attachments/").concat(kr.id,'"></video>')):(hr==null||((li=hr.type)===null||li===void 0)?void 0:li.indexOf("pdf"))>-1?Ft.replaceSelection('<a href="'.concat(S.a.API_SERVER,"/api/attachments/").concat(kr.id,"?type=").concat(hr.type,'&disposition=inline" target="_blank">').concat(hr.name,"</a>")):ve.includes(vi)?Ft.replaceSelection('<a href="'.concat(S.a.API_SERVER,"/api/attachments/").concat(kr.id,'?type=office&disposition=inline" target="_blank">').concat(hr.name,"</a>")):Ft.replaceSelection("[".concat(hr.name,"](").concat(S.a.API_SERVER,"/api/attachments/").concat(kr.id,"?type=").concat(kr.content_type,")"))}else(kr==null?void 0:kr.status)===401&&(document.location.href="/user/login")})}catch(kr){b.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Ft.on("paste",er),Ft.on("dragleave",function(zt,ar){zn.current.classList.remove("mouse-hover-md")}),Ft.on("dragover",function(zt,ar){zn.current.classList.add("mouse-hover-md")}),Ft.on("drop",function(zt,ar){zn.current.classList.add("mouse-hover-md");var _r;if(_r=ar.dataTransfer.files,_r.length>0){ar.preventDefault(),ar.stopPropagation();for(var Lr=function(Un){var hr=_r[Un],vi=hr.name.split(".").pop();W(hr,function(kr){if(kr.id){var Sn,Rn,li;(hr==null||((Sn=hr.type)===null||Sn===void 0)?void 0:Sn.indexOf("image"))>-1?Ft.replaceSelection(".concat(kr.content_type,")")):(hr==null||((Rn=hr.type)===null||Rn===void 0)?void 0:Rn.indexOf("video"))>-1?Ft.replaceSelection('<video width="100%" controls src="'.concat(S.a.API_SERVER,"/api/attachments/").concat(kr.id,'"></video>')):(hr==null||((li=hr.type)===null||li===void 0)?void 0:li.indexOf("pdf"))>-1?Ft.replaceSelection('<a href="'.concat(S.a.API_SERVER,"/api/attachments/").concat(kr.id,"?type=").concat(hr.type,'&disposition=inline" target="_blank">').concat(hr.name,"</a>")):ve.includes(vi)?Ft.replaceSelection('<a href="'.concat(S.a.API_SERVER,"/api/attachments/").concat(kr.id,'?type=office&disposition=inline" target="_blank">').concat(hr.name,"</a>")):Ft.replaceSelection("[".concat(hr.name,"](").concat(S.a.API_SERVER,"/api/attachments/").concat(kr.id,"?type=").concat(kr.content_type,")"))}else(kr==null?void 0:kr.status)===401&&(document.location.href="/user/login")})},mr=0;mr<_r.length;mr++)Lr(mr)}}),jr(Ft),function(){Ft.off("paste",er)}}},[]);var Xn=Object(r.useCallback)(function(){if(zn.current)try{}catch(Ft){console.log(Ft,"---- to set md editor body height")}},[Ji,zn,Vr]);Object(r.useEffect)(function(){function Ft(){var zt=new l.default(function(ar){var _r=Object(w.a)(ar),Lr;try{for(_r.s();!(Lr=_r.n()).done;){var mr=Lr.value;(mr.target.offsetHeight>0||mr.target.offsetWidth>0)&&(Xn(),ct.setSize("100%","100%"),ct.refresh())}}catch(qr){_r.e(qr)}finally{_r.f()}});return zt.observe(fi.current.parentElement),zt}if(ct){var er=Ft();return function(){er.unobserve(fi.current.parentElement)}}},[ct,Xn]),Object(r.useEffect)(function(){if(ct){for(var Ft=[],er=function(){var mr=ar[zt];_r=Object(T.a)(mr,2);var qr=_r[0],Un=_r[1],hr=Object(_.a)({},qr,function(){ji(Un)});Ft.push(hr),ct.addKeyMap(hr)},zt=0,ar=Object.entries(xe);zt<ar.length;zt++){var _r;er()}return Tn.current=setInterval(function(){sn.current&&Mi()},4e3),function(){clearInterval(Tn.current);var Lr=Object(w.a)(Ft),mr;try{for(Lr.s();!(mr=Lr.n()).done;){var qr=mr.value;ct.removeKeyMap(qr)}}catch(Un){Lr.e(Un)}finally{Lr.f()}}}},[ct]),Object(r.useEffect)(function(){vt!==Vr&&dr(vt)},[vt]),Object(et.a)(function(){if(!Dr&&br>0){var Ft=new Date().getTime(),er=window.sessionStorage.getItem(Tt);Ft>=br+nt&&(!er||er!==An)&&(window.sessionStorage.setItem(Tt,An),ri(!0))}},nt),Object(r.useEffect)(function(){Fr(Zt)},[ct,Zt]),Object(r.useEffect)(function(){ct&&(Yt&&ct.focus())},[ct,Yt]),Object(r.useEffect)(function(){if(bn&&ct){var Ft=ct.getScrollerElement();function er(zt){var ar=zt.target;if(ki.current){var _r=ar.scrollTop/ar.scrollHeight;ki.current.scrollTop=ki.current.scrollHeight*_r}}return Ft.addEventListener("scroll",er),function(){Ft.removeEventListener("scroll",er)}}},[ct,bn]),Object(r.useEffect)(function(){if(ct&&Kt){function Ft(er,zt){Kt(er,zt)}return ct.on("beforeChange",Ft),function(){ct.off("beforeChange",Ft)}}},[ct,Kt]),Object(r.useEffect)(function(){if(ct&&xt){function Ft(){xt(ct.getValue())}return ct.on("blur",Ft),function(){ct.off("blur",Ft)}}},[ct,xt]),Object(r.useEffect)(function(){if(ct){function Ft(er){var zt=er.getValue();hn(zt),hi(new Date().getTime()),er.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),at&&at(zt)}return ct.on("change",Ft),function(){ct.off("change",Ft)}}},[ct,at]),Object(r.useEffect)(function(){ct&&(rt==null?(ct.setValue(""),hn("")):rt!==ct.getValue()&&(ct.setValue(rt),hn(rt),ct.setCursor(ct.lineCount(),0)))},[ct,rt]);var ji=Object(r.useCallback)(function(Ft){var er=ct.getCursor(),zt=ct.getSelection(),ar=zt.split(`
|
|
|
`);switch(Ft){case"bold":return ct.replaceSelection("**"+zt+"**"),zt===""&&ct.setCursor(er.line,er.ch+2),ct.focus();case"italic":return ct.replaceSelection("*"+zt+"*"),zt===""&&ct.setCursor(er.line,er.ch+1),ct.focus();case"code":return ct.replaceSelection("`"+zt+"`"),zt===""&&ct.setCursor(er.line,er.ch+1),ct.focus();case"inline-latex":return ct.replaceSelection("`$$"+zt+"$$`"),zt===""&&ct.setCursor(er.line,er.ch+3),ct.focus();case"latex":return ct.replaceSelection("```latex\n"+zt+"\n```"),ct.setCursor(er.line+1,zt.length+1),ct.focus();case"line-break":return ct.replaceSelection(`<br/>
|
|
|
`),ct.focus();case"list-ul":return zt===""?ct.replaceSelection("- "+zt):ct.replaceSelection(ar.map(function(_r){return _r===""?"":"- ".concat(_r)}).join(`
|
|
|
`)),ct.focus();case"list-ol":return zt===""?ct.replaceSelection("1. "+zt):ct.replaceSelection(ar.map(function(_r,Lr){return _r===""?"":"".concat(Lr+1,". ").concat(_r)}).join(`
|
|
|
`)),ct.focus();case"add-null-ch":return zt===""&&ct.setCursor(er.line,er.ch+1),ct.replaceSelection(ye),ct.focus();case"inster-template-1":return zt===""&&ct.setCursor(er.line,er.ch),ct.replaceSelection(ue),ct.focus();case"eraser":return ct.setValue(""),ct.focus();case"trigger-watch":return Fr(!bn),ct.focus();case"trigger-full-screen":return dr(!Vr),ct.focus();case he:lr(he);return;case Ue:lr(Ue);return;case Se:lr(Se);return;case Xe:lr(Xe);return;default:throw new Error}},[ct,bn,Vr]),pi=Object(r.useCallback)(function(Ft){lr("");switch(jt){case he:var er=Ft.title,zt=Ft.link;return ct.replaceSelection("[".concat(er,"](").concat(zt,")")),ct.focus();case Ue:var ar=Ft.language,_r=Ft.content;return ct.replaceSelection(["```"+ar,_r,"```"].join(`
|
|
|
`)),ct.focus();case Se:var Lr=Ft.src,mr=Ft.alt;return mr?ct.replaceSelection(".concat(Lr,' "').concat(mr,'" )')):ct.replaceSelection("")),ct.focus();case Xe:for(var qr=Ft.row,Un=Ft.col,hr=Ft.align,vi=`
|
|
|
`,kr=0;kr<qr;kr++){for(var Sn=[],Rn=[],li=0;li<Un;li++)kr===1&&Rn.push(Ye[hr]),Sn.push(" ");kr===1&&(vi+="| ".concat(Rn.join(" | "),` |
|
|
|
`)),vi+="| ".concat(Sn.join(Un===1?"":" | "),` |
|
|
|
`)}return ct.replaceSelection(vi+`
|
|
|
`),ct.focus();default:throw new Error}},[ct,jt]),mi=Object(r.useMemo)(function(){switch(jt){case he:return c.a.createElement(oe,{callback:pi,onCancel:Yn});case Ue:return c.a.createElement(ae.b,{callback:pi,onCancel:Yn});case Se:return c.a.createElement(ce,{callback:pi,onCancel:Yn});case Xe:return c.a.createElement(J,{callback:pi,onCancel:Yn});default:return null}},[jt]);function Yn(){lr("")}Object(r.useEffect)(function(){if(Vn.current){var Ft=Vn.current,er=!1,zt=0;function ar(mr){er=!0,zt=mr.pageY}function _r(){er=!1}function Lr(mr){if(er){var qr=mr.pageY-zt;qr<0&&(qr=0),qr>300&&(qr=300);var Un=yt+qr+"px";Oi(Un)}}return Ft.addEventListener("mousedown",ar),document.addEventListener("mousemove",Lr),document.addEventListener("mouseup",_r),function(){Ft.removeEventListener("mousedown",ar),document.removeEventListener("mousemove",Lr),document.removeEventListener("mouseup",_r)}}},[ct,Vn]),Object(r.useEffect)(function(){Oi(yt)},[yt]);var $n=pe(st),Pi=pe(Ji),ni={width:$n,height:Pi},gi=Object(r.useMemo)(function(){if(br){var Ft=new Date(br),er=Ft.getHours(),zt=Ft.getMinutes(),ar=Ft.getSeconds();return er=er<10?"0"+er:er,zt=zt<10?"0"+zt:zt,ar=ar<10?"0"+ar:ar,"".concat(er,":").concat(zt,":").concat(ar)}return 0},[br]);function Fi(){window.sessionStorage.removeItem(Tt),ri(!1),hi(0)}function ii(){ri(!1),hi(0),ct.setValue(window.sessionStorage.getItem(Tt))}function Ur(Ft,er){var zt=ct.getValue();zt=zt.replace(Ft,er),hn(zt),ct==null||ct.setValue(zt)}return c.a.createElement(r.Fragment,null,c.a.createElement("div",{className:"markdown-editor-wrapper",ref:zn},c.a.createElement("div",{className:"markdown-editor-container ".concat(ut," ").concat(bn?"on-preview":""," ").concat(Ut?"mini":""," ").concat(Vr?"full-screen":""),style:ni},c.a.createElement(A,{insertTemp:Mt,watch:bn,fullScreen:Vr,showNullButton:St,onActionCallback:ji,hidetoolBar:Ht,uuid:kn.current,setOpenPhones:function(){sn.current=!0}}),c.a.createElement("div",{className:"markdown-editor-body"},c.a.createElement("div",{className:"codemirror-container"},c.a.createElement("textarea",{ref:fi,placeholder:On})),bn?c.a.createElement("div",{ref:ki,className:"preview-container"},$t==="stex"&&c.a.createElement(I,{value:An}),$t!=="stex"&&c.a.createElement(p.a,{edit:!0,value:An,replaces:Ur})):null))),Et?c.a.createElement("a",{ref:Vn,className:"editor-resize"}):null,c.a.createElement(Y.a,null,Ae[jt]?c.a.createElement(g.a,{centered:!0,title:Ae[jt],visible:!0,onCancel:Yn,footer:null,className:"markdown-popup-form"},mi):null))}},PD8m:function(B,Q){B.exports={name:"memoryStorage",read:N,write:g,each:w,remove:k,clearAll:b};var D={};function N(m){return D[m]}function g(m,T){D[m]=T}function w(m){for(var T in D)D.hasOwnProperty(T)&&m(D[T],T)}function k(m){delete D[m]}function b(m){D={}}},PVpz:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(N){return function(){var g=N,w=g.lib,k=w.StreamCipher,b=g.algo,m=[],T=[],_=[],t=b.RabbitLegacy=k.extend({_doReset:function(){var r=this._key.words,c=this.cfg.iv,i=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],n=this._C=[r[2]<<16|r[2]>>>16,r[0]&4294901760|r[1]&65535,r[3]<<16|r[3]>>>16,r[1]&4294901760|r[2]&65535,r[0]<<16|r[0]>>>16,r[2]&4294901760|r[3]&65535,r[1]<<16|r[1]>>>16,r[3]&4294901760|r[0]&65535];this._b=0;for(var l=0;l<4;l++)h.call(this);for(var l=0;l<8;l++)n[l]^=i[l+4&7];if(c){var f=c.words,d=f[0],u=f[1],o=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,s=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,E=o>>>16|s&4294901760,v=s<<16|o&65535;n[0]^=o,n[1]^=E,n[2]^=s,n[3]^=v,n[4]^=o,n[5]^=E,n[6]^=s,n[7]^=v;for(var l=0;l<4;l++)h.call(this)}},_doProcessBlock:function(r,c){var i=this._X;h.call(this),m[0]=i[0]^i[5]>>>16^i[3]<<16,m[1]=i[2]^i[7]>>>16^i[5]<<16,m[2]=i[4]^i[1]>>>16^i[7]<<16,m[3]=i[6]^i[3]>>>16^i[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,r[c+n]^=m[n]},blockSize:128/32,ivSize:64/32});function h(){for(var r=this._X,c=this._C,i=0;i<8;i++)T[i]=c[i];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0<T[0]>>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0<T[1]>>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0<T[2]>>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0<T[3]>>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0<T[4]>>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0<T[5]>>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0<T[6]>>>0?1:0)|0,this._b=c[7]>>>0<T[7]>>>0?1:0;for(var i=0;i<8;i++){var n=r[i]+c[i],l=n&65535,f=n>>>16,d=((l*l>>>17)+l*f>>>15)+f*f,u=((n&4294901760)*n|0)+((n&65535)*n|0);_[i]=d^u}r[0]=_[0]+(_[7]<<16|_[7]>>>16)+(_[6]<<16|_[6]>>>16)|0,r[1]=_[1]+(_[0]<<8|_[0]>>>24)+_[7]|0,r[2]=_[2]+(_[1]<<16|_[1]>>>16)+(_[0]<<16|_[0]>>>16)|0,r[3]=_[3]+(_[2]<<8|_[2]>>>24)+_[1]|0,r[4]=_[4]+(_[3]<<16|_[3]>>>16)+(_[2]<<16|_[2]>>>16)|0,r[5]=_[5]+(_[4]<<8|_[4]>>>24)+_[3]|0,r[6]=_[6]+(_[5]<<16|_[5]>>>16)+(_[4]<<16|_[4]>>>16)|0,r[7]=_[7]+(_[6]<<8|_[6]>>>24)+_[5]|0}g.RabbitLegacy=k._createHelper(t)}(),N.RabbitLegacy})},RELg:function(B,Q,D){var N=D("MFOe"),g=N.Global;B.exports={name:"oldIE-userDataStorage",write:T,read:_,each:t,remove:h,clearAll:r};var w="storejs",k=g.document,b=n(),m=(g.navigator?g.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function T(l,f){if(m)return;var d=i(l);b(function(u){u.setAttribute(d,f),u.save(w)})}function _(l){if(m)return;var f=i(l),d=null;return b(function(u){d=u.getAttribute(f)}),d}function t(l){b(function(f){for(var d=f.XMLDocument.documentElement.attributes,u=d.length-1;u>=0;u--){var o=d[u];l(f.getAttribute(o.name),o.name)}})}function h(l){var f=i(l);b(function(d){d.removeAttribute(f),d.save(w)})}function r(){b(function(l){var f=l.XMLDocument.documentElement.attributes;l.load(w);for(var d=f.length-1;d>=0;d--)l.removeAttribute(f[d].name);l.save(w)})}var c=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function i(l){return l.replace(/^\d/,"___$&").replace(c,"___")}function n(){if(!k||!k.documentElement||!k.documentElement.addBehavior)return null;var l="script",f,d,u;try{d=new ActiveXObject("htmlfile"),d.open(),d.write("<"+l+">document.w=window</"+l+'><iframe src="/favicon.ico"></iframe>'),d.close(),f=d.w.frames[0].document,u=f.createElement("div")}catch(o){u=k.createElement("div"),f=k.body}return function(o){var s=[].slice.call(arguments,0);s.unshift(u),f.appendChild(u),u.addBehavior("#default#userData"),u.load(w),o.apply(this,s),f.removeChild(u);return}}},S6kV:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("OLod"))})(this,function(N){return N.mode.OFB=function(){var g=N.lib.BlockCipherMode.extend(),w=g.Encryptor=g.extend({processBlock:function(k,b){var m=this._cipher,T=m.blockSize,_=this._iv,t=this._keystream;_&&(t=this._keystream=_.slice(0),this._iv=void 0),m.encryptBlock(t,0);for(var h=0;h<T;h++)k[b+h]^=t[h]}});return g.Decryptor=w,g}(),N.mode.OFB})},"SA+Z":function(B,Q,D){var N=D("wTVA"),g=D("EbDI"),w=D("ZhPi"),k=D("wkBT");function b(m){return N(m)||g(m)||w(m)||k()}B.exports=b,B.exports.__esModule=!0,B.exports.default=B.exports},SJMd:function(B,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,N,g,w=!1,k,b;window.PR_SHOULD_USE_CONTINUATION=!0;var m,T;(function(){var _=window,t=["break,continue,do,else,for,if,return,while"],h=[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"],r=[h,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],c=[r,"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"],i=[r,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],n=[r,"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"],l="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",f=[r,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],d="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",u=[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"],o=[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"],s=[t,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],E=[c,n,i,f,d,u,o,s],v=/^(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",I="kwd",R="com",y="typ",x="lit",C="pun",S="pln",F="tag",j="dec",A="src",Y="atn",z="atv",O="nocode",H="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(ie){for(var ne=0,J=!1,$=!1,le=0,he=ie.length;le<he;++le){var Se=ie[le];if(Se.ignoreCase)$=!0;else if(/[a-z]/i.test(Se.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){J=!0,$=!1;break}}var Ue={b:8,t:9,n:10,v:11,f:12,r:13};function Xe(Pe){var Ie=Pe.charCodeAt(0);if(Ie!==92)return Ie;var Ze=Pe.charAt(1);return Ie=Ue[Ze],Ie||("0"<=Ze&&Ze<="7"?parseInt(Pe.substring(1),8):Ze==="u"||Ze==="x"?parseInt(Pe.substring(2),16):Pe.charCodeAt(1))}function $e(Pe){if(Pe<32)return(Pe<16?"\\x0":"\\x")+Pe.toString(16);var Ie=String.fromCharCode(Pe);return Ie==="\\"||Ie==="-"||Ie==="]"||Ie==="^"?"\\"+Ie:Ie}function Ye(Pe){var Ie=Pe.substring(1,Pe.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")),Ze=[],nt=Ie[0]==="^",ye=["["];nt&&ye.push("^");for(var ue=nt?1:0,pe=Ie.length;ue<pe;++ue){var me=Ie[ue];if(/\\[bdsw]/i.test(me))ye.push(me);else{var Oe=Xe(me),ve;ue+2<pe&&Ie[ue+1]==="-"?(ve=Xe(Ie[ue+2]),ue+=2):ve=Oe,Ze.push([Oe,ve]),ve<65||Oe>122||(ve<65||Oe>90||Ze.push([Math.max(65,Oe)|32,Math.min(ve,90)|32]),ve<97||Oe>122||Ze.push([Math.max(97,Oe)&~32,Math.min(ve,122)&~32]))}}Ze.sort(function(Me,We){return Me[0]-We[0]||We[1]-Me[1]});for(var xe=[],Ae=[],ue=0;ue<Ze.length;++ue){var Le=Ze[ue];Le[0]<=Ae[1]+1?Ae[1]=Math.max(Ae[1],Le[1]):xe.push(Ae=Le)}for(var ue=0;ue<xe.length;++ue){var Le=xe[ue];ye.push($e(Le[0])),Le[1]>Le[0]&&(Le[1]+1>Le[0]&&ye.push("-"),ye.push($e(Le[1])))}return ye.push("]"),ye.join("")}function et(Pe){for(var Ie=Pe.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")),Ze=Ie.length,nt=[],ye=0,ue=0;ye<Ze;++ye){var pe=Ie[ye];if(pe==="(")++ue;else if(pe.charAt(0)==="\\"){var me=+pe.substring(1);me&&(me<=ue?nt[me]=-1:Ie[ye]=$e(me))}}for(var ye=1;ye<nt.length;++ye)nt[ye]===-1&&(nt[ye]=++ne);for(var ye=0,ue=0;ye<Ze;++ye){var pe=Ie[ye];if(pe==="(")++ue,nt[ue]||(Ie[ye]="(?:");else if(pe.charAt(0)==="\\"){var me=+pe.substring(1);me&&me<=ue&&(Ie[ye]="\\"+nt[me])}}for(var ye=0;ye<Ze;++ye)Ie[ye]==="^"&&Ie[ye+1]!=="^"&&(Ie[ye]="");if(Pe.ignoreCase&&J)for(var ye=0;ye<Ze;++ye){var pe=Ie[ye],Oe=pe.charAt(0);pe.length>=2&&Oe==="["?Ie[ye]=Ye(pe):Oe!=="\\"&&(Ie[ye]=pe.replace(/[a-zA-Z]/g,function(Ae){var Le=Ae.charCodeAt(0);return"["+String.fromCharCode(Le&~32,Le|32)+"]"}))}return Ie.join("")}for(var qe=[],le=0,he=ie.length;le<he;++le){var Se=ie[le];if(Se.global||Se.multiline)throw new Error(""+Se);qe.push("(?:"+et(Se)+")")}return new RegExp(qe.join("|"),$?"gi":"g")}function L(ie,ne){var J=/(?:^|\s)nocode(?:\s|$)/,$=[],le=0,he=[],Se=0;function Ue(Xe){var $e=Xe.nodeType;if($e==1){if(J.test(Xe.className))return;for(var Ye=Xe.firstChild;Ye;Ye=Ye.nextSibling)Ue(Ye);var et=Xe.nodeName.toLowerCase();(et==="br"||et==="li")&&($[Se]=`
|
|
|
`,he[Se<<1]=le++,he[Se++<<1|1]=Xe)}else if($e==3||$e==4){var qe=Xe.nodeValue;qe.length&&(ne?qe=qe.replace(/\r\n?/g,`
|
|
|
`):qe=qe.replace(/[ \t\r\n]+/g," "),$[Se]=qe,he[Se<<1]=le,le+=qe.length,he[Se++<<1|1]=Xe)}}return Ue(ie),{sourceCode:$.join("").replace(/\n$/,""),spans:he}}function K(ie,ne,J,$,le){if(!J)return;var he={sourceNode:ie,pre:1,langExtension:null,numberLines:null,sourceCode:J,spans:null,basePos:ne,decorations:null};$(he),le.push.apply(le,he.decorations)}var ee=/\S/;function oe(ie){for(var ne=void 0,J=ie.firstChild;J;J=J.nextSibling){var $=J.nodeType;ne=$===1?ne?ie:J:$===3&&ee.test(J.nodeValue)?ie:ne}return ne===ie?void 0:ne}function ae(ie,ne){var J={},$;(function(){for(var Se=ie.concat(ne),Ue=[],Xe={},$e=0,Ye=Se.length;$e<Ye;++$e){var et=Se[$e],qe=et[3];if(qe)for(var Pe=qe.length;--Pe>=0;)J[qe.charAt(Pe)]=et;var Ie=et[1],Ze=""+Ie;Xe.hasOwnProperty(Ze)||(Ue.push(Ie),Xe[Ze]=null)}Ue.push(/[\0-\uffff]/),$=U(Ue)})();var le=ne.length,he=function(Se){for(var Ue=Se.sourceCode,Xe=Se.basePos,$e=Se.sourceNode,Ye=[Xe,S],et=0,qe=Ue.match($)||[],Pe={},Ie=0,Ze=qe.length;Ie<Ze;++Ie){var nt=qe[Ie],ye=Pe[nt],ue=void 0,pe;if(typeof ye=="string")pe=!1;else{var me=J[nt.charAt(0)];if(me)ue=nt.match(me[1]),ye=me[0];else{for(var Oe=0;Oe<le;++Oe)if(me=ne[Oe],ue=nt.match(me[1]),ue){ye=me[0];break}ue||(ye=S)}pe=ye.length>=5&&ye.substring(0,5)==="lang-",pe&&!(ue&&typeof ue[1]=="string")&&(pe=!1,ye=A),pe||(Pe[nt]=ye)}var ve=et;if(et+=nt.length,!pe)Ye.push(Xe+ve,ye);else{var xe=ue[1],Ae=nt.indexOf(xe),Le=Ae+xe.length;ue[2]&&(Le=nt.length-ue[2].length,Ae=Le-xe.length);var Me=ye.substring(5);K($e,Xe+ve,nt.substring(0,Ae),he,Ye),K($e,Xe+ve+Ae,xe,te(Me,xe),Ye),K($e,Xe+ve+Le,nt.substring(Le),he,Ye)}}Se.decorations=Ye};return he}function be(ie){var ne=[],J=[];ie.tripleQuotedStrings?ne.push([p,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ie.multiLineStrings?ne.push([p,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ne.push([p,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ie.verbatimStrings&&J.push([p,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var $=ie.hashComments;$&&(ie.cStyleComments?($>1?ne.push([R,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ne.push([R,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),J.push([p,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ne.push([R,/^#[^\r\n]*/,null,"#"])),ie.cStyleComments&&(J.push([R,/^\/\/[^\r\n]*/,null]),J.push([R,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var le=ie.regexLiterals;if(le){var he=le>1?"":`
|
|
|
\r`,Se=he?".":"[\\S\\s]",Ue="/(?=[^/*"+he+"])(?:[^/\\x5B\\x5C"+he+"]|\\x5C"+Se+"|\\x5B(?:[^\\x5C\\x5D"+he+"]|\\x5C"+Se+")*(?:\\x5D|$))+/";J.push(["lang-regex",RegExp("^"+H+"("+Ue+")")])}var Xe=ie.types;Xe&&J.push([y,Xe]);var $e=(""+ie.keywords).replace(/^ | $/g,"");$e.length&&J.push([I,new RegExp("^(?:"+$e.replace(/[\s,]+/g,"|")+")\\b"),null]),ne.push([S,/^\s+/,null,` \r
|
|
|
\xA0`]);var Ye="^.[^\\s\\w.$@'\"`/\\\\]*";return ie.regexLiterals&&(Ye+="(?!s*/)"),J.push([x,/^@[a-z_$][a-z_$@0-9]*/i,null],[y,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[S,/^[a-z_$][a-z_$@0-9]*/i,null],[x,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[S,/^\\[\s\S]?/,null],[C,new RegExp(Ye),null]),ae(ne,J)}var _e=be({keywords:E,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function fe(ie,ne,J){for(var $=/(?:^|\s)nocode(?:\s|$)/,le=/\r\n?|\n/,he=ie.ownerDocument,Se=he.createElement("li");ie.firstChild;)Se.appendChild(ie.firstChild);var Ue=[Se];function Xe(Ie){var Ze=Ie.nodeType;if(Ze==1&&!$.test(Ie.className))if(Ie.nodeName==="br")$e(Ie),Ie.parentNode&&Ie.parentNode.removeChild(Ie);else for(var nt=Ie.firstChild;nt;nt=nt.nextSibling)Xe(nt);else if((Ze==3||Ze==4)&&J){var ye=Ie.nodeValue,ue=ye.match(le);if(ue){var pe=ye.substring(0,ue.index);Ie.nodeValue=pe;var me=ye.substring(ue.index+ue[0].length);if(me){var Oe=Ie.parentNode;Oe.insertBefore(he.createTextNode(me),Ie.nextSibling)}$e(Ie),pe||Ie.parentNode.removeChild(Ie)}}}function $e(Ie){for(;!Ie.nextSibling;)if(Ie=Ie.parentNode,!Ie)return;function Ze(ue,pe){var me=pe?ue.cloneNode(!1):ue,Oe=ue.parentNode;if(Oe){var ve=Ze(Oe,1),xe=ue.nextSibling;ve.appendChild(me);for(var Ae=xe;Ae;Ae=xe)xe=Ae.nextSibling,ve.appendChild(Ae)}return me}for(var nt=Ze(Ie.nextSibling,0),ye;(ye=nt.parentNode)&&ye.nodeType===1;)nt=ye;Ue.push(nt)}for(var Ye=0;Ye<Ue.length;++Ye)Xe(Ue[Ye]);ne===(ne|0)&&Ue[0].setAttribute("value",ne);var et=he.createElement("ol");et.className="linenums";for(var qe=Math.max(0,ne-1|0)||0,Ye=0,Pe=Ue.length;Ye<Pe;++Ye)Se=Ue[Ye],Se.className="L"+(Ye+qe)%10,Se.firstChild||Se.appendChild(he.createTextNode("\xA0")),et.appendChild(Se);ie.appendChild(et)}function Re(ie){var ne=/\bMSIE\s(\d+)/.exec(navigator.userAgent);ne=ne&&+ne[1]<=8;var J=/\n/g,$=ie.sourceCode,le=$.length,he=0,Se=ie.spans,Ue=Se.length,Xe=0,$e=ie.decorations,Ye=$e.length,et=0;$e[Ye]=le;var qe,Pe;for(Pe=qe=0;Pe<Ye;)$e[Pe]!==$e[Pe+2]?($e[qe++]=$e[Pe++],$e[qe++]=$e[Pe++]):Pe+=2;for(Ye=qe,Pe=qe=0;Pe<Ye;){for(var Ie=$e[Pe],Ze=$e[Pe+1],nt=Pe+2;nt+2<=Ye&&$e[nt+1]===Ze;)nt+=2;$e[qe++]=Ie,$e[qe++]=Ze,Pe=nt}Ye=$e.length=qe;var ye=ie.sourceNode,ue="";ye&&(ue=ye.style.display,ye.style.display="none");try{for(var pe=null;Xe<Ue;){var me=Se[Xe],Oe=Se[Xe+2]||le,ve=$e[et+2]||le,nt=Math.min(Oe,ve),xe=Se[Xe+1],Ae;if(xe.nodeType!==1&&(Ae=$.substring(he,nt))){ne&&(Ae=Ae.replace(J,"\r")),xe.nodeValue=Ae;var Le=xe.ownerDocument,Me=Le.createElement("span");Me.className=$e[et+1];var We=xe.parentNode;We.replaceChild(Me,xe),Me.appendChild(xe),he<Oe&&(Se[Xe+1]=xe=Le.createTextNode($.substring(nt,Oe)),We.insertBefore(xe,Me.nextSibling))}he=nt,he>=Oe&&(Xe+=2),he>=ve&&(et+=2)}}finally{ye&&(ye.style.display=ue)}}var Ce={};function ce(ie,ne){for(var J=ne.length;--J>=0;){var $=ne[J];Ce.hasOwnProperty($)?_.console&&console.warn("cannot override language handler %s",$):Ce[$]=ie}}function te(ie,ne){return ie&&Ce.hasOwnProperty(ie)||(ie=/^\s*</.test(ne)?"default-markup":"default-code"),Ce[ie]}ce(_e,["default-code"]),ce(ae([],[[S,/^[^<?]+/],[j,/^<!\w[^>]*(?:>|$)/],[R,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[C,/^(?:<[%?]|[%?]>)/],["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"]),ce(ae([[S,/^[\s]+/,null,` \r
|
|
|
`],[z,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[F,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[Y,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[C,/^[=<>\/]+/],["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"]),ce(ae([],[[z,/^[\s\S]+/]]),["uq.val"]),ce(be({keywords:c,hashComments:!0,cStyleComments:!0,types:v}),["c","cc","cpp","cxx","cyc","m"]),ce(be({keywords:"null,true,false"}),["json"]),ce(be({keywords:n,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:v}),["cs"]),ce(be({keywords:i,cStyleComments:!0}),["java"]),ce(be({keywords:s,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ce(be({keywords:u,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ce(be({keywords:d,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ce(be({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ce(be({keywords:f,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ce(be({keywords:l,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ce(ae([],[[p,/^[\s\S]+/]]),["regex"]);function W(ie){var ne=ie.langExtension;try{var J=L(ie.sourceNode,ie.pre),$=J.sourceCode;ie.sourceCode=$,ie.spans=J.spans,ie.basePos=0,te(ne,$)(ie),Re(ie)}catch(le){_.console&&console.log(le&&le.stack||le)}}function X(ie,ne,J){var $=J||!1,le=ne||null,he=document.createElement("div");he.innerHTML="<pre>"+ie+"</pre>",he=he.firstChild,$&&fe(he,$,!0);var Se={langExtension:le,numberLines:$,sourceNode:he,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return W(Se),he.innerHTML}function V(ie,ne){var J=ne||document.body,$=J.ownerDocument||document;function le(me){return J.getElementsByTagName(me)}for(var he=[le("pre"),le("code"),le("xmp")],Se=[],Ue=0;Ue<he.length;++Ue)for(var Xe=0,$e=he[Ue].length;Xe<$e;++Xe)Se.push(he[Ue][Xe]);he=null;var Ye=Date;Ye.now||(Ye={now:function(){return+new Date}});var et=0,qe=/\blang(?:uage)?-([\w.]+)(?!\S)/,Pe=/\bprettyprint\b/,Ie=/\bprettyprinted\b/,Ze=/pre|xmp/i,nt=/^code$/i,ye=/^(?:pre|code|xmp)$/i,ue={};function pe(){for(var me=_.PR_SHOULD_USE_CONTINUATION?Ye.now()+250:Infinity;et<Se.length&&Ye.now()<me;et++){for(var Oe=Se[et],ve=ue,xe=Oe;xe=xe.previousSibling;){var Ae=xe.nodeType,Le=(Ae===7||Ae===8)&&xe.nodeValue;if(Le?!/^\??prettify\b/.test(Le):Ae!==3||/\S/.test(xe.nodeValue))break;if(Le){ve={},Le.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Zt,Mt,wt){ve[Mt]=wt});break}}var Me=Oe.className;if((ve!==ue||Pe.test(Me))&&!Ie.test(Me)){for(var We=!1,rt=Oe.parentNode;rt;rt=rt.parentNode){var at=rt.tagName;if(ye.test(at)&&rt.className&&Pe.test(rt.className)){We=!0;break}}if(!We){Oe.className+=" prettyprinted";var it=ve.lang;if(!it){it=Me.match(qe);var st;!it&&(st=oe(Oe))&&nt.test(st.tagName)&&(it=st.className.match(qe)),it&&(it=it[1])}var Ct;if(Ze.test(Oe.tagName))Ct=1;else{var yt=Oe.currentStyle,ht=$.defaultView,Ut=yt?yt.whiteSpace:ht&&ht.getComputedStyle?ht.getComputedStyle(Oe,null).getPropertyValue("white-space"):0;Ct=Ut&&Ut.substring(0,3)==="pre"}var kt=ve.linenums;(kt=kt==="true"||+kt)||(kt=Me.match(/\blinenums\b(?::(\d+))?/),kt=kt?kt[1]&&kt[1].length?+kt[1]:!0:!1),kt&&fe(Oe,kt,Ct);var Yt={langExtension:it,sourceNode:Oe,numberLines:kt,pre:Ct,sourceCode:null,basePos:null,spans:null,decorations:null};W(Yt)}}}et<Se.length?_.setTimeout(pe,250):typeof ie=="function"&&ie()}pe()}var Z=_.PR={createSimpleLexer:ae,registerLangHandler:ce,sourceDecorator:be,PR_ATTRIB_NAME:Y,PR_ATTRIB_VALUE:z,PR_COMMENT:R,PR_DECLARATION:j,PR_KEYWORD:I,PR_LITERAL:x,PR_NOCODE:O,PR_PLAIN:S,PR_PUNCTUATION:C,PR_SOURCE:A,PR_STRING:p,PR_TAG:F,PR_TYPE:y,prettyPrintOne:w?_.prettyPrintOne=X:m=X,prettyPrint:T=w?_.prettyPrint=V:T=V},q=_.define;typeof q=="function"&&q.amd&&q("google-code-prettify",[],function(){return Z})})()},STEk:function(B,Q,D){"use strict";D.d(Q,"a",function(){return ce});/*! *****************************************************************************
|
|
|
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 N=function(te,W){return(N=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(X,V){X.__proto__=V}||function(X,V){for(var Z in V)Object.prototype.hasOwnProperty.call(V,Z)&&(X[Z]=V[Z])})(te,W)};function g(te,W){function X(){this.constructor=te}N(te,W),te.prototype=W===null?Object.create(W):(X.prototype=W.prototype,new X)}function w(te,W,X,V){return new(X||(X=Promise))(function(Z,q){function ie($){try{J(V.next($))}catch(le){q(le)}}function ne($){try{J(V.throw($))}catch(le){q(le)}}function J($){var le;$.done?Z($.value):(le=$.value,le instanceof X?le:new X(function(he){he(le)})).then(ie,ne)}J((V=V.apply(te,W||[])).next())})}function k(te,W){var X,V,Z,q,ie={label:0,sent:function(){if(1&Z[0])throw Z[1];return Z[1]},trys:[],ops:[]};return q={next:ne(0),throw:ne(1),return:ne(2)},typeof Symbol=="function"&&(q[Symbol.iterator]=function(){return this}),q;function ne(J){return function($){return function(le){if(X)throw new TypeError("Generator is already executing.");for(;ie;)try{if(X=1,V&&(Z=2&le[0]?V.return:le[0]?V.throw||((Z=V.return)&&Z.call(V),0):V.next)&&!(Z=Z.call(V,le[1])).done)return Z;switch(V=0,Z&&(le=[2&le[0],Z.value]),le[0]){case 0:case 1:Z=le;break;case 4:return ie.label++,{value:le[1],done:!1};case 5:ie.label++,V=le[1],le=[0];continue;case 7:le=ie.ops.pop(),ie.trys.pop();continue;default:if(!(Z=ie.trys,(Z=Z.length>0&&Z[Z.length-1])||le[0]!==6&&le[0]!==2)){ie=0;continue}if(le[0]===3&&(!Z||le[1]>Z[0]&&le[1]<Z[3])){ie.label=le[1];break}if(le[0]===6&&ie.label<Z[1]){ie.label=Z[1],Z=le;break}if(Z&&ie.label<Z[2]){ie.label=Z[2],ie.ops.push(le);break}Z[2]&&ie.ops.pop(),ie.trys.pop();continue}le=W.call(te,ie)}catch(he){le=[6,he],V=0}finally{X=Z=0}if(5&le[0])throw le[1];return{value:le[0]?le[1]:void 0,done:!0}}([J,$])}}}function b(){for(var te=0,W=0,X=arguments.length;W<X;W++)te+=arguments[W].length;var V=Array(te),Z=0;for(W=0;W<X;W++)for(var q=arguments[W],ie=0,ne=q.length;ie<ne;ie++,Z++)V[Z]=q[ie];return V}var m=function(){function te(){}return te.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},te.setAttributes=function(W,X){for(var V=0,Z=X;V<Z.length;V++){var q=Z[V],ie=q[0],ne=q[1];W.setAttribute(ie,ne)}},te.createRect=function(W,X,V){var Z=document.createElementNS("http://www.w3.org/2000/svg","rect");return Z.setAttribute("width",W.toString()),Z.setAttribute("height",X.toString()),V&&te.setAttributes(Z,V),Z},te.createLine=function(W,X,V,Z,q){var ie=document.createElementNS("http://www.w3.org/2000/svg","line");return ie.setAttribute("x1",W.toString()),ie.setAttribute("y1",X.toString()),ie.setAttribute("x2",V.toString()),ie.setAttribute("y2",Z.toString()),q&&te.setAttributes(ie,q),ie},te.createPolygon=function(W,X){var V=document.createElementNS("http://www.w3.org/2000/svg","polygon");return V.setAttribute("points",W),X&&te.setAttributes(V,X),V},te.createCircle=function(W,X){var V=document.createElementNS("http://www.w3.org/2000/svg","circle");return V.setAttribute("cx",(W/2).toString()),V.setAttribute("cy",(W/2).toString()),V.setAttribute("r",W.toString()),X&&te.setAttributes(V,X),V},te.createEllipse=function(W,X,V){var Z=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Z.setAttribute("cx",(W/2).toString()),Z.setAttribute("cy",(X/2).toString()),Z.setAttribute("rx",(W/2).toString()),Z.setAttribute("ry",(X/2).toString()),V&&te.setAttributes(Z,V),Z},te.createGroup=function(W){var X=document.createElementNS("http://www.w3.org/2000/svg","g");return W&&te.setAttributes(X,W),X},te.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},te.createMarker=function(W,X,V,Z,q,ie,ne){var J=document.createElementNS("http://www.w3.org/2000/svg","marker");return te.setAttributes(J,[["id",W],["orient",X],["markerWidth",V.toString()],["markerHeight",Z.toString()],["refX",q.toString()],["refY",ie.toString()]]),J.appendChild(ne),J},te.createText=function(W){var X=document.createElementNS("http://www.w3.org/2000/svg","text");return X.setAttribute("x","0"),X.setAttribute("y","0"),W&&te.setAttributes(X,W),X},te.createTSpan=function(W,X){var V=document.createElementNS("http://www.w3.org/2000/svg","tspan");return V.textContent=W,X&&te.setAttributes(V,X),V},te.createImage=function(W){var X=document.createElementNS("http://www.w3.org/2000/svg","image");return W&&te.setAttributes(X,W),X},te.createPoint=function(W,X){var V=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return V.x=W,V.y=X,V},te.createPath=function(W,X){var V=document.createElementNS("http://www.w3.org/2000/svg","path");return V.setAttribute("d",W),X&&te.setAttributes(V,X),V},te}(),T=function(){function te(){}return te.addKey=function(W){te.key=W},Object.defineProperty(te,"isLicensed",{get:function(){return!!te.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(te.key)},enumerable:!1,configurable:!0}),te}(),_=function(){function te(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return te.prototype.rasterize=function(W,X,V){var Z=this;return new Promise(function(q){var ie=V!==void 0?V:document.createElement("canvas");W===null&&(Z.markersOnly=!0,Z.naturalSize=!1);var ne=document.createElementNS("http://www.w3.org/2000/svg","svg");ne.setAttribute("xmlns","http://www.w3.org/2000/svg"),ne.setAttribute("width",X.width.baseVal.valueAsString),ne.setAttribute("height",X.height.baseVal.valueAsString),ne.setAttribute("viewBox","0 0 "+X.viewBox.baseVal.width.toString()+" "+X.viewBox.baseVal.height.toString()),ne.innerHTML=X.innerHTML,Z.naturalSize===!0?(ne.width.baseVal.value=W.naturalWidth,ne.height.baseVal.value=W.naturalHeight):Z.width!==void 0&&Z.height!==void 0&&(ne.width.baseVal.value=Z.width,ne.height.baseVal.value=Z.height),ie.width=ne.width.baseVal.value,ie.height=ne.height.baseVal.value;var J=ne.outerHTML,$=ie.getContext("2d");Z.markersOnly!==!0&&$.drawImage(W,0,0,ie.width,ie.height);var le=window.URL,he=new Image(ie.width,ie.height);he.setAttribute("crossOrigin","anonymous");var Se=new Blob([J],{type:"image/svg+xml"}),Ue=le.createObjectURL(Se);he.onload=function(){$.drawImage(he,0,0),le.revokeObjectURL(Ue);var Xe=ie.toDataURL(Z.imageType,Z.imageQuality);q(Xe)},he.src=Ue})},te}(),t=function(){},h=function(){function te(W){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+W+"_"}return Object.defineProperty(te.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(te.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(te.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),te.prototype.addClass=function(W){return this.styleSheet===void 0&&this.addStyleSheet(),W.name=""+this.classNamePrefix+W.localName,this.classes.push(W),this.styleSheet.sheet.insertRule("."+W.name+" {"+W.style+"}",this.styleSheet.sheet.cssRules.length),W},te.prototype.addRule=function(W){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(W),this.styleSheet.sheet.insertRule(W.selector+" {"+W.style+"}",this.styleSheet.sheet.cssRules.length)},te.prototype.addStyleSheet=function(){var W;this.styleSheet=document.createElement("style"),((W=this.styleSheetRoot)!==null&&W!==void 0?W:document.head).appendChild(this.styleSheet),this.addRule(new r("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new r("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new r("@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;
|
|
|
`))},te.prototype.removeStyleSheet=function(){var W;this.styleSheet&&(((W=this.styleSheetRoot)!==null&&W!==void 0?W:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},te}(),r=function(te,W){this.selector=te,this.style=W},c=function(te,W){this.localName=te,this.style=W},i=function(){function te(W,X,V,Z,q){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=W,this.displayMode=X,this.markerItems=V,this.uiStyleSettings=Z,this.styles=q,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return te.prototype.show=function(W){var X=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=W,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var V=document.createElement("div");V.className=this.toolbarBlockStyleClass.name,V.style.whiteSpace="nowrap",this.uiContainer.appendChild(V),this.addActionButton(V,'<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(V,'<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(V,'<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(V,'<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(V,'<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(V,'<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(V,'<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(V,'<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(q){var ie=document.createElement("div");ie.className=""+X.toolbarButtonStyleClass.name,ie.setAttribute("data-type-name",q.typeName),ie.innerHTML=q.icon,ie.addEventListener("click",function(){X.markerToolbarButtonClicked(ie,q)}),X.buttons.push(ie),X.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 Z=document.createElement("div");Z.className=this.toolbarBlockStyleClass.name,Z.style.whiteSpace="nowrap",Z.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Z),this.addActionButton(Z,'<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(Z,'<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()},te.prototype.addButtonClickListener=function(W){this.buttonClickListeners.push(W)},te.prototype.removeButtonClickListener=function(W){this.buttonClickListeners.indexOf(W)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(W),1)},te.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},te.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var W=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var X=0;X<this.markerButtons.length;X++)X<W||X===W&&this.markerButtons.length-1===W?this.markerButtonBlock.appendChild(this.markerButtons[X]):(X===W&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[X]))}},te.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")},te.prototype.resetButtonStyles=function(){var W=this;this.buttons.forEach(function(X){X.className=X.className.replace(W.uiStyleSettings.toolbarButtonStyleColorsClassName?W.uiStyleSettings.toolbarButtonStyleColorsClassName:W.toolbarButtonStyleColorsClass.name,"").trim(),X.className=X.className.replace(W.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?W.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:W.toolbarActiveButtonStyleColorsClass.name,"").trim(),X.className+=" "+(W.uiStyleSettings.toolbarButtonStyleColorsClassName?W.uiStyleSettings.toolbarButtonStyleColorsClassName:W.toolbarButtonStyleColorsClass.name)})},te.prototype.addActionButton=function(W,X,V){var Z=this,q=document.createElement("div");switch(q.className=""+this.toolbarButtonStyleClass.name,q.innerHTML=X,q.setAttribute("data-action",V),q.addEventListener("click",function(){Z.actionToolbarButtonClicked(q,V)}),V){case"select":q.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":q.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":q.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":q.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":q.style.fill=this.uiStyleSettings.closeButtonColor}W.appendChild(q),this.buttons.push(q)},te.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 W=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new c("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*W)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*W)+`px;
|
|
|
padding: `+W+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new 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 r("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new r("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},te.prototype.markerToolbarButtonClicked=function(W,X){this.setActiveButton(W),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(V){return V("marker",X)}),this.markerButtonOverflowBlock.style.display="none"},te.prototype.actionToolbarButtonClicked=function(W,X){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(V){return V("action",X)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},te.prototype.setActiveButton=function(W){this.resetButtonStyles(),W.className=W.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),W.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},te.prototype.setActiveMarkerButton=function(W){var X=this.markerButtons.find(function(V){return V.getAttribute("data-type-name")===W});X&&this.setActiveButton(X)},te.prototype.setCurrentMarker=function(W){var X=this;this.currentMarker=W,this.buttons.filter(function(V){return/delete|notes/.test(V.getAttribute("data-action"))}).forEach(function(V){X.currentMarker===void 0?(V.style.fillOpacity="0.4",V.style.pointerEvents="none"):(V.style.fillOpacity="1",V.style.pointerEvents="all")})},te}(),n=function(){function te(W,X,V,Z){this.panels=[],this.panelButtons=[],this.markerjsContainer=W,this.displayMode=X,this.uiStyleSettings=V,this.styles=Z,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return te.prototype.addStyles=function(){var W;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 X=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: `+((W=this.uiStyleSettings.toolboxBackgroundColor)!==null&&W!==void 0?W:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new c("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*X)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*X)+`px;
|
|
|
padding: `+X+`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 r("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new r("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},te.prototype.show=function(W){var X;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=W,this.uiContainer.className=this.toolboxStyleClass.name+" "+((X=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&X!==void 0?X:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},te.prototype.setPanelButtons=function(W){var X,V,Z=this;this.panels=W,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((X=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&X!==void 0?X:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((V=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&V!==void 0?V:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(q){var ie;q.uiStyleSettings=Z.uiStyleSettings;var ne=document.createElement("div");ne.className=Z.toolboxButtonStyleClass.name+" "+((ie=Z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ie!==void 0?ie:Z.toolboxButtonStyleColorsClass.name),ne.innerHTML=q.icon,ne.title=q.title,ne.addEventListener("click",function(){Z.panelButtonClick(q)}),Z.panelButtons.push(ne),Z.buttonRow.appendChild(ne)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},te.prototype.panelButtonClick=function(W){var X=this,V=-1;if(W!==this.activePanel){V=this.panels.indexOf(W),this.panelRow.innerHTML="";var Z=W.getUi();Z.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Z),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=W}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){X.displayMode==="inline"?X.panelRow.style.display="none":X.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(q,ie){var ne,J;q.className=X.toolboxButtonStyleClass.name+" "+(ie===V?""+((ne=X.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ne!==void 0?ne:X.toolboxActiveButtonStyleColorsClass.name):""+((J=X.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&J!==void 0?J:X.toolboxButtonStyleColorsClass.name))})},te}(),l=function(te,W){this.title=te,this.icon=W},f=function(te){function W(X,V,Z,q){var ie=te.call(this,X,q||'<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=V,ie.currentColor=Z,ie.setCurrentColor=ie.setCurrentColor.bind(ie),ie.getColorBox=ie.getColorBox.bind(ie),ie}return g(W,te),W.prototype.getUi=function(){var X=this,V=document.createElement("div");return V.style.overflow="hidden",V.style.whiteSpace="nowrap",this.colors.forEach(function(Z){var q=X.getColorBox(Z);V.appendChild(q),X.colorBoxes.push(q)}),V},W.prototype.getColorBox=function(X){var V=this,Z=this.uiStyleSettings.toolbarHeight/4,q=this.uiStyleSettings.toolbarHeight-Z,ie=document.createElement("div");ie.style.display="inline-block",ie.style.boxSizing="content-box",ie.style.width=q-2+"px",ie.style.height=q-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=(q+2)/2+"px",ie.style.borderColor=X===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){V.setCurrentColor(X,ie)});var ne=document.createElement("div");return ne.style.display="inline-block",ne.style.width=q-2+"px",ne.style.height=q-2+"px",ne.style.backgroundColor=X,ne.style.borderRadius=q/2+"px",X==="transparent"&&(ne.style.fill=this.uiStyleSettings.toolboxAccentColor,ne.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(ne),ie},W.prototype.setCurrentColor=function(X,V){var Z=this;this.currentColor=X,this.colorBoxes.forEach(function(q){q.style.borderColor=q===V?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(X)},W}(l),d=function(){function te(W,X,V){this._state="new",this._isSelected=!1,this._container=W,this._overlayContainer=X,this.globalSettings=V,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(te.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(W){return!1},Object.defineProperty(te.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),te.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},te.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},te.prototype.pointerDown=function(W,X){},te.prototype.dblClick=function(W,X){},te.prototype.manipulate=function(W){},te.prototype.pointerUp=function(W){this.stateChanged()},te.prototype.dispose=function(){},te.prototype.addMarkerVisualToContainer=function(W){this.container.childNodes.length>0?this.container.insertBefore(W,this.container.childNodes[0]):this.container.appendChild(W)},te.prototype.getState=function(){return{typeName:te.typeName,state:this.state,notes:this.notes}},te.prototype.restoreState=function(W){this._state=W.state,this.notes=W.notes},te.prototype.scale=function(W,X){},te.prototype.colorChanged=function(W){this.onColorChanged&&this.onColorChanged(W),this.stateChanged()},te.prototype.fillColorChanged=function(W){this.onFillColorChanged&&this.onFillColorChanged(W),this.stateChanged()},te.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var W=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),W.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(W)&&this.onStateChanged(this)}},te.typeName="MarkerBase",te}(),u=function(){function te(){this.findGripByVisual=this.findGripByVisual.bind(this)}return te.prototype.findGripByVisual=function(W){return this.topLeft.ownsTarget(W)?this.topLeft:this.topCenter.ownsTarget(W)?this.topCenter:this.topRight.ownsTarget(W)?this.topRight:this.centerLeft.ownsTarget(W)?this.centerLeft:this.centerRight.ownsTarget(W)?this.centerRight:this.bottomLeft.ownsTarget(W)?this.bottomLeft:this.bottomCenter.ownsTarget(W)?this.bottomCenter:this.bottomRight.ownsTarget(W)?this.bottomRight:void 0},te}(),o=function(){function te(){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 te.prototype.ownsTarget=function(W){return W===this.visual||W===this.visual.childNodes[0]||W===this.visual.childNodes[1]},te}(),s=function(){function te(){}return te.toITransformMatrix=function(W){return{a:W.a,b:W.b,c:W.c,d:W.d,e:W.e,f:W.f}},te.toSVGMatrix=function(W,X){return W.a=X.a,W.b=X.b,W.c=X.c,W.d=X.d,W.e=X.e,W.f=X.f,W},te}(),E=function(te){function W(X,V,Z){var q=te.call(this,X,V,Z)||this;return q.left=0,q.top=0,q.width=0,q.height=0,q.defaultSize={x:50,y:20},q.offsetX=0,q.offsetY=0,q.rotationAngle=0,q.CB_DISTANCE=10,q._suppressMarkerCreateEvent=!1,q.container.transform.baseVal.appendItem(m.createTransform()),q.setupControlBox(),q}return g(W,te),Object.defineProperty(W.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"visual",{get:function(){return this._visual},set:function(X){this._visual=X;var V=m.createTransform();this._visual.transform.baseVal.appendItem(V)},enumerable:!1,configurable:!0}),W.prototype.ownsTarget=function(X){return!!te.prototype.ownsTarget.call(this,X)||!!(this.controlGrips.findGripByVisual(X)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(X))},W.prototype.pointerDown=function(X,V){te.prototype.pointerDown.call(this,X,V),this.state==="new"&&(this.left=X.x,this.top=X.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Z=this.unrotatePoint(X);if(this.manipulationStartX=Z.x,this.manipulationStartY=Z.y,this.offsetX=Z.x-this.left,this.offsetY=Z.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(V),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(V)){this.activeGrip=this.rotatorGrip;var q=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=q.x-this.width/2,this.top=q.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"},W.prototype.pointerUp=function(X){var V=this.state;te.prototype.pointerUp.call(this,X),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(X),this._state="select",V==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},W.prototype.moveVisual=function(X){this.visual.style.transform="translate("+X.x+"px, "+X.y+"px)"},W.prototype.manipulate=function(X){var V=this.unrotatePoint(X);this.state==="creating"?this.resize(X):this.state==="move"?(this.left=this.manipulationStartLeft+(V.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(V.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(V):this.state==="rotate"&&this.rotate(X)},W.prototype.resize=function(X){var V=this.manipulationStartLeft,Z=this.manipulationStartWidth,q=this.manipulationStartTop,ie=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:V=this.manipulationStartLeft+X.x-this.manipulationStartX,Z=this.manipulationStartWidth+this.manipulationStartLeft-V;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Z=this.manipulationStartWidth+X.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:q=this.manipulationStartTop+X.y-this.manipulationStartY,ie=this.manipulationStartHeight+this.manipulationStartTop-q;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ie=this.manipulationStartHeight+X.y-this.manipulationStartY}Z>=0?(this.left=V,this.width=Z):(this.left=V+Z,this.width=-Z),ie>=0?(this.top=q,this.height=ie):(this.top=q+ie,this.height=-ie),this.setSize()},W.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},W.prototype.rotate=function(X){if(Math.abs(X.x-this.centerX)>.1){var V=Math.sign(X.x-this.centerX);this.rotationAngle=180*Math.atan((X.y-this.centerY)/(X.x-this.centerX))/Math.PI+90*V,this.applyRotation()}},W.prototype.applyRotation=function(){var X=this.container.transform.baseVal.getItem(0);X.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(X,0)},W.prototype.rotatePoint=function(X){if(this.rotationAngle===0)return X;var V=this.container.getCTM(),Z=m.createPoint(X.x,X.y);return{x:(Z=Z.matrixTransform(V)).x,y:Z.y}},W.prototype.unrotatePoint=function(X){if(this.rotationAngle===0)return X;var V=this.container.getCTM();V=V.inverse();var Z=m.createPoint(X.x,X.y);return{x:(Z=Z.matrixTransform(V)).x,y:Z.y}},W.prototype.select=function(){te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},W.prototype.deselect=function(){te.prototype.deselect.call(this),this.controlBox.style.display="none"},W.prototype.setupControlBox=function(){this.controlBox=m.createGroup();var X=m.createTransform();X.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(X),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 u,this.addControlGrips(),this.controlBox.style.display="none"},W.prototype.adjustControlBox=function(){var X=this.controlBox.transform.baseVal.getItem(0);X.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(X,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},W.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},W.prototype.createGrip=function(){var X=new o;return X.visual.transform.baseVal.appendItem(m.createTransform()),this.controlBox.appendChild(X.visual),X},W.prototype.positionGrips=function(){var X=this.controlGrips.topLeft.GRIP_SIZE,V=-X/2,Z=V,q=(this.width+this.CB_DISTANCE)/2-X/2,ie=(this.height+this.CB_DISTANCE)/2-X/2,ne=this.height+this.CB_DISTANCE-X/2,J=this.width+this.CB_DISTANCE-X/2;this.positionGrip(this.controlGrips.topLeft.visual,V,Z),this.positionGrip(this.controlGrips.topCenter.visual,q,Z),this.positionGrip(this.controlGrips.topRight.visual,J,Z),this.positionGrip(this.controlGrips.centerLeft.visual,V,ie),this.positionGrip(this.controlGrips.centerRight.visual,J,ie),this.positionGrip(this.controlGrips.bottomLeft.visual,V,ne),this.positionGrip(this.controlGrips.bottomCenter.visual,q,ne),this.positionGrip(this.controlGrips.bottomRight.visual,J,ne),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,q,Z-3*this.CB_DISTANCE)},W.prototype.positionGrip=function(X,V,Z){var q=X.transform.baseVal.getItem(0);q.setTranslate(V,Z),X.transform.baseVal.replaceItem(q,0)},W.prototype.hideControlBox=function(){this.controlBox.style.display="none"},W.prototype.showControlBox=function(){this.controlBox.style.display=""},W.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:s.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:s.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},te.prototype.getState.call(this))},W.prototype.restoreState=function(X){te.prototype.restoreState.call(this,X);var V=X;this.left=V.left,this.top=V.top,this.width=V.width,this.height=V.height,this.rotationAngle=V.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(s.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,V.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(s.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,V.containerTransformMatrix))},W.prototype.scale=function(X,V){te.prototype.scale.call(this,X,V);var Z=this.rotatePoint({x:this.left,y:this.top}),q=this.unrotatePoint({x:Z.x*X,y:Z.y*V});this.left=q.x,this.top=q.y,this.width=this.width*X,this.height=this.height*V,this.adjustControlBox()},W}(d),v=function(te){function W(X,V,Z){var q=te.call(this,X,V,Z)||this;return q.fillColor="transparent",q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.opacity=1,q.setStrokeColor=q.setStrokeColor.bind(q),q.setFillColor=q.setFillColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.createVisual=q.createVisual.bind(q),q}return g(W,te),W.prototype.ownsTarget=function(X){return!(!te.prototype.ownsTarget.call(this,X)&&X!==this.visual)},W.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)},W.prototype.pointerDown=function(X,V){te.prototype.pointerDown.call(this,X,V),this.state==="new"&&(this.createVisual(),this.moveVisual(X),this._state="creating")},W.prototype.manipulate=function(X){te.prototype.manipulate.call(this,X)},W.prototype.resize=function(X){te.prototype.resize.call(this,X),this.setSize()},W.prototype.setSize=function(){te.prototype.setSize.call(this),m.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},W.prototype.pointerUp=function(X){te.prototype.pointerUp.call(this,X),this.setSize()},W.prototype.setStrokeColor=function(X){this.strokeColor=X,this.visual&&m.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(X),this.stateChanged()},W.prototype.setFillColor=function(X){this.fillColor=X,this.visual&&m.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},W.prototype.setStrokeWidth=function(X){this.strokeWidth=X,this.visual&&m.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},W.prototype.setStrokeDasharray=function(X){this.strokeDasharray=X,this.visual&&m.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},W.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},te.prototype.getState.call(this))},W.prototype.restoreState=function(X){var V=X;this.fillColor=V.fillColor,this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.opacity=V.opacity,this.createVisual(),te.prototype.restoreState.call(this,X),this.setSize()},W.prototype.scale=function(X,V){te.prototype.scale.call(this,X,V),this.setSize()},W.title="Rectangle marker",W}(E),p=function(te){function W(X,V,Z,q){var ie=te.call(this,X,q||'<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=V,ie.currentWidth=Z,ie.setCurrentWidth=ie.setCurrentWidth.bind(ie),ie}return g(W,te),W.prototype.getUi=function(){var X=this,V=document.createElement("div");return V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2",this.widths.forEach(function(Z){var q=document.createElement("div");q.style.display="flex",q.style.flexGrow="2",q.style.alignItems="center",q.style.justifyContent="space-between",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.borderColor=Z===X.currentWidth?X.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){X.setCurrentWidth(Z,q)}),V.appendChild(q);var ie=document.createElement("div");ie.innerText=Z.toString(),ie.style.marginRight="5px",q.appendChild(ie);var ne=document.createElement("div");ne.style.minHeight="20px",ne.style.flexGrow="2",ne.style.display="flex",ne.style.alignItems="center";var J=document.createElement("hr");J.style.minWidth="20px",J.style.border="0px",J.style.borderTop=Z+"px solid "+X.uiStyleSettings.toolboxColor,J.style.flexGrow="2",ne.appendChild(J),q.appendChild(ne),X.widthBoxes.push(q)}),V},W.prototype.setCurrentWidth=function(X,V){var Z=this;this.currentWidth=X,this.widthBoxes.forEach(function(q){q.style.borderColor=q===V?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},W}(l),I=function(te){function W(X,V,Z,q){var ie=te.call(this,X,q||'<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=V,ie.currentStyle=Z,ie.setCurrentStyle=ie.setCurrentStyle.bind(ie),ie}return g(W,te),W.prototype.getUi=function(){var X=this,V=document.createElement("div");return V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2",this.styles.forEach(function(Z){var q=document.createElement("div");q.style.display="flex",q.style.alignItems="center",q.style.justifyContent="space-between",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.overflow="hidden",q.style.maxWidth=100/X.styles.length-5+"%",q.style.borderColor=Z===X.currentStyle?X.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){X.setCurrentStyle(Z,q)}),V.appendChild(q);var ie=document.createElement("div");ie.style.minHeight="20px",ie.style.flexGrow="2",ie.style.overflow="hidden";var ne=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+X.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Z!==""?'stroke-dasharray="'+Z+'"':"")+` />
|
|
|
</svg>`;ie.innerHTML=ne,q.appendChild(ie),X.styleBoxes.push(q)}),V},W.prototype.setCurrentStyle=function(X,V){var Z=this;this.currentStyle=X,this.styleBoxes.forEach(function(q){q.style.borderColor=q===V?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},W}(l),R=function(te){function W(X,V,Z){var q=te.call(this,X,V,Z)||this;return q.strokeColor=Z.defaultColor,q.strokeWidth=Z.defaultStrokeWidth,q.strokeDasharray=Z.defaultStrokeDasharray,q.strokePanel=new f("Line color",Z.defaultColorSet,Z.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.strokeWidthPanel=new p("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new I("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q}return g(W,te),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var X=te.prototype.getState.call(this);return X.typeName=W.typeName,X},W.typeName="FrameMarker",W.title="Frame marker",W.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',W}(v),y=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},x=function(te){function W(X,V,Z){var q=te.call(this,X,V,Z)||this;return q.x1=0,q.y1=0,q.x2=0,q.y2=0,q.defaultLength=50,q.manipulationStartX=0,q.manipulationStartY=0,q.manipulationStartX1=0,q.manipulationStartY1=0,q.manipulationStartX2=0,q.manipulationStartY2=0,q.setupControlBox(),q}return g(W,te),W.prototype.ownsTarget=function(X){return!!te.prototype.ownsTarget.call(this,X)||!(!this.grip1.ownsTarget(X)&&!this.grip2.ownsTarget(X))},W.prototype.pointerDown=function(X,V){te.prototype.pointerDown.call(this,X,V),this.manipulationStartX=X.x,this.manipulationStartY=X.y,this.state==="new"&&(this.x1=X.x,this.y1=X.y,this.x2=X.x,this.y2=X.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(V)?this.activeGrip=this.grip1:this.grip2.ownsTarget(V)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},W.prototype.pointerUp=function(X){var V=this.state;te.prototype.pointerUp.call(this,X),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(X),this._state="select",V==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},W.prototype.adjustVisual=function(){},W.prototype.manipulate=function(X){this.state==="creating"?this.resize(X):this.state==="move"?(this.x1=this.manipulationStartX1+X.x-this.manipulationStartX,this.y1=this.manipulationStartY1+X.y-this.manipulationStartY,this.x2=this.manipulationStartX2+X.x-this.manipulationStartX,this.y2=this.manipulationStartY2+X.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(X)},W.prototype.resize=function(X){switch(this.activeGrip){case this.grip1:this.x1=X.x,this.y1=X.y;break;case this.grip2:case void 0:this.x2=X.x,this.y2=X.y}this.adjustVisual(),this.adjustControlBox()},W.prototype.select=function(){te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},W.prototype.deselect=function(){te.prototype.deselect.call(this),this.controlBox.style.display="none"},W.prototype.setupControlBox=function(){this.controlBox=m.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},W.prototype.adjustControlBox=function(){this.positionGrips()},W.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},W.prototype.createGrip=function(){var X=new o;return X.visual.transform.baseVal.appendItem(m.createTransform()),this.controlBox.appendChild(X.visual),X},W.prototype.positionGrips=function(){var X=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-X/2,this.y1-X/2),this.positionGrip(this.grip2.visual,this.x2-X/2,this.y2-X/2)},W.prototype.positionGrip=function(X,V,Z){var q=X.transform.baseVal.getItem(0);q.setTranslate(V,Z),X.transform.baseVal.replaceItem(q,0)},W.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},te.prototype.getState.call(this))},W.prototype.restoreState=function(X){te.prototype.restoreState.call(this,X);var V=X;this.x1=V.x1,this.y1=V.y1,this.x2=V.x2,this.y2=V.y2},W.prototype.scale=function(X,V){te.prototype.scale.call(this,X,V),this.x1=this.x1*X,this.y1=this.y1*V,this.x2=this.x2*X,this.y2=this.y2*V,this.adjustVisual(),this.adjustControlBox()},W}(d),C=function(te){function W(X,V,Z){var q=te.call(this,X,V,Z)||this;return q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.setStrokeColor=q.setStrokeColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.strokeColor=Z.defaultColor,q.strokeWidth=Z.defaultStrokeWidth,q.strokeDasharray=Z.defaultStrokeDasharray,q.strokePanel=new f("Line color",Z.defaultColorSet,Z.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.strokeWidthPanel=new p("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new I("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q}return g(W,te),W.prototype.ownsTarget=function(X){return!(!te.prototype.ownsTarget.call(this,X)&&X!==this.visual&&X!==this.selectorLine&&X!==this.visibleLine)},W.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)},W.prototype.pointerDown=function(X,V){te.prototype.pointerDown.call(this,X,V),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},W.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),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()]]))},W.prototype.setStrokeColor=function(X){this.strokeColor=X,this.adjustVisual(),this.colorChanged(X)},W.prototype.setStrokeWidth=function(X){this.strokeWidth=X,this.adjustVisual()},W.prototype.setStrokeDasharray=function(X){this.strokeDasharray=X,this.adjustVisual(),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var X=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},te.prototype.getState.call(this));return X.typeName=W.typeName,X},W.prototype.restoreState=function(X){te.prototype.restoreState.call(this,X);var V=X;this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.createVisual(),this.adjustVisual()},W.typeName="LineMarker",W.title="Line marker",W.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',W}(x),S=function(te){function W(X,V,Z,q){var ie=te.call(this,X,q||'<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=V,ie.currentFont=Z,ie.setCurrentFont=ie.setCurrentFont.bind(ie),ie}return g(W,te),W.prototype.getUi=function(){var X=this,V=document.createElement("div");return V.style.overflow="hidden",V.style.flexGrow="2",this.fonts.forEach(function(Z){var q=document.createElement("div");q.style.display="inline-block",q.style.alignItems="center",q.style.justifyContent="space-between",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.overflow="hidden",q.style.maxWidth=100/X.fonts.length-5+"%",q.style.borderColor=Z===X.currentFont?X.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){X.setCurrentFont(Z,q)}),V.appendChild(q);var ie=document.createElement("div");ie.style.display="flex",ie.style.minHeight="20px",ie.style.flexGrow="2",ie.style.fontFamily=Z,ie.style.overflow="hidden";var ne=document.createElement("div");ne.style.whiteSpace="nowrap",ne.style.overflow="hidden",ne.style.textOverflow="ellipsis",ne.innerHTML="The quick brown fox jumps over the lazy dog",ie.appendChild(ne),q.appendChild(ie),X.fontBoxes.push(q)}),V},W.prototype.setCurrentFont=function(X,V){var Z=this;this.currentFont=X,this.fontBoxes.forEach(function(q){q.style.borderColor=q===V?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},W}(l),F=function(te){function W(X,V,Z){var q=te.call(this,X,V,Z)||this;return q.color="transparent",q.padding=5,q.DEFAULT_TEXT="your text here",q.text=q.DEFAULT_TEXT,q.isMoved=!1,q.color=Z.defaultColor,q.fontFamily=Z.defaultFontFamily,q.defaultSize={x:100,y:30},q.setColor=q.setColor.bind(q),q.setFont=q.setFont.bind(q),q.renderText=q.renderText.bind(q),q.sizeText=q.sizeText.bind(q),q.textEditDivClicked=q.textEditDivClicked.bind(q),q.showTextEditor=q.showTextEditor.bind(q),q.setSize=q.setSize.bind(q),q.positionTextEditor=q.positionTextEditor.bind(q),q.colorPanel=new f("Color",Z.defaultColorSet,Z.defaultColor),q.colorPanel.onColorChanged=q.setColor,q.fontFamilyPanel=new S("Font",Z.defaultFontFamilies,Z.defaultFontFamily),q.fontFamilyPanel.onFontChanged=q.setFont,q}return g(W,te),W.prototype.ownsTarget=function(X){if(te.prototype.ownsTarget.call(this,X)||X===this.visual||X===this.textElement||X===this.bgRectangle)return!0;var V=!1;return this.textElement.childNodes.forEach(function(Z){Z===X&&(V=!0)}),V},W.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()},W.prototype.pointerDown=function(X,V){te.prototype.pointerDown.call(this,X,V),this.isMoved=!1,this.pointerDownPoint=X,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(X),this._state="creating")},W.prototype.renderText=function(){var X=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(V){X.textElement.appendChild(m.createTSpan(V.trim()===""?" ":V.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},W.prototype.getTextScale=function(){var X=this.textElement.getBBox(),V=1;if(X.width>0&&X.height>0){var Z=(1*this.width-this.width*this.padding*2/100)/X.width,q=(1*this.height-this.height*this.padding*2/100)/X.height;V=Math.min(Z,q)}return V},W.prototype.getTextPosition=function(X){var V=this.textElement.getBBox(),Z=0,q=0;return V.width>0&&V.height>0&&(Z=(this.width-V.width*X)/2,q=this.height/2-V.height*X/2),{x:Z,y:q}},W.prototype.sizeText=function(){var X=this.textElement.getBBox(),V=this.getTextScale(),Z=this.getTextPosition(V);Z.y-=X.y*V,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Z.x+"px, "+Z.y+"px) scale("+V+", "+V+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Z.x,Z.y),this.textElement.transform.baseVal.getItem(1).setScale(V,V))},W.prototype.manipulate=function(X){te.prototype.manipulate.call(this,X),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(X.x-this.pointerDownPoint.x)>5||Math.abs(X.y-this.pointerDownPoint.y)>5)},W.prototype.resize=function(X){te.prototype.resize.call(this,X),this.isMoved=!0,this.setSize(),this.sizeText()},W.prototype.setSize=function(){te.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()]]))},W.prototype.pointerUp=function(X){var V=this.state;V==="creating"&&(this._suppressMarkerCreateEvent=!0),te.prototype.pointerUp.call(this,X),this.setSize(),(V==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},W.prototype.showTextEditor=function(){var X=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(V){V.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var V=Number.parseFloat(X.textEditor.style.fontSize);X.textEditor.clientWidth>=Number.parseInt(X.textEditor.style.maxWidth)&&V>.9;)V-=.1,X.textEditor.style.fontSize=Math.max(V,.9)+"em"}),this.textEditor.addEventListener("keyup",function(V){V.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(V){if(V.clipboardData){var Z=V.clipboardData.getData("text"),q=window.getSelection();if(!q.rangeCount)return!1;q.deleteFromDocument(),q.getRangeAt(0).insertNode(document.createTextNode(Z)),V.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){X.textEditDivClicked(X.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},W.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var X=this.getTextScale(),V=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Z=this.textElement.getBBox(),q={x:Z.width*X,y:Z.height*X};V.x-=q.x/2,V.y-=q.y/2,this.textEditor.style.top=V.y+"px",this.textEditor.style.left=V.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-V.x+"px",this.textEditor.style.fontSize=Math.max(16*X,12)+"px",this.textElement.style.display="none"}},W.prototype.textEditDivClicked=function(X){this.text=X.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},W.prototype.select=function(){te.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},W.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),te.prototype.deselect.call(this)},W.prototype.dblClick=function(X,V){te.prototype.dblClick.call(this,X,V),this.showTextEditor()},W.prototype.setColor=function(X){this.textElement&&m.setAttributes(this.textElement,[["fill",X]]),this.color=X,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(X)},W.prototype.setFont=function(X){this.textElement&&m.setAttributes(this.textElement,[["font-family",X]]),this.fontFamily=X,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},W.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},W.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var X=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},te.prototype.getState.call(this));return X.typeName=W.typeName,X},W.prototype.restoreState=function(X){var V=X;this.color=V.color,this.fontFamily=V.fontFamily,this.padding=V.padding,this.text=V.text,this.createVisual(),te.prototype.restoreState.call(this,X),this.setSize()},W.prototype.scale=function(X,V){te.prototype.scale.call(this,X,V),this.setSize(),this.sizeText(),this.positionTextEditor()},W.typeName="TextMarker",W.title="Text marker",W.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',W}(E),j=function(te){function W(X,V,Z){var q=te.call(this,X,V,Z)||this;return q.color="transparent",q.lineWidth=3,q.drawing=!1,q.pixelRatio=1,q.color=Z.defaultColor,q.lineWidth=Z.defaultStrokeWidth,q.pixelRatio=Z.freehandPixelRatio,q.setColor=q.setColor.bind(q),q.addCanvas=q.addCanvas.bind(q),q.finishCreation=q.finishCreation.bind(q),q.setLineWidth=q.setLineWidth.bind(q),q.colorPanel=new f("Color",Z.defaultColorSet,Z.defaultColor),q.colorPanel.onColorChanged=q.setColor,q.lineWidthPanel=new p("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),q.lineWidthPanel.onWidthChanged=q.setLineWidth,q}return g(W,te),W.prototype.ownsTarget=function(X){return!(!te.prototype.ownsTarget.call(this,X)&&X!==this.visual&&X!==this.drawingImage)},W.prototype.createVisual=function(){this.visual=m.createGroup(),this.drawingImage=m.createImage(),this.visual.appendChild(this.drawingImage);var X=m.createTransform();this.visual.transform.baseVal.appendItem(X),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function(X,V){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(X.x,X.y),this.drawing=!0):te.prototype.pointerDown.call(this,X,V)},W.prototype.manipulate=function(X){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(X.x,X.y),this.canvasContext.stroke()):te.prototype.manipulate.call(this,X)},W.prototype.resize=function(X){te.prototype.resize.call(this,X),m.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),m.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},W.prototype.pointerUp=function(X){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):te.prototype.pointerUp.call(this,X)},W.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},W.prototype.select=function(){this.state==="creating"&&this.finishCreation(),te.prototype.select.call(this)},W.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),te.prototype.deselect.call(this)},W.prototype.finishCreation=function(){for(var X=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),V=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Z=V[0],q=V[1],ie=V[2],ne=V[3],J=!1,$=0;$<this.canvasElement.height;$++)for(var le=0;le<this.canvasElement.width;le++)X.data[$*this.canvasElement.width*4+4*le+3]>0&&(J=!0,$<q&&(q=$),le<Z&&(Z=le),$>ne&&(ne=$),le>ie&&(ie=le));if(J){this.left=Z/this.pixelRatio,this.top=q/this.pixelRatio,this.width=(ie-Z)/this.pixelRatio,this.height=(ne-q)/this.pixelRatio;var he=document.createElement("canvas");he.width=ie-Z,he.height=ne-q,he.getContext("2d").putImageData(this.canvasContext.getImageData(Z,q,ie-Z,ne-q),0,0),this.drawingImgUrl=he.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},W.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})},W.prototype.setColor=function(X){this.color=X,this.colorChanged(X)},W.prototype.setLineWidth=function(X){this.lineWidth=X},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var X=Object.assign({drawingImgUrl:this.drawingImgUrl},te.prototype.getState.call(this));return X.typeName=W.typeName,X},W.prototype.restoreState=function(X){this.createVisual(),te.prototype.restoreState.call(this,X),this.drawingImgUrl=X.drawingImgUrl,this.setDrawingImage()},W.prototype.scale=function(X,V){te.prototype.scale.call(this,X,V),this.setDrawingImage()},W.typeName="FreehandMarker",W.title="Freehand marker",W.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',W}(E),A=function(te){function W(X,V,Z){var q=te.call(this,X,Z||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return q.typeBoxes=[],q.currentType=V,q.setCurrentType=q.setCurrentType.bind(q),q}return g(W,te),W.prototype.getUi=function(){var X=this,V=document.createElement("div");V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2";for(var Z=function(ne){var J="both";switch(ne){case 0:J="both";break;case 1:J="start";break;case 2:J="end";break;case 3:J="none"}var $=document.createElement("div");if($.style.display="flex",$.style.flexGrow="2",$.style.alignItems="center",$.style.justifyContent="space-between",$.style.padding="5px",$.style.borderWidth="2px",$.style.borderStyle="solid",$.style.borderColor=J===q.currentType?q.uiStyleSettings.toolboxAccentColor:"transparent",$.addEventListener("click",function(){X.setCurrentType(J,$)}),V.appendChild($),J==="both"||J==="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="`+(q.uiStyleSettings!==void 0?q.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,le.style.marginLeft="5px",$.appendChild(le)}var he=document.createElement("div");he.style.display="flex",he.style.alignItems="center",he.style.minHeight="20px",he.style.flexGrow="2";var Se=document.createElement("hr");if(Se.style.minWidth="20px",Se.style.border="0px",Se.style.borderTop="3px solid "+(q.uiStyleSettings!==void 0?q.uiStyleSettings.toolboxColor:"#eeeeee"),Se.style.flexGrow="2",he.appendChild(Se),$.appendChild(he),J==="both"||J==="end"){var Ue=document.createElement("div");Ue.style.display="flex",Ue.style.alignItems="center",Ue.style.minHeight="20px",Ue.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="`+(q.uiStyleSettings!==void 0?q.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Ue.style.marginRight="5px",$.appendChild(Ue)}q.typeBoxes.push($)},q=this,ie=0;ie<4;ie++)Z(ie);return V},W.prototype.setCurrentType=function(X,V){var Z=this;this.currentType=X,this.typeBoxes.forEach(function(q){q.style.borderColor=q===V?Z.uiStyleSettings!==void 0?Z.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},W}(l),Y=function(te){function W(X,V,Z){var q=te.call(this,X,V,Z)||this;return q.arrowType="end",q.arrowBaseHeight=10,q.arrowBaseWidth=10,q.getArrowPoints=q.getArrowPoints.bind(q),q.setArrowType=q.setArrowType.bind(q),q.arrowTypePanel=new A("Arrow type","end"),q.arrowTypePanel.onArrowTypeChanged=q.setArrowType,q}return g(W,te),W.prototype.ownsTarget=function(X){return!(!te.prototype.ownsTarget.call(this,X)&&X!==this.arrow1&&X!==this.arrow2)},W.prototype.getArrowPoints=function(X,V){var Z=this.arrowBaseWidth+2*this.strokeWidth,q=this.arrowBaseHeight+2*this.strokeWidth;return X-Z/2+","+(V+q/2)+" "+X+","+(V-q/2)+" "+(X+Z/2)+","+(V+q/2)},W.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)},W.prototype.pointerDown=function(X,V){te.prototype.pointerDown.call(this,X,V),this.state==="creating"&&this.createTips()},W.prototype.adjustVisual=function(){if(te.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 X=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),V=this.arrow1.transform.baseVal.getItem(0);V.setRotate(X,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(V,0);var Z=this.arrow2.transform.baseVal.getItem(0);Z.setRotate(X+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Z,0)}},W.prototype.setArrowType=function(X){this.arrowType=X,this.adjustVisual(),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var X=Object.assign({arrowType:this.arrowType},te.prototype.getState.call(this));return X.typeName=W.typeName,X},W.prototype.restoreState=function(X){te.prototype.restoreState.call(this,X);var V=X;this.arrowType=V.arrowType,this.createTips(),this.adjustVisual()},W.typeName="ArrowMarker",W.title="Arrow marker",W.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',W}(C),z=function(te){function W(X,V,Z){var q=te.call(this,X,V,Z)||this;return q.fillColor=Z.defaultFillColor,q.strokeWidth=0,q.fillPanel=new f("Color",Z.defaultColorSet,Z.defaultFillColor),q.fillPanel.onColorChanged=q.setFillColor,q}return g(W,te),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var X=te.prototype.getState.call(this);return X.typeName=W.typeName,X},W.typeName="CoverMarker",W.title="Cover marker",W.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',W}(v),O=function(te){function W(X,V,Z,q){var ie=te.call(this,X,q||'<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=V,ie.currentOpacity=Z,ie.setCurrentOpacity=ie.setCurrentOpacity.bind(ie),ie}return g(W,te),W.prototype.getUi=function(){var X=this,V=document.createElement("div");return V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2",V.style.justifyContent="space-between",this.opacities.forEach(function(Z){var q=document.createElement("div");q.style.display="flex",q.style.alignItems="center",q.style.justifyContent="center",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.borderColor=Z===X.currentOpacity?X.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){X.setCurrentOpacity(Z,q)}),V.appendChild(q);var ie=document.createElement("div");ie.innerText=100*Z+"%",q.appendChild(ie),X.opacityBoxes.push(q)}),V},W.prototype.setCurrentOpacity=function(X,V){var Z=this;this.currentOpacity=X,this.opacityBoxes.forEach(function(q){q.style.borderColor=q===V?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},W}(l),H=function(te){function W(X,V,Z){var q=te.call(this,X,V,Z)||this;return q.setOpacity=q.setOpacity.bind(q),q.fillColor=Z.defaultHighlightColor,q.strokeWidth=0,q.opacity=Z.defaultHighlightOpacity,q.fillPanel=new f("Color",Z.defaultColorSet,q.fillColor),q.fillPanel.onColorChanged=q.setFillColor,q.opacityPanel=new O("Opacity",Z.defaultOpacitySteps,q.opacity),q.opacityPanel.onOpacityChanged=q.setOpacity,q}return g(W,te),W.prototype.setOpacity=function(X){this.opacity=X,this.visual&&m.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var X=te.prototype.getState.call(this);return X.typeName=W.typeName,X},W.typeName="HighlightMarker",W.title="Highlight marker",W.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',W}(z),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>',L=function(te){function W(X,V,Z){var q=te.call(this,X,V,Z)||this;return q.bgColor="transparent",q.tipPosition={x:0,y:0},q.tipBase1Position={x:0,y:0},q.tipBase2Position={x:0,y:0},q.tipMoving=!1,q.color=Z.defaultStrokeColor,q.bgColor=Z.defaultFillColor,q.fontFamily=Z.defaultFontFamily,q.defaultSize={x:100,y:30},q.setBgColor=q.setBgColor.bind(q),q.getTipPoints=q.getTipPoints.bind(q),q.positionTip=q.positionTip.bind(q),q.setTipPoints=q.setTipPoints.bind(q),q.colorPanel=new f("Text color",Z.defaultColorSet,q.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>'),q.colorPanel.onColorChanged=q.setColor,q.bgColorPanel=new f("Fill color",Z.defaultColorSet,q.bgColor,U),q.bgColorPanel.onColorChanged=q.setBgColor,q.fontFamilyPanel=new S("Font",Z.defaultFontFamilies,Z.defaultFontFamily),q.fontFamilyPanel.onFontChanged=q.setFont,q.tipGrip=new o,q.tipGrip.visual.transform.baseVal.appendItem(m.createTransform()),q.controlBox.appendChild(q.tipGrip.visual),q}return g(W,te),W.prototype.ownsTarget=function(X){return te.prototype.ownsTarget.call(this,X)||this.tipGrip.ownsTarget(X)||this.tip===X},W.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)},W.prototype.pointerDown=function(X,V){this.state==="new"&&te.prototype.pointerDown.call(this,X,V),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(V)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):te.prototype.pointerDown.call(this,X,V)},W.prototype.pointerUp=function(X){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,te.prototype.pointerUp.call(this,X);else{var V=this.state==="creating";te.prototype.pointerUp.call(this,X),this.setTipPoints(V),this.positionTip()}},W.prototype.manipulate=function(X){if(this.tipMoving){var V=this.unrotatePoint(X);this.tipPosition={x:V.x-this.manipulationStartLeft,y:V.y-this.manipulationStartTop},this.positionTip()}else te.prototype.manipulate.call(this,X)},W.prototype.setBgColor=function(X){this.bgRectangle&&this.tip&&(m.setAttributes(this.bgRectangle,[["fill",X]]),m.setAttributes(this.tip,[["fill",X]])),this.bgColor=X,this.fillColorChanged(X)},W.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},W.prototype.setTipPoints=function(X){X===void 0&&(X=!1);var V=Math.min(this.height/2,15),Z=this.height/5;X&&(this.tipPosition={x:V+Z/2,y:this.height+20});var q=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?q<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Z=this.width/5,V=Math.min(this.width/2,15),this.tipBase1Position={x:V,y:0},this.tipBase2Position={x:V+Z,y:0}):(this.tipBase1Position={x:0,y:V},this.tipBase2Position={x:0,y:V+Z}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?q<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Z=this.width/5,V=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-V-Z,y:0},this.tipBase2Position={x:this.width-V,y:0}):(this.tipBase1Position={x:this.width,y:V},this.tipBase2Position={x:this.width,y:V+Z}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?q<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Z=this.width/5,V=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-V-Z,y:this.height},this.tipBase2Position={x:this.width-V,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-V-Z},this.tipBase2Position={x:this.width,y:this.height-V}):q<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Z=this.width/5,V=Math.min(this.width/2,15),this.tipBase1Position={x:V,y:this.height},this.tipBase2Position={x:V+Z,y:this.height}):(this.tipBase1Position={x:0,y:this.height-V},this.tipBase2Position={x:0,y:this.height-V-Z})},W.prototype.resize=function(X){te.prototype.resize.call(this,X),this.positionTip()},W.prototype.positionTip=function(){m.setAttributes(this.tip,[["points",this.getTipPoints()]]);var X=this.tipGrip.visual.transform.baseVal.getItem(0);X.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(X,0)},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),W.prototype.select=function(){this.positionTip(),te.prototype.select.call(this)},W.prototype.getState=function(){var X=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},te.prototype.getState.call(this));return X.typeName=W.typeName,X},W.prototype.restoreState=function(X){var V=X;this.bgColor=V.bgColor,this.tipPosition=V.tipPosition,te.prototype.restoreState.call(this,X),this.createTip(),this.setTipPoints()},W.prototype.scale=function(X,V){te.prototype.scale.call(this,X,V),this.tipPosition={x:this.tipPosition.x*X,y:this.tipPosition.y*V},this.positionTip()},W.typeName="CalloutMarker",W.title="Callout marker",W.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',W}(F),K=function(te){function W(X,V,Z){var q=te.call(this,X,V,Z)||this;return q.fillColor="transparent",q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.opacity=1,q.strokeColor=Z.defaultColor,q.strokeWidth=Z.defaultStrokeWidth,q.strokeDasharray=Z.defaultStrokeDasharray,q.fillColor=Z.defaultFillColor,q.setStrokeColor=q.setStrokeColor.bind(q),q.setFillColor=q.setFillColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.setOpacity=q.setOpacity.bind(q),q.createVisual=q.createVisual.bind(q),q.strokePanel=new f("Line color",b(Z.defaultColorSet,["transparent"]),Z.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.fillPanel=new f("Fill color",b(Z.defaultColorSet,["transparent"]),q.fillColor,U),q.fillPanel.onColorChanged=q.setFillColor,q.strokeWidthPanel=new p("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new I("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q.opacityPanel=new O("Opacity",Z.defaultOpacitySteps,q.opacity),q.opacityPanel.onOpacityChanged=q.setOpacity,q}return g(W,te),W.prototype.ownsTarget=function(X){return!(!te.prototype.ownsTarget.call(this,X)&&X!==this.visual)},W.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)},W.prototype.pointerDown=function(X,V){te.prototype.pointerDown.call(this,X,V),this.state==="new"&&(this.createVisual(),this.moveVisual(X),this._state="creating")},W.prototype.manipulate=function(X){te.prototype.manipulate.call(this,X)},W.prototype.resize=function(X){te.prototype.resize.call(this,X),this.setSize()},W.prototype.setSize=function(){te.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()]])},W.prototype.pointerUp=function(X){te.prototype.pointerUp.call(this,X),this.setSize()},W.prototype.setStrokeColor=function(X){this.strokeColor=X,this.visual&&m.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(X),this.stateChanged()},W.prototype.setFillColor=function(X){this.fillColor=X,this.visual&&m.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(X),this.stateChanged()},W.prototype.setStrokeWidth=function(X){this.strokeWidth=X,this.visual&&m.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},W.prototype.setStrokeDasharray=function(X){this.strokeDasharray=X,this.visual&&m.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},W.prototype.setOpacity=function(X){this.opacity=X,this.visual&&m.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var X=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},te.prototype.getState.call(this));return X.typeName=W.typeName,X},W.prototype.restoreState=function(X){var V=X;this.fillColor=V.fillColor,this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.opacity=V.opacity,this.createVisual(),te.prototype.restoreState.call(this,X),this.setSize()},W.prototype.scale=function(X,V){te.prototype.scale.call(this,X,V),this.setSize()},W.typeName="EllipseMarker",W.title="Ellipse marker",W.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',W}(E),ee=function(te){function W(X,V,Z){return te.call(this,X,V,Z)||this}return g(W,te),Object.defineProperty(W.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),W.prototype.ownsTarget=function(X){return!(!te.prototype.ownsTarget.call(this,X)&&X!==this.tip1&&X!==this.tip2)},W.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)},W.prototype.pointerDown=function(X,V){te.prototype.pointerDown.call(this,X,V),this.state==="creating"&&this.createTips()},W.prototype.adjustVisual=function(){if(te.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 X=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),V=this.tip1.transform.baseVal.getItem(0);V.setRotate(X,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(V,0);var Z=this.tip2.transform.baseVal.getItem(0);Z.setRotate(X+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Z,0)}},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var X=te.prototype.getState.call(this);return X.typeName=W.typeName,X},W.prototype.restoreState=function(X){te.prototype.restoreState.call(this,X),this.createTips(),this.adjustVisual()},W.typeName="MeasurementMarker",W.title="Measurement marker",W.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',W}(C),oe=function(te){function W(X,V,Z){var q=te.call(this,X,V,Z)||this;return q.strokePanel.colors=Z.defaultColorSet,q.fillColor="transparent",q}return g(W,te),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var X=te.prototype.getState.call(this);return X.typeName=W.typeName,X},W.typeName="EllipseFrameMarker",W.title="Ellipse frame marker",W.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',W}(K),ae=function(){function te(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(te.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),te.prototype.addUndoStep=function(W){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(W)||(this.undoStack.push(W),JSON.stringify(this.lastRedoStep)!==JSON.stringify(W)&&this.redoStack.splice(0,this.redoStack.length))},te.prototype.replaceLastUndoStep=function(W){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=W)},te.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},te.prototype.undo=function(){if(this.undoStack.length>1){var W=this.undoStack.pop();return W!==void 0&&this.redoStack.push(W),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},te.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},te}(),be=function(te){function W(X,V,Z){var q=te.call(this,X,V,Z)||this;return q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.curveX=0,q.curveY=0,q.manipulationStartCurveX=0,q.manipulationStartCurveY=0,q.setStrokeColor=q.setStrokeColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.positionGrips=q.positionGrips.bind(q),q.addControlGrips=q.addControlGrips.bind(q),q.adjustVisual=q.adjustVisual.bind(q),q.setupControlBox=q.setupControlBox.bind(q),q.resize=q.resize.bind(q),q.strokeColor=Z.defaultColor,q.strokeWidth=Z.defaultStrokeWidth,q.strokeDasharray=Z.defaultStrokeDasharray,q.strokePanel=new f("Line color",Z.defaultColorSet,Z.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.strokeWidthPanel=new p("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new I("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q}return g(W,te),W.prototype.ownsTarget=function(X){return!(!te.prototype.ownsTarget.call(this,X)&&X!==this.visual&&X!==this.selectorCurve&&X!==this.visibleCurve&&!this.curveGrip.ownsTarget(X))},W.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},W.prototype.createVisual=function(){this.visual=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)},W.prototype.pointerDown=function(X,V){te.prototype.pointerDown.call(this,X,V),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=X.x,this.curveY=X.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(V)&&(this.activeGrip=this.curveGrip,this._state="resize")},W.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),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()]]))},W.prototype.setupControlBox=function(){te.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)},W.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,te.prototype.addControlGrips.call(this)},W.prototype.positionGrips=function(){te.prototype.positionGrips.call(this);var X=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-X/2,this.curveY-X/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},W.prototype.manipulate=function(X){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+X.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+X.y-this.manipulationStartY),te.prototype.manipulate.call(this,X)},W.prototype.resize=function(X){this.activeGrip===this.curveGrip&&(this.curveX=X.x,this.curveY=X.y),te.prototype.resize.call(this,X),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},W.prototype.setStrokeColor=function(X){this.strokeColor=X,this.adjustVisual(),this.colorChanged(X)},W.prototype.setStrokeWidth=function(X){this.strokeWidth=X,this.adjustVisual()},W.prototype.setStrokeDasharray=function(X){this.strokeDasharray=X,this.adjustVisual()},W.prototype.scale=function(X,V){this.curveX=this.curveX*X,this.curveY=this.curveY*V,te.prototype.scale.call(this,X,V)},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var X=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},te.prototype.getState.call(this));return X.typeName=W.typeName,X},W.prototype.restoreState=function(X){te.prototype.restoreState.call(this,X);var V=X;this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.curveX=V.curveX,this.curveY=V.curveY,this.createVisual(),this.adjustVisual()},W.typeName="CurveMarker",W.title="Curve marker",W.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',W}(x),_e=function(){function te(W,X){X===void 0&&(X=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=W,this.cancelable=X}return Object.defineProperty(te.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),te.prototype.preventDefault=function(){this._defaultPrevented=!0},te}(),fe=function(te){function W(X,V,Z){var q=te.call(this,X,!1)||this;return q.dataUrl=V,q.state=Z,q}return g(W,te),W}(_e),Re=function(te){function W(X,V,Z){Z===void 0&&(Z=!1);var q=te.call(this,X,Z)||this;return q.marker=V,q}return g(W,te),W}(_e),Ce=function(){function te(){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 te.prototype.addEventListener=function(W,X){this[W].push(X)},te.prototype.removeEventListener=function(W,X){var V=this[W].indexOf(X);V>-1&&this[W].splice(V,1)},te}(),ce=function(){function te(W){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new y,this._isOpen=!1,this.undoRedoManager=new ae,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 Ce,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=te.instanceCounter++,this.styles=new h(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=W,this.targetRoot=document.body,this.width=W.clientWidth,this.height=W.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(te.prototype,"ALL_MARKER_TYPES",{get:function(){return[R,j,Y,F,oe,K,H,L,ee,z,C,be]},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[R,j,Y,F,K,H,L]},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"BASIC_MARKER_TYPES",{get:function(){return[R,j,Y,F,H]},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(W){var X=this;this._availableMarkerTypes.splice(0),W.forEach(function(V){if(typeof V=="string"){var Z=X.ALL_MARKER_TYPES.find(function(q){return q.typeName===V});Z!==void 0&&X._availableMarkerTypes.push(Z)}else X._availableMarkerTypes.push(V)})},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(W){this._zoomLevel=W,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),te.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),T.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},te.prototype.show=function(){var W=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(X){return X(new _e(W))})},te.prototype.render=function(){return w(this,void 0,void 0,function(){var W;return k(this,function(X){switch(X.label){case 0:return this.setCurrentMarker(),(W=new _).naturalSize=this.renderAtNaturalSize,W.imageType=this.renderImageType,W.imageQuality=this.renderImageQuality,W.markersOnly=this.renderMarkersOnly,W.width=this.renderWidth,W.height=this.renderHeight,[4,W.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return X.sent(),[4,W.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,X.sent()]}})})},te.prototype.close=function(W){var X=this;if(W===void 0&&(W=!1),this.isOpen){var V=!1;W||this.eventListeners.beforeclose.forEach(function(Z){var q=new _e(X,!0);Z(q),q.defaultPrevented&&(V=!0)}),V||(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(Z){return Z(new _e(X))}),this.detachEvents(),this._isOpen=!1)}},te.prototype.addMarkersToToolbar=function(){for(var W,X=[],V=0;V<arguments.length;V++)X[V]=arguments[V];(W=this._availableMarkerTypes).push.apply(W,X)},te.prototype.addRenderEventListener=function(W){this.addEventListener("render",function(X){W(X.dataUrl,X.state)})},te.prototype.removeRenderEventListener=function(W){},te.prototype.addCloseEventListener=function(W){this.addEventListener("close",function(){W()})},te.prototype.removeCloseEventListener=function(W){},te.prototype.setupResizeObserver=function(){var W=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){W.resize(W.target.clientWidth,W.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return W.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},te.prototype.onPopupTargetResize=function(){var W=1*this.target.clientWidth/this.target.clientHeight,X=this.editorCanvas.clientWidth/W>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*W:this.editorCanvas.clientWidth,V=X<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/W;this.resize(X,V)},te.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},te.prototype.resize=function(W,X){this._isResizing=!0;var V=W/this.imageWidth,Z=X/this.imageHeight;this.imageWidth=Math.round(W),this.imageHeight=Math.round(X),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(V,Z),this._isResizing=!1},te.prototype.scaleMarkers=function(W,X){var V,Z=this;this._currentMarker&&this._currentMarker instanceof F?this._currentMarker.scale(W,X):(V=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(q){q!==Z._currentMarker&&q.scale(W,X)}),V!==void 0&&this.setCurrentMarker(V)},te.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"},te.prototype.setTopLeft=function(){var W=this.editingTarget.getBoundingClientRect(),X=this.editorCanvas.getBoundingClientRect();this.left=W.left-X.left,this.top=W.top-X.top},te.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)},te.prototype.addDefs=function(){for(var W,X=[],V=0;V<arguments.length;V++)X[V]=arguments[V];this.defs=m.createDefs(),this.addDefsToImage(),(W=this.defs).append.apply(W,X)},te.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},te.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)},te.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},te.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},te.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)},te.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},te.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)},te.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var W=document.createElement("a");W.href="https://markerjs.com/",W.target="_blank",W.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',W.title="Powered by marker.js",W.style.display="grid",W.style.alignItems="center",W.style.justifyItems="center",W.style.padding="3px",W.style.width="20px",W.style.height="20px",this.logoUI.appendChild(W),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},te.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")},te.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"},te.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},te.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var W=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=W+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new i(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")},te.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},te.prototype.removeMarker=function(W){this.markerImage.removeChild(W.container),this.markers.indexOf(W)>-1&&this.markers.splice(this.markers.indexOf(W),1),W.dispose()},te.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())},te.prototype.toolbarButtonClicked=function(W,X){if(W==="marker"&&X!==void 0)this.createNewMarker(X);else if(W==="action")switch(X){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()}},te.prototype.deleteSelectedMarker=function(){var W=this;if(this._currentMarker!==void 0){var X=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Z){var q=new Re(W,W._currentMarker,!0);Z(q),q.defaultPrevented&&(X=!0)}),!X){var V=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(Z){return Z(new Re(W,V))})}}},te.prototype.clear=function(){var W=this,X=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ie){var ne=new Re(W,void 0,!0);ie(ne),ne.defaultPrevented&&(X=!0)}),!X)){this.setCurrentMarker();for(var V=function(ie){var ne=Z.markers[ie];Z.setCurrentMarker(Z.markers[ie]),Z._currentMarker.dispose(),Z.markerImage.removeChild(Z._currentMarker.container),Z.markers.splice(Z.markers.indexOf(Z._currentMarker),1),Z.eventListeners.markerdelete.forEach(function(J){return J(new Re(W,ne))})},Z=this,q=this.markers.length-1;q>=0;q--)V(q);this.addUndoStep()}},Object.defineProperty(te.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),te.prototype.showNotesEditor=function(){var W;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(W=this._currentMarker.notes)!==null&&W!==void 0?W:"",this.overlayContainer.appendChild(this.notesArea))},te.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)},te.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},te.prototype.addUndoStep=function(){var W=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var X=this.getState(),V=this.undoRedoManager.getLastUndoStep();if(!V||V.width===X.width&&V.height===X.height){var Z=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(X),Z<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(q){return q(new _e(W))})}else this.undoRedoManager.replaceLastUndoStep(X),this.eventListeners.statechange.forEach(function(q){return q(new _e(W))})}},te.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},te.prototype.undoStep=function(){var W=this,X=this.undoRedoManager.undo();X!==void 0&&(this.restoreState(X),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(V){return V(new _e(W))}))},te.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},te.prototype.redoStep=function(){var W=this,X=this.undoRedoManager.redo();X!==void 0&&(this.restoreState(X),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(V){return V(new _e(W))}))},te.prototype.stepZoom=function(){var W=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=W<this.zoomSteps.length-1?this.zoomSteps[W+1]:this.zoomSteps[0]},te.prototype.panTo=function(W){this.contentDiv.scrollBy({left:this.prevPanPoint.x-W.x,top:this.prevPanPoint.y-W.y}),this.prevPanPoint=W},te.prototype.startRenderAndClose=function(){return w(this,void 0,void 0,function(){var W,X,V=this;return k(this,function(Z){switch(Z.label){case 0:return[4,this.render()];case 1:return W=Z.sent(),X=this.getState(),this.eventListeners.render.forEach(function(q){return q(new fe(V,W,X))}),this.close(!0),[2]}})})},te.prototype.getState=function(W){W===!0&&this.setCurrentMarker();var X={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(V){return X.markers.push(V.getState())}),X},te.prototype.restoreState=function(W){var X=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);W.markers.forEach(function(V){var Z=X._availableMarkerTypes.find(function(ie){return ie.typeName===V.typeName});if(Z!==void 0){var q=X.addNewMarker(Z);q.restoreState(V),X.markers.push(q)}}),W.width&&W.height&&(W.width!==this.imageWidth||W.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/W.width,this.imageHeight/W.height),this.eventListeners.restorestate.forEach(function(V){return V(new _e(X))})},te.prototype.addNewMarker=function(W){var X=m.createGroup();return this.markerImage.appendChild(X),new W(X,this.overlayContainer,this.settings)},te.prototype.createNewMarker=function(W){var X,V=this;(X=typeof W=="string"?this._availableMarkerTypes.find(function(Z){return Z.typeName===W}):W)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(X),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(X.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Z){return Z(new Re(V,V._currentMarker))}))},te.prototype.markerCreated=function(W){var X=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(W),this.setCurrentMarker(W),W instanceof j&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(j):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(V){return V(new Re(X,X._currentMarker))})},te.prototype.colorChanged=function(W){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=W,this.settings.defaultStrokeColor=W)},te.prototype.fillColorChanged=function(W){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=W)},te.prototype.markerStateChanged=function(W){var X=this;this.eventListeners.markerchange.forEach(function(V){return V(new Re(X,W))})},te.prototype.setCurrentMarker=function(W){var X=this;this._currentMarker!==W&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(V){return V(new Re(X,X._currentMarker))})),this._currentMarker=W,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(V){return V(new Re(X,X._currentMarker))}))},te.prototype.onPointerDown=function(W){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||W.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var X=this.markers.find(function(V){return V.ownsTarget(W.target)});X!==void 0?(this.setCurrentMarker(X),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(W.clientX,W.clientY),W.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:W.clientX,y:W.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(W.clientX,W.clientY))},te.prototype.onDblClick=function(W){if(this._isFocused||this.focus(),this.mode==="select"){var X=this.markers.find(function(V){return V.ownsTarget(W.target)});X!==void 0&&X!==this._currentMarker&&this.setCurrentMarker(X),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(W.clientX,W.clientY),W.target):this.setCurrentMarker()}},te.prototype.onPointerMove=function(W){this.touchPoints!==1&&W.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||W.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(W.clientX,W.clientY)):this.zoomLevel>1&&this.panTo({x:W.clientX,y:W.clientY}))},te.prototype.onPointerUp=function(W){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(W.clientX,W.clientY)),this.isDragging=!1,this.addUndoStep()},te.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},te.prototype.onKeyUp=function(W){this._currentMarker===void 0||this.notesArea!==void 0||W.key!=="Delete"&&W.key!=="Backspace"||this.deleteSelectedMarker()},te.prototype.clientToLocalCoordinates=function(W,X){var V=this.markerImage.getBoundingClientRect();return{x:(W-V.left)/this.zoomLevel,y:(X-V.top)/this.zoomLevel}},te.prototype.onWindowResize=function(){this.positionUI()},te.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var W=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=W+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},te.prototype.addLicenseKey=function(W){T.addKey(W)},te.prototype.addEventListener=function(W,X){this.eventListeners.addEventListener(W,X)},te.prototype.removeEventListener=function(W,X){this.eventListeners.removeEventListener(W,X)},te.prototype.renderState=function(W){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(W),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(te.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),te.prototype.focus=function(){var W=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(X){return X(new _e(W))}))},te.prototype.blur=function(){var W=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(X){return X(new _e(W))}))},te.instanceCounter=0,te}()},T8No:function(B,Q,D){"use strict";D.d(Q,"a",function(){return T}),D.d(Q,"e",function(){return _}),D.d(Q,"c",function(){return C}),D.d(Q,"b",function(){return S}),D.d(Q,"d",function(){return F}),D.d(Q,"f",function(){return Y});var N=D("MNsG"),g=D("N0LK"),w=D("Cg/j");let k=N.k||"";const b=new Map;b.set("false",!1),b.set("true",!0),b.set("isMac",N.f),b.set("isLinux",N.d),b.set("isWindows",N.i),b.set("isWeb",N.h),b.set("isMacNative",N.f&&!N.h),b.set("isEdge",k.indexOf("Edg/")>=0),b.set("isFirefox",k.indexOf("Firefox")>=0),b.set("isChrome",k.indexOf("Chrome")>=0),b.set("isSafari",k.indexOf("Safari")>=0);const m=Object.prototype.hasOwnProperty;class T{static has(O){return c.create(O)}static equals(O,H){return i.create(O,H)}static regex(O,H){return p.create(O,H)}static not(O){return d.create(O)}static and(...O){return y.create(O,null)}static or(...O){return x.create(O,null,!0)}static deserialize(O,H=!1){return O?this._deserializeOrExpression(O,H):void 0}static _deserializeOrExpression(O,H){let U=O.split("||");return x.create(U.map(L=>this._deserializeAndExpression(L,H)),null,!0)}static _deserializeAndExpression(O,H){let U=O.split("&&");return y.create(U.map(L=>this._deserializeOne(L,H)),null)}static _deserializeOne(O,H){if(O=O.trim(),O.indexOf("!=")>=0){let U=O.split("!=");return f.create(U[0].trim(),this._deserializeValue(U[1],H))}if(O.indexOf("==")>=0){let U=O.split("==");return i.create(U[0].trim(),this._deserializeValue(U[1],H))}if(O.indexOf("=~")>=0){let U=O.split("=~");return p.create(U[0].trim(),this._deserializeRegexValue(U[1],H))}if(O.indexOf(" in ")>=0){let U=O.split(" in ");return n.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(O)){const U=O.split(">=");return s.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(O)){const U=O.split(">");return o.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(O)){const U=O.split("<=");return v.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(O)){const U=O.split("<");return E.create(U[0].trim(),U[1].trim())}return/^\!\s*/.test(O)?d.create(O.substr(1).trim()):c.create(O)}static _deserializeValue(O,H){if(O=O.trim(),O==="true")return!0;if(O==="false")return!1;let U=/^'([^']*)'$/.exec(O);return U?U[1].trim():O}static _deserializeRegexValue(O,H){if(Object(g.C)(O)){if(H)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let U=O.indexOf("/"),L=O.lastIndexOf("/");if(U===L||U<0){if(H)throw new Error(`bad regexp-value '${O}', missing /-enclosure`);return console.warn(`bad regexp-value '${O}', missing /-enclosure`),null}let K=O.slice(U+1,L),ee=O[L+1]==="i"?"i":"";try{return new RegExp(K,ee)}catch(oe){if(H)throw new Error(`bad regexp-value '${O}', parse error: ${oe}`);return console.warn(`bad regexp-value '${O}', parse error: ${oe}`),null}}}function _(O,H){const U=O?O.substituteConstants():void 0,L=H?H.substituteConstants():void 0;return!U&&!L?!0:!U||!L?!1:U.equals(L)}function t(O,H){return O.cmp(H)}class h{constructor(){this.type=0}cmp(O){return this.type-O.type}equals(O){return O.type===this.type}substituteConstants(){return this}evaluate(O){return!1}serialize(){return"false"}keys(){return[]}negate(){return r.INSTANCE}}h.INSTANCE=new h;class r{constructor(){this.type=1}cmp(O){return this.type-O.type}equals(O){return O.type===this.type}substituteConstants(){return this}evaluate(O){return!0}serialize(){return"true"}keys(){return[]}negate(){return h.INSTANCE}}r.INSTANCE=new r;class c{constructor(O,H){this.key=O,this.negated=H,this.type=2}static create(O,H=null){const U=b.get(O);return typeof U=="boolean"?U?r.INSTANCE:h.INSTANCE:new c(O,H)}cmp(O){return O.type!==this.type?this.type-O.type:j(this.key,O.key)}equals(O){return O.type===this.type?this.key===O.key:!1}substituteConstants(){const O=b.get(this.key);return typeof O=="boolean"?O?r.INSTANCE:h.INSTANCE:this}evaluate(O){return!!O.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=d.create(this.key,this)),this.negated}}class i{constructor(O,H,U){this.key=O,this.value=H,this.negated=U,this.type=4}static create(O,H,U=null){if(typeof H=="boolean")return H?c.create(O,U):d.create(O,U);const L=b.get(O);if(typeof L=="boolean"){const K=L?"true":"false";return H===K?r.INSTANCE:h.INSTANCE}return new i(O,H,U)}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){const O=b.get(this.key);if(typeof O=="boolean"){const H=O?"true":"false";return this.value===H?r.INSTANCE:h.INSTANCE}return this}evaluate(O){return O.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this.value,this)),this.negated}}class n{constructor(O,H){this.key=O,this.valueKey=H,this.type=10,this.negated=null}static create(O,H){return new n(O,H)}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.valueKey,O.key,O.valueKey)}equals(O){return O.type===this.type?this.key===O.key&&this.valueKey===O.valueKey:!1}substituteConstants(){return this}evaluate(O){const H=O.getValue(this.valueKey),U=O.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=l.create(this)),this.negated}}class l{constructor(O){this._actual=O,this.type=11}static create(O){return new l(O)}cmp(O){return O.type!==this.type?this.type-O.type:this._actual.cmp(O._actual)}equals(O){return O.type===this.type?this._actual.equals(O._actual):!1}substituteConstants(){return this}evaluate(O){return!this._actual.evaluate(O)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class f{constructor(O,H,U){this.key=O,this.value=H,this.negated=U,this.type=5}static create(O,H,U=null){if(typeof H=="boolean")return H?d.create(O,U):c.create(O,U);const L=b.get(O);if(typeof L=="boolean"){const K=L?"true":"false";return H===K?h.INSTANCE:r.INSTANCE}return new f(O,H,U)}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){const O=b.get(this.key);if(typeof O=="boolean"){const H=O?"true":"false";return this.value===H?h.INSTANCE:r.INSTANCE}return this}evaluate(O){return O.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=i.create(this.key,this.value,this)),this.negated}}class d{constructor(O,H){this.key=O,this.negated=H,this.type=3}static create(O,H=null){const U=b.get(O);return typeof U=="boolean"?U?h.INSTANCE:r.INSTANCE:new d(O,H)}cmp(O){return O.type!==this.type?this.type-O.type:j(this.key,O.key)}equals(O){return O.type===this.type?this.key===O.key:!1}substituteConstants(){const O=b.get(this.key);return typeof O=="boolean"?O?h.INSTANCE:r.INSTANCE:this}evaluate(O){return!O.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 u(O,H){if(typeof O=="string"){const U=parseFloat(O);isNaN(U)||(O=U)}return typeof O=="string"||typeof O=="number"?H(O):h.INSTANCE}class o{constructor(O,H,U){this.key=O,this.value=H,this.negated=U,this.type=12}static create(O,H,U=null){return u(H,L=>new o(O,L,U))}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this.key,this.value,this)),this.negated}}class s{constructor(O,H,U){this.key=O,this.value=H,this.negated=U,this.type=13}static create(O,H,U=null){return u(H,L=>new s(O,L,U))}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class E{constructor(O,H,U){this.key=O,this.value=H,this.negated=U,this.type=14}static create(O,H,U=null){return u(H,L=>new E(O,L,U))}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this.value,this)),this.negated}}class v{constructor(O,H,U){this.key=O,this.value=H,this.negated=U,this.type=15}static create(O,H,U=null){return u(H,L=>new v(O,L,U))}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.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 p{constructor(O,H){this.key=O,this.regexp=H,this.type=7,this.negated=null}static create(O,H){return new p(O,H)}cmp(O){if(O.type!==this.type)return this.type-O.type;if(this.key<O.key)return-1;if(this.key>O.key)return 1;const H=this.regexp?this.regexp.source:"",U=O.regexp?O.regexp.source:"";return H<U?-1:H>U?1:0}equals(O){if(O.type===this.type){const H=this.regexp?this.regexp.source:"",U=O.regexp?O.regexp.source:"";return this.key===O.key&&H===U}return!1}substituteConstants(){return this}evaluate(O){let H=O.getValue(this.key);return this.regexp?this.regexp.test(H):!1}serialize(){const O=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${O}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this)),this.negated}}class I{constructor(O){this._actual=O,this.type=8}static create(O){return new I(O)}cmp(O){return O.type!==this.type?this.type-O.type:this._actual.cmp(O._actual)}equals(O){return O.type===this.type?this._actual.equals(O._actual):!1}substituteConstants(){return this}evaluate(O){return!this._actual.evaluate(O)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function R(O){let H=null;for(let U=0,L=O.length;U<L;U++){const K=O[U].substituteConstants();if(O[U]!==K&&H===null){H=[];for(let ee=0;ee<U;ee++)H[ee]=O[ee]}H!==null&&(H[U]=K)}return H===null?O:H}class y{constructor(O,H){this.expr=O,this.negated=H,this.type=6}static create(O,H){return y._normalizeArr(O,H)}cmp(O){if(O.type!==this.type)return this.type-O.type;if(this.expr.length<O.expr.length)return-1;if(this.expr.length>O.expr.length)return 1;for(let H=0,U=this.expr.length;H<U;H++){const L=t(this.expr[H],O.expr[H]);if(L!==0)return L}return 0}equals(O){if(O.type===this.type){if(this.expr.length!==O.expr.length)return!1;for(let H=0,U=this.expr.length;H<U;H++)if(!this.expr[H].equals(O.expr[H]))return!1;return!0}return!1}substituteConstants(){const O=R(this.expr);return O===this.expr?this:y.create(O,this.negated)}evaluate(O){for(let H=0,U=this.expr.length;H<U;H++)if(!this.expr[H].evaluate(O))return!1;return!0}static _normalizeArr(O,H){const U=[];let L=!1;for(const K of O){if(!K)continue;if(K.type===1){L=!0;continue}if(K.type===0)return h.INSTANCE;if(K.type===6){U.push(...K.expr);continue}U.push(K)}if(U.length===0&&L)return r.INSTANCE;if(U.length===0)return;if(U.length===1)return U[0];U.sort(t);for(let K=1;K<U.length;K++)U[K-1].equals(U[K])&&(U.splice(K,1),K--);if(U.length===1)return U[0];for(;U.length>1;){const K=U[U.length-1];if(K.type!==9)break;U.pop();const ee=U.pop(),oe=U.length===0,ae=x.create(K.expr.map(be=>y.create([be,ee],null)),null,oe);ae&&(U.push(ae),U.sort(t))}return U.length===1?U[0]:new y(U,H)}serialize(){return this.expr.map(O=>O.serialize()).join(" && ")}keys(){const O=[];for(let H of this.expr)O.push(...H.keys());return O}negate(){if(!this.negated){const O=[];for(let H of this.expr)O.push(H.negate());this.negated=x.create(O,this,!0)}return this.negated}}class x{constructor(O,H){this.expr=O,this.negated=H,this.type=9}static create(O,H,U){return x._normalizeArr(O,H,U)}cmp(O){if(O.type!==this.type)return this.type-O.type;if(this.expr.length<O.expr.length)return-1;if(this.expr.length>O.expr.length)return 1;for(let H=0,U=this.expr.length;H<U;H++){const L=t(this.expr[H],O.expr[H]);if(L!==0)return L}return 0}equals(O){if(O.type===this.type){if(this.expr.length!==O.expr.length)return!1;for(let H=0,U=this.expr.length;H<U;H++)if(!this.expr[H].equals(O.expr[H]))return!1;return!0}return!1}substituteConstants(){const O=R(this.expr);return O===this.expr?this:x.create(O,this.negated,!1)}evaluate(O){for(let H=0,U=this.expr.length;H<U;H++)if(this.expr[H].evaluate(O))return!0;return!1}static _normalizeArr(O,H,U){let L=[],K=!1;if(O){for(let ee=0,oe=O.length;ee<oe;ee++){const ae=O[ee];if(!ae)continue;if(ae.type===0){K=!0;continue}if(ae.type===1)return r.INSTANCE;if(ae.type===9){L=L.concat(ae.expr);continue}L.push(ae)}if(L.length===0&&K)return h.INSTANCE;L.sort(t)}if(L.length===0)return;if(L.length===1)return L[0];for(let ee=1;ee<L.length;ee++)L[ee-1].equals(L[ee])&&(L.splice(ee,1),ee--);if(L.length===1)return L[0];if(U){for(let ee=0;ee<L.length;ee++)for(let oe=ee+1;oe<L.length;oe++)Y(L[ee],L[oe])&&(L.splice(oe,1),oe--);if(L.length===1)return L[0]}return new x(L,H)}serialize(){return this.expr.map(O=>O.serialize()).join(" || ")}keys(){const O=[];for(let H of this.expr)O.push(...H.keys());return O}negate(){if(!this.negated){let O=[];for(let H of this.expr)O.push(H.negate());for(;O.length>1;){const H=O.shift(),U=O.shift(),L=[];for(const ee of z(H))for(const oe of z(U))L.push(y.create([ee,oe],null));const K=O.length===0;O.unshift(x.create(L,null,K))}this.negated=O[0]}return this.negated}}class C extends c{constructor(O,H,U){super(O,null);this._defaultValue=H,typeof U=="object"?C._info.push(Object.assign(Object.assign({},U),{key:O})):U!==!0&&C._info.push({key:O,description:U,type:H!=null?typeof H:void 0})}static all(){return C._info.values()}bindTo(O){return O.createKey(this.key,this._defaultValue)}getValue(O){return O.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(O){return i.create(this.key,O)}}C._info=[];const S=Object(w.c)("contextKeyService"),F="setContext";function j(O,H){return O<H?-1:O>H?1:0}function A(O,H,U,L){return O<U?-1:O>U?1:H<L?-1:H>L?1:0}function Y(O,H){if(H.type===6&&O.type!==9&&O.type!==6){for(const K of H.expr)if(O.equals(K))return!0}const U=O.negate(),L=z(U).concat(z(H));L.sort(t);for(let K=0;K<L.length;K++){const ee=L[K],oe=ee.negate();for(let ae=K+1;ae<L.length;ae++){const be=L[ae];if(oe.equals(be))return!0}}return!1}function z(O){return O.type===9?O.expr:[O]}},TXwP:function(B,Q,D){var N,g;(function(){var w;(function(){"use strict";var b=[,,function(t){function h(i){this.__parent=i,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=[]}h.prototype.clone_empty=function(){var i=new h(this.__parent);return i.set_indent(this.__indent_count,this.__alignment_count),i},h.prototype.item=function(i){return i<0?this.__items[this.__items.length+i]:this.__items[i]},h.prototype.has_match=function(i){for(var n=this.__items.length-1;n>=0;n--)if(this.__items[n].match(i))return!0;return!1},h.prototype.set_indent=function(i,n){this.is_empty()&&(this.__indent_count=i||0,this.__alignment_count=n||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},h.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)},h.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},h.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var i=this.__parent.current_line;return i.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),i.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),i.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,i.__items[0]===" "&&(i.__items.splice(0,1),i.__character_count-=1),!0}return!1},h.prototype.is_empty=function(){return this.__items.length===0},h.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},h.prototype.push=function(i){this.__items.push(i);var n=i.lastIndexOf(`
|
|
|
`);n!==-1?this.__character_count=i.length-n:this.__character_count+=i.length},h.prototype.pop=function(){var i=null;return this.is_empty()||(i=this.__items.pop(),this.__character_count-=i.length),i},h.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},h.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},h.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},h.prototype.toString=function(){var i="";return this.is_empty()?this.__parent.indent_empty_lines&&(i=this.__parent.get_indent_string(this.__indent_count)):(i=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),i+=this.__items.join("")),i};function r(i,n){this.__cache=[""],this.__indent_size=i.indent_size,this.__indent_string=i.indent_char,i.indent_with_tabs||(this.__indent_string=new Array(i.indent_size+1).join(i.indent_char)),n=n||"",i.indent_level>0&&(n=new Array(i.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}r.prototype.get_indent_size=function(i,n){var l=this.__base_string_length;return n=n||0,i<0&&(l=0),l+=i*this.__indent_size,l+=n,l},r.prototype.get_indent_string=function(i,n){var l=this.__base_string;return n=n||0,i<0&&(i=0,l=""),n+=i*this.__indent_size,this.__ensure_cache(n),l+=this.__cache[n],l},r.prototype.__ensure_cache=function(i){for(;i>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var i=this.__cache.length,n=0,l="";this.__indent_size&&i>=this.__indent_size&&(n=Math.floor(i/this.__indent_size),i-=n*this.__indent_size,l=new Array(n+1).join(this.__indent_string)),i&&(l+=new Array(i+1).join(" ")),this.__cache.push(l)};function c(i,n){this.__indent_cache=new r(i,n),this.raw=!1,this._end_with_newline=i.end_with_newline,this.indent_size=i.indent_size,this.wrap_line_length=i.wrap_line_length,this.indent_empty_lines=i.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new h(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(i,n){return this.__indent_cache.get_indent_string(i,n)},c.prototype.get_indent_size=function(i,n){return this.__indent_cache.get_indent_size(i,n)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(i){return this.is_empty()||!i&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(i){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 l=this.__lines.join(`
|
|
|
`);return i!==`
|
|
|
`&&(l=l.replace(/[\n]/g,i)),l},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(i,n){return i=i||0,n=n||0,this.next_line.set_indent(i,n),this.__lines.length>1?(this.current_line.set_indent(i,n),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(i){for(var n=0;n<i.newlines;n++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(i.whitespace_before),this.current_line.push(i.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},c.prototype.add_token=function(i){this.__add_space_before_token(),this.current_line.push(i),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(i){for(var n=this.__lines.length;i<n;)this.__lines[i]._remove_indent(),i++;this.current_line._remove_wrap_indent()},c.prototype.trim=function(i){for(i=i===void 0?!1:i,this.current_line.trim();i&&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(i,n){for(var l=this.__lines.length-2;l>=0;){var f=this.__lines[l];if(f.is_empty())break;if(f.item(0).indexOf(i)!==0&&f.item(-1)!==n){this.__lines.splice(l+1,0,new h(this)),this.previous_line=this.__lines[this.__lines.length-2];break}l--}},t.exports.Output=c},,,,function(t){function h(i,n){this.raw_options=r(i,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"])}h.prototype._get_array=function(i,n){var l=this.raw_options[i],f=n||[];return typeof l=="object"?l!==null&&typeof l.concat=="function"&&(f=l.concat()):typeof l=="string"&&(f=l.split(/[^a-zA-Z0-9_\/\-]+/)),f},h.prototype._get_boolean=function(i,n){var l=this.raw_options[i],f=l===void 0?!!n:!!l;return f},h.prototype._get_characters=function(i,n){var l=this.raw_options[i],f=n||"";return typeof l=="string"&&(f=l.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),f},h.prototype._get_number=function(i,n){var l=this.raw_options[i];n=parseInt(n,10),isNaN(n)&&(n=0);var f=parseInt(l,10);return isNaN(f)&&(f=n),f},h.prototype._get_selection=function(i,n,l){var f=this._get_selection_list(i,n,l);if(f.length!==1)throw new Error("Invalid Option Value: The option '"+i+`' can only be one of the following values:
|
|
|
`+n+`
|
|
|
You passed in: '`+this.raw_options[i]+"'");return f[0]},h.prototype._get_selection_list=function(i,n,l){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(l=l||[n[0]],!this._is_valid_selection(l,n))throw new Error("Invalid Default Value!");var f=this._get_array(i,l);if(!this._is_valid_selection(f,n))throw new Error("Invalid Option Value: The option '"+i+`' can contain only the following values:
|
|
|
`+n+`
|
|
|
You passed in: '`+this.raw_options[i]+"'");return f},h.prototype._is_valid_selection=function(i,n){return i.length&&n.length&&!i.some(function(l){return n.indexOf(l)===-1})};function r(i,n){var l={};i=c(i);var f;for(f in i)f!==n&&(l[f]=i[f]);if(n&&i[n])for(f in i[n])l[f]=i[n][f];return l}function c(i){var n={},l;for(l in i){var f=l.replace(/-/g,"_");n[f]=i[l]}return n}t.exports.Options=h,t.exports.normalizeOpts=c,t.exports.mergeOpts=r},,function(t){var h=RegExp.prototype.hasOwnProperty("sticky");function r(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position<this.__input_length},r.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__input.charAt(this.__position),this.__position+=1),c},r.prototype.peek=function(c){var i=null;return c=c||0,c+=this.__position,c>=0&&c<this.__input_length&&(i=this.__input.charAt(c)),i},r.prototype.__match=function(c,i){c.lastIndex=i;var n=c.exec(this.__input);return n&&!(h&&c.sticky)&&(n.index!==i&&(n=null)),n},r.prototype.test=function(c,i){return i=i||0,i+=this.__position,i>=0&&i<this.__input_length?!!this.__match(c,i):!1},r.prototype.testChar=function(c,i){var n=this.peek(i);return c.lastIndex=0,n!==null&&c.test(n)},r.prototype.match=function(c){var i=this.__match(c,this.__position);return i?this.__position+=i[0].length:i=null,i},r.prototype.read=function(c,i,n){var l="",f;return c&&(f=this.match(c),f&&(l+=f[0])),i&&(f||!c)&&(l+=this.readUntil(i,n)),l},r.prototype.readUntil=function(c,i){var n="",l=this.__position;c.lastIndex=this.__position;var f=c.exec(this.__input);return f?(l=f.index,i&&(l+=f[0].length)):l=this.__input_length,n=this.__input.substring(this.__position,l),this.__position=l,n},r.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},r.prototype.get_regexp=function(c,i){var n=null,l="g";return i&&h&&(l="y"),typeof c=="string"&&c!==""?n=new RegExp(c,l):c&&(n=new RegExp(c.source,l)),n},r.prototype.get_literal_regexp=function(c){return RegExp(c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},r.prototype.peekUntilAfter=function(c){var i=this.__position,n=this.readUntilAfter(c);return this.__position=i,n},r.prototype.lookBack=function(c){var i=this.__position-1;return i>=c.length&&this.__input.substring(i-c.length,i).toLowerCase()===c},t.exports.InputScanner=r},,,,,function(t){function h(r,c){r=typeof r=="string"?r:r.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(r+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(r+/\sbeautify\signore:end\s/.source+c,"g")}h.prototype.get_directives=function(r){if(!r.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var i=this.__directive_pattern.exec(r);i;)c[i[1]]=i[2],i=this.__directive_pattern.exec(r);return c},h.prototype.readIgnored=function(r){return r.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=h},,function(t,h,r){var c=r(16).Beautifier,i=r(17).Options;function n(l,f){var d=new c(l,f);return d.beautify()}t.exports=n,t.exports.defaultOptions=function(){return new i}},function(t,h,r){var c=r(17).Options,i=r(2).Output,n=r(8).InputScanner,l=r(13).Directives,f=new l(/\/\*/,/\*\//),d=/\r\n|[\r\n]/,u=/\r\n|[\r\n]/g,o=/\s/,s=/(?:\s|\n)+/g,E=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,v=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function p(I,R){this._source_text=I||"",this._options=new c(R),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(I){var R="";for(this._ch=this._input.next();this._ch;){if(R+=this._ch,this._ch==="\\")R+=this._input.next();else if(I.indexOf(this._ch)!==-1||this._ch===`
|
|
|
`)break;this._ch=this._input.next()}return R},p.prototype.eatWhitespace=function(I){for(var R=o.test(this._input.peek()),y=0;o.test(this._input.peek());)this._ch=this._input.next(),I&&this._ch===`
|
|
|
`&&((y===0||y<this._options.max_preserve_newlines)&&(y++,this._output.add_new_line(!0)));return R},p.prototype.foundNestedPseudoClass=function(){for(var I=0,R=1,y=this._input.peek(R);y;){if(y==="{")return!0;if(y==="(")I+=1;else if(y===")"){if(I===0)return!1;I-=1}else if(y===";"||y==="}")return!1;R++,y=this._input.peek(R)}return!1},p.prototype.print_string=function(I){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(I)},p.prototype.preserveSingleSpace=function(I){I&&(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 I=this._source_text,R=this._options.eol;R==="auto"&&(R=`
|
|
|
`,I&&d.test(I||"")&&(R=I.match(d)[0])),I=I.replace(u,`
|
|
|
`);var y=I.match(/^[\t ]*/)[0];this._output=new i(this._options,y),this._input=new n(I),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var x=0,C=!1,S=!1,F=!1,j=!1,A=!1,Y=!1,z=this._ch,O=!1,H,U,L;H=this._input.read(s),U=H!=="",L=z,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),z=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var K=this._input.read(E),ee=f.get_directives(K);ee&&ee.ignore==="start"&&(K+=f.readIgnored(this._input)),this.print_string(K),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(v)),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"?j=!0:oe==="import"&&(A=!0),oe in this.NESTED_AT_RULE?(this._nestedLevel+=1,oe in this.CONDITIONAL_GROUP_RULE&&(F=!0)):!C&&x===0&&oe.indexOf(":")!==-1&&(S=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(U),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")S&&(S=!1,this.outdent()),F?(F=!1,C=this._indentLevel>=this._nestedLevel):C=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&C&&(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)):(L==="("?this._output.space_before_token=!1:L!==","&&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(),L==="{"&&this._output.trim(!0),A=!1,j=!1,S&&(this.outdent(),S=!1),this.print_string(this._ch),C=!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 ae=0;ae<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;ae++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[ae])){O=!0;break}(C||F)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!j&&x===0?(this.print_string(":"),S||(S=!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 be=L==='"'||L==="'";this.preserveSingleSpace(be||U),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")O=!1,x===0?(S&&(this.outdent(),S=!1),j=!1,A=!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(),x++,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(")")),x&&(x--,this.outdent()));else{var _e=!1;this._input.lookBack("with")&&(_e=!0),this.preserveSingleSpace(U||_e),this.print_string(this._ch),S&&L==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),Y=!0):(this.eatWhitespace(),x++,this.indent())}else if(this._ch===")")x&&(x--,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&&(!S||Y)&&x===0&&!A&&!j?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!S&&x===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&o.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("="),o.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 fe=L==='"'||L==="'";this.preserveSingleSpace(fe||U),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
|
`&&O&&this._output.add_new_line()}var Re=this._output.get_code(R);return Re},t.exports.Beautifier=p},function(t,h,r){var c=r(6).Options;function i(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 l=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||l;var f=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var d=0;d<f.length;d++)f[d]!=="expand"?this.brace_style="collapse":this.brace_style=f[d]}i.prototype=new c,t.exports.Options=i}],m={};function T(t){var h=m[t];if(h!==void 0)return h.exports;var r=m[t]={exports:{}};return b[t](r,r.exports,T),r.exports}var _=T(15);w=_})();var k=w;!(N=[],g=function(){return{css_beautify:k}}.apply(Q,N),g!==void 0&&(B.exports=g))})()},Vhoy:function(B,Q,D){"use strict";D.d(Q,"d",function(){return k}),D.d(Q,"e",function(){return b}),D.d(Q,"c",function(){return m}),D.d(Q,"b",function(){return T}),D.d(Q,"a",function(){return _});var N=D("MI8n");class g{constructor(){this._icons=new Map,this._onDidRegister=new N.b}add(t){const h=this._icons.get(t.id);h?t.description?h.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 w=new g,k=w;function b(t,h){return new T(t,h)}function m(t){return t?t.replace(/\$\((.*?)\)/g,(h,r)=>` ${r} `).trim():""}class T{constructor(t,h,r){this.id=t,this.definition=h,this.description=r,w.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 h=new RegExp(`^(${t.iconNameExpression})(${t.iconModifierExpression})?$`);function r(n){if(n instanceof T)return["codicon","codicon-"+n.id];const l=h.exec(n.id);if(!l)return r(T.error);let[,f,d]=l;const u=["codicon","codicon-"+f];return d&&u.push("codicon-modifier-"+d.substr(1)),u}t.asClassNameArray=r;function c(n){return r(n).join(" ")}t.asClassName=c;function i(n){return"."+r(n).join(".")}t.asCSSSelector=i})(_||(_={})),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"})}(T||(T={}))},"VrN/":function(B,Q,D){(function(N,g){B.exports=g()})(this,function(){"use strict";var N=navigator.userAgent,g=navigator.platform,w=/gecko\/\d/i.test(N),k=/MSIE \d/.test(N),b=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(N),m=/Edge\/(\d+)/.exec(N),T=k||b||m,_=T&&(k?document.documentMode||6:+(m||b)[1]),t=!m&&/WebKit\//.test(N),h=t&&/Qt\/\d+\.\d+/.test(N),r=!m&&/Chrome\//.test(N),c=/Opera\//.test(N),i=/Apple Computer/.test(navigator.vendor),n=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(N),l=/PhantomJS/.test(N),f=!m&&/AppleWebKit/.test(N)&&/Mobile\/\w+/.test(N),d=/Android/.test(N),u=f||d||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(N),o=f||/Mac/.test(g),s=/\bCrOS\b/.test(N),E=/win/i.test(g),v=c&&N.match(/Version\/(\d*\.\d*)/);v&&(v=Number(v[1])),v&&v>=15&&(c=!1,t=!0);var p=o&&(h||c&&(v==null||v<12.11)),I=w||T&&_>=9;function R(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var y=function(e,a){var P=e.className,M=R(a).exec(P);if(M){var G=P.slice(M.index+M[0].length);e.className=P.slice(0,M.index)+(G?M[1]+G:"")}};function x(e){for(var a=e.childNodes.length;a>0;--a)e.removeChild(e.firstChild);return e}function C(e,a){return x(e).appendChild(a)}function S(e,a,P,M){var G=document.createElement(e);if(P&&(G.className=P),M&&(G.style.cssText=M),typeof a=="string")G.appendChild(document.createTextNode(a));else if(a)for(var re=0;re<a.length;++re)G.appendChild(a[re]);return G}function F(e,a,P,M){var G=S(e,a,P,M);return G.setAttribute("role","presentation"),G}var j;document.createRange?j=function(e,a,P,M){var G=document.createRange();return G.setEnd(M||e,P),G.setStart(e,a),G}:j=function(e,a,P){var M=document.body.createTextRange();try{M.moveToElementText(e.parentNode)}catch(G){return M}return M.collapse(!0),M.moveEnd("character",P),M.moveStart("character",a),M};function A(e,a){if(a.nodeType==3&&(a=a.parentNode),e.contains)return e.contains(a);do if(a.nodeType==11&&(a=a.host),a==e)return!0;while(a=a.parentNode)}function Y(){var e;try{e=document.activeElement}catch(a){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function z(e,a){var P=e.className;R(a).test(P)||(e.className+=(P?" ":"")+a)}function O(e,a){for(var P=e.split(" "),M=0;M<P.length;M++)P[M]&&!R(P[M]).test(a)&&(a+=" "+P[M]);return a}var H=function(e){e.select()};f?H=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:T&&(H=function(e){try{e.select()}catch(a){}});function U(e){var a=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,a)}}function L(e,a,P){a||(a={});for(var M in e)e.hasOwnProperty(M)&&(P!==!1||!a.hasOwnProperty(M))&&(a[M]=e[M]);return a}function K(e,a,P,M,G){a==null&&(a=e.search(/[^\s\u00a0]/),a==-1&&(a=e.length));for(var re=M||0,se=G||0;;){var de=e.indexOf(" ",re);if(de<0||de>=a)return se+(a-re);se+=de-re,se+=P-se%P,re=de+1}}var ee=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};ee.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ee.prototype.set=function(e,a){this.f=a;var P=+new Date+e;(!this.id||P<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=P)};function oe(e,a){for(var P=0;P<e.length;++P)if(e[P]==a)return P;return-1}var ae=50,be={toString:function(){return"CodeMirror.Pass"}},_e={scroll:!1},fe={origin:"*mouse"},Re={origin:"+move"};function Ce(e,a,P){for(var M=0,G=0;;){var re=e.indexOf(" ",M);re==-1&&(re=e.length);var se=re-M;if(re==e.length||G+se>=a)return M+Math.min(se,a-G);if(G+=re-M,G+=P-G%P,M=re+1,G>=a)return M}}var ce=[""];function te(e){for(;ce.length<=e;)ce.push(W(ce)+" ");return ce[e]}function W(e){return e[e.length-1]}function X(e,a){for(var P=[],M=0;M<e.length;M++)P[M]=a(e[M],M);return P}function V(e,a,P){for(var M=0,G=P(a);M<e.length&&P(e[M])<=G;)M++;e.splice(M,0,a)}function Z(){}function q(e,a){var P;return Object.create?P=Object.create(e):(Z.prototype=e,P=new Z),a&&L(a,P),P}var ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ne(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ie.test(e))}function J(e,a){return a?a.source.indexOf("\\w")>-1&&ne(e)?!0:a.test(e):ne(e)}function $(e){for(var a in e)if(e.hasOwnProperty(a)&&e[a])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 he(e){return e.charCodeAt(0)>=768&&le.test(e)}function Se(e,a,P){for(;(P<0?a>0:a<e.length)&&he(e.charAt(a));)a+=P;return a}function Ue(e,a,P){for(var M=a>P?-1:1;;){if(a==P)return a;var G=(a+P)/2,re=M<0?Math.ceil(G):Math.floor(G);if(re==a)return e(re)?a:P;e(re)?P=re:a=re+M}}function Xe(e,a,P,M){if(!e)return M(a,P,"ltr",0);for(var G=!1,re=0;re<e.length;++re){var se=e[re];(se.from<P&&se.to>a||a==P&&se.to==a)&&(M(Math.max(se.from,a),Math.min(se.to,P),se.level==1?"rtl":"ltr",re),G=!0)}G||M(a,P,"ltr")}var $e=null;function Ye(e,a,P){var M;$e=null;for(var G=0;G<e.length;++G){var re=e[G];if(re.from<a&&re.to>a)return G;re.to==a&&(re.from!=re.to&&P=="before"?M=G:$e=G),re.from==a&&(re.from!=re.to&&P!="before"?M=G:$e=G)}return M!=null?M:$e}var et=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",a="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function P(we){return we<=247?e.charAt(we):1424<=we&&we<=1524?"R":1536<=we&&we<=1785?a.charAt(we-1536):1774<=we&&we<=2220?"r":8192<=we&&we<=8203?"w":we==8204?"b":"L"}var M=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,G=/[stwN]/,re=/[LRr]/,se=/[Lb1n]/,de=/[1n]/;function ge(we,Fe,He){this.level=we,this.from=Fe,this.to=He}return function(we,Fe){var He=Fe=="ltr"?"L":"R";if(we.length==0||Fe=="ltr"&&!M.test(we))return!1;for(var tt=we.length,Qe=[],lt=0;lt<tt;++lt)Qe.push(P(we.charCodeAt(lt)));for(var ft=0,bt=He;ft<tt;++ft){var At=Qe[ft];At=="m"?Qe[ft]=bt:bt=At}for(var Nt=0,Rt=He;Nt<tt;++Nt){var Wt=Qe[Nt];Wt=="1"&&Rt=="r"?Qe[Nt]="n":re.test(Wt)&&(Rt=Wt,Wt=="r"&&(Qe[Nt]="R"))}for(var nr=1,Qt=Qe[0];nr<tt-1;++nr){var Tr=Qe[nr];Tr=="+"&&Qt=="1"&&Qe[nr+1]=="1"?Qe[nr]="1":Tr==","&&Qt==Qe[nr+1]&&(Qt=="1"||Qt=="n")&&(Qe[nr]=Qt),Qt=Tr}for(var un=0;un<tt;++un){var oi=Qe[un];if(oi==",")Qe[un]="N";else if(oi=="%"){var Cn=void 0;for(Cn=un+1;Cn<tt&&Qe[Cn]=="%";++Cn);for(var Ni=un&&Qe[un-1]=="!"||Cn<tt&&Qe[Cn]=="1"?"1":"N",Ii=un;Ii<Cn;++Ii)Qe[Ii]=Ni;un=Cn-1}}for(var Hn=0,Di=He;Hn<tt;++Hn){var ci=Qe[Hn];Di=="L"&&ci=="1"?Qe[Hn]="L":re.test(ci)&&(Di=ci)}for(var ti=0;ti<tt;++ti)if(G.test(Qe[ti])){var Wn=void 0;for(Wn=ti+1;Wn<tt&&G.test(Qe[Wn]);++Wn);for(var Ln=(ti?Qe[ti-1]:He)=="L",Li=(Wn<tt?Qe[Wn]:He)=="L",Za=Ln==Li?Ln?"L":"R":He,Ca=ti;Ca<Wn;++Ca)Qe[Ca]=Za;ti=Wn-1}for(var _i=[],la,si=0;si<tt;)if(se.test(Qe[si])){var ps=si;for(++si;si<tt&&se.test(Qe[si]);++si);_i.push(new ge(0,ps,si))}else{var ga=si,La=_i.length,ka=Fe=="rtl"?1:0;for(++si;si<tt&&Qe[si]!="L";++si);for(var Ci=ga;Ci<si;)if(de.test(Qe[Ci])){ga<Ci&&(_i.splice(La,0,new ge(1,ga,Ci)),La+=ka);var qa=Ci;for(++Ci;Ci<si&&de.test(Qe[Ci]);++Ci);_i.splice(La,0,new ge(2,qa,Ci)),La+=ka,ga=Ci}else++Ci;ga<si&&_i.splice(La,0,new ge(1,ga,si))}return Fe=="ltr"&&(_i[0].level==1&&(la=we.match(/^\s+/))&&(_i[0].from=la[0].length,_i.unshift(new ge(0,0,la[0].length))),W(_i).level==1&&(la=we.match(/\s+$/))&&(W(_i).to-=la[0].length,_i.push(new ge(0,tt-la[0].length,tt)))),Fe=="rtl"?_i.reverse():_i}}();function qe(e,a){var P=e.order;return P==null&&(P=e.order=et(e.text,a)),P}var Pe=[],Ie=function(e,a,P){if(e.addEventListener)e.addEventListener(a,P,!1);else if(e.attachEvent)e.attachEvent("on"+a,P);else{var M=e._handlers||(e._handlers={});M[a]=(M[a]||Pe).concat(P)}};function Ze(e,a){return e._handlers&&e._handlers[a]||Pe}function nt(e,a,P){if(e.removeEventListener)e.removeEventListener(a,P,!1);else if(e.detachEvent)e.detachEvent("on"+a,P);else{var M=e._handlers,G=M&&M[a];if(G){var re=oe(G,P);re>-1&&(M[a]=G.slice(0,re).concat(G.slice(re+1)))}}}function ye(e,a){var P=Ze(e,a);if(!P.length)return;for(var M=Array.prototype.slice.call(arguments,2),G=0;G<P.length;++G)P[G].apply(null,M)}function ue(e,a,P){return typeof a=="string"&&(a={type:a,preventDefault:function(){this.defaultPrevented=!0}}),ye(e,P||a.type,e,a),Ae(a)||a.codemirrorIgnore}function pe(e){var a=e._handlers&&e._handlers.cursorActivity;if(!a)return;for(var P=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),M=0;M<a.length;++M)oe(P,a[M])==-1&&P.push(a[M])}function me(e,a){return Ze(e,a).length>0}function Oe(e){e.prototype.on=function(a,P){Ie(this,a,P)},e.prototype.off=function(a,P){nt(this,a,P)}}function ve(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ae(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Le(e){ve(e),xe(e)}function Me(e){return e.target||e.srcElement}function We(e){var a=e.which;return a==null&&(e.button&1?a=1:e.button&2?a=3:e.button&4&&(a=2)),o&&e.ctrlKey&&a==1&&(a=3),a}var rt=function(){if(T&&_<9)return!1;var e=S("div");return"draggable"in e||"dragDrop"in e}(),at;function it(e){if(at==null){var a=S("span","\u200B");C(e,S("span",[a,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(at=a.offsetWidth<=1&&a.offsetHeight>2&&!(T&&_<8))}var P=at?S("span","\u200B"):S("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return P.setAttribute("cm-text",""),P}var st;function Ct(e){if(st!=null)return st;var a=C(e,document.createTextNode("A\u062EA")),P=j(a,0,1).getBoundingClientRect(),M=j(a,1,2).getBoundingClientRect();return x(e),!P||P.left==P.right?!1:st=M.right-P.right<3}var yt=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var a=0,P=[],M=e.length;a<=M;){var G=e.indexOf(`
|
|
|
`,a);G==-1&&(G=e.length);var re=e.slice(a,e.charAt(G-1)=="\r"?G-1:G),se=re.indexOf("\r");se!=-1?(P.push(re.slice(0,se)),a+=se+1):(P.push(re),a=G+1)}return P}:function(e){return e.split(/\r\n?|\n/)},ht=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(a){return!1}}:function(e){var a;try{a=e.ownerDocument.selection.createRange()}catch(P){}return!a||a.parentElement()!=e?!1:a.compareEndPoints("StartToEnd",a)!=0},Ut=function(){var e=S("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),kt=null;function Yt(e){if(kt!=null)return kt;var a=C(e,S("span","x")),P=a.getBoundingClientRect(),M=j(a,0,1).getBoundingClientRect();return kt=Math.abs(P.left-M.left)>1}var Zt={},Mt={};function wt(e,a){arguments.length>2&&(a.dependencies=Array.prototype.slice.call(arguments,2)),Zt[e]=a}function $t(e,a){Mt[e]=a}function Dt(e){if(typeof e=="string"&&Mt.hasOwnProperty(e))e=Mt[e];else if(e&&typeof e.name=="string"&&Mt.hasOwnProperty(e.name)){var a=Mt[e.name];typeof a=="string"&&(a={name:a}),e=q(a,e),e.name=a.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Dt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Dt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Tt(e,a){a=Dt(a);var P=Zt[a.name];if(!P)return Tt(e,"text/plain");var M=P(e,a);if(_t.hasOwnProperty(a.name)){var G=_t[a.name];for(var re in G){if(!G.hasOwnProperty(re))continue;M.hasOwnProperty(re)&&(M["_"+re]=M[re]),M[re]=G[re]}}if(M.name=a.name,a.helperType&&(M.helperType=a.helperType),a.modeProps)for(var se in a.modeProps)M[se]=a.modeProps[se];return M}var _t={};function Et(e,a){var P=_t.hasOwnProperty(e)?_t[e]:_t[e]={};L(a,P)}function Bt(e,a){if(a===!0)return a;if(e.copyState)return e.copyState(a);var P={};for(var M in a){var G=a[M];G instanceof Array&&(G=G.concat([])),P[M]=G}return P}function Dr(e,a){for(var P;e.innerMode&&!(P=e.innerMode(a),!P||P.mode==e);)a=P.state,e=P.mode;return P||{mode:e,state:a}}function pt(e,a,P){return e.startState?e.startState(a,P):!0}var St=function(e,a,P){this.pos=this.start=0,this.string=e,this.tabSize=a||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=P};St.prototype.eol=function(){return this.pos>=this.string.length},St.prototype.sol=function(){return this.pos==this.lineStart},St.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},St.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},St.prototype.eat=function(e){var a=this.string.charAt(this.pos),P;if(typeof e=="string"?P=a==e:P=a&&(e.test?e.test(a):e(a)),P)return++this.pos,a},St.prototype.eatWhile=function(e){for(var a=this.pos;this.eat(e););return this.pos>a},St.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},St.prototype.skipToEnd=function(){this.pos=this.string.length},St.prototype.skipTo=function(e){var a=this.string.indexOf(e,this.pos);if(a>-1)return this.pos=a,!0},St.prototype.backUp=function(e){this.pos-=e},St.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=K(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?K(this.string,this.lineStart,this.tabSize):0)},St.prototype.indentation=function(){return K(this.string,null,this.tabSize)-(this.lineStart?K(this.string,this.lineStart,this.tabSize):0)},St.prototype.match=function(e,a,P){if(typeof e=="string"){var M=function(se){return P?se.toLowerCase():se},G=this.string.substr(this.pos,e.length);if(M(G)==M(e))return a!==!1&&(this.pos+=e.length),!0}else{var re=this.string.slice(this.pos).match(e);return re&&re.index>0?null:(re&&a!==!1&&(this.pos+=re[0].length),re)}},St.prototype.current=function(){return this.string.slice(this.start,this.pos)},St.prototype.hideFirstChars=function(e,a){this.lineStart+=e;try{return a()}finally{this.lineStart-=e}},St.prototype.lookAhead=function(e){var a=this.lineOracle;return a&&a.lookAhead(e)},St.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function dt(e,a){if(a-=e.first,a<0||a>=e.size)throw new Error("There is no line "+(a+e.first)+" in the document.");for(var P=e;!P.lines;)for(var M=0;;++M){var G=P.children[M],re=G.chunkSize();if(a<re){P=G;break}a-=re}return P.lines[a]}function Ht(e,a,P){var M=[],G=a.line;return e.iter(a.line,P.line+1,function(re){var se=re.text;G==P.line&&(se=se.slice(0,P.ch)),G==a.line&&(se=se.slice(a.ch)),M.push(se),++G}),M}function Gt(e,a,P){var M=[];return e.iter(a,P,function(G){M.push(G.text)}),M}function vt(e,a){var P=a-e.height;if(P)for(var M=e;M;M=M.parent)M.height+=P}function xt(e){if(e.parent==null)return null;for(var a=e.parent,P=oe(a.lines,e),M=a.parent;M;a=M,M=M.parent)for(var G=0;!(M.children[G]==a);++G)P+=M.children[G].chunkSize();return P+a.first}function Kt(e,a){var P=e.first;e:do{for(var M=0;M<e.children.length;++M){var G=e.children[M],re=G.height;if(a<re){e=G;continue e}a-=re,P+=G.chunkSize()}return P}while(!e.lines);for(var se=0;se<e.lines.length;++se){var de=e.lines[se],ge=de.height;if(a<ge)break;a-=ge}return P+se}function Ar(e,a){return a>=e.first&&a<e.first+e.size}function qt(e,a){return String(e.lineNumberFormatter(a+e.firstLineNumber))}function ut(e,a,P){if(P===void 0&&(P=null),!(this instanceof ut))return new ut(e,a,P);this.line=e,this.ch=a,this.sticky=P}function Lt(e,a){return e.line-a.line||e.ch-a.ch}function Hr(e,a){return e.sticky==a.sticky&&Lt(e,a)==0}function Yr(e){return ut(e.line,e.ch)}function On(e,a){return Lt(e,a)<0?a:e}function cn(e,a){return Lt(e,a)<0?e:a}function zr(e,a){return Math.max(e.first,Math.min(a,e.first+e.size-1))}function Pt(e,a){if(a.line<e.first)return ut(e.first,0);var P=e.first+e.size-1;return a.line>P?ut(P,dt(e,P).text.length):dn(a,dt(e,a.line).text.length)}function dn(e,a){var P=e.ch;return P==null||P>a?ut(e.line,a):P<0?ut(e.line,0):e}function ct(e,a){for(var P=[],M=0;M<a.length;M++)P[M]=Pt(e,a[M]);return P}var jr=function(e,a){this.state=e,this.lookAhead=a},xr=function(e,a,P,M){this.state=a,this.doc=e,this.line=P,this.maxLookAhead=M||0,this.baseTokens=null,this.baseTokenPos=1};xr.prototype.lookAhead=function(e){var a=this.doc.getLine(this.line+e);return a!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),a},xr.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var a=this.baseTokens[this.baseTokenPos+1];return{type:a&&a.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},xr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},xr.fromSaved=function(e,a,P){return a instanceof jr?new xr(e,Bt(e.mode,a.state),P,a.lookAhead):new xr(e,Bt(e.mode,a),P)},xr.prototype.save=function(e){var a=e!==!1?Bt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new jr(a,this.maxLookAhead):a};function Gn(e,a,P,M){var G=[e.state.modeGen],re={};Vr(e,a.text,e.doc.mode,P,function(we,Fe){return G.push(we,Fe)},re,M);for(var se=P.state,de=function(we){P.baseTokens=G;var Fe=e.state.overlays[we],He=1,tt=0;P.state=!0,Vr(e,a.text,Fe.mode,P,function(Qe,lt){for(var ft=He;tt<Qe;){var bt=G[He];bt>Qe&&G.splice(He,1,Qe,G[He+1],bt),He+=2,tt=Math.min(Qe,bt)}if(!lt)return;if(Fe.opaque)G.splice(ft,He-ft,Qe,"overlay "+lt),He=ft+2;else for(;ft<He;ft+=2){var At=G[ft+1];G[ft+1]=(At?At+" ":"")+"overlay "+lt}},re),P.state=se,P.baseTokens=null,P.baseTokenPos=1},ge=0;ge<e.state.overlays.length;++ge)de(ge);return{styles:G,classes:re.bgClass||re.textClass?re:null}}function An(e,a,P){if(!a.styles||a.styles[0]!=e.state.modeGen){var M=hn(e,xt(a)),G=a.text.length>e.options.maxHighlightLength&&Bt(e.doc.mode,M.state),re=Gn(e,a,M);G&&(M.state=G),a.stateAfter=M.save(!G),a.styles=re.styles,re.classes?a.styleClasses=re.classes:a.styleClasses&&(a.styleClasses=null),P===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return a.styles}function hn(e,a,P){var M=e.doc,G=e.display;if(!M.mode.startState)return new xr(M,!0,a);var re=dr(e,a,P),se=re>M.first&&dt(M,re-1).stateAfter,de=se?xr.fromSaved(M,se,re):new xr(M,pt(M.mode),re);return M.iter(re,a,function(ge){Ei(e,ge.text,de);var we=de.line;ge.stateAfter=we==a-1||we%5==0||we>=G.viewFrom&&we<G.viewTo?de.save():null,de.nextLine()}),P&&(M.modeFrontier=de.line),de}function Ei(e,a,P,M){var G=e.doc.mode,re=new St(a,e.options.tabSize,P);for(re.start=re.pos=M||0,a==""&&Kn(G,P.state);!re.eol();)bn(G,re,P.state),re.start=re.pos}function Kn(e,a){if(e.blankLine)return e.blankLine(a);if(!e.innerMode)return;var P=Dr(e,a);if(P.mode.blankLine)return P.mode.blankLine(P.state)}function bn(e,a,P,M){for(var G=0;G<10;G++){M&&(M[0]=Dr(e,P).mode);var re=e.token(a,P);if(a.pos>a.start)return re}throw new Error("Mode "+e.name+" failed to advance stream.")}var Fr=function(e,a,P){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=a||null,this.state=P};function di(e,a,P,M){var G=e.doc,re=G.mode,se;a=Pt(G,a);var de=dt(G,a.line),ge=hn(e,a.line,P),we=new St(de.text,e.options.tabSize,ge),Fe;for(M&&(Fe=[]);(M||we.pos<a.ch)&&!we.eol();)we.start=we.pos,se=bn(re,we,ge.state),M&&Fe.push(new Fr(we,se,Bt(G.mode,ge.state)));return M?Fe:new Fr(we,se,ge.state)}function fn(e,a){if(e)for(;;){var P=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!P)break;e=e.slice(0,P.index)+e.slice(P.index+P[0].length);var M=P[1]?"bgClass":"textClass";a[M]==null?a[M]=P[2]:new RegExp("(?:^|\\s)"+P[2]+"(?:$|\\s)").test(a[M])||(a[M]+=" "+P[2])}return e}function Vr(e,a,P,M,G,re,se){var de=P.flattenSpans;de==null&&(de=e.options.flattenSpans);var ge=0,we=null,Fe=new St(a,e.options.tabSize,M),He,tt=e.options.addModeClass&&[null];for(a==""&&fn(Kn(P,M.state),re);!Fe.eol();){if(Fe.pos>e.options.maxHighlightLength?(de=!1,se&&Ei(e,a,M,Fe.pos),Fe.pos=a.length,He=null):He=fn(bn(P,Fe,M.state,tt),re),tt){var Qe=tt[0].name;Qe&&(He="m-"+(He?Qe+" "+He:Qe))}if(!de||we!=He){for(;ge<Fe.start;)ge=Math.min(Fe.start,ge+5e3),G(ge,we);we=He}Fe.start=Fe.pos}for(;ge<Fe.pos;){var lt=Math.min(Fe.pos,ge+5e3);G(lt,we),ge=lt}}function dr(e,a,P){for(var M,G,re=e.doc,se=P?-1:a-(e.doc.mode.innerMode?1e3:100),de=a;de>se;--de){if(de<=re.first)return re.first;var ge=dt(re,de-1),we=ge.stateAfter;if(we&&(!P||de+(we instanceof jr?we.lookAhead:0)<=re.modeFrontier))return de;var Fe=K(ge.text,null,e.options.tabSize);(G==null||M>Fe)&&(G=de-1,M=Fe)}return G}function nn(e,a){if(e.modeFrontier=Math.min(e.modeFrontier,a),e.highlightFrontier<a-10)return;for(var P=e.first,M=a-1;M>P;M--){var G=dt(e,M).stateAfter;if(G&&(!(G instanceof jr)||M+G.lookAhead<a)){P=M+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,P)}var _n=!1,jt=!1;function lr(){_n=!0}function ur(){jt=!0}function Rr(e,a,P){this.marker=e,this.from=a,this.to=P}function br(e,a){if(e)for(var P=0;P<e.length;++P){var M=e[P];if(M.marker==a)return M}}function hi(e,a){for(var P,M=0;M<e.length;++M)e[M]!=a&&(P||(P=[])).push(e[M]);return P}function Fn(e,a){e.markedSpans=e.markedSpans?e.markedSpans.concat([a]):[a],a.marker.attachLine(e)}function $i(e,a,P){var M;if(e)for(var G=0;G<e.length;++G){var re=e[G],se=re.marker,de=re.from==null||(se.inclusiveLeft?re.from<=a:re.from<a);if(de||re.from==a&&se.type=="bookmark"&&(!P||!re.marker.insertLeft)){var ge=re.to==null||(se.inclusiveRight?re.to>=a:re.to>a);(M||(M=[])).push(new Rr(se,re.from,ge?null:re.to))}}return M}function Ji(e,a,P){var M;if(e)for(var G=0;G<e.length;++G){var re=e[G],se=re.marker,de=re.to==null||(se.inclusiveRight?re.to>=a:re.to>a);if(de||re.from==a&&se.type=="bookmark"&&(!P||re.marker.insertLeft)){var ge=re.from==null||(se.inclusiveLeft?re.from<=a:re.from<a);(M||(M=[])).push(new Rr(se,ge?null:re.from-a,re.to==null?null:re.to-a))}}return M}function Oi(e,a){if(a.full)return null;var P=Ar(e,a.from.line)&&dt(e,a.from.line).markedSpans,M=Ar(e,a.to.line)&&dt(e,a.to.line).markedSpans;if(!P&&!M)return null;var G=a.from.ch,re=a.to.ch,se=Lt(a.from,a.to)==0,de=$i(P,G,se),ge=Ji(M,re,se),we=a.text.length==1,Fe=W(a.text).length+(we?G:0);if(de)for(var He=0;He<de.length;++He){var tt=de[He];if(tt.to==null){var Qe=br(ge,tt.marker);Qe?we&&(tt.to=Qe.to==null?null:Qe.to+Fe):tt.to=G}}if(ge)for(var lt=0;lt<ge.length;++lt){var ft=ge[lt];if(ft.to!=null&&(ft.to+=Fe),ft.from==null){var bt=br(de,ft.marker);bt||(ft.from=Fe,we&&(de||(de=[])).push(ft))}else ft.from+=Fe,we&&(de||(de=[])).push(ft)}de&&(de=pn(de)),ge&&ge!=de&&(ge=pn(ge));var At=[de];if(!we){var Nt=a.text.length-2,Rt;if(Nt>0&&de)for(var Wt=0;Wt<de.length;++Wt)de[Wt].to==null&&(Rt||(Rt=[])).push(new Rr(de[Wt].marker,null,null));for(var nr=0;nr<Nt;++nr)At.push(Rt);At.push(ge)}return At}function pn(e){for(var a=0;a<e.length;++a){var P=e[a];P.from!=null&&P.from==P.to&&P.marker.clearWhenEmpty!==!1&&e.splice(a--,1)}return e.length?e:null}function Ki(e,a,P){var M=null;if(e.iter(a.line,P.line+1,function(Qe){if(Qe.markedSpans)for(var lt=0;lt<Qe.markedSpans.length;++lt){var ft=Qe.markedSpans[lt].marker;ft.readOnly&&(!M||oe(M,ft)==-1)&&(M||(M=[])).push(ft)}}),!M)return null;for(var G=[{from:a,to:P}],re=0;re<M.length;++re)for(var se=M[re],de=se.find(0),ge=0;ge<G.length;++ge){var we=G[ge];if(Lt(we.to,de.from)<0||Lt(we.from,de.to)>0)continue;var Fe=[ge,1],He=Lt(we.from,de.from),tt=Lt(we.to,de.to);(He<0||!se.inclusiveLeft&&!He)&&Fe.push({from:we.from,to:de.from}),(tt>0||!se.inclusiveRight&&!tt)&&Fe.push({from:de.to,to:we.to}),G.splice.apply(G,Fe),ge+=Fe.length-3}return G}function Zr(e){var a=e.markedSpans;if(!a)return;for(var P=0;P<a.length;++P)a[P].marker.detachLine(e);e.markedSpans=null}function ri(e,a){if(!a)return;for(var P=0;P<a.length;++P)a[P].marker.attachLine(e);e.markedSpans=a}function kn(e){return e.inclusiveLeft?-1:0}function sn(e){return e.inclusiveRight?1:0}function Tn(e,a){var P=e.lines.length-a.lines.length;if(P!=0)return P;var M=e.find(),G=a.find(),re=Lt(M.from,G.from)||kn(e)-kn(a);if(re)return-re;var se=Lt(M.to,G.to)||sn(e)-sn(a);return se||a.id-e.id}function fi(e,a){var P=jt&&e.markedSpans,M;if(P)for(var G=void 0,re=0;re<P.length;++re)G=P[re],G.marker.collapsed&&(a?G.from:G.to)==null&&(!M||Tn(M,G.marker)<0)&&(M=G.marker);return M}function zn(e){return fi(e,!0)}function Vn(e){return fi(e,!1)}function ki(e,a){var P=jt&&e.markedSpans,M;if(P)for(var G=0;G<P.length;++G){var re=P[G];re.marker.collapsed&&(re.from==null||re.from<a)&&(re.to==null||re.to>a)&&(!M||Tn(M,re.marker)<0)&&(M=re.marker)}return M}function Mi(e,a,P,M,G){var re=dt(e,a),se=jt&&re.markedSpans;if(se)for(var de=0;de<se.length;++de){var ge=se[de];if(!ge.marker.collapsed)continue;var we=ge.marker.find(0),Fe=Lt(we.from,P)||kn(ge.marker)-kn(G),He=Lt(we.to,M)||sn(ge.marker)-sn(G);if(Fe>=0&&He<=0||Fe<=0&&He>=0)continue;if(Fe<=0&&(ge.marker.inclusiveRight&&G.inclusiveLeft?Lt(we.to,P)>=0:Lt(we.to,P)>0)||Fe>=0&&(ge.marker.inclusiveRight&&G.inclusiveLeft?Lt(we.from,M)<=0:Lt(we.from,M)<0))return!0}}function Xn(e){for(var a;a=zn(e);)e=a.find(-1,!0).line;return e}function ji(e){for(var a;a=Vn(e);)e=a.find(1,!0).line;return e}function pi(e){for(var a,P;a=Vn(e);)e=a.find(1,!0).line,(P||(P=[])).push(e);return P}function mi(e,a){var P=dt(e,a),M=Xn(P);return P==M?a:xt(M)}function Yn(e,a){if(a>e.lastLine())return a;var P=dt(e,a),M;if(!$n(e,P))return a;for(;M=Vn(P);)P=M.find(1,!0).line;return xt(P)+1}function $n(e,a){var P=jt&&a.markedSpans;if(P)for(var M=void 0,G=0;G<P.length;++G){if(M=P[G],!M.marker.collapsed)continue;if(M.from==null)return!0;if(M.marker.widgetNode)continue;if(M.from==0&&M.marker.inclusiveLeft&&Pi(e,a,M))return!0}}function Pi(e,a,P){if(P.to==null){var M=P.marker.find(1,!0);return Pi(e,M.line,br(M.line.markedSpans,P.marker))}if(P.marker.inclusiveRight&&P.to==a.text.length)return!0;for(var G=void 0,re=0;re<a.markedSpans.length;++re)if(G=a.markedSpans[re],G.marker.collapsed&&!G.marker.widgetNode&&G.from==P.to&&(G.to==null||G.to!=P.from)&&(G.marker.inclusiveLeft||P.marker.inclusiveRight)&&Pi(e,a,G))return!0}function ni(e){e=Xn(e);for(var a=0,P=e.parent,M=0;M<P.lines.length;++M){var G=P.lines[M];if(G==e)break;a+=G.height}for(var re=P.parent;re;P=re,re=P.parent)for(var se=0;se<re.children.length;++se){var de=re.children[se];if(de==P)break;a+=de.height}return a}function gi(e){if(e.height==0)return 0;for(var a=e.text.length,P,M=e;P=zn(M);){var G=P.find(0,!0);M=G.from.line,a+=G.from.ch-G.to.ch}for(M=e;P=Vn(M);){var re=P.find(0,!0);a-=M.text.length-re.from.ch,M=re.to.line,a+=M.text.length-re.to.ch}return a}function Fi(e){var a=e.display,P=e.doc;a.maxLine=dt(P,P.first),a.maxLineLength=gi(a.maxLine),a.maxLineChanged=!0,P.iter(function(M){var G=gi(M);G>a.maxLineLength&&(a.maxLineLength=G,a.maxLine=M)})}var ii=function(e,a,P){this.text=e,ri(this,a),this.height=P?P(this):1};ii.prototype.lineNo=function(){return xt(this)},Oe(ii);function Ur(e,a,P,M){e.text=a,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Zr(e),ri(e,P);var G=M?M(e):1;G!=e.height&&vt(e,G)}function Ft(e){e.parent=null,Zr(e)}var er={},zt={};function ar(e,a){if(!e||/^\s*$/.test(e))return null;var P=a.addModeClass?zt:er;return P[e]||(P[e]=e.replace(/\S+/g,"cm-$&"))}function _r(e,a){var P=F("span",null,null,t?"padding-right: .1px":null),M={pre:F("pre",[P],"CodeMirror-line"),content:P,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};a.measure={};for(var G=0;G<=(a.rest?a.rest.length:0);G++){var re=G?a.rest[G-1]:a.line,se=void 0;M.pos=0,M.addToken=mr,Ct(e.display.measure)&&(se=qe(re,e.doc.direction))&&(M.addToken=Un(M.addToken,se)),M.map=[];var de=a!=e.display.externalMeasured&&xt(re);vi(re,M,An(e,re,de)),re.styleClasses&&(re.styleClasses.bgClass&&(M.bgClass=O(re.styleClasses.bgClass,M.bgClass||"")),re.styleClasses.textClass&&(M.textClass=O(re.styleClasses.textClass,M.textClass||""))),M.map.length==0&&M.map.push(0,0,M.content.appendChild(it(e.display.measure))),G==0?(a.measure.map=M.map,a.measure.cache={}):((a.measure.maps||(a.measure.maps=[])).push(M.map),(a.measure.caches||(a.measure.caches=[])).push({}))}if(t){var ge=M.content.lastChild;(/\bcm-tab\b/.test(ge.className)||ge.querySelector&&ge.querySelector(".cm-tab"))&&(M.content.className="cm-tab-wrap-hack")}return ye(e,"renderLine",e,a.line,M.pre),M.pre.className&&(M.textClass=O(M.pre.className,M.textClass||"")),M}function Lr(e){var a=S("span","\u2022","cm-invalidchar");return a.title="\\u"+e.charCodeAt(0).toString(16),a.setAttribute("aria-label",a.title),a}function mr(e,a,P,M,G,re,se){if(!a)return;var de=e.splitSpaces?qr(a,e.trailingSpace):a,ge=e.cm.state.specialChars,we=!1,Fe;if(!ge.test(a))e.col+=a.length,Fe=document.createTextNode(de),e.map.push(e.pos,e.pos+a.length,Fe),T&&_<9&&(we=!0),e.pos+=a.length;else{Fe=document.createDocumentFragment();for(var He=0;;){ge.lastIndex=He;var tt=ge.exec(a),Qe=tt?tt.index-He:a.length-He;if(Qe){var lt=document.createTextNode(de.slice(He,He+Qe));T&&_<9?Fe.appendChild(S("span",[lt])):Fe.appendChild(lt),e.map.push(e.pos,e.pos+Qe,lt),e.col+=Qe,e.pos+=Qe}if(!tt)break;He+=Qe+1;var ft=void 0;if(tt[0]==" "){var bt=e.cm.options.tabSize,At=bt-e.col%bt;ft=Fe.appendChild(S("span",te(At),"cm-tab")),ft.setAttribute("role","presentation"),ft.setAttribute("cm-text"," "),e.col+=At}else tt[0]=="\r"||tt[0]==`
|
|
|
`?(ft=Fe.appendChild(S("span",tt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ft.setAttribute("cm-text",tt[0]),e.col+=1):(ft=e.cm.options.specialCharPlaceholder(tt[0]),ft.setAttribute("cm-text",tt[0]),T&&_<9?Fe.appendChild(S("span",[ft])):Fe.appendChild(ft),e.col+=1);e.map.push(e.pos,e.pos+1,ft),e.pos++}}if(e.trailingSpace=de.charCodeAt(a.length-1)==32,P||M||G||we||re||se){var Nt=P||"";M&&(Nt+=M),G&&(Nt+=G);var Rt=S("span",[Fe],Nt,re);if(se)for(var Wt in se)se.hasOwnProperty(Wt)&&Wt!="style"&&Wt!="class"&&Rt.setAttribute(Wt,se[Wt]);return e.content.appendChild(Rt)}e.content.appendChild(Fe)}function qr(e,a){if(e.length>1&&!/ /.test(e))return e;for(var P=a,M="",G=0;G<e.length;G++){var re=e.charAt(G);re==" "&&P&&(G==e.length-1||e.charCodeAt(G+1)==32)&&(re="\xA0"),M+=re,P=re==" "}return M}function Un(e,a){return function(P,M,G,re,se,de,ge){G=G?G+" cm-force-border":"cm-force-border";for(var we=P.pos,Fe=we+M.length;;){for(var He=void 0,tt=0;tt<a.length&&!(He=a[tt],He.to>we&&He.from<=we);tt++);if(He.to>=Fe)return e(P,M,G,re,se,de,ge);e(P,M.slice(0,He.to-we),G,re,null,de,ge),re=null,M=M.slice(He.to-we),we=He.to}}}function hr(e,a,P,M){var G=!M&&P.widgetNode;G&&e.map.push(e.pos,e.pos+a,G),!M&&e.cm.display.input.needsContentAttribute&&(G||(G=e.content.appendChild(document.createElement("span"))),G.setAttribute("cm-marker",P.id)),G&&(e.cm.display.input.setUneditable(G),e.content.appendChild(G)),e.pos+=a,e.trailingSpace=!1}function vi(e,a,P){var M=e.markedSpans,G=e.text,re=0;if(!M){for(var se=1;se<P.length;se+=2)a.addToken(a,G.slice(re,re=P[se]),ar(P[se+1],a.cm.options));return}for(var de=G.length,ge=0,we=1,Fe="",He,tt,Qe=0,lt,ft,bt,At,Nt;;){if(Qe==ge){lt=ft=bt=tt="",Nt=null,At=null,Qe=Infinity;for(var Rt=[],Wt=void 0,nr=0;nr<M.length;++nr){var Qt=M[nr],Tr=Qt.marker;if(Tr.type=="bookmark"&&Qt.from==ge&&Tr.widgetNode)Rt.push(Tr);else if(Qt.from<=ge&&(Qt.to==null||Qt.to>ge||Tr.collapsed&&Qt.to==ge&&Qt.from==ge)){if(Qt.to!=null&&Qt.to!=ge&&Qe>Qt.to&&(Qe=Qt.to,ft=""),Tr.className&&(lt+=" "+Tr.className),Tr.css&&(tt=(tt?tt+";":"")+Tr.css),Tr.startStyle&&Qt.from==ge&&(bt+=" "+Tr.startStyle),Tr.endStyle&&Qt.to==Qe&&(Wt||(Wt=[])).push(Tr.endStyle,Qt.to),Tr.title&&((Nt||(Nt={})).title=Tr.title),Tr.attributes)for(var un in Tr.attributes)(Nt||(Nt={}))[un]=Tr.attributes[un];Tr.collapsed&&(!At||Tn(At.marker,Tr)<0)&&(At=Qt)}else Qt.from>ge&&Qe>Qt.from&&(Qe=Qt.from)}if(Wt)for(var oi=0;oi<Wt.length;oi+=2)Wt[oi+1]==Qe&&(ft+=" "+Wt[oi]);if(!At||At.from==ge)for(var Cn=0;Cn<Rt.length;++Cn)hr(a,0,Rt[Cn]);if(At&&(At.from||0)==ge){if(hr(a,(At.to==null?de+1:At.to)-ge,At.marker,At.from==null),At.to==null)return;At.to==ge&&(At=!1)}}if(ge>=de)break;for(var Ni=Math.min(de,Qe);;){if(Fe){var Ii=ge+Fe.length;if(!At){var Hn=Ii>Ni?Fe.slice(0,Ni-ge):Fe;a.addToken(a,Hn,He?He+lt:lt,bt,ge+Hn.length==Qe?ft:"",tt,Nt)}if(Ii>=Ni){Fe=Fe.slice(Ni-ge),ge=Ni;break}ge=Ii,bt=""}Fe=G.slice(re,re=P[we++]),He=ar(P[we++],a.cm.options)}}}function kr(e,a,P){this.line=a,this.rest=pi(a),this.size=this.rest?xt(W(this.rest))-P+1:1,this.node=this.text=null,this.hidden=$n(e,a)}function Sn(e,a,P){for(var M=[],G,re=a;re<P;re=G){var se=new kr(e.doc,dt(e.doc,re),re);G=re+se.size,M.push(se)}return M}var Rn=null;function li(e){Rn?Rn.ops.push(e):e.ownsGroup=Rn={ops:[e],delayedCallbacks:[]}}function ua(e){var a=e.delayedCallbacks,P=0;do{for(;P<a.length;P++)a[P].call(null);for(var M=0;M<e.ops.length;M++){var G=e.ops[M];if(G.cursorActivityHandlers)for(;G.cursorActivityCalled<G.cursorActivityHandlers.length;)G.cursorActivityHandlers[G.cursorActivityCalled++].call(null,G.cm)}}while(P<a.length)}function Mr(e,a){var P=e.ownsGroup;if(!P)return;try{ua(P)}finally{Rn=null,a(P)}}var wr=null;function gr(e,a){var P=Ze(e,a);if(!P.length)return;var M=Array.prototype.slice.call(arguments,2),G;Rn?G=Rn.delayedCallbacks:wr?G=wr:(G=wr=[],setTimeout(ai,0));for(var re=function(de){G.push(function(){return P[de].apply(null,M)})},se=0;se<P.length;++se)re(se)}function ai(){var e=wr;wr=null;for(var a=0;a<e.length;++a)e[a]()}function zi(e,a,P,M){for(var G=0;G<a.changes.length;G++){var re=a.changes[G];re=="text"?ir(e,a):re=="gutter"?Wr(e,a,P,M):re=="class"?or(e,a):re=="widget"&&vr(e,a,M)}a.changes=null}function Vi(e){return e.node==e.text&&(e.node=S("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),T&&_<8&&(e.node.style.zIndex=2)),e.node}function tr(e,a){var P=a.bgClass?a.bgClass+" "+(a.line.bgClass||""):a.line.bgClass;if(P&&(P+=" CodeMirror-linebackground"),a.background)P?a.background.className=P:(a.background.parentNode.removeChild(a.background),a.background=null);else if(P){var M=Vi(a);a.background=M.insertBefore(S("div",null,P),M.firstChild),e.display.input.setUneditable(a.background)}}function It(e,a){var P=e.display.externalMeasured;return P&&P.line==a.line?(e.display.externalMeasured=null,a.measure=P.measure,P.built):_r(e,a)}function ir(e,a){var P=a.text.className,M=It(e,a);a.text==a.node&&(a.node=M.pre),a.text.parentNode.replaceChild(M.pre,a.text),a.text=M.pre,M.bgClass!=a.bgClass||M.textClass!=a.textClass?(a.bgClass=M.bgClass,a.textClass=M.textClass,or(e,a)):P&&(a.text.className=P)}function or(e,a){tr(e,a),a.line.wrapClass?Vi(a).className=a.line.wrapClass:a.node!=a.text&&(a.node.className="");var P=a.textClass?a.textClass+" "+(a.line.textClass||""):a.line.textClass;a.text.className=P||""}function Wr(e,a,P,M){if(a.gutter&&(a.node.removeChild(a.gutter),a.gutter=null),a.gutterBackground&&(a.node.removeChild(a.gutterBackground),a.gutterBackground=null),a.line.gutterClass){var G=Vi(a);a.gutterBackground=S("div",null,"CodeMirror-gutter-background "+a.line.gutterClass,"left: "+(e.options.fixedGutter?M.fixedPos:-M.gutterTotalWidth)+"px; width: "+M.gutterTotalWidth+"px"),e.display.input.setUneditable(a.gutterBackground),G.insertBefore(a.gutterBackground,a.text)}var re=a.line.gutterMarkers;if(e.options.lineNumbers||re){var se=Vi(a),de=a.gutter=S("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?M.fixedPos:-M.gutterTotalWidth)+"px");if(e.display.input.setUneditable(de),se.insertBefore(de,a.text),a.line.gutterClass&&(de.className+=" "+a.line.gutterClass),e.options.lineNumbers&&(!re||!re["CodeMirror-linenumbers"])&&(a.lineNumber=de.appendChild(S("div",qt(e.options,P),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+M.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),re)for(var ge=0;ge<e.display.gutterSpecs.length;++ge){var we=e.display.gutterSpecs[ge].className,Fe=re.hasOwnProperty(we)&&re[we];Fe&&de.appendChild(S("div",[Fe],"CodeMirror-gutter-elt","left: "+M.gutterLeft[we]+"px; width: "+M.gutterWidth[we]+"px"))}}}function vr(e,a,P){a.alignable&&(a.alignable=null);for(var M=R("CodeMirror-linewidget"),G=a.node.firstChild,re=void 0;G;G=re)re=G.nextSibling,M.test(G.className)&&a.node.removeChild(G);an(e,a,P)}function mn(e,a,P,M){var G=It(e,a);return a.text=a.node=G.pre,G.bgClass&&(a.bgClass=G.bgClass),G.textClass&&(a.textClass=G.textClass),or(e,a),Wr(e,a,P,M),an(e,a,M),a.node}function an(e,a,P){if(Ai(e,a.line,a,P,!0),a.rest)for(var M=0;M<a.rest.length;M++)Ai(e,a.rest[M],a,P,!1)}function Ai(e,a,P,M,G){if(!a.widgets)return;for(var re=Vi(P),se=0,de=a.widgets;se<de.length;++se){var ge=de[se],we=S("div",[ge.node],"CodeMirror-linewidget"+(ge.className?" "+ge.className:""));ge.handleMouseEvents||we.setAttribute("cm-ignore-events","true"),In(ge,we,P,M),e.display.input.setUneditable(we),G&&ge.above?re.insertBefore(we,P.gutter||P.text):re.appendChild(we),gr(ge,"redraw")}}function In(e,a,P,M){if(e.noHScroll){(P.alignable||(P.alignable=[])).push(a);var G=M.wrapperWidth;a.style.left=M.fixedPos+"px",e.coverGutter||(G-=M.gutterTotalWidth,a.style.paddingLeft=M.gutterTotalWidth+"px"),a.style.width=G+"px"}e.coverGutter&&(a.style.zIndex=5,a.style.position="relative",e.noHScroll||(a.style.marginLeft=-M.gutterTotalWidth+"px"))}function Mn(e){if(e.height!=null)return e.height;var a=e.doc.cm;if(!a)return 0;if(!A(document.body,e.node)){var P="position: relative;";e.coverGutter&&(P+="margin-left: -"+a.display.gutters.offsetWidth+"px;"),e.noHScroll&&(P+="width: "+a.display.wrapper.clientWidth+"px;"),C(a.display.measure,S("div",[e.node],null,P))}return e.height=e.node.parentNode.offsetHeight}function Bn(e,a){for(var P=Me(a);P!=e.wrapper;P=P.parentNode)if(!P||P.nodeType==1&&P.getAttribute("cm-ignore-events")=="true"||P.parentNode==e.sizer&&P!=e.mover)return!0}function Xi(e){return e.lineSpace.offsetTop}function ke(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ge(e){if(e.cachedPaddingH)return e.cachedPaddingH;var a=C(e.measure,S("pre","x","CodeMirror-line-like")),P=window.getComputedStyle?window.getComputedStyle(a):a.currentStyle,M={left:parseInt(P.paddingLeft),right:parseInt(P.paddingRight)};return!isNaN(M.left)&&!isNaN(M.right)&&(e.cachedPaddingH=M),M}function Ve(e){return ae-e.display.nativeBarWidth}function Ne(e){return e.display.scroller.clientWidth-Ve(e)-e.display.barWidth}function Ee(e){return e.display.scroller.clientHeight-Ve(e)-e.display.barHeight}function De(e,a,P){var M=e.options.lineWrapping,G=M&&Ne(e);if(!a.measure.heights||M&&a.measure.width!=G){var re=a.measure.heights=[];if(M){a.measure.width=G;for(var se=a.text.firstChild.getClientRects(),de=0;de<se.length-1;de++){var ge=se[de],we=se[de+1];Math.abs(ge.bottom-we.bottom)>2&&re.push((ge.bottom+we.top)/2-P.top)}}re.push(P.bottom-P.top)}}function Te(e,a,P){if(e.line==a)return{map:e.measure.map,cache:e.measure.cache};for(var M=0;M<e.rest.length;M++)if(e.rest[M]==a)return{map:e.measure.maps[M],cache:e.measure.caches[M]};for(var G=0;G<e.rest.length;G++)if(xt(e.rest[G])>P)return{map:e.measure.maps[G],cache:e.measure.caches[G],before:!0}}function je(e,a){a=Xn(a);var P=xt(a),M=e.display.externalMeasured=new kr(e.doc,a,P);M.lineN=P;var G=M.built=_r(e,M);return M.text=G.pre,C(e.display.lineMeasure,G.pre),M}function Be(e,a,P,M){return Je(e,Ke(e,a),P,M)}function ze(e,a){if(a>=e.display.viewFrom&&a<e.display.viewTo)return e.display.view[ln(e,a)];var P=e.display.externalMeasured;if(P&&a>=P.lineN&&a<P.lineN+P.size)return P}function Ke(e,a){var P=xt(a),M=ze(e,P);M&&!M.text?M=null:M&&M.changes&&(zi(e,M,P,En(e)),e.curOp.forceUpdate=!0),M||(M=je(e,a));var G=Te(M,a,P);return{line:a,view:M,rect:null,map:G.map,cache:G.cache,before:G.before,hasHeights:!1}}function Je(e,a,P,M,G){a.before&&(P=-1);var re=P+(M||""),se;return a.cache.hasOwnProperty(re)?se=a.cache[re]:(a.rect||(a.rect=a.view.text.getBoundingClientRect()),a.hasHeights||(De(e,a.view,a.rect),a.hasHeights=!0),se=Ot(e,a,P,M),se.bogus||(a.cache[re]=se)),{left:se.left,right:se.right,top:G?se.rtop:se.top,bottom:G?se.rbottom:se.bottom}}var ot={left:0,right:0,top:0,bottom:0};function gt(e,a,P){for(var M,G,re,se,de,ge,we=0;we<e.length;we+=3)if(de=e[we],ge=e[we+1],a<de?(G=0,re=1,se="left"):a<ge?(G=a-de,re=G+1):(we==e.length-3||a==ge&&e[we+3]>a)&&(re=ge-de,G=re-1,a>=ge&&(se="right")),G!=null){if(M=e[we+2],de==ge&&P==(M.insertLeft?"left":"right")&&(se=P),P=="left"&&G==0)for(;we&&e[we-2]==e[we-3]&&e[we-1].insertLeft;)M=e[(we-=3)+2],se="left";if(P=="right"&&G==ge-de)for(;we<e.length-3&&e[we+3]==e[we+4]&&!e[we+5].insertLeft;)M=e[(we+=3)+2],se="right";break}return{node:M,start:G,end:re,collapse:se,coverStart:de,coverEnd:ge}}function mt(e,a){var P=ot;if(a=="left")for(var M=0;M<e.length&&!((P=e[M]).left!=P.right);M++);else for(var G=e.length-1;G>=0&&!((P=e[G]).left!=P.right);G--);return P}function Ot(e,a,P,M){var G=gt(a.map,P,M),re=G.node,se=G.start,de=G.end,ge=G.collapse,we;if(re.nodeType==3){for(var Fe=0;Fe<4;Fe++){for(;se&&he(a.line.text.charAt(G.coverStart+se));)--se;for(;G.coverStart+de<G.coverEnd&&he(a.line.text.charAt(G.coverStart+de));)++de;if(T&&_<9&&se==0&&de==G.coverEnd-G.coverStart?we=re.parentNode.getBoundingClientRect():we=mt(j(re,se,de).getClientRects(),M),we.left||we.right||se==0)break;de=se,se=se-1,ge="right"}T&&_<11&&(we=Xt(e.display.measure,we))}else{se>0&&(ge=M="right");var He;e.options.lineWrapping&&(He=re.getClientRects()).length>1?we=He[M=="right"?He.length-1:0]:we=re.getBoundingClientRect()}if(T&&_<9&&!se&&(!we||!we.left&&!we.right)){var tt=re.parentNode.getClientRects()[0];tt?we={left:tt.left,right:tt.left+Jn(e.display),top:tt.top,bottom:tt.bottom}:we=ot}for(var Qe=we.top-a.rect.top,lt=we.bottom-a.rect.top,ft=(Qe+lt)/2,bt=a.view.measure.heights,At=0;At<bt.length-1&&!(ft<bt[At]);At++);var Nt=At?bt[At-1]:0,Rt=bt[At],Wt={left:(ge=="right"?we.right:we.left)-a.rect.left,right:(ge=="left"?we.left:we.right)-a.rect.left,top:Nt,bottom:Rt};return!we.left&&!we.right&&(Wt.bogus=!0),e.options.singleCursorHeightPerLine||(Wt.rtop=Qe,Wt.rbottom=lt),Wt}function Xt(e,a){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Yt(e))return a;var P=screen.logicalXDPI/screen.deviceXDPI,M=screen.logicalYDPI/screen.deviceYDPI;return{left:a.left*P,right:a.right*P,top:a.top*M,bottom:a.bottom*M}}function sr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var a=0;a<e.rest.length;a++)e.measure.caches[a]={}}function cr(e){e.display.externalMeasure=null,x(e.display.lineMeasure);for(var a=0;a<e.display.view.length;a++)sr(e.display.view[a])}function fr(e){cr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Er(){return r&&d?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function yr(){return r&&d?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function pr(e){var a=0;if(e.widgets)for(var P=0;P<e.widgets.length;++P)e.widgets[P].above&&(a+=Mn(e.widgets[P]));return a}function Pr(e,a,P,M,G){if(!G){var re=pr(a);P.top+=re,P.bottom+=re}if(M=="line")return P;M||(M="local");var se=ni(a);if(M=="local"?se+=Xi(e.display):se-=e.display.viewOffset,M=="page"||M=="window"){var de=e.display.lineSpace.getBoundingClientRect();se+=de.top+(M=="window"?0:yr());var ge=de.left+(M=="window"?0:Er());P.left+=ge,P.right+=ge}return P.top+=se,P.bottom+=se,P}function Sr(e,a,P){if(P=="div")return a;var M=a.left,G=a.top;if(P=="page")M-=Er(),G-=yr();else if(P=="local"||!P){var re=e.display.sizer.getBoundingClientRect();M+=re.left,G+=re.top}var se=e.display.lineSpace.getBoundingClientRect();return{left:M-se.left,top:G-se.top}}function gn(e,a,P,M,G){return M||(M=dt(e.doc,a.line)),Pr(e,M,Be(e,M,a.ch,G),P)}function Cr(e,a,P,M,G,re){M=M||dt(e.doc,a.line),G||(G=Ke(e,M));function se(lt,ft){var bt=Je(e,G,lt,ft?"right":"left",re);return ft?bt.left=bt.right:bt.right=bt.left,Pr(e,M,bt,P)}var de=qe(M,e.doc.direction),ge=a.ch,we=a.sticky;if(ge>=M.text.length?(ge=M.text.length,we="before"):ge<=0&&(ge=0,we="after"),!de)return se(we=="before"?ge-1:ge,we=="before");function Fe(lt,ft,bt){var At=de[ft],Nt=At.level==1;return se(bt?lt-1:lt,Nt!=bt)}var He=Ye(de,ge,we),tt=$e,Qe=Fe(ge,He,we=="before");return tt!=null&&(Qe.other=Fe(ge,tt,we!="before")),Qe}function rr(e,a){var P=0;a=Pt(e.doc,a),e.options.lineWrapping||(P=Jn(e.display)*a.ch);var M=dt(e.doc,a.line),G=ni(M)+Xi(e.display);return{left:P,right:P,top:G,bottom:G+M.height}}function Jt(e,a,P,M,G){var re=ut(e,a,P);return re.xRel=G,M&&(re.outside=M),re}function Or(e,a,P){var M=e.doc;if(P+=e.display.viewOffset,P<0)return Jt(M.first,0,null,-1,-1);var G=Kt(M,P),re=M.first+M.size-1;if(G>re)return Jt(M.first+M.size-1,dt(M,re).text.length,null,1,1);a<0&&(a=0);for(var se=dt(M,G);;){var de=vn(e,se,G,a,P),ge=ki(se,de.ch+(de.xRel>0||de.outside>0?1:0));if(!ge)return de;var we=ge.find(1);if(we.line==G)return we;se=dt(M,G=we.line)}}function Nr(e,a,P,M){M-=pr(a);var G=a.text.length,re=Ue(function(se){return Je(e,P,se-1).bottom<=M},G,0);return G=Ue(function(se){return Je(e,P,se).top>M},re,G),{begin:re,end:G}}function Vt(e,a,P,M){P||(P=Ke(e,a));var G=Pr(e,a,Je(e,P,M),"line").top;return Nr(e,a,P,G)}function Br(e,a,P,M){return e.bottom<=P?!1:e.top>P?!0:(M?e.left:e.right)>a}function vn(e,a,P,M,G){G-=ni(a);var re=Ke(e,a),se=pr(a),de=0,ge=a.text.length,we=!0,Fe=qe(a,e.doc.direction);if(Fe){var He=(e.options.lineWrapping?en:Gr)(e,a,P,re,Fe,M,G);we=He.level!=1,de=we?He.from:He.to-1,ge=we?He.to:He.from-1}var tt=null,Qe=null,lt=Ue(function(nr){var Qt=Je(e,re,nr);return Qt.top+=se,Qt.bottom+=se,Br(Qt,M,G,!1)?(Qt.top<=G&&Qt.left<=M&&(tt=nr,Qe=Qt),!0):!1},de,ge),ft,bt,At=!1;if(Qe){var Nt=M-Qe.left<Qe.right-M,Rt=Nt==we;lt=tt+(Rt?0:1),bt=Rt?"after":"before",ft=Nt?Qe.left:Qe.right}else{!we&&(lt==ge||lt==de)&<++,bt=lt==0?"after":lt==a.text.length?"before":Je(e,re,lt-(we?1:0)).bottom+se<=G==we?"after":"before";var Wt=Cr(e,ut(P,lt,bt),"line",a,re);ft=Wt.left,At=G<Wt.top?-1:G>=Wt.bottom?1:0}return lt=Se(a.text,lt,1),Jt(P,lt,bt,At,M-ft)}function Gr(e,a,P,M,G,re,se){var de=Ue(function(He){var tt=G[He],Qe=tt.level!=1;return Br(Cr(e,ut(P,Qe?tt.to:tt.from,Qe?"before":"after"),"line",a,M),re,se,!0)},0,G.length-1),ge=G[de];if(de>0){var we=ge.level!=1,Fe=Cr(e,ut(P,we?ge.from:ge.to,we?"after":"before"),"line",a,M);Br(Fe,re,se,!0)&&Fe.top>se&&(ge=G[de-1])}return ge}function en(e,a,P,M,G,re,se){var de=Nr(e,a,M,se),ge=de.begin,we=de.end;/\s/.test(a.text.charAt(we-1))&&we--;for(var Fe=null,He=null,tt=0;tt<G.length;tt++){var Qe=G[tt];if(Qe.from>=we||Qe.to<=ge)continue;var lt=Qe.level!=1,ft=Je(e,M,lt?Math.min(we,Qe.to)-1:Math.max(ge,Qe.from)).right,bt=ft<re?re-ft+1e9:ft-re;(!Fe||He>bt)&&(Fe=Qe,He=bt)}return Fe||(Fe=G[G.length-1]),Fe.from<ge&&(Fe={from:ge,to:Fe.to,level:Fe.level}),Fe.to>we&&(Fe={from:Fe.from,to:we,level:Fe.level}),Fe}var Jr;function Dn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Jr==null){Jr=S("pre",null,"CodeMirror-line-like");for(var a=0;a<49;++a)Jr.appendChild(document.createTextNode("x")),Jr.appendChild(S("br"));Jr.appendChild(document.createTextNode("x"))}C(e.measure,Jr);var P=Jr.offsetHeight/50;return P>3&&(e.cachedTextHeight=P),x(e.measure),P||1}function Jn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var a=S("span","xxxxxxxxxx"),P=S("pre",[a],"CodeMirror-line-like");C(e.measure,P);var M=a.getBoundingClientRect(),G=(M.right-M.left)/10;return G>2&&(e.cachedCharWidth=G),G||10}function En(e){for(var a=e.display,P={},M={},G=a.gutters.clientLeft,re=a.gutters.firstChild,se=0;re;re=re.nextSibling,++se){var de=e.display.gutterSpecs[se].className;P[de]=re.offsetLeft+re.clientLeft+G,M[de]=re.clientWidth}return{fixedPos:yi(a),gutterTotalWidth:a.gutters.offsetWidth,gutterLeft:P,gutterWidth:M,wrapperWidth:a.wrapper.clientWidth}}function yi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ui(e){var a=Dn(e.display),P=e.options.lineWrapping,M=P&&Math.max(5,e.display.scroller.clientWidth/Jn(e.display)-3);return function(G){if($n(e.doc,G))return 0;var re=0;if(G.widgets)for(var se=0;se<G.widgets.length;se++)G.widgets[se].height&&(re+=G.widgets[se].height);return P?re+(Math.ceil(G.text.length/M)||1)*a:re+a}}function xi(e){var a=e.doc,P=Ui(e);a.iter(function(M){var G=P(M);G!=M.height&&vt(M,G)})}function Qn(e,a,P,M){var G=e.display;if(!P&&Me(a).getAttribute("cm-not-content")=="true")return null;var re,se,de=G.lineSpace.getBoundingClientRect();try{re=a.clientX-de.left,se=a.clientY-de.top}catch(He){return null}var ge=Or(e,re,se),we;if(M&&ge.xRel>0&&(we=dt(e.doc,ge.line).text).length==ge.ch){var Fe=K(we,we.length,e.options.tabSize)-we.length;ge=ut(ge.line,Math.max(0,Math.round((re-Ge(e.display).left)/Jn(e.display))-Fe))}return ge}function ln(e,a){if(a>=e.display.viewTo)return null;if(a-=e.display.viewFrom,a<0)return null;for(var P=e.display.view,M=0;M<P.length;M++)if(a-=P[M].size,a<0)return M}function tn(e,a,P,M){a==null&&(a=e.doc.first),P==null&&(P=e.doc.first+e.doc.size),M||(M=0);var G=e.display;if(M&&P<G.viewTo&&(G.updateLineNumbers==null||G.updateLineNumbers>a)&&(G.updateLineNumbers=a),e.curOp.viewChanged=!0,a>=G.viewTo)jt&&mi(e.doc,a)<G.viewTo&&yn(e);else if(P<=G.viewFrom)jt&&Yn(e.doc,P+M)>G.viewFrom?yn(e):(G.viewFrom+=M,G.viewTo+=M);else if(a<=G.viewFrom&&P>=G.viewTo)yn(e);else if(a<=G.viewFrom){var re=Bi(e,P,P+M,1);re?(G.view=G.view.slice(re.index),G.viewFrom=re.lineN,G.viewTo+=M):yn(e)}else if(P>=G.viewTo){var se=Bi(e,a,a,-1);se?(G.view=G.view.slice(0,se.index),G.viewTo=se.lineN):yn(e)}else{var de=Bi(e,a,a,-1),ge=Bi(e,P,P+M,1);de&&ge?(G.view=G.view.slice(0,de.index).concat(Sn(e,de.lineN,ge.lineN)).concat(G.view.slice(ge.index)),G.viewTo+=M):yn(e)}var we=G.externalMeasured;we&&(P<we.lineN?we.lineN+=M:a<we.lineN+we.size&&(G.externalMeasured=null))}function xn(e,a,P){e.curOp.viewChanged=!0;var M=e.display,G=e.display.externalMeasured;if(G&&a>=G.lineN&&a<G.lineN+G.size&&(M.externalMeasured=null),a<M.viewFrom||a>=M.viewTo)return;var re=M.view[ln(e,a)];if(re.node==null)return;var se=re.changes||(re.changes=[]);oe(se,P)==-1&&se.push(P)}function yn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Bi(e,a,P,M){var G=ln(e,a),re,se=e.display.view;if(!jt||P==e.doc.first+e.doc.size)return{index:G,lineN:P};for(var de=e.display.viewFrom,ge=0;ge<G;ge++)de+=se[ge].size;if(de!=a){if(M>0){if(G==se.length-1)return null;re=de+se[G].size-a,G++}else re=de-a;a+=re,P+=re}for(;mi(e.doc,P)!=P;){if(G==(M<0?0:se.length-1))return null;P+=M*se[G-(M<0?1:0)].size,G+=M}return{index:G,lineN:P}}function ta(e,a,P){var M=e.display,G=M.view;G.length==0||a>=M.viewTo||P<=M.viewFrom?(M.view=Sn(e,a,P),M.viewFrom=a):(M.viewFrom>a?M.view=Sn(e,a,M.viewFrom).concat(M.view):M.viewFrom<a&&(M.view=M.view.slice(ln(e,a))),M.viewFrom=a,M.viewTo<P?M.view=M.view.concat(Sn(e,M.viewTo,P)):M.viewTo>P&&(M.view=M.view.slice(0,ln(e,P)))),M.viewTo=P}function ra(e){for(var a=e.display.view,P=0,M=0;M<a.length;M++){var G=a[M];!G.hidden&&(!G.node||G.changes)&&++P}return P}function Qr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Yi(e,a){a===void 0&&(a=!0);for(var P=e.doc,M={},G=M.cursors=document.createDocumentFragment(),re=M.selection=document.createDocumentFragment(),se=0;se<P.sel.ranges.length;se++){if(!a&&se==P.sel.primIndex)continue;var de=P.sel.ranges[se];if(de.from().line>=e.display.viewTo||de.to().line<e.display.viewFrom)continue;var ge=de.empty();(ge||e.options.showCursorWhenSelecting)&&na(e,de.head,G),ge||$r(e,de,re)}return M}function na(e,a,P){var M=Cr(e,a,"div",null,null,!e.options.singleCursorHeightPerLine),G=P.appendChild(S("div","\xA0","CodeMirror-cursor"));if(G.style.left=M.left+"px",G.style.top=M.top+"px",G.style.height=Math.max(0,M.bottom-M.top)*e.options.cursorHeight+"px",M.other){var re=P.appendChild(S("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));re.style.display="",re.style.left=M.other.left+"px",re.style.top=M.other.top+"px",re.style.height=(M.other.bottom-M.other.top)*.85+"px"}}function on(e,a){return e.top-a.top||e.left-a.left}function $r(e,a,P){var M=e.display,G=e.doc,re=document.createDocumentFragment(),se=Ge(e.display),de=se.left,ge=Math.max(M.sizerWidth,Ne(e)-M.sizer.offsetLeft)-se.right,we=G.direction=="ltr";function Fe(Rt,Wt,nr,Qt){Wt<0&&(Wt=0),Wt=Math.round(Wt),Qt=Math.round(Qt),re.appendChild(S("div",null,"CodeMirror-selected","position: absolute; left: "+Rt+`px;
|
|
|
top: `+Wt+"px; width: "+(nr==null?ge-Rt:nr)+`px;
|
|
|
height: `+(Qt-Wt)+"px"))}function He(Rt,Wt,nr){var Qt=dt(G,Rt),Tr=Qt.text.length,un,oi;function Cn(Hn,Di){return gn(e,ut(Rt,Hn),"div",Qt,Di)}function Ni(Hn,Di,ci){var ti=Vt(e,Qt,null,Hn),Wn=Di=="ltr"==(ci=="after")?"left":"right",Ln=ci=="after"?ti.begin:ti.end-(/\s/.test(Qt.text.charAt(ti.end-1))?2:1);return Cn(Ln,Wn)[Wn]}var Ii=qe(Qt,G.direction);return Xe(Ii,Wt||0,nr==null?Tr:nr,function(Hn,Di,ci,ti){var Wn=ci=="ltr",Ln=Cn(Hn,Wn?"left":"right"),Li=Cn(Di-1,Wn?"right":"left"),Za=Wt==null&&Hn==0,Ca=nr==null&&Di==Tr,_i=ti==0,la=!Ii||ti==Ii.length-1;if(Li.top-Ln.top<=3){var si=(we?Za:Ca)&&_i,ps=(we?Ca:Za)&&la,ga=si?de:(Wn?Ln:Li).left,La=ps?ge:(Wn?Li:Ln).right;Fe(ga,Ln.top,La-ga,Ln.bottom)}else{var ka,Ci,qa,ms;Wn?(ka=we&&Za&&_i?de:Ln.left,Ci=we?ge:Ni(Hn,ci,"before"),qa=we?de:Ni(Di,ci,"after"),ms=we&&Ca&&la?ge:Li.right):(ka=we?Ni(Hn,ci,"before"):de,Ci=!we&&Za&&_i?ge:Ln.right,qa=!we&&Ca&&la?de:Li.left,ms=we?Ni(Di,ci,"after"):ge),Fe(ka,Ln.top,Ci-ka,Ln.bottom),Ln.bottom<Li.top&&Fe(de,Ln.bottom,null,Li.top),Fe(qa,Li.top,ms-qa,Li.bottom)}(!un||on(Ln,un)<0)&&(un=Ln),on(Li,un)<0&&(un=Li),(!oi||on(Ln,oi)<0)&&(oi=Ln),on(Li,oi)<0&&(oi=Li)}),{start:un,end:oi}}var tt=a.from(),Qe=a.to();if(tt.line==Qe.line)He(tt.line,tt.ch,Qe.ch);else{var lt=dt(G,tt.line),ft=dt(G,Qe.line),bt=Xn(lt)==Xn(ft),At=He(tt.line,tt.ch,bt?lt.text.length+1:null).end,Nt=He(Qe.line,bt?0:null,Qe.ch).start;bt&&(At.top<Nt.top-2?(Fe(At.right,At.top,null,At.bottom),Fe(de,Nt.top,Nt.left,Nt.bottom)):Fe(At.right,At.top,Nt.left-At.right,At.bottom)),At.bottom<Nt.top&&Fe(de,At.bottom,null,Nt.top)}P.appendChild(re)}function Zn(e){if(!e.state.focused)return;var a=e.display;clearInterval(a.blinker);var P=!0;a.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?a.blinker=setInterval(function(){e.hasFocus()||va(e),a.cursorDiv.style.visibility=(P=!P)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(a.cursorDiv.style.visibility="hidden")}function So(e){e.state.focused||(e.display.input.focus(),ia(e))}function eo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,va(e))},100)}function ia(e,a){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(ye(e,"focus",e,a),e.state.focused=!0,z(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()),Zn(e)}function va(e,a){if(e.state.delayingBlurEvent)return;e.state.focused&&(ye(e,"blur",e,a),e.state.focused=!1,y(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Ma(e){for(var a=e.display,P=a.lineDiv.offsetTop,M=0;M<a.view.length;M++){var G=a.view[M],re=e.options.lineWrapping,se=void 0,de=0;if(G.hidden)continue;if(T&&_<8){var ge=G.node.offsetTop+G.node.offsetHeight;se=ge-P,P=ge}else{var we=G.node.getBoundingClientRect();se=we.bottom-we.top,!re&&G.text.firstChild&&(de=G.text.firstChild.getBoundingClientRect().right-we.left-1)}var Fe=G.line.height-se;if((Fe>.005||Fe<-.005)&&(vt(G.line,se),to(G.line),G.rest))for(var He=0;He<G.rest.length;He++)to(G.rest[He]);if(de>e.display.sizerWidth){var tt=Math.ceil(de/Jn(e.display));tt>e.display.maxLineLength&&(e.display.maxLineLength=tt,e.display.maxLine=G.line,e.display.maxLineChanged=!0)}}}function to(e){if(e.widgets)for(var a=0;a<e.widgets.length;++a){var P=e.widgets[a],M=P.node.parentNode;M&&(P.height=M.offsetHeight)}}function Pa(e,a,P){var M=P&&P.top!=null?Math.max(0,P.top):e.scroller.scrollTop;M=Math.floor(M-Xi(e));var G=P&&P.bottom!=null?P.bottom:M+e.wrapper.clientHeight,re=Kt(a,M),se=Kt(a,G);if(P&&P.ensure){var de=P.ensure.from.line,ge=P.ensure.to.line;de<re?(re=de,se=Kt(a,ni(dt(a,de))+e.wrapper.clientHeight)):Math.min(ge,a.lastLine())>=se&&(re=Kt(a,ni(dt(a,ge))-e.wrapper.clientHeight),se=ge)}return{from:re,to:Math.max(se,re+1)}}function Xo(e,a){if(ue(e,"scrollCursorIntoView"))return;var P=e.display,M=P.sizer.getBoundingClientRect(),G=null;if(a.top+M.top<0?G=!0:a.bottom+M.top>(window.innerHeight||document.documentElement.clientHeight)&&(G=!1),G!=null&&!l){var re=S("div","\u200B",null,`position: absolute;
|
|
|
top: `+(a.top-P.viewOffset-Xi(e.display))+`px;
|
|
|
height: `+(a.bottom-a.top+Ve(e)+P.barHeight)+`px;
|
|
|
left: `+a.left+"px; width: "+Math.max(2,a.right-a.left)+"px;");e.display.lineSpace.appendChild(re),re.scrollIntoView(G),e.display.lineSpace.removeChild(re)}}function Yo(e,a,P,M){M==null&&(M=0);var G;!e.options.lineWrapping&&a==P&&(a=a.ch?ut(a.line,a.sticky=="before"?a.ch-1:a.ch,"after"):a,P=a.sticky=="before"?ut(a.line,a.ch+1,"before"):a);for(var re=0;re<5;re++){var se=!1,de=Cr(e,a),ge=!P||P==a?de:Cr(e,P);G={left:Math.min(de.left,ge.left),top:Math.min(de.top,ge.top)-M,right:Math.max(de.left,ge.left),bottom:Math.max(de.bottom,ge.bottom)+M};var we=ro(e,G),Fe=e.doc.scrollTop,He=e.doc.scrollLeft;if(we.scrollTop!=null&&(_a(e,we.scrollTop),Math.abs(e.doc.scrollTop-Fe)>1&&(se=!0)),we.scrollLeft!=null&&(Hi(e,we.scrollLeft),Math.abs(e.doc.scrollLeft-He)>1&&(se=!0)),!se)break}return G}function Co(e,a){var P=ro(e,a);P.scrollTop!=null&&_a(e,P.scrollTop),P.scrollLeft!=null&&Hi(e,P.scrollLeft)}function ro(e,a){var P=e.display,M=Dn(e.display);a.top<0&&(a.top=0);var G=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:P.scroller.scrollTop,re=Ee(e),se={};a.bottom-a.top>re&&(a.bottom=a.top+re);var de=e.doc.height+ke(P),ge=a.top<M,we=a.bottom>de-M;if(a.top<G)se.scrollTop=ge?0:a.top;else if(a.bottom>G+re){var Fe=Math.min(a.top,(we?de:a.bottom)-re);Fe!=G&&(se.scrollTop=Fe)}var He=e.options.fixedGutter?0:P.gutters.offsetWidth,tt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:P.scroller.scrollLeft-He,Qe=Ne(e)-P.gutters.offsetWidth,lt=a.right-a.left>Qe;return lt&&(a.right=a.left+Qe),a.left<10?se.scrollLeft=0:a.left<tt?se.scrollLeft=Math.max(0,a.left+He-(lt?0:10)):a.right>Qe+tt-3&&(se.scrollLeft=a.right+(lt?0:10)-Qe),se}function no(e,a){if(a==null)return;Na(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+a}function ya(e){Na(e);var a=e.getCursor();e.curOp.scrollToPos={from:a,to:a,margin:e.options.cursorScrollMargin}}function ba(e,a,P){(a!=null||P!=null)&&Na(e),a!=null&&(e.curOp.scrollLeft=a),P!=null&&(e.curOp.scrollTop=P)}function $o(e,a){Na(e),e.curOp.scrollToPos=a}function Na(e){var a=e.curOp.scrollToPos;if(a){e.curOp.scrollToPos=null;var P=rr(e,a.from),M=rr(e,a.to);Oa(e,P,M,a.margin)}}function Oa(e,a,P,M){var G=ro(e,{left:Math.min(a.left,P.left),top:Math.min(a.top,P.top)-M,right:Math.max(a.right,P.right),bottom:Math.max(a.bottom,P.bottom)+M});ba(e,G.scrollLeft,G.scrollTop)}function _a(e,a){if(Math.abs(e.doc.scrollTop-a)<2)return;w||Ia(e,{top:a}),Ea(e,a,!0),w&&Ia(e),Ra(e,100)}function Ea(e,a,P){if(a=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,a)),e.display.scroller.scrollTop==a&&!P)return;e.doc.scrollTop=a,e.display.scrollbars.setScrollTop(a),e.display.scroller.scrollTop!=a&&(e.display.scroller.scrollTop=a)}function Hi(e,a,P,M){if(a=Math.max(0,Math.min(a,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(P?a==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-a)<2)&&!M)return;e.doc.scrollLeft=a,Ir(e),e.display.scroller.scrollLeft!=a&&(e.display.scroller.scrollLeft=a),e.display.scrollbars.setScrollLeft(a)}function ca(e){var a=e.display,P=a.gutters.offsetWidth,M=Math.round(e.doc.height+ke(e.display));return{clientHeight:a.scroller.clientHeight,viewHeight:a.wrapper.clientHeight,scrollWidth:a.scroller.scrollWidth,clientWidth:a.scroller.clientWidth,viewWidth:a.wrapper.clientWidth,barLeft:e.options.fixedGutter?P:0,docHeight:M,scrollHeight:M+Ve(e)+a.barHeight,nativeBarWidth:a.nativeBarWidth,gutterWidth:P}}var aa=function(e,a,P){this.cm=P;var M=this.vert=S("div",[S("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),G=this.horiz=S("div",[S("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");M.tabIndex=G.tabIndex=-1,e(M),e(G),Ie(M,"scroll",function(){M.clientHeight&&a(M.scrollTop,"vertical")}),Ie(G,"scroll",function(){G.clientWidth&&a(G.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,T&&_<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};aa.prototype.update=function(e){var a=e.scrollWidth>e.clientWidth+1,P=e.scrollHeight>e.clientHeight+1,M=e.nativeBarWidth;if(P){this.vert.style.display="block",this.vert.style.bottom=a?M+"px":"0";var G=e.viewHeight-(a?M:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+G)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(a){this.horiz.style.display="block",this.horiz.style.right=P?M+"px":"0",this.horiz.style.left=e.barLeft+"px";var re=e.viewWidth-e.barLeft-(P?M:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+re)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(M==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:P?M:0,bottom:a?M:0}},aa.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},aa.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},aa.prototype.zeroWidthHack=function(){var e=o&&!n?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ee,this.disableVert=new ee},aa.prototype.enableZeroWidthBar=function(e,a,P){e.style.pointerEvents="auto";function M(){var G=e.getBoundingClientRect(),re=P=="vert"?document.elementFromPoint(G.right-1,(G.top+G.bottom)/2):document.elementFromPoint((G.right+G.left)/2,G.bottom-1);re!=e?e.style.pointerEvents="none":a.set(1e3,M)}a.set(1e3,M)},aa.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Aa=function(){};Aa.prototype.update=function(){return{bottom:0,right:0}},Aa.prototype.setScrollLeft=function(){},Aa.prototype.setScrollTop=function(){},Aa.prototype.clear=function(){};function da(e,a){a||(a=ca(e));var P=e.display.barWidth,M=e.display.barHeight;ja(e,a);for(var G=0;G<4&&P!=e.display.barWidth||M!=e.display.barHeight;G++)P!=e.display.barWidth&&e.options.lineWrapping&&Ma(e),ja(e,ca(e)),P=e.display.barWidth,M=e.display.barHeight}function ja(e,a){var P=e.display,M=P.scrollbars.update(a);P.sizer.style.paddingRight=(P.barWidth=M.right)+"px",P.sizer.style.paddingBottom=(P.barHeight=M.bottom)+"px",P.heightForcer.style.borderBottom=M.bottom+"px solid transparent",M.right&&M.bottom?(P.scrollbarFiller.style.display="block",P.scrollbarFiller.style.height=M.bottom+"px",P.scrollbarFiller.style.width=M.right+"px"):P.scrollbarFiller.style.display="",M.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(P.gutterFiller.style.display="block",P.gutterFiller.style.height=M.bottom+"px",P.gutterFiller.style.width=a.gutterWidth+"px"):P.gutterFiller.style.display=""}var io={native:aa,null:Aa};function Fa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&y(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new io[e.options.scrollbarStyle](function(a){e.display.wrapper.insertBefore(a,e.display.scrollbarFiller),Ie(a,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),a.setAttribute("cm-not-content","true")},function(a,P){P=="horizontal"?Hi(e,a):_a(e,a)},e),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)}var ao=0;function oa(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ao},li(e.curOp)}function ha(e){var a=e.curOp;a&&Mr(a,function(P){for(var M=0;M<P.ops.length;M++)P.ops[M].cm.curOp=null;Oo(P)})}function Oo(e){for(var a=e.ops,P=0;P<a.length;P++)Jo(a[P]);for(var M=0;M<a.length;M++)Qo(a[M]);for(var G=0;G<a.length;G++)Zo(a[G]);for(var re=0;re<a.length;re++)oo(a[re]);for(var se=0;se<a.length;se++)qo(a[se])}function Jo(e){var a=e.cm,P=a.display;Ao(a),e.updateMaxLine&&Fi(a),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<P.viewFrom||e.scrollToPos.to.line>=P.viewTo)||P.maxLineChanged&&a.options.lineWrapping,e.update=e.mustUpdate&&new Wi(a,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&fa(e.cm,e.update)}function Zo(e){var a=e.cm,P=a.display;e.updatedDisplay&&Ma(a),e.barMeasure=ca(a),P.maxLineChanged&&!a.options.lineWrapping&&(e.adjustWidthTo=Be(a,P.maxLine,P.maxLine.text.length).left+3,a.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(P.scroller.clientWidth,P.sizer.offsetLeft+e.adjustWidthTo+Ve(a)+a.display.barWidth),e.maxScrollLeft=Math.max(0,P.sizer.offsetLeft+e.adjustWidthTo-Ne(a))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=P.input.prepareSelection())}function oo(e){var a=e.cm;e.adjustWidthTo!=null&&(a.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<a.doc.scrollLeft&&Hi(a,Math.min(a.display.scroller.scrollLeft,e.maxScrollLeft),!0),a.display.maxLineChanged=!1);var P=e.focus&&e.focus==Y();e.preparedSelection&&a.display.input.showSelection(e.preparedSelection,P),(e.updatedDisplay||e.startHeight!=a.doc.height)&&da(a,e.barMeasure),e.updatedDisplay&&Xr(a,e.barMeasure),e.selectionChanged&&Zn(a),a.state.focused&&e.updateInput&&a.display.input.reset(e.typing),P&&So(e.cm)}function qo(e){var a=e.cm,P=a.display,M=a.doc;if(e.updatedDisplay&&Ua(a,e.update),P.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(P.wheelStartX=P.wheelStartY=null),e.scrollTop!=null&&Ea(a,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Hi(a,e.scrollLeft,!0,!0),e.scrollToPos){var G=Yo(a,Pt(M,e.scrollToPos.from),Pt(M,e.scrollToPos.to),e.scrollToPos.margin);Xo(a,G)}var re=e.maybeHiddenMarkers,se=e.maybeUnhiddenMarkers;if(re)for(var de=0;de<re.length;++de)re[de].lines.length||ye(re[de],"hide");if(se)for(var ge=0;ge<se.length;++ge)se[ge].lines.length&&ye(se[ge],"unhide");P.wrapper.offsetHeight&&(M.scrollTop=a.display.scroller.scrollTop),e.changeObjs&&ye(a,"changes",a,e.changeObjs),e.update&&e.update.finish()}function wi(e,a){if(e.curOp)return a();oa(e);try{return a()}finally{ha(e)}}function Pn(e,a){return function(){if(e.curOp)return a.apply(e,arguments);oa(e);try{return a.apply(e,arguments)}finally{ha(e)}}}function ui(e){return function(){if(this.curOp)return e.apply(this,arguments);oa(this);try{return e.apply(this,arguments)}finally{ha(this)}}}function Nn(e){return function(){var a=this.cm;if(!a||a.curOp)return e.apply(this,arguments);oa(a);try{return e.apply(this,arguments)}finally{ha(a)}}}function Ra(e,a){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(a,U(es,e))}function es(e){var a=e.doc;if(a.highlightFrontier>=e.display.viewTo)return;var P=+new Date+e.options.workTime,M=hn(e,a.highlightFrontier),G=[];a.iter(M.line,Math.min(a.first+a.size,e.display.viewTo+500),function(re){if(M.line>=e.display.viewFrom){var se=re.styles,de=re.text.length>e.options.maxHighlightLength?Bt(a.mode,M.state):null,ge=Gn(e,re,M,!0);de&&(M.state=de),re.styles=ge.styles;var we=re.styleClasses,Fe=ge.classes;Fe?re.styleClasses=Fe:we&&(re.styleClasses=null);for(var He=!se||se.length!=re.styles.length||we!=Fe&&(!we||!Fe||we.bgClass!=Fe.bgClass||we.textClass!=Fe.textClass),tt=0;!He&&tt<se.length;++tt)He=se[tt]!=re.styles[tt];He&&G.push(M.line),re.stateAfter=M.save(),M.nextLine()}else re.text.length<=e.options.maxHighlightLength&&Ei(e,re.text,M),re.stateAfter=M.line%5==0?M.save():null,M.nextLine();if(+new Date>P)return Ra(e,e.options.workDelay),!0}),a.highlightFrontier=M.line,a.modeFrontier=Math.max(a.modeFrontier,M.line),G.length&&wi(e,function(){for(var re=0;re<G.length;re++)xn(e,G[re],"text")})}var Wi=function(e,a,P){var M=e.display;this.viewport=a,this.visible=Pa(M,e.doc,a),this.editorIsHidden=!M.wrapper.offsetWidth,this.wrapperHeight=M.wrapper.clientHeight,this.wrapperWidth=M.wrapper.clientWidth,this.oldDisplayWidth=Ne(e),this.force=P,this.dims=En(e),this.events=[]};Wi.prototype.signal=function(e,a){me(e,a)&&this.events.push(arguments)},Wi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ye.apply(null,this.events[e])};function Ao(e){var a=e.display;!a.scrollbarsClipped&&a.scroller.offsetWidth&&(a.nativeBarWidth=a.scroller.offsetWidth-a.scroller.clientWidth,a.heightForcer.style.height=Ve(e)+"px",a.sizer.style.marginBottom=-a.nativeBarWidth+"px",a.sizer.style.borderRightWidth=Ve(e)+"px",a.scrollbarsClipped=!0)}function Ro(e){if(e.hasFocus())return null;var a=Y();if(!a||!A(e.display.lineDiv,a))return null;var P={activeElt:a};if(window.getSelection){var M=window.getSelection();M.anchorNode&&M.extend&&A(e.display.lineDiv,M.anchorNode)&&(P.anchorNode=M.anchorNode,P.anchorOffset=M.anchorOffset,P.focusNode=M.focusNode,P.focusOffset=M.focusOffset)}return P}function Io(e){if(!e||!e.activeElt||e.activeElt==Y())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&A(document.body,e.anchorNode)&&A(document.body,e.focusNode)){var a=window.getSelection(),P=document.createRange();P.setEnd(e.anchorNode,e.anchorOffset),P.collapse(!1),a.removeAllRanges(),a.addRange(P),a.extend(e.focusNode,e.focusOffset)}}function fa(e,a){var P=e.display,M=e.doc;if(a.editorIsHidden)return yn(e),!1;if(!a.force&&a.visible.from>=P.viewFrom&&a.visible.to<=P.viewTo&&(P.updateLineNumbers==null||P.updateLineNumbers>=P.viewTo)&&P.renderedView==P.view&&ra(e)==0)return!1;qn(e)&&(yn(e),a.dims=En(e));var G=M.first+M.size,re=Math.max(a.visible.from-e.options.viewportMargin,M.first),se=Math.min(G,a.visible.to+e.options.viewportMargin);P.viewFrom<re&&re-P.viewFrom<20&&(re=Math.max(M.first,P.viewFrom)),P.viewTo>se&&P.viewTo-se<20&&(se=Math.min(G,P.viewTo)),jt&&(re=mi(e.doc,re),se=Yn(e.doc,se));var de=re!=P.viewFrom||se!=P.viewTo||P.lastWrapHeight!=a.wrapperHeight||P.lastWrapWidth!=a.wrapperWidth;ta(e,re,se),P.viewOffset=ni(dt(e.doc,P.viewFrom)),e.display.mover.style.top=P.viewOffset+"px";var ge=ra(e);if(!de&&ge==0&&!a.force&&P.renderedView==P.view&&(P.updateLineNumbers==null||P.updateLineNumbers>=P.viewTo))return!1;var we=Ro(e);return ge>4&&(P.lineDiv.style.display="none"),Do(e,P.updateLineNumbers,a.dims),ge>4&&(P.lineDiv.style.display=""),P.renderedView=P.view,Io(we),x(P.cursorDiv),x(P.selectionDiv),P.gutters.style.height=P.sizer.style.minHeight=0,de&&(P.lastWrapHeight=a.wrapperHeight,P.lastWrapWidth=a.wrapperWidth,Ra(e,400)),P.updateLineNumbers=null,!0}function Ua(e,a){for(var P=a.viewport,M=!0;;M=!1){if(!M||!e.options.lineWrapping||a.oldDisplayWidth==Ne(e)){if(P&&P.top!=null&&(P={top:Math.min(e.doc.height+ke(e.display)-Ee(e),P.top)}),a.visible=Pa(e.display,e.doc,P),a.visible.from>=e.display.viewFrom&&a.visible.to<=e.display.viewTo)break}else M&&(a.visible=Pa(e.display,e.doc,P));if(!fa(e,a))break;Ma(e);var G=ca(e);Qr(e),da(e,G),Xr(e,G),a.force=!1}a.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(a.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ia(e,a){var P=new Wi(e,a);if(fa(e,P)){Ma(e),Ua(e,P);var M=ca(e);Qr(e),da(e,M),Xr(e,M),P.finish()}}function Do(e,a,P){var M=e.display,G=e.options.lineNumbers,re=M.lineDiv,se=re.firstChild;function de(lt){var ft=lt.nextSibling;return t&&o&&e.display.currentWheelTarget==lt?lt.style.display="none":lt.parentNode.removeChild(lt),ft}for(var ge=M.view,we=M.viewFrom,Fe=0;Fe<ge.length;Fe++){var He=ge[Fe];if(!He.hidden)if(!He.node||He.node.parentNode!=re){var tt=mn(e,He,we,P);re.insertBefore(tt,se)}else{for(;se!=He.node;)se=de(se);var Qe=G&&a!=null&&a<=we&&He.lineNumber;He.changes&&(oe(He.changes,"gutter")>-1&&(Qe=!1),zi(e,He,we,P)),Qe&&(x(He.lineNumber),He.lineNumber.appendChild(document.createTextNode(qt(e.options,we)))),se=He.node.nextSibling}we+=He.size}for(;se;)se=de(se)}function Ba(e){var a=e.gutters.offsetWidth;e.sizer.style.marginLeft=a+"px"}function Xr(e,a){e.display.sizer.style.minHeight=a.docHeight+"px",e.display.heightForcer.style.top=a.docHeight+"px",e.display.gutters.style.height=a.docHeight+e.display.barHeight+Ve(e)+"px"}function Ir(e){var a=e.display,P=a.view;if(!a.alignWidgets&&(!a.gutters.firstChild||!e.options.fixedGutter))return;for(var M=yi(a)-a.scroller.scrollLeft+e.doc.scrollLeft,G=a.gutters.offsetWidth,re=M+"px",se=0;se<P.length;se++)if(!P[se].hidden){e.options.fixedGutter&&(P[se].gutter&&(P[se].gutter.style.left=re),P[se].gutterBackground&&(P[se].gutterBackground.style.left=re));var de=P[se].alignable;if(de)for(var ge=0;ge<de.length;ge++)de[ge].style.left=re}e.options.fixedGutter&&(a.gutters.style.left=M+G+"px")}function qn(e){if(!e.options.lineNumbers)return!1;var a=e.doc,P=qt(e.options,a.first+a.size-1),M=e.display;if(P.length!=M.lineNumChars){var G=M.measure.appendChild(S("div",[S("div",P)],"CodeMirror-linenumber CodeMirror-gutter-elt")),re=G.firstChild.offsetWidth,se=G.offsetWidth-re;return M.lineGutter.style.width="",M.lineNumInnerWidth=Math.max(re,M.lineGutter.offsetWidth-se)+1,M.lineNumWidth=M.lineNumInnerWidth+se,M.lineNumChars=M.lineNumInnerWidth?P.length:-1,M.lineGutter.style.width=M.lineNumWidth+"px",Ba(e.display),!0}return!1}function Ti(e,a){for(var P=[],M=!1,G=0;G<e.length;G++){var re=e[G],se=null;if(typeof re!="string"&&(se=re.style,re=re.className),re=="CodeMirror-linenumbers")if(a)M=!0;else continue;P.push({className:re,style:se})}return a&&!M&&P.push({className:"CodeMirror-linenumbers",style:null}),P}function xa(e){var a=e.gutters,P=e.gutterSpecs;x(a),e.lineGutter=null;for(var M=0;M<P.length;++M){var G=P[M],re=G.className,se=G.style,de=a.appendChild(S("div",null,"CodeMirror-gutter "+re));se&&(de.style.cssText=se),re=="CodeMirror-linenumbers"&&(e.lineGutter=de,de.style.width=(e.lineNumWidth||1)+"px")}a.style.display=P.length?"":"none",Ba(e)}function Qi(e){xa(e.display),tn(e),Ir(e)}function Da(e,a,P,M){var G=this;this.input=P,G.scrollbarFiller=S("div",null,"CodeMirror-scrollbar-filler"),G.scrollbarFiller.setAttribute("cm-not-content","true"),G.gutterFiller=S("div",null,"CodeMirror-gutter-filler"),G.gutterFiller.setAttribute("cm-not-content","true"),G.lineDiv=F("div",null,"CodeMirror-code"),G.selectionDiv=S("div",null,null,"position: relative; z-index: 1"),G.cursorDiv=S("div",null,"CodeMirror-cursors"),G.measure=S("div",null,"CodeMirror-measure"),G.lineMeasure=S("div",null,"CodeMirror-measure"),G.lineSpace=F("div",[G.measure,G.lineMeasure,G.selectionDiv,G.cursorDiv,G.lineDiv],null,"position: relative; outline: none");var re=F("div",[G.lineSpace],"CodeMirror-lines");G.mover=S("div",[re],null,"position: relative"),G.sizer=S("div",[G.mover],"CodeMirror-sizer"),G.sizerWidth=null,G.heightForcer=S("div",null,null,"position: absolute; height: "+ae+"px; width: 1px;"),G.gutters=S("div",null,"CodeMirror-gutters"),G.lineGutter=null,G.scroller=S("div",[G.sizer,G.heightForcer,G.gutters],"CodeMirror-scroll"),G.scroller.setAttribute("tabIndex","-1"),G.wrapper=S("div",[G.scrollbarFiller,G.gutterFiller,G.scroller],"CodeMirror"),T&&_<8&&(G.gutters.style.zIndex=-1,G.scroller.style.paddingRight=0),!t&&!(w&&u)&&(G.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(G.wrapper):e(G.wrapper)),G.viewFrom=G.viewTo=a.first,G.reportedViewFrom=G.reportedViewTo=a.first,G.view=[],G.renderedView=null,G.externalMeasured=null,G.viewOffset=0,G.lastWrapHeight=G.lastWrapWidth=0,G.updateLineNumbers=null,G.nativeBarWidth=G.barHeight=G.barWidth=0,G.scrollbarsClipped=!1,G.lineNumWidth=G.lineNumInnerWidth=G.lineNumChars=null,G.alignWidgets=!1,G.cachedCharWidth=G.cachedTextHeight=G.cachedPaddingH=null,G.maxLine=null,G.maxLineLength=0,G.maxLineChanged=!1,G.wheelDX=G.wheelDY=G.wheelStartX=G.wheelStartY=null,G.shift=!1,G.selForContextMenu=null,G.activeTouch=null,G.gutterSpecs=Ti(M.gutters,M.lineNumbers),xa(G),P.init(G)}var sa=0,ei=null;T?ei=-.53:w?ei=15:r?ei=-.7:i&&(ei=-1/3);function Ha(e){var a=e.wheelDeltaX,P=e.wheelDeltaY;return a==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(a=e.detail),P==null&&e.detail&&e.axis==e.VERTICAL_AXIS?P=e.detail:P==null&&(P=e.wheelDelta),{x:a,y:P}}function so(e){var a=Ha(e);return a.x*=ei,a.y*=ei,a}function lo(e,a){var P=Ha(a),M=P.x,G=P.y,re=e.display,se=re.scroller,de=se.scrollWidth>se.clientWidth,ge=se.scrollHeight>se.clientHeight;if(!(M&&de||G&&ge))return;if(G&&o&&t){e:for(var we=a.target,Fe=re.view;we!=se;we=we.parentNode)for(var He=0;He<Fe.length;He++)if(Fe[He].node==we){e.display.currentWheelTarget=we;break e}}if(M&&!w&&!c&&ei!=null){G&&ge&&_a(e,Math.max(0,se.scrollTop+G*ei)),Hi(e,Math.max(0,se.scrollLeft+M*ei)),(!G||G&&ge)&&ve(a),re.wheelStartX=null;return}if(G&&ei!=null){var tt=G*ei,Qe=e.doc.scrollTop,lt=Qe+re.wrapper.clientHeight;tt<0?Qe=Math.max(0,Qe+tt-50):lt=Math.min(e.doc.height,lt+tt+50),Ia(e,{top:Qe,bottom:lt})}sa<20&&(re.wheelStartX==null?(re.wheelStartX=se.scrollLeft,re.wheelStartY=se.scrollTop,re.wheelDX=M,re.wheelDY=G,setTimeout(function(){if(re.wheelStartX==null)return;var ft=se.scrollLeft-re.wheelStartX,bt=se.scrollTop-re.wheelStartY,At=bt&&re.wheelDY&&bt/re.wheelDY||ft&&re.wheelDX&&ft/re.wheelDX;if(re.wheelStartX=re.wheelStartY=null,!At)return;ei=(ei*sa+At)/(sa+1),++sa},200)):(re.wheelDX+=M,re.wheelDY+=G))}var Si=function(e,a){this.ranges=e,this.primIndex=a};Si.prototype.primary=function(){return this.ranges[this.primIndex]},Si.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var a=0;a<this.ranges.length;a++){var P=this.ranges[a],M=e.ranges[a];if(!Hr(P.anchor,M.anchor)||!Hr(P.head,M.head))return!1}return!0},Si.prototype.deepCopy=function(){for(var e=[],a=0;a<this.ranges.length;a++)e[a]=new Kr(Yr(this.ranges[a].anchor),Yr(this.ranges[a].head));return new Si(e,this.primIndex)},Si.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Si.prototype.contains=function(e,a){a||(a=e);for(var P=0;P<this.ranges.length;P++){var M=this.ranges[P];if(Lt(a,M.from())>=0&&Lt(e,M.to())<=0)return P}return-1};var Kr=function(e,a){this.anchor=e,this.head=a};Kr.prototype.from=function(){return cn(this.anchor,this.head)},Kr.prototype.to=function(){return On(this.anchor,this.head)},Kr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Gi(e,a,P){var M=e&&e.options.selectionsMayTouch,G=a[P];a.sort(function(tt,Qe){return Lt(tt.from(),Qe.from())}),P=oe(a,G);for(var re=1;re<a.length;re++){var se=a[re],de=a[re-1],ge=Lt(de.to(),se.from());if(M&&!se.empty()?ge>0:ge>=0){var we=cn(de.from(),se.from()),Fe=On(de.to(),se.to()),He=de.empty()?se.from()==se.head:de.from()==de.head;re<=P&&--P,a.splice(--re,2,new Kr(He?Fe:we,He?we:Fe))}}return new Si(a,P)}function Zi(e,a){return new Si([new Kr(e,a||e)],0)}function qi(e){return e.text?ut(e.from.line+e.text.length-1,W(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function uo(e,a){if(Lt(e,a.from)<0)return e;if(Lt(e,a.to)<=0)return qi(a);var P=e.line+a.text.length-(a.to.line-a.from.line)-1,M=e.ch;return e.line==a.to.line&&(M+=qi(a).ch-a.to.ch),ut(P,M)}function Wa(e,a){for(var P=[],M=0;M<e.sel.ranges.length;M++){var G=e.sel.ranges[M];P.push(new Kr(uo(G.anchor,a),uo(G.head,a)))}return Gi(e.cm,P,e.sel.primIndex)}function Lo(e,a,P){return e.line==a.line?ut(P.line,e.ch-a.ch+P.ch):ut(P.line+(e.line-a.line),e.ch)}function ko(e,a,P){for(var M=[],G=ut(e.first,0),re=G,se=0;se<a.length;se++){var de=a[se],ge=Lo(de.from,G,re),we=Lo(qi(de),G,re);if(G=de.to,re=we,P=="around"){var Fe=e.sel.ranges[se],He=Lt(Fe.head,Fe.anchor)<0;M[se]=new Kr(He?we:ge,He?ge:we)}else M[se]=new Kr(ge,ge)}return new Si(M,e.sel.primIndex)}function pa(e){e.doc.mode=Tt(e.options,e.doc.modeOption),co(e)}function co(e){e.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Ra(e,100),e.state.modeGen++,e.curOp&&tn(e)}function gs(e,a){return a.from.ch==0&&a.to.ch==0&&W(a.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,a,P,M){function G(Nt){return P?P[Nt]:null}function re(Nt,Rt,Wt){Ur(Nt,Rt,Wt,M),gr(Nt,"change",Nt,a)}function se(Nt,Rt){for(var Wt=[],nr=Nt;nr<Rt;++nr)Wt.push(new ii(we[nr],G(nr),M));return Wt}var de=a.from,ge=a.to,we=a.text,Fe=dt(e,de.line),He=dt(e,ge.line),tt=W(we),Qe=G(we.length-1),lt=ge.line-de.line;if(a.full)e.insert(0,se(0,we.length)),e.remove(we.length,e.size-we.length);else if(gs(e,a)){var ft=se(0,we.length-1);re(He,He.text,Qe),lt&&e.remove(de.line,lt),ft.length&&e.insert(de.line,ft)}else if(Fe==He)if(we.length==1)re(Fe,Fe.text.slice(0,de.ch)+tt+Fe.text.slice(ge.ch),Qe);else{var bt=se(1,we.length-1);bt.push(new ii(tt+Fe.text.slice(ge.ch),Qe,M)),re(Fe,Fe.text.slice(0,de.ch)+we[0],G(0)),e.insert(de.line+1,bt)}else if(we.length==1)re(Fe,Fe.text.slice(0,de.ch)+we[0]+He.text.slice(ge.ch),G(0)),e.remove(de.line+1,lt);else{re(Fe,Fe.text.slice(0,de.ch)+we[0],G(0)),re(He,tt+He.text.slice(ge.ch),Qe);var At=se(1,we.length-1);lt>1&&e.remove(de.line+1,lt-1),e.insert(de.line+1,At)}gr(e,"change",e,a)}function wa(e,a,P){function M(G,re,se){if(G.linked)for(var de=0;de<G.linked.length;++de){var ge=G.linked[de];if(ge.doc==re)continue;var we=se&&ge.sharedHist;if(P&&!we)continue;a(ge.doc,we),M(ge.doc,G,we)}}M(e,null,!0)}function vs(e,a){if(a.cm)throw new Error("This document is already in use.");e.doc=a,a.cm=e,xi(e),pa(e),ys(e),e.options.lineWrapping||Fi(e),e.options.mode=a.modeOption,tn(e)}function ys(e){(e.doc.direction=="rtl"?z:y)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){wi(e,function(){ys(e),tn(e)})}function Mo(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,a){var P={from:Yr(a.from),to:qi(a),text:Ht(e,a.from,a.to)};return Es(e,P,a.from.line,a.to.line+1),wa(e,function(M){return Es(M,P,a.from.line,a.to.line+1)},!0),P}function bs(e){for(;e.length;){var a=W(e);if(a.ranges)e.pop();else break}}function ml(e,a){if(a)return bs(e.done),W(e.done);if(e.done.length&&!W(e.done).ranges)return W(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),W(e.done)}function _s(e,a,P,M){var G=e.history;G.undone.length=0;var re=+new Date,se,de;if((G.lastOp==M||G.lastOrigin==a.origin&&a.origin&&(a.origin.charAt(0)=="+"&&G.lastModTime>re-(e.cm?e.cm.options.historyEventDelay:500)||a.origin.charAt(0)=="*"))&&(se=ml(G,G.lastOp==M)))de=W(se.changes),Lt(a.from,a.to)==0&&Lt(a.from,de.to)==0?de.to=qi(a):se.changes.push(rs(e,a));else{var ge=W(G.done);for((!ge||!ge.ranges)&&Po(e.sel,G.done),se={changes:[rs(e,a)],generation:G.generation},G.done.push(se);G.done.length>G.undoDepth;)G.done.shift(),G.done[0].ranges||G.done.shift()}G.done.push(P),G.generation=++G.maxGeneration,G.lastModTime=G.lastSelTime=re,G.lastOp=G.lastSelOp=M,G.lastOrigin=G.lastSelOrigin=a.origin,de||ye(e,"historyAdded")}function gl(e,a,P,M){var G=a.charAt(0);return G=="*"||G=="+"&&P.ranges.length==M.ranges.length&&P.somethingSelected()==M.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,a,P,M){var G=e.history,re=M&&M.origin;P==G.lastSelOp||re&&G.lastSelOrigin==re&&(G.lastModTime==G.lastSelTime&&G.lastOrigin==re||gl(e,re,W(G.done),a))?G.done[G.done.length-1]=a:Po(a,G.done),G.lastSelTime=+new Date,G.lastSelOrigin=re,G.lastSelOp=P,M&&M.clearRedo!==!1&&bs(G.undone)}function Po(e,a){var P=W(a);P&&P.ranges&&P.equals(e)||a.push(e)}function Es(e,a,P,M){var G=a["spans_"+e.id],re=0;e.iter(Math.max(e.first,P),Math.min(e.first+e.size,M),function(se){se.markedSpans&&((G||(G=a["spans_"+e.id]={}))[re]=se.markedSpans),++re})}function yl(e){if(!e)return null;for(var a,P=0;P<e.length;++P)e[P].marker.explicitlyCleared?a||(a=e.slice(0,P)):a&&a.push(e[P]);return a?a.length?a:null:e}function bl(e,a){var P=a["spans_"+e.id];if(!P)return null;for(var M=[],G=0;G<a.text.length;++G)M.push(yl(P[G]));return M}function xs(e,a){var P=bl(e,a),M=Oi(e,a);if(!P)return M;if(!M)return P;for(var G=0;G<P.length;++G){var re=P[G],se=M[G];if(re&&se){e:for(var de=0;de<se.length;++de){for(var ge=se[de],we=0;we<re.length;++we)if(re[we].marker==ge.marker)continue e;re.push(ge)}}else se&&(P[G]=se)}return P}function Ga(e,a,P){for(var M=[],G=0;G<e.length;++G){var re=e[G];if(re.ranges){M.push(P?Si.prototype.deepCopy.call(re):re);continue}var se=re.changes,de=[];M.push({changes:de});for(var ge=0;ge<se.length;++ge){var we=se[ge],Fe=void 0;if(de.push({from:we.from,to:we.to,text:we.text}),a)for(var He in we)(Fe=He.match(/^spans_(\d+)$/))&&(oe(a,Number(Fe[1]))>-1&&(W(de)[He]=we[He],delete we[He]))}}return M}function ns(e,a,P,M){if(M){var G=e.anchor;if(P){var re=Lt(a,G)<0;re!=Lt(P,G)<0?(G=a,a=P):re!=Lt(a,P)<0&&(a=P)}return new Kr(G,a)}else return new Kr(P||a,a)}function No(e,a,P,M,G){G==null&&(G=e.cm&&(e.cm.display.shift||e.extend)),bi(e,new Si([ns(e.sel.primary(),a,P,G)],0),M)}function ws(e,a,P){for(var M=[],G=e.cm&&(e.cm.display.shift||e.extend),re=0;re<e.sel.ranges.length;re++)M[re]=ns(e.sel.ranges[re],a[re],null,G);var se=Gi(e.cm,M,e.sel.primIndex);bi(e,se,P)}function is(e,a,P,M){var G=e.sel.ranges.slice(0);G[a]=P,bi(e,Gi(e.cm,G,e.sel.primIndex),M)}function Ts(e,a,P,M){bi(e,Zi(a,P),M)}function _l(e,a,P){var M={ranges:a.ranges,update:function(G){this.ranges=[];for(var re=0;re<G.length;re++)this.ranges[re]=new Kr(Pt(e,G[re].anchor),Pt(e,G[re].head))},origin:P&&P.origin};return ye(e,"beforeSelectionChange",e,M),e.cm&&ye(e.cm,"beforeSelectionChange",e.cm,M),M.ranges!=a.ranges?Gi(e.cm,M.ranges,M.ranges.length-1):a}function Ss(e,a,P){var M=e.history.done,G=W(M);G&&G.ranges?(M[M.length-1]=a,jo(e,a,P)):bi(e,a,P)}function bi(e,a,P){jo(e,a,P),vl(e,e.sel,e.cm?e.cm.curOp.id:NaN,P)}function jo(e,a,P){(me(e,"beforeSelectionChange")||e.cm&&me(e.cm,"beforeSelectionChange"))&&(a=_l(e,a,P));var M=P&&P.bias||(Lt(a.primary().head,e.sel.primary().head)<0?-1:1);Cs(e,As(e,a,M,!0)),!(P&&P.scroll===!1)&&e.cm&&ya(e.cm)}function Cs(e,a){if(a.equals(e.sel))return;e.sel=a,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,pe(e.cm)),gr(e,"cursorActivity",e)}function Os(e){Cs(e,As(e,e.sel,null,!1))}function As(e,a,P,M){for(var G,re=0;re<a.ranges.length;re++){var se=a.ranges[re],de=a.ranges.length==e.sel.ranges.length&&e.sel.ranges[re],ge=Fo(e,se.anchor,de&&de.anchor,P,M),we=Fo(e,se.head,de&&de.head,P,M);(G||ge!=se.anchor||we!=se.head)&&(G||(G=a.ranges.slice(0,re)),G[re]=new Kr(ge,we))}return G?Gi(e.cm,G,a.primIndex):a}function Ka(e,a,P,M,G){var re=dt(e,a.line);if(re.markedSpans)for(var se=0;se<re.markedSpans.length;++se){var de=re.markedSpans[se],ge=de.marker,we="selectLeft"in ge?!ge.selectLeft:ge.inclusiveLeft,Fe="selectRight"in ge?!ge.selectRight:ge.inclusiveRight;if((de.from==null||(we?de.from<=a.ch:de.from<a.ch))&&(de.to==null||(Fe?de.to>=a.ch:de.to>a.ch))){if(G&&(ye(ge,"beforeCursorEnter"),ge.explicitlyCleared))if(re.markedSpans){--se;continue}else break;if(!ge.atomic)continue;if(P){var He=ge.find(M<0?1:-1),tt=void 0;if((M<0?Fe:we)&&(He=Rs(e,He,-M,He&&He.line==a.line?re:null)),He&&He.line==a.line&&(tt=Lt(He,P))&&(M<0?tt<0:tt>0))return Ka(e,He,a,M,G)}var Qe=ge.find(M<0?-1:1);return(M<0?we:Fe)&&(Qe=Rs(e,Qe,M,Qe.line==a.line?re:null)),Qe?Ka(e,Qe,a,M,G):null}}return a}function Fo(e,a,P,M,G){var re=M||1,se=Ka(e,a,P,re,G)||!G&&Ka(e,a,P,re,!0)||Ka(e,a,P,-re,G)||!G&&Ka(e,a,P,-re,!0);return se||(e.cantEdit=!0,ut(e.first,0))}function Rs(e,a,P,M){return P<0&&a.ch==0?a.line>e.first?Pt(e,ut(a.line-1)):null:P>0&&a.ch==(M||dt(e,a.line)).text.length?a.line<e.first+e.size-1?ut(a.line+1,0):null:new ut(a.line,a.ch+P)}function Is(e){e.setSelection(ut(e.firstLine(),0),ut(e.lastLine()),_e)}function Ds(e,a,P){var M={canceled:!1,from:a.from,to:a.to,text:a.text,origin:a.origin,cancel:function(){return M.canceled=!0}};return P&&(M.update=function(G,re,se,de){G&&(M.from=Pt(e,G)),re&&(M.to=Pt(e,re)),se&&(M.text=se),de!==void 0&&(M.origin=de)}),ye(e,"beforeChange",e,M),e.cm&&ye(e.cm,"beforeChange",e.cm,M),M.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:M.from,to:M.to,text:M.text,origin:M.origin}}function za(e,a,P){if(e.cm){if(!e.cm.curOp)return Pn(e.cm,za)(e,a,P);if(e.cm.state.suppressEdits)return}if((me(e,"beforeChange")||e.cm&&me(e.cm,"beforeChange"))&&(a=Ds(e,a,!0),!a))return;var M=_n&&!P&&Ki(e,a.from,a.to);if(M)for(var G=M.length-1;G>=0;--G)Ls(e,{from:M[G].from,to:M[G].to,text:G?[""]:a.text,origin:a.origin});else Ls(e,a)}function Ls(e,a){if(a.text.length==1&&a.text[0]==""&&Lt(a.from,a.to)==0)return;var P=Wa(e,a);_s(e,a,P,e.cm?e.cm.curOp.id:NaN),ho(e,a,P,Oi(e,a));var M=[];wa(e,function(G,re){!re&&oe(M,G.history)==-1&&(Ns(G.history,a),M.push(G.history)),ho(G,a,null,Oi(G,a))})}function Uo(e,a,P){var M=e.cm&&e.cm.state.suppressEdits;if(M&&!P)return;for(var G=e.history,re,se=e.sel,de=a=="undo"?G.done:G.undone,ge=a=="undo"?G.undone:G.done,we=0;we<de.length&&!(re=de[we],P?re.ranges&&!re.equals(e.sel):!re.ranges);we++);if(we==de.length)return;for(G.lastOrigin=G.lastSelOrigin=null;;)if(re=de.pop(),re.ranges){if(Po(re,ge),P&&!re.equals(e.sel)){bi(e,re,{clearRedo:!1});return}se=re}else if(M){de.push(re);return}else break;var Fe=[];Po(se,ge),ge.push({changes:Fe,generation:G.generation}),G.generation=re.generation||++G.maxGeneration;for(var He=me(e,"beforeChange")||e.cm&&me(e.cm,"beforeChange"),tt=function(ft){var bt=re.changes[ft];if(bt.origin=a,He&&!Ds(e,bt,!1))return de.length=0,{};Fe.push(rs(e,bt));var At=ft?Wa(e,bt):W(de);ho(e,bt,At,xs(e,bt)),!ft&&e.cm&&e.cm.scrollIntoView({from:bt.from,to:qi(bt)});var Nt=[];wa(e,function(Rt,Wt){!Wt&&oe(Nt,Rt.history)==-1&&(Ns(Rt.history,bt),Nt.push(Rt.history)),ho(Rt,bt,null,xs(Rt,bt))})},Qe=re.changes.length-1;Qe>=0;--Qe){var lt=tt(Qe);if(lt)return lt.v}}function ks(e,a){if(a==0)return;if(e.first+=a,e.sel=new Si(X(e.sel.ranges,function(G){return new Kr(ut(G.anchor.line+a,G.anchor.ch),ut(G.head.line+a,G.head.ch))}),e.sel.primIndex),e.cm){tn(e.cm,e.first,e.first-a,a);for(var P=e.cm.display,M=P.viewFrom;M<P.viewTo;M++)xn(e.cm,M,"gutter")}}function ho(e,a,P,M){if(e.cm&&!e.cm.curOp)return Pn(e.cm,ho)(e,a,P,M);if(a.to.line<e.first){ks(e,a.text.length-1-(a.to.line-a.from.line));return}if(a.from.line>e.lastLine())return;if(a.from.line<e.first){var G=a.text.length-1-(e.first-a.from.line);ks(e,G),a={from:ut(e.first,0),to:ut(a.to.line+G,a.to.ch),text:[W(a.text)],origin:a.origin}}var re=e.lastLine();a.to.line>re&&(a={from:a.from,to:ut(re,dt(e,re).text.length),text:[a.text[0]],origin:a.origin}),a.removed=Ht(e,a.from,a.to),P||(P=Wa(e,a)),e.cm?El(e.cm,a,M):ts(e,a,M),jo(e,P,_e),e.cantEdit&&Fo(e,ut(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,a,P){var M=e.doc,G=e.display,re=a.from,se=a.to,de=!1,ge=re.line;e.options.lineWrapping||(ge=xt(Xn(dt(M,re.line))),M.iter(ge,se.line+1,function(Qe){if(Qe==G.maxLine)return de=!0,!0})),M.sel.contains(a.from,a.to)>-1&&pe(e),ts(M,a,P,Ui(e)),e.options.lineWrapping||(M.iter(ge,re.line+a.text.length,function(Qe){var lt=gi(Qe);lt>G.maxLineLength&&(G.maxLine=Qe,G.maxLineLength=lt,G.maxLineChanged=!0,de=!1)}),de&&(e.curOp.updateMaxLine=!0)),nn(M,re.line),Ra(e,400);var we=a.text.length-(se.line-re.line)-1;a.full?tn(e):re.line==se.line&&a.text.length==1&&!gs(e.doc,a)?xn(e,re.line,"text"):tn(e,re.line,se.line+1,we);var Fe=me(e,"changes"),He=me(e,"change");if(He||Fe){var tt={from:re,to:se,text:a.text,removed:a.removed,origin:a.origin};He&&gr(e,"change",e,tt),Fe&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(tt)}e.display.selForContextMenu=null}function Va(e,a,P,M,G){var re;M||(M=P),Lt(M,P)<0&&(re=[M,P],P=re[0],M=re[1]),typeof a=="string"&&(a=e.splitLines(a)),za(e,{from:P,to:M,text:a,origin:G})}function Ms(e,a,P,M){P<e.line?e.line+=M:a<e.line&&(e.line=a,e.ch=0)}function Ps(e,a,P,M){for(var G=0;G<e.length;++G){var re=e[G],se=!0;if(re.ranges){re.copied||(re=e[G]=re.deepCopy(),re.copied=!0);for(var de=0;de<re.ranges.length;de++)Ms(re.ranges[de].anchor,a,P,M),Ms(re.ranges[de].head,a,P,M);continue}for(var ge=0;ge<re.changes.length;++ge){var we=re.changes[ge];if(P<we.from.line)we.from=ut(we.from.line+M,we.from.ch),we.to=ut(we.to.line+M,we.to.ch);else if(a<=we.to.line){se=!1;break}}se||(e.splice(0,G+1),G=0)}}function Ns(e,a){var P=a.from.line,M=a.to.line,G=a.text.length-(M-P)-1;Ps(e.done,P,M,G),Ps(e.undone,P,M,G)}function fo(e,a,P,M){var G=a,re=a;return typeof a=="number"?re=dt(e,zr(e,a)):G=xt(a),G==null?null:(M(re,G)&&e.cm&&xn(e.cm,G,P),re)}function po(e){this.lines=e,this.parent=null;for(var a=0,P=0;P<e.length;++P)e[P].parent=this,a+=e[P].height;this.height=a}po.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,a){for(var P=e,M=e+a;P<M;++P){var G=this.lines[P];this.height-=G.height,Ft(G),gr(G,"delete")}this.lines.splice(e,a)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,a,P){this.height+=P,this.lines=this.lines.slice(0,e).concat(a).concat(this.lines.slice(e));for(var M=0;M<a.length;++M)a[M].parent=this},iterN:function(e,a,P){for(var M=e+a;e<M;++e)if(P(this.lines[e]))return!0}};function mo(e){this.children=e;for(var a=0,P=0,M=0;M<e.length;++M){var G=e[M];a+=G.chunkSize(),P+=G.height,G.parent=this}this.size=a,this.height=P,this.parent=null}mo.prototype={chunkSize:function(){return this.size},removeInner:function(e,a){this.size-=a;for(var P=0;P<this.children.length;++P){var M=this.children[P],G=M.chunkSize();if(e<G){var re=Math.min(a,G-e),se=M.height;if(M.removeInner(e,re),this.height-=se-M.height,G==re&&(this.children.splice(P--,1),M.parent=null),(a-=re)==0)break;e=0}else e-=G}if(this.size-a<25&&(this.children.length>1||!(this.children[0]instanceof po))){var de=[];this.collapse(de),this.children=[new po(de)],this.children[0].parent=this}},collapse:function(e){for(var a=0;a<this.children.length;++a)this.children[a].collapse(e)},insertInner:function(e,a,P){this.size+=a.length,this.height+=P;for(var M=0;M<this.children.length;++M){var G=this.children[M],re=G.chunkSize();if(e<=re){if(G.insertInner(e,a,P),G.lines&&G.lines.length>50){for(var se=G.lines.length%25+25,de=se;de<G.lines.length;){var ge=new po(G.lines.slice(de,de+=25));G.height-=ge.height,this.children.splice(++M,0,ge),ge.parent=this}G.lines=G.lines.slice(0,se),this.maybeSpill()}break}e-=re}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var a=e.children.splice(e.children.length-5,5),P=new mo(a);if(e.parent){e.size-=P.size,e.height-=P.height;var G=oe(e.parent.children,e);e.parent.children.splice(G+1,0,P)}else{var M=new mo(e.children);M.parent=e,e.children=[M,P],e=M}P.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,a,P){for(var M=0;M<this.children.length;++M){var G=this.children[M],re=G.chunkSize();if(e<re){var se=Math.min(a,re-e);if(G.iterN(e,se,P))return!0;if((a-=se)==0)break;e=0}else e-=re}}};var go=function(e,a,P){if(P)for(var M in P)P.hasOwnProperty(M)&&(this[M]=P[M]);this.doc=e,this.node=a};go.prototype.clear=function(){var e=this.doc.cm,a=this.line.widgets,P=this.line,M=xt(P);if(M==null||!a)return;for(var G=0;G<a.length;++G)a[G]==this&&a.splice(G--,1);a.length||(P.widgets=null);var re=Mn(this);vt(P,Math.max(0,P.height-re)),e&&(wi(e,function(){js(e,P,-re),xn(e,M,"widget")}),gr(e,"lineWidgetCleared",e,this,M))},go.prototype.changed=function(){var e=this,a=this.height,P=this.doc.cm,M=this.line;this.height=null;var G=Mn(this)-a;if(!G)return;$n(this.doc,M)||vt(M,M.height+G),P&&wi(P,function(){P.curOp.forceUpdate=!0,js(P,M,G),gr(P,"lineWidgetChanged",P,e,xt(M))})},Oe(go);function js(e,a,P){ni(a)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&no(e,P)}function xl(e,a,P,M){var G=new go(e,P,M),re=e.cm;return re&&G.noHScroll&&(re.display.alignWidgets=!0),fo(e,a,"widget",function(se){var de=se.widgets||(se.widgets=[]);if(G.insertAt==null?de.push(G):de.splice(Math.min(de.length-1,Math.max(0,G.insertAt)),0,G),G.line=se,re&&!$n(e,se)){var ge=ni(se)<e.scrollTop;vt(se,se.height+Mn(G)),ge&&no(re,G.height),re.curOp.forceUpdate=!0}return!0}),re&&gr(re,"lineWidgetAdded",re,G,typeof a=="number"?a:xt(a)),G}var Fs=0,Ta=function(e,a){this.lines=[],this.type=a,this.doc=e,this.id=++Fs};Ta.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,a=e&&!e.curOp;if(a&&oa(e),me(this,"clear")){var P=this.find();P&&gr(this,"clear",P.from,P.to)}for(var M=null,G=null,re=0;re<this.lines.length;++re){var se=this.lines[re],de=br(se.markedSpans,this);e&&!this.collapsed?xn(e,xt(se),"text"):e&&(de.to!=null&&(G=xt(se)),de.from!=null&&(M=xt(se))),se.markedSpans=hi(se.markedSpans,de),de.from==null&&this.collapsed&&!$n(this.doc,se)&&e&&vt(se,Dn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ge=0;ge<this.lines.length;++ge){var we=Xn(this.lines[ge]),Fe=gi(we);Fe>e.display.maxLineLength&&(e.display.maxLine=we,e.display.maxLineLength=Fe,e.display.maxLineChanged=!0)}M!=null&&e&&this.collapsed&&tn(e,M,G+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&gr(e,"markerCleared",e,this,M,G),a&&ha(e),this.parent&&this.parent.clear()},Ta.prototype.find=function(e,a){e==null&&this.type=="bookmark"&&(e=1);for(var P,M,G=0;G<this.lines.length;++G){var re=this.lines[G],se=br(re.markedSpans,this);if(se.from!=null&&(P=ut(a?re:xt(re),se.from),e==-1))return P;if(se.to!=null&&(M=ut(a?re:xt(re),se.to),e==1))return M}return P&&{from:P,to:M}},Ta.prototype.changed=function(){var e=this,a=this.find(-1,!0),P=this,M=this.doc.cm;if(!a||!M)return;wi(M,function(){var G=a.line,re=xt(a.line),se=ze(M,re);if(se&&(sr(se),M.curOp.selectionChanged=M.curOp.forceUpdate=!0),M.curOp.updateMaxLine=!0,!$n(P.doc,G)&&P.height!=null){var de=P.height;P.height=null;var ge=Mn(P)-de;ge&&vt(G,G.height+ge)}gr(M,"markerChanged",M,e)})},Ta.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var a=this.doc.cm.curOp;(!a.maybeHiddenMarkers||oe(a.maybeHiddenMarkers,this)==-1)&&(a.maybeUnhiddenMarkers||(a.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ta.prototype.detachLine=function(e){if(this.lines.splice(oe(this.lines,e),1),!this.lines.length&&this.doc.cm){var a=this.doc.cm.curOp;(a.maybeHiddenMarkers||(a.maybeHiddenMarkers=[])).push(this)}},Oe(Ta);function Xa(e,a,P,M,G){if(M&&M.shared)return wl(e,a,P,M,G);if(e.cm&&!e.cm.curOp)return Pn(e.cm,Xa)(e,a,P,M,G);var re=new Ta(e,G),se=Lt(a,P);if(M&&L(M,re,!1),se>0||se==0&&re.clearWhenEmpty!==!1)return re;if(re.replacedWith&&(re.collapsed=!0,re.widgetNode=F("span",[re.replacedWith],"CodeMirror-widget"),M.handleMouseEvents||re.widgetNode.setAttribute("cm-ignore-events","true"),M.insertLeft&&(re.widgetNode.insertLeft=!0)),re.collapsed){if(Mi(e,a.line,a,P,re)||a.line!=P.line&&Mi(e,P.line,a,P,re))throw new Error("Inserting collapsed marker partially overlapping an existing one");ur()}re.addToHistory&&_s(e,{from:a,to:P,origin:"markText"},e.sel,NaN);var de=a.line,ge=e.cm,we;if(e.iter(de,P.line+1,function(He){ge&&re.collapsed&&!ge.options.lineWrapping&&Xn(He)==ge.display.maxLine&&(we=!0),re.collapsed&&de!=a.line&&vt(He,0),Fn(He,new Rr(re,de==a.line?a.ch:null,de==P.line?P.ch:null)),++de}),re.collapsed&&e.iter(a.line,P.line+1,function(He){$n(e,He)&&vt(He,0)}),re.clearOnEnter&&Ie(re,"beforeCursorEnter",function(){return re.clear()}),re.readOnly&&(lr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),re.collapsed&&(re.id=++Fs,re.atomic=!0),ge){if(we&&(ge.curOp.updateMaxLine=!0),re.collapsed)tn(ge,a.line,P.line+1);else if(re.className||re.startStyle||re.endStyle||re.css||re.attributes||re.title)for(var Fe=a.line;Fe<=P.line;Fe++)xn(ge,Fe,"text");re.atomic&&Os(ge.doc),gr(ge,"markerAdded",ge,re)}return re}var vo=function(e,a){this.markers=e,this.primary=a;for(var P=0;P<e.length;++P)e[P].parent=this};vo.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();gr(this,"clear")},vo.prototype.find=function(e,a){return this.primary.find(e,a)},Oe(vo);function wl(e,a,P,M,G){M=L(M),M.shared=!1;var re=[Xa(e,a,P,M,G)],se=re[0],de=M.widgetNode;return wa(e,function(ge){de&&(M.widgetNode=de.cloneNode(!0)),re.push(Xa(ge,Pt(ge,a),Pt(ge,P),M,G));for(var we=0;we<ge.linked.length;++we)if(ge.linked[we].isParent)return;se=W(re)}),new vo(re,se)}function Us(e){return e.findMarks(ut(e.first,0),e.clipPos(ut(e.lastLine())),function(a){return a.parent})}function Tl(e,a){for(var P=0;P<a.length;P++){var M=a[P],G=M.find(),re=e.clipPos(G.from),se=e.clipPos(G.to);if(Lt(re,se)){var de=Xa(e,re,se,M.primary,M.primary.type);M.markers.push(de),de.parent=M}}}function Sl(e){for(var a=function(M){var G=e[M],re=[G.primary.doc];wa(G.primary.doc,function(ge){return re.push(ge)});for(var se=0;se<G.markers.length;se++){var de=G.markers[se];oe(re,de.doc)==-1&&(de.parent=null,G.markers.splice(se--,1))}},P=0;P<e.length;P++)a(P)}var Cl=0,Ri=function(e,a,P,M,G){if(!(this instanceof Ri))return new Ri(e,a,P,M,G);P==null&&(P=0),mo.call(this,[new po([new ii("",null)])]),this.first=P,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=P;var re=ut(P,0);this.sel=Zi(re),this.history=new Mo(null),this.id=++Cl,this.modeOption=a,this.lineSep=M,this.direction=G=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ts(this,{from:re,to:re,text:e}),bi(this,Zi(re),_e)};Ri.prototype=q(mo.prototype,{constructor:Ri,iter:function(e,a,P){P?this.iterN(e-this.first,a-e,P):this.iterN(this.first,this.first+this.size,e)},insert:function(e,a){for(var P=0,M=0;M<a.length;++M)P+=a[M].height;this.insertInner(e-this.first,a,P)},remove:function(e,a){this.removeInner(e-this.first,a)},getValue:function(e){var a=Gt(this,this.first,this.first+this.size);return e===!1?a:a.join(e||this.lineSeparator())},setValue:Nn(function(e){var a=ut(this.first,0),P=this.first+this.size-1;za(this,{from:a,to:ut(P,dt(this,P).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ba(this.cm,0,0),bi(this,Zi(a),_e)}),replaceRange:function(e,a,P,M){a=Pt(this,a),P=P?Pt(this,P):a,Va(this,e,a,P,M)},getRange:function(e,a,P){var M=Ht(this,Pt(this,e),Pt(this,a));return P===!1?M:M.join(P||this.lineSeparator())},getLine:function(e){var a=this.getLineHandle(e);return a&&a.text},getLineHandle:function(e){if(Ar(this,e))return dt(this,e)},getLineNumber:function(e){return xt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=dt(this,e)),Xn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Pt(this,e)},getCursor:function(e){var a=this.sel.primary(),P;return e==null||e=="head"?P=a.head:e=="anchor"?P=a.anchor:e=="end"||e=="to"||e===!1?P=a.to():P=a.from(),P},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Nn(function(e,a,P){Ts(this,Pt(this,typeof e=="number"?ut(e,a||0):e),null,P)}),setSelection:Nn(function(e,a,P){Ts(this,Pt(this,e),Pt(this,a||e),P)}),extendSelection:Nn(function(e,a,P){No(this,Pt(this,e),a&&Pt(this,a),P)}),extendSelections:Nn(function(e,a){ws(this,ct(this,e),a)}),extendSelectionsBy:Nn(function(e,a){var P=X(this.sel.ranges,e);ws(this,ct(this,P),a)}),setSelections:Nn(function(e,a,P){if(!e.length)return;for(var M=[],G=0;G<e.length;G++)M[G]=new Kr(Pt(this,e[G].anchor),Pt(this,e[G].head));a==null&&(a=Math.min(e.length-1,this.sel.primIndex)),bi(this,Gi(this.cm,M,a),P)}),addSelection:Nn(function(e,a,P){var M=this.sel.ranges.slice(0);M.push(new Kr(Pt(this,e),Pt(this,a||e))),bi(this,Gi(this.cm,M,M.length-1),P)}),getSelection:function(e){for(var a=this.sel.ranges,P,M=0;M<a.length;M++){var G=Ht(this,a[M].from(),a[M].to());P=P?P.concat(G):G}return e===!1?P:P.join(e||this.lineSeparator())},getSelections:function(e){for(var a=[],P=this.sel.ranges,M=0;M<P.length;M++){var G=Ht(this,P[M].from(),P[M].to());e!==!1&&(G=G.join(e||this.lineSeparator())),a[M]=G}return a},replaceSelection:function(e,a,P){for(var M=[],G=0;G<this.sel.ranges.length;G++)M[G]=e;this.replaceSelections(M,a,P||"+input")},replaceSelections:Nn(function(e,a,P){for(var M=[],G=this.sel,re=0;re<G.ranges.length;re++){var se=G.ranges[re];M[re]={from:se.from(),to:se.to(),text:this.splitLines(e[re]),origin:P}}for(var de=a&&a!="end"&&ko(this,M,a),ge=M.length-1;ge>=0;ge--)za(this,M[ge]);de?Ss(this,de):this.cm&&ya(this.cm)}),undo:Nn(function(){Uo(this,"undo")}),redo:Nn(function(){Uo(this,"redo")}),undoSelection:Nn(function(){Uo(this,"undo",!0)}),redoSelection:Nn(function(){Uo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,a=0,P=0,M=0;M<e.done.length;M++)e.done[M].ranges||++a;for(var G=0;G<e.undone.length;G++)e.undone[G].ranges||++P;return{undo:a,redo:P}},clearHistory:function(){var e=this;this.history=new Mo(this.history.maxGeneration),wa(this,function(a){return a.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:Ga(this.history.done),undone:Ga(this.history.undone)}},setHistory:function(e){var a=this.history=new Mo(this.history.maxGeneration);a.done=Ga(e.done.slice(0),null,!0),a.undone=Ga(e.undone.slice(0),null,!0)},setGutterMarker:Nn(function(e,a,P){return fo(this,e,"gutter",function(M){var G=M.gutterMarkers||(M.gutterMarkers={});return G[a]=P,!P&&$(G)&&(M.gutterMarkers=null),!0})}),clearGutter:Nn(function(e){var a=this;this.iter(function(P){P.gutterMarkers&&P.gutterMarkers[e]&&fo(a,P,"gutter",function(){return P.gutterMarkers[e]=null,$(P.gutterMarkers)&&(P.gutterMarkers=null),!0})})}),lineInfo:function(e){var a;if(typeof e=="number"){if(!Ar(this,e))return null;if(a=e,e=dt(this,e),!e)return null}else if(a=xt(e),a==null)return null;return{line:a,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Nn(function(e,a,P){return fo(this,e,a=="gutter"?"gutter":"class",function(M){var G=a=="text"?"textClass":a=="background"?"bgClass":a=="gutter"?"gutterClass":"wrapClass";if(!M[G])M[G]=P;else{if(R(P).test(M[G]))return!1;M[G]+=" "+P}return!0})}),removeLineClass:Nn(function(e,a,P){return fo(this,e,a=="gutter"?"gutter":"class",function(M){var G=a=="text"?"textClass":a=="background"?"bgClass":a=="gutter"?"gutterClass":"wrapClass",re=M[G];if(re)if(P==null)M[G]=null;else{var se=re.match(R(P));if(!se)return!1;var de=se.index+se[0].length;M[G]=re.slice(0,se.index)+(!se.index||de==re.length?"":" ")+re.slice(de)||null}else return!1;return!0})}),addLineWidget:Nn(function(e,a,P){return xl(this,e,a,P)}),removeLineWidget:function(e){e.clear()},markText:function(e,a,P){return Xa(this,Pt(this,e),Pt(this,a),P,P&&P.type||"range")},setBookmark:function(e,a){var P={replacedWith:a&&(a.nodeType==null?a.widget:a),insertLeft:a&&a.insertLeft,clearWhenEmpty:!1,shared:a&&a.shared,handleMouseEvents:a&&a.handleMouseEvents};return e=Pt(this,e),Xa(this,e,e,P,"bookmark")},findMarksAt:function(e){e=Pt(this,e);var a=[],P=dt(this,e.line).markedSpans;if(P)for(var M=0;M<P.length;++M){var G=P[M];(G.from==null||G.from<=e.ch)&&(G.to==null||G.to>=e.ch)&&a.push(G.marker.parent||G.marker)}return a},findMarks:function(e,a,P){e=Pt(this,e),a=Pt(this,a);var M=[],G=e.line;return this.iter(e.line,a.line+1,function(re){var se=re.markedSpans;if(se)for(var de=0;de<se.length;de++){var ge=se[de];!(ge.to!=null&&G==e.line&&e.ch>=ge.to||ge.from==null&&G!=e.line||ge.from!=null&&G==a.line&&ge.from>=a.ch)&&(!P||P(ge.marker))&&M.push(ge.marker.parent||ge.marker)}++G}),M},getAllMarks:function(){var e=[];return this.iter(function(a){var P=a.markedSpans;if(P)for(var M=0;M<P.length;++M)P[M].from!=null&&e.push(P[M].marker)}),e},posFromIndex:function(e){var a,P=this.first,M=this.lineSeparator().length;return this.iter(function(G){var re=G.text.length+M;if(re>e)return a=e,!0;e-=re,++P}),Pt(this,ut(P,a))},indexFromPos:function(e){e=Pt(this,e);var a=e.ch;if(e.line<this.first||e.ch<0)return 0;var P=this.lineSeparator().length;return this.iter(this.first,e.line,function(M){a+=M.text.length+P}),a},copy:function(e){var a=new Ri(Gt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return a.scrollTop=this.scrollTop,a.scrollLeft=this.scrollLeft,a.sel=this.sel,a.extend=!1,e&&(a.history.undoDepth=this.history.undoDepth,a.setHistory(this.getHistory())),a},linkedDoc:function(e){e||(e={});var a=this.first,P=this.first+this.size;e.from!=null&&e.from>a&&(a=e.from),e.to!=null&&e.to<P&&(P=e.to);var M=new Ri(Gt(this,a,P),e.mode||this.modeOption,a,this.lineSep,this.direction);return e.sharedHist&&(M.history=this.history),(this.linked||(this.linked=[])).push({doc:M,sharedHist:e.sharedHist}),M.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Tl(M,Us(this)),M},unlinkDoc:function(e){if(e instanceof wn&&(e=e.doc),this.linked)for(var a=0;a<this.linked.length;++a){var P=this.linked[a];if(P.doc!=e)continue;this.linked.splice(a,1),e.unlinkDoc(this),Sl(Us(this));break}if(e.history==this.history){var M=[e.id];wa(e,function(G){return M.push(G.id)},!0),e.history=new Mo(null),e.history.done=Ga(this.history.done,M),e.history.undone=Ga(this.history.undone,M)}},iterLinkedDocs:function(e){wa(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):yt(e)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Nn(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(a){return a.order=null}),this.cm&&pl(this.cm)})}),Ri.prototype.eachLine=Ri.prototype.iter;var Bs=0;function Ol(e){var a=this;if(Hs(a),ue(a,e)||Bn(a.display,e))return;ve(e),T&&(Bs=+new Date);var P=Qn(a,e,!0),M=e.dataTransfer.files;if(!P||a.isReadOnly())return;if(M&&M.length&&window.FileReader&&window.File)for(var G=M.length,re=Array(G),se=0,de=function(){++se==G&&Pn(a,function(){P=Pt(a.doc,P);var Qe={from:P,to:P,text:a.doc.splitLines(re.filter(function(lt){return lt!=null}).join(a.doc.lineSeparator())),origin:"paste"};za(a.doc,Qe),Ss(a.doc,Zi(Pt(a.doc,P),Pt(a.doc,qi(Qe))))})()},ge=function(Qe,lt){if(a.options.allowDropFileTypes&&oe(a.options.allowDropFileTypes,Qe.type)==-1){de();return}var ft=new FileReader;ft.onerror=function(){return de()},ft.onload=function(){var bt=ft.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(bt)){de();return}re[lt]=bt,de()},ft.readAsText(Qe)},we=0;we<M.length;we++)ge(M[we],we);else{if(a.state.draggingText&&a.doc.sel.contains(P)>-1){a.state.draggingText(e),setTimeout(function(){return a.display.input.focus()},20);return}try{var Fe=e.dataTransfer.getData("Text");if(Fe){var He;if(a.state.draggingText&&!a.state.draggingText.copy&&(He=a.listSelections()),jo(a.doc,Zi(P,P)),He)for(var tt=0;tt<He.length;++tt)Va(a.doc,"",He[tt].anchor,He[tt].head,"drag");a.replaceSelection(Fe,"around","paste"),a.display.input.focus()}}catch(Qe){}}}function Al(e,a){if(T&&(!e.state.draggingText||+new Date-Bs<100)){Le(a);return}if(ue(e,a)||Bn(e.display,a))return;if(a.dataTransfer.setData("Text",e.getSelection()),a.dataTransfer.effectAllowed="copyMove",a.dataTransfer.setDragImage&&!i){var P=S("img",null,null,"position: fixed; left: 0; top: 0;");P.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",c&&(P.width=P.height=1,e.display.wrapper.appendChild(P),P._top=P.offsetTop),a.dataTransfer.setDragImage(P,0,0),c&&P.parentNode.removeChild(P)}}function Rl(e,a){var P=Qn(e,a);if(!P)return;var M=document.createDocumentFragment();na(e,P,M),e.display.dragCursor||(e.display.dragCursor=S("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),C(e.display.dragCursor,M)}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 a=document.getElementsByClassName("CodeMirror"),P=[],M=0;M<a.length;M++){var G=a[M].CodeMirror;G&&P.push(G)}P.length&&P[0].operation(function(){for(var re=0;re<P.length;re++)e(P[re])})}var Gs=!1;function Il(){if(Gs)return;Dl(),Gs=!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(va)})}function Ll(e){var a=e.display;a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.scrollbarsClipped=!1,e.setSize()}for(var Sa={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"},yo=0;yo<10;yo++)Sa[yo+48]=Sa[yo+96]=String(yo);for(var Bo=65;Bo<=90;Bo++)Sa[Bo]=String.fromCharCode(Bo);for(var bo=1;bo<=12;bo++)Sa[bo+111]=Sa[bo+63235]="F"+bo;var ma={};ma.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"},ma.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"},ma.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"},ma.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"]},ma.default=o?ma.macDefault:ma.pcDefault;function kl(e){var a=e.split(/-(?!$)/);e=a[a.length-1];for(var P,M,G,re,se=0;se<a.length-1;se++){var de=a[se];if(/^(cmd|meta|m)$/i.test(de))re=!0;else if(/^a(lt)?$/i.test(de))P=!0;else if(/^(c|ctrl|control)$/i.test(de))M=!0;else if(/^s(hift)?$/i.test(de))G=!0;else throw new Error("Unrecognized modifier name: "+de)}return P&&(e="Alt-"+e),M&&(e="Ctrl-"+e),re&&(e="Cmd-"+e),G&&(e="Shift-"+e),e}function Ml(e){var a={};for(var P in e)if(e.hasOwnProperty(P)){var M=e[P];if(/^(name|fallthrough|(de|at)tach)$/.test(P))continue;if(M=="..."){delete e[P];continue}for(var G=X(P.split(" "),kl),re=0;re<G.length;re++){var se=void 0,de=void 0;re==G.length-1?(de=G.join(" "),se=M):(de=G.slice(0,re+1).join(" "),se="...");var ge=a[de];if(!ge)a[de]=se;else if(ge!=se)throw new Error("Inconsistent bindings for "+de)}delete e[P]}for(var we in a)e[we]=a[we];return e}function Ya(e,a,P,M){a=Ho(a);var G=a.call?a.call(e,M):a[e];if(G===!1)return"nothing";if(G==="...")return"multi";if(G!=null&&P(G))return"handled";if(a.fallthrough){if(Object.prototype.toString.call(a.fallthrough)!="[object Array]")return Ya(e,a.fallthrough,P,M);for(var re=0;re<a.fallthrough.length;re++){var se=Ya(e,a.fallthrough[re],P,M);if(se)return se}}}function Ks(e){var a=typeof e=="string"?e:Sa[e.keyCode];return a=="Ctrl"||a=="Alt"||a=="Shift"||a=="Mod"}function zs(e,a,P){var M=e;return a.altKey&&M!="Alt"&&(e="Alt-"+e),(p?a.metaKey:a.ctrlKey)&&M!="Ctrl"&&(e="Ctrl-"+e),(p?a.ctrlKey:a.metaKey)&&M!="Mod"&&(e="Cmd-"+e),!P&&a.shiftKey&&M!="Shift"&&(e="Shift-"+e),e}function Vs(e,a){if(c&&e.keyCode==34&&e.char)return!1;var P=Sa[e.keyCode];return P==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(P=e.code),zs(P,e,a))}function Ho(e){return typeof e=="string"?ma[e]:e}function $a(e,a){for(var P=e.doc.sel.ranges,M=[],G=0;G<P.length;G++){for(var re=a(P[G]);M.length&&Lt(re.from,W(M).to)<=0;){var se=M.pop();if(Lt(se.from,re.from)<0){re.from=se.from;break}}M.push(re)}wi(e,function(){for(var de=M.length-1;de>=0;de--)Va(e.doc,"",M[de].from,M[de].to,"+delete");ya(e)})}function as(e,a,P){var M=Se(e.text,a+P,P);return M<0||M>e.text.length?null:M}function os(e,a,P){var M=as(e,a.ch,P);return M==null?null:new ut(a.line,M,P<0?"after":"before")}function ss(e,a,P,M,G){if(e){a.doc.direction=="rtl"&&(G=-G);var re=qe(P,a.doc.direction);if(re){var se=G<0?W(re):re[0],de=G<0==(se.level==1),ge=de?"after":"before",we;if(se.level>0||a.doc.direction=="rtl"){var Fe=Ke(a,P);we=G<0?P.text.length-1:0;var He=Je(a,Fe,we).top;we=Ue(function(tt){return Je(a,Fe,tt).top==He},G<0==(se.level==1)?se.from:se.to-1,we),ge=="before"&&(we=as(P,we,1))}else we=G<0?se.to:se.from;return new ut(M,we,ge)}}return new ut(M,G<0?P.text.length:0,G<0?"before":"after")}function Pl(e,a,P,M){var G=qe(a,e.doc.direction);if(!G)return os(a,P,M);P.ch>=a.text.length?(P.ch=a.text.length,P.sticky="before"):P.ch<=0&&(P.ch=0,P.sticky="after");var re=Ye(G,P.ch,P.sticky),se=G[re];if(e.doc.direction=="ltr"&&se.level%2==0&&(M>0?se.to>P.ch:se.from<P.ch))return os(a,P,M);var de=function(At,Nt){return as(a,At instanceof ut?At.ch:At,Nt)},ge,we=function(At){return e.options.lineWrapping?(ge=ge||Ke(e,a),Vt(e,a,ge,At)):{begin:0,end:a.text.length}},Fe=we(P.sticky=="before"?de(P,-1):P.ch);if(e.doc.direction=="rtl"||se.level==1){var He=se.level==1==M<0,tt=de(P,He?1:-1);if(tt!=null&&(He?tt<=se.to&&tt<=Fe.end:tt>=se.from&&tt>=Fe.begin)){var Qe=He?"before":"after";return new ut(P.line,tt,Qe)}}var lt=function(At,Nt,Rt){for(var Wt=function(un,oi){return oi?new ut(P.line,de(un,1),"before"):new ut(P.line,un,"after")};At>=0&&At<G.length;At+=Nt){var nr=G[At],Qt=Nt>0==(nr.level!=1),Tr=Qt?Rt.begin:de(Rt.end,-1);if(nr.from<=Tr&&Tr<nr.to)return Wt(Tr,Qt);if(Tr=Qt?nr.from:de(nr.to,-1),Rt.begin<=Tr&&Tr<Rt.end)return Wt(Tr,Qt)}},ft=lt(re+M,M,Fe);if(ft)return ft;var bt=M>0?Fe.end:de(Fe.begin,-1);return bt!=null&&!(M>0&&bt==a.text.length)&&(ft=lt(M>0?0:G.length-1,M,we(bt)),ft)?ft:null}var _o={selectAll:Is,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),_e)},killLine:function(e){return $a(e,function(a){if(a.empty()){var P=dt(e.doc,a.head.line).text.length;return a.head.ch==P&&a.head.line<e.lastLine()?{from:a.head,to:ut(a.head.line+1,0)}:{from:a.head,to:ut(a.head.line,P)}}else return{from:a.from(),to:a.to()}})},deleteLine:function(e){return $a(e,function(a){return{from:ut(a.from().line,0),to:Pt(e.doc,ut(a.to().line+1,0))}})},delLineLeft:function(e){return $a(e,function(a){return{from:ut(a.from().line,0),to:a.from()}})},delWrappedLineLeft:function(e){return $a(e,function(a){var P=e.charCoords(a.head,"div").top+5,M=e.coordsChar({left:0,top:P},"div");return{from:M,to:a.from()}})},delWrappedLineRight:function(e){return $a(e,function(a){var P=e.charCoords(a.head,"div").top+5,M=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:P},"div");return{from:a.from(),to:M}})},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(ut(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ut(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(a){return Xs(e,a.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(a){return Ys(e,a.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(a){return Nl(e,a.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(a){var P=e.cursorCoords(a.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:P},"div")},Re)},goLineLeft:function(e){return e.extendSelectionsBy(function(a){var P=e.cursorCoords(a.head,"div").top+5;return e.coordsChar({left:0,top:P},"div")},Re)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(a){var P=e.cursorCoords(a.head,"div").top+5,M=e.coordsChar({left:0,top:P},"div");return M.ch<e.getLine(M.line).search(/\S/)?Ys(e,a.head):M},Re)},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 a=[],P=e.listSelections(),M=e.options.tabSize,G=0;G<P.length;G++){var re=P[G].from(),se=K(e.getLine(re.line),re.ch,M);a.push(te(M-se%M))}e.replaceSelections(a)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return wi(e,function(){for(var a=e.listSelections(),P=[],M=0;M<a.length;M++){if(!a[M].empty())continue;var G=a[M].head,re=dt(e.doc,G.line).text;if(re){if(G.ch==re.length&&(G=new ut(G.line,G.ch-1)),G.ch>0)G=new ut(G.line,G.ch+1),e.replaceRange(re.charAt(G.ch-1)+re.charAt(G.ch-2),ut(G.line,G.ch-2),G,"+transpose");else if(G.line>e.doc.first){var se=dt(e.doc,G.line-1).text;se&&(G=new ut(G.line,1),e.replaceRange(re.charAt(0)+e.doc.lineSeparator()+se.charAt(se.length-1),ut(G.line-1,se.length-1),G,"+transpose"))}}P.push(new Kr(G,G))}e.setSelections(P)})},newlineAndIndent:function(e){return wi(e,function(){for(var a=e.listSelections(),P=a.length-1;P>=0;P--)e.replaceRange(e.doc.lineSeparator(),a[P].anchor,a[P].head,"+input");a=e.listSelections();for(var M=0;M<a.length;M++)e.indentLine(a[M].from().line,null,!0);ya(e)})},openLine:function(e){return e.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Xs(e,a){var P=dt(e.doc,a),M=Xn(P);return M!=P&&(a=xt(M)),ss(!0,e,M,a,1)}function Nl(e,a){var P=dt(e.doc,a),M=ji(P);return M!=P&&(a=xt(M)),ss(!0,e,P,a,-1)}function Ys(e,a){var P=Xs(e,a.line),M=dt(e.doc,P.line),G=qe(M,e.doc.direction);if(!G||G[0].level==0){var re=Math.max(P.ch,M.text.search(/\S/)),se=a.line==P.line&&a.ch<=re&&a.ch;return ut(P.line,se?0:re,P.sticky)}return P}function Wo(e,a,P){if(typeof a=="string"&&(a=_o[a],!a))return!1;e.display.input.ensurePolled();var M=e.display.shift,G=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),P&&(e.display.shift=!1),G=a(e)!=be}finally{e.display.shift=M,e.state.suppressEdits=!1}return G}function jl(e,a,P){for(var M=0;M<e.state.keyMaps.length;M++){var G=Ya(a,e.state.keyMaps[M],P,e);if(G)return G}return e.options.extraKeys&&Ya(a,e.options.extraKeys,P,e)||Ya(a,e.options.keyMap,P,e)}var Fl=new ee;function Eo(e,a,P,M){var G=e.state.keySeq;if(G){if(Ks(a))return"handled";if(/\'$/.test(a)?e.state.keySeq=null:Fl.set(50,function(){e.state.keySeq==G&&(e.state.keySeq=null,e.display.input.reset())}),$s(e,G+" "+a,P,M))return!0}return $s(e,a,P,M)}function $s(e,a,P,M){var G=jl(e,a,M);return G=="multi"&&(e.state.keySeq=a),G=="handled"&&gr(e,"keyHandled",e,a,P),(G=="handled"||G=="multi")&&(ve(P),Zn(e)),!!G}function Js(e,a){var P=Vs(a,!0);return P?a.shiftKey&&!e.state.keySeq?Eo(e,"Shift-"+P,a,function(M){return Wo(e,M,!0)})||Eo(e,P,a,function(M){if(typeof M=="string"?/^go[A-Z]/.test(M):M.motion)return Wo(e,M)}):Eo(e,P,a,function(M){return Wo(e,M)}):!1}function Ul(e,a,P){return Eo(e,"'"+P+"'",a,function(M){return Wo(e,M,!0)})}var ls=null;function Qs(e){var a=this;if(e.target&&e.target!=a.display.input.getField())return;if(a.curOp.focus=Y(),ue(a,e))return;T&&_<11&&e.keyCode==27&&(e.returnValue=!1);var P=e.keyCode;a.display.shift=P==16||e.shiftKey;var M=Js(a,e);c&&(ls=M?P:null,!M&&P==88&&!Ut&&(o?e.metaKey:e.ctrlKey)&&a.replaceSelection("",null,"cut")),w&&!o&&!M&&P==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),P==18&&!/\bCodeMirror-crosshair\b/.test(a.display.lineDiv.className)&&Bl(a)}function Bl(e){var a=e.display.lineDiv;z(a,"CodeMirror-crosshair");function P(M){(M.keyCode==18||!M.altKey)&&(y(a,"CodeMirror-crosshair"),nt(document,"keyup",P),nt(document,"mouseover",P))}Ie(document,"keyup",P),Ie(document,"mouseover",P)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),ue(this,e)}function el(e){var a=this;if(e.target&&e.target!=a.display.input.getField())return;if(Bn(a.display,e)||ue(a,e)||e.ctrlKey&&!e.altKey||o&&e.metaKey)return;var P=e.keyCode,M=e.charCode;if(c&&P==ls){ls=null,ve(e);return}if(c&&(!e.which||e.which<10)&&Js(a,e))return;var G=String.fromCharCode(M==null?P:M);if(G=="\b")return;if(Ul(a,e,G))return;a.display.input.onKeyPress(e)}var Hl=400,us=function(e,a,P){this.time=e,this.pos=a,this.button=P};us.prototype.compare=function(e,a,P){return this.time+Hl>e&&Lt(a,this.pos)==0&&P==this.button};var xo,wo;function Wl(e,a){var P=+new Date;return wo&&wo.compare(P,e,a)?(xo=wo=null,"triple"):xo&&xo.compare(P,e,a)?(wo=new us(P,e,a),xo=null,"double"):(xo=new us(P,e,a),wo=null,"single")}function tl(e){var a=this,P=a.display;if(ue(a,e)||P.activeTouch&&P.input.supportsTouch())return;if(P.input.ensurePolled(),P.shift=e.shiftKey,Bn(P,e)){t||(P.scroller.draggable=!1,setTimeout(function(){return P.scroller.draggable=!0},100));return}if(cs(a,e))return;var M=Qn(a,e),G=We(e),re=M?Wl(M,G):"single";if(window.focus(),G==1&&a.state.selectingText&&a.state.selectingText(e),M&&Gl(a,G,M,re,e))return;G==1?M?zl(a,M,re,e):Me(e)==P.scroller&&ve(e):G==2?(M&&No(a.doc,M),setTimeout(function(){return P.input.focus()},20)):G==3&&(I?a.display.input.onContextMenu(e):eo(a))}function Gl(e,a,P,M,G){var re="Click";return M=="double"?re="Double"+re:M=="triple"&&(re="Triple"+re),re=(a==1?"Left":a==2?"Middle":"Right")+re,Eo(e,zs(re,G),G,function(se){if(typeof se=="string"&&(se=_o[se]),!se)return!1;var de=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),de=se(e,P)!=be}finally{e.state.suppressEdits=!1}return de})}function Kl(e,a,P){var M=e.getOption("configureMouse"),G=M?M(e,a,P):{};if(G.unit==null){var re=s?P.shiftKey&&P.metaKey:P.altKey;G.unit=re?"rectangle":a=="single"?"char":a=="double"?"word":"line"}return(G.extend==null||e.doc.extend)&&(G.extend=e.doc.extend||P.shiftKey),G.addNew==null&&(G.addNew=o?P.metaKey:P.ctrlKey),G.moveOnDrag==null&&(G.moveOnDrag=!(o?P.altKey:P.ctrlKey)),G}function zl(e,a,P,M){T?setTimeout(U(So,e),0):e.curOp.focus=Y();var G=Kl(e,P,M),re=e.doc.sel,se;e.options.dragDrop&&rt&&!e.isReadOnly()&&P=="single"&&(se=re.contains(a))>-1&&(Lt((se=re.ranges[se]).from(),a)<0||a.xRel>0)&&(Lt(se.to(),a)>0||a.xRel<0)?Vl(e,M,a,G):Xl(e,M,a,G)}function Vl(e,a,P,M){var G=e.display,re=!1,se=Pn(e,function(we){t&&(G.scroller.draggable=!1),e.state.draggingText=!1,nt(G.wrapper.ownerDocument,"mouseup",se),nt(G.wrapper.ownerDocument,"mousemove",de),nt(G.scroller,"dragstart",ge),nt(G.scroller,"drop",se),re||(ve(we),M.addNew||No(e.doc,P,null,null,M.extend),t&&!i||T&&_==9?setTimeout(function(){G.wrapper.ownerDocument.body.focus({preventScroll:!0}),G.input.focus()},20):G.input.focus())}),de=function(we){re=re||Math.abs(a.clientX-we.clientX)+Math.abs(a.clientY-we.clientY)>=10},ge=function(){return re=!0};t&&(G.scroller.draggable=!0),e.state.draggingText=se,se.copy=!M.moveOnDrag,G.scroller.dragDrop&&G.scroller.dragDrop(),Ie(G.wrapper.ownerDocument,"mouseup",se),Ie(G.wrapper.ownerDocument,"mousemove",de),Ie(G.scroller,"dragstart",ge),Ie(G.scroller,"drop",se),eo(e),setTimeout(function(){return G.input.focus()},20)}function rl(e,a,P){if(P=="char")return new Kr(a,a);if(P=="word")return e.findWordAt(a);if(P=="line")return new Kr(ut(a.line,0),Pt(e.doc,ut(a.line+1,0)));var M=P(e,a);return new Kr(M.from,M.to)}function Xl(e,a,P,M){var G=e.display,re=e.doc;ve(a);var se,de,ge=re.sel,we=ge.ranges;if(M.addNew&&!M.extend?(de=re.sel.contains(P),de>-1?se=we[de]:se=new Kr(P,P)):(se=re.sel.primary(),de=re.sel.primIndex),M.unit=="rectangle")M.addNew||(se=new Kr(P,P)),P=Qn(e,a,!0,!0),de=-1;else{var Fe=rl(e,P,M.unit);M.extend?se=ns(se,Fe.anchor,Fe.head,M.extend):se=Fe}M.addNew?de==-1?(de=we.length,bi(re,Gi(e,we.concat([se]),de),{scroll:!1,origin:"*mouse"})):we.length>1&&we[de].empty()&&M.unit=="char"&&!M.extend?(bi(re,Gi(e,we.slice(0,de).concat(we.slice(de+1)),0),{scroll:!1,origin:"*mouse"}),ge=re.sel):is(re,de,se,fe):(de=0,bi(re,new Si([se],0),fe),ge=re.sel);var He=P;function tt(Rt){if(Lt(He,Rt)==0)return;if(He=Rt,M.unit=="rectangle"){for(var Wt=[],nr=e.options.tabSize,Qt=K(dt(re,P.line).text,P.ch,nr),Tr=K(dt(re,Rt.line).text,Rt.ch,nr),un=Math.min(Qt,Tr),oi=Math.max(Qt,Tr),Cn=Math.min(P.line,Rt.line),Ni=Math.min(e.lastLine(),Math.max(P.line,Rt.line));Cn<=Ni;Cn++){var Ii=dt(re,Cn).text,Hn=Ce(Ii,un,nr);un==oi?Wt.push(new Kr(ut(Cn,Hn),ut(Cn,Hn))):Ii.length>Hn&&Wt.push(new Kr(ut(Cn,Hn),ut(Cn,Ce(Ii,oi,nr))))}Wt.length||Wt.push(new Kr(P,P)),bi(re,Gi(e,ge.ranges.slice(0,de).concat(Wt),de),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Rt)}else{var Di=se,ci=rl(e,Rt,M.unit),ti=Di.anchor,Wn;Lt(ci.anchor,ti)>0?(Wn=ci.head,ti=cn(Di.from(),ci.anchor)):(Wn=ci.anchor,ti=On(Di.to(),ci.head));var Ln=ge.ranges.slice(0);Ln[de]=Yl(e,new Kr(Pt(re,ti),Wn)),bi(re,Gi(e,Ln,de),fe)}}var Qe=G.wrapper.getBoundingClientRect(),lt=0;function ft(Rt){var Wt=++lt,nr=Qn(e,Rt,!0,M.unit=="rectangle");if(!nr)return;if(Lt(nr,He)!=0){e.curOp.focus=Y(),tt(nr);var Qt=Pa(G,re);(nr.line>=Qt.to||nr.line<Qt.from)&&setTimeout(Pn(e,function(){lt==Wt&&ft(Rt)}),150)}else{var Tr=Rt.clientY<Qe.top?-20:Rt.clientY>Qe.bottom?20:0;Tr&&setTimeout(Pn(e,function(){if(lt!=Wt)return;G.scroller.scrollTop+=Tr,ft(Rt)}),50)}}function bt(Rt){e.state.selectingText=!1,lt=Infinity,Rt&&(ve(Rt),G.input.focus()),nt(G.wrapper.ownerDocument,"mousemove",At),nt(G.wrapper.ownerDocument,"mouseup",Nt),re.history.lastSelOrigin=null}var At=Pn(e,function(Rt){Rt.buttons===0||!We(Rt)?bt(Rt):ft(Rt)}),Nt=Pn(e,bt);e.state.selectingText=Nt,Ie(G.wrapper.ownerDocument,"mousemove",At),Ie(G.wrapper.ownerDocument,"mouseup",Nt)}function Yl(e,a){var P=a.anchor,M=a.head,G=dt(e.doc,P.line);if(Lt(P,M)==0&&P.sticky==M.sticky)return a;var re=qe(G);if(!re)return a;var se=Ye(re,P.ch,P.sticky),de=re[se];if(de.from!=P.ch&&de.to!=P.ch)return a;var ge=se+(de.from==P.ch==(de.level!=1)?0:1);if(ge==0||ge==re.length)return a;var we;if(M.line!=P.line)we=(M.line-P.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Fe=Ye(re,M.ch,M.sticky),He=Fe-se||(M.ch-P.ch)*(de.level==1?-1:1);Fe==ge-1||Fe==ge?we=He<0:we=He>0}var tt=re[ge+(we?-1:0)],Qe=we==(tt.level==1),lt=Qe?tt.from:tt.to,ft=Qe?"after":"before";return P.ch==lt&&P.sticky==ft?a:new Kr(new ut(P.line,lt,ft),M)}function nl(e,a,P,M){var G,re;if(a.touches)G=a.touches[0].clientX,re=a.touches[0].clientY;else try{G=a.clientX,re=a.clientY}catch(tt){return!1}if(G>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;M&&ve(a);var se=e.display,de=se.lineDiv.getBoundingClientRect();if(re>de.bottom||!me(e,P))return Ae(a);re-=de.top-se.viewOffset;for(var ge=0;ge<e.display.gutterSpecs.length;++ge){var we=se.gutters.childNodes[ge];if(we&&we.getBoundingClientRect().right>=G){var Fe=Kt(e.doc,re),He=e.display.gutterSpecs[ge];return ye(e,P,e,Fe,He.className,a),Ae(a)}}}function cs(e,a){return nl(e,a,"gutterClick",!0)}function il(e,a){if(Bn(e.display,a)||$l(e,a))return;if(ue(e,a,"contextmenu"))return;I||e.display.input.onContextMenu(a)}function $l(e,a){return me(e,"gutterContextMenu")?nl(e,a,"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-"),fr(e)}var Ja={toString:function(){return"CodeMirror.Init"}},ol={},Go={};function Jl(e){var a=e.optionHandlers;function P(M,G,re,se){e.defaults[M]=G,re&&(a[M]=se?function(de,ge,we){we!=Ja&&re(de,ge,we)}:re)}e.defineOption=P,e.Init=Ja,P("value","",function(M,G){return M.setValue(G)},!0),P("mode",null,function(M,G){M.doc.modeOption=G,pa(M)},!0),P("indentUnit",2,pa,!0),P("indentWithTabs",!1),P("smartIndent",!0),P("tabSize",4,function(M){co(M),fr(M),tn(M)},!0),P("lineSeparator",null,function(M,G){if(M.doc.lineSep=G,!G)return;var re=[],se=M.doc.first;M.doc.iter(function(ge){for(var we=0;;){var Fe=ge.text.indexOf(G,we);if(Fe==-1)break;we=Fe+G.length,re.push(ut(se,Fe))}se++});for(var de=re.length-1;de>=0;de--)Va(M.doc,G,re[de],ut(re[de].line,re[de].ch+G.length))}),P("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(M,G,re){M.state.specialChars=new RegExp(G.source+(G.test(" ")?"":"| "),"g"),re!=Ja&&M.refresh()}),P("specialCharPlaceholder",Lr,function(M){return M.refresh()},!0),P("electricChars",!0),P("inputStyle",u?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),P("spellcheck",!1,function(M,G){return M.getInputField().spellcheck=G},!0),P("autocorrect",!1,function(M,G){return M.getInputField().autocorrect=G},!0),P("autocapitalize",!1,function(M,G){return M.getInputField().autocapitalize=G},!0),P("rtlMoveVisually",!E),P("wholeLineUpdateBefore",!0),P("theme","default",function(M){al(M),Qi(M)},!0),P("keyMap","default",function(M,G,re){var se=Ho(G),de=re!=Ja&&Ho(re);de&&de.detach&&de.detach(M,se),se.attach&&se.attach(M,de||null)}),P("extraKeys",null),P("configureMouse",null),P("lineWrapping",!1,Zl,!0),P("gutters",[],function(M,G){M.display.gutterSpecs=Ti(G,M.options.lineNumbers),Qi(M)},!0),P("fixedGutter",!0,function(M,G){M.display.gutters.style.left=G?yi(M.display)+"px":"0",M.refresh()},!0),P("coverGutterNextToScrollbar",!1,function(M){return da(M)},!0),P("scrollbarStyle","native",function(M){Fa(M),da(M),M.display.scrollbars.setScrollTop(M.doc.scrollTop),M.display.scrollbars.setScrollLeft(M.doc.scrollLeft)},!0),P("lineNumbers",!1,function(M,G){M.display.gutterSpecs=Ti(M.options.gutters,G),Qi(M)},!0),P("firstLineNumber",1,Qi,!0),P("lineNumberFormatter",function(M){return M},Qi,!0),P("showCursorWhenSelecting",!1,Qr,!0),P("resetSelectionOnContextMenu",!0),P("lineWiseCopyCut",!0),P("pasteLinesPerSelection",!0),P("selectionsMayTouch",!1),P("readOnly",!1,function(M,G){G=="nocursor"&&(va(M),M.display.input.blur()),M.display.input.readOnlyChanged(G)}),P("screenReaderLabel",null,function(M,G){G=G===""?null:G,M.display.input.screenReaderLabelChanged(G)}),P("disableInput",!1,function(M,G){G||M.display.input.reset()},!0),P("dragDrop",!0,Ql),P("allowDropFileTypes",null),P("cursorBlinkRate",530),P("cursorScrollMargin",0),P("cursorHeight",1,Qr,!0),P("singleCursorHeightPerLine",!0,Qr,!0),P("workTime",100),P("workDelay",100),P("flattenSpans",!0,co,!0),P("addModeClass",!1,co,!0),P("pollInterval",100),P("undoDepth",200,function(M,G){return M.doc.history.undoDepth=G}),P("historyEventDelay",1250),P("viewportMargin",10,function(M){return M.refresh()},!0),P("maxHighlightLength",1e4,co,!0),P("moveInputWithCursor",!0,function(M,G){G||M.display.input.resetPosition()}),P("tabindex",null,function(M,G){return M.display.input.getField().tabIndex=G||""}),P("autofocus",null),P("direction","ltr",function(M,G){return M.doc.setDirection(G)},!0),P("phrases",null)}function Ql(e,a,P){var M=P&&P!=Ja;if(!a!=!M){var G=e.display.dragFunctions,re=a?Ie:nt;re(e.display.scroller,"dragstart",G.start),re(e.display.scroller,"dragenter",G.enter),re(e.display.scroller,"dragover",G.over),re(e.display.scroller,"dragleave",G.leave),re(e.display.scroller,"drop",G.drop)}}function Zl(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(y(e.display.wrapper,"CodeMirror-wrap"),Fi(e)),xi(e),tn(e),fr(e),setTimeout(function(){return da(e)},100)}function wn(e,a){var P=this;if(!(this instanceof wn))return new wn(e,a);this.options=a=a?L(a):{},L(ol,a,!1);var M=a.value;typeof M=="string"?M=new Ri(M,a.mode,null,a.lineSeparator,a.direction):a.mode&&(M.modeOption=a.mode),this.doc=M;var G=new wn.inputStyles[a.inputStyle](this),re=this.display=new Da(e,M,G,a);re.wrapper.CodeMirror=this,al(this),a.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fa(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ee,keySeq:null,specialChars:null},a.autofocus&&!u&&re.input.focus(),T&&_<11&&setTimeout(function(){return P.display.input.reset(!0)},20),ql(this),Il(),oa(this),this.curOp.forceUpdate=!0,vs(this,M),a.autofocus&&!u||this.hasFocus()?setTimeout(function(){P.hasFocus()&&!P.state.focused&&ia(P)},20):va(this);for(var se in Go)Go.hasOwnProperty(se)&&Go[se](this,a[se],Ja);qn(this),a.finishInit&&a.finishInit(this);for(var de=0;de<ds.length;++de)ds[de](this);ha(this),t&&a.lineWrapping&&getComputedStyle(re.lineDiv).textRendering=="optimizelegibility"&&(re.lineDiv.style.textRendering="auto")}wn.defaults=ol,wn.optionHandlers=Go;function ql(e){var a=e.display;Ie(a.scroller,"mousedown",Pn(e,tl)),T&&_<11?Ie(a.scroller,"dblclick",Pn(e,function(ge){if(ue(e,ge))return;var we=Qn(e,ge);if(!we||cs(e,ge)||Bn(e.display,ge))return;ve(ge);var Fe=e.findWordAt(we);No(e.doc,Fe.anchor,Fe.head)})):Ie(a.scroller,"dblclick",function(ge){return ue(e,ge)||ve(ge)}),Ie(a.scroller,"contextmenu",function(ge){return il(e,ge)}),Ie(a.input.getField(),"contextmenu",function(ge){a.scroller.contains(ge.target)||il(e,ge)});var P,M={end:0};function G(){a.activeTouch&&(P=setTimeout(function(){return a.activeTouch=null},1e3),M=a.activeTouch,M.end=+new Date)}function re(ge){if(ge.touches.length!=1)return!1;var we=ge.touches[0];return we.radiusX<=1&&we.radiusY<=1}function se(ge,we){if(we.left==null)return!0;var Fe=we.left-ge.left,He=we.top-ge.top;return Fe*Fe+He*He>20*20}Ie(a.scroller,"touchstart",function(ge){if(!ue(e,ge)&&!re(ge)&&!cs(e,ge)){a.input.ensurePolled(),clearTimeout(P);var we=+new Date;a.activeTouch={start:we,moved:!1,prev:we-M.end<=300?M:null},ge.touches.length==1&&(a.activeTouch.left=ge.touches[0].pageX,a.activeTouch.top=ge.touches[0].pageY)}}),Ie(a.scroller,"touchmove",function(){a.activeTouch&&(a.activeTouch.moved=!0)}),Ie(a.scroller,"touchend",function(ge){var we=a.activeTouch;if(we&&!Bn(a,ge)&&we.left!=null&&!we.moved&&new Date-we.start<300){var Fe=e.coordsChar(a.activeTouch,"page"),He;!we.prev||se(we,we.prev)?He=new Kr(Fe,Fe):!we.prev.prev||se(we,we.prev.prev)?He=e.findWordAt(Fe):He=new Kr(ut(Fe.line,0),Pt(e.doc,ut(Fe.line+1,0))),e.setSelection(He.anchor,He.head),e.focus(),ve(ge)}G()}),Ie(a.scroller,"touchcancel",G),Ie(a.scroller,"scroll",function(){a.scroller.clientHeight&&(_a(e,a.scroller.scrollTop),Hi(e,a.scroller.scrollLeft,!0),ye(e,"scroll",e))}),Ie(a.scroller,"mousewheel",function(ge){return lo(e,ge)}),Ie(a.scroller,"DOMMouseScroll",function(ge){return lo(e,ge)}),Ie(a.wrapper,"scroll",function(){return a.wrapper.scrollTop=a.wrapper.scrollLeft=0}),a.dragFunctions={enter:function(ge){ue(e,ge)||Le(ge)},over:function(ge){ue(e,ge)||(Rl(e,ge),Le(ge))},start:function(ge){return Al(e,ge)},drop:Pn(e,Ol),leave:function(ge){ue(e,ge)||Hs(e)}};var de=a.input.getField();Ie(de,"keyup",function(ge){return Zs.call(e,ge)}),Ie(de,"keydown",Pn(e,Qs)),Ie(de,"keypress",Pn(e,el)),Ie(de,"focus",function(ge){return ia(e,ge)}),Ie(de,"blur",function(ge){return va(e,ge)})}var ds=[];wn.defineInitHook=function(e){return ds.push(e)};function To(e,a,P,M){var G=e.doc,re;P==null&&(P="add"),P=="smart"&&(G.mode.indent?re=hn(e,a).state:P="prev");var se=e.options.tabSize,de=dt(G,a),ge=K(de.text,null,se);de.stateAfter&&(de.stateAfter=null);var we=de.text.match(/^\s*/)[0],Fe;if(!M&&!/\S/.test(de.text))Fe=0,P="not";else if(P=="smart"&&(Fe=G.mode.indent(re,de.text.slice(we.length),de.text),Fe==be||Fe>150)){if(!M)return;P="prev"}P=="prev"?a>G.first?Fe=K(dt(G,a-1).text,null,se):Fe=0:P=="add"?Fe=ge+e.options.indentUnit:P=="subtract"?Fe=ge-e.options.indentUnit:typeof P=="number"&&(Fe=ge+P),Fe=Math.max(0,Fe);var He="",tt=0;if(e.options.indentWithTabs)for(var Qe=Math.floor(Fe/se);Qe;--Qe)tt+=se,He+=" ";if(tt<Fe&&(He+=te(Fe-tt)),He!=we)return Va(G,He,ut(a,0),ut(a,we.length),"+input"),de.stateAfter=null,!0;for(var lt=0;lt<G.sel.ranges.length;lt++){var ft=G.sel.ranges[lt];if(ft.head.line==a&&ft.head.ch<we.length){var bt=ut(a,we.length);is(G,lt,new Kr(bt,bt));break}}}var ea=null;function Ko(e){ea=e}function hs(e,a,P,M,G){var re=e.doc;e.display.shift=!1,M||(M=re.sel);var se=+new Date-200,de=G=="paste"||e.state.pasteIncoming>se,ge=yt(a),we=null;if(de&&M.ranges.length>1)if(ea&&ea.text.join(`
|
|
|
`)==a){if(M.ranges.length%ea.text.length==0){we=[];for(var Fe=0;Fe<ea.text.length;Fe++)we.push(re.splitLines(ea.text[Fe]))}}else ge.length==M.ranges.length&&e.options.pasteLinesPerSelection&&(we=X(ge,function(At){return[At]}));for(var He=e.curOp.updateInput,tt=M.ranges.length-1;tt>=0;tt--){var Qe=M.ranges[tt],lt=Qe.from(),ft=Qe.to();Qe.empty()&&(P&&P>0?lt=ut(lt.line,lt.ch-P):e.state.overwrite&&!de?ft=ut(ft.line,Math.min(dt(re,ft.line).text.length,ft.ch+W(ge).length)):de&&ea&&ea.lineWise&&ea.text.join(`
|
|
|
`)==ge.join(`
|
|
|
`)&&(lt=ft=ut(lt.line,0)));var bt={from:lt,to:ft,text:we?we[tt%we.length]:ge,origin:G||(de?"paste":e.state.cutIncoming>se?"cut":"+input")};za(e.doc,bt),gr(e,"inputRead",e,bt)}a&&!de&&ll(e,a),ya(e),e.curOp.updateInput<2&&(e.curOp.updateInput=He),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,a){var P=e.clipboardData&&e.clipboardData.getData("Text");if(P)return e.preventDefault(),!a.isReadOnly()&&!a.options.disableInput&&wi(a,function(){return hs(a,P,0,null,"paste")}),!0}function ll(e,a){if(!e.options.electricChars||!e.options.smartIndent)return;for(var P=e.doc.sel,M=P.ranges.length-1;M>=0;M--){var G=P.ranges[M];if(G.head.ch>100||M&&P.ranges[M-1].head.line==G.head.line)continue;var re=e.getModeAt(G.head),se=!1;if(re.electricChars){for(var de=0;de<re.electricChars.length;de++)if(a.indexOf(re.electricChars.charAt(de))>-1){se=To(e,G.head.line,"smart");break}}else re.electricInput&&(re.electricInput.test(dt(e.doc,G.head.line).text.slice(0,G.head.ch))&&(se=To(e,G.head.line,"smart")));se&&gr(e,"electricInput",e,G.head.line)}}function ul(e){for(var a=[],P=[],M=0;M<e.doc.sel.ranges.length;M++){var G=e.doc.sel.ranges[M].head.line,re={anchor:ut(G,0),head:ut(G+1,0)};P.push(re),a.push(e.getRange(re.anchor,re.head))}return{text:a,ranges:P}}function cl(e,a,P,M){e.setAttribute("autocorrect",P?"":"off"),e.setAttribute("autocapitalize",M?"":"off"),e.setAttribute("spellcheck",!!a)}function dl(){var e=S("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),a=S("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return t?e.style.width="1000px":e.setAttribute("wrap","off"),f&&(e.style.border="1px solid black"),cl(e),a}function eu(e){var a=e.optionHandlers,P=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(M,G){var re=this.options,se=re[M];if(re[M]==G&&M!="mode")return;re[M]=G,a.hasOwnProperty(M)&&Pn(this,a[M])(this,G,se),ye(this,"optionChange",this,M)},getOption:function(M){return this.options[M]},getDoc:function(){return this.doc},addKeyMap:function(M,G){this.state.keyMaps[G?"push":"unshift"](Ho(M))},removeKeyMap:function(M){for(var G=this.state.keyMaps,re=0;re<G.length;++re)if(G[re]==M||G[re].name==M)return G.splice(re,1),!0},addOverlay:ui(function(M,G){var re=M.token?M:e.getMode(this.options,M);if(re.startState)throw new Error("Overlays may not be stateful.");V(this.state.overlays,{mode:re,modeSpec:M,opaque:G&&G.opaque,priority:G&&G.priority||0},function(se){return se.priority}),this.state.modeGen++,tn(this)}),removeOverlay:ui(function(M){for(var G=this.state.overlays,re=0;re<G.length;++re){var se=G[re].modeSpec;if(se==M||typeof M=="string"&&se.name==M){G.splice(re,1),this.state.modeGen++,tn(this);return}}}),indentLine:ui(function(M,G,re){typeof G!="string"&&typeof G!="number"&&(G==null?G=this.options.smartIndent?"smart":"prev":G=G?"add":"subtract"),Ar(this.doc,M)&&To(this,M,G,re)}),indentSelection:ui(function(M){for(var G=this.doc.sel.ranges,re=-1,se=0;se<G.length;se++){var de=G[se];if(de.empty())de.head.line>re&&(To(this,de.head.line,M,!0),re=de.head.line,se==this.doc.sel.primIndex&&ya(this));else{var ge=de.from(),we=de.to(),Fe=Math.max(re,ge.line);re=Math.min(this.lastLine(),we.line-(we.ch?0:1))+1;for(var He=Fe;He<re;++He)To(this,He,M);var tt=this.doc.sel.ranges;ge.ch==0&&G.length==tt.length&&tt[se].from().ch>0&&is(this.doc,se,new Kr(ge,tt[se].to()),_e)}}}),getTokenAt:function(M,G){return di(this,M,G)},getLineTokens:function(M,G){return di(this,ut(M),G,!0)},getTokenTypeAt:function(M){M=Pt(this.doc,M);var G=An(this,dt(this.doc,M.line)),re=0,se=(G.length-1)/2,de=M.ch,ge;if(de==0)ge=G[2];else for(;;){var we=re+se>>1;if((we?G[we*2-1]:0)>=de)se=we;else if(G[we*2+1]<de)re=we+1;else{ge=G[we*2+2];break}}var Fe=ge?ge.indexOf("overlay "):-1;return Fe<0?ge:Fe==0?null:ge.slice(0,Fe-1)},getModeAt:function(M){var G=this.doc.mode;return G.innerMode?e.innerMode(G,this.getTokenAt(M).state).mode:G},getHelper:function(M,G){return this.getHelpers(M,G)[0]},getHelpers:function(M,G){var re=[];if(!P.hasOwnProperty(G))return re;var se=P[G],de=this.getModeAt(M);if(typeof de[G]=="string")se[de[G]]&&re.push(se[de[G]]);else if(de[G])for(var ge=0;ge<de[G].length;ge++){var we=se[de[G][ge]];we&&re.push(we)}else de.helperType&&se[de.helperType]?re.push(se[de.helperType]):se[de.name]&&re.push(se[de.name]);for(var Fe=0;Fe<se._global.length;Fe++){var He=se._global[Fe];He.pred(de,this)&&oe(re,He.val)==-1&&re.push(He.val)}return re},getStateAfter:function(M,G){var re=this.doc;return M=zr(re,M==null?re.first+re.size-1:M),hn(this,M+1,G).state},cursorCoords:function(M,G){var re,se=this.doc.sel.primary();return M==null?re=se.head:typeof M=="object"?re=Pt(this.doc,M):re=M?se.from():se.to(),Cr(this,re,G||"page")},charCoords:function(M,G){return gn(this,Pt(this.doc,M),G||"page")},coordsChar:function(M,G){return M=Sr(this,M,G||"page"),Or(this,M.left,M.top)},lineAtHeight:function(M,G){return M=Sr(this,{top:M,left:0},G||"page").top,Kt(this.doc,M+this.display.viewOffset)},heightAtLine:function(M,G,re){var se=!1,de;if(typeof M=="number"){var ge=this.doc.first+this.doc.size-1;M<this.doc.first?M=this.doc.first:M>ge&&(M=ge,se=!0),de=dt(this.doc,M)}else de=M;return Pr(this,de,{top:0,left:0},G||"page",re||se).top+(se?this.doc.height-ni(de):0)},defaultTextHeight:function(){return Dn(this.display)},defaultCharWidth:function(){return Jn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(M,G,re,se,de){var ge=this.display;M=Cr(this,Pt(this.doc,M));var we=M.bottom,Fe=M.left;if(G.style.position="absolute",G.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(G),ge.sizer.appendChild(G),se=="over")we=M.top;else if(se=="above"||se=="near"){var He=Math.max(ge.wrapper.clientHeight,this.doc.height),tt=Math.max(ge.sizer.clientWidth,ge.lineSpace.clientWidth);(se=="above"||M.bottom+G.offsetHeight>He)&&M.top>G.offsetHeight?we=M.top-G.offsetHeight:M.bottom+G.offsetHeight<=He&&(we=M.bottom),Fe+G.offsetWidth>tt&&(Fe=tt-G.offsetWidth)}G.style.top=we+"px",G.style.left=G.style.right="",de=="right"?(Fe=ge.sizer.clientWidth-G.offsetWidth,G.style.right="0px"):(de=="left"?Fe=0:de=="middle"&&(Fe=(ge.sizer.clientWidth-G.offsetWidth)/2),G.style.left=Fe+"px"),re&&Co(this,{left:Fe,top:we,right:Fe+G.offsetWidth,bottom:we+G.offsetHeight})},triggerOnKeyDown:ui(Qs),triggerOnKeyPress:ui(el),triggerOnKeyUp:Zs,triggerOnMouseDown:ui(tl),execCommand:function(M){if(_o.hasOwnProperty(M))return _o[M].call(null,this)},triggerElectric:ui(function(M){ll(this,M)}),findPosH:function(M,G,re,se){var de=1;G<0&&(de=-1,G=-G);for(var ge=Pt(this.doc,M),we=0;we<G&&!(ge=fs(this.doc,ge,de,re,se),ge.hitSide);++we);return ge},moveH:ui(function(M,G){var re=this;this.extendSelectionsBy(function(se){return re.display.shift||re.doc.extend||se.empty()?fs(re.doc,se.head,M,G,re.options.rtlMoveVisually):M<0?se.from():se.to()},Re)}),deleteH:ui(function(M,G){var re=this.doc.sel,se=this.doc;re.somethingSelected()?se.replaceSelection("",null,"+delete"):$a(this,function(de){var ge=fs(se,de.head,M,G,!1);return M<0?{from:ge,to:de.head}:{from:de.head,to:ge}})}),findPosV:function(M,G,re,se){var de=1,ge=se;G<0&&(de=-1,G=-G);for(var we=Pt(this.doc,M),Fe=0;Fe<G;++Fe){var He=Cr(this,we,"div");if(ge==null?ge=He.left:He.left=ge,we=hl(this,He,de,re),we.hitSide)break}return we},moveV:ui(function(M,G){var re=this,se=this.doc,de=[],ge=!this.display.shift&&!se.extend&&se.sel.somethingSelected();if(se.extendSelectionsBy(function(Fe){if(ge)return M<0?Fe.from():Fe.to();var He=Cr(re,Fe.head,"div");Fe.goalColumn!=null&&(He.left=Fe.goalColumn),de.push(He.left);var tt=hl(re,He,M,G);return G=="page"&&Fe==se.sel.primary()&&no(re,gn(re,tt,"div").top-He.top),tt},Re),de.length)for(var we=0;we<se.sel.ranges.length;we++)se.sel.ranges[we].goalColumn=de[we]}),findWordAt:function(M){var G=this.doc,re=dt(G,M.line).text,se=M.ch,de=M.ch;if(re){var ge=this.getHelper(M,"wordChars");(M.sticky=="before"||de==re.length)&&se?--se:++de;for(var we=re.charAt(se),Fe=J(we,ge)?function(He){return J(He,ge)}:/\s/.test(we)?function(He){return/\s/.test(He)}:function(He){return!/\s/.test(He)&&!J(He)};se>0&&Fe(re.charAt(se-1));)--se;for(;de<re.length&&Fe(re.charAt(de));)++de}return new Kr(ut(M.line,se),ut(M.line,de))},toggleOverwrite:function(M){if(M!=null&&M==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?z(this.display.cursorDiv,"CodeMirror-overwrite"):y(this.display.cursorDiv,"CodeMirror-overwrite"),ye(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==Y()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ui(function(M,G){ba(this,M,G)}),getScrollInfo:function(){var M=this.display.scroller;return{left:M.scrollLeft,top:M.scrollTop,height:M.scrollHeight-Ve(this)-this.display.barHeight,width:M.scrollWidth-Ve(this)-this.display.barWidth,clientHeight:Ee(this),clientWidth:Ne(this)}},scrollIntoView:ui(function(M,G){M==null?(M={from:this.doc.sel.primary().head,to:null},G==null&&(G=this.options.cursorScrollMargin)):typeof M=="number"?M={from:ut(M,0),to:null}:M.from==null&&(M={from:M,to:null}),M.to||(M.to=M.from),M.margin=G||0,M.from.line!=null?$o(this,M):Oa(this,M.from,M.to,M.margin)}),setSize:ui(function(M,G){var re=this,se=function(ge){return typeof ge=="number"||/^\d+$/.test(String(ge))?ge+"px":ge};M!=null&&(this.display.wrapper.style.width=se(M)),G!=null&&(this.display.wrapper.style.height=se(G)),this.options.lineWrapping&&cr(this);var de=this.display.viewFrom;this.doc.iter(de,this.display.viewTo,function(ge){if(ge.widgets){for(var we=0;we<ge.widgets.length;we++)if(ge.widgets[we].noHScroll){xn(re,de,"widget");break}}++de}),this.curOp.forceUpdate=!0,ye(this,"refresh",this)}),operation:function(M){return wi(this,M)},startOperation:function(){return oa(this)},endOperation:function(){return ha(this)},refresh:ui(function(){var M=this.display.cachedTextHeight;tn(this),this.curOp.forceUpdate=!0,fr(this),ba(this,this.doc.scrollLeft,this.doc.scrollTop),Ba(this.display),(M==null||Math.abs(M-Dn(this.display))>.5||this.options.lineWrapping)&&xi(this),ye(this,"refresh",this)}),swapDoc:ui(function(M){var G=this.doc;return G.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,M),fr(this),this.display.input.reset(),ba(this,M.scrollLeft,M.scrollTop),this.curOp.forceScroll=!0,gr(this,"swapDoc",this,G),G}),phrase:function(M){var G=this.options.phrases;return G&&Object.prototype.hasOwnProperty.call(G,M)?G[M]:M},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}},Oe(e),e.registerHelper=function(M,G,re){P.hasOwnProperty(M)||(P[M]=e[M]={_global:[]}),P[M][G]=re},e.registerGlobalHelper=function(M,G,re,se){e.registerHelper(M,G,se),P[M]._global.push({pred:re,val:se})}}function fs(e,a,P,M,G){var re=a,se=P,de=dt(e,a.line),ge=G&&e.direction=="rtl"?-P:P;function we(){var Nt=a.line+ge;return Nt<e.first||Nt>=e.first+e.size?!1:(a=new ut(Nt,a.ch,a.sticky),de=dt(e,Nt))}function Fe(Nt){var Rt;if(M=="codepoint"){var Wt=de.text.charCodeAt(a.ch+(M>0?0:-1));isNaN(Wt)?Rt=null:Rt=new ut(a.line,Math.max(0,Math.min(de.text.length,a.ch+P*(Wt>=55296&&Wt<56320?2:1))),-P)}else G?Rt=Pl(e.cm,de,a,P):Rt=os(de,a,P);if(Rt==null)if(!Nt&&we())a=ss(G,e.cm,de,a.line,ge);else return!1;else a=Rt;return!0}if(M=="char"||M=="codepoint")Fe();else if(M=="column")Fe(!0);else if(M=="word"||M=="group")for(var He=null,tt=M=="group",Qe=e.cm&&e.cm.getHelper(a,"wordChars"),lt=!0;!(P<0&&!Fe(!lt));lt=!1){var ft=de.text.charAt(a.ch)||`
|
|
|
`,bt=J(ft,Qe)?"w":tt&&ft==`
|
|
|
`?"n":!tt||/\s/.test(ft)?null:"p";if(tt&&!lt&&!bt&&(bt="s"),He&&He!=bt){P<0&&(P=1,Fe(),a.sticky="after");break}if(bt&&(He=bt),P>0&&!Fe(!lt))break}var At=Fo(e,a,re,se,!0);return Hr(re,At)&&(At.hitSide=!0),At}function hl(e,a,P,M){var G=e.doc,re=a.left,se;if(M=="page"){var de=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ge=Math.max(de-.5*Dn(e.display),3);se=(P>0?a.bottom:a.top)+P*ge}else M=="line"&&(se=P>0?a.bottom+3:a.top-3);for(var we;!(we=Or(e,re,se),!we.outside);){if(P<0?se<=0:se>=G.height){we.hitSide=!0;break}se+=P*5}return we}var rn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ee,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};rn.prototype.init=function(e){var a=this,P=this,M=P.cm,G=P.div=e.lineDiv;cl(G,M.options.spellcheck,M.options.autocorrect,M.options.autocapitalize);function re(de){for(var ge=de.target;ge;ge=ge.parentNode){if(ge==G)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ge.className))break}return!1}Ie(G,"paste",function(de){if(!re(de)||ue(M,de)||sl(de,M))return;_<=11&&setTimeout(Pn(M,function(){return a.updateFromDOM()}),20)}),Ie(G,"compositionstart",function(de){a.composing={data:de.data,done:!1}}),Ie(G,"compositionupdate",function(de){a.composing||(a.composing={data:de.data,done:!1})}),Ie(G,"compositionend",function(de){a.composing&&(de.data!=a.composing.data&&a.readFromDOMSoon(),a.composing.done=!0)}),Ie(G,"touchstart",function(){return P.forceCompositionEnd()}),Ie(G,"input",function(){a.composing||a.readFromDOMSoon()});function se(de){if(!re(de)||ue(M,de))return;if(M.somethingSelected())Ko({lineWise:!1,text:M.getSelections()}),de.type=="cut"&&M.replaceSelection("",null,"cut");else if(M.options.lineWiseCopyCut){var ge=ul(M);Ko({lineWise:!0,text:ge.text}),de.type=="cut"&&M.operation(function(){M.setSelections(ge.ranges,0,_e),M.replaceSelection("",null,"cut")})}else return;if(de.clipboardData){de.clipboardData.clearData();var we=ea.text.join(`
|
|
|
`);if(de.clipboardData.setData("Text",we),de.clipboardData.getData("Text")==we){de.preventDefault();return}}var Fe=dl(),He=Fe.firstChild;M.display.lineSpace.insertBefore(Fe,M.display.lineSpace.firstChild),He.value=ea.text.join(`
|
|
|
`);var tt=document.activeElement;H(He),setTimeout(function(){M.display.lineSpace.removeChild(Fe),tt.focus(),tt==G&&P.showPrimarySelection()},50)}Ie(G,"copy",se),Ie(G,"cut",se)},rn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},rn.prototype.prepareSelection=function(){var e=Yi(this.cm,!1);return e.focus=document.activeElement==this.div,e},rn.prototype.showSelection=function(e,a){if(!e||!this.cm.display.view.length)return;(e.focus||a)&&this.showPrimarySelection(),this.showMultipleSelections(e)},rn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},rn.prototype.showPrimarySelection=function(){var e=this.getSelection(),a=this.cm,P=a.doc.sel.primary(),M=P.from(),G=P.to();if(a.display.viewTo==a.display.viewFrom||M.line>=a.display.viewTo||G.line<a.display.viewFrom){e.removeAllRanges();return}var re=zo(a,e.anchorNode,e.anchorOffset),se=zo(a,e.focusNode,e.focusOffset);if(re&&!re.bad&&se&&!se.bad&&Lt(cn(re,se),M)==0&&Lt(On(re,se),G)==0)return;var de=a.display.view,ge=M.line>=a.display.viewFrom&&fl(a,M)||{node:de[0].measure.map[2],offset:0},we=G.line<a.display.viewTo&&fl(a,G);if(!we){var Fe=de[de.length-1].measure,He=Fe.maps?Fe.maps[Fe.maps.length-1]:Fe.map;we={node:He[He.length-1],offset:He[He.length-2]-He[He.length-3]}}if(!ge||!we){e.removeAllRanges();return}var tt=e.rangeCount&&e.getRangeAt(0),Qe;try{Qe=j(ge.node,ge.offset,we.offset,we.node)}catch(lt){}Qe&&(!w&&a.state.focused?(e.collapse(ge.node,ge.offset),Qe.collapsed||(e.removeAllRanges(),e.addRange(Qe))):(e.removeAllRanges(),e.addRange(Qe)),tt&&e.anchorNode==null?e.addRange(tt):w&&this.startGracePeriod()),this.rememberSelection()},rn.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)},rn.prototype.showMultipleSelections=function(e){C(this.cm.display.cursorDiv,e.cursors),C(this.cm.display.selectionDiv,e.selection)},rn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},rn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var a=e.getRangeAt(0).commonAncestorContainer;return A(this.div,a)},rn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},rn.prototype.blur=function(){this.div.blur()},rn.prototype.getField=function(){return this.div},rn.prototype.supportsTouch=function(){return!0},rn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():wi(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function a(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,a))}this.polling.set(this.cm.options.pollInterval,a)},rn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},rn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),a=this.cm;if(d&&r&&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 P=zo(a,e.anchorNode,e.anchorOffset),M=zo(a,e.focusNode,e.focusOffset);P&&M&&wi(a,function(){bi(a.doc,Zi(P,M),_e),(P.bad||M.bad)&&(a.curOp.selectionChanged=!0)})},rn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,a=e.display,P=e.doc.sel.primary(),M=P.from(),G=P.to();if(M.ch==0&&M.line>e.firstLine()&&(M=ut(M.line-1,dt(e.doc,M.line-1).length)),G.ch==dt(e.doc,G.line).text.length&&G.line<e.lastLine()&&(G=ut(G.line+1,0)),M.line<a.viewFrom||G.line>a.viewTo-1)return!1;var re,se,de;M.line==a.viewFrom||(re=ln(e,M.line))==0?(se=xt(a.view[0].line),de=a.view[0].node):(se=xt(a.view[re].line),de=a.view[re-1].node.nextSibling);var ge=ln(e,G.line),we,Fe;if(ge==a.view.length-1?(we=a.viewTo-1,Fe=a.lineDiv.lastChild):(we=xt(a.view[ge+1].line)-1,Fe=a.view[ge+1].node.previousSibling),!de)return!1;for(var He=e.doc.splitLines(ru(e,de,Fe,se,we)),tt=Ht(e.doc,ut(se,0),ut(we,dt(e.doc,we).text.length));He.length>1&&tt.length>1;)if(W(He)==W(tt))He.pop(),tt.pop(),we--;else if(He[0]==tt[0])He.shift(),tt.shift(),se++;else break;for(var Qe=0,lt=0,ft=He[0],bt=tt[0],At=Math.min(ft.length,bt.length);Qe<At&&ft.charCodeAt(Qe)==bt.charCodeAt(Qe);)++Qe;for(var Nt=W(He),Rt=W(tt),Wt=Math.min(Nt.length-(He.length==1?Qe:0),Rt.length-(tt.length==1?Qe:0));lt<Wt&&Nt.charCodeAt(Nt.length-lt-1)==Rt.charCodeAt(Rt.length-lt-1);)++lt;if(He.length==1&&tt.length==1&&se==M.line)for(;Qe&&Qe>M.ch&&Nt.charCodeAt(Nt.length-lt-1)==Rt.charCodeAt(Rt.length-lt-1);)Qe--,lt++;He[He.length-1]=Nt.slice(0,Nt.length-lt).replace(/^\u200b+/,""),He[0]=He[0].slice(Qe).replace(/\u200b+$/,"");var nr=ut(se,Qe),Qt=ut(we,tt.length?W(tt).length-lt:0);if(He.length>1||He[0]||Lt(nr,Qt))return Va(e.doc,He,nr,Qt,"+input"),!0},rn.prototype.ensurePolled=function(){this.forceCompositionEnd()},rn.prototype.reset=function(){this.forceCompositionEnd()},rn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},rn.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},rn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&wi(this.cm,function(){return tn(e.cm)})},rn.prototype.setUneditable=function(e){e.contentEditable="false"},rn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Pn(this.cm,hs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},rn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},rn.prototype.onContextMenu=function(){},rn.prototype.resetPosition=function(){},rn.prototype.needsContentAttribute=!0;function fl(e,a){var P=ze(e,a.line);if(!P||P.hidden)return null;var M=dt(e.doc,a.line),G=Te(P,M,a.line),re=qe(M,e.doc.direction),se="left";if(re){var de=Ye(re,a.ch);se=de%2?"right":"left"}var ge=gt(G.map,a.ch,se);return ge.offset=ge.collapse=="right"?ge.end:ge.start,ge}function tu(e){for(var a=e;a;a=a.parentNode)if(/CodeMirror-gutter-wrapper/.test(a.className))return!0;return!1}function Qa(e,a){return a&&(e.bad=!0),e}function ru(e,a,P,M,G){var re="",se=!1,de=e.doc.lineSeparator(),ge=!1;function we(Qe){return function(lt){return lt.id==Qe}}function Fe(){se&&(re+=de,ge&&(re+=de),se=ge=!1)}function He(Qe){Qe&&(Fe(),re+=Qe)}function tt(Qe){if(Qe.nodeType==1){var lt=Qe.getAttribute("cm-text");if(lt){He(lt);return}var ft=Qe.getAttribute("cm-marker"),bt;if(ft){var At=e.findMarks(ut(M,0),ut(G+1,0),we(+ft));At.length&&(bt=At[0].find(0))&&He(Ht(e.doc,bt.from,bt.to).join(de));return}if(Qe.getAttribute("contenteditable")=="false")return;var Nt=/^(pre|div|p|li|table|br)$/i.test(Qe.nodeName);if(!/^br$/i.test(Qe.nodeName)&&Qe.textContent.length==0)return;Nt&&Fe();for(var Rt=0;Rt<Qe.childNodes.length;Rt++)tt(Qe.childNodes[Rt]);/^(pre|p)$/i.test(Qe.nodeName)&&(ge=!0),Nt&&(se=!0)}else Qe.nodeType==3&&He(Qe.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(tt(a),a==P);)a=a.nextSibling,ge=!1;return re}function zo(e,a,P){var M;if(a==e.display.lineDiv){if(M=e.display.lineDiv.childNodes[P],!M)return Qa(e.clipPos(ut(e.display.viewTo-1)),!0);a=null,P=0}else for(M=a;;M=M.parentNode){if(!M||M==e.display.lineDiv)return null;if(M.parentNode&&M.parentNode==e.display.lineDiv)break}for(var G=0;G<e.display.view.length;G++){var re=e.display.view[G];if(re.node==M)return nu(re,a,P)}}function nu(e,a,P){var M=e.text.firstChild,G=!1;if(!a||!A(M,a))return Qa(ut(xt(e.line),0),!0);if(a==M&&(G=!0,a=M.childNodes[P],P=0,!a)){var re=e.rest?W(e.rest):e.line;return Qa(ut(xt(re),re.text.length),G)}var se=a.nodeType==3?a:null,de=a;for(!se&&a.childNodes.length==1&&a.firstChild.nodeType==3&&(se=a.firstChild,P&&(P=se.nodeValue.length));de.parentNode!=M;)de=de.parentNode;var ge=e.measure,we=ge.maps;function Fe(bt,At,Nt){for(var Rt=-1;Rt<(we?we.length:0);Rt++)for(var Wt=Rt<0?ge.map:we[Rt],nr=0;nr<Wt.length;nr+=3){var Qt=Wt[nr+2];if(Qt==bt||Qt==At){var Tr=xt(Rt<0?e.line:e.rest[Rt]),un=Wt[nr]+Nt;return(Nt<0||Qt!=bt)&&(un=Wt[nr+(Nt?1:0)]),ut(Tr,un)}}}var He=Fe(se,de,P);if(He)return Qa(He,G);for(var tt=de.nextSibling,Qe=se?se.nodeValue.length-P:0;tt;tt=tt.nextSibling){if(He=Fe(tt,tt.firstChild,0),He)return Qa(ut(He.line,He.ch-Qe),G);Qe+=tt.textContent.length}for(var lt=de.previousSibling,ft=P;lt;lt=lt.previousSibling){if(He=Fe(lt,lt.firstChild,-1),He)return Qa(ut(He.line,He.ch+ft),G);ft+=lt.textContent.length}}var jn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ee,this.hasSelection=!1,this.composing=null};jn.prototype.init=function(e){var a=this,P=this,M=this.cm;this.createField(e);var G=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),f&&(G.style.width="0px"),Ie(G,"input",function(){T&&_>=9&&a.hasSelection&&(a.hasSelection=null),P.poll()}),Ie(G,"paste",function(se){if(ue(M,se)||sl(se,M))return;M.state.pasteIncoming=+new Date,P.fastPoll()});function re(se){if(ue(M,se))return;if(M.somethingSelected())Ko({lineWise:!1,text:M.getSelections()});else if(M.options.lineWiseCopyCut){var de=ul(M);Ko({lineWise:!0,text:de.text}),se.type=="cut"?M.setSelections(de.ranges,null,_e):(P.prevInput="",G.value=de.text.join(`
|
|
|
`),H(G))}else return;se.type=="cut"&&(M.state.cutIncoming=+new Date)}Ie(G,"cut",re),Ie(G,"copy",re),Ie(e.scroller,"paste",function(se){if(Bn(e,se)||ue(M,se))return;if(!G.dispatchEvent){M.state.pasteIncoming=+new Date,P.focus();return}var de=new Event("paste");de.clipboardData=se.clipboardData,G.dispatchEvent(de)}),Ie(e.lineSpace,"selectstart",function(se){Bn(e,se)||ve(se)}),Ie(G,"compositionstart",function(){var se=M.getCursor("from");P.composing&&P.composing.range.clear(),P.composing={start:se,range:M.markText(se,M.getCursor("to"),{className:"CodeMirror-composing"})}}),Ie(G,"compositionend",function(){P.composing&&(P.poll(),P.composing.range.clear(),P.composing=null)})},jn.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},jn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},jn.prototype.prepareSelection=function(){var e=this.cm,a=e.display,P=e.doc,M=Yi(e);if(e.options.moveInputWithCursor){var G=Cr(e,P.sel.primary().head,"div"),re=a.wrapper.getBoundingClientRect(),se=a.lineDiv.getBoundingClientRect();M.teTop=Math.max(0,Math.min(a.wrapper.clientHeight-10,G.top+se.top-re.top)),M.teLeft=Math.max(0,Math.min(a.wrapper.clientWidth-10,G.left+se.left-re.left))}return M},jn.prototype.showSelection=function(e){var a=this.cm,P=a.display;C(P.cursorDiv,e.cursors),C(P.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},jn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var a=this.cm;if(a.somethingSelected()){this.prevInput="";var P=a.getSelection();this.textarea.value=P,a.state.focused&&H(this.textarea),T&&_>=9&&(this.hasSelection=P)}else e||(this.prevInput=this.textarea.value="",T&&_>=9&&(this.hasSelection=null))},jn.prototype.getField=function(){return this.textarea},jn.prototype.supportsTouch=function(){return!1},jn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!u||Y()!=this.textarea))try{this.textarea.focus()}catch(e){}},jn.prototype.blur=function(){this.textarea.blur()},jn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},jn.prototype.receivedFocus=function(){this.slowPoll()},jn.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},jn.prototype.fastPoll=function(){var e=!1,a=this;a.pollingFast=!0;function P(){var M=a.poll();!M&&!e?(e=!0,a.polling.set(60,P)):(a.pollingFast=!1,a.slowPoll())}a.polling.set(20,P)},jn.prototype.poll=function(){var e=this,a=this.cm,P=this.textarea,M=this.prevInput;if(this.contextMenuPending||!a.state.focused||ht(P)&&!M&&!this.composing||a.isReadOnly()||a.options.disableInput||a.state.keySeq)return!1;var G=P.value;if(G==M&&!a.somethingSelected())return!1;if(T&&_>=9&&this.hasSelection===G||o&&/[\uf700-\uf7ff]/.test(G))return a.display.input.reset(),!1;if(a.doc.sel==a.display.selForContextMenu){var re=G.charCodeAt(0);if(re==8203&&!M&&(M="\u200B"),re==8666)return this.reset(),this.cm.execCommand("undo")}for(var se=0,de=Math.min(M.length,G.length);se<de&&M.charCodeAt(se)==G.charCodeAt(se);)++se;return wi(a,function(){hs(a,G.slice(se),M.length-se,null,e.composing?"*compose":null),G.length>1e3||G.indexOf(`
|
|
|
`)>-1?P.value=e.prevInput="":e.prevInput=G,e.composing&&(e.composing.range.clear(),e.composing.range=a.markText(e.composing.start,a.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},jn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},jn.prototype.onKeyPress=function(){T&&_>=9&&(this.hasSelection=null),this.fastPoll()},jn.prototype.onContextMenu=function(e){var a=this,P=a.cm,M=P.display,G=a.textarea;a.contextMenuPending&&a.contextMenuPending();var re=Qn(P,e),se=M.scroller.scrollTop;if(!re||c)return;var de=P.options.resetSelectionOnContextMenu;de&&P.doc.sel.contains(re)==-1&&Pn(P,bi)(P.doc,Zi(re),_e);var ge=G.style.cssText,we=a.wrapper.style.cssText,Fe=a.wrapper.offsetParent.getBoundingClientRect();a.wrapper.style.cssText="position: static",G.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(e.clientY-Fe.top-5)+"px; left: "+(e.clientX-Fe.left-5)+`px;
|
|
|
z-index: 1000; background: `+(T?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var He;t&&(He=window.scrollY),M.input.focus(),t&&window.scrollTo(null,He),M.input.reset(),P.somethingSelected()||(G.value=a.prevInput=" "),a.contextMenuPending=Qe,M.selForContextMenu=P.doc.sel,clearTimeout(M.detectingSelectAll);function tt(){if(G.selectionStart!=null){var ft=P.somethingSelected(),bt="\u200B"+(ft?G.value:"");G.value="\u21DA",G.value=bt,a.prevInput=ft?"":"\u200B",G.selectionStart=1,G.selectionEnd=bt.length,M.selForContextMenu=P.doc.sel}}function Qe(){if(a.contextMenuPending!=Qe)return;if(a.contextMenuPending=!1,a.wrapper.style.cssText=we,G.style.cssText=ge,T&&_<9&&M.scrollbars.setScrollTop(M.scroller.scrollTop=se),G.selectionStart!=null){(!T||T&&_<9)&&tt();var ft=0,bt=function(){M.selForContextMenu==P.doc.sel&&G.selectionStart==0&&G.selectionEnd>0&&a.prevInput=="\u200B"?Pn(P,Is)(P):ft++<10?M.detectingSelectAll=setTimeout(bt,500):(M.selForContextMenu=null,M.input.reset())};M.detectingSelectAll=setTimeout(bt,200)}}if(T&&_>=9&&tt(),I){Le(e);var lt=function(){nt(window,"mouseup",lt),setTimeout(Qe,20)};Ie(window,"mouseup",lt)}else setTimeout(Qe,50)},jn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},jn.prototype.setUneditable=function(){},jn.prototype.needsContentAttribute=!1;function iu(e,a){if(a=a?L(a):{},a.value=e.value,!a.tabindex&&e.tabIndex&&(a.tabindex=e.tabIndex),!a.placeholder&&e.placeholder&&(a.placeholder=e.placeholder),a.autofocus==null){var P=Y();a.autofocus=P==e||e.getAttribute("autofocus")!=null&&P==document.body}function M(){e.value=de.getValue()}var G;if(e.form&&(Ie(e.form,"submit",M),!a.leaveSubmitMethodAlone)){var re=e.form;G=re.submit;try{var se=re.submit=function(){M(),re.submit=G,re.submit(),re.submit=se}}catch(ge){}}a.finishInit=function(ge){ge.save=M,ge.getTextArea=function(){return e},ge.toTextArea=function(){ge.toTextArea=isNaN,M(),e.parentNode.removeChild(ge.getWrapperElement()),e.style.display="",e.form&&(nt(e.form,"submit",M),!a.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=G))}},e.style.display="none";var de=wn(function(ge){return e.parentNode.insertBefore(ge,e.nextSibling)},a);return de}function au(e){e.off=nt,e.on=Ie,e.wheelEventPixels=so,e.Doc=Ri,e.splitLines=yt,e.countColumn=K,e.findColumn=Ce,e.isWordChar=ne,e.Pass=be,e.signal=ye,e.Line=ii,e.changeEnd=qi,e.scrollbarModel=io,e.Pos=ut,e.cmpPos=Lt,e.modes=Zt,e.mimeModes=Mt,e.resolveMode=Dt,e.getMode=Tt,e.modeExtensions=_t,e.extendMode=Et,e.copyState=Bt,e.startState=pt,e.innerMode=Dr,e.commands=_o,e.keyMap=ma,e.keyName=Vs,e.isModifierKey=Ks,e.lookupKey=Ya,e.normalizeKeyMap=Ml,e.StringStream=St,e.SharedTextMarker=vo,e.TextMarker=Ta,e.LineWidget=go,e.e_preventDefault=ve,e.e_stopPropagation=xe,e.e_stop=Le,e.addClass=z,e.contains=A,e.rmClass=y,e.keyNames=Sa}Jl(wn),eu(wn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Vo in Ri.prototype)Ri.prototype.hasOwnProperty(Vo)&&oe(ou,Vo)<0&&(wn.prototype[Vo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ri.prototype[Vo]));return Oe(Ri),wn.inputStyles={textarea:jn,contenteditable:rn},wn.defineMode=function(e){!wn.defaults.mode&&e!="null"&&(wn.defaults.mode=e),wt.apply(this,arguments)},wn.defineMIME=$t,wn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),wn.defineMIME("text/plain","null"),wn.defineExtension=function(e,a){wn.prototype[e]=a},wn.defineDocExtension=function(e,a){Ri.prototype[e]=a},wn.fromTextArea=iu,au(wn),wn.version="5.58.2",wn})},WYAk:function(B,Q,D){(function(N,g){B.exports=Q=g(D("Ib8C"))})(this,function(N){(function(){var g=N,w=g.lib,k=w.Base,b=g.enc,m=b.Utf8,T=g.algo,_=T.HMAC=k.extend({init:function(t,h){t=this._hasher=new t.init,typeof h=="string"&&(h=m.parse(h));var r=t.blockSize,c=r*4;h.sigBytes>c&&(h=t.finalize(h)),h.clamp();for(var i=this._oKey=h.clone(),n=this._iKey=h.clone(),l=i.words,f=n.words,d=0;d<r;d++)l[d]^=1549556828,f[d]^=909522486;i.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 h=this._hasher,r=h.finalize(t);h.reset();var c=h.finalize(this._oKey.clone().concat(r));return c}})})()})},WaYH:function(B,Q,D){"use strict";var N=D("rePB"),g=D("Ff2n"),w=D("VTBJ"),k=D("1OyB"),b=D("vuIU"),m=D("JX7q"),T=D("Ji7U"),_=D("LK+K"),t=D("q1tI"),h=D("TSYQ"),r=D.n(h),c=D("sboe"),i=D("OZM5"),n=function(I){var R=I.prefixCls,y=I.level,x=I.isStart,C=I.isEnd;if(!y)return null;for(var S="".concat(R,"-indent-unit"),F=[],j=0;j<y;j+=1){var A;F.push(t.createElement("span",{key:j,className:r()(S,(A={},Object(N.a)(A,"".concat(S,"-start"),x[j+1]),Object(N.a)(A,"".concat(S,"-end"),C[j+1]),Object(N.a)(A,"".concat(S,"-end-first-level"),!j&&C[0]),A))}))}return t.createElement("span",{"aria-hidden":"true",className:"".concat(R,"-indent")},F)},l=n,f=D("815F"),d="open",u="close",o="---",s=function(p){Object(T.a)(R,p);var I=Object(_.a)(R);function R(){var y;return Object(k.a)(this,R),y=I.apply(this,arguments),y.state={dragNodeHighlight:!1},y.onSelectorClick=function(x){var C=y.props.context.onNodeClick;C(x,Object(f.b)(y.props)),y.isSelectable()?y.onSelect(x):y.onCheck(x)},y.onSelectorDoubleClick=function(x){var C=y.props.context.onNodeDoubleClick;C(x,Object(f.b)(y.props))},y.onSelect=function(x){if(y.isDisabled())return;var C=y.props.context.onNodeSelect;x.preventDefault(),C(x,Object(f.b)(y.props))},y.onCheck=function(x){if(y.isDisabled())return;var C=y.props,S=C.disableCheckbox,F=C.checked,j=y.props.context.onNodeCheck;if(!y.isCheckable()||S)return;x.preventDefault();var A=!F;j(x,Object(f.b)(y.props),A)},y.onMouseEnter=function(x){var C=y.props.context.onNodeMouseEnter;C(x,Object(f.b)(y.props))},y.onMouseLeave=function(x){var C=y.props.context.onNodeMouseLeave;C(x,Object(f.b)(y.props))},y.onContextMenu=function(x){var C=y.props.context.onNodeContextMenu;C(x,Object(f.b)(y.props))},y.onDragStart=function(x){var C=y.props.context.onNodeDragStart;x.stopPropagation(),y.setState({dragNodeHighlight:!0}),C(x,Object(m.a)(y));try{x.dataTransfer.setData("text/plain","")}catch(S){}},y.onDragEnter=function(x){var C=y.props.context.onNodeDragEnter;x.preventDefault(),x.stopPropagation(),C(x,Object(m.a)(y))},y.onDragOver=function(x){var C=y.props.context.onNodeDragOver;x.preventDefault(),x.stopPropagation(),C(x,Object(m.a)(y))},y.onDragLeave=function(x){var C=y.props.context.onNodeDragLeave;x.stopPropagation(),C(x,Object(m.a)(y))},y.onDragEnd=function(x){var C=y.props.context.onNodeDragEnd;x.stopPropagation(),y.setState({dragNodeHighlight:!1}),C(x,Object(m.a)(y))},y.onDrop=function(x){var C=y.props.context.onNodeDrop;x.preventDefault(),x.stopPropagation(),y.setState({dragNodeHighlight:!1}),C(x,Object(m.a)(y))},y.onExpand=function(x){var C=y.props.context.onNodeExpand;C(x,Object(f.b)(y.props))},y.setSelectHandle=function(x){y.selectHandle=x},y.getNodeState=function(){var x=y.props.expanded;return y.isLeaf()?null:x?d:u},y.hasChildren=function(){var x=y.props.eventKey,C=y.props.context.keyEntities,S=C[x]||{},F=S.children;return!!(F||[]).length},y.isLeaf=function(){var x=y.props,C=x.isLeaf,S=x.loaded,F=y.props.context.loadData,j=y.hasChildren();return C===!1?!1:C||!F&&!j||F&&S&&!j},y.isDisabled=function(){var x=y.props.disabled,C=y.props.context.disabled;return!!(C||x)},y.isCheckable=function(){var x=y.props.checkable,C=y.props.context.checkable;return!C||x===!1?!1:C},y.syncLoadData=function(x){var C=x.expanded,S=x.loading,F=x.loaded,j=y.props.context,A=j.loadData,Y=j.onNodeLoad;if(S)return;A&&C&&!y.isLeaf()&&(!y.hasChildren()&&!F&&Y(Object(f.b)(y.props)))},y.renderSwitcher=function(){var x=y.props,C=x.expanded,S=x.switcherIcon,F=y.props.context,j=F.prefixCls,A=F.switcherIcon,Y=S||A;if(y.isLeaf())return t.createElement("span",{className:r()("".concat(j,"-switcher"),"".concat(j,"-switcher-noop"))},typeof Y=="function"?Y(Object(w.a)(Object(w.a)({},y.props),{},{isLeaf:!0})):Y);var z=r()("".concat(j,"-switcher"),"".concat(j,"-switcher_").concat(C?d:u));return t.createElement("span",{onClick:y.onExpand,className:z},typeof Y=="function"?Y(Object(w.a)(Object(w.a)({},y.props),{},{isLeaf:!1})):Y)},y.renderCheckbox=function(){var x=y.props,C=x.checked,S=x.halfChecked,F=x.disableCheckbox,j=y.props.context.prefixCls,A=y.isDisabled(),Y=y.isCheckable();if(!Y)return null;var z=typeof Y!="boolean"?Y:null;return t.createElement("span",{className:r()("".concat(j,"-checkbox"),C&&"".concat(j,"-checkbox-checked"),!C&&S&&"".concat(j,"-checkbox-indeterminate"),(A||F)&&"".concat(j,"-checkbox-disabled")),onClick:y.onCheck},z)},y.renderIcon=function(){var x=y.props.loading,C=y.props.context.prefixCls;return t.createElement("span",{className:r()("".concat(C,"-iconEle"),"".concat(C,"-icon__").concat(y.getNodeState()||"docu"),x&&"".concat(C,"-icon_loading"))})},y.renderSelector=function(){var x=y.state.dragNodeHighlight,C=y.props,S=C.title,F=C.selected,j=C.icon,A=C.loading,Y=C.data,z=y.props.context,O=z.prefixCls,H=z.showIcon,U=z.icon,L=z.draggable,K=z.loadData,ee=z.titleRender,oe=y.isDisabled(),ae="".concat(O,"-node-content-wrapper"),be;if(H){var _e=j||U;be=_e?t.createElement("span",{className:r()("".concat(O,"-iconEle"),"".concat(O,"-icon__customize"))},typeof _e=="function"?_e(y.props):_e):y.renderIcon()}else K&&A&&(be=y.renderIcon());var fe;typeof S=="function"?fe=S(Y):ee?fe=ee(Y):fe=S;var Re=t.createElement("span",{className:"".concat(O,"-title")},fe);return t.createElement("span",{ref:y.setSelectHandle,title:typeof S=="string"?S:"",className:r()("".concat(ae),"".concat(ae,"-").concat(y.getNodeState()||"normal"),!oe&&(F||x)&&"".concat(O,"-node-selected"),!oe&&L&&"draggable"),draggable:!oe&&L||void 0,"aria-grabbed":!oe&&L||void 0,onMouseEnter:y.onMouseEnter,onMouseLeave:y.onMouseLeave,onContextMenu:y.onContextMenu,onClick:y.onSelectorClick,onDoubleClick:y.onSelectorDoubleClick,onDragStart:L?y.onDragStart:void 0},be,Re)},y}return Object(b.a)(R,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var x=this.props.selectable,C=this.props.context.selectable;return typeof x=="boolean"?x:C}},{key:"render",value:function(){var x,C=this.props,S=C.eventKey,F=C.className,j=C.style,A=C.dragOver,Y=C.dragOverGapTop,z=C.dragOverGapBottom,O=C.isLeaf,H=C.isStart,U=C.isEnd,L=C.expanded,K=C.selected,ee=C.checked,oe=C.halfChecked,ae=C.loading,be=C.domRef,_e=C.active,fe=C.onMouseMove,Re=Object(g.a)(C,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Ce=this.props.context,ce=Ce.prefixCls,te=Ce.filterTreeNode,W=Ce.draggable,X=Ce.keyEntities,V=this.isDisabled(),Z=Object(i.f)(Re),q=X[S]||{},ie=q.level,ne=U[U.length-1];return t.createElement("div",Object.assign({ref:be,className:r()(F,"".concat(ce,"-treenode"),(x={},Object(N.a)(x,"".concat(ce,"-treenode-disabled"),V),Object(N.a)(x,"".concat(ce,"-treenode-switcher-").concat(L?"open":"close"),!O),Object(N.a)(x,"".concat(ce,"-treenode-checkbox-checked"),ee),Object(N.a)(x,"".concat(ce,"-treenode-checkbox-indeterminate"),oe),Object(N.a)(x,"".concat(ce,"-treenode-selected"),K),Object(N.a)(x,"".concat(ce,"-treenode-loading"),ae),Object(N.a)(x,"".concat(ce,"-treenode-active"),_e),Object(N.a)(x,"".concat(ce,"-treenode-leaf-last"),ne),Object(N.a)(x,"drag-over",!V&&A),Object(N.a)(x,"drag-over-gap-top",!V&&Y),Object(N.a)(x,"drag-over-gap-bottom",!V&&z),Object(N.a)(x,"filter-node",te&&te(Object(f.b)(this.props))),x)),style:j,onDragEnter:W?this.onDragEnter:void 0,onDragOver:W?this.onDragOver:void 0,onDragLeave:W?this.onDragLeave:void 0,onDrop:W?this.onDrop:void 0,onDragEnd:W?this.onDragEnd:void 0,onMouseMove:fe},Z),t.createElement(l,{prefixCls:ce,level:ie,isStart:H,isEnd:U}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),R}(t.Component),E=function(I){return t.createElement(c.a.Consumer,null,function(R){return t.createElement(s,Object.assign({},I,{context:R}))})};E.displayName="TreeNode",E.defaultProps={title:o},E.isTreeNode=1;var v=Q.a=E},XIdC:function(B,Q,D){"use strict";var N=D("rePB"),g=D("ODXe"),w=D("Ff2n"),k=D("q1tI"),b=D.n(k),m=D("TSYQ"),T=D.n(m),_=D("6cGi"),t=D("4IlW"),h=k.forwardRef(function(r,c){var i,n=r.prefixCls,l=n===void 0?"rc-switch":n,f=r.className,d=r.checked,u=r.defaultChecked,o=r.disabled,s=r.loadingIcon,E=r.checkedChildren,v=r.unCheckedChildren,p=r.onClick,I=r.onChange,R=r.onKeyDown,y=Object(w.a)(r,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),x=Object(_.a)(!1,{value:d,defaultValue:u}),C=Object(g.a)(x,2),S=C[0],F=C[1];function j(O,H){var U=S;return o||(U=O,F(U),I==null||I(U,H)),U}function A(O){O.which===t.a.LEFT?j(!1,O):O.which===t.a.RIGHT&&j(!0,O),R==null||R(O)}function Y(O){var H=j(!S,O);p==null||p(H,O)}var z=T()(l,f,(i={},Object(N.a)(i,"".concat(l,"-checked"),S),Object(N.a)(i,"".concat(l,"-disabled"),o),i));return k.createElement("button",Object.assign({},y,{type:"button",role:"switch","aria-checked":S,disabled:o,className:z,ref:c,onKeyDown:A,onClick:Y}),s,k.createElement("span",{className:"".concat(l,"-inner")},S?E:v))});h.displayName="Switch",Q.a=h},Y1PL:function(B,Q,D){"use strict";D.r(Q),D.d(Q,"ResizableTextArea",function(){return oe});var N=D("wx14"),g=D("1OyB"),w=D("vuIU"),k=D("Ji7U"),b=D("LK+K"),m=D("q1tI"),T=D("VTBJ"),_=D("rePB"),t=D("Zm9Q"),h=D("Kwbf"),r=D("c+Xe"),c=D("m+aA"),i=D("bdgK"),n=new Map;function l(_e){_e.forEach(function(fe){var Re,Ce=fe.target;(Re=n.get(Ce))===null||Re===void 0||Re.forEach(function(ce){return ce(Ce)})})}var f=new i.default(l),d=null,u=null;function o(_e,fe){n.has(_e)||(n.set(_e,new Set),f.observe(_e)),n.get(_e).add(fe)}function s(_e,fe){n.has(_e)&&(n.get(_e).delete(fe),n.get(_e).size||(f.unobserve(_e),n.delete(_e)))}var E=function(_e){Object(k.a)(Re,_e);var fe=Object(b.a)(Re);function Re(){return Object(g.a)(this,Re),fe.apply(this,arguments)}return Object(w.a)(Re,[{key:"render",value:function(){return this.props.children}}]),Re}(m.Component),v=m.createContext(null);function p(_e){var fe=_e.children,Re=_e.onBatchResize,Ce=m.useRef(0),ce=m.useRef([]),te=m.useContext(v),W=m.useCallback(function(X,V,Z){Ce.current+=1;var q=Ce.current;ce.current.push({size:X,element:V,data:Z}),Promise.resolve().then(function(){q===Ce.current&&(Re==null||Re(ce.current),ce.current=[])}),te==null||te(X,V,Z)},[Re,te]);return m.createElement(v.Provider,{value:W},fe)}function I(_e){var fe=_e.children,Re=_e.disabled,Ce=m.useRef(null),ce=m.useRef(null),te=m.useContext(v),W=m.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),X=m.isValidElement(fe)&&Object(r.c)(fe),V=X?fe.ref:null,Z=m.useMemo(function(){return Object(r.a)(V,Ce)},[V,Ce]),q=m.useRef(_e);q.current=_e;var ie=m.useCallback(function(ne){var J=q.current,$=J.onResize,le=J.data,he=ne.getBoundingClientRect(),Se=he.width,Ue=he.height,Xe=ne.offsetWidth,$e=ne.offsetHeight,Ye=Math.floor(Se),et=Math.floor(Ue);if(W.current.width!==Ye||W.current.height!==et||W.current.offsetWidth!==Xe||W.current.offsetHeight!==$e){var qe={width:Ye,height:et,offsetWidth:Xe,offsetHeight:$e};W.current=qe;var Pe=Xe===Math.round(Se)?Se:Xe,Ie=$e===Math.round(Ue)?Ue:$e,Ze=Object(T.a)(Object(T.a)({},qe),{},{offsetWidth:Pe,offsetHeight:Ie});te==null||te(Ze,ne,le),$&&Promise.resolve().then(function(){$(Ze,ne)})}},[]);return m.useEffect(function(){var ne=Object(c.a)(Ce.current)||Object(c.a)(ce.current);return ne&&!Re&&o(ne,ie),function(){return s(ne,ie)}},[Ce.current,Re]),m.createElement(E,{ref:ce},X?m.cloneElement(fe,{ref:Z}):fe)}var R="rc-observer-key";function y(_e){var fe=_e.children,Re=Object(t.a)(fe);return Re.map(function(Ce,ce){var te=(Ce==null?void 0:Ce.key)||"".concat(R,"-").concat(ce);return m.createElement(I,Object(N.a)({},_e,{key:te}),Ce)})}y.Collection=p;var x=y,C=D("bT9E"),S=D("TSYQ"),F=D.n(S),j=`
|
|
|
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
|
|
|
`,A=["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={},z;function O(_e){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Re=_e.getAttribute("id")||_e.getAttribute("data-reactid")||_e.getAttribute("name");if(fe&&Y[Re])return Y[Re];var Ce=window.getComputedStyle(_e),ce=Ce.getPropertyValue("box-sizing")||Ce.getPropertyValue("-moz-box-sizing")||Ce.getPropertyValue("-webkit-box-sizing"),te=parseFloat(Ce.getPropertyValue("padding-bottom"))+parseFloat(Ce.getPropertyValue("padding-top")),W=parseFloat(Ce.getPropertyValue("border-bottom-width"))+parseFloat(Ce.getPropertyValue("border-top-width")),X=A.map(function(Z){return"".concat(Z,":").concat(Ce.getPropertyValue(Z))}).join(";"),V={sizingStyle:X,paddingSize:te,borderSize:W,boxSizing:ce};return fe&&Re&&(Y[Re]=V),V}function H(_e){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ce=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;z||(z=document.createElement("textarea"),z.setAttribute("tab-index","-1"),z.setAttribute("aria-hidden","true"),document.body.appendChild(z)),_e.getAttribute("wrap")?z.setAttribute("wrap",_e.getAttribute("wrap")):z.removeAttribute("wrap");var ce=O(_e,fe),te=ce.paddingSize,W=ce.borderSize,X=ce.boxSizing,V=ce.sizingStyle;z.setAttribute("style","".concat(V,";").concat(j)),z.value=_e.value||_e.placeholder||"";var Z=Number.MIN_SAFE_INTEGER,q=Number.MAX_SAFE_INTEGER,ie=z.scrollHeight,ne;if(X==="border-box"?ie+=W:X==="content-box"&&(ie-=te),Re!==null||Ce!==null){z.value=" ";var J=z.scrollHeight-te;Re!==null&&(Z=J*Re,X==="border-box"&&(Z=Z+te+W),ie=Math.max(Z,ie)),Ce!==null&&(q=J*Ce,X==="border-box"&&(q=q+te+W),ne=ie>q?"":"hidden",ie=Math.min(q,ie))}return{height:ie,minHeight:Z,maxHeight:q,overflowY:ne,resize:"none"}}var U=D("Gytx"),L=D.n(U),K;(function(_e){_e[_e.NONE=0]="NONE",_e[_e.RESIZING=1]="RESIZING",_e[_e.RESIZED=2]="RESIZED"})(K||(K={}));var ee=function(_e){Object(k.a)(Re,_e);var fe=Object(b.a)(Re);function Re(Ce){var ce;return Object(g.a)(this,Re),ce=fe.call(this,Ce),ce.nextFrameActionId=void 0,ce.resizeFrameId=void 0,ce.textArea=void 0,ce.saveTextArea=function(te){ce.textArea=te},ce.handleResize=function(te){var W=ce.state.resizeStatus,X=ce.props,V=X.autoSize,Z=X.onResize;if(W!==K.NONE)return;typeof Z=="function"&&Z(te),V&&ce.resizeOnNextFrame()},ce.resizeOnNextFrame=function(){cancelAnimationFrame(ce.nextFrameActionId),ce.nextFrameActionId=requestAnimationFrame(ce.resizeTextarea)},ce.resizeTextarea=function(){var te=ce.props.autoSize;if(!te||!ce.textArea)return;var W=te.minRows,X=te.maxRows,V=H(ce.textArea,!1,W,X);ce.setState({textareaStyles:V,resizeStatus:K.RESIZING},function(){cancelAnimationFrame(ce.resizeFrameId),ce.resizeFrameId=requestAnimationFrame(function(){ce.setState({resizeStatus:K.RESIZED},function(){ce.resizeFrameId=requestAnimationFrame(function(){ce.setState({resizeStatus:K.NONE}),ce.fixFirefoxAutoScroll()})})})})},ce.renderTextArea=function(){var te=ce.props,W=te.prefixCls,X=W===void 0?"rc-textarea":W,V=te.autoSize,Z=te.onResize,q=te.className,ie=te.disabled,ne=ce.state,J=ne.textareaStyles,$=ne.resizeStatus,le=Object(C.a)(ce.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),he=F()(X,q,Object(_.a)({},"".concat(X,"-disabled"),ie));"value"in le&&(le.value=le.value||"");var Se=Object(T.a)(Object(T.a)(Object(T.a)({},ce.props.style),J),$===K.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return m.createElement(x,{onResize:ce.handleResize,disabled:!(V||Z)},m.createElement("textarea",Object(N.a)({},le,{className:he,style:Se,ref:ce.saveTextArea})))},ce.state={textareaStyles:{},resizeStatus:K.NONE},ce}return Object(w.a)(Re,[{key:"componentDidUpdate",value:function(ce){(ce.value!==this.props.value||!L()(ce.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 ce=this.textArea.selectionStart,te=this.textArea.selectionEnd;this.textArea.setSelectionRange(ce,te)}}catch(W){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Re}(m.Component),oe=ee,ae=function(_e){Object(k.a)(Re,_e);var fe=Object(b.a)(Re);function Re(Ce){var ce;Object(g.a)(this,Re),ce=fe.call(this,Ce),ce.resizableTextArea=void 0,ce.focus=function(){ce.resizableTextArea.textArea.focus()},ce.saveTextArea=function(W){ce.resizableTextArea=W},ce.handleChange=function(W){var X=ce.props.onChange;ce.setValue(W.target.value,function(){ce.resizableTextArea.resizeTextarea()}),X&&X(W)},ce.handleKeyDown=function(W){var X=ce.props,V=X.onPressEnter,Z=X.onKeyDown;W.keyCode===13&&V&&V(W),Z&&Z(W)};var te=typeof Ce.value=="undefined"||Ce.value===null?Ce.defaultValue:Ce.value;return ce.state={value:te},ce}return Object(w.a)(Re,[{key:"setValue",value:function(ce,te){"value"in this.props||this.setState({value:ce},te)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return m.createElement(oe,Object(N.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ce){return"value"in ce?{value:ce.value}:null}}]),Re}(m.Component),be=Q.default=ae},ZD9Y:function(B,Q,D){"use strict";var N=D("BoS7"),g=D("Sdc0"),w=D("OaEy"),k=D("2fM7"),b=D("q1tI"),m=D.n(b),T=D("lOMy"),_=D.n(T),t=k.a.Option;Q.a=function(h){var r=h.onFontSizeChange,c=h.cmFontSize,i=h.cmCodeMode,n=h.onCodeModeChange,l=h.onTabToSpace,f=h.className,d=f===void 0?"":f,u=h.tabToSpace,o=h.children;return m.a.createElement("div",{className:"tpi-code-setting ".concat(d)},m.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),m.a.createElement("section",null,m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),m.a.createElement(k.a,{bordered:!1,size:"small",value:i,onChange:n},m.a.createElement(t,{value:"vs"},"\u767D\u8272\u80CC\u666F"),m.a.createElement(t,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),m.a.createElement(k.a,{bordered:!1,size:"small",value:c,onChange:r},m.a.createElement(t,{value:12},"12px"),m.a.createElement(t,{value:14},"14px"),m.a.createElement(t,{value:16},"16px"),m.a.createElement(t,{value:18},"18px"),m.a.createElement(t,{value:20},"20px"),m.a.createElement(t,{value:22},"22px"))),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"Tab\u8F6C\u6362"),m.a.createElement(g.a,{checked:u,onChange:l}))),m.a.createElement("h3",null,"\u5FEB\u6377\u952E"),m.a.createElement("section",null,m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),m.a.createElement("span",null,"Ctrl + S")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),m.a.createElement("span",null,"F1 / Alt + F1")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),m.a.createElement("span",null,"Ctrl + ]/[")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),m.a.createElement("span",null,"Ctrl + Shift + \\")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),m.a.createElement("span",null,"Home")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),m.a.createElement("span",null,"End"))),o)}},ZW9T:function(B,Q,D){"use strict";D.d(Q,"a",function(){return U});var N=D("k1fw"),g=D("oBTY"),w=D("miYZ"),k=D("tsqr"),b=D("rAM+"),m=D("tJVT"),T=D("PpiC"),_=D("q1tI"),t=D.n(_),h=D("bdgK"),r=D("9og8"),c=D("WmNS"),i=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"]},l={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"]},f={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(`
|
|
|
`)}]},d={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(`
|
|
|
`)}]},u=D("5VLF"),o=D.n(u),s={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"]}},E=function(K,ee){return ee.map(function(oe){return{label:oe,kind:K.languages.CompletionItemKind.Keyword,insertText:oe}})},v=function(K){return Object.keys(s.tables).map(function(ee){return{label:ee,kind:K.languages.CompletionItemKind.Variable,insertText:ee}})},p=function(K,ee){var oe=s.tables[K];return oe?oe.map(function(ae){return{label:ae,kind:ee.languages.CompletionItemKind.Field,insertText:ae}}):[]};function I(L,K,ee,oe,ae){var be=K.getWordUntilPosition(ee),_e={startLineNumber:ee.lineNumber,endLineNumber:ee.lineNumber,startColumn:be.startColumn,endColumn:be.endColumn},fe=oe.map(function(Re){return{label:Re,kind:L.languages.CompletionItemKind.Keyword,insertText:Re,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:_e}});return ae.map(function(Re){fe.push(Object(N.a)(Object(N.a)({},Re),{},{range:_e}))}),fe}var R=function(L){s.languages.map(function(ae){return L.languages.registerDocumentFormattingEditProvider(ae,{provideDocumentFormattingEdits:function(_e,fe,Re){return Object(r.a)(i.a.mark(function Ce(){var ce;return i.a.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:return ce=o()(_e.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}),W.abrupt("return",[{range:_e.getFullModelRange(),text:ce}]);case 2:case"end":return W.stop()}},Ce)}))()}}),ae});var K=f.quickKey.map(function(ae){return{label:ae.label,kind:L.languages.CompletionItemKind.Method,insertText:ae.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ee=d.quickKey.map(function(ae){return{label:ae.label,kind:L.languages.CompletionItemKind.Method,insertText:ae.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),oe=l.quickKey.map(function(ae){return{label:ae.label,kind:L.languages.CompletionItemKind.Method,insertText:ae.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}});L.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(be,_e){var fe=be.getWordUntilPosition(_e),Re={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn},Ce=be.getLineContent(_e.lineNumber).substring(fe.startColumn-2,fe.endColumn);return{suggestions:[].concat(Object(g.a)(f.keywords.map(function(ce){return{label:ce,kind:L.languages.CompletionItemKind.Function,documentation:ce,insertText:ce,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(g.a)(f.quickKey.map(function(ce){return{label:ce.label,kind:L.languages.CompletionItemKind.Function,documentation:ce.content,insertText:Ce.startsWith("#")?ce.content.replace(/#/,""):ce.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}}),L.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(be,_e){var fe=be.getWordUntilPosition(_e),Re={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn};return{suggestions:Object(g.a)(n.keywords.map(function(Ce){return{label:Ce,kind:L.languages.CompletionItemKind.Function,documentation:Ce,insertText:Ce,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}}))}}}),L.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(be,_e){var fe=be.getWordUntilPosition(_e),Re={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn},Ce=be.getLineContent(_e.lineNumber).substring(fe.startColumn-2,fe.endColumn);return{suggestions:[].concat(Object(g.a)(l.keywords.map(function(ce){return{label:ce,kind:L.languages.CompletionItemKind.Function,documentation:ce,insertText:ce,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(g.a)(l.quickKey.map(function(ce){return{label:ce.label,kind:L.languages.CompletionItemKind.Function,documentation:ce.content,insertText:Ce.startsWith("#")?ce.content.replace(/#/,""):ce.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}}),L.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(be,_e){var fe=be.getWordUntilPosition(_e),Re={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn},Ce=be.getLineContent(_e.lineNumber).substring(fe.startColumn-2,fe.endColumn);return{suggestions:[].concat(Object(g.a)(d.keywords.map(function(ce){return{label:ce,kind:L.languages.CompletionItemKind.Function,documentation:ce,insertText:ce,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(g.a)(d.quickKey.map(function(ce){return{label:ce.label,kind:L.languages.CompletionItemKind.Function,documentation:ce.content,insertText:Ce.startsWith("#")?ce.content.replace(/#/,""):ce.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}})},y="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",x=D("fjLI"),C=D("LvDl"),S=D("+ua5");function F(L){return/^\d+$/.test(L)?"".concat(L,"px"):L}function j(){}var A=!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 z(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],K=L;if(Array.isArray(L)){for(var ee=0;ee<L.length;ee++){var oe=Y[L[ee]];if(oe)return oe}return K[0]}return Y[K]||K}var O=null,H=Q.b=function(L){var K=L.width,ee=K===void 0?"100%":K,oe=L.height,ae=oe===void 0?"100%":oe,be=L.value,_e=L.language,fe=_e===void 0?"javascript":_e,Re=L.style,Ce=Re===void 0?{}:Re,ce=L.options,te=ce===void 0?{}:ce,W=L.overrideServices,X=W===void 0?{}:W,V=L.theme,Z=V===void 0?"vs-dark":V,q=L.onEditBlur,ie=L.onSave,ne=L.autoHeight,J=ne===void 0?!1:ne,$=L.forbidCopy,le=$===void 0?!1:$,he=L.onChange,Se=he===void 0?j:he,Ue=L.editorDidMount,Xe=Ue===void 0?j:Ue,$e=L.onFocus,Ye=$e===void 0?j:$e,et=L.filename,qe=et===void 0?"educoder.txt":et,Pe=L.errorLine,Ie=L.errorContent,Ze=Ie===void 0?"":Ie,nt=Object(T.a)(L,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),ye=Object(_.useRef)(),ue=Object(_.useRef)({}),pe=Object(_.useRef)(),me=Object(_.useRef)(),Oe=Object(_.useRef)(!1),ve=Object(_.useRef)(),xe=Object(_.useState)(!1),Ae=Object(m.a)(xe,2),Le=Ae[0],Me=Ae[1];function We(){var _t;return ye.current&&(_t=new h.default(function(Et){var Bt=Object(b.a)(Et),Dr;try{for(Bt.s();!(Dr=Bt.n()).done;){var pt=Dr.value;(pt.target.offsetHeight>0||pt.target.offsetWidth>0)&&ue.current.instance.layout()}}catch(St){Bt.e(St)}finally{Bt.f()}}),_t.observe(ye.current)),_t}function rt(){k.b.warn(decodeURIComponent(y))}var at=function(){var Et=ue.current.instance;if(be!=null&&Et&&Le){var Bt=Et.getModel();Bt&&be!==Bt.getValue()&&(A=!0,Bt.setValue(be),Et.layout(),A=!1)}};Object(_.useEffect)(function(){me.current&&clearTimeout(me.current),me.current=setTimeout(function(){at()},500)},[be,Le,ue.current]),Object(_.useEffect)(function(){if(Pe&&ue.current&&ue.current.instance){var _t=ue.current.instance;_t.changeViewZones(function(Bt){var Dr=document.createElement("div");Dr.style.padding="10px 20px",Dr.style.width="calc(100% - 20px)",Dr.className="my-error-line-wrp",Dr.innerHTML=Ze,Bt.addZone({afterLineNumber:Pe||11,heightInLines:3,domNode:Dr})});var Et={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}};_t.addOverlayWidget(Et),_t.revealPositionInCenter({lineNumber:20,column:1})}},[Pe,ue.current,Le]);function it(){var _t=ue.current.instance;if(_t){var Et=_t.getSelection(),Bt=ue.current.pastePos||{},Dr=new O.Range(Bt.startLineNumber||Et.endLineNumber,Bt.startColumn||Et.endColumn,Bt.endLineNumber||Et.endLineNumber,Bt.endColumn||Et.endColumn);setTimeout(function(){_t.executeEdits("",[{range:Dr,text:""}])},300)}}function st(_t){(window.navigator.platform.match("Mac")?_t.metaKey:_t.ctrlKey)&&_t.keyCode==83&&(_t.preventDefault(),ie())}var Ct=function(){if(J&&ue.current.instance){var Et=ue.current.instance.getContentHeight();Dt(Et<ae?ae:Et)}else Dt(ae)};function yt(_t){var Et=document.createEvent("MouseEvents");Et.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),_t.dispatchEvent(Et)}function ht(_t,Et){var Bt=window.URL||window.webkitURL||window,Dr=new Blob([Et]),pt=document.createElementNS("http://www.w3.org/1999/xhtml","a");pt.href=Bt.createObjectURL(Dr),pt.download=_t,yt(pt)}Object(_.useEffect)(function(){Ct()},[Ct]),Object(_.useEffect)(function(){ye.current&&!Le&&Promise.all([D.e(17),D.e(29)]).then(D.t.bind(null,"M/lh",7)).then(function(_t){try{O=_t,ue.current.instance=O.editor.create(ye.current,{value:be,language:z(fe),theme:Z,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},X);var Et=ue.current.instance,Bt=x.d._menuItems,Dr=Object(g.a)(Bt).find(function(Gt){return Gt[0]._debugName=="EditorContext"}),pt=Dr[1],St=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],dt=function(vt,xt){var Kt=vt._first;do{var Ar,qt,ut=xt.includes((Ar=Kt.element)===null||Ar===void 0||((qt=Ar.command)===null||qt===void 0)?void 0:qt.id);ut&&vt._remove(Kt)}while(Kt=Kt.next)};if(Xe(Et,O),setTimeout(function(){Ct(),ue.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){ht(qe||"educoder.txt",Et.getValue())}}),Et.getDomNode().addEventListener("input",function(){pe.current.autoFormat&&Et.getAction("editor.action.formatDocument").run()})},500),ue.current.subscription=Et.onDidChangeModelContent(function(Gt){Oe.current?clearTimeout(ve.current):(Ct(),Se(Et.getValue(),Gt)),ve.current=setTimeout(function(){Oe.current=!1},500)}),window.Monaco||R(O,z(fe)),le&&(dt(pt,St),ye.current.classList.add("noCopyPaste"),Et.onKeyDown(function(Gt){var vt=Gt.keyCode,xt=Gt.ctrlKey,Kt=Gt.metaKey;(vt===33||vt===52)&&(Kt||xt)&&(rt(),Gt.preventDefault())})),window.Monaco=O,q&&Et.onDidBlurEditorWidget(function(){q(Et.getValue())}),Ye&&Et.onDidFocusEditorText(function(){Ye(Et.getValue())}),le){Et.addCommand(O.KeyMod.CtrlCmd|O.KeyCode.KEY_V,function(){return rt(),null}),Et.onDidPaste(function(Gt){ue.current.pastePos=Gt});try{window.addEventListener("paste",it)}catch(Gt){}}var Ht=We();return Me(!0),function(){var Gt=ue.current.instance;Gt.dispose();var vt=Gt.getModel();vt&&vt.dispose(),ue.current.subscription&&ue.current.subscription.dispose(),le&&window.removeEventListener("paste",it),Ht.unobserve(ye.current)}}catch(Gt){}})},[]),Object(_.useEffect)(function(){var _t=ue.current.instance;if(_t&&Le)return document.addEventListener("keydown",st,!1),function(){document.removeEventListener("keydown",st)}},[ie,Le]),Object(_.useEffect)(function(){var _t=ue.current.instance;if(_t&&Le){var Et=z(fe);O.editor.setModelLanguage(_t.getModel(),Et),console.log("language:",fe,_t.getModel(),Et)}},[fe,Le]),Object(_.useEffect)(function(){var _t=ue.current.instance;_t&&Le&&O.editor.setTheme(Z)},[Z,Le]),Object(_.useEffect)(function(){var _t=ue.current.instance;pe.current=te,_t&&Le&&(_t.updateOptions(Object(N.a)({},te)),setTimeout(function(){_t.getModel().updateOptions(Object(N.a)({},te))},200))},[JSON.stringify(te),Le]),Object(_.useEffect)(function(){var _t=ue.current.instance;_t&&Le&&_t.layout()},[ee,ae,Le]);var Ut=Object(_.useState)(F(ee)),kt=Object(m.a)(Ut,2),Yt=kt[0],Zt=kt[1],Mt=Object(_.useState)(F(ae)),wt=Object(m.a)(Mt,2),$t=wt[0],Dt=wt[1],Tt=Object(N.a)(Object(N.a)({},Ce),{},{width:Yt,height:$t});return t.a.createElement("div",{className:"my-monaco-editor",ref:ye,style:Tt})};function U(L){var K=L.width,ee=K===void 0?"100%":K,oe=L.height,ae=oe===void 0?"100%":oe,be=L.original,_e=L.modified,fe=L.language,Re=L.options,Ce=Re===void 0?{}:Re,ce=Object(_.useRef)(),te=Object(_.useState)(null),W=Object(m.a)(te,2),X=W[0],V=W[1];function Z(J){var $;return ce.current&&($=new h.default(function(le){var he=Object(b.a)(le),Se;try{for(he.s();!(Se=he.n()).done;){var Ue=Se.value;(Ue.target.offsetHeight>0||Ue.target.offsetWidth>0)&&J.layout()}}catch(Xe){he.e(Xe)}finally{he.f()}}),$.observe(ce.current)),$}Object(_.useEffect)(function(){ce.current&&Promise.all([D.e(17),D.e(29)]).then(D.t.bind(null,"M/lh",7)).then(function(J){O=J;var $=O.editor.createDiffEditor(ce.current,Object(N.a)(Object(N.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Ce),{},{wordWrap:!0}));V($);var le=Z($);return function(){$.dispose();var he=$.getModel();he&&he.dispose(),le.unobserve(ce.current)}})},[]),Object(_.useEffect)(function(){X&&X.setModel({original:O.editor.createModel(be,fe),modified:O.editor.createModel(_e,fe)})},[be,_e,fe,X]);var q=F(ee),ie=F(ae),ne={width:q,height:ie};return t.a.createElement("div",{className:"my-diff-editor",ref:ce,style:ne})}},Zss7:function(B,Q,D){var N;(function(g){var w=/^\s+/,k=/\s+$/,b=0,m=g.round,T=g.min,_=g.max,t=g.random;function h(W,X){if(W=W||"",X=X||{},W instanceof h)return W;if(!(this instanceof h))return new h(W,X);var V=r(W);this._originalInput=W,this._r=V.r,this._g=V.g,this._b=V.b,this._a=V.a,this._roundA=m(100*this._a)/100,this._format=X.format||V.format,this._gradientType=X.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=V.ok,this._tc_id=b++}h.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 W=this.toRgb();return(W.r*299+W.g*587+W.b*114)/1e3},getLuminance:function(){var W=this.toRgb(),X,V,Z,q,ie,ne;return X=W.r/255,V=W.g/255,Z=W.b/255,X<=.03928?q=X/12.92:q=g.pow((X+.055)/1.055,2.4),V<=.03928?ie=V/12.92:ie=g.pow((V+.055)/1.055,2.4),Z<=.03928?ne=Z/12.92:ne=g.pow((Z+.055)/1.055,2.4),.2126*q+.7152*ie+.0722*ne},setAlpha:function(W){return this._a=H(W),this._roundA=m(100*this._a)/100,this},toHsv:function(){var W=l(this._r,this._g,this._b);return{h:W.h*360,s:W.s,v:W.v,a:this._a}},toHsvString:function(){var W=l(this._r,this._g,this._b),X=m(W.h*360),V=m(W.s*100),Z=m(W.v*100);return this._a==1?"hsv("+X+", "+V+"%, "+Z+"%)":"hsva("+X+", "+V+"%, "+Z+"%, "+this._roundA+")"},toHsl:function(){var W=i(this._r,this._g,this._b);return{h:W.h*360,s:W.s,l:W.l,a:this._a}},toHslString:function(){var W=i(this._r,this._g,this._b),X=m(W.h*360),V=m(W.s*100),Z=m(W.l*100);return this._a==1?"hsl("+X+", "+V+"%, "+Z+"%)":"hsla("+X+", "+V+"%, "+Z+"%, "+this._roundA+")"},toHex:function(W){return d(this._r,this._g,this._b,W)},toHexString:function(W){return"#"+this.toHex(W)},toHex8:function(W){return u(this._r,this._g,this._b,this._a,W)},toHex8String:function(W){return"#"+this.toHex8(W)},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:z[d(this._r,this._g,this._b,!0)]||!1},toFilter:function(W){var X="#"+o(this._r,this._g,this._b,this._a),V=X,Z=this._gradientType?"GradientType = 1, ":"";if(W){var q=h(W);V="#"+o(q._r,q._g,q._b,q._a)}return"progid:DXImageTransform.Microsoft.gradient("+Z+"startColorstr="+X+",endColorstr="+V+")"},toString:function(W){var X=!!W;W=W||this._format;var V=!1,Z=this._a<1&&this._a>=0,q=!X&&Z&&(W==="hex"||W==="hex6"||W==="hex3"||W==="hex4"||W==="hex8"||W==="name");return q?W==="name"&&this._a===0?this.toName():this.toRgbString():(W==="rgb"&&(V=this.toRgbString()),W==="prgb"&&(V=this.toPercentageRgbString()),(W==="hex"||W==="hex6")&&(V=this.toHexString()),W==="hex3"&&(V=this.toHexString(!0)),W==="hex4"&&(V=this.toHex8String(!0)),W==="hex8"&&(V=this.toHex8String()),W==="name"&&(V=this.toName()),W==="hsl"&&(V=this.toHslString()),W==="hsv"&&(V=this.toHsvString()),V||this.toHexString())},clone:function(){return h(this.toString())},_applyModification:function(W,X){var V=W.apply(null,[this].concat([].slice.call(X)));return this._r=V._r,this._g=V._g,this._b=V._b,this.setAlpha(V._a),this},lighten:function(){return this._applyModification(p,arguments)},brighten:function(){return this._applyModification(I,arguments)},darken:function(){return this._applyModification(R,arguments)},desaturate:function(){return this._applyModification(s,arguments)},saturate:function(){return this._applyModification(E,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(y,arguments)},_applyCombination:function(W,X){return W.apply(null,[this].concat([].slice.call(X)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(F,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(S,arguments)}},h.fromRatio=function(W,X){if(typeof W=="object"){var V={};for(var Z in W)W.hasOwnProperty(Z)&&(Z==="a"?V[Z]=W[Z]:V[Z]=be(W[Z]));W=V}return h(W,X)};function r(W){var X={r:0,g:0,b:0},V=1,Z=null,q=null,ie=null,ne=!1,J=!1;return typeof W=="string"&&(W=ce(W)),typeof W=="object"&&(Ce(W.r)&&Ce(W.g)&&Ce(W.b)?(X=c(W.r,W.g,W.b),ne=!0,J=String(W.r).substr(-1)==="%"?"prgb":"rgb"):Ce(W.h)&&Ce(W.s)&&Ce(W.v)?(Z=be(W.s),q=be(W.v),X=f(W.h,Z,q),ne=!0,J="hsv"):Ce(W.h)&&Ce(W.s)&&Ce(W.l)&&(Z=be(W.s),ie=be(W.l),X=n(W.h,Z,ie),ne=!0,J="hsl"),W.hasOwnProperty("a")&&(V=W.a)),V=H(V),{ok:ne,format:W.format||J,r:T(255,_(X.r,0)),g:T(255,_(X.g,0)),b:T(255,_(X.b,0)),a:V}}function c(W,X,V){return{r:U(W,255)*255,g:U(X,255)*255,b:U(V,255)*255}}function i(W,X,V){W=U(W,255),X=U(X,255),V=U(V,255);var Z=_(W,X,V),q=T(W,X,V),ie,ne,J=(Z+q)/2;if(Z==q)ie=ne=0;else{var $=Z-q;ne=J>.5?$/(2-Z-q):$/(Z+q);switch(Z){case W:ie=(X-V)/$+(X<V?6:0);break;case X:ie=(V-W)/$+2;break;case V:ie=(W-X)/$+4;break}ie/=6}return{h:ie,s:ne,l:J}}function n(W,X,V){var Z,q,ie;W=U(W,360),X=U(X,100),V=U(V,100);function ne(le,he,Se){return Se<0&&(Se+=1),Se>1&&(Se-=1),Se<1/6?le+(he-le)*6*Se:Se<1/2?he:Se<2/3?le+(he-le)*(2/3-Se)*6:le}if(X===0)Z=q=ie=V;else{var J=V<.5?V*(1+X):V+X-V*X,$=2*V-J;Z=ne($,J,W+1/3),q=ne($,J,W),ie=ne($,J,W-1/3)}return{r:Z*255,g:q*255,b:ie*255}}function l(W,X,V){W=U(W,255),X=U(X,255),V=U(V,255);var Z=_(W,X,V),q=T(W,X,V),ie,ne,J=Z,$=Z-q;if(ne=Z===0?0:$/Z,Z==q)ie=0;else{switch(Z){case W:ie=(X-V)/$+(X<V?6:0);break;case X:ie=(V-W)/$+2;break;case V:ie=(W-X)/$+4;break}ie/=6}return{h:ie,s:ne,v:J}}function f(W,X,V){W=U(W,360)*6,X=U(X,100),V=U(V,100);var Z=g.floor(W),q=W-Z,ie=V*(1-X),ne=V*(1-q*X),J=V*(1-(1-q)*X),$=Z%6,le=[V,ne,ie,ie,J,V][$],he=[J,V,V,ne,ie,ie][$],Se=[ie,ie,J,V,V,ne][$];return{r:le*255,g:he*255,b:Se*255}}function d(W,X,V,Z){var q=[ae(m(W).toString(16)),ae(m(X).toString(16)),ae(m(V).toString(16))];return Z&&q[0].charAt(0)==q[0].charAt(1)&&q[1].charAt(0)==q[1].charAt(1)&&q[2].charAt(0)==q[2].charAt(1)?q[0].charAt(0)+q[1].charAt(0)+q[2].charAt(0):q.join("")}function u(W,X,V,Z,q){var ie=[ae(m(W).toString(16)),ae(m(X).toString(16)),ae(m(V).toString(16)),ae(_e(Z))];return q&&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 o(W,X,V,Z){var q=[ae(_e(Z)),ae(m(W).toString(16)),ae(m(X).toString(16)),ae(m(V).toString(16))];return q.join("")}h.equals=function(W,X){return!W||!X?!1:h(W).toRgbString()==h(X).toRgbString()},h.random=function(){return h.fromRatio({r:t(),g:t(),b:t()})};function s(W,X){X=X===0?0:X||10;var V=h(W).toHsl();return V.s-=X/100,V.s=L(V.s),h(V)}function E(W,X){X=X===0?0:X||10;var V=h(W).toHsl();return V.s+=X/100,V.s=L(V.s),h(V)}function v(W){return h(W).desaturate(100)}function p(W,X){X=X===0?0:X||10;var V=h(W).toHsl();return V.l+=X/100,V.l=L(V.l),h(V)}function I(W,X){X=X===0?0:X||10;var V=h(W).toRgb();return V.r=_(0,T(255,V.r-m(255*-(X/100)))),V.g=_(0,T(255,V.g-m(255*-(X/100)))),V.b=_(0,T(255,V.b-m(255*-(X/100)))),h(V)}function R(W,X){X=X===0?0:X||10;var V=h(W).toHsl();return V.l-=X/100,V.l=L(V.l),h(V)}function y(W,X){var V=h(W).toHsl(),Z=(V.h+X)%360;return V.h=Z<0?360+Z:Z,h(V)}function x(W){var X=h(W).toHsl();return X.h=(X.h+180)%360,h(X)}function C(W){var X=h(W).toHsl(),V=X.h;return[h(W),h({h:(V+120)%360,s:X.s,l:X.l}),h({h:(V+240)%360,s:X.s,l:X.l})]}function S(W){var X=h(W).toHsl(),V=X.h;return[h(W),h({h:(V+90)%360,s:X.s,l:X.l}),h({h:(V+180)%360,s:X.s,l:X.l}),h({h:(V+270)%360,s:X.s,l:X.l})]}function F(W){var X=h(W).toHsl(),V=X.h;return[h(W),h({h:(V+72)%360,s:X.s,l:X.l}),h({h:(V+216)%360,s:X.s,l:X.l})]}function j(W,X,V){X=X||6,V=V||30;var Z=h(W).toHsl(),q=360/V,ie=[h(W)];for(Z.h=(Z.h-(q*X>>1)+720)%360;--X;)Z.h=(Z.h+q)%360,ie.push(h(Z));return ie}function A(W,X){X=X||6;for(var V=h(W).toHsv(),Z=V.h,q=V.s,ie=V.v,ne=[],J=1/X;X--;)ne.push(h({h:Z,s:q,v:ie})),ie=(ie+J)%1;return ne}h.mix=function(W,X,V){V=V===0?0:V||50;var Z=h(W).toRgb(),q=h(X).toRgb(),ie=V/100,ne={r:(q.r-Z.r)*ie+Z.r,g:(q.g-Z.g)*ie+Z.g,b:(q.b-Z.b)*ie+Z.b,a:(q.a-Z.a)*ie+Z.a};return h(ne)},h.readability=function(W,X){var V=h(W),Z=h(X);return(g.max(V.getLuminance(),Z.getLuminance())+.05)/(g.min(V.getLuminance(),Z.getLuminance())+.05)},h.isReadable=function(W,X,V){var Z=h.readability(W,X),q,ie;ie=!1,q=te(V);switch(q.level+q.size){case"AAsmall":case"AAAlarge":ie=Z>=4.5;break;case"AAlarge":ie=Z>=3;break;case"AAAsmall":ie=Z>=7;break}return ie},h.mostReadable=function(W,X,V){var Z=null,q=0,ie,ne,J,$;V=V||{},ne=V.includeFallbackColors,J=V.level,$=V.size;for(var le=0;le<X.length;le++)ie=h.readability(W,X[le]),ie>q&&(q=ie,Z=h(X[le]));return h.isReadable(W,Z,{level:J,size:$})||!ne?Z:(V.includeFallbackColors=!1,h.mostReadable(W,["#fff","#000"],V))};var Y=h.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},z=h.hexNames=O(Y);function O(W){var X={};for(var V in W)W.hasOwnProperty(V)&&(X[W[V]]=V);return X}function H(W){return W=parseFloat(W),(isNaN(W)||W<0||W>1)&&(W=1),W}function U(W,X){ee(W)&&(W="100%");var V=oe(W);return W=T(X,_(0,parseFloat(W))),V&&(W=parseInt(W*X,10)/100),g.abs(W-X)<1e-6?1:W%X/parseFloat(X)}function L(W){return T(1,_(0,W))}function K(W){return parseInt(W,16)}function ee(W){return typeof W=="string"&&W.indexOf(".")!=-1&&parseFloat(W)===1}function oe(W){return typeof W=="string"&&W.indexOf("%")!=-1}function ae(W){return W.length==1?"0"+W:""+W}function be(W){return W<=1&&(W=W*100+"%"),W}function _e(W){return g.round(parseFloat(W)*255).toString(16)}function fe(W){return K(W)/255}var Re=function(){var W="[-\\+]?\\d+%?",X="[-\\+]?\\d*\\.\\d+%?",V="(?:"+X+")|(?:"+W+")",Z="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",q="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?";return{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+Z),rgba:new RegExp("rgba"+q),hsl:new RegExp("hsl"+Z),hsla:new RegExp("hsla"+q),hsv:new RegExp("hsv"+Z),hsva:new RegExp("hsva"+q),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 Ce(W){return!!Re.CSS_UNIT.exec(W)}function ce(W){W=W.replace(w,"").replace(k,"").toLowerCase();var X=!1;if(Y[W])W=Y[W],X=!0;else if(W=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var V;return(V=Re.rgb.exec(W))?{r:V[1],g:V[2],b:V[3]}:(V=Re.rgba.exec(W))?{r:V[1],g:V[2],b:V[3],a:V[4]}:(V=Re.hsl.exec(W))?{h:V[1],s:V[2],l:V[3]}:(V=Re.hsla.exec(W))?{h:V[1],s:V[2],l:V[3],a:V[4]}:(V=Re.hsv.exec(W))?{h:V[1],s:V[2],v:V[3]}:(V=Re.hsva.exec(W))?{h:V[1],s:V[2],v:V[3],a:V[4]}:(V=Re.hex8.exec(W))?{r:K(V[1]),g:K(V[2]),b:K(V[3]),a:fe(V[4]),format:X?"name":"hex8"}:(V=Re.hex6.exec(W))?{r:K(V[1]),g:K(V[2]),b:K(V[3]),format:X?"name":"hex"}:(V=Re.hex4.exec(W))?{r:K(V[1]+""+V[1]),g:K(V[2]+""+V[2]),b:K(V[3]+""+V[3]),a:fe(V[4]+""+V[4]),format:X?"name":"hex8"}:(V=Re.hex3.exec(W))?{r:K(V[1]+""+V[1]),g:K(V[2]+""+V[2]),b:K(V[3]+""+V[3]),format:X?"name":"hex"}:!1}function te(W){var X,V;return W=W||{level:"AA",size:"small"},X=(W.level||"AA").toUpperCase(),V=(W.size||"small").toLowerCase(),X!=="AA"&&X!=="AAA"&&(X="AA"),V!=="small"&&V!=="large"&&(V="small"),{level:X,size:V}}B.exports?B.exports=h:!(N=function(){return h}.call(Q,D,Q,B),N!==void 0&&(B.exports=N))})(Math)},bCnd:function(B,Q,D){"use strict";D.d(Q,"b",function(){return k}),D.d(Q,"a",function(){return b});var N=D("je13"),g=D.n(N),w=!1;function k(m,T){var _=g.a.get("__ec");_||(_={}),_[m]=T,g.a.set("__ec",_)}function b(m,T){var _=g.a.get("__ec");return _?_[m]===void 0?T:_[m]:T}},bQjk:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("OLod"))})(this,function(N){return function(g){var w=N,k=w.lib,b=k.CipherParams,m=w.enc,T=m.Hex,_=w.format,t=_.Hex={stringify:function(h){return h.ciphertext.toString(T)},parse:function(h){var r=T.parse(h);return b.create({ciphertext:r})}}}(),N.format.Hex})},bT9E:function(B,Q,D){"use strict";D.d(Q,"a",function(){return g});var N=D("VTBJ");function g(w,k){var b=Object(N.a)({},w);return Array.isArray(k)&&k.forEach(function(m){delete b[m]}),b}},biw7:function(B,Q,D){"use strict";var N=D("q1tI"),g=D.n(N),w=N.createContext(null);Q.a=w},c5Ni:function(B,Q,D){},cDPC:function(B,Q,D){"use strict";var N=D("tJVT"),g=D("q1tI"),w=D.n(g),k=D("i3hx"),b=D.n(k);Q.a=function(m){var T=m.defaultX,_=T===void 0?"40%":T,t=m.leftChild,h=m.rightChild,r=m.className,c=m.hideResize,i=c===void 0?!1:c,n=Object(g.useState)(_),l=Object(N.a)(n,2),f=l[0],d=l[1],u=Object(g.useRef)();function o(){u.current=!0}Object(g.useEffect)(function(){function v(I){u.current&&d(I.pageX)}function p(){u.current=!1}return window.addEventListener("mousemove",v),window.addEventListener("mouseup",p),function(){window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",p)}},[]);var s=typeof f=="number"&&f!==.01?"".concat(f,"px"):_,E="calc(100% - ".concat(i?"0px":"4px"," - ").concat(s,")");return w.a.createElement("div",{className:"split-panel-container ".concat(r)},w.a.createElement("section",{style:{width:s,display:f===.01?"none":""}},t),w.a.createElement("section",{className:"resize-x-bar",onMouseDown:o},w.a.createElement("a",{className:"btn-resize"},w.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},w.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),w.a.createElement("section",{style:{width:E}},h))}},cv67:function(B,Q,D){(function(N,g){B.exports=Q=g(D("Ib8C"))})(this,function(N){return function(g){var w=N,k=w.lib,b=k.WordArray,m=k.Hasher,T=w.algo,_=[];(function(){for(var n=0;n<64;n++)_[n]=g.abs(g.sin(n+1))*4294967296|0})();var t=T.MD5=m.extend({_doReset:function(){this._hash=new b.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(n,l){for(var f=0;f<16;f++){var d=l+f,u=n[d];n[d]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}var o=this._hash.words,s=n[l+0],E=n[l+1],v=n[l+2],p=n[l+3],I=n[l+4],R=n[l+5],y=n[l+6],x=n[l+7],C=n[l+8],S=n[l+9],F=n[l+10],j=n[l+11],A=n[l+12],Y=n[l+13],z=n[l+14],O=n[l+15],H=o[0],U=o[1],L=o[2],K=o[3];H=h(H,U,L,K,s,7,_[0]),K=h(K,H,U,L,E,12,_[1]),L=h(L,K,H,U,v,17,_[2]),U=h(U,L,K,H,p,22,_[3]),H=h(H,U,L,K,I,7,_[4]),K=h(K,H,U,L,R,12,_[5]),L=h(L,K,H,U,y,17,_[6]),U=h(U,L,K,H,x,22,_[7]),H=h(H,U,L,K,C,7,_[8]),K=h(K,H,U,L,S,12,_[9]),L=h(L,K,H,U,F,17,_[10]),U=h(U,L,K,H,j,22,_[11]),H=h(H,U,L,K,A,7,_[12]),K=h(K,H,U,L,Y,12,_[13]),L=h(L,K,H,U,z,17,_[14]),U=h(U,L,K,H,O,22,_[15]),H=r(H,U,L,K,E,5,_[16]),K=r(K,H,U,L,y,9,_[17]),L=r(L,K,H,U,j,14,_[18]),U=r(U,L,K,H,s,20,_[19]),H=r(H,U,L,K,R,5,_[20]),K=r(K,H,U,L,F,9,_[21]),L=r(L,K,H,U,O,14,_[22]),U=r(U,L,K,H,I,20,_[23]),H=r(H,U,L,K,S,5,_[24]),K=r(K,H,U,L,z,9,_[25]),L=r(L,K,H,U,p,14,_[26]),U=r(U,L,K,H,C,20,_[27]),H=r(H,U,L,K,Y,5,_[28]),K=r(K,H,U,L,v,9,_[29]),L=r(L,K,H,U,x,14,_[30]),U=r(U,L,K,H,A,20,_[31]),H=c(H,U,L,K,R,4,_[32]),K=c(K,H,U,L,C,11,_[33]),L=c(L,K,H,U,j,16,_[34]),U=c(U,L,K,H,z,23,_[35]),H=c(H,U,L,K,E,4,_[36]),K=c(K,H,U,L,I,11,_[37]),L=c(L,K,H,U,x,16,_[38]),U=c(U,L,K,H,F,23,_[39]),H=c(H,U,L,K,Y,4,_[40]),K=c(K,H,U,L,s,11,_[41]),L=c(L,K,H,U,p,16,_[42]),U=c(U,L,K,H,y,23,_[43]),H=c(H,U,L,K,S,4,_[44]),K=c(K,H,U,L,A,11,_[45]),L=c(L,K,H,U,O,16,_[46]),U=c(U,L,K,H,v,23,_[47]),H=i(H,U,L,K,s,6,_[48]),K=i(K,H,U,L,x,10,_[49]),L=i(L,K,H,U,z,15,_[50]),U=i(U,L,K,H,R,21,_[51]),H=i(H,U,L,K,A,6,_[52]),K=i(K,H,U,L,p,10,_[53]),L=i(L,K,H,U,F,15,_[54]),U=i(U,L,K,H,E,21,_[55]),H=i(H,U,L,K,C,6,_[56]),K=i(K,H,U,L,O,10,_[57]),L=i(L,K,H,U,y,15,_[58]),U=i(U,L,K,H,Y,21,_[59]),H=i(H,U,L,K,I,6,_[60]),K=i(K,H,U,L,j,10,_[61]),L=i(L,K,H,U,v,15,_[62]),U=i(U,L,K,H,S,21,_[63]),o[0]=o[0]+H|0,o[1]=o[1]+U|0,o[2]=o[2]+L|0,o[3]=o[3]+K|0},_doFinalize:function(){var n=this._data,l=n.words,f=this._nDataBytes*8,d=n.sigBytes*8;l[d>>>5]|=128<<24-d%32;var u=g.floor(f/4294967296),o=f;l[(d+64>>>9<<4)+15]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,l[(d+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,n.sigBytes=(l.length+1)*4,this._process();for(var s=this._hash,E=s.words,v=0;v<4;v++){var p=E[v];E[v]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360}return s},clone:function(){var n=m.clone.call(this);return n._hash=this._hash.clone(),n}});function h(n,l,f,d,u,o,s){var E=n+(l&f|~l&d)+u+s;return(E<<o|E>>>32-o)+l}function r(n,l,f,d,u,o,s){var E=n+(l&d|f&~d)+u+s;return(E<<o|E>>>32-o)+l}function c(n,l,f,d,u,o,s){var E=n+(l^f^d)+u+s;return(E<<o|E>>>32-o)+l}function i(n,l,f,d,u,o,s){var E=n+(f^(l|~d))+u+s;return(E<<o|E>>>32-o)+l}w.MD5=m._createHelper(t),w.HmacMD5=m._createHmacHelper(t)}(Math),N.MD5})},dejd:function(B,Q,D){},dmUQ:function(B,Q,D){"use strict";var N=D("Ff2n"),g=D("rePB"),w=D("1OyB"),k=D("vuIU"),b=D("Ji7U"),m=D("md7G"),T=D("foSv"),_=D("q1tI"),t=D.n(_),h=D("TSYQ"),r=D.n(h),c=D("4IlW");function i(C,S){var F=Object.keys(C);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(C);S&&(j=j.filter(function(A){return Object.getOwnPropertyDescriptor(C,A).enumerable})),F.push.apply(F,j)}return F}function n(C){for(var S=1;S<arguments.length;S++){var F=arguments[S]!=null?arguments[S]:{};S%2?i(Object(F),!0).forEach(function(j){Object(g.a)(C,j,F[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(F)):i(Object(F)).forEach(function(j){Object.defineProperty(C,j,Object.getOwnPropertyDescriptor(F,j))})}return C}function l(C){var S=f();return function(){var j=Object(T.a)(C),A;if(S){var Y=Object(T.a)(this).constructor;A=Reflect.construct(j,arguments,Y)}else A=j.apply(this,arguments);return Object(m.a)(this,A)}}function f(){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(C){return!1}}function d(){}function u(C){C.preventDefault()}var o=function(S){return S.replace(/[^\w.-]+/g,"")},s=200,E=600,v=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,p=function(S){return S!=null},I=function(S,F){return F===S||typeof F=="number"&&typeof S=="number"&&isNaN(F)&&isNaN(S)},R=function(C){Object(b.a)(F,C);var S=l(F);function F(j){var A;Object(w.a)(this,F),A=S.call(this,j),A.onKeyDown=function(O){var H=A.props,U=H.onKeyDown,L=H.onPressEnter;if(O.keyCode===c.a.UP){var K=A.getRatio(O);A.up(O,K,null),A.stop()}else if(O.keyCode===c.a.DOWN){var ee=A.getRatio(O);A.down(O,ee,null),A.stop()}else O.keyCode===c.a.ENTER&&L&&L(O);if(A.recordCursorPosition(),A.lastKeyCode=O.keyCode,U){for(var oe=arguments.length,ae=new Array(oe>1?oe-1:0),be=1;be<oe;be++)ae[be-1]=arguments[be];U.apply(void 0,[O].concat(ae))}},A.onKeyUp=function(O){var H=A.props.onKeyUp;if(A.stop(),A.recordCursorPosition(),H){for(var U=arguments.length,L=new Array(U>1?U-1:0),K=1;K<U;K++)L[K-1]=arguments[K];H.apply(void 0,[O].concat(L))}},A.onChange=function(O){var H=A.props.onChange;A.state.focused&&(A.inputting=!0),A.rawInput=A.props.parser(A.getValueFromEvent(O)),A.setState({inputValue:A.rawInput}),H(A.toNumber(A.rawInput))},A.onMouseUp=function(){var O=A.props.onMouseUp;A.recordCursorPosition(),O&&O.apply(void 0,arguments)},A.onFocus=function(){var O;A.setState({focused:!0}),(O=A.props).onFocus.apply(O,arguments)},A.onBlur=function(){var O=A.props.onBlur;A.inputting=!1,A.setState({focused:!1});var H=A.getCurrentValidValue(A.state.inputValue),U=A.setValue(H,d);if(O){var L=A.input.value,K=A.getInputDisplayValue({focus:!1,value:U});A.input.value=K&&Number(K),O.apply(void 0,arguments),A.input.value=L}},A.getRatio=function(O){var H=1;return O.metaKey||O.ctrlKey?H=.1:O.shiftKey&&(H=10),H},A.getFullNum=function(O){return isNaN(O)?O:/e/i.test(String(O))?Number(O).toFixed(18).replace(/\.?0+$/,""):O},A.getPrecision=function(O){if(p(A.props.precision))return A.props.precision;var H=String(O);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},A.getInputDisplayValue=function(O){var H=O||A.state,U=H.focused,L=H.inputValue,K=H.value,ee;U?ee=L:ee=A.toPrecisionAsStep(K),ee==null&&(ee="");var oe=A.formatWrapper(ee);return p(A.props.decimalSeparator)&&(oe=oe.toString().replace(".",A.props.decimalSeparator)),oe},A.recordCursorPosition=function(){try{A.cursorStart=A.input.selectionStart,A.cursorEnd=A.input.selectionEnd,A.currentValue=A.input.value,A.cursorBefore=A.input.value.substring(0,A.cursorStart),A.cursorAfter=A.input.value.substring(A.cursorEnd)}catch(O){}},A.restoreByAfter=function(O){if(O===void 0)return!1;var H=A.input.value,U=H.lastIndexOf(O);if(U===-1)return!1;var L=A.cursorBefore.length;return A.lastKeyCode===c.a.DELETE&&A.cursorBefore.charAt(L-1)===O[0]?(A.fixCaret(L,L),!0):U+O.length===H.length?(A.fixCaret(U,U),!0):!1},A.partRestoreByAfter=function(O){return O===void 0?!1:Array.prototype.some.call(O,function(H,U){var L=O.substring(U);return A.restoreByAfter(L)})},A.isNotCompleteNumber=function(O){return isNaN(O)||O===""||O===null||O&&O.toString().indexOf(".")===O.toString().length-1},A.stop=function(){A.autoStepTimer&&clearTimeout(A.autoStepTimer)},A.down=function(O,H,U){A.pressingUpOrDown=!0,A.step("down",O,H,U)},A.up=function(O,H,U){A.pressingUpOrDown=!0,A.step("up",O,H,U)},A.saveInput=function(O){A.input=O};var Y=j.value;Y===void 0&&(Y=j.defaultValue),A.state={focused:j.autoFocus};var z=A.getValidValue(A.toNumber(Y));return A.state=n(n({},A.state),{},{inputValue:A.toPrecisionAsStep(z),value:z}),A}return Object(k.a)(F,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(A){var Y=this.props,z=Y.value,O=Y.onChange,H=Y.max,U=Y.min,L=this.state.focused;if(A){if(!I(A.value,z)||!I(A.max,H)||!I(A.min,U)){var K=L?z:this.getValidValue(z),ee;this.pressingUpOrDown?ee=K:this.inputting?ee=this.rawInput:ee=this.toPrecisionAsStep(K),this.setState({value:K,inputValue:ee})}var oe="value"in this.props?z:this.state.value;"max"in this.props&&A.max!==H&&typeof oe=="number"&&oe>H&&O&&O(H),"min"in this.props&&A.min!==U&&typeof oe=="number"&&oe<U&&O&&O(U)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var ae=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===c.a.BACKSPACE?ae=this.cursorStart-1:this.lastKeyCode===c.a.DELETE&&(ae=this.cursorStart):ae=this.input.value.length,this.fixCaret(ae,ae)}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(be){}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(A){var Y=A;return Y===""?Y="":this.isNotCompleteNumber(parseFloat(Y))?Y=this.state.value:Y=this.getValidValue(Y),this.toNumber(Y)}},{key:"getValueFromEvent",value:function(A){var Y=A.target.value.trim().replace(/。/g,".");return p(this.props.decimalSeparator)&&(Y=Y.replace(this.props.decimalSeparator,".")),Y}},{key:"getValidValue",value:function(A){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,O=parseFloat(A);return isNaN(O)?A:(O<Y&&(O=Y),O>z&&(O=z),O)}},{key:"setValue",value:function(A,Y){var z=this.props.precision,O=this.isNotCompleteNumber(parseFloat(A))?null:parseFloat(A),H=this.state.value,U=H===void 0?null:H,L=this.state.inputValue,K=L===void 0?null:L,ee=typeof O=="number"?O.toFixed(z):"".concat(O),oe=O!==U||ee!=="".concat(K);return"value"in this.props?(K=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:K},Y)):this.setState({value:O,inputValue:this.toPrecisionAsStep(A)},Y),oe&&this.props.onChange(O),O}},{key:"getMaxPrecision",value:function(A){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.props,O=z.precision,H=z.step;if(p(O))return O;var U=this.getPrecision(Y),L=this.getPrecision(H),K=this.getPrecision(A);return A?Math.max(K,U+L):U+L}},{key:"getPrecisionFactor",value:function(A){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.getMaxPrecision(A,Y);return Math.pow(10,z)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(A){return this.props.formatter?this.props.formatter(A):A}},{key:"toPrecisionAsStep",value:function(A){if(this.isNotCompleteNumber(A)||A==="")return A;var Y=Math.abs(this.getMaxPrecision(A));return isNaN(Y)?A.toString():Number(A).toFixed(Y)}},{key:"toNumber",value:function(A){var Y=this.props.precision,z=this.state.focused,O=A&&A.length>16&&z;return this.isNotCompleteNumber(A)||O?A:p(Y)?Math.round(A*Math.pow(10,Y))/Math.pow(10,Y):Number(A)}},{key:"upStep",value:function(A,Y){var z=this.props.step,O=this.getPrecisionFactor(A,Y),H=Math.abs(this.getMaxPrecision(A,Y)),U=((O*A+O*z*Y)/O).toFixed(H);return this.toNumber(U)}},{key:"downStep",value:function(A,Y){var z=this.props.step,O=this.getPrecisionFactor(A,Y),H=Math.abs(this.getMaxPrecision(A,Y)),U=((O*A-O*z*Y)/O).toFixed(H);return this.toNumber(U)}},{key:"step",value:function(A,Y){var z=this,O=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 L=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(L))return;var K=this["".concat(A,"Step")](L,O),ee=K>U.max||K<U.min;if(K>U.max?K=U.max:K<U.min&&(K=U.min),this.setValue(K,null),this.setState({focused:!0},function(){z.pressingUpOrDown=!1}),ee)return;this.autoStepTimer=setTimeout(function(){z[A](Y,O,!0)},H?s:E)}},{key:"fixCaret",value:function(A,Y){if(A===void 0||Y===void 0||!this.input||!this.input.value)return;try{var z=this.input.selectionStart,O=this.input.selectionEnd;(A!==z||Y!==O)&&this.input.setSelectionRange(A,Y)}catch(H){}}},{key:"render",value:function(){var A,Y=this.props,z=Y.prefixCls,O=Y.disabled,H=Y.readOnly,U=Y.useTouch,L=Y.autoComplete,K=Y.upHandler,ee=Y.downHandler,oe=Y.className,ae=Y.max,be=Y.min,_e=Y.style,fe=Y.title,Re=Y.onMouseEnter,Ce=Y.onMouseLeave,ce=Y.onMouseOver,te=Y.onMouseOut,W=Y.required,X=Y.onClick,V=Y.tabIndex,Z=Y.type,q=Y.placeholder,ie=Y.id,ne=Y.inputMode,J=Y.pattern,$=Y.step,le=Y.maxLength,he=Y.autoFocus,Se=Y.name,Ue=Y.onPaste,Xe=Y.onInput,$e=Object(N.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"]),Ye=this.state,et=Ye.value,qe=Ye.focused,Pe=r()(z,(A={},Object(g.a)(A,oe,!!oe),Object(g.a)(A,"".concat(z,"-disabled"),O),Object(g.a)(A,"".concat(z,"-focused"),qe),A)),Ie={};Object.keys($e).forEach(function(Le){(Le.substr(0,5)==="data-"||Le.substr(0,5)==="aria-"||Le==="role")&&(Ie[Le]=$e[Le])});var Ze=!H&&!O,nt=this.getInputDisplayValue(null),ye=(et||et===0)&&(isNaN(et)||Number(et)>=ae),ue=(et||et===0)&&(isNaN(et)||Number(et)<=be),pe=ye||O||H,me=ue||O||H,Oe=r()("".concat(z,"-handler"),"".concat(z,"-handler-up"),Object(g.a)({},"".concat(z,"-handler-up-disabled"),pe)),ve=r()("".concat(z,"-handler"),"".concat(z,"-handler-down"),Object(g.a)({},"".concat(z,"-handler-down-disabled"),me)),xe=U?{onTouchStart:pe?d:this.up,onTouchEnd:this.stop}:{onMouseDown:pe?d:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ae=U?{onTouchStart:me?d:this.down,onTouchEnd:this.stop}:{onMouseDown:me?d:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return t.a.createElement("div",{className:Pe,style:_e,title:fe,onMouseEnter:Re,onMouseLeave:Ce,onMouseOver:ce,onMouseOut:te,onFocus:function(){return null},onBlur:function(){return null}},t.a.createElement("div",{className:"".concat(z,"-handler-wrap")},t.a.createElement("span",Object.assign({unselectable:"on"},xe,{role:"button","aria-label":"Increase Value","aria-disabled":pe,className:Oe}),K||t.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-up-inner"),onClick:u})),t.a.createElement("span",Object.assign({unselectable:"on"},Ae,{role:"button","aria-label":"Decrease Value","aria-disabled":me,className:ve}),ee||t.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-down-inner"),onClick:u}))),t.a.createElement("div",{className:"".concat(z,"-input-wrap")},t.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":be,"aria-valuemax":ae,"aria-valuenow":et,required:W,type:Z,placeholder:q,onPaste:Ue,onClick:X,onMouseUp:this.onMouseUp,className:"".concat(z,"-input"),tabIndex:V,autoComplete:L,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ze?this.onKeyDown:d,onKeyUp:Ze?this.onKeyUp:d,autoFocus:he,maxLength:le,readOnly:H,disabled:O,max:ae,min:be,step:$,name:Se,title:fe,id:ie,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(nt),pattern:J,inputMode:ne,onInput:Xe},Ie))))}}]),F}(t.a.Component);R.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:v,min:-v,step:1,style:{},onChange:d,onKeyDown:d,onPressEnter:d,onFocus:d,onBlur:d,parser:o,required:!1,autoComplete:"off"};var y=R,x=Q.a=y},e7zE:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("3y9D"),D("WYAk"))})(this,function(N){return function(){var g=N,w=g.lib,k=w.Base,b=w.WordArray,m=g.algo,T=m.SHA1,_=m.HMAC,t=m.PBKDF2=k.extend({cfg:k.extend({keySize:128/32,hasher:T,iterations:1}),init:function(h){this.cfg=this.cfg.extend(h)},compute:function(h,r){for(var c=this.cfg,i=_.create(c.hasher,h),n=b.create(),l=b.create([1]),f=n.words,d=l.words,u=c.keySize,o=c.iterations;f.length<u;){var s=i.update(r).finalize(l);i.reset();for(var E=s.words,v=E.length,p=s,I=1;I<o;I++){p=i.finalize(p),i.reset();for(var R=p.words,y=0;y<v;y++)E[y]^=R[y]}n.concat(s),d[0]++}return n.sigBytes=u*4,n}});g.PBKDF2=function(h,r,c){return t.create(c).compute(h,r)}}(),N.PBKDF2})},eRFJ:function(B,Q,D){B.exports={header:"header___2DEfS",field:"field___2KFR1","oj-form-container":"oj-form-container___11-CJ","oj-left-panel":"oj-left-panel___2_COu","oj-form-info":"oj-form-info___3RmjJ",footer:"footer___13GF0",result:"result___2TPH2",passText:"passText___m4yU3",noPassText:"noPassText___bU8yW",pass:"pass___1qwzN",noPass:"noPass___35fR7","test-case-name":"test-case-name___JX6gg","btn-remove-case":"btn-remove-case___20q0s","icon-tag":"icon-tag___ahN2d",btn_back:"btn_back___2GR2u",testJi:"testJi___lY3ok",upBtn:"upBtn___14ov-","oj-problems":"oj-problems___3xexO",row:"row____2CFx",a:"a___1o_MZ",b:"b___2s_8T",inputTwo:"inputTwo___2QE50",inputOne:"inputOne___3VLjS",cusModal:"cusModal___3HaCu","oj-custom-large-spin":"oj-custom-large-spin___18Uw5",MdEditor:"MdEditor___2TQ6G"}},fcSX:function(B,Q,D){"use strict";var N=D("Ff2n"),g=D("1OyB"),w=D("vuIU"),k=D("Ji7U"),b=D("md7G"),m=D("foSv"),T=D("1W/9"),_=D("q1tI"),t=D("rePB"),h=D("JX7q"),r=D("TSYQ"),c=D.n(r),i=D("qx4F"),n=D("4IlW");function l(O){return Array.isArray(O)?O:[O]}var f={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},d=Object.keys(f).filter(function(O){if(typeof document=="undefined")return!1;var H=document.getElementsByTagName("html")[0];return O in(H?H.style:{})})[0],u=f[d];function o(O,H,U,L){O.addEventListener?O.addEventListener(H,U,L):O.attachEvent&&O.attachEvent("on".concat(H),U)}function s(O,H,U,L){O.removeEventListener?O.removeEventListener(H,U,L):O.attachEvent&&O.detachEvent("on".concat(H),U)}function E(O,H){var U=typeof O=="function"?O(H):O;return Array.isArray(U)?U.length===2?U:[U[0],U[1]]:[U]}var v=function(H){return!isNaN(parseFloat(H))&&isFinite(H)},p=!(typeof window!="undefined"&&window.document&&window.document.createElement),I=function O(H,U,L,K){if(!U||U===document||U instanceof Document)return!1;if(U===H.parentNode)return!0;var ee=Math.max(Math.abs(L),Math.abs(K))===Math.abs(K),oe=Math.max(Math.abs(L),Math.abs(K))===Math.abs(L),ae=U.scrollHeight-U.clientHeight,be=U.scrollWidth-U.clientWidth,_e=document.defaultView.getComputedStyle(U),fe=_e.overflowY==="auto"||_e.overflowY==="scroll",Re=_e.overflowX==="auto"||_e.overflowX==="scroll",Ce=ae&&fe,ce=be&ℜreturn ee&&(!Ce||Ce&&(U.scrollTop>=ae&&K<0||U.scrollTop<=0&&K>0))||oe&&(!ce||ce&&(U.scrollLeft>=be&&L<0||U.scrollLeft<=0&&L>0))?O(H,U.parentNode,L,K):!1};function R(O){var H=y();return function(){var L=Object(m.a)(O),K;if(H){var ee=Object(m.a)(this).constructor;K=Reflect.construct(L,arguments,ee)}else K=L.apply(this,arguments);return Object(b.a)(this,K)}}function y(){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(O){return!1}}var x={},C=function(O){Object(k.a)(U,O);var H=R(U);function U(L){var K;return Object(g.a)(this,U),K=H.call(this,L),K.domFocus=function(){K.dom&&K.dom.focus()},K.removeStartHandler=function(ee){if(ee.touches.length>1)return;K.startPos={x:ee.touches[0].clientX,y:ee.touches[0].clientY}},K.removeMoveHandler=function(ee){if(ee.changedTouches.length>1)return;var oe=ee.currentTarget,ae=ee.changedTouches[0].clientX-K.startPos.x,be=ee.changedTouches[0].clientY-K.startPos.y;(oe===K.maskDom||oe===K.handlerDom||oe===K.contentDom&&I(oe,ee.target,ae,be))&&ee.cancelable&&ee.preventDefault()},K.transitionEnd=function(ee){var oe=ee.target;s(oe,u,K.transitionEnd),oe.style.transition=""},K.onKeyDown=function(ee){if(ee.keyCode===n.a.ESC){var oe=K.props.onClose;ee.stopPropagation(),oe&&oe(ee)}},K.onWrapperTransitionEnd=function(ee){var oe=K.props,ae=oe.open,be=oe.afterVisibleChange;ee.target===K.contentWrapper&&ee.propertyName.match(/transform$/)&&(K.dom.style.transition="",!ae&&K.getCurrentDrawerSome()&&(document.body.style.overflowX="",K.maskDom&&(K.maskDom.style.left="",K.maskDom.style.width="")),be&&be(!!ae))},K.openLevelTransition=function(){var ee=K.props,oe=ee.open,ae=ee.width,be=ee.height,_e=K.getHorizontalBoolAndPlacementName(),fe=_e.isHorizontal,Re=_e.placementName,Ce=K.contentDom?K.contentDom.getBoundingClientRect()[fe?"width":"height"]:0,ce=(fe?ae:be)||Ce;K.setLevelAndScrolling(oe,Re,ce)},K.setLevelTransform=function(ee,oe,ae,be){var _e=K.props,fe=_e.placement,Re=_e.levelMove,Ce=_e.duration,ce=_e.ease,te=_e.showMask;K.levelDom.forEach(function(W){W.style.transition="transform ".concat(Ce," ").concat(ce),o(W,u,K.transitionEnd);var X=ee?ae:0;if(Re){var V=E(Re,{target:W,open:ee});X=ee?V[0]:V[1]||0}var Z=typeof X=="number"?"".concat(X,"px"):X,q=fe==="left"||fe==="top"?Z:"-".concat(Z);q=te&&fe==="right"&&be?"calc(".concat(q," + ").concat(be,"px)"):q,W.style.transform=X?"".concat(oe,"(").concat(q,")"):""})},K.setLevelAndScrolling=function(ee,oe,ae){var be=K.props.onChange;if(!p){var _e=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(i.a)(!0):0;K.setLevelTransform(ee,oe,ae,_e),K.toggleScrollingToDrawerAndBody(_e)}be&&be(ee)},K.toggleScrollingToDrawerAndBody=function(ee){var oe=K.props,ae=oe.getOpenCount,be=oe.getContainer,_e=oe.showMask,fe=oe.open,Re=be&&be(),Ce=ae&&ae();if(Re&&Re.parentNode===document.body&&_e){var ce=["touchstart"],te=[document.body,K.maskDom,K.handlerDom,K.contentDom];fe&&document.body.style.overflow!=="hidden"?(ee&&K.addScrollingEffect(ee),Ce===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",te.forEach(function(W,X){if(!W)return;o(W,ce[X]||"touchmove",X?K.removeMoveHandler:K.removeStartHandler,K.passive)})):K.getCurrentDrawerSome()&&(Ce||(document.body.style.overflow=""),document.body.style.touchAction="",ee&&K.remScrollingEffect(ee),te.forEach(function(W,X){if(!W)return;s(W,ce[X]||"touchmove",X?K.removeMoveHandler:K.removeStartHandler,K.passive)}))}},K.addScrollingEffect=function(ee){var oe=K.props,ae=oe.placement,be=oe.duration,_e=oe.ease,fe=oe.getOpenCount,Re=oe.switchScrollingEffect,Ce=fe&&fe();Ce===1&&Re();var ce="width ".concat(be," ").concat(_e),te="transform ".concat(be," ").concat(_e);K.dom.style.transition="none";switch(ae){case"right":K.dom.style.transform="translateX(-".concat(ee,"px)");break;case"top":case"bottom":K.dom.style.width="calc(100% - ".concat(ee,"px)"),K.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(K.timeout),K.timeout=setTimeout(function(){K.dom&&(K.dom.style.transition="".concat(te,",").concat(ce),K.dom.style.width="",K.dom.style.transform="")})},K.remScrollingEffect=function(ee){var oe=K.props,ae=oe.placement,be=oe.duration,_e=oe.ease,fe=oe.getOpenCount,Re=oe.switchScrollingEffect,Ce=fe&&fe();Ce||Re(!0),d&&(document.body.style.overflowX="hidden"),K.dom.style.transition="none";var ce,te="width ".concat(be," ").concat(_e),W="transform ".concat(be," ").concat(_e);switch(ae){case"left":{K.dom.style.width="100%",te="width 0s ".concat(_e," ").concat(be);break}case"right":{K.dom.style.transform="translateX(".concat(ee,"px)"),K.dom.style.width="100%",te="width 0s ".concat(_e," ").concat(be),K.maskDom&&(K.maskDom.style.left="-".concat(ee,"px"),K.maskDom.style.width="calc(100% + ".concat(ee,"px)"));break}case"top":case"bottom":{K.dom.style.width="calc(100% + ".concat(ee,"px)"),K.dom.style.height="100%",K.dom.style.transform="translateZ(0)",ce="height 0s ".concat(_e," ").concat(be);break}default:break}clearTimeout(K.timeout),K.timeout=setTimeout(function(){K.dom&&(K.dom.style.transition="".concat(W,",").concat(ce?"".concat(ce,","):"").concat(te),K.dom.style.transform="",K.dom.style.width="",K.dom.style.height="")})},K.getCurrentDrawerSome=function(){return!Object.keys(x).some(function(ee){return x[ee]})},K.getLevelDom=function(ee){var oe=ee.level,ae=ee.getContainer;if(p)return;var be=ae&&ae(),_e=be?be.parentNode:null;if(K.levelDom=[],oe==="all"){var fe=_e?Array.prototype.slice.call(_e.children):[];fe.forEach(function(Re){Re.nodeName!=="SCRIPT"&&Re.nodeName!=="STYLE"&&Re.nodeName!=="LINK"&&Re!==be&&K.levelDom.push(Re)})}else oe&&l(oe).forEach(function(Re){document.querySelectorAll(Re).forEach(function(Ce){K.levelDom.push(Ce)})})},K.getHorizontalBoolAndPlacementName=function(){var ee=K.props.placement,oe=ee==="left"||ee==="right",ae="translate".concat(oe?"X":"Y");return{isHorizontal:oe,placementName:ae}},K.state={_self:Object(h.a)(K)},K}return Object(w.a)(U,[{key:"componentDidMount",value:function(){var K=this;if(!p){var ee=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return ee=!0,null}}))}catch(fe){}this.passive=ee?{passive:!1}:!1}var oe=this.props,ae=oe.open,be=oe.getContainer,_e=be&&be();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),ae&&(_e&&_e.parentNode===document.body&&(x[this.drawerId]=ae),this.openLevelTransition(),this.forceUpdate(function(){K.domFocus()}))}},{key:"componentDidUpdate",value:function(K){var ee=this.props,oe=ee.open,ae=ee.getContainer,be=ae&&ae();oe!==K.open&&(oe&&this.domFocus(),be&&be.parentNode===document.body&&(x[this.drawerId]=!!oe),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var K=this.props,ee=K.getOpenCount,oe=K.open,ae=K.switchScrollingEffect,be=typeof ee=="function"&&ee();delete x[this.drawerId],oe&&(this.setLevelTransform(!1),document.body.style.touchAction=""),be||(document.body.style.overflow="",ae(!0))}},{key:"render",value:function(){var K,ee=this,oe=this.props,ae=oe.className,be=oe.children,_e=oe.style,fe=oe.width,Re=oe.height,Ce=oe.defaultOpen,ce=oe.open,te=oe.prefixCls,W=oe.placement,X=oe.level,V=oe.levelMove,Z=oe.ease,q=oe.duration,ie=oe.getContainer,ne=oe.handler,J=oe.onChange,$=oe.afterVisibleChange,le=oe.showMask,he=oe.maskClosable,Se=oe.maskStyle,Ue=oe.onClose,Xe=oe.onHandleClick,$e=oe.keyboard,Ye=oe.getOpenCount,et=oe.switchScrollingEffect,qe=Object(N.a)(oe,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),Pe=this.dom?ce:!1,Ie=c()(te,(K={},Object(t.a)(K,"".concat(te,"-").concat(W),!0),Object(t.a)(K,"".concat(te,"-open"),Pe),Object(t.a)(K,ae||"",!!ae),Object(t.a)(K,"no-mask",!le),K)),Ze=this.getHorizontalBoolAndPlacementName(),nt=Ze.placementName,ye=W==="left"||W==="top"?"-100%":"100%",ue=Pe?"":"".concat(nt,"(").concat(ye,")"),pe=ne&&_.cloneElement(ne,{onClick:function(Oe){ne.props.onClick&&ne.props.onClick(),Xe&&Xe(Oe)},ref:function(Oe){ee.handlerDom=Oe}});return _.createElement("div",Object.assign({},qe,{tabIndex:-1,className:Ie,style:_e,ref:function(Oe){ee.dom=Oe},onKeyDown:Pe&&$e?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),le&&_.createElement("div",{className:"".concat(te,"-mask"),onClick:he?Ue:void 0,style:Se,ref:function(Oe){ee.maskDom=Oe}}),_.createElement("div",{className:"".concat(te,"-content-wrapper"),style:{transform:ue,msTransform:ue,width:v(fe)?"".concat(fe,"px"):fe,height:v(Re)?"".concat(Re,"px"):Re},ref:function(Oe){ee.contentWrapper=Oe}},_.createElement("div",{className:"".concat(te,"-content"),ref:function(Oe){ee.contentDom=Oe},onTouchStart:Pe&&le?this.removeStartHandler:void 0,onTouchMove:Pe&&le?this.removeMoveHandler:void 0},be),pe))}}],[{key:"getDerivedStateFromProps",value:function(K,ee){var oe=ee.prevProps,ae=ee._self,be={prevProps:K};if(oe!==void 0){var _e=K.placement,fe=K.level;_e!==oe.placement&&(ae.contentDom=null),fe!==oe.level&&ae.getLevelDom(K)}return be}}]),U}(_.Component);C.defaultProps={switchScrollingEffect:function(){}};var S=C;function F(O){var H=j();return function(){var L=Object(m.a)(O),K;if(H){var ee=Object(m.a)(this).constructor;K=Reflect.construct(L,arguments,ee)}else K=L.apply(this,arguments);return Object(b.a)(this,K)}}function j(){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(O){return!1}}var A=function(O){Object(k.a)(U,O);var H=F(U);function U(L){var K;Object(g.a)(this,U),K=H.call(this,L),K.onHandleClick=function(oe){var ae=K.props,be=ae.onHandleClick,_e=ae.open;if(be&&be(oe),typeof _e=="undefined"){var fe=K.state.open;K.setState({open:!fe})}},K.onClose=function(oe){var ae=K.props,be=ae.onClose,_e=ae.open;be&&be(oe),typeof _e=="undefined"&&K.setState({open:!1})};var ee=typeof L.open!="undefined"?L.open:!!L.defaultOpen;return K.state={open:ee},"onMaskClick"in L&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),K}return Object(w.a)(U,[{key:"render",value:function(){var K=this,ee=this.props,oe=ee.defaultOpen,ae=ee.getContainer,be=ee.wrapperClassName,_e=ee.forceRender,fe=ee.handler,Re=Object(N.a)(ee,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),Ce=this.state.open;if(!ae)return _.createElement("div",{className:be,ref:function(W){K.dom=W}},_.createElement(S,Object.assign({},Re,{open:Ce,handler:fe,getContainer:function(){return K.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var ce=!!fe||_e;return _.createElement(T.a,{visible:Ce,forceRender:ce,getContainer:ae,wrapperClassName:be},function(te){var W=te.visible,X=te.afterClose,V=Object(N.a)(te,["visible","afterClose"]);return _.createElement(S,Object.assign({},Re,V,{open:W!==void 0?W:Ce,afterVisibleChange:X!==void 0?X:Re.afterVisibleChange,handler:fe,onClose:K.onClose,onHandleClick:K.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(K,ee){var oe=ee.prevProps,ae={prevProps:K};return typeof oe!="undefined"&&K.open!==oe.open&&(ae.open=K.open),ae}}]),U}(_.Component);A.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:_.createElement("div",{className:"drawer-handle"},_.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var Y=A,z=Q.a=Y},fjLI:function(B,Q,D){"use strict";D.d(Q,"f",function(){return i}),D.d(Q,"b",function(){return n}),D.d(Q,"a",function(){return l}),D.d(Q,"d",function(){return f}),D.d(Q,"e",function(){return d}),D.d(Q,"c",function(){return u});var N=D("8HAY"),g=D("Vhoy"),w=D("MI8n"),k=D("JYp7"),b=D("pmY6"),m=D("24hK"),T=D("nnTU"),_=D("T8No"),t=D("Cg/j"),h=D("t9D7"),r=function(o,s,E,v){var p=arguments.length,I=p<3?s:v===null?v=Object.getOwnPropertyDescriptor(s,E):v,R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(o,s,E,v);else for(var y=o.length-1;y>=0;y--)(R=o[y])&&(I=(p<3?R(I):p>3?R(s,E,I):R(s,E))||I);return p>3&&I&&Object.defineProperty(s,E,I),I},c=function(o,s){return function(E,v){s(E,v,o)}};function i(o){return o.command!==void 0}class n{constructor(o){this.id=n._idPool++,this._debugName=o}}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 l=Object(t.c)("menuService"),f=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new w.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:o=>o===n.CommandPalette}}addCommand(o){return this.addCommands(k.a.single(o))}addCommands(o){for(const s of o)this._commands.set(s.id,s);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(b.i)(()=>{let s=!1;for(const E of o)s=this._commands.delete(E.id)||s;s&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(o){return this._commands.get(o)}getCommands(){const o=new Map;return this._commands.forEach((s,E)=>o.set(E,s)),o}appendMenuItem(o,s){return this.appendMenuItems(k.a.single({id:o,item:s}))}appendMenuItems(o){const s=new Set,E=new m.a;for(const{id:v,item:p}of o){let I=this._menuItems.get(v);I||(I=new m.a,this._menuItems.set(v,I)),E.push(I.push(p)),s.add(v)}return this._onDidChangeMenu.fire(s),Object(b.i)(()=>{if(E.size>0){for(let v of E)v();this._onDidChangeMenu.fire(s),E.clear()}})}getMenuItems(o){let s;return this._menuItems.has(o)?s=[...this._menuItems.get(o)]:s=[],o===n.CommandPalette&&this._appendImplicitItems(s),s}_appendImplicitItems(o){const s=new Set;for(const E of o)i(E)&&(s.add(E.command.id),E.alt&&s.add(E.alt.id));this._commands.forEach((E,v)=>{s.has(v)||o.push({command:E})})}};class d extends N.e{constructor(o,s,E,v){super(`submenuitem.${o.submenu.id}`,typeof o.title=="string"?o.title:o.title.value,[],"submenu");this.item=o,this._menuService=s,this._contextKeyService=E,this._options=v}get actions(){const o=[],s=this._menuService.createMenu(this.item.submenu,this._contextKeyService),E=s.getActions(this._options);s.dispose();for(const[,v]of E)v.length>0&&(o.push(...v),o.push(new N.d));return o.length&&o.pop(),o}}let u=class o{constructor(s,E,v,p,I){var R,y;if(this._commandService=I,this.id=s.id,this.label=(v==null?void 0:v.renderShortTitle)&&s.shortTitle?typeof s.shortTitle=="string"?s.shortTitle:s.shortTitle.value:typeof s.title=="string"?s.title:s.title.value,this.tooltip=(y=typeof s.tooltip=="string"?s.tooltip:(R=s.tooltip)===null||R===void 0?void 0:R.value)!==null&&y!==void 0?y:"",this.enabled=!s.precondition||p.contextMatchesRules(s.precondition),this.checked=void 0,s.toggled){const x=s.toggled.condition?s.toggled:{condition:s.toggled};this.checked=p.contextMatchesRules(x.condition),this.checked&&x.tooltip&&(this.tooltip=typeof x.tooltip=="string"?x.tooltip:x.tooltip.value),x.title&&(this.label=typeof x.title=="string"?x.title:x.title.value)}this.item=s,this.alt=E?new o(E,void 0,v,p,I):void 0,this._options=v,h.d.isThemeIcon(s.icon)&&(this.class=g.a.asClassName(s.icon))}dispose(){}run(...s){var E,v;let p=[];return((E=this._options)===null||E===void 0?void 0:E.arg)&&(p=[...p,this._options.arg]),((v=this._options)===null||v===void 0?void 0:v.shouldForwardArgs)&&(p=[...p,...s]),this._commandService.executeCommand(this.id,...p)}};u=r([c(3,_.b),c(4,T.b)],u)},fyJ8:function(B,Q,D){"use strict";var N=D("rePB"),g=D("VTBJ"),w=D("Ff2n"),k=D("U8pU"),b=D("q1tI"),m=D.n(b),T=D("TSYQ"),_=D.n(T),t=D("c+Xe"),h=D("sR1s");function r(f){return f&&Object(k.a)(f)==="object"&&!Array.isArray(f)&&!b.isValidElement(f)}function c(f){return typeof f=="string"?!0:Object(t.c)(f)}function i(f,d){var u,o=f.prefixCls,s=f.className,E=f.record,v=f.index,p=f.dataIndex,I=f.render,R=f.children,y=f.component,x=y===void 0?"td":y,C=f.colSpan,S=f.rowSpan,F=f.fixLeft,j=f.fixRight,A=f.firstFixLeft,Y=f.lastFixLeft,z=f.firstFixRight,O=f.lastFixRight,H=f.appendNode,U=f.additionalProps,L=U===void 0?{}:U,K=f.ellipsis,ee=f.align,oe=f.rowType,ae=f.isSticky,be="".concat(o,"-cell"),_e,fe;if(R)fe=R;else{var Re=Object(h.b)(E,p);if(fe=Re,I){var Ce=I(Re,E,v);r(Ce)?(fe=Ce.children,_e=Ce.props):fe=Ce}}Object(k.a)(fe)==="object"&&!Array.isArray(fe)&&!b.isValidElement(fe)&&(fe=null),K&&(Y||z)&&(fe=b.createElement("span",{className:"".concat(be,"-content")},fe));var ce=_e||{},te=ce.colSpan,W=ce.rowSpan,X=ce.style,V=ce.className,Z=Object(w.a)(ce,["colSpan","rowSpan","style","className"]),q=te!==void 0?te:C,ie=W!==void 0?W:S;if(q===0||ie===0)return null;var ne={},J=typeof F=="number",$=typeof j=="number";J&&(ne.position="sticky",ne.left=F),$&&(ne.position="sticky",ne.right=j);var le={};ee&&(le.textAlign=ee);var he,Se=K===!0?{showTitle:!0}:K;Se&&(Se.showTitle||oe==="header")&&(typeof fe=="string"||typeof fe=="number"?he=fe.toString():b.isValidElement(fe)&&typeof fe.props.children=="string"&&(he=fe.props.children));var Ue=Object(g.a)(Object(g.a)(Object(g.a)({title:he},Z),L),{},{colSpan:q&&q!==1?q:null,rowSpan:ie&&ie!==1?ie:null,className:_()(be,s,(u={},Object(N.a)(u,"".concat(be,"-fix-left"),J),Object(N.a)(u,"".concat(be,"-fix-left-first"),A),Object(N.a)(u,"".concat(be,"-fix-left-last"),Y),Object(N.a)(u,"".concat(be,"-fix-right"),$),Object(N.a)(u,"".concat(be,"-fix-right-first"),z),Object(N.a)(u,"".concat(be,"-fix-right-last"),O),Object(N.a)(u,"".concat(be,"-ellipsis"),K),Object(N.a)(u,"".concat(be,"-with-append"),H),Object(N.a)(u,"".concat(be,"-fix-sticky"),(J||$)&&ae),u),L.className,V),style:Object(g.a)(Object(g.a)(Object(g.a)(Object(g.a)({},L.style),le),ne),X),ref:c(x)?d:null});return b.createElement(x,Object.assign({},Ue),H,fe)}var n=b.forwardRef(i);n.displayName="Cell";var l=b.memo(n,function(f,d){return d.shouldCellUpdate?!d.shouldCellUpdate(d.record,f.record):!1});Q.a=l},gRFJ:function(B,Q,D){B.exports=[D("rdUC"),D("ynwM"),D("RELg"),D("DlR+"),D("CrYA"),D("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(B){return B<10?"0"+B:B}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(B){return rx_escapable.lastIndex=0,rx_escapable.test(B)?'"'+B.replace(rx_escapable,function(Q){var D=meta[Q];return typeof D=="string"?D:"\\u"+("0000"+Q.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+B+'"'}function str(B,Q){var D,N,g,w,k=gap,b,m=Q[B];m&&typeof m=="object"&&typeof m.toJSON=="function"&&(m=m.toJSON(B)),typeof rep=="function"&&(m=rep.call(Q,B,m));switch(typeof m){case"string":return quote(m);case"number":return isFinite(m)?String(m):"null";case"boolean":case"null":return String(m);case"object":if(!m)return"null";if(gap+=indent,b=[],Object.prototype.toString.apply(m)==="[object Array]"){for(w=m.length,D=0;D<w;D+=1)b[D]=str(D,m)||"null";return g=b.length===0?"[]":gap?`[
|
|
|
`+gap+b.join(`,
|
|
|
`+gap)+`
|
|
|
`+k+"]":"["+b.join(",")+"]",gap=k,g}if(rep&&typeof rep=="object")for(w=rep.length,D=0;D<w;D+=1)typeof rep[D]=="string"&&(N=rep[D],g=str(N,m),g&&b.push(quote(N)+(gap?": ":":")+g));else for(N in m)Object.prototype.hasOwnProperty.call(m,N)&&(g=str(N,m),g&&b.push(quote(N)+(gap?": ":":")+g));return g=b.length===0?"{}":gap?`{
|
|
|
`+gap+b.join(`,
|
|
|
`+gap)+`
|
|
|
`+k+"}":"{"+b.join(",")+"}",gap=k,g}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(B,Q,D){var N;if(gap="",indent="",typeof D=="number")for(N=0;N<D;N+=1)indent+=" ";else typeof D=="string"&&(indent=D);if(rep=Q,Q&&typeof Q!="function"&&(typeof Q!="object"||typeof Q.length!="number"))throw new Error("JSON.stringify");return str("",{"":B})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(B,Q){var D,N,g=B[Q];if(g&&typeof g=="object")for(D in g)Object.prototype.hasOwnProperty.call(g,D)&&(N=walk(g,D),N!==void 0?g[D]=N:delete g[D]);return reviver.call(B,Q,g)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(B){return"\\u"+("0000"+B.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},"gb/T":function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("OLod"))})(this,function(N){return N.mode.ECB=function(){var g=N.lib.BlockCipherMode.extend();return g.Encryptor=g.extend({processBlock:function(w,k){this._cipher.encryptBlock(w,k)}}),g.Decryptor=g.extend({processBlock:function(w,k){this._cipher.decryptBlock(w,k)}}),g}(),N.mode.ECB})},h78n:function(B,Q,D){"use strict";D.d(Q,"a",function(){return A});var N=D("q1tI"),g=D.n(N),w=D("TSYQ"),k=D.n(w),b={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},m=function(O){var H=O.map(function(){return Object(N.useRef)()}),U=Object(N.useRef)();return Object(N.useEffect)(function(){var L=Date.now(),K=!1;Object.keys(H).forEach(function(ee){var oe=H[ee].current;if(!oe)return;K=!0;var ae=oe.style;ae.transitionDuration=".3s, .3s, .3s, .06s",U.current&&L-U.current<100&&(ae.transitionDuration="0s, 0s")}),K&&(U.current=Date.now())}),[H]};function T(){return T=Object.assign||function(z){for(var O=1;O<arguments.length;O++){var H=arguments[O];for(var U in H)Object.prototype.hasOwnProperty.call(H,U)&&(z[U]=H[U])}return z},T.apply(this,arguments)}function _(z,O){return i(z)||c(z,O)||h(z,O)||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 h(z,O){if(!z)return;if(typeof z=="string")return r(z,O);var H=Object.prototype.toString.call(z).slice(8,-1);if(H==="Object"&&z.constructor&&(H=z.constructor.name),H==="Map"||H==="Set")return Array.from(z);if(H==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H))return r(z,O)}function r(z,O){(O==null||O>z.length)&&(O=z.length);for(var H=0,U=new Array(O);H<O;H++)U[H]=z[H];return U}function c(z,O){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(z)))return;var H=[],U=!0,L=!1,K=void 0;try{for(var ee=z[Symbol.iterator](),oe;!(U=(oe=ee.next()).done)&&!(H.push(oe.value),O&&H.length===O);U=!0);}catch(ae){L=!0,K=ae}finally{try{!U&&ee.return!=null&&ee.return()}finally{if(L)throw K}}return H}function i(z){if(Array.isArray(z))return z}function n(z,O){if(z==null)return{};var H=l(z,O),U,L;if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(z);for(L=0;L<K.length;L++){if(U=K[L],O.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;H[U]=z[U]}}return H}function l(z,O){if(z==null)return{};var H={},U=Object.keys(z),L,K;for(K=0;K<U.length;K++){if(L=U[K],O.indexOf(L)>=0)continue;H[L]=z[L]}return H}var f=function(O){var H=O.className,U=O.percent,L=O.prefixCls,K=O.strokeColor,ee=O.strokeLinecap,oe=O.strokeWidth,ae=O.style,be=O.trailColor,_e=O.trailWidth,fe=O.transition,Re=n(O,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Re.gapPosition;var Ce=Array.isArray(U)?U:[U],ce=Array.isArray(K)?K:[K],te=m(Ce),W=_(te,1),X=W[0],V=oe/2,Z=100-oe/2,q="M ".concat(ee==="round"?V:0,",").concat(V,`
|
|
|
L `).concat(ee==="round"?Z:100,",").concat(V),ie="0 0 100 ".concat(oe),ne=0;return g.a.createElement("svg",T({className:k()("".concat(L,"-line"),H),viewBox:ie,preserveAspectRatio:"none",style:ae},Re),g.a.createElement("path",{className:"".concat(L,"-line-trail"),d:q,strokeLinecap:ee,stroke:be,strokeWidth:_e||oe,fillOpacity:"0"}),Ce.map(function(J,$){var le={strokeDasharray:"".concat(J,"px, 100px"),strokeDashoffset:"-".concat(ne,"px"),transition:fe||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},he=ce[$]||ce[ce.length-1];return ne+=J,g.a.createElement("path",{key:$,className:"".concat(L,"-line-path"),d:q,strokeLinecap:ee,stroke:he,strokeWidth:oe,fillOpacity:"0",ref:X[$],style:le})}))};f.defaultProps=b;var d=f;function u(){return u=Object.assign||function(z){for(var O=1;O<arguments.length;O++){var H=arguments[O];for(var U in H)Object.prototype.hasOwnProperty.call(H,U)&&(z[U]=H[U])}return z},u.apply(this,arguments)}function o(z,O){return I(z)||p(z,O)||E(z,O)||s()}function s(){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 E(z,O){if(!z)return;if(typeof z=="string")return v(z,O);var H=Object.prototype.toString.call(z).slice(8,-1);if(H==="Object"&&z.constructor&&(H=z.constructor.name),H==="Map"||H==="Set")return Array.from(z);if(H==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H))return v(z,O)}function v(z,O){(O==null||O>z.length)&&(O=z.length);for(var H=0,U=new Array(O);H<O;H++)U[H]=z[H];return U}function p(z,O){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(z)))return;var H=[],U=!0,L=!1,K=void 0;try{for(var ee=z[Symbol.iterator](),oe;!(U=(oe=ee.next()).done)&&!(H.push(oe.value),O&&H.length===O);U=!0);}catch(ae){L=!0,K=ae}finally{try{!U&&ee.return!=null&&ee.return()}finally{if(L)throw K}}return H}function I(z){if(Array.isArray(z))return z}function R(z,O){if(z==null)return{};var H=y(z,O),U,L;if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(z);for(L=0;L<K.length;L++){if(U=K[L],O.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;H[U]=z[U]}}return H}function y(z,O){if(z==null)return{};var H={},U=Object.keys(z),L,K;for(K=0;K<U.length;K++){if(L=U[K],O.indexOf(L)>=0)continue;H[L]=z[L]}return H}var x=0;function C(z){return+z.replace("%","")}function S(z){return Array.isArray(z)?z:[z]}function F(z,O,H,U){var L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,K=arguments.length>5?arguments[5]:void 0,ee=50-U/2,oe=0,ae=-ee,be=0,_e=-2*ee;switch(K){case"left":oe=-ee,ae=0,be=2*ee,_e=0;break;case"right":oe=ee,ae=0,be=-2*ee,_e=0;break;case"bottom":ae=ee,_e=2*ee;break;default:}var fe="M 50,50 m ".concat(oe,",").concat(ae,`
|
|
|
a `).concat(ee,",").concat(ee," 0 1 1 ").concat(be,",").concat(-_e,`
|
|
|
a `).concat(ee,",").concat(ee," 0 1 1 ").concat(-be,",").concat(_e),Re=Math.PI*2*ee,Ce={stroke:H,strokeDasharray:"".concat(O/100*(Re-L),"px ").concat(Re,"px"),strokeDashoffset:"-".concat(L/2+z/100*(Re-L),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:fe,pathStyle:Ce}}var j=function(O){var H=O.prefixCls,U=O.strokeWidth,L=O.trailWidth,K=O.gapDegree,ee=O.gapPosition,oe=O.trailColor,ae=O.strokeLinecap,be=O.style,_e=O.className,fe=O.strokeColor,Re=O.percent,Ce=R(O,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ce=Object(N.useMemo)(function(){return x+=1,x},[]),te=F(0,100,oe,U,K,ee),W=te.pathString,X=te.pathStyle,V=S(Re),Z=S(fe),q=Z.find(function(le){return Object.prototype.toString.call(le)==="[object Object]"}),ie=m(V),ne=o(ie,1),J=ne[0],$=function(){var he=0;return V.map(function(Se,Ue){var Xe=Z[Ue]||Z[Z.length-1],$e=Object.prototype.toString.call(Xe)==="[object Object]"?"url(#".concat(H,"-gradient-").concat(ce,")"):"",Ye=F(he,Se,Xe,U,K,ee);return he+=Se,g.a.createElement("path",{key:Ue,className:"".concat(H,"-circle-path"),d:Ye.pathString,stroke:$e,strokeLinecap:ae,strokeWidth:U,opacity:Se===0?0:1,fillOpacity:"0",style:Ye.pathStyle,ref:J[Ue]})})};return g.a.createElement("svg",u({className:k()("".concat(H,"-circle"),_e),viewBox:"0 0 100 100",style:be},Ce),q&&g.a.createElement("defs",null,g.a.createElement("linearGradient",{id:"".concat(H,"-gradient-").concat(ce),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(q).sort(function(le,he){return C(le)-C(he)}).map(function(le,he){return g.a.createElement("stop",{key:he,offset:le,stopColor:q[le]})}))),g.a.createElement("path",{className:"".concat(H,"-circle-trail"),d:W,stroke:oe,strokeLinecap:ae,strokeWidth:L||U,fillOpacity:"0",style:X}),$().reverse())};j.defaultProps=b;var A=j,Y={Line:d,Circle:A}},hW8S:function(B,Q,D){"use strict";D.d(Q,"a",function(){return k}),D.d(Q,"c",function(){return b}),D.d(Q,"b",function(){return m});var N=D("VTBJ"),g=D("Ff2n"),w=D("Kwbf"),k="RC_TABLE_INTERNAL_COL_DEFINE";function b(T){var _=T.expandable,t=Object(g.a)(T,["expandable"]);return"expandable"in T?Object(N.a)(Object(N.a)({},t),_):t}function m(T){return Object.keys(T).reduce(function(_,t){return(t.substr(0,5)==="data-"||t.substr(0,5)==="aria-")&&(_[t]=T[t]),_},{})}},i3hx:function(B,Q,D){},ic2d:function(B,Q,D){"use strict";D.d(Q,"a",function(){return k});var N=D("FWmy"),g=D("746U");class w{constructor(){this.data=new Map}add(b,m){N.a(g.l(b)),N.a(g.k(m)),N.a(!this.data.has(b),"There is already an extension with this id"),this.data.set(b,m)}as(b){return this.data.get(b)||null}}const k=new w},jO9C:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("OLod"))})(this,function(N){return N.pad.Iso97971={pad:function(g,w){g.concat(N.lib.WordArray.create([2147483648],1)),N.pad.ZeroPadding.pad(g,w)},unpad:function(g){N.pad.ZeroPadding.unpad(g),g.sigBytes--}},N.pad.Iso97971})},je13:function(B,Q,D){var N=D("5nXd"),g=D("gRFJ"),w=[D("uQRt")];B.exports=N.createStore(g,w)},k3GJ:function(B,Q,D){"use strict";D.d(Q,"a",function(){return mn});var N=D("rePB"),g=D("ODXe"),w=D("Ff2n"),k=D("VTBJ"),b=D("q1tI"),m=D("TSYQ"),T=D.n(m),_=D("Zm9Q"),t=D("6cGi"),h=D("KQm4"),r=D("xEkU"),c=D.n(r),i=D("t23M");function n(ke){var Ge=Object(b.useRef)(),Ve=Object(b.useRef)(!1);function Ne(){for(var Ee=arguments.length,De=new Array(Ee),Te=0;Te<Ee;Te++)De[Te]=arguments[Te];Ve.current||(c.a.cancel(Ge.current),Ge.current=c()(function(){ke.apply(void 0,De)}))}return Object(b.useEffect)(function(){return function(){Ve.current=!0,c.a.cancel(Ge.current)}},[]),Ne}function l(ke){var Ge=Object(b.useRef)([]),Ve=Object(b.useState)({}),Ne=Object(g.a)(Ve,2),Ee=Ne[1],De=Object(b.useRef)(typeof ke=="function"?ke():ke),Te=n(function(){var Be=De.current;Ge.current.forEach(function(ze){Be=ze(Be)}),Ge.current=[],De.current=Be,Ee({})});function je(Be){Ge.current.push(Be),Te()}return[De.current,je]}var f=D("4IlW");function d(ke,Ge){var Ve,Ne=ke.prefixCls,Ee=ke.id,De=ke.active,Te=ke.rtl,je=ke.tab,Be=je.key,ze=je.tab,Ke=je.disabled,Je=je.closeIcon,ot=ke.tabBarGutter,gt=ke.tabPosition,mt=ke.closable,Ot=ke.renderWrapper,Xt=ke.removeAriaLabel,sr=ke.editable,cr=ke.onClick,fr=ke.onRemove,Er=ke.onFocus,yr="".concat(Ne,"-tab");b.useEffect(function(){return fr},[]);var pr={};gt==="top"||gt==="bottom"?pr[Te?"marginLeft":"marginRight"]=ot:pr.marginBottom=ot;var Pr=sr&&mt!==!1&&!Ke;function Sr(rr){if(Ke)return;cr(rr)}function gn(rr){rr.preventDefault(),rr.stopPropagation(),sr.onEdit("remove",{key:Be,event:rr})}var Cr=b.createElement("div",{key:Be,ref:Ge,className:T()(yr,(Ve={},Object(N.a)(Ve,"".concat(yr,"-with-remove"),Pr),Object(N.a)(Ve,"".concat(yr,"-active"),De),Object(N.a)(Ve,"".concat(yr,"-disabled"),Ke),Ve)),style:pr,onClick:Sr},b.createElement("div",{role:"tab","aria-selected":De,id:Ee&&"".concat(Ee,"-tab-").concat(Be),className:"".concat(yr,"-btn"),"aria-controls":Ee&&"".concat(Ee,"-panel-").concat(Be),"aria-disabled":Ke,tabIndex:Ke?null:0,onClick:function(Jt){Jt.stopPropagation(),Sr(Jt)},onKeyDown:function(Jt){[f.a.SPACE,f.a.ENTER].includes(Jt.which)&&(Jt.preventDefault(),Sr(Jt))},onFocus:Er},ze),Pr&&b.createElement("button",{type:"button","aria-label":Xt||"remove",tabIndex:0,className:"".concat(yr,"-remove"),onClick:function(Jt){Jt.stopPropagation(),gn(Jt)}},Je||sr.removeIcon||"\xD7"));return Ot&&(Cr=Ot(Cr)),Cr}var u=b.forwardRef(d),o={width:0,height:0,left:0,top:0};function s(ke,Ge,Ve){return Object(b.useMemo)(function(){for(var Ne,Ee=new Map,De=Ge.get((Ne=ke[0])===null||Ne===void 0?void 0:Ne.key)||o,Te=De.left+De.width,je=0;je<ke.length;je+=1){var Be=ke[je].key,ze=Ge.get(Be);if(!ze){var Ke;ze=Ge.get((Ke=ke[je-1])===null||Ke===void 0?void 0:Ke.key)||o}var Je=Ee.get(Be)||Object(k.a)({},ze);Je.right=Te-Je.left-Je.width,Ee.set(Be,Je)}return Ee},[ke.map(function(Ne){return Ne.key}).join("_"),Ge,Ve])}var E={width:0,height:0,left:0,top:0,right:0};function v(ke,Ge,Ve,Ne,Ee){var De=Ee.tabs,Te=Ee.tabPosition,je=Ee.rtl,Be,ze,Ke;["top","bottom"].includes(Te)?(Be="width",ze=je?"right":"left",Ke=Math.abs(Ge.left)):(Be="height",ze="top",Ke=-Ge.top);var Je=Ge[Be],ot=Ve[Be],gt=Ne[Be],mt=Je;return ot+gt>Je&&(mt=Je-gt),Object(b.useMemo)(function(){if(!De.length)return[0,0];for(var Ot=De.length,Xt=Ot,sr=0;sr<Ot;sr+=1){var cr=ke.get(De[sr].key)||E;if(cr[ze]+cr[Be]>Ke+mt){Xt=sr-1;break}}for(var fr=0,Er=Ot-1;Er>=0;Er-=1){var yr=ke.get(De[Er].key)||E;if(yr[ze]<Ke){fr=Er+1;break}}return[fr,Xt]},[ke,Ke,mt,Te,De.map(function(Ot){return Ot.key}).join("_"),je])}var p=D("wx14"),I=D("1OyB"),R=D("vuIU"),y=D("JX7q"),x=D("Ji7U"),C=D("LK+K"),S=D("I8Z2"),F=D("bT9E"),j=D("2GS6"),A=D("Gytx"),Y=D.n(A),z=D("U8pU"),O=/iPhone/i,H=/iPod/i,U=/iPad/i,L=/\bAndroid(?:.+)Mobile\b/i,K=/Android/i,ee=/\bAndroid(?:.+)SD4930UR\b/i,oe=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,ae=/Windows Phone/i,be=/\bWindows(?:.+)ARM\b/i,_e=/BlackBerry/i,fe=/BB10/i,Re=/Opera Mini/i,Ce=/\b(CriOS|Chrome)(?:.+)Mobile/i,ce=/Mobile(?:.+)Firefox\b/i;function te(ke,Ge){return ke.test(Ge)}function W(ke){var Ge=ke||(typeof navigator!="undefined"?navigator.userAgent:""),Ve=(Ge||"").split("[FBAN");if(typeof Ve[1]!="undefined"){var Ne=Ve,Ee=Object(g.a)(Ne,1);Ge=Ee[0]}if(Ve=Ge.split("Twitter"),typeof Ve[1]!="undefined"){var De=Ve,Te=Object(g.a)(De,1);Ge=Te[0]}var je={apple:{phone:te(O,Ge)&&!te(ae,Ge),ipod:te(H,Ge),tablet:!te(O,Ge)&&te(U,Ge)&&!te(ae,Ge),device:(te(O,Ge)||te(H,Ge)||te(U,Ge))&&!te(ae,Ge)},amazon:{phone:te(ee,Ge),tablet:!te(ee,Ge)&&te(oe,Ge),device:te(ee,Ge)||te(oe,Ge)},android:{phone:!te(ae,Ge)&&te(ee,Ge)||!te(ae,Ge)&&te(L,Ge),tablet:!te(ae,Ge)&&!te(ee,Ge)&&!te(L,Ge)&&(te(oe,Ge)||te(K,Ge)),device:!te(ae,Ge)&&(te(ee,Ge)||te(oe,Ge)||te(L,Ge)||te(K,Ge))||te(/\bokhttp\b/i,Ge)},windows:{phone:te(ae,Ge),tablet:te(be,Ge),device:te(ae,Ge)||te(be,Ge)},other:{blackberry:te(_e,Ge),blackberry10:te(fe,Ge),opera:te(Re,Ge),firefox:te(ce,Ge),chrome:te(Ce,Ge),device:te(_e,Ge)||te(fe,Ge)||te(Re,Ge)||te(ce,Ge)||te(Ce,Ge)},any:null,phone:null,tablet:null};return je.any=je.apple.device||je.android.device||je.windows.device||je.other.device,je.phone=je.apple.phone||je.android.phone||je.windows.phone,je.tablet=je.apple.tablet||je.android.tablet||je.windows.tablet,je}var X=Object(k.a)(Object(k.a)({},W()),{},{isMobile:W}),V=X;function Z(){}function q(ke,Ge,Ve){var Ne=Ge||"";return ke.key||"".concat(Ne,"item_").concat(Ve)}function ie(ke){return"".concat(ke,"-menu-")}function ne(ke,Ge){var Ve=-1;b.Children.forEach(ke,function(Ne){Ve+=1,Ne&&Ne.type&&Ne.type.isMenuItemGroup?b.Children.forEach(Ne.props.children,function(Ee){Ve+=1,Ge(Ee,Ve)}):Ge(Ne,Ve)})}function J(ke,Ge,Ve){if(!ke||Ve.find)return;b.Children.forEach(ke,function(Ne){if(Ne){var Ee=Ne.type;if(!Ee||!(Ee.isSubMenu||Ee.isMenuItem||Ee.isMenuItemGroup))return;Ge.indexOf(Ne.key)!==-1?Ve.find=!0:Ne.props.children&&J(Ne.props.children,Ge,Ve)}})}var $=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],le=function(Ge){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ne=Ge&&typeof Ge.getBoundingClientRect=="function"&&Ge.getBoundingClientRect().width;if(Ne){if(Ve){var Ee=getComputedStyle(Ge),De=Ee.marginLeft,Te=Ee.marginRight;Ne+=+De.replace("px","")+ +Te.replace("px","")}Ne=+Ne.toFixed(6)}return Ne||0},he=function(Ge,Ve,Ne){Ge&&Object(z.a)(Ge.style)==="object"&&(Ge.style[Ve]=Ne)},Se=function(){return V.any},Ue=D("bdgK"),Xe=D("i8i4"),$e=D.n(Xe),Ye=D("wgJM"),et=D("l4aY"),qe=D("m+aA"),Pe=D("c+Xe"),Ie=D("zT1h"),Ze=D("QC+M");function nt(ke,Ge,Ve){return Ve?ke[0]===Ge[0]:ke[0]===Ge[0]&&ke[1]===Ge[1]}function ye(ke,Ge,Ve){var Ne=ke[Ge]||{};return Object(k.a)(Object(k.a)({},Ne),Ve)}function ue(ke,Ge,Ve,Ne){for(var Ee=Ve.points,De=Object.keys(ke),Te=0;Te<De.length;Te+=1){var je=De[Te];if(nt(ke[je].points,Ee,Ne))return"".concat(Ge,"-placement-").concat(je)}return""}var pe=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)))},me=D("MNnm");function Oe(ke,Ge){var Ve={};return Ve[ke.toLowerCase()]=Ge.toLowerCase(),Ve["Webkit".concat(ke)]="webkit".concat(Ge),Ve["Moz".concat(ke)]="moz".concat(Ge),Ve["ms".concat(ke)]="MS".concat(Ge),Ve["O".concat(ke)]="o".concat(Ge.toLowerCase()),Ve}function ve(ke,Ge){var Ve={animationend:Oe("Animation","AnimationEnd"),transitionend:Oe("Transition","TransitionEnd")};return ke&&("AnimationEvent"in Ge||delete Ve.animationend.animation,"TransitionEvent"in Ge||delete Ve.transitionend.transition),Ve}var xe=ve(Object(me.a)(),typeof window!="undefined"?window:{}),Ae={};if(Object(me.a)()){var Le=document.createElement("div");Ae=Le.style}var Me={};function We(ke){if(Me[ke])return Me[ke];var Ge=xe[ke];if(Ge)for(var Ve=Object.keys(Ge),Ne=Ve.length,Ee=0;Ee<Ne;Ee+=1){var De=Ve[Ee];if(Object.prototype.hasOwnProperty.call(Ge,De)&&De in Ae)return Me[ke]=Ge[De],Me[ke]}return""}var rt=We("animationend"),at=We("transitionend"),it=!!(rt&&at),st=rt||"animationend",Ct=at||"transitionend";function yt(ke,Ge){if(!ke)return null;if(Object(z.a)(ke)==="object"){var Ve=Ge.replace(/-\w/g,function(Ne){return Ne[1].toUpperCase()});return ke[Ve]}return"".concat(ke,"-").concat(Ge)}var ht="none",Ut="appear",kt="enter",Yt="leave",Zt="none",Mt="prepare",wt="start",$t="active",Dt="end";function Tt(ke){var Ge=Object(b.useRef)(!1),Ve=Object(b.useState)(ke),Ne=Object(g.a)(Ve,2),Ee=Ne[0],De=Ne[1];function Te(je){Ge.current||De(je)}return Object(b.useEffect)(function(){return function(){Ge.current=!0}},[]),[Ee,Te]}var _t=Object(me.a)()?b.useLayoutEffect:b.useEffect,Et=_t,Bt=function(){var ke=b.useRef(null);function Ge(){Ye.a.cancel(ke.current)}function Ve(Ne){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Ge();var De=Object(Ye.a)(function(){Ee<=1?Ne({isCanceled:function(){return De!==ke.current}}):Ve(Ne,Ee-1)});ke.current=De}return b.useEffect(function(){return function(){Ge()}},[]),[Ve,Ge]},Dr=[Mt,wt,$t,Dt],pt=!1,St=!0;function dt(ke){return ke===$t||ke===Dt}var Ht=function(ke,Ge){var Ve=b.useState(Zt),Ne=Object(g.a)(Ve,2),Ee=Ne[0],De=Ne[1],Te=Bt(),je=Object(g.a)(Te,2),Be=je[0],ze=je[1];function Ke(){De(Mt)}return Et(function(){if(Ee!==Zt&&Ee!==Dt){var Je=Dr.indexOf(Ee),ot=Dr[Je+1],gt=Ge(Ee);gt===pt?De(ot):Be(function(mt){function Ot(){if(mt.isCanceled())return;De(ot)}gt===!0?Ot():Promise.resolve(gt).then(Ot)})}},[ke,Ee]),b.useEffect(function(){return function(){ze()}},[]),[Ke,Ee]},Gt=function(ke){var Ge=Object(b.useRef)(),Ve=Object(b.useRef)(ke);Ve.current=ke;var Ne=b.useCallback(function(Te){Ve.current(Te)},[]);function Ee(Te){Te&&(Te.removeEventListener(Ct,Ne),Te.removeEventListener(st,Ne))}function De(Te){Ge.current&&Ge.current!==Te&&Ee(Ge.current),Te&&Te!==Ge.current&&(Te.addEventListener(Ct,Ne),Te.addEventListener(st,Ne),Ge.current=Te)}return b.useEffect(function(){return function(){Ee(Ge.current)}},[]),[De,Ee]};function vt(ke,Ge,Ve,Ne){var Ee=Ne.motionEnter,De=Ee===void 0?!0:Ee,Te=Ne.motionAppear,je=Te===void 0?!0:Te,Be=Ne.motionLeave,ze=Be===void 0?!0:Be,Ke=Ne.motionDeadline,Je=Ne.motionLeaveImmediately,ot=Ne.onAppearPrepare,gt=Ne.onEnterPrepare,mt=Ne.onLeavePrepare,Ot=Ne.onAppearStart,Xt=Ne.onEnterStart,sr=Ne.onLeaveStart,cr=Ne.onAppearActive,fr=Ne.onEnterActive,Er=Ne.onLeaveActive,yr=Ne.onAppearEnd,pr=Ne.onEnterEnd,Pr=Ne.onLeaveEnd,Sr=Ne.onVisibleChanged,gn=Tt(),Cr=Object(g.a)(gn,2),rr=Cr[0],Jt=Cr[1],Or=Tt(ht),Nr=Object(g.a)(Or,2),Vt=Nr[0],Br=Nr[1],vn=Tt(null),Gr=Object(g.a)(vn,2),en=Gr[0],Jr=Gr[1],Dn=Object(b.useRef)(!1),Jn=Object(b.useRef)(null),En=Object(b.useRef)(!1),yi=Object(b.useRef)(null);function Ui(){var on=Ve();return on||yi.current}var xi=Object(b.useRef)(!1);function Qn(on){var $r=Ui();if(on&&!on.deadline&&on.target!==$r)return;var Zn;Vt===Ut&&xi.current?Zn=yr==null?void 0:yr($r,on):Vt===kt&&xi.current?Zn=pr==null?void 0:pr($r,on):Vt===Yt&&xi.current&&(Zn=Pr==null?void 0:Pr($r,on)),Zn!==!1&&!En.current&&(Br(ht),Jr(null))}var ln=Gt(Qn),tn=Object(g.a)(ln,1),xn=tn[0],yn=b.useMemo(function(){var on,$r,Zn;switch(Vt){case"appear":return on={},Object(N.a)(on,Mt,ot),Object(N.a)(on,wt,Ot),Object(N.a)(on,$t,cr),on;case"enter":return $r={},Object(N.a)($r,Mt,gt),Object(N.a)($r,wt,Xt),Object(N.a)($r,$t,fr),$r;case"leave":return Zn={},Object(N.a)(Zn,Mt,mt),Object(N.a)(Zn,wt,sr),Object(N.a)(Zn,$t,Er),Zn;default:return{}}},[Vt]),Bi=Ht(Vt,function(on){if(on===Mt){var $r=yn[Mt];return $r?$r(Ui()):pt}if(Qr in yn){var Zn;Jr(((Zn=yn[Qr])===null||Zn===void 0?void 0:Zn.call(yn,Ui(),null))||null)}return Qr===$t&&(xn(Ui()),Ke>0&&(clearTimeout(Jn.current),Jn.current=setTimeout(function(){Qn({deadline:!0})},Ke))),St}),ta=Object(g.a)(Bi,2),ra=ta[0],Qr=ta[1],Yi=dt(Qr);xi.current=Yi,Et(function(){Jt(Ge);var on=Dn.current;if(Dn.current=!0,!ke)return;var $r;!on&&Ge&&je&&($r=Ut),on&&Ge&&De&&($r=kt),(on&&!Ge&&ze||!on&&Je&&!Ge&&ze)&&($r=Yt),$r&&(Br($r),ra())},[Ge]),Object(b.useEffect)(function(){(Vt===Ut&&!je||Vt===kt&&!De||Vt===Yt&&!ze)&&Br(ht)},[je,De,ze]),Object(b.useEffect)(function(){return function(){clearTimeout(Jn.current),En.current=!0}},[]),Object(b.useEffect)(function(){rr!==void 0&&Vt===ht&&(Sr==null||Sr(rr))},[rr,Vt]);var na=en;return yn[Mt]&&Qr===wt&&(na=Object(k.a)({transition:"none"},na)),[Vt,Qr,na,rr!=null?rr:Ge]}var xt=function(ke){Object(x.a)(Ve,ke);var Ge=Object(C.a)(Ve);function Ve(){return Object(I.a)(this,Ve),Ge.apply(this,arguments)}return Object(R.a)(Ve,[{key:"render",value:function(){return this.props.children}}]),Ve}(b.Component),Kt=xt;function Ar(ke){var Ge=ke;Object(z.a)(ke)==="object"&&(Ge=ke.transitionSupport);function Ve(Ee){return!!(Ee.motionName&&Ge)}var Ne=b.forwardRef(function(Ee,De){var Te=Ee.visible,je=Te===void 0?!0:Te,Be=Ee.removeOnLeave,ze=Be===void 0?!0:Be,Ke=Ee.forceRender,Je=Ee.children,ot=Ee.motionName,gt=Ee.leavedClassName,mt=Ee.eventProps,Ot=Ve(Ee),Xt=Object(b.useRef)(),sr=Object(b.useRef)();function cr(){try{return Object(qe.a)(Xt.current||sr.current)}catch(Br){return null}}var fr=vt(Ot,je,cr,Ee),Er=Object(g.a)(fr,4),yr=Er[0],pr=Er[1],Pr=Er[2],Sr=Er[3],gn=b.useRef(Sr);Sr&&(gn.current=!0);var Cr=Object(b.useRef)(De);Cr.current=De;var rr=b.useCallback(function(Br){Xt.current=Br,Object(Pe.b)(Cr.current,Br)},[]),Jt,Or=Object(k.a)(Object(k.a)({},mt),{},{visible:je});if(!Je)Jt=null;else if(yr===ht||!Ve(Ee))Sr?Jt=Je(Object(k.a)({},Or),rr):!ze&&gn.current?Jt=Je(Object(k.a)(Object(k.a)({},Or),{},{className:gt}),rr):Ke?Jt=Je(Object(k.a)(Object(k.a)({},Or),{},{style:{display:"none"}}),rr):Jt=null;else{var Nr,Vt;pr===Mt?Vt="prepare":dt(pr)?Vt="active":pr===wt&&(Vt="start"),Jt=Je(Object(k.a)(Object(k.a)({},Or),{},{className:T()(yt(ot,yr),(Nr={},Object(N.a)(Nr,yt(ot,"".concat(yr,"-").concat(Vt)),Vt),Object(N.a)(Nr,ot,typeof ot=="string"),Nr)),style:Pr}),rr)}return b.createElement(Kt,{ref:sr},Jt)});return Ne.displayName="CSSMotion",Ne}var qt=Ar(it),ut="add",Lt="keep",Hr="remove",Yr="removed";function On(ke){var Ge;return ke&&Object(z.a)(ke)==="object"&&"key"in ke?Ge=ke:Ge={key:ke},Object(k.a)(Object(k.a)({},Ge),{},{key:String(Ge.key)})}function cn(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return ke.map(On)}function zr(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ve=[],Ne=0,Ee=Ge.length,De=cn(ke),Te=cn(Ge);De.forEach(function(ze){for(var Ke=!1,Je=Ne;Je<Ee;Je+=1){var ot=Te[Je];if(ot.key===ze.key){Ne<Je&&(Ve=Ve.concat(Te.slice(Ne,Je).map(function(gt){return Object(k.a)(Object(k.a)({},gt),{},{status:ut})})),Ne=Je),Ve.push(Object(k.a)(Object(k.a)({},ot),{},{status:Lt})),Ne+=1,Ke=!0;break}}Ke||Ve.push(Object(k.a)(Object(k.a)({},ze),{},{status:Hr}))}),Ne<Ee&&(Ve=Ve.concat(Te.slice(Ne).map(function(ze){return Object(k.a)(Object(k.a)({},ze),{},{status:ut})})));var je={};Ve.forEach(function(ze){var Ke=ze.key;je[Ke]=(je[Ke]||0)+1});var Be=Object.keys(je).filter(function(ze){return je[ze]>1});return Be.forEach(function(ze){Ve=Ve.filter(function(Ke){var Je=Ke.key,ot=Ke.status;return Je!==ze||ot!==Hr}),Ve.forEach(function(Ke){Ke.key===ze&&(Ke.status=Lt)})}),Ve}var Pt=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function dn(ke){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qt,Ve=function(Ne){Object(x.a)(De,Ne);var Ee=Object(C.a)(De);function De(){var Te;return Object(I.a)(this,De),Te=Ee.apply(this,arguments),Te.state={keyEntities:[]},Te.removeKey=function(je){Te.setState(function(Be){var ze=Be.keyEntities;return{keyEntities:ze.map(function(Ke){return Ke.key!==je?Ke:Object(k.a)(Object(k.a)({},Ke),{},{status:Yr})})}})},Te}return Object(R.a)(De,[{key:"render",value:function(){var je=this,Be=this.state.keyEntities,ze=this.props,Ke=ze.component,Je=ze.children,ot=ze.onVisibleChanged,gt=Object(w.a)(ze,["component","children","onVisibleChanged"]),mt=Ke||b.Fragment,Ot={};return Pt.forEach(function(Xt){Ot[Xt]=gt[Xt],delete gt[Xt]}),delete gt.keys,b.createElement(mt,gt,Be.map(function(Xt){var sr=Xt.status,cr=Object(w.a)(Xt,["status"]),fr=sr===ut||sr===Lt;return b.createElement(Ge,Object(p.a)({},Ot,{key:cr.key,visible:fr,eventProps:cr,onVisibleChanged:function(yr){ot==null||ot(yr,{key:cr.key}),yr||je.removeKey(cr.key)}}),Je)}))}}],[{key:"getDerivedStateFromProps",value:function(je,Be){var ze=je.keys,Ke=Be.keyEntities,Je=cn(ze),ot=zr(Ke,Je);return{keyEntities:ot.filter(function(gt){var mt=Ke.find(function(Ot){var Xt=Ot.key;return gt.key===Xt});return!(mt&&mt.status===Yr&>.status===Hr)})}}}]),De}(b.Component);return Ve.defaultProps={component:"div"},Ve}var ct=dn(it),jr=qt;function xr(ke){var Ge=ke.prefixCls,Ve=ke.motion,Ne=ke.animation,Ee=ke.transitionName;return Ve||(Ne?{motionName:"".concat(Ge,"-").concat(Ne)}:Ee?{motionName:Ee}:null)}function Gn(ke){var Ge=ke.prefixCls,Ve=ke.visible,Ne=ke.zIndex,Ee=ke.mask,De=ke.maskMotion,Te=ke.maskAnimation,je=ke.maskTransitionName;if(!Ee)return null;var Be={};return(De||je||Te)&&(Be=Object(k.a)({motionAppear:!0},xr({motion:De,prefixCls:Ge,transitionName:je,animation:Te}))),b.createElement(jr,Object(p.a)({},Be,{visible:Ve,removeOnLeave:!0}),function(ze){var Ke=ze.className;return b.createElement("div",{style:{zIndex:Ne},className:T()("".concat(Ge,"-mask"),Ke)})})}var An=D("9mu1"),hn=D("o0o1"),Ei=D.n(hn),Kn=D("HaE+"),bn=["measure","align",null,"motion"],Fr=function(ke,Ge){var Ve=Object(b.useState)(null),Ne=Object(g.a)(Ve,2),Ee=Ne[0],De=Ne[1],Te=Object(b.useRef)(),je=Object(b.useRef)(!1);function Be(Je){je.current||De(Je)}function ze(){Ye.a.cancel(Te.current)}function Ke(Je){ze(),Te.current=Object(Ye.a)(function(){Be(function(ot){switch(Ee){case"align":return"motion";case"motion":return"stable";default:}return ot}),Je==null||Je()})}return Object(b.useEffect)(function(){Be("measure")},[ke]),Object(b.useEffect)(function(){switch(Ee){case"measure":Ge();break;default:}Ee&&(Te.current=Object(Ye.a)(Object(Kn.a)(Ei.a.mark(function Je(){var ot,gt;return Ei.a.wrap(function(Ot){for(;;)switch(Ot.prev=Ot.next){case 0:ot=bn.indexOf(Ee),gt=bn[ot+1],gt&&ot!==-1&&Be(gt);case 3:case"end":return Ot.stop()}},Je)}))))},[Ee]),Object(b.useEffect)(function(){return function(){je.current=!0,ze()}},[]),[Ee,Ke]},di=function(ke){var Ge=b.useState({width:0,height:0}),Ve=Object(g.a)(Ge,2),Ne=Ve[0],Ee=Ve[1];function De(je){Ee({width:je.offsetWidth,height:je.offsetHeight})}var Te=b.useMemo(function(){var je={};if(ke){var Be=Ne.width,ze=Ne.height;ke.indexOf("height")!==-1&&ze?je.height=ze:ke.indexOf("minHeight")!==-1&&ze&&(je.minHeight=ze),ke.indexOf("width")!==-1&&Be?je.width=Be:ke.indexOf("minWidth")!==-1&&Be&&(je.minWidth=Be)}return je},[ke,Ne]);return[Te,De]},fn=b.forwardRef(function(ke,Ge){var Ve=ke.visible,Ne=ke.prefixCls,Ee=ke.className,De=ke.style,Te=ke.children,je=ke.zIndex,Be=ke.stretch,ze=ke.destroyPopupOnHide,Ke=ke.forceRender,Je=ke.align,ot=ke.point,gt=ke.getRootDomNode,mt=ke.getClassNameFromAlign,Ot=ke.onAlign,Xt=ke.onMouseEnter,sr=ke.onMouseLeave,cr=ke.onMouseDown,fr=ke.onTouchStart,Er=Object(b.useRef)(),yr=Object(b.useRef)(),pr=Object(b.useState)(),Pr=Object(g.a)(pr,2),Sr=Pr[0],gn=Pr[1],Cr=di(Be),rr=Object(g.a)(Cr,2),Jt=rr[0],Or=rr[1];function Nr(){Be&&Or(gt())}var Vt=Fr(Ve,Nr),Br=Object(g.a)(Vt,2),vn=Br[0],Gr=Br[1],en=Object(b.useRef)();function Jr(){return ot||gt}function Dn(){var ln;(ln=Er.current)===null||ln===void 0||ln.forceAlign()}function Jn(ln,tn){var xn=mt(tn);Sr!==xn&&gn(xn),vn==="align"&&(Sr!==xn?Promise.resolve().then(function(){Dn()}):Gr(function(){var yn;(yn=en.current)===null||yn===void 0||yn.call(en)}),Ot==null||Ot(ln,tn))}var En=Object(k.a)({},xr(ke));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(ln){var tn=En[ln];En[ln]=function(xn,yn){return Gr(),tn==null?void 0:tn(xn,yn)}});function yi(){return new Promise(function(ln){en.current=ln})}b.useEffect(function(){!En.motionName&&vn==="motion"&&Gr()},[En.motionName,vn]),b.useImperativeHandle(Ge,function(){return{forceAlign:Dn,getElement:function(){return yr.current}}});var Ui=Object(k.a)(Object(k.a)({},Jt),{},{zIndex:je,opacity:vn==="motion"||vn==="stable"||!Ve?void 0:0,pointerEvents:vn==="stable"?void 0:"none"},De),xi=!0;(Je==null?void 0:Je.points)&&(vn==="align"||vn==="stable")&&(xi=!1);var Qn=Te;return b.Children.count(Te)>1&&(Qn=b.createElement("div",{className:"".concat(Ne,"-content")},Te)),b.createElement(jr,Object(p.a)({visible:Ve,ref:yr,leavedClassName:"".concat(Ne,"-hidden")},En,{onAppearPrepare:yi,onEnterPrepare:yi,removeOnLeave:ze,forceRender:Ke}),function(ln,tn){var xn=ln.className,yn=ln.style,Bi=T()(Ne,Ee,Sr,xn);return b.createElement(An.a,{target:Jr(),key:"popup",ref:Er,monitorWindowResize:!0,disabled:xi,align:Je,onAlign:Jn},b.createElement("div",{ref:tn,className:Bi,onMouseEnter:Xt,onMouseLeave:sr,onMouseDownCapture:cr,onTouchStartCapture:fr,style:Object(k.a)(Object(k.a)({},yn),Ui)},Qn))})});fn.displayName="PopupInner";var Vr=fn,dr=b.forwardRef(function(ke,Ge){var Ve=ke.prefixCls,Ne=ke.visible,Ee=ke.zIndex,De=ke.children,Te=ke.mobile;Te=Te===void 0?{}:Te;var je=Te.popupClassName,Be=Te.popupStyle,ze=Te.popupMotion,Ke=ze===void 0?{}:ze,Je=Te.popupRender,ot=b.useRef();b.useImperativeHandle(Ge,function(){return{forceAlign:function(){},getElement:function(){return ot.current}}});var gt=Object(k.a)({zIndex:Ee},Be),mt=De;return b.Children.count(De)>1&&(mt=b.createElement("div",{className:"".concat(Ve,"-content")},De)),Je&&(mt=Je(mt)),b.createElement(jr,Object(p.a)({visible:Ne,ref:ot,removeOnLeave:!0},Ke),function(Ot,Xt){var sr=Ot.className,cr=Ot.style,fr=T()(Ve,je,sr);return b.createElement("div",{ref:Xt,className:fr,style:Object(k.a)(Object(k.a)({},cr),gt)},mt)})});dr.displayName="MobilePopupInner";var nn=dr,_n=["visible","mobile"],jt=b.forwardRef(function(ke,Ge){var Ve=ke.visible,Ne=ke.mobile,Ee=Object(w.a)(ke,_n),De=Object(b.useState)(Ve),Te=Object(g.a)(De,2),je=Te[0],Be=Te[1],ze=Object(b.useState)(!1),Ke=Object(g.a)(ze,2),Je=Ke[0],ot=Ke[1],gt=Object(k.a)(Object(k.a)({},Ee),{},{visible:je});Object(b.useEffect)(function(){Be(Ve),Ve&&Ne&&ot(pe())},[Ve,Ne]);var mt=Je?b.createElement(nn,Object(p.a)({},gt,{mobile:Ne,ref:Ge})):b.createElement(Vr,Object(p.a)({},gt,{ref:Ge}));return b.createElement("div",null,b.createElement(Gn,gt),mt)});jt.displayName="Popup";var lr=jt,ur=b.createContext(null),Rr=ur;function br(){}function hi(){return""}function Fn(ke){return ke?ke.ownerDocument:window.document}var $i=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Ji(ke){var Ge=function(Ve){Object(x.a)(Ee,Ve);var Ne=Object(C.a)(Ee);function Ee(De){var Te;Object(I.a)(this,Ee),Te=Ne.call(this,De),Te.popupRef=b.createRef(),Te.triggerRef=b.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(Be){var ze=Te.props.mouseEnterDelay;Te.fireEvents("onMouseEnter",Be),Te.delaySetPopupVisible(!0,ze,ze?null:Be)},Te.onMouseMove=function(Be){Te.fireEvents("onMouseMove",Be),Te.setPoint(Be)},Te.onMouseLeave=function(Be){Te.fireEvents("onMouseLeave",Be),Te.delaySetPopupVisible(!1,Te.props.mouseLeaveDelay)},Te.onPopupMouseEnter=function(){Te.clearDelayTimer()},Te.onPopupMouseLeave=function(Be){var ze;if(Be.relatedTarget&&!Be.relatedTarget.setTimeout&&Object(et.a)((ze=Te.popupRef.current)===null||ze===void 0?void 0:ze.getElement(),Be.relatedTarget))return;Te.delaySetPopupVisible(!1,Te.props.mouseLeaveDelay)},Te.onFocus=function(Be){Te.fireEvents("onFocus",Be),Te.clearDelayTimer(),Te.isFocusToShow()&&(Te.focusTime=Date.now(),Te.delaySetPopupVisible(!0,Te.props.focusDelay))},Te.onMouseDown=function(Be){Te.fireEvents("onMouseDown",Be),Te.preClickTime=Date.now()},Te.onTouchStart=function(Be){Te.fireEvents("onTouchStart",Be),Te.preTouchTime=Date.now()},Te.onBlur=function(Be){Te.fireEvents("onBlur",Be),Te.clearDelayTimer(),Te.isBlurToHide()&&Te.delaySetPopupVisible(!1,Te.props.blurDelay)},Te.onContextMenu=function(Be){Be.preventDefault(),Te.fireEvents("onContextMenu",Be),Te.setPopupVisible(!0,Be)},Te.onContextMenuClose=function(){Te.isContextMenuToShow()&&Te.close()},Te.onClick=function(Be){if(Te.fireEvents("onClick",Be),Te.focusTime){var ze;if(Te.preClickTime&&Te.preTouchTime?ze=Math.min(Te.preClickTime,Te.preTouchTime):Te.preClickTime?ze=Te.preClickTime:Te.preTouchTime&&(ze=Te.preTouchTime),Math.abs(ze-Te.focusTime)<20)return;Te.focusTime=0}Te.preClickTime=0,Te.preTouchTime=0,Te.isClickToShow()&&(Te.isClickToHide()||Te.isBlurToHide())&&Be&&Be.preventDefault&&Be.preventDefault();var Ke=!Te.state.popupVisible;(Te.isClickToHide()&&!Ke||Ke&&Te.isClickToShow())&&Te.setPopupVisible(!Te.state.popupVisible,Be)},Te.onPopupMouseDown=function(){if(Te.hasPopupMouseDown=!0,clearTimeout(Te.mouseDownTimeout),Te.mouseDownTimeout=window.setTimeout(function(){Te.hasPopupMouseDown=!1},0),Te.context){var Be;(Be=Te.context).onPopupMouseDown.apply(Be,arguments)}},Te.onDocumentClick=function(Be){if(Te.props.mask&&!Te.props.maskClosable)return;var ze=Be.target,Ke=Te.getRootDomNode(),Je=Te.getPopupDomNode();(!Object(et.a)(Ke,ze)||Te.isContextMenuOnly())&&!Object(et.a)(Je,ze)&&!Te.hasPopupMouseDown&&Te.close()},Te.getRootDomNode=function(){var Be=Te.props.getTriggerDOMNode;if(Be)return Be(Te.triggerRef.current);try{var ze=Object(qe.a)(Te.triggerRef.current);if(ze)return ze}catch(Ke){}return $e.a.findDOMNode(Object(y.a)(Te))},Te.getPopupClassNameFromAlign=function(Be){var ze=[],Ke=Te.props,Je=Ke.popupPlacement,ot=Ke.builtinPlacements,gt=Ke.prefixCls,mt=Ke.alignPoint,Ot=Ke.getPopupClassNameFromAlign;return Je&&ot&&ze.push(ue(ot,gt,Be,mt)),Ot&&ze.push(Ot(Be)),ze.join(" ")},Te.getComponent=function(){var Be=Te.props,ze=Be.prefixCls,Ke=Be.destroyPopupOnHide,Je=Be.popupClassName,ot=Be.onPopupAlign,gt=Be.popupMotion,mt=Be.popupAnimation,Ot=Be.popupTransitionName,Xt=Be.popupStyle,sr=Be.mask,cr=Be.maskAnimation,fr=Be.maskTransitionName,Er=Be.maskMotion,yr=Be.zIndex,pr=Be.popup,Pr=Be.stretch,Sr=Be.alignPoint,gn=Be.mobile,Cr=Be.forceRender,rr=Te.state,Jt=rr.popupVisible,Or=rr.point,Nr=Te.getPopupAlign(),Vt={};return Te.isMouseEnterToShow()&&(Vt.onMouseEnter=Te.onPopupMouseEnter),Te.isMouseLeaveToHide()&&(Vt.onMouseLeave=Te.onPopupMouseLeave),Vt.onMouseDown=Te.onPopupMouseDown,Vt.onTouchStart=Te.onPopupMouseDown,b.createElement(lr,Object(p.a)({prefixCls:ze,destroyPopupOnHide:Ke,visible:Jt,point:Sr&&Or,className:Je,align:Nr,onAlign:ot,animation:mt,getClassNameFromAlign:Te.getPopupClassNameFromAlign},Vt,{stretch:Pr,getRootDomNode:Te.getRootDomNode,style:Xt,mask:sr,zIndex:yr,transitionName:Ot,maskAnimation:cr,maskTransitionName:fr,maskMotion:Er,ref:Te.popupRef,motion:gt,mobile:gn,forceRender:Cr}),typeof pr=="function"?pr():pr)},Te.attachParent=function(Be){Ye.a.cancel(Te.attachId);var ze=Te.props,Ke=ze.getPopupContainer,Je=ze.getDocument,ot=Te.getRootDomNode(),gt;Ke?(ot||Ke.length===0)&&(gt=Ke(ot)):gt=Je(Te.getRootDomNode()).body,gt?gt.appendChild(Be):Te.attachId=Object(Ye.a)(function(){Te.attachParent(Be)})},Te.getContainer=function(){var Be=Te.props.getDocument,ze=Be(Te.getRootDomNode()).createElement("div");return ze.style.position="absolute",ze.style.top="0",ze.style.left="0",ze.style.width="100%",Te.attachParent(ze),ze},Te.setPoint=function(Be){var ze=Te.props.alignPoint;if(!ze||!Be)return;Te.setState({point:{pageX:Be.pageX,pageY:Be.pageY}})},Te.handlePortalUpdate=function(){Te.state.prevPopupVisible!==Te.state.popupVisible&&Te.props.afterPopupVisibleChange(Te.state.popupVisible)},Te.triggerContextValue={onPopupMouseDown:Te.onPopupMouseDown};var je;return"popupVisible"in De?je=!!De.popupVisible:je=!!De.defaultPopupVisible,Te.state={prevPopupVisible:je,popupVisible:je},$i.forEach(function(Be){Te["fire".concat(Be)]=function(ze){Te.fireEvents(Be,ze)}}),Te}return Object(R.a)(Ee,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Te=this.props,je=this.state;if(je.popupVisible){var Be;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Be=Te.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ie.a)(Be,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Be=Be||Te.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ie.a)(Be,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Be=Be||Te.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ie.a)(Be,"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),Ye.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,je=Te.popupPlacement,Be=Te.popupAlign,ze=Te.builtinPlacements;return je&&ze?ye(ze,je,Be):Be}},{key:"setPopupVisible",value:function(Te,je){var Be=this.props.alignPoint,ze=this.state.popupVisible;this.clearDelayTimer(),ze!==Te&&("popupVisible"in this.props||this.setState({popupVisible:Te,prevPopupVisible:ze}),this.props.onPopupVisibleChange(Te)),Be&&je&&Te&&this.setPoint(je)}},{key:"delaySetPopupVisible",value:function(Te,je,Be){var ze=this,Ke=je*1e3;if(this.clearDelayTimer(),Ke){var Je=Be?{pageX:Be.pageX,pageY:Be.pageY}:null;this.delayTimer=window.setTimeout(function(){ze.setPopupVisible(Te,Je),ze.clearDelayTimer()},Ke)}else this.setPopupVisible(Te,Be)}},{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 je=this.props.children.props,Be=this.props;return je[Te]&&Be[Te]?this["fire".concat(Te)]:je[Te]||Be[Te]}},{key:"isClickToShow",value:function(){var Te=this.props,je=Te.action,Be=Te.showAction;return je.indexOf("click")!==-1||Be.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,je=Te.action,Be=Te.showAction;return je.indexOf("contextMenu")!==-1||Be.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var Te=this.props,je=Te.action,Be=Te.hideAction;return je.indexOf("click")!==-1||Be.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var Te=this.props,je=Te.action,Be=Te.showAction;return je.indexOf("hover")!==-1||Be.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var Te=this.props,je=Te.action,Be=Te.hideAction;return je.indexOf("hover")!==-1||Be.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var Te=this.props,je=Te.action,Be=Te.showAction;return je.indexOf("focus")!==-1||Be.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var Te=this.props,je=Te.action,Be=Te.hideAction;return je.indexOf("focus")!==-1||Be.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,je){var Be=this.props.children.props[Te];Be&&Be(je);var ze=this.props[Te];ze&&ze(je)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var Te=this.state.popupVisible,je=this.props,Be=je.children,ze=je.forceRender,Ke=je.alignPoint,Je=je.className,ot=je.autoDestroy,gt=b.Children.only(Be),mt={key:"trigger"};this.isContextMenuToShow()?mt.onContextMenu=this.onContextMenu:mt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(mt.onClick=this.onClick,mt.onMouseDown=this.onMouseDown,mt.onTouchStart=this.onTouchStart):(mt.onClick=this.createTwoChains("onClick"),mt.onMouseDown=this.createTwoChains("onMouseDown"),mt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(mt.onMouseEnter=this.onMouseEnter,Ke&&(mt.onMouseMove=this.onMouseMove)):mt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?mt.onMouseLeave=this.onMouseLeave:mt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(mt.onFocus=this.onFocus,mt.onBlur=this.onBlur):(mt.onFocus=this.createTwoChains("onFocus"),mt.onBlur=this.createTwoChains("onBlur"));var Ot=T()(gt&>.props&>.props.className,Je);Ot&&(mt.className=Ot);var Xt=Object(k.a)({},mt);Object(Pe.c)(gt)&&(Xt.ref=Object(Pe.a)(this.triggerRef,gt.ref));var sr=b.cloneElement(gt,Xt),cr;return(Te||this.popupRef.current||ze)&&(cr=b.createElement(ke,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!Te&&ot&&(cr=null),b.createElement(Rr.Provider,{value:this.triggerContextValue},sr,cr)}}],[{key:"getDerivedStateFromProps",value:function(Te,je){var Be=Te.popupVisible,ze={};return Be!==void 0&&je.popupVisible!==Be&&(ze.popupVisible=Be,ze.prevPopupVisible=je.popupVisible),ze}}]),Ee}(b.Component);return Ge.contextType=Rr,Ge.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:hi,getDocument:Fn,onPopupVisibleChange:br,afterPopupVisibleChange:br,onPopupAlign:br,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Ge}var Oi=Ji(Ze.a),pn={adjustX:1,adjustY:1},Ki={topLeft:{points:["bl","tl"],overflow:pn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:pn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:pn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:pn,offset:[4,0]}},Zr={topLeft:{points:["bl","tl"],overflow:pn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:pn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:pn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:pn,offset:[4,0]}},ri=Ki,kn=0,sn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Tn=function(Ge,Ve,Ne){var Ee=ie(Ve),De=Ge.getState();Ge.setState({defaultActiveFirst:Object(k.a)(Object(k.a)({},De.defaultActiveFirst),{},Object(N.a)({},Ee,Ne))})},fi=function(ke){Object(x.a)(Ve,ke);var Ge=Object(C.a)(Ve);function Ve(Ne){var Ee;Object(I.a)(this,Ve),Ee=Ge.call(this,Ne),Ee.onDestroy=function(Ke){Ee.props.onDestroy(Ke)},Ee.onKeyDown=function(Ke){var Je=Ke.keyCode,ot=Ee.menuInstance,gt=Ee.props.store,mt=Ee.getVisible();if(Je===f.a.ENTER)return Ee.onTitleClick(Ke),Tn(gt,Ee.props.eventKey,!0),!0;if(Je===f.a.RIGHT)return mt?ot.onKeyDown(Ke):(Ee.triggerOpenChange(!0),Tn(gt,Ee.props.eventKey,!0)),!0;if(Je===f.a.LEFT){var Ot;if(mt)Ot=ot.onKeyDown(Ke);else return;return Ot||(Ee.triggerOpenChange(!1),Ot=!0),Ot}return mt&&(Je===f.a.UP||Je===f.a.DOWN)?ot.onKeyDown(Ke):void 0},Ee.onOpenChange=function(Ke){Ee.props.onOpenChange(Ke)},Ee.onPopupVisibleChange=function(Ke){Ee.triggerOpenChange(Ke,Ke?"mouseenter":"mouseleave")},Ee.onMouseEnter=function(Ke){var Je=Ee.props,ot=Je.eventKey,gt=Je.onMouseEnter,mt=Je.store;Tn(mt,Ee.props.eventKey,!1),gt({key:ot,domEvent:Ke})},Ee.onMouseLeave=function(Ke){var Je=Ee.props,ot=Je.parentMenu,gt=Je.eventKey,mt=Je.onMouseLeave;ot.subMenuInstance=Object(y.a)(Ee),mt({key:gt,domEvent:Ke})},Ee.onTitleMouseEnter=function(Ke){var Je=Ee.props,ot=Je.eventKey,gt=Je.onItemHover,mt=Je.onTitleMouseEnter;gt({key:ot,hover:!0}),mt({key:ot,domEvent:Ke})},Ee.onTitleMouseLeave=function(Ke){var Je=Ee.props,ot=Je.parentMenu,gt=Je.eventKey,mt=Je.onItemHover,Ot=Je.onTitleMouseLeave;ot.subMenuInstance=Object(y.a)(Ee),mt({key:gt,hover:!1}),Ot({key:gt,domEvent:Ke})},Ee.onTitleClick=function(Ke){var Je=Object(y.a)(Ee),ot=Je.props;if(ot.onTitleClick({key:ot.eventKey,domEvent:Ke}),ot.triggerSubMenuAction==="hover")return;Ee.triggerOpenChange(!Ee.getVisible(),"click"),Tn(ot.store,Ee.props.eventKey,!1)},Ee.onSubMenuClick=function(Ke){typeof Ee.props.onClick=="function"&&Ee.props.onClick(Ee.addKeyPath(Ke))},Ee.onSelect=function(Ke){Ee.props.onSelect(Ke)},Ee.onDeselect=function(Ke){Ee.props.onDeselect(Ke)},Ee.getPrefixCls=function(){return"".concat(Ee.props.rootPrefixCls,"-submenu")},Ee.getActiveClassName=function(){return"".concat(Ee.getPrefixCls(),"-active")},Ee.getDisabledClassName=function(){return"".concat(Ee.getPrefixCls(),"-disabled")},Ee.getSelectedClassName=function(){return"".concat(Ee.getPrefixCls(),"-selected")},Ee.getOpenClassName=function(){return"".concat(Ee.props.rootPrefixCls,"-submenu-open")},Ee.getVisible=function(){return Ee.state.isOpen},Ee.getMode=function(){return Ee.state.mode},Ee.saveMenuInstance=function(Ke){Ee.menuInstance=Ke},Ee.addKeyPath=function(Ke){return Object(k.a)(Object(k.a)({},Ke),{},{keyPath:(Ke.keyPath||[]).concat(Ee.props.eventKey)})},Ee.triggerOpenChange=function(Ke,Je){var ot=Ee.props.eventKey,gt=function(){Ee.onOpenChange({key:ot,item:Object(y.a)(Ee),trigger:Je,open:Ke})};Je==="mouseenter"?Ee.mouseenterTimeout=setTimeout(function(){gt()},0):gt()},Ee.isChildrenSelected=function(){var Ke={find:!1};return J(Ee.props.children,Ee.props.selectedKeys,Ke),Ke.find},Ee.isInlineMode=function(){return Ee.getMode()==="inline"},Ee.adjustWidth=function(){if(!Ee.subMenuTitle||!Ee.menuInstance)return;var Ke=Xe.findDOMNode(Ee.menuInstance);if(Ke.offsetWidth>=Ee.subMenuTitle.offsetWidth)return;Ke.style.minWidth="".concat(Ee.subMenuTitle.offsetWidth,"px")},Ee.saveSubMenuTitle=function(Ke){Ee.subMenuTitle=Ke},Ee.getBaseProps=function(){var Ke=Object(y.a)(Ee),Je=Ke.props,ot=Ee.getMode();return{mode:ot==="horizontal"?"vertical":ot,visible:Ee.getVisible(),level:Je.level+1,inlineIndent:Je.inlineIndent,focusable:!1,onClick:Ee.onSubMenuClick,onSelect:Ee.onSelect,onDeselect:Ee.onDeselect,onDestroy:Ee.onDestroy,selectedKeys:Je.selectedKeys,eventKey:"".concat(Je.eventKey,"-menu-"),openKeys:Je.openKeys,motion:Je.motion,onOpenChange:Ee.onOpenChange,subMenuOpenDelay:Je.subMenuOpenDelay,parentMenu:Object(y.a)(Ee),subMenuCloseDelay:Je.subMenuCloseDelay,forceSubMenuRender:Je.forceSubMenuRender,triggerSubMenuAction:Je.triggerSubMenuAction,builtinPlacements:Je.builtinPlacements,defaultActiveFirst:Je.store.getState().defaultActiveFirst[ie(Je.eventKey)],multiple:Je.multiple,prefixCls:Je.rootPrefixCls,id:Ee.internalMenuId,manualRef:Ee.saveMenuInstance,itemIcon:Je.itemIcon,expandIcon:Je.expandIcon,direction:Je.direction}},Ee.getMotion=function(Ke,Je){var ot=Object(y.a)(Ee),gt=ot.haveRendered,mt=Ee.props,Ot=mt.motion,Xt=mt.rootPrefixCls,sr=Object(k.a)(Object(k.a)({},Ot),{},{leavedClassName:"".concat(Xt,"-hidden"),removeOnLeave:!1,motionAppear:gt||!Je||Ke!=="inline"});return sr};var De=Ne.store,Te=Ne.eventKey,je=De.getState(),Be=je.defaultActiveFirst;Ee.isRootMenu=!1;var ze=!1;return Be&&(ze=Be[Te]),Tn(De,Te,ze),Ee.state={mode:Ne.mode,isOpen:Ne.isOpen},Ee}return Object(R.a)(Ve,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Ee=this,De=this.props,Te=De.mode,je=De.parentMenu,Be=De.manualRef,ze=De.isOpen,Ke=function(){Ee.setState({mode:Te,isOpen:ze})},Je=ze!==this.state.isOpen,ot=Te!==this.state.mode;if((ot||Je)&&(Ye.a.cancel(this.updateStateRaf),ot?this.updateStateRaf=Object(Ye.a)(Ke):Ke()),Be&&Be(this),Te!=="horizontal"||!(je==null?void 0:je.isRootMenu)||!ze)return;this.minWidthTimeout=setTimeout(function(){return Ee.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Ee=this.props,De=Ee.onDestroy,Te=Ee.eventKey;De&&De(Te),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),Ye.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(Ee,De){var Te=this.getBaseProps();return b.createElement(Fi,Object(p.a)({},Te,{id:this.internalMenuId,className:Ee,style:De}),this.props.children)}},{key:"renderChildren",value:function(){var Ee=this,De=this.getBaseProps(),Te=De.mode,je=De.visible,Be=De.forceSubMenuRender,ze=De.direction,Ke=this.getMotion(Te,je);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||je||Be,!this.haveOpened)return b.createElement("div",null);var Je=T()("".concat(De.prefixCls,"-sub"),Object(N.a)({},"".concat(De.prefixCls,"-rtl"),ze==="rtl"));return this.isInlineMode()?b.createElement(jr,Object(p.a)({visible:De.visible,forceRender:Be},Ke),function(ot){var gt=ot.className,mt=ot.style,Ot=T()(Je,gt);return Ee.renderPopupMenu(Ot,mt)}):this.renderPopupMenu(Je)}},{key:"render",value:function(){var Ee,De,Te,je=Object(k.a)({},this.props),Be=this.getVisible(),ze=this.getPrefixCls(),Ke=this.isInlineMode(),Je=this.getMode(),ot=T()(ze,"".concat(ze,"-").concat(Je),(Ee={},Object(N.a)(Ee,je.className,!!je.className),Object(N.a)(Ee,this.getOpenClassName(),Be),Object(N.a)(Ee,this.getActiveClassName(),je.active||Be&&!Ke),Object(N.a)(Ee,this.getDisabledClassName(),je.disabled),Object(N.a)(Ee,this.getSelectedClassName(),this.isChildrenSelected()),Ee));this.internalMenuId||(je.eventKey?this.internalMenuId="".concat(je.eventKey,"$Menu"):(kn+=1,this.internalMenuId="$__$".concat(kn,"$Menu")));var gt={},mt={},Ot={};je.disabled||(gt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},mt={onClick:this.onTitleClick},Ot={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Xt={},sr=je.direction,cr=sr==="rtl";Ke&&(cr?Xt.paddingRight=je.inlineIndent*je.level:Xt.paddingLeft=je.inlineIndent*je.level);var fr={};this.getVisible()&&(fr={"aria-owns":this.internalMenuId});var Er=null;Je!=="horizontal"&&(Er=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Er=b.createElement(this.props.expandIcon,Object(k.a)({},this.props))));var yr=b.createElement("div",Object(p.a)({ref:this.saveSubMenuTitle,style:Xt,className:"".concat(ze,"-title"),role:"button"},Ot,mt,{"aria-expanded":Be},fr,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,Er||b.createElement("i",{className:"".concat(ze,"-arrow")})),pr=this.renderChildren(),Pr=((De=je.parentMenu)===null||De===void 0?void 0:De.isRootMenu)?je.parentMenu.props.getPopupContainer:function(Jr){return Jr.parentNode},Sr=sn[Je],gn=je.popupOffset?{offset:je.popupOffset}:{},Cr=T()((Te={},Object(N.a)(Te,je.popupClassName,je.popupClassName&&!Ke),Object(N.a)(Te,"".concat(ze,"-rtl"),cr),Te)),rr=je.disabled,Jt=je.triggerSubMenuAction,Or=je.subMenuOpenDelay,Nr=je.forceSubMenuRender,Vt=je.subMenuCloseDelay,Br=je.builtinPlacements;$.forEach(function(Jr){return delete je[Jr]}),delete je.onClick;var vn=cr?Object(k.a)(Object(k.a)({},Zr),Br):Object(k.a)(Object(k.a)({},Ki),Br);delete je.direction;var Gr=this.getBaseProps(),en=Ke?null:this.getMotion(Gr.mode,Gr.visible);return b.createElement("li",Object(p.a)({},je,gt,{className:ot,role:"menuitem"}),b.createElement(Oi,{prefixCls:ze,popupClassName:T()("".concat(ze,"-popup"),Cr),getPopupContainer:Pr,builtinPlacements:vn,popupPlacement:Sr,popupVisible:Ke?!1:Be,popupAlign:gn,popup:Ke?null:pr,action:rr||Ke?[]:[Jt],mouseEnterDelay:Or,mouseLeaveDelay:Vt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Nr,popupMotion:en},yr),Ke?pr:null)}}]),Ve}(b.Component);fi.defaultProps={onMouseEnter:Z,onMouseLeave:Z,onTitleMouseEnter:Z,onTitleMouseLeave:Z,onTitleClick:Z,manualRef:Z,mode:"vertical",title:""};var zn=Object(S.b)(function(ke,Ge){var Ve=ke.openKeys,Ne=ke.activeKey,Ee=ke.selectedKeys,De=Ge.eventKey,Te=Ge.subMenuKey;return{isOpen:Ve.indexOf(De)>-1,active:Ne[Te]===De,selectedKeys:Ee}})(fi);zn.isSubMenu=!0;var Vn=zn,ki="menuitem-overflowed",Mi=.5,Xn=function(ke){Object(x.a)(Ve,ke);var Ge=Object(C.a)(Ve);function Ve(){var Ne;return Object(I.a)(this,Ve),Ne=Ge.apply(this,arguments),Ne.resizeObserver=null,Ne.mutationObserver=null,Ne.originalTotalWidth=0,Ne.overflowedItems=[],Ne.menuItemSizes=[],Ne.cancelFrameId=null,Ne.state={lastVisibleIndex:void 0},Ne.childRef=b.createRef(),Ne.getMenuItemNodes=function(){var Ee=Ne.props.prefixCls,De=Ne.childRef.current;return De?[].slice.call(De.children).filter(function(Te){return Te.className.split(" ").indexOf("".concat(Ee,"-overflowed-submenu"))<0}):[]},Ne.getOverflowedSubMenuItem=function(Ee,De,Te){var je=Ne.props,Be=je.overflowedIndicator,ze=je.level,Ke=je.mode,Je=je.prefixCls,ot=je.theme;if(ze!==1||Ke!=="horizontal")return null;var gt=Ne.props.children[0],mt=gt.props,Ot=mt.children,Xt=mt.title,sr=mt.style,cr=Object(w.a)(mt,["children","title","style"]),fr=Object(k.a)({},sr),Er="".concat(Ee,"-overflowed-indicator"),yr="".concat(Ee,"-overflowed-indicator");De.length===0&&Te!==!0?fr=Object(k.a)(Object(k.a)({},fr),{},{display:"none"}):Te&&(fr=Object(k.a)(Object(k.a)({},fr),{},{visibility:"hidden",position:"absolute"}),Er="".concat(Er,"-placeholder"),yr="".concat(yr,"-placeholder"));var pr=ot?"".concat(Je,"-").concat(ot):"",Pr={};return $.forEach(function(Sr){cr[Sr]!==void 0&&(Pr[Sr]=cr[Sr])}),b.createElement(Vn,Object(p.a)({title:Be,className:"".concat(Je,"-overflowed-submenu"),popupClassName:pr},Pr,{key:Er,eventKey:yr,disabled:!1,style:fr}),De)},Ne.setChildrenWidthAndResize=function(){if(Ne.props.mode!=="horizontal")return;var Ee=Ne.childRef.current;if(!Ee)return;var De=Ee.children;if(!De||De.length===0)return;var Te=Ee.children[De.length-1];he(Te,"display","inline-block");var je=Ne.getMenuItemNodes(),Be=je.filter(function(ze){return ze.className.split(" ").indexOf(ki)>=0});Be.forEach(function(ze){he(ze,"display","inline-block")}),Ne.menuItemSizes=je.map(function(ze){return le(ze,!0)}),Be.forEach(function(ze){he(ze,"display","none")}),Ne.overflowedIndicatorWidth=le(Ee.children[Ee.children.length-1],!0),Ne.originalTotalWidth=Ne.menuItemSizes.reduce(function(ze,Ke){return ze+Ke},0),Ne.handleResize(),he(Te,"display","none")},Ne.handleResize=function(){if(Ne.props.mode!=="horizontal")return;var Ee=Ne.childRef.current;if(!Ee)return;var De=le(Ee);Ne.overflowedItems=[];var Te=0,je;Ne.originalTotalWidth>De+Mi&&(je=-1,Ne.menuItemSizes.forEach(function(Be){Te+=Be,Te+Ne.overflowedIndicatorWidth<=De&&(je+=1)})),Ne.setState({lastVisibleIndex:je})},Ne}return Object(R.a)(Ve,[{key:"componentDidMount",value:function(){var Ee=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var De=this.childRef.current;if(!De)return;this.resizeObserver=new Ue.default(function(Te){Te.forEach(function(){var je=Ee.cancelFrameId;cancelAnimationFrame(je),Ee.cancelFrameId=requestAnimationFrame(Ee.setChildrenWidthAndResize)})}),[].slice.call(De.children).concat(De).forEach(function(Te){Ee.resizeObserver.observe(Te)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Ee.resizeObserver.disconnect(),[].slice.call(De.children).concat(De).forEach(function(Te){Ee.resizeObserver.observe(Te)}),Ee.setChildrenWidthAndResize()}),this.mutationObserver.observe(De,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(Ee){var De=this,Te=this.state.lastVisibleIndex;return(Ee||[]).reduce(function(je,Be,ze){var Ke=Be;if(De.props.mode==="horizontal"){var Je=De.getOverflowedSubMenuItem(Be.props.eventKey,[]);Te!==void 0&&De.props.className.indexOf("".concat(De.props.prefixCls,"-root"))!==-1&&(ze>Te&&(Ke=b.cloneElement(Be,{style:{display:"none"},eventKey:"".concat(Be.props.eventKey,"-hidden"),className:"".concat(ki)})),ze===Te+1&&(De.overflowedItems=Ee.slice(Te+1).map(function(gt){return b.cloneElement(gt,{key:gt.props.eventKey,mode:"vertical-left"})}),Je=De.getOverflowedSubMenuItem(Be.props.eventKey,De.overflowedItems)));var ot=[].concat(Object(h.a)(je),[Je,Ke]);return ze===Ee.length-1&&ot.push(De.getOverflowedSubMenuItem(Be.props.eventKey,[],!0)),ot}return[].concat(Object(h.a)(je),[Ke])},[])}},{key:"render",value:function(){var Ee=this.props,De=Ee.visible,Te=Ee.prefixCls,je=Ee.overflowedIndicator,Be=Ee.mode,ze=Ee.level,Ke=Ee.tag,Je=Ee.children,ot=Ee.theme,gt=Object(w.a)(Ee,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),mt=Ke;return b.createElement(mt,Object(p.a)({ref:this.childRef},gt),this.renderChildren(Je))}}]),Ve}(b.Component);Xn.defaultProps={tag:"div",className:""};var ji=Xn;function pi(ke){return ke.length?ke.every(function(Ge){return!!Ge.props.disabled}):!0}function mi(ke,Ge,Ve){var Ne=ke.getState();ke.setState({activeKey:Object(k.a)(Object(k.a)({},Ne.activeKey),{},Object(N.a)({},Ge,Ve))})}function Yn(ke){return ke.eventKey||"0-menu-"}function $n(ke,Ge){var Ve=Ge,Ne=ke.children,Ee=ke.eventKey;if(Ve){var De;if(ne(Ne,function(Te,je){Te&&Te.props&&!Te.props.disabled&&Ve===q(Te,Ee,je)&&(De=!0)}),De)return Ve}return Ve=null,ke.defaultActiveFirst&&ne(Ne,function(Te,je){!Ve&&Te&&!Te.props.disabled&&(Ve=q(Te,Ee,je))}),Ve}function Pi(ke){if(!ke)return;var Ge=this.instanceArray.indexOf(ke);Ge!==-1?this.instanceArray[Ge]=ke:this.instanceArray.push(ke)}var ni=function(ke){Object(x.a)(Ve,ke);var Ge=Object(C.a)(Ve);function Ve(Ne){var Ee;return Object(I.a)(this,Ve),Ee=Ge.call(this,Ne),Ee.onKeyDown=function(De,Te){var je=De.keyCode,Be;if(Ee.getFlatInstanceArray().forEach(function(Ke){Ke&&Ke.props.active&&Ke.onKeyDown&&(Be=Ke.onKeyDown(De))}),Be)return 1;var ze=null;return(je===f.a.UP||je===f.a.DOWN)&&(ze=Ee.step(je===f.a.UP?-1:1)),ze?(De.preventDefault(),mi(Ee.props.store,Yn(Ee.props),ze.props.eventKey),typeof Te=="function"&&Te(ze),1):void 0},Ee.onItemHover=function(De){var Te=De.key,je=De.hover;mi(Ee.props.store,Yn(Ee.props),je?Te:null)},Ee.onDeselect=function(De){Ee.props.onDeselect(De)},Ee.onSelect=function(De){Ee.props.onSelect(De)},Ee.onClick=function(De){Ee.props.onClick(De)},Ee.onOpenChange=function(De){Ee.props.onOpenChange(De)},Ee.onDestroy=function(De){Ee.props.onDestroy(De)},Ee.getFlatInstanceArray=function(){return Ee.instanceArray},Ee.step=function(De){var Te=Ee.getFlatInstanceArray(),je=Ee.props.store.getState().activeKey[Yn(Ee.props)],Be=Te.length;if(!Be)return null;De<0&&(Te=Te.concat().reverse());var ze=-1;if(Te.every(function(gt,mt){return gt&>.props.eventKey===je?(ze=mt,!1):!0}),!Ee.props.defaultActiveFirst&&ze!==-1&&pi(Te.slice(ze,Be-1)))return;var Ke=(ze+1)%Be,Je=Ke;do{var ot=Te[Je];if(!ot||ot.props.disabled)Je=(Je+1)%Be;else return ot}while(Je!==Ke);return null},Ee.renderCommonMenuItem=function(De,Te,je){var Be=Ee.props.store.getState(),ze=Object(y.a)(Ee),Ke=ze.props,Je=q(De,Ke.eventKey,Te),ot=De.props;if(!ot||typeof De.type=="string")return De;var gt=Je===Be.activeKey,mt=Object(k.a)(Object(k.a)({mode:ot.mode||Ke.mode,level:Ke.level,inlineIndent:Ke.inlineIndent,renderMenuItem:Ee.renderMenuItem,rootPrefixCls:Ke.prefixCls,index:Te,parentMenu:Ke.parentMenu,manualRef:ot.disabled?void 0:Object(j.a)(De.ref,Pi.bind(Object(y.a)(Ee))),eventKey:Je,active:!ot.disabled&>,multiple:Ke.multiple,onClick:function(Xt){(ot.onClick||Z)(Xt),Ee.onClick(Xt)},onItemHover:Ee.onItemHover,motion:Ke.motion,subMenuOpenDelay:Ke.subMenuOpenDelay,subMenuCloseDelay:Ke.subMenuCloseDelay,forceSubMenuRender:Ke.forceSubMenuRender,onOpenChange:Ee.onOpenChange,onDeselect:Ee.onDeselect,onSelect:Ee.onSelect,builtinPlacements:Ke.builtinPlacements,itemIcon:ot.itemIcon||Ee.props.itemIcon,expandIcon:ot.expandIcon||Ee.props.expandIcon},je),{},{direction:Ke.direction});return(Ke.mode==="inline"||Se())&&(mt.triggerSubMenuAction="click"),b.cloneElement(De,Object(k.a)(Object(k.a)({},mt),{},{key:Je||Te}))},Ee.renderMenuItem=function(De,Te,je){if(!De)return null;var Be=Ee.props.store.getState(),ze={openKeys:Be.openKeys,selectedKeys:Be.selectedKeys,triggerSubMenuAction:Ee.props.triggerSubMenuAction,subMenuKey:je};return Ee.renderCommonMenuItem(De,Te,ze)},Ne.store.setState({activeKey:Object(k.a)(Object(k.a)({},Ne.store.getState().activeKey),{},Object(N.a)({},Ne.eventKey,$n(Ne,Ne.activeKey)))}),Ee.instanceArray=[],Ee}return Object(R.a)(Ve,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Ee){return this.props.visible||Ee.visible||this.props.className!==Ee.className||!Y()(this.props.style,Ee.style)}},{key:"componentDidUpdate",value:function(Ee){var De=this.props,Te="activeKey"in De?De.activeKey:De.store.getState().activeKey[Yn(De)],je=$n(De,Te);if(je!==Te)mi(De.store,Yn(De),je);else if("activeKey"in Ee){var Be=$n(Ee,Ee.activeKey);je!==Be&&mi(De.store,Yn(De),je)}}},{key:"render",value:function(){var Ee=this,De=Object(p.a)({},this.props);this.instanceArray=[];var Te=T()(De.prefixCls,De.className,"".concat(De.prefixCls,"-").concat(De.mode)),je={className:Te,role:De.role||"menu"};De.id&&(je.id=De.id),De.focusable&&(je.tabIndex=0,je.onKeyDown=this.onKeyDown);var Be=De.prefixCls,ze=De.eventKey,Ke=De.visible,Je=De.level,ot=De.mode,gt=De.overflowedIndicator,mt=De.theme;return $.forEach(function(Ot){return delete De[Ot]}),delete De.onClick,b.createElement(ji,Object(p.a)({},De,{prefixCls:Be,mode:ot,tag:"ul",level:Je,theme:mt,visible:Ke,overflowedIndicator:gt},je),Object(_.a)(De.children).map(function(Ot,Xt){return Ee.renderMenuItem(Ot,Xt,ze||"0-menu-")}))}}]),Ve}(b.Component);ni.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:Z};var gi=Object(S.b)()(ni),Fi=gi,ii=D("Kwbf");function Ur(ke,Ge,Ve){var Ne=ke.prefixCls,Ee=ke.motion,De=ke.defaultMotions,Te=De===void 0?{}:De,je=ke.openAnimation,Be=ke.openTransitionName,ze=Ge.switchingModeFromInline;if(Ee)return Ee;if(Object(z.a)(je)==="object"&&je)Object(ii.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof je=="string")return{motionName:"".concat(Ne,"-open-").concat(je)};if(Be)return{motionName:Be};var Ke=Te[Ve];return Ke||(ze?null:Te.other)}var Ft=function(ke){Object(x.a)(Ve,ke);var Ge=Object(C.a)(Ve);function Ve(Ne){var Ee;Object(I.a)(this,Ve),Ee=Ge.call(this,Ne),Ee.onSelect=function(je){var Be=Object(y.a)(Ee),ze=Be.props;if(ze.selectable){var Ke=Ee.store.getState(),Je=Ke.selectedKeys,ot=je.key;ze.multiple?Je=Je.concat([ot]):Je=[ot],"selectedKeys"in ze||Ee.store.setState({selectedKeys:Je}),ze.onSelect(Object(k.a)(Object(k.a)({},je),{},{selectedKeys:Je}))}},Ee.onClick=function(je){var Be=Ee.getRealMenuMode(),ze=Object(y.a)(Ee),Ke=ze.store,Je=ze.props.onOpenChange;Be!=="inline"&&!("openKeys"in Ee.props)&&(Ke.setState({openKeys:[]}),Je([])),Ee.props.onClick(je)},Ee.onKeyDown=function(je,Be){Ee.innerMenu.getWrappedInstance().onKeyDown(je,Be)},Ee.onOpenChange=function(je){var Be=Object(y.a)(Ee),ze=Be.props,Ke=Ee.store.getState().openKeys.concat(),Je=!1,ot=function(mt){var Ot=!1;if(mt.open)Ot=Ke.indexOf(mt.key)===-1,Ot&&Ke.push(mt.key);else{var Xt=Ke.indexOf(mt.key);Ot=Xt!==-1,Ot&&Ke.splice(Xt,1)}Je=Je||Ot};Array.isArray(je)?je.forEach(ot):ot(je),Je&&("openKeys"in Ee.props||Ee.store.setState({openKeys:Ke}),ze.onOpenChange(Ke))},Ee.onDeselect=function(je){var Be=Object(y.a)(Ee),ze=Be.props;if(ze.selectable){var Ke=Ee.store.getState().selectedKeys.concat(),Je=je.key,ot=Ke.indexOf(Je);ot!==-1&&Ke.splice(ot,1),"selectedKeys"in ze||Ee.store.setState({selectedKeys:Ke}),ze.onDeselect(Object(k.a)(Object(k.a)({},je),{},{selectedKeys:Ke}))}},Ee.onMouseEnter=function(je){Ee.restoreModeVerticalFromInline();var Be=Ee.props.onMouseEnter;Be&&Be(je)},Ee.onTransitionEnd=function(je){var Be=je.propertyName==="width"&&je.target===je.currentTarget,ze=je.target.className,Ke=Object.prototype.toString.call(ze)==="[object SVGAnimatedString]"?ze.animVal:ze,Je=je.propertyName==="font-size"&&Ke.indexOf("anticon")>=0;(Be||Je)&&Ee.restoreModeVerticalFromInline()},Ee.setInnerMenu=function(je){Ee.innerMenu=je},Ee.isRootMenu=!0;var De=Ne.defaultSelectedKeys,Te=Ne.defaultOpenKeys;return"selectedKeys"in Ne&&(De=Ne.selectedKeys||[]),"openKeys"in Ne&&(Te=Ne.openKeys||[]),Ee.store=Object(S.c)({selectedKeys:De,openKeys:Te,activeKey:{"0-menu-":$n(Ne,Ne.activeKey)}}),Ee.state={switchingModeFromInline:!1,prevProps:Ne,inlineOpenKeys:[],store:Ee.store},Ee}return Object(R.a)(Ve,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Ee){var De=this.props,Te=De.siderCollapsed,je=De.inlineCollapsed,Be=De.onOpenChange;(!Ee.inlineCollapsed&&je||!Ee.siderCollapsed&&Te)&&Be([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var Ee=this.props.collapsedWidth,De=this.store,Te=this.prevOpenKeys,je=this.getInlineCollapsed()&&(Ee===0||Ee==="0"||Ee==="0px");je?(this.prevOpenKeys=De.getState().openKeys.concat(),this.store.setState({openKeys:[]})):Te&&(this.store.setState({openKeys:Te}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Ee=this.props.mode,De=this.state.switchingModeFromInline,Te=this.getInlineCollapsed();return De&&Te?"inline":Te?"vertical":Ee}},{key:"getInlineCollapsed",value:function(){var Ee=this.props,De=Ee.inlineCollapsed,Te=Ee.siderCollapsed;return Te!==void 0?Te:De}},{key:"restoreModeVerticalFromInline",value:function(){var Ee=this.state.switchingModeFromInline;Ee&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var Ee=Object(k.a)({},Object(F.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),De=this.getRealMenuMode();return Ee.className+=" ".concat(Ee.prefixCls,"-root"),Ee.direction==="rtl"&&(Ee.className+=" ".concat(Ee.prefixCls,"-rtl")),Ee=Object(k.a)(Object(k.a)({},Ee),{},{mode:De,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ur(this.props,this.state,De)}),delete Ee.openAnimation,delete Ee.openTransitionName,b.createElement(S.a,{store:this.store},b.createElement(Fi,Object(p.a)({},Ee,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(Ee,De){var Te=De.prevProps,je=De.store,Be=je.getState(),ze={},Ke={prevProps:Ee};return Te.mode==="inline"&&Ee.mode!=="inline"&&(Ke.switchingModeFromInline=!0),"openKeys"in Ee?ze.openKeys=Ee.openKeys||[]:((Ee.inlineCollapsed&&!Te.inlineCollapsed||Ee.siderCollapsed&&!Te.siderCollapsed)&&(Ke.switchingModeFromInline=!0,Ke.inlineOpenKeys=Be.openKeys,ze.openKeys=[]),(!Ee.inlineCollapsed&&Te.inlineCollapsed||!Ee.siderCollapsed&&Te.siderCollapsed)&&(ze.openKeys=De.inlineOpenKeys,Ke.inlineOpenKeys=[])),Object.keys(ze).length&&je.setState(ze),Ke}}]),Ve}(b.Component);Ft.defaultProps={selectable:!0,onClick:Z,onSelect:Z,onOpenChange:Z,onDeselect:Z,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:b.createElement("span",null,"\xB7\xB7\xB7")};var er=Ft,zt=function(ke){Object(x.a)(Ve,ke);var Ge=Object(C.a)(Ve);function Ve(){var Ne;return Object(I.a)(this,Ve),Ne=Ge.apply(this,arguments),Ne.onKeyDown=function(Ee){var De=Ee.keyCode;return De===f.a.ENTER?(Ne.onClick(Ee),!0):void 0},Ne.onMouseLeave=function(Ee){var De=Ne.props,Te=De.eventKey,je=De.onItemHover,Be=De.onMouseLeave;je({key:Te,hover:!1}),Be({key:Te,domEvent:Ee})},Ne.onMouseEnter=function(Ee){var De=Ne.props,Te=De.eventKey,je=De.onItemHover,Be=De.onMouseEnter;je({key:Te,hover:!0}),Be({key:Te,domEvent:Ee})},Ne.onClick=function(Ee){var De=Ne.props,Te=De.eventKey,je=De.multiple,Be=De.onClick,ze=De.onSelect,Ke=De.onDeselect,Je=De.isSelected,ot={key:Te,keyPath:[Te],item:Object(y.a)(Ne),domEvent:Ee};Be(ot),je?Je?Ke(ot):ze(ot):Je||ze(ot)},Ne.saveNode=function(Ee){Ne.node=Ee},Ne}return Object(R.a)(Ve,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Ee=this.props;Ee.onDestroy&&Ee.onDestroy(Ee.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var Ee,De=Object(k.a)({},this.props),Te=T()(this.getPrefixCls(),De.className,(Ee={},Object(N.a)(Ee,this.getActiveClassName(),!De.disabled&&De.active),Object(N.a)(Ee,this.getSelectedClassName(),De.isSelected),Object(N.a)(Ee,this.getDisabledClassName(),De.disabled),Ee)),je=Object(k.a)(Object(k.a)({},De.attribute),{},{title:typeof De.title=="string"?De.title:void 0,className:Te,role:De.role||"menuitem","aria-disabled":De.disabled});De.role==="option"?je=Object(k.a)(Object(k.a)({},je),{},{role:"option","aria-selected":De.isSelected}):(De.role===null||De.role==="none")&&(je.role="none");var Be={onClick:De.disabled?null:this.onClick,onMouseLeave:De.disabled?null:this.onMouseLeave,onMouseEnter:De.disabled?null:this.onMouseEnter},ze=Object(k.a)({},De.style);De.mode==="inline"&&(De.direction==="rtl"?ze.paddingRight=De.inlineIndent*De.level:ze.paddingLeft=De.inlineIndent*De.level),$.forEach(function(Je){return delete De[Je]}),delete De.direction;var Ke=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Ke=b.createElement(this.props.itemIcon,this.props)),b.createElement("li",Object(p.a)({},Object(F.a)(De,["onClick","onMouseEnter","onMouseLeave","onSelect"]),je,Be,{style:ze,ref:this.saveNode}),De.children,Ke)}}]),Ve}(b.Component);zt.isMenuItem=!0,zt.defaultProps={onSelect:Z,onMouseEnter:Z,onMouseLeave:Z,manualRef:Z};var ar=Object(S.b)(function(ke,Ge){var Ve=ke.activeKey,Ne=ke.selectedKeys,Ee=Ge.eventKey,De=Ge.subMenuKey;return{active:Ve[De]===Ee,isSelected:Array.isArray(Ne)?Ne.indexOf(Ee)!==-1:Ne===Ee}})(zt),_r=ar,Lr=function(ke){Object(x.a)(Ve,ke);var Ge=Object(C.a)(Ve);function Ve(){var Ne;return Object(I.a)(this,Ve),Ne=Ge.apply(this,arguments),Ne.renderInnerMenuItem=function(Ee){var De=Ne.props,Te=De.renderMenuItem,je=De.index;return Te(Ee,je,Ne.props.subMenuKey)},Ne}return Object(R.a)(Ve,[{key:"render",value:function(){var Ee=Object(p.a)({},this.props),De=Ee.className,Te=De===void 0?"":De,je=Ee.rootPrefixCls,Be="".concat(je,"-item-group-title"),ze="".concat(je,"-item-group-list"),Ke=Ee.title,Je=Ee.children;return $.forEach(function(ot){return delete Ee[ot]}),delete Ee.direction,b.createElement("li",Object(p.a)({},Ee,{onClick:function(gt){return gt.stopPropagation()},className:"".concat(Te," ").concat(je,"-item-group")}),b.createElement("div",{className:Be,title:typeof Ke=="string"?Ke:void 0},Ke),b.createElement("ul",{className:ze},b.Children.map(Je,this.renderInnerMenuItem)))}}]),Ve}(b.Component);Lr.isMenuItemGroup=!0,Lr.defaultProps={disabled:!0};var mr=Lr,qr=function(Ge){var Ve=Ge.className,Ne=Ge.rootPrefixCls,Ee=Ge.style;return b.createElement("li",{className:"".concat(Ve," ").concat(Ne,"-item-divider"),style:Ee})};qr.defaultProps={disabled:!0,className:"",style:{}};var Un=qr,hr=er,vi=D("eDIo");function kr(ke,Ge){var Ve=ke.prefixCls,Ne=ke.editable,Ee=ke.locale,De=ke.style;return!Ne||Ne.showAdd===!1?null:b.createElement("button",{ref:Ge,type:"button",className:"".concat(Ve,"-nav-add"),style:De,"aria-label":(Ee==null?void 0:Ee.addAriaLabel)||"Add tab",onClick:function(je){Ne.onEdit("add",{event:je})}},Ne.addIcon||"+")}var Sn=b.forwardRef(kr);function Rn(ke,Ge){var Ve=ke.prefixCls,Ne=ke.id,Ee=ke.tabs,De=ke.locale,Te=ke.mobile,je=ke.moreIcon,Be=je===void 0?"More":je,ze=ke.moreTransitionName,Ke=ke.style,Je=ke.className,ot=ke.editable,gt=ke.tabBarGutter,mt=ke.rtl,Ot=ke.onTabClick,Xt=Object(b.useState)(!1),sr=Object(g.a)(Xt,2),cr=sr[0],fr=sr[1],Er=Object(b.useState)(null),yr=Object(g.a)(Er,2),pr=yr[0],Pr=yr[1],Sr="".concat(Ne,"-more-popup"),gn="".concat(Ve,"-dropdown"),Cr=pr!==null?"".concat(Sr,"-").concat(pr):null,rr=De==null?void 0:De.dropdownAriaLabel,Jt=b.createElement(hr,{onClick:function(en){var Jr=en.key,Dn=en.domEvent;Ot(Jr,Dn),fr(!1)},id:Sr,tabIndex:-1,role:"listbox","aria-activedescendant":Cr,selectedKeys:[pr],"aria-label":rr!==void 0?rr:"expanded dropdown"},Ee.map(function(Gr){return b.createElement(_r,{key:Gr.key,id:"".concat(Sr,"-").concat(Gr.key),role:"option","aria-controls":Ne&&"".concat(Ne,"-panel-").concat(Gr.key),disabled:Gr.disabled},Gr.tab)}));function Or(Gr){for(var en=Ee.filter(function(yi){return!yi.disabled}),Jr=en.findIndex(function(yi){return yi.key===pr})||0,Dn=en.length,Jn=0;Jn<Dn;Jn+=1){Jr=(Jr+Gr+Dn)%Dn;var En=en[Jr];if(!En.disabled){Pr(En.key);return}}}function Nr(Gr){var en=Gr.which;if(!cr){[f.a.DOWN,f.a.SPACE,f.a.ENTER].includes(en)&&(fr(!0),Gr.preventDefault());return}switch(en){case f.a.UP:Or(-1),Gr.preventDefault();break;case f.a.DOWN:Or(1),Gr.preventDefault();break;case f.a.ESC:fr(!1);break;case f.a.SPACE:case f.a.ENTER:pr!==null&&Ot(pr,Gr);break}}Object(b.useEffect)(function(){var Gr=document.getElementById(Cr);Gr&&Gr.scrollIntoView&&Gr.scrollIntoView(!1)},[pr]),Object(b.useEffect)(function(){cr||Pr(null)},[cr]);var Vt=Object(N.a)({},mt?"marginLeft":"marginRight",gt);Ee.length||(Vt.visibility="hidden",Vt.order=1);var Br=T()(Object(N.a)({},"".concat(gn,"-rtl"),mt)),vn=Te?null:b.createElement(vi.a,{prefixCls:gn,overlay:Jt,trigger:["hover"],visible:cr,transitionName:ze,onVisibleChange:fr,overlayClassName:Br,mouseEnterDelay:.1,mouseLeaveDelay:.1},b.createElement("button",{type:"button",className:"".concat(Ve,"-nav-more"),style:Vt,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Sr,id:"".concat(Ne,"-more"),"aria-expanded":cr,onKeyDown:Nr},Be));return b.createElement("div",{className:T()("".concat(Ve,"-nav-operations"),Je),style:Ke,ref:Ge},vn,b.createElement(Sn,{prefixCls:Ve,locale:De,editable:ot}))}var li=b.forwardRef(Rn),ua=Object(b.createContext)(null),Mr=.1,wr=.01,gr=20,ai=Math.pow(.995,gr);function zi(){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 Vi(ke,Ge){var Ve=Object(b.useState)(),Ne=Object(g.a)(Ve,2),Ee=Ne[0],De=Ne[1],Te=Object(b.useState)(0),je=Object(g.a)(Te,2),Be=je[0],ze=je[1],Ke=Object(b.useState)(0),Je=Object(g.a)(Ke,2),ot=Je[0],gt=Je[1],mt=Object(b.useState)(),Ot=Object(g.a)(mt,2),Xt=Ot[0],sr=Ot[1],cr=Object(b.useRef)();function fr(rr){var Jt=rr.touches[0],Or=Jt.screenX,Nr=Jt.screenY;De({x:Or,y:Nr}),window.clearInterval(cr.current)}function Er(rr){if(!Ee)return;rr.preventDefault();var Jt=rr.touches[0],Or=Jt.screenX,Nr=Jt.screenY;De({x:Or,y:Nr});var Vt=Or-Ee.x,Br=Nr-Ee.y;Ge(Vt,Br);var vn=Date.now();ze(vn),gt(vn-Be),sr({x:Vt,y:Br})}function yr(){if(!Ee)return;if(De(null),sr(null),Xt){var rr=Xt.x/ot,Jt=Xt.y/ot,Or=Math.abs(rr),Nr=Math.abs(Jt);if(Math.max(Or,Nr)<Mr)return;var Vt=rr,Br=Jt;cr.current=window.setInterval(function(){if(Math.abs(Vt)<wr&&Math.abs(Br)<wr){window.clearInterval(cr.current);return}Vt*=ai,Br*=ai,Ge(Vt*gr,Br*gr)},gr)}}var pr=Object(b.useRef)(0),Pr=Object(b.useRef)(!1),Sr=Object(b.useRef)();function gn(rr){var Jt=rr.deltaX,Or=rr.deltaY,Nr=0,Vt=Math.abs(Jt),Br=Math.abs(Or);Vt===Br?Nr=Sr.current==="x"?Jt:Or:Vt>Br?(Nr=Jt,Sr.current="x"):(Nr=Or,Sr.current="y");var vn=Date.now();vn-pr.current>100&&(Pr.current=!1),(Ge(-Nr,-Nr)||Pr.current)&&(rr.preventDefault(),Pr.current=!0),pr.current=vn}var Cr=Object(b.useRef)(null);Cr.current={onTouchStart:fr,onTouchMove:Er,onTouchEnd:yr,onWheel:gn},b.useEffect(function(){function rr(Vt){Cr.current.onTouchStart(Vt)}function Jt(Vt){Cr.current.onTouchMove(Vt)}function Or(Vt){Cr.current.onTouchEnd(Vt)}function Nr(Vt){Cr.current.onWheel(Vt)}return document.addEventListener("touchmove",Jt,{passive:!1}),document.addEventListener("touchend",Or,{passive:!1}),ke.current.addEventListener("touchstart",rr,{passive:!1}),ke.current.addEventListener("wheel",Nr),function(){document.removeEventListener("touchmove",Jt),document.removeEventListener("touchend",Or)}},[])}function tr(){var ke=Object(b.useRef)(new Map);function Ge(Ne){return ke.current.has(Ne)||ke.current.set(Ne,b.createRef()),ke.current.get(Ne)}function Ve(Ne){ke.current.delete(Ne)}return[Ge,Ve]}function It(ke,Ge){var Ve=b.useRef(ke),Ne=b.useState({}),Ee=Object(g.a)(Ne,2),De=Ee[1];function Te(je){var Be=typeof je=="function"?je(Ve.current):je;Be!==Ve.current&&Ge(Be,Ve.current),Ve.current=Be,De({})}return[Ve.current,Te]}var ir=function(Ge){var Ve=Ge.position,Ne=Ge.prefixCls,Ee=Ge.extra;if(!Ee)return null;var De,Te=Ee;return Ve==="right"&&(De=Te.right||!Te.left&&Te||null),Ve==="left"&&(De=Te.left||null),De?b.createElement("div",{className:"".concat(Ne,"-extra-content")},De):null};function or(ke,Ge){var Ve,Ne=b.useContext(ua),Ee=Ne.prefixCls,De=Ne.tabs,Te=ke.className,je=ke.style,Be=ke.id,ze=ke.animated,Ke=ke.activeKey,Je=ke.rtl,ot=ke.extra,gt=ke.editable,mt=ke.locale,Ot=ke.tabPosition,Xt=ke.tabBarGutter,sr=ke.children,cr=ke.onTabClick,fr=ke.onTabScroll,Er=Object(b.useRef)(),yr=Object(b.useRef)(),pr=Object(b.useRef)(),Pr=Object(b.useRef)(),Sr=tr(),gn=Object(g.a)(Sr,2),Cr=gn[0],rr=gn[1],Jt=Ot==="top"||Ot==="bottom",Or=It(0,function(Xr,Ir){Jt&&fr&&fr({direction:Xr>Ir?"left":"right"})}),Nr=Object(g.a)(Or,2),Vt=Nr[0],Br=Nr[1],vn=It(0,function(Xr,Ir){!Jt&&fr&&fr({direction:Xr>Ir?"top":"bottom"})}),Gr=Object(g.a)(vn,2),en=Gr[0],Jr=Gr[1],Dn=Object(b.useState)(0),Jn=Object(g.a)(Dn,2),En=Jn[0],yi=Jn[1],Ui=Object(b.useState)(0),xi=Object(g.a)(Ui,2),Qn=xi[0],ln=xi[1],tn=Object(b.useState)(0),xn=Object(g.a)(tn,2),yn=xn[0],Bi=xn[1],ta=Object(b.useState)(0),ra=Object(g.a)(ta,2),Qr=ra[0],Yi=ra[1],na=Object(b.useState)(null),on=Object(g.a)(na,2),$r=on[0],Zn=on[1],So=Object(b.useState)(null),eo=Object(g.a)(So,2),ia=eo[0],va=eo[1],Ma=Object(b.useState)(0),to=Object(g.a)(Ma,2),Pa=to[0],Xo=to[1],Yo=Object(b.useState)(0),Co=Object(g.a)(Yo,2),ro=Co[0],no=Co[1],ya=l(new Map),ba=Object(g.a)(ya,2),$o=ba[0],Na=ba[1],Oa=s(De,$o,En),_a="".concat(Ee,"-nav-operations-hidden"),Ea=0,Hi=0;Jt?Je?(Ea=0,Hi=Math.max(0,En-$r)):(Ea=Math.min(0,$r-En),Hi=0):(Ea=Math.min(0,ia-Qn),Hi=0);function ca(Xr){return Xr<Ea?[Ea,!1]:Xr>Hi?[Hi,!1]:[Xr,!0]}var aa=Object(b.useRef)(),Aa=Object(b.useState)(),da=Object(g.a)(Aa,2),ja=da[0],io=da[1];function Fa(){io(Date.now())}function ao(){window.clearTimeout(aa.current)}Vi(Er,function(Xr,Ir){var qn=!1;function Ti(xa,Qi){xa(function(Da){var sa=ca(Da+Qi),ei=Object(g.a)(sa,2),Ha=ei[0],so=ei[1];return qn=so,Ha})}if(Jt){if($r>=En)return qn;Ti(Br,Xr)}else{if(ia>=Qn)return qn;Ti(Jr,Ir)}return ao(),Fa(),qn}),Object(b.useEffect)(function(){return ao(),ja&&(aa.current=window.setTimeout(function(){io(0)},100)),ao},[ja]);function oa(){var Xr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ke,Ir=Oa.get(Xr);if(!Ir)return;if(Jt){var qn=Vt;Je?Ir.right<Vt?qn=Ir.right:Ir.right+Ir.width>Vt+$r&&(qn=Ir.right+Ir.width-$r):Ir.left<-Vt?qn=-Ir.left:Ir.left+Ir.width>-Vt+$r&&(qn=-(Ir.left+Ir.width-$r)),Jr(0),Br(ca(qn)[0])}else{var Ti=en;Ir.top<-en?Ti=-Ir.top:Ir.top+Ir.height>-en+ia&&(Ti=-(Ir.top+Ir.height-ia)),Br(0),Jr(ca(Ti)[0])}}var ha=v(Oa,{width:$r,height:ia,left:Vt,top:en},{width:yn,height:Qr},{width:Pa,height:ro},Object(k.a)(Object(k.a)({},ke),{},{tabs:De})),Oo=Object(g.a)(ha,2),Jo=Oo[0],Qo=Oo[1],Zo=De.map(function(Xr){var Ir=Xr.key;return b.createElement(u,{id:Be,prefixCls:Ee,key:Ir,rtl:Je,tab:Xr,closable:Xr.closable,editable:gt,active:Ir===Ke,tabPosition:Ot,tabBarGutter:Xt,renderWrapper:sr,removeAriaLabel:mt==null?void 0:mt.removeAriaLabel,ref:Cr(Ir),onClick:function(Ti){cr(Ir,Ti)},onRemove:function(){rr(Ir)},onFocus:function(){oa(Ir),Fa(),Je||(Er.current.scrollLeft=0),Er.current.scrollTop=0}})}),oo=n(function(){var Xr,Ir,qn,Ti,xa,Qi,Da,sa,ei,Ha=((Xr=Er.current)===null||Xr===void 0?void 0:Xr.offsetWidth)||0,so=((Ir=Er.current)===null||Ir===void 0?void 0:Ir.offsetHeight)||0,lo=((qn=Pr.current)===null||qn===void 0?void 0:qn.offsetWidth)||0,Si=((Ti=Pr.current)===null||Ti===void 0?void 0:Ti.offsetHeight)||0,Kr=((xa=pr.current)===null||xa===void 0?void 0:xa.offsetWidth)||0,Gi=((Qi=pr.current)===null||Qi===void 0?void 0:Qi.offsetHeight)||0;Zn(Ha),va(so),Xo(lo),no(Si);var Zi=(((Da=yr.current)===null||Da===void 0?void 0:Da.offsetWidth)||0)-lo,qi=(((sa=yr.current)===null||sa===void 0?void 0:sa.offsetHeight)||0)-Si;yi(Zi),ln(qi);var uo=(ei=pr.current)===null||ei===void 0?void 0:ei.className.includes(_a);Bi(Zi-(uo?0:Kr)),Yi(qi-(uo?0:Gi)),Na(function(){var Wa=new Map;return De.forEach(function(Lo){var ko=Lo.key,pa=Cr(ko).current;pa&&Wa.set(ko,{width:pa.offsetWidth,height:pa.offsetHeight,left:pa.offsetLeft,top:pa.offsetTop})}),Wa})}),qo=De.slice(0,Jo),wi=De.slice(Qo+1),Pn=[].concat(Object(h.a)(qo),Object(h.a)(wi)),ui=Object(b.useState)(),Nn=Object(g.a)(ui,2),Ra=Nn[0],es=Nn[1],Wi=Oa.get(Ke),Ao=Object(b.useRef)();function Ro(){c.a.cancel(Ao.current)}Object(b.useEffect)(function(){var Xr={};return Wi&&(Jt?(Je?Xr.right=Wi.right:Xr.left=Wi.left,Xr.width=Wi.width):(Xr.top=Wi.top,Xr.height=Wi.height)),Ro(),Ao.current=c()(function(){es(Xr)}),Ro},[Wi,Jt,Je]),Object(b.useEffect)(function(){oa()},[Ke,Wi,Oa,Jt]),Object(b.useEffect)(function(){oo()},[Je,Xt,Ke,De.map(function(Xr){return Xr.key}).join("_")]);var Io=!!Pn.length,fa="".concat(Ee,"-nav-wrap"),Ua,Ia,Do,Ba;return Jt?Je?(Ia=Vt>0,Ua=Vt+$r<En):(Ua=Vt<0,Ia=-Vt+$r<En):(Do=en<0,Ba=-en+ia<Qn),b.createElement("div",{ref:Ge,role:"tablist",className:T()("".concat(Ee,"-nav"),Te),style:je,onKeyDown:function(){Fa()}},b.createElement(ir,{position:"left",extra:ot,prefixCls:Ee}),b.createElement(i.a,{onResize:oo},b.createElement("div",{className:T()(fa,(Ve={},Object(N.a)(Ve,"".concat(fa,"-ping-left"),Ua),Object(N.a)(Ve,"".concat(fa,"-ping-right"),Ia),Object(N.a)(Ve,"".concat(fa,"-ping-top"),Do),Object(N.a)(Ve,"".concat(fa,"-ping-bottom"),Ba),Ve)),ref:Er},b.createElement(i.a,{onResize:oo},b.createElement("div",{ref:yr,className:"".concat(Ee,"-nav-list"),style:{transform:"translate(".concat(Vt,"px, ").concat(en,"px)"),transition:ja?"none":void 0}},Zo,b.createElement(Sn,{ref:Pr,prefixCls:Ee,locale:mt,editable:gt,style:{visibility:Io?"hidden":null}}),b.createElement("div",{className:T()("".concat(Ee,"-ink-bar"),Object(N.a)({},"".concat(Ee,"-ink-bar-animated"),ze.inkBar)),style:Ra}))))),b.createElement(li,Object.assign({},ke,{ref:pr,prefixCls:Ee,tabs:Pn,className:!Io&&_a})),b.createElement(ir,{position:"right",extra:ot,prefixCls:Ee}))}var Wr=b.forwardRef(or);function vr(ke){var Ge=ke.id,Ve=ke.activeKey,Ne=ke.animated,Ee=ke.tabPosition,De=ke.rtl,Te=ke.destroyInactiveTabPane,je=b.useContext(ua),Be=je.prefixCls,ze=je.tabs,Ke=Ne.tabPane,Je=ze.findIndex(function(ot){return ot.key===Ve});return b.createElement("div",{className:T()("".concat(Be,"-content-holder"))},b.createElement("div",{className:T()("".concat(Be,"-content"),"".concat(Be,"-content-").concat(Ee),Object(N.a)({},"".concat(Be,"-content-animated"),Ke)),style:Je&&Ke?Object(N.a)({},De?"marginRight":"marginLeft","-".concat(Je,"00%")):null},ze.map(function(ot){return b.cloneElement(ot.node,{key:ot.key,prefixCls:Be,tabKey:ot.key,id:Ge,animated:Ke,active:ot.key===Ve,destroyInactiveTabPane:Te})})))}function mn(ke){var Ge=ke.prefixCls,Ve=ke.forceRender,Ne=ke.className,Ee=ke.style,De=ke.id,Te=ke.active,je=ke.animated,Be=ke.destroyInactiveTabPane,ze=ke.tabKey,Ke=ke.children,Je=b.useState(Ve),ot=Object(g.a)(Je,2),gt=ot[0],mt=ot[1];b.useEffect(function(){Te?mt(!0):Be&&mt(!1)},[Te,Be]);var Ot={};return Te||(je?(Ot.visibility="hidden",Ot.height=0,Ot.overflowY="hidden"):Ot.display="none"),b.createElement("div",{id:De&&"".concat(De,"-panel-").concat(ze),role:"tabpanel",tabIndex:Te?0:-1,"aria-labelledby":De&&"".concat(De,"-tab-").concat(ze),"aria-hidden":!Te,style:Object(k.a)(Object(k.a)({},Ot),Ee),className:T()("".concat(Ge,"-tabpane"),Te&&"".concat(Ge,"-tabpane-active"),Ne)},(Te||gt||Ve)&&Ke)}var an=0;function Ai(ke){return Object(_.a)(ke).map(function(Ge){if(b.isValidElement(Ge)){var Ve=Ge.key!==void 0?String(Ge.key):void 0;return Object(k.a)(Object(k.a)({key:Ve},Ge.props),{},{node:Ge})}return null}).filter(function(Ge){return Ge})}function In(ke,Ge){var Ve,Ne=ke.id,Ee=ke.prefixCls,De=Ee===void 0?"rc-tabs":Ee,Te=ke.className,je=ke.children,Be=ke.direction,ze=ke.activeKey,Ke=ke.defaultActiveKey,Je=ke.editable,ot=ke.animated,gt=ke.tabPosition,mt=gt===void 0?"top":gt,Ot=ke.tabBarGutter,Xt=ke.tabBarStyle,sr=ke.tabBarExtraContent,cr=ke.locale,fr=ke.moreIcon,Er=ke.moreTransitionName,yr=ke.destroyInactiveTabPane,pr=ke.renderTabBar,Pr=ke.onChange,Sr=ke.onTabClick,gn=ke.onTabScroll,Cr=Object(w.a)(ke,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),rr=Ai(je),Jt=Be==="rtl",Or;ot===!1?Or={inkBar:!1,tabPane:!1}:Or=Object(k.a)({inkBar:!0,tabPane:!1},ot!==!0?ot:null);var Nr=Object(b.useState)(!1),Vt=Object(g.a)(Nr,2),Br=Vt[0],vn=Vt[1];Object(b.useEffect)(function(){vn(zi())},[]);var Gr=Object(t.a)(function(){var Qr;return(Qr=rr[0])===null||Qr===void 0?void 0:Qr.key},{value:ze,defaultValue:Ke}),en=Object(g.a)(Gr,2),Jr=en[0],Dn=en[1],Jn=Object(b.useState)(function(){return rr.findIndex(function(Qr){return Qr.key===Jr})}),En=Object(g.a)(Jn,2),yi=En[0],Ui=En[1];Object(b.useEffect)(function(){var Qr=rr.findIndex(function(na){return na.key===Jr});if(Qr===-1){var Yi;Qr=Math.max(0,Math.min(yi,rr.length-1)),Dn((Yi=rr[Qr])===null||Yi===void 0?void 0:Yi.key)}Ui(Qr)},[rr.map(function(Qr){return Qr.key}).join("_"),Jr,yi]);var xi=Object(t.a)(null,{value:Ne}),Qn=Object(g.a)(xi,2),ln=Qn[0],tn=Qn[1],xn=mt;Br&&!["left","right"].includes(mt)&&(xn="top"),Object(b.useEffect)(function(){Ne||(tn("rc-tabs-".concat(an)),an+=1)},[]);function yn(Qr,Yi){Sr==null||Sr(Qr,Yi),Dn(Qr),Pr==null||Pr(Qr)}var Bi={id:ln,activeKey:Jr,animated:Or,tabPosition:xn,rtl:Jt,mobile:Br},ta,ra=Object(k.a)(Object(k.a)({},Bi),{},{editable:Je,locale:cr,moreIcon:fr,moreTransitionName:Er,tabBarGutter:Ot,onTabClick:yn,onTabScroll:gn,extra:sr,style:Xt,panes:je});return pr?ta=pr(ra,Wr):ta=b.createElement(Wr,Object.assign({},ra)),b.createElement(ua.Provider,{value:{tabs:rr,prefixCls:De}},b.createElement("div",Object.assign({ref:Ge,id:Ne,className:T()(De,"".concat(De,"-").concat(xn),(Ve={},Object(N.a)(Ve,"".concat(De,"-mobile"),Br),Object(N.a)(Ve,"".concat(De,"-editable"),Je),Object(N.a)(Ve,"".concat(De,"-rtl"),Jt),Ve),Te)},Cr),ta,b.createElement(vr,Object.assign({destroyInactiveTabPane:yr},Bi,{animated:Or}))))}var Mn=b.forwardRef(In);Mn.TabPane=mn;var Bn=Mn,Xi=Q.b=Bn},kSUc:function(B,Q,D){},lOMy:function(B,Q,D){},lPiR:function(B,Q,D){(function(N,g){B.exports=Q=g(D("Ib8C"))})(this,function(N){return function(g){var w=N,k=w.lib,b=k.WordArray,m=k.Hasher,T=w.algo,_=[],t=[];(function(){function c(f){for(var d=g.sqrt(f),u=2;u<=d;u++)if(!(f%u))return!1;return!0}function i(f){return(f-(f|0))*4294967296|0}for(var n=2,l=0;l<64;)c(n)&&(l<8&&(_[l]=i(g.pow(n,1/2))),t[l]=i(g.pow(n,1/3)),l++),n++})();var h=[],r=T.SHA256=m.extend({_doReset:function(){this._hash=new b.init(_.slice(0))},_doProcessBlock:function(c,i){for(var n=this._hash.words,l=n[0],f=n[1],d=n[2],u=n[3],o=n[4],s=n[5],E=n[6],v=n[7],p=0;p<64;p++){if(p<16)h[p]=c[i+p]|0;else{var I=h[p-15],R=(I<<25|I>>>7)^(I<<14|I>>>18)^I>>>3,y=h[p-2],x=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;h[p]=R+h[p-7]+x+h[p-16]}var C=o&s^~o&E,S=l&f^l&d^f&d,F=(l<<30|l>>>2)^(l<<19|l>>>13)^(l<<10|l>>>22),j=(o<<26|o>>>6)^(o<<21|o>>>11)^(o<<7|o>>>25),A=v+j+C+t[p]+h[p],Y=F+S;v=E,E=s,s=o,o=u+A|0,u=d,d=f,f=l,l=A+Y|0}n[0]=n[0]+l|0,n[1]=n[1]+f|0,n[2]=n[2]+d|0,n[3]=n[3]+u|0,n[4]=n[4]+o|0,n[5]=n[5]+s|0,n[6]=n[6]+E|0,n[7]=n[7]+v|0},_doFinalize:function(){var c=this._data,i=c.words,n=this._nDataBytes*8,l=c.sigBytes*8;return i[l>>>5]|=128<<24-l%32,i[(l+64>>>9<<4)+14]=g.floor(n/4294967296),i[(l+64>>>9<<4)+15]=n,c.sigBytes=i.length*4,this._process(),this._hash},clone:function(){var c=m.clone.call(this);return c._hash=this._hash.clone(),c}});w.SHA256=m._createHelper(r),w.HmacSHA256=m._createHmacHelper(r)}(Math),N.SHA256})},lZu9:function(B,Q,D){(function(N){N(D("VrN/"),D("1eCo"),D("8EBN"))})(function(N){"use strict";N.defineMode("markdown",function(g,w){var k=N.getMode(g,"text/html"),b=k.name=="null";function m(U){if(N.findModeByName){var L=N.findModeByName(U);L&&(U=L.mime||L.mimes[0])}var K=N.getMode(g,U);return K.name=="null"?null:K}w.highlightFormatting===void 0&&(w.highlightFormatting=!1),w.maxBlockquoteDepth===void 0&&(w.maxBlockquoteDepth=0),w.taskLists===void 0&&(w.taskLists=!1),w.strikethrough===void 0&&(w.strikethrough=!1),w.emoji===void 0&&(w.emoji=!1),w.fencedCodeBlockHighlighting===void 0&&(w.fencedCodeBlockHighlighting=!0),w.fencedCodeBlockDefaultMode===void 0&&(w.fencedCodeBlockDefaultMode="text/plain"),w.xml===void 0&&(w.xml=!0),w.tokenTypeOverrides===void 0&&(w.tokenTypeOverrides={});var T={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 T)T.hasOwnProperty(_)&&w.tokenTypeOverrides[_]&&(T[_]=w.tokenTypeOverrides[_]);var t=/^([*\-_])(?:\s*\1){2,}\s*$/,h=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,r=/^\[(x| )\](?=\s)/i,c=w.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,i=/^ {0,3}(?:\={1,}|-{2,})\s*$/,n=/^[^#!\[\]*_\\<>` "'(~:]+/,l=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,d=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,u=" ";function o(U,L,K){return L.f=L.inline=K,K(U,L)}function s(U,L,K){return L.f=L.block=K,K(U,L)}function E(U){return!U||!/\S/.test(U.string)}function v(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==I){var L=b;if(!L){var K=N.innerMode(k,U.htmlState);L=K.mode.name=="xml"&&K.state.tagStart===null&&!K.state.context&&K.state.tokenize.isInText}L&&(U.f=C,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,L){var K=U.column()===L.indentation,ee=E(L.prevLine.stream),oe=L.indentedCode,ae=L.prevLine.hr,be=L.list!==!1,_e=(L.listStack[L.listStack.length-1]||0)+3;L.indentedCode=!1;var fe=L.indentation;if(L.indentationDiff===null&&(L.indentationDiff=L.indentation,be)){for(L.list=null;fe<L.listStack[L.listStack.length-1];)L.listStack.pop(),L.listStack.length?L.indentation=L.listStack[L.listStack.length-1]:L.list=!1;L.list!==!1&&(L.indentationDiff=fe-L.listStack[L.listStack.length-1])}var Re=!ee&&!ae&&!L.prevLine.header&&(!be||!oe)&&!L.prevLine.fencedCodeEnd,Ce=(L.list===!1||ae||ee)&&L.indentation<=_e&&U.match(t),ce=null;if(L.indentationDiff>=4&&(oe||L.prevLine.fencedCodeEnd||L.prevLine.header||ee))return U.skipToEnd(),L.indentedCode=!0,T.code;if(U.eatSpace())return null;if(K&&L.indentation<=_e&&(ce=U.match(c))&&ce[1].length<=6)return L.quote=0,L.header=ce[1].length,L.thisLine.header=!0,w.highlightFormatting&&(L.formatting="header"),L.f=L.inline,y(L);if(L.indentation<=_e&&U.eat(">"))return L.quote=K?1:L.quote+1,w.highlightFormatting&&(L.formatting="quote"),U.eatSpace(),y(L);if(!Ce&&!L.setext&&K&&L.indentation<=_e&&(ce=U.match(h))){var te=ce[1]?"ol":"ul";return L.indentation=fe+U.current().length,L.list=!0,L.quote=0,L.listStack.push(L.indentation),L.em=!1,L.strong=!1,L.code=!1,L.strikethrough=!1,w.taskLists&&U.match(r,!1)&&(L.taskList=!0),L.f=L.inline,w.highlightFormatting&&(L.formatting=["list","list-"+te]),y(L)}else{if(K&&L.indentation<=_e&&(ce=U.match(l,!0)))return L.quote=0,L.fencedEndRE=new RegExp(ce[1]+"+ *$"),L.localMode=w.fencedCodeBlockHighlighting&&m(ce[2]||w.fencedCodeBlockDefaultMode),L.localMode&&(L.localState=N.startState(L.localMode)),L.f=L.block=R,w.highlightFormatting&&(L.formatting="code-block"),L.code=-1,y(L);if(L.setext||(!Re||!be)&&!L.quote&&L.list===!1&&!L.code&&!Ce&&!f.test(U.string)&&(ce=U.lookAhead(1))&&(ce=ce.match(i)))return L.setext?(L.header=L.setext,L.setext=0,U.skipToEnd(),w.highlightFormatting&&(L.formatting="header")):(L.header=ce[0].charAt(0)=="="?1:2,L.setext=L.header),L.thisLine.header=!0,L.f=L.inline,y(L);if(Ce)return U.skipToEnd(),L.hr=!0,L.thisLine.hr=!0,T.hr;if(U.peek()==="[")return o(U,L,Y)}return o(U,L,L.inline)}function I(U,L){var K=k.token(U,L.htmlState);if(!b){var ee=N.innerMode(k,L.htmlState);(ee.mode.name=="xml"&&ee.state.tagStart===null&&!ee.state.context&&ee.state.tokenize.isInText||L.md_inside&&U.current().indexOf(">")>-1)&&(L.f=C,L.block=p,L.htmlState=null)}return K}function R(U,L){var K=L.listStack[L.listStack.length-1]||0,ee=L.indentation<K,oe=K+3;if(L.fencedEndRE&&L.indentation<=oe&&(ee||U.match(L.fencedEndRE))){w.highlightFormatting&&(L.formatting="code-block");var ae;return ee||(ae=y(L)),L.localMode=L.localState=null,L.block=p,L.f=C,L.fencedEndRE=null,L.code=0,L.thisLine.fencedCodeEnd=!0,ee?s(U,L,L.block):ae}else return L.localMode?L.localMode.token(U,L.localState):(U.skipToEnd(),T.code)}function y(U){var L=[];if(U.formatting){L.push(T.formatting),typeof U.formatting=="string"&&(U.formatting=[U.formatting]);for(var K=0;K<U.formatting.length;K++)L.push(T.formatting+"-"+U.formatting[K]),U.formatting[K]==="header"&&L.push(T.formatting+"-"+U.formatting[K]+"-"+U.header),U.formatting[K]==="quote"&&(!w.maxBlockquoteDepth||w.maxBlockquoteDepth>=U.quote?L.push(T.formatting+"-"+U.formatting[K]+"-"+U.quote):L.push("error"))}if(U.taskOpen)return L.push("meta"),L.length?L.join(" "):null;if(U.taskClosed)return L.push("property"),L.length?L.join(" "):null;if(U.linkHref?L.push(T.linkHref,"url"):(U.strong&&L.push(T.strong),U.em&&L.push(T.em),U.strikethrough&&L.push(T.strikethrough),U.emoji&&L.push(T.emoji),U.linkText&&L.push(T.linkText),U.code&&L.push(T.code),U.image&&L.push(T.image),U.imageAltText&&L.push(T.imageAltText,"link"),U.imageMarker&&L.push(T.imageMarker)),U.header&&L.push(T.header,T.header+"-"+U.header),U.quote&&(L.push(T.quote),!w.maxBlockquoteDepth||w.maxBlockquoteDepth>=U.quote?L.push(T.quote+"-"+U.quote):L.push(T.quote+"-"+w.maxBlockquoteDepth)),U.list!==!1){var ee=(U.listStack.length-1)%3;ee?ee===1?L.push(T.list2):L.push(T.list3):L.push(T.list1)}return U.trailingSpaceNewLine?L.push("trailing-space-new-line"):U.trailingSpace&&L.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),L.length?L.join(" "):null}function x(U,L){return U.match(n,!0)?y(L):void 0}function C(U,L){var K=L.text(U,L);if(typeof K!="undefined")return K;if(L.list)return L.list=null,y(L);if(L.taskList){var ee=U.match(r,!0)[1]===" ";return ee?L.taskOpen=!0:L.taskClosed=!0,w.highlightFormatting&&(L.formatting="task"),L.taskList=!1,y(L)}if(L.taskOpen=!1,L.taskClosed=!1,L.header&&U.match(/^#+$/,!0))return w.highlightFormatting&&(L.formatting="header"),y(L);var oe=U.next();if(L.linkTitle){L.linkTitle=!1;var ae=oe;oe==="("&&(ae=")"),ae=(ae+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var be="^\\s*(?:[^"+ae+"\\\\]+|\\\\\\\\|\\\\.)"+ae;if(U.match(new RegExp(be),!0))return T.linkHref}if(oe==="`"){var _e=L.formatting;w.highlightFormatting&&(L.formatting="code"),U.eatWhile("`");var fe=U.current().length;if(L.code==0&&(!L.quote||fe==1))return L.code=fe,y(L);if(fe==L.code){var Re=y(L);return L.code=0,Re}else return L.formatting=_e,y(L)}else if(L.code)return y(L);if(oe==="\\"&&(U.next(),w.highlightFormatting)){var Ce=y(L),ce=T.formatting+"-escape";return Ce?Ce+" "+ce:ce}if(oe==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return L.imageMarker=!0,L.image=!0,w.highlightFormatting&&(L.formatting="image"),y(L);if(oe==="["&&L.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return L.imageMarker=!1,L.imageAltText=!0,w.highlightFormatting&&(L.formatting="image"),y(L);if(oe==="]"&&L.imageAltText){w.highlightFormatting&&(L.formatting="image");var Ce=y(L);return L.imageAltText=!1,L.image=!1,L.inline=L.f=F,Ce}if(oe==="["&&!L.image)return L.linkText&&U.match(/^.*?\]/)||(L.linkText=!0,w.highlightFormatting&&(L.formatting="link")),y(L);if(oe==="]"&&L.linkText){w.highlightFormatting&&(L.formatting="link");var Ce=y(L);return L.linkText=!1,L.inline=L.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?F:C,Ce}if(oe==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=S,w.highlightFormatting&&(L.formatting="link");var Ce=y(L);return Ce?Ce+=" ":Ce="",Ce+T.linkInline}if(oe==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=S,w.highlightFormatting&&(L.formatting="link");var Ce=y(L);return Ce?Ce+=" ":Ce="",Ce+T.linkEmail}if(w.xml&&oe==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var te=U.string.indexOf(">",U.pos);if(te!=-1){var W=U.string.substring(U.start,te);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(W)&&(L.md_inside=!0)}return U.backUp(1),L.htmlState=N.startState(k),s(U,L,I)}if(w.xml&&oe==="<"&&U.match(/^\/\w*?>/))return L.md_inside=!1,"tag";if(oe==="*"||oe==="_"){for(var X=1,V=U.pos==1?" ":U.string.charAt(U.pos-2);X<3&&U.eat(oe);)X++;var Z=U.peek()||" ",q=!/\s/.test(Z)&&(!d.test(Z)||/\s/.test(V)||d.test(V)),ie=!/\s/.test(V)&&(!d.test(V)||/\s/.test(Z)||d.test(Z)),ne=null,J=null;if(X%2&&(!L.em&&q&&(oe==="*"||!ie||d.test(V))?ne=!0:L.em==oe&&ie&&(oe==="*"||!q||d.test(Z))&&(ne=!1)),X>1&&(!L.strong&&q&&(oe==="*"||!ie||d.test(V))?J=!0:L.strong==oe&&ie&&(oe==="*"||!q||d.test(Z))&&(J=!1)),J!=null||ne!=null){w.highlightFormatting&&(L.formatting=ne==null?"strong":J==null?"em":"strong em"),ne===!0&&(L.em=oe),J===!0&&(L.strong=oe);var Re=y(L);return ne===!1&&(L.em=!1),J===!1&&(L.strong=!1),Re}}else if(oe===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return y(L);U.backUp(1)}if(w.strikethrough){if(oe==="~"&&U.eatWhile(oe)){if(L.strikethrough){w.highlightFormatting&&(L.formatting="strikethrough");var Re=y(L);return L.strikethrough=!1,Re}else if(U.match(/^[^\s]/,!1))return L.strikethrough=!0,w.highlightFormatting&&(L.formatting="strikethrough"),y(L)}else if(oe===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return y(L);U.backUp(2)}}if(w.emoji&&oe===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){L.emoji=!0,w.highlightFormatting&&(L.formatting="emoji");var $=y(L);return L.emoji=!1,$}return oe===" "&&(U.match(/^ +$/,!1)?L.trailingSpace++:L.trailingSpace&&(L.trailingSpaceNewLine=!0)),y(L)}function S(U,L){var K=U.next();if(K===">"){L.f=L.inline=C,w.highlightFormatting&&(L.formatting="link");var ee=y(L);return ee?ee+=" ":ee="",ee+T.linkInline}return U.match(/^[^>]+/,!0),T.linkInline}function F(U,L){if(U.eatSpace())return null;var K=U.next();return K==="("||K==="["?(L.f=L.inline=A(K==="("?")":"]"),w.highlightFormatting&&(L.formatting="link-string"),L.linkHref=!0,y(L)):"error"}var j={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function A(U){return function(L,K){var ee=L.next();if(ee===U){K.f=K.inline=C,w.highlightFormatting&&(K.formatting="link-string");var oe=y(K);return K.linkHref=!1,oe}return L.match(j[U]),K.linkHref=!0,y(K)}}function Y(U,L){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(L.f=z,U.next(),w.highlightFormatting&&(L.formatting="link"),L.linkText=!0,y(L)):o(U,L,C)}function z(U,L){if(U.match(/^\]:/,!0)){L.f=L.inline=O,w.highlightFormatting&&(L.formatting="link");var K=y(L);return L.linkText=!1,K}return U.match(/^([^\]\\]|\\.)+/,!0),T.linkText}function O(U,L){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?L.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),L.f=L.inline=C,T.linkHref+" url")}var H={startState:function(){return{f:p,prevLine:{stream:null},thisLine:{stream:null},block:p,htmlState:null,indentation:0,inline:C,text:x,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&N.copyState(k,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?N.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,L){if(L.formatting=!1,U!=L.thisLine.stream){if(L.header=0,L.hr=!1,U.match(/^\s*$/,!0))return v(L),null;if(L.prevLine=L.thisLine,L.thisLine={stream:U},L.taskList=!1,L.trailingSpace=0,L.trailingSpaceNewLine=!1,!L.localState&&(L.f=L.block,L.f!=I)){var K=U.match(/^\s*/,!0)[0].replace(/\t/g,u).length;if(L.indentation=K,L.indentationDiff=null,K>0)return null}}return L.f(U,L)},innerMode:function(U){return U.block==I?{state:U.htmlState,mode:k}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:H}},indent:function(U,L,K){return U.block==I&&k.indent?k.indent(U.htmlState,L,K):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,L,K):N.Pass},blankLine:v,getType:y,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return H},"xml"),N.defineMIME("text/markdown","markdown"),N.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(B){if(!0)module.exports=B();else var Q})(function(){var define,module,exports;return function(){function B(Q,D,N){function g(b,m){if(!D[b]){if(!Q[b]){var T=typeof require=="function"&&require;if(!m&&T)return require(b,!0);if(w)return w(b,!0);var _=new Error("Cannot find module '"+b+"'");throw _.code="MODULE_NOT_FOUND",_}var t=D[b]={exports:{}};Q[b][0].call(t.exports,function(h){var r=Q[b][1][h];return g(r||h)},t,t.exports,B,Q,D,N)}return D[b].exports}for(var w=typeof require=="function"&&require,k=0;k<N.length;k++)g(N[k]);return g}return B}()({1:[function(B,Q,D){"use strict";var N=B("./browser/client");N.Buffer=B("buffer").Buffer,N.urllib=B("../shims/xhr"),N.version=B("./browser/version").version,Q.exports=N},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(B,Q,D){(function(N,g){"use strict";var w=B("babel-runtime/core-js/promise"),k=t(w),b=B("babel-runtime/regenerator"),m=t(b),T=B("babel-runtime/core-js/object/assign"),_=t(T);function t(Y){return Y&&Y.__esModule?Y:{default:Y}}var h=B("debug")("ali-oss"),r=B("copy-to"),c=B("xml2js"),i=B("agentkeepalive"),n=B("merge-descriptors"),l=B("url"),f=B("is-type-of"),d=B("platform"),u=B("utility"),o=B("urllib"),s=B("./version"),E=B("bowser"),v=B("../common/signUtils"),p=B("../common/utils/isIP"),I=p.isIP,R=B("../common/client/initOptions"),y=B("../common/utils/createRequest"),x=y.createRequest,C=new i;function S(){var Y=d.name,z=d.version;Y&&Y.toLowerCase&&Y.toLowerCase()==="ie"&&z.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function F(){return location&&location.protocol==="https:"}function j(Y,z){if(S(),!(this instanceof j))return new j(Y,z);Y&&Y.inited?this.options=Y:this.options=j.initOptions(Y),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=o,this.agent=this.options.agent||C),this.ctx=z,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}Q.exports=j,j.initOptions=function(z){z.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var O=(0,_.default)({secure:F(),useFetch:!1},z);return R(O)};var A=j.prototype;A.debug=h,n(A,B("./object")),n(A,B("../common/bucket/getBucketWebsite")),n(A,B("../common/bucket/putBucketWebsite")),n(A,B("../common/bucket/deleteBucketWebsite")),n(A,B("../common/bucket/getBucketLifecycle")),n(A,B("../common/bucket/putBucketLifecycle")),n(A,B("../common/bucket/deleteBucketLifecycle")),n(A,B("../common/bucket/putBucketVersioning")),n(A,B("../common/bucket/getBucketVersioning")),n(A,B("./managed-upload")),n(A,B("../common/multipart")),n(A,B("../common/parallel")),A.signature=function(z){return this.debug("authorization stringToSign: %s",z,"info"),v.computeSignature(this.options.accessKeySecret,z)},A.authorization=function(z,O,H,U){var L=v.buildCanonicalString(z.toUpperCase(),O,{headers:U,parameters:H});return v.authorization(this.options.accessKeyId,this.options.accessKeySecret,L)},A.request=function(z){var O,H,U,L,K,ee;return m.default.async(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return O=x.call(this,z),this.options.useFetch||(O.params.mode="disable-fetch"),H=void 0,U=void 0,L=!!z.stream,ae.prev=5,ae.next=8,m.default.awrap(this.urllib.request(O.url,O.params));case 8:H=ae.sent,this.debug("response %s %s, got %s, headers: %j",z.method,O.url,H.status,H.headers,"info"),ae.next=15;break;case 12:ae.prev=12,ae.t0=ae.catch(5),U=ae.t0;case 15:if(K=void 0,!(H&&z.successStatuses&&z.successStatuses.indexOf(H.status)===-1)){ae.next=28;break}return ae.next=19,m.default.awrap(this.requestError(H));case 19:if(K=ae.sent,!(K.code==="RequestTimeTooSkewed"&&!L)){ae.next=25;break}return this.options.amendTimeSkewed=+new Date(K.serverTime)-new Date,ae.next=24,m.default.awrap(this.request(z));case 24:return ae.abrupt("return",ae.sent);case 25:K.params=z,ae.next=32;break;case 28:if(!U){ae.next=32;break}return ae.next=31,m.default.awrap(this.requestError(U));case 31:K=ae.sent;case 32:if(!K){ae.next=34;break}throw K;case 34:if(!z.xmlResponse){ae.next=39;break}return ae.next=37,m.default.awrap(this.parseXML(H.data));case 37:ee=ae.sent,H.data=ee;case 39:return ae.abrupt("return",H);case 40:case"end":return ae.stop()}},null,this,[[5,12]])},A._getResource=function(z){var O="/";return z.bucket&&(O+=z.bucket+"/"),z.object&&(O+=z.object),O},A._isIP=I,A._escape=function(z){return u.encodeURIComponent(z).replace(/%2F/g,"/")},A._getReqUrl=function(z){var O={};r(this.options.endpoint).to(O);var H=this._isIP(O.hostname),U=this.options.cname;z.bucket&&!U&&!H&&(O.host=z.bucket+"."+O.host);var L="/";z.bucket&&H&&(L+=z.bucket+"/"),z.object&&(L+=this._escape(z.object).replace(/\+/g,"%2B")),O.pathname=L;var K={};if(z.query&&n(K,z.query),z.subres){var ee={};f.string(z.subres)?ee[z.subres]="":f.array(z.subres)?z.subres.forEach(function(oe){ee[oe]=""}):ee=z.subres,n(K,ee)}return O.query=K,l.format(O)},A._getUserAgent=function(){var z=g&&g.browser?"js":"nodejs",O="aliyun-sdk-"+z+"/"+s.version,H=d.description;return!H&&g&&(H="Node.js "+g.version.slice(1)+" on "+g.platform+" "+g.arch),this._checkUserAgent(O+" "+H)},A._checkUserAgent=function(z){var O=z.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return O},A.checkBrowserAndVersion=function(z,O){return E.name===z&&E.version.split(".")[0]===O},A.parseXML=function(z){return new k.default(function(O,H){N.isBuffer(z)&&(z=z.toString()),c.parseString(z,{explicitRoot:!1,explicitArray:!1},function(U,L){U?H(U):O(L)})})},A.requestError=function(z){var O,H,U,L;return m.default.async(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(O=null,!(!z.data||!z.data.length)){ee.next=5;break}z.status===-1||z.status===-2?(O=new Error(z.message),O.name=z.name,O.status=z.status,O.code=z.name):(z.status===404?(O=new Error("Object not exists"),O.name="NoSuchKeyError",O.status=404,O.code="NoSuchKey"):z.status===412?(O=new Error("Pre condition failed"),O.name="PreconditionFailedError",O.status=412,O.code="PreconditionFailed"):(O=new Error("Unknow error, status: "+z.status),O.name="UnknowError",O.status=z.status),O.requestId=z.headers["x-oss-request-id"],O.host=""),ee.next=33;break;case 5:return H=String(z.data),this.debug("request response error data: %s",H,"error"),U=void 0,ee.prev=8,ee.next=11,m.default.awrap(this.parseXML(H));case 11:if(ee.t0=ee.sent,ee.t0){ee.next=14;break}ee.t0={};case 14:U=ee.t0,ee.next=24;break;case 17:return ee.prev=17,ee.t1=ee.catch(8),this.debug(H,"error"),ee.t1.message+=`
|
|
|
raw xml: `+H,ee.t1.status=z.status,ee.t1.requestId=z.headers["x-oss-request-id"],ee.abrupt("return",ee.t1);case 24:L=U.Message||"unknow request error, status: "+z.status,U.Condition&&(L+=" (condition: "+U.Condition+")"),O=new Error(L),O.name=U.Code?U.Code+"Error":"UnknowError",O.status=z.status,O.code=U.Code,O.requestId=U.RequestId,O.hostId=U.HostId,O.serverTime=U.ServerTime;case 33:return this.debug("generate error %j",O,"error"),ee.abrupt("return",O);case 35:case"end":return ee.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:B("../../node_modules/is-buffer/index.js")},B("_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(B,Q,D){(function(N){"use strict";var g=B("babel-runtime/core-js/array/from"),w=_(g),k=B("babel-runtime/core-js/promise"),b=_(k),m=B("babel-runtime/regenerator"),T=_(m);function _(v){return v&&v.__esModule?v:{default:v}}var t=B("is-type-of"),h=B("util"),r=B("path"),c=B("mime"),i=B("copy-to"),n=B("../common/utils/isBlob"),l=n.isBlob,f=B("../common/utils/isFile"),d=f.isFile,u=D;u.multipartUpload=function(p,I,R){var y,x,C,S,F,j,A,Y,z;return T.default.async(function(H){for(;;)switch(H.prev=H.next){case 0:if(this.resetCancelFlag(),R=R||{},!(R.checkpoint&&R.checkpoint.uploadId)){H.next=6;break}return H.next=5,T.default.awrap(this._resumeMultipart(R.checkpoint,R));case 5:return H.abrupt("return",H.sent);case 6:return y=100*1024,R.mime||(d(I)?R.mime=c.getType(r.extname(I.name)):l(I)?R.mime=I.type:R.mime=c.getType(r.extname(I))),R.headers=R.headers||{},this._convertMetaToHeaders(R.meta,R.headers),H.next=12,T.default.awrap(this._getFileSize(I));case 12:if(x=H.sent,!(x<y)){H.next=25;break}return C=this._createStream(I,0,x),R.contentLength=x,H.next=18,T.default.awrap(this.putStream(p,C,R));case 18:if(S=H.sent,!(R&&R.progress)){H.next=22;break}return H.next=22,T.default.awrap(R.progress(1));case 22:return F={res:S.res,bucket:this.options.bucket,name:p,etag:S.res.headers.etag},(R.headers&&R.headers["x-oss-callback"]||R.callback)&&(F.data=S.data),H.abrupt("return",F);case 25:if(!(R.partSize&&!(parseInt(R.partSize,10)===R.partSize))){H.next=27;break}throw new Error("partSize must be int number");case 27:if(!(R.partSize&&R.partSize<y)){H.next=29;break}throw new Error("partSize must not be smaller than "+y);case 29:return H.next=31,T.default.awrap(this.initMultipartUpload(p,R));case 31:if(j=H.sent,A=j.uploadId,Y=this._getPartSize(x,R.partSize),z={file:I,name:p,fileSize:x,partSize:Y,uploadId:A,doneParts:[]},!(R&&R.progress)){H.next=38;break}return H.next=38,T.default.awrap(R.progress(0,z,j.res));case 38:return H.next=40,T.default.awrap(this._resumeMultipart(z,R));case 40:return H.abrupt("return",H.sent);case 41:case"end":return H.stop()}},null,this)},u._resumeMultipart=function(p,I){var R,y,x,C,S,F,j,A,Y,z,O,H,U,L,K,ee,oe,ae;return T.default.async(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(R=this,!this.isCancel()){_e.next=3;break}throw this._makeCancelEvent();case 3:return y=p.file,x=p.fileSize,C=p.partSize,S=p.uploadId,F=p.doneParts,j=p.name,A=[],F.length>0&&i(F).to(A),Y=this._divideParts(x,C),z=Y.length,O=!1,H=function(Re,Ce){var ce=this;return new b.default(function(W,X){var V,Z,q,ie;return T.default.async(function(J){for(;;)switch(J.prev=J.next){case 0:if(J.prev=0,Re.isCancel()){J.next=18;break}return V=Y[Ce-1],Z={stream:Re._createStream(y,V.start,V.end),size:V.end-V.start},J.next=6,T.default.awrap(Re._uploadPart(j,S,Ce,Z));case 6:if(q=J.sent,!(!Re.isCancel()&&!O)){J.next=15;break}if(p.doneParts.push({number:Ce,etag:q.res.headers.etag}),!I.progress){J.next=12;break}return J.next=12,T.default.awrap(I.progress(F.length/z,p,q.res));case 12:W({number:Ce,etag:q.res.headers.etag}),J.next=16;break;case 15:W();case 16:J.next=19;break;case 18:W();case 19:J.next=30;break;case 21:J.prev=21,J.t0=J.catch(0),ie=new Error,ie.name=J.t0.name,ie.message=J.t0.message,ie.stack=J.t0.stack,ie.partNum=Ce,i(J.t0).to(ie),X(ie);case 30:case"end":return J.stop()}},null,ce,[[0,21]])})},U=(0,w.default)(new Array(z),function(fe,Re){return Re+1}),L=A.map(function(fe){return fe.number}),K=U.filter(function(fe){return L.indexOf(fe)<0}),ee=5,oe=I.parallel||ee,_e.next=17,T.default.awrap(this._parallel(K,oe,function(fe){return new b.default(function(Re,Ce){H(R,fe).then(function(ce){ce&&A.push(ce),Re()}).catch(function(ce){Ce(ce)})})}));case 17:if(ae=_e.sent,O=!0,!this.isCancel()){_e.next=22;break}throw H=null,this._makeCancelEvent();case 22:if(!(ae&&ae.length>0)){_e.next=25;break}throw ae[0].message="Failed to upload some parts with error: "+ae[0].toString()+" part_num: "+ae[0].partNum,ae[0];case 25:return _e.next=27,T.default.awrap(this.completeMultipartUpload(j,S,A,I));case 27:return _e.abrupt("return",_e.sent);case 28:case"end":return _e.stop()}},null,this)},u._getFileSize=function(p){return T.default.async(function(R){for(;;)switch(R.prev=R.next){case 0:if(!t.buffer(p)){R.next=4;break}return R.abrupt("return",p.length);case 4:if(!(l(p)||d(p))){R.next=6;break}return R.abrupt("return",p.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return R.stop()}},null,this)};var o=B("stream"),s=o.Readable;function E(v,p){if(!(this instanceof E))return new E(v,p);s.call(this,p),this.file=v,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}h.inherits(E,s),E.prototype.readFileAndPush=function(p){if(this.fileBuffer)for(var I=!0;I&&this.fileBuffer&&this.start<this.fileBuffer.length;){var R=this.start,y=R+p;y=y>this.fileBuffer.length?this.fileBuffer.length:y,this.start=y,I=this.push(this.fileBuffer.slice(R,y))}},E.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 I=16*1024;p=p||I;var R=this;this.reader.onload=function(x){R.fileBuffer=N.from(new Uint8Array(x.target.result)),R.file=null,R.readFileAndPush(p)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(p)},u._createStream=function(p,I,R){if(l(p)||d(p))return new E(p.slice(I,R));throw new Error("_createStream requires File/Blob.")},u._getPartSize=function(p,I){var R=10*1e3,y=1024*1024;return I?Math.max(Math.ceil(p/R),I):y},u._divideParts=function(p,I){for(var R=Math.ceil(p/I),y=[],x=0;x<R;x++){var C=I*x,S=Math.min(C+I,p);y.push({start:C,end:S})}return y}}).call(this,B("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(B,Q,D){"use strict";var N=B("babel-runtime/core-js/promise"),g=t(N),w=B("babel-runtime/core-js/object/keys"),k=t(w),b=B("babel-runtime/core-js/object/assign"),m=t(b),T=B("babel-runtime/regenerator"),_=t(T);function t(R){return R&&R.__esModule?R:{default:R}}var h=B("utility"),r=B("fs"),c=B("is-type-of"),i=B("url"),n=B("copy-to"),l=B("path"),f=B("mime"),d=B("../common/callback"),u=B("../common/signUtils"),o=B("merge-descriptors"),s=B("../common/utils/isBlob"),E=s.isBlob,v=B("../common/utils/isFile"),p=v.isFile,I=D;I.append=function(y,x,C){var S;return _.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return C=C||{},C.position===void 0&&(C.position="0"),C.subres={append:"",position:C.position},C.method="POST",j.next=6,_.default.awrap(this.put(y,x,C));case 6:return S=j.sent,S.nextAppendPosition=S.res.headers["x-oss-next-append-position"],j.abrupt("return",S);case 9:case"end":return j.stop()}},null,this)},I.put=function(y,x,C){var S,F,j,A,Y,z,O;return _.default.async(function(U){for(;;)switch(U.prev=U.next){case 0:if(S=void 0,C=C||{},y=this._objectName(y),!c.buffer(x)){U.next=7;break}S=x,U.next=33;break;case 7:if(!(E(x)||p(x))){U.next=32;break}return C.mime||(p(x)?C.mime=f.getType(l.extname(x.name)):C.mime=x.type),F=this._createStream(x,0,x.size),U.next=12,_.default.awrap(this._getFileSize(x));case 12:return C.contentLength=U.sent,U.prev=13,U.next=16,_.default.awrap(this.putStream(y,F,C));case 16:return j=U.sent,U.abrupt("return",j);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(y,x,C));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 C.headers=C.headers||{},this._convertMetaToHeaders(C.meta,C.headers),A=C.method||"PUT",Y=this._objectRequestParams(A,y,C),d.encodeCallback(Y,C),Y.mime=C.mime,Y.content=S,Y.successStatuses=[200],U.next=43,_.default.awrap(this.request(Y));case 43:return z=U.sent,O={name:y,url:this._objectUrl(y),res:z.res},Y.headers&&Y.headers["x-oss-callback"]&&(O.data=JSON.parse(z.data.toString())),U.abrupt("return",O);case 47:case"end":return U.stop()}},null,this,[[13,20]])},I.putStream=function(y,x,C){var S,F,j,A;return _.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:return C=C||{},C.headers=C.headers||{},y=this._objectName(y),C.contentLength?C.headers["Content-Length"]=C.contentLength:C.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(C.meta,C.headers),S=C.method||"PUT",F=this._objectRequestParams(S,y,C),d.encodeCallback(F,C),F.mime=C.mime,F.stream=x,F.successStatuses=[200],z.next=13,_.default.awrap(this.request(F));case 13:return j=z.sent,A={name:y,url:this._objectUrl(y),res:j.res},F.headers&&F.headers["x-oss-callback"]&&(A.data=JSON.parse(j.data.toString())),z.abrupt("return",A);case 17:case"end":return z.stop()}},null,this)},o(I,B("../common/object/copyObject")),o(I,B("../common/object/getObjectTagging")),o(I,B("../common/object/putObjectTagging")),o(I,B("../common/object/deleteObjectTagging")),o(I,B("../common/image")),o(I,B("../common/object/getBucketVersions")),o(I,B("../common/object/getACL")),o(I,B("../common/object/putACL")),o(I,B("../common/object/head")),o(I,B("../common/object/delete")),o(I,B("../common/object/get")),o(I,B("../common/object/putSymlink")),o(I,B("../common/object/getSymlink")),o(I,B("../common/object/deleteMulti")),o(I,B("../common/object/getObjectMeta")),I.putMeta=function(y,x,C){var S;return _.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return j.next=2,_.default.awrap(this.copy(y,y,{meta:x||{},timeout:C&&C.timeout,ctx:C&&C.ctx}));case 2:return S=j.sent,j.abrupt("return",S);case 4:case"end":return j.stop()}},null,this)},I.list=function(y,x){var C,S,F,j,A;return _.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:return C=this._objectRequestParams("GET","",x),C.query=y,C.xmlResponse=!0,C.successStatuses=[200],z.next=6,_.default.awrap(this.request(C));case 6:return S=z.sent,F=S.data.Contents,j=this,F&&(Array.isArray(F)||(F=[F]),F=F.map(function(O){return{name:O.Key,url:j._objectUrl(O.Key),lastModified:O.LastModified,etag:O.ETag,type:O.Type,size:Number(O.Size),storageClass:O.StorageClass,owner:{id:O.Owner.ID,displayName:O.Owner.DisplayName}}})),A=S.data.CommonPrefixes||null,A&&(Array.isArray(A)||(A=[A]),A=A.map(function(O){return O.Prefix})),z.abrupt("return",{res:S.res,objects:F,prefixes:A,nextMarker:S.data.NextMarker||null,isTruncated:S.data.IsTruncated==="true"});case 13:case"end":return z.stop()}},null,this)},I.restore=function(y,x){var C,S;return _.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return x=x||{},x.subres=(0,m.default)({restore:""},x.subres),x.versionId&&(x.subres.versionId=x.versionId),C=this._objectRequestParams("POST",y,x),C.successStatuses=[202],j.next=7,_.default.awrap(this.request(C));case 7:return S=j.sent,j.abrupt("return",{res:S.res});case 9:case"end":return j.stop()}},null,this)},I.signatureUrl=function(y,x){x=x||{},y=this._objectName(y),x.method=x.method||"GET";var C=h.timestamp()+(x.expires||1800),S={bucket:this.options.bucket,object:y},F=this._getResource(S);this.options.stsToken&&(x["security-token"]=this.options.stsToken);var j=u._signatureForURL(this.options.accessKeySecret,x,F,C),A=i.parse(this._getReqUrl(S));return A.query={OSSAccessKeyId:this.options.accessKeyId,Expires:C,Signature:j.Signature},n(j.subResource).to(A.query),A.format()},I.getObjectUrl=function(y,x){return x?x[x.length-1]!=="/"&&(x+="/"):x=this.options.endpoint.format(),x+this._escape(this._objectName(y))},I._objectUrl=function(y){return this._getReqUrl({bucket:this.options.bucket,object:y})},I.generateObjectUrl=function(R,y){if(y)y[y.length-1]!=="/"&&(y+="/");else{y=this.options.endpoint.format();var x=i.parse(y),C=this.options.bucket;x.hostname=C+"."+x.hostname,x.host=C+"."+x.host,y=x.format()}return y+this._escape(this._objectName(R))},I._objectRequestParams=function(y,x,C){if(!this.options.bucket)throw new Error("Please create a bucket first");C=C||{},x=this._objectName(x);var S={object:x,bucket:this.options.bucket,method:y,subres:C&&C.subres,timeout:C&&C.timeout,ctx:C&&C.ctx};return C.headers&&(S.headers={},n(C.headers).to(S.headers)),S},I._objectName=function(y){return y.replace(/^\/+/,"")},I._convertMetaToHeaders=function(y,x){if(!y)return;(0,k.default)(y).forEach(function(C){x["x-oss-meta-"+C]=y[C]})},I._deleteFileSafe=function(y){var x=this;return new g.default(function(C){r.exists(y,function(S){S?r.unlink(y,function(F){F&&x.debug("unlink %j error: %s",y,F,"error"),C()}):C()})})}},{"../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(B,Q,D){"use strict";D.version="6.10.0"},{}],6:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=w(N);function w(T){return T&&T.__esModule?T:{default:T}}var k=B("../utils/checkBucketName"),b=k.checkBucketName,m=D;m.deleteBucketLifecycle=function(_,t){var h,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return b(_),h=this._bucketRequestParams("DELETE",_,"lifecycle",t),h.successStatuses=[204],i.next=5,g.default.awrap(this.request(h));case 5:return r=i.sent,i.abrupt("return",{res:r.res});case 7:case"end":return i.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=w(N);function w(T){return T&&T.__esModule?T:{default:T}}var k=B("../utils/checkBucketName"),b=k.checkBucketName,m=D;m.deleteBucketWebsite=function(_,t){var h,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return b(_),h=this._bucketRequestParams("DELETE",_,"website",t),h.successStatuses=[204],i.next=5,g.default.awrap(this.request(h));case 5:return r=i.sent,i.abrupt("return",{res:r.res});case 7:case"end":return i.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=w(N);function w(r){return r&&r.__esModule?r:{default:r}}var k=B("../utils/checkBucketName"),b=k.checkBucketName,m=B("../utils/isArray"),T=m.isArray,_=B("../utils/formatObjKey"),t=_.formatObjKey,h=D;h.getBucketLifecycle=function(c,i){var n,l,f;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return b(c),n=this._bucketRequestParams("GET",c,"lifecycle",i),n.successStatuses=[200],n.xmlResponse=!0,u.next=6,g.default.awrap(this.request(n));case 6:return l=u.sent,f=l.data.Rule||null,f&&(T(f)||(f=[f]),f=f.map(function(o){return o.ID&&(o.id=o.ID,delete o.ID),o.Tag&&!T(o.Tag)&&(o.Tag=[o.Tag]),t(o,"firstLowerCase")})),u.abrupt("return",{rules:f,res:l.res});case 10:case"end":return u.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=w(N);function w(T){return T&&T.__esModule?T:{default:T}}var k=B("../utils/checkBucketName"),b=k.checkBucketName,m=D;m.getBucketVersioning=function(_,t){var h,r,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return b(_),h=this._bucketRequestParams("GET",_,"versioning",t),h.xmlResponse=!0,h.successStatuses=[200],n.next=6,g.default.awrap(this.request(h));case 6:return r=n.sent,c=r.data.Status,n.abrupt("return",{status:r.status,versionStatus:c,res:r.res});case 9:case"end":return n.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=w(N);function w(t){return t&&t.__esModule?t:{default:t}}var k=B("../utils/checkBucketName"),b=k.checkBucketName,m=B("../utils/isObject"),T=m.isObject,_=D;_.getBucketWebsite=function(h,r){var c,i,n;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return b(h),c=this._bucketRequestParams("GET",h,"website",r),c.successStatuses=[200],c.xmlResponse=!0,f.next=6,g.default.awrap(this.request(c));case 6:return i=f.sent,n=[],i.data.RoutingRules&&i.data.RoutingRules.RoutingRule&&(T(i.data.RoutingRules.RoutingRule)?n=[i.data.RoutingRules.RoutingRule]:n=i.data.RoutingRules.RoutingRule),f.abrupt("return",{index:i.data.IndexDocument&&i.data.IndexDocument.Suffix||"",supportSubDir:i.data.IndexDocument&&i.data.IndexDocument.SupportSubDir||"false",type:i.data.IndexDocument&&i.data.IndexDocument.Type,routingRules:n,error:i.data.ErrorDocument&&i.data.ErrorDocument.Key||null,res:i.res});case 10:case"end":return f.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=w(N);function w(p){return p&&p.__esModule?p:{default:p}}var k=B("../utils/checkBucketName"),b=k.checkBucketName,m=B("../utils/isArray"),T=m.isArray,_=B("../utils/deepCopy"),t=_.deepCopy,h=B("../utils/isObject"),r=h.isObject,c=B("../utils/obj2xml"),i=c.obj2xml,n=B("../utils/checkObjectTag"),l=n.checkObjectTag,f=B("../utils/getStrBytesCount"),d=f.getStrBytesCount,u=D;u.putBucketLifecycle=function(I,R,y){var x,C,S,F,j;return g.default.async(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(b(I),T(R)){Y.next=3;break}throw new Error("rules must be Array");case 3:return x=this._bucketRequestParams("PUT",I,"lifecycle",y),C=[],S={LifecycleConfiguration:{Rule:C}},R.forEach(function(z){o(z),v(z),z.id&&(z.ID=z.id,delete z.id),C.push(z)}),F=i(S,{headers:!0,firstUpperCase:!0}),x.content=F,x.mime="xml",x.successStatuses=[200],Y.next=13,g.default.awrap(this.request(x));case 13:return j=Y.sent,Y.abrupt("return",{res:j.res});case 15:case"end":return Y.stop()}},null,this)};function o(p){p.days&&(p.expiration={days:p.days}),p.date&&(p.expiration={createdBeforeDate:p.date})}function s(p,I){var R=p.days,y=p.createdBeforeDate;if(!R&&!y)throw new Error(I+" must includes days or createdBeforeDate");if(R&&!/^[1-9][0-9]*$/.test(R))throw new Error("days must be a positive integer");if(y&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(y))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function E(p){if(!T(p)&&!r(p))throw new Error("tag must be Object or Array");p=r(p)?[p]:p;var I={},R=t(p);R.forEach(function(y){I[y.key]=y.value}),l(I)}function v(p){if(p.id&&d(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");s(p.transition,"Transition")}if(p.expiration){if(!p.expiration.expiredObjectDeleteMarker)s(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&&s(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");E(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(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=w(N);function w(t){return t&&t.__esModule?t:{default:t}}var k=B("../utils/checkBucketName"),b=k.checkBucketName,m=B("../utils/obj2xml"),T=m.obj2xml,_=D;_.putBucketVersioning=function(h,r){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,n,l;return g.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:if(b(h),["Enabled","Suspended"].includes(r)){d.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return i=this._bucketRequestParams("PUT",h,"versioning",c),n={VersioningConfiguration:{Status:r}},i.mime="xml",i.content=T(n,{headers:!0}),d.next=9,g.default.awrap(this.request(i));case 9:return l=d.sent,d.abrupt("return",{res:l.res,status:l.status});case 11:case"end":return d.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=w(N);function w(r){return r&&r.__esModule?r:{default:r}}var k=B("../utils/checkBucketName"),b=k.checkBucketName,m=B("../utils/obj2xml"),T=m.obj2xml,_=B("../utils/isArray"),t=_.isArray,h=D;h.putBucketWebsite=function(c){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments[2],l,f,d,u,o;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:if(b(c),l=this._bucketRequestParams("PUT",c,"website",n),f={Suffix:i.index||"index.html"},d={IndexDocument:f},u={WebsiteConfiguration:d},i.supportSubDir&&(f.SupportSubDir=i.supportSubDir),i.type&&(f.Type=i.type),i.error&&(d.ErrorDocument={Key:i.error}),!(i.routingRules!==void 0)){E.next=12;break}if(t(i.routingRules)){E.next=11;break}throw new Error("RoutingRules must be Array");case 11:d.RoutingRules={RoutingRule:i.routingRules};case 12:return u=T(u),l.content=u,l.mime="xml",l.successStatuses=[200],E.next=18,g.default.awrap(this.request(l));case 18:return o=E.sent,E.abrupt("return",{res:o.res});case 20:case"end":return E.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(B,Q,D){(function(N){"use strict";var g=B("babel-runtime/core-js/object/keys"),w=m(g),k=B("babel-runtime/core-js/json/stringify"),b=m(k);function m(T){return T&&T.__esModule?T:{default:T}}D.encodeCallback=function(_,t){if(_.headers=_.headers||{},!Object.prototype.hasOwnProperty.call(_.headers,"x-oss-callback")&&t.callback){var h={callbackUrl:encodeURI(t.callback.url),callbackBody:t.callback.body};t.callback.host&&(h.callbackHost=t.callback.host),t.callback.contentType&&(h.callbackBodyType=t.callback.contentType);var r=N.from((0,b.default)(h)).toString("base64");if(_.headers["x-oss-callback"]=r,t.callback.customValue){var c={};(0,w.default)(t.callback.customValue).forEach(function(i){c["x:"+i]=t.callback.customValue[i]}),_.headers["x-oss-callback-var"]=N.from((0,b.default)(c)).toString("base64")}}}}).call(this,B("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/assign"),g=w(N);function w(h){return h&&h.__esModule?h:{default:h}}var k=B("humanize-ms"),b=B("url"),m=B("../utils/checkBucketName"),T=m.checkBucketName;function _(h,r){var c=b.parse(h);if(c.protocol||(c=b.parse("http"+(r?"s":"")+"://"+h)),c.protocol!=="http:"&&c.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return c}function t(h,r,c){var i=c?"https://":"http://",n=r?"-internal.aliyuncs.com":".aliyuncs.com",l="vpc100-oss-cn-";return h.substr(0,l.length)===l&&(n=".aliyuncs.com"),b.parse(i+h+n)}Q.exports=function(h){if(!h||!h.accessKeyId||!h.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");h.bucket&&T(h.bucket);var r=(0,g.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},h);if(r.accessKeyId=r.accessKeyId.trim(),r.accessKeySecret=r.accessKeySecret.trim(),r.timeout&&(r.timeout=k(r.timeout)),r.endpoint)r.endpoint=_(r.endpoint,r.secure);else if(r.region)r.endpoint=t(r.region,r.internal,r.secure);else throw new Error("require options.endpoint or options.region");return r.inited=!0,r}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(B,Q,D){"use strict";var N=B("merge-descriptors"),g=D;N(g,B("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=w(N);function w(r){return r&&r.__esModule?r:{default:r}}var k=B("../utils/checkBucketName"),b=k.checkBucketName,m=B("querystring"),T=B("js-base64"),_=T.Base64.encode,t=D;t.processObjectSave=function(c,i,n,l){var f,d,u,o;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return h(c,"sourceObject"),h(i,"targetObject"),h(n,"process"),i=this._objectName(i),l&&b(l),f=this._objectRequestParams("POST",c,{subres:"x-oss-process"}),d=l?",b_"+_(l):"",i=_(i),u={"x-oss-process":n+"|sys/saveas,o_"+i+d},f.content=m.stringify(u),E.next=12,g.default.awrap(this.request(f));case 12:return o=E.sent,E.abrupt("return",{res:o.res,status:o.res.status});case 14:case"end":return E.stop()}},null,this)};function h(r,c){if(!r)throw new Error(c+" is required");if(typeof r!="string")throw new Error(c+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=w(N);function w(t){return t&&t.__esModule?t:{default:t}}var k=B("copy-to"),b=B("./callback"),m=B("./utils/deepCopy"),T=m.deepCopy,_=D;_.listUploads=function(h,r){var c,i,n,l;return g.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return r=r||{},c={},k(r).to(c),c.subres="uploads",i=this._objectRequestParams("GET","",c),i.query=h,i.xmlResponse=!0,i.successStatuses=[200],d.next=10,g.default.awrap(this.request(i));case 10:return n=d.sent,l=n.data.Upload||[],Array.isArray(l)||(l=[l]),l=l.map(function(u){return{name:u.Key,uploadId:u.UploadId,initiated:u.Initiated}}),d.abrupt("return",{res:n.res,uploads:l,bucket:n.data.Bucket,nextKeyMarker:n.data.NextKeyMarker,nextUploadIdMarker:n.data.NextUploadIdMarker,isTruncated:n.data.IsTruncated==="true"});case 15:case"end":return d.stop()}},null,this)},_.listParts=function(h,r,c,i){var n,l,f;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return i=i||{},n={},k(i).to(n),n.subres={uploadId:r},l=this._objectRequestParams("GET",h,n),l.query=c,l.xmlResponse=!0,l.successStatuses=[200],u.next=10,g.default.awrap(this.request(l));case 10:return f=u.sent,u.abrupt("return",{res:f.res,uploadId:f.data.UploadId,bucket:f.data.Bucket,name:f.data.Key,partNumberMarker:f.data.PartNumberMarker,nextPartNumberMarker:f.data.NextPartNumberMarker,maxParts:f.data.MaxParts,isTruncated:f.data.IsTruncated,parts:f.data.Part||[]});case 12:case"end":return u.stop()}},null,this)},_.abortMultipartUpload=function(h,r,c){var i,n,l;return g.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return this._stop(),c=c||{},i={},k(c).to(i),i.subres={uploadId:r},n=this._objectRequestParams("DELETE",h,i),n.successStatuses=[204],d.next=9,g.default.awrap(this.request(n));case 9:return l=d.sent,d.abrupt("return",{res:l.res});case 11:case"end":return d.stop()}},null,this)},_.initMultipartUpload=function(h,r){var c,i,n;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return r=r||{},c={},k(r).to(c),c.headers=c.headers||{},this._convertMetaToHeaders(r.meta,c.headers),c.subres="uploads",i=this._objectRequestParams("POST",h,c),i.mime=r.mime,i.xmlResponse=!0,i.successStatuses=[200],f.next=12,g.default.awrap(this.request(i));case 12:return n=f.sent,f.abrupt("return",{res:n.res,bucket:n.data.Bucket,name:n.data.Key,uploadId:n.data.UploadId});case 14:case"end":return f.stop()}},null,this)},_.uploadPart=function(h,r,c,i,n,l,f){var d;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return d={stream:this._createStream(i,n,l),size:l-n},o.next=3,g.default.awrap(this._uploadPart(h,r,c,d,f));case 3:return o.abrupt("return",o.sent);case 4:case"end":return o.stop()}},null,this)},_.completeMultipartUpload=function(h,r,c,i){var n,l,f,d,u,o,s,E;return g.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:for(n=c.concat().sort(function(I,R){return I.number-R.number}).filter(function(I,R,y){return!R||I.number!==y[R-1].number}),l=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,f=0;f<n.length;f++)d=n[f],l+=`<Part>
|
|
|
`,l+="<PartNumber>"+d.number+`</PartNumber>
|
|
|
`,l+="<ETag>"+d.etag+`</ETag>
|
|
|
`,l+=`</Part>
|
|
|
`;return l+="</CompleteMultipartUpload>",i=i||{},u={},u=T(i),u.headers&&delete u.headers["x-oss-server-side-encryption"],u.subres={uploadId:r},o=this._objectRequestParams("POST",h,u),b.encodeCallback(o,u),o.mime="xml",o.content=l,o.headers&&o.headers["x-oss-callback"]||(o.xmlResponse=!0),o.successStatuses=[200],p.next=17,g.default.awrap(this.request(o));case 17:return s=p.sent,E={res:s.res,bucket:o.bucket,name:h,etag:s.res.headers.etag},o.headers&&o.headers["x-oss-callback"]&&(E.data=JSON.parse(s.data.toString())),p.abrupt("return",E);case 21:case"end":return p.stop()}},null,this)},_._uploadPart=function(h,r,c,i,n){var l,f,d;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return n=n||{},l={},k(n).to(l),l.headers={"Content-Length":i.size},l.subres={partNumber:c,uploadId:r},f=this._objectRequestParams("PUT",h,l),f.mime=l.mime,f.stream=i.stream,f.successStatuses=[200],o.next=11,g.default.awrap(this.request(f));case 11:if(d=o.sent,d.res.headers.etag){o.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 i.stream=null,f.stream=null,o.abrupt("return",{name:h,etag:d.res.headers.etag,res:d.res});case 17:case"end":return o.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=T(N),w=B("babel-runtime/core-js/object/keys"),k=T(w),b=B("babel-runtime/helpers/typeof"),m=T(b);function T(r){return r&&r.__esModule?r:{default:r}}var _=B("../utils/checkBucketName"),t=_.checkBucketName,h=D;h.copy=function(c,i,n,l){var f,d,u;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return(typeof n=="undefined"?"undefined":(0,m.default)(n))==="object"&&(l=n),l=l||{},l.headers=l.headers||{},(0,k.default)(l.headers).forEach(function(E){l.headers["x-oss-copy-source-"+E.toLowerCase()]=l.headers[E]}),l.meta&&(l.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(l.meta,l.headers),i=this._getSourceName(i,n),l.versionId&&(i=i+"?versionId="+l.versionId),l.headers["x-oss-copy-source"]=i,f=this._objectRequestParams("PUT",c,l),f.xmlResponse=!0,f.successStatuses=[200,304],s.next=14,g.default.awrap(this.request(f));case 14:return d=s.sent,u=d.data,u&&(u={etag:u.ETag,lastModified:u.LastModified}),s.abrupt("return",{data:u,res:d.res});case 18:case"end":return s.stop()}},null,this)},h._getSourceName=function(c,i){return typeof i=="string"?c=this._objectName(c):c[0]!=="/"?i=this.options.bucket:(i=c.replace(/\/(.+?)(\/.*)/,"$1"),c=c.replace(/(\/.+?\/)(.*)/,"$2")),t(i),c=encodeURI(c),c="/"+i+"/"+c,c}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=b(N),w=B("babel-runtime/core-js/object/assign"),k=b(w);function b(T){return T&&T.__esModule?T:{default:T}}var m=D;m.delete=function(_){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return t.subres=(0,k.default)({},t.subres),t.versionId&&(t.subres.versionId=t.versionId),h=this._objectRequestParams("DELETE",_,t),h.successStatuses=[204],i.next=6,g.default.awrap(this.request(h));case 6:return r=i.sent,i.abrupt("return",{res:r.res});case 8:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=b(N),w=B("babel-runtime/core-js/object/assign"),k=b(w);function b(h){return h&&h.__esModule?h:{default:h}}var m=B("utility"),T=B("../utils/obj2xml"),_=T.obj2xml,t=D;t.deleteMulti=function(r){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,n,l,f,d,u,o,s,E,v,p,I;return g.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:if(i=[],!(!r||!r.length)){y.next=3;break}throw new Error("names is required");case 3:for(n=0;n<r.length;n++)l={},typeof r[n]=="string"?l.Key=m.escape(this._objectName(r[n])):(f=r[n],d=f.key,u=f.versionId,l.Key=m.escape(this._objectName(d)),l.VersionId=u),i.push(l);return o={Delete:{Quiet:!!c.quiet,Object:i}},s=_(o,{headers:!0}),c.subres=(0,k.default)({delete:""},c.subres),c.versionId&&(c.subres.versionId=c.versionId),E=this._objectRequestParams("POST","",c),E.mime="xml",E.content=s,E.xmlResponse=!0,E.successStatuses=[200],y.next=15,g.default.awrap(this.request(E));case 15:return v=y.sent,p=v.data,I=p&&p.Deleted||null,I&&(Array.isArray(I)||(I=[I])),y.abrupt("return",{res:v.res,deleted:I||[]});case 20:case"end":return y.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=b(N),w=B("babel-runtime/core-js/object/assign"),k=b(w);function b(T){return T&&T.__esModule?T:{default:T}}var m=D;m.deleteObjectTagging=function(_){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return t.subres=(0,k.default)({tagging:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),_=this._objectName(_),h=this._objectRequestParams("DELETE",_,t),h.successStatuses=[204],i.next=7,g.default.awrap(this.request(h));case 7:return r=i.sent,i.abrupt("return",{status:r.status,res:r.res});case 9:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=b(N),w=B("babel-runtime/core-js/object/assign"),k=b(w);function b(t){return t&&t.__esModule?t:{default:t}}var m=B("fs"),T=B("is-type-of"),_=D;_.get=function(h,r){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,n,l,f;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return i=null,n=!1,T.writableStream(r)?i=r:T.string(r)?(i=m.createWriteStream(r),n=!0):c=r,c=c||{},c.subres=(0,k.default)({},c.subres),c.versionId&&(c.subres.versionId=c.versionId),c.process&&(c.subres["x-oss-process"]=c.process),l=void 0,u.prev=8,f=this._objectRequestParams("GET",h,c),f.writeStream=i,f.successStatuses=[200,206,304],u.next=14,g.default.awrap(this.request(f));case 14:l=u.sent,n&&i.destroy(),u.next=25;break;case 18:if(u.prev=18,u.t0=u.catch(8),!n){u.next=24;break}return i.destroy(),u.next=24,g.default.awrap(this._deleteFileSafe(r));case 24:throw u.t0;case 25:return u.abrupt("return",{res:l.res,content:l.data});case 26:case"end":return u.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=b(N),w=B("babel-runtime/core-js/object/assign"),k=b(w);function b(T){return T&&T.__esModule?T:{default:T}}var m=D;m.getACL=function(_){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return t.subres=(0,k.default)({acl:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),_=this._objectName(_),h=this._objectRequestParams("GET",_,t),h.successStatuses=[200],h.xmlResponse=!0,i.next=8,g.default.awrap(this.request(h));case 8:return r=i.sent,i.abrupt("return",{acl:r.data.AccessControlList.Grant,owner:{id:r.data.Owner.ID,displayName:r.data.Owner.DisplayName},res:r.res});case 10:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/keys"),g=T(N),w=B("babel-runtime/regenerator"),k=T(w),b=B("babel-runtime/core-js/object/assign"),m=T(b);function T(f){return f&&f.__esModule?f:{default:f}}var _=D,t=B("../utils/isObject"),h=t.isObject,r=B("../utils/isArray"),c=r.isArray;_.getBucketVersions=i,_.listObjectVersions=i;function i(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,o,s,E,v,p;return k.default.async(function(R){for(;;)switch(R.prev=R.next){case 0:if(!(f.versionIdMarker&&f.keyMarker===void 0)){R.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return d.subres=(0,m.default)({versions:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),u=this._objectRequestParams("GET","",d),u.xmlResponse=!0,u.successStatuses=[200],u.query=l(f),R.next=10,k.default.awrap(this.request(u));case 10:return o=R.sent,s=o.data.Version||[],E=o.data.DeleteMarker||[],v=this,s&&(Array.isArray(s)||(s=[s]),s=s.map(function(y){return{name:y.Key,url:v._objectUrl(y.Key),lastModified:y.LastModified,isLatest:y.IsLatest==="true",versionId:y.VersionId,etag:y.ETag,type:y.Type,size:Number(y.Size),storageClass:y.StorageClass,owner:{id:y.Owner.ID,displayName:y.Owner.DisplayName}}})),E&&(c(E)||(E=[E]),E=E.map(function(y){return{name:y.Key,lastModified:y.LastModified,versionId:y.VersionId,owner:{id:y.Owner.ID,displayName:y.Owner.DisplayName}}})),p=o.data.CommonPrefixes||null,p&&(c(p)||(p=[p]),p=p.map(function(y){return y.Prefix})),R.abrupt("return",{res:o.res,objects:s,deleteMarker:E,prefixes:p,nextMarker:o.data.NextMarker||null,NextVersionIdMarker:o.data.NextVersionIdMarker||null,isTruncated:o.data.IsTruncated==="true"});case 19:case"end":return R.stop()}},null,this)}function n(f){return f.replace(/([A-Z])/g,"-$1").toLowerCase()}function l(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d={};return h(f)&&(0,g.default)(f).forEach(function(u){d[n(u)]=f[u]}),d}},{"../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(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=b(N),w=B("babel-runtime/core-js/object/assign"),k=b(w);function b(T){return T&&T.__esModule?T:{default:T}}var m=D;m.getObjectMeta=function(_,t){var h,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return t=t||{},_=this._objectName(_),t.subres=(0,k.default)({objectMeta:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),h=this._objectRequestParams("HEAD",_,t),h.successStatuses=[200],i.next=8,g.default.awrap(this.request(h));case 8:return r=i.sent,i.abrupt("return",{status:r.status,res:r.res});case 10:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=b(N),w=B("babel-runtime/core-js/object/assign"),k=b(w);function b(t){return t&&t.__esModule?t:{default:t}}var m=D,T=B("../utils/isObject"),_=T.isObject;m.getObjectTagging=function(h){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,i,n,l,f;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return r.subres=(0,k.default)({tagging:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),h=this._objectName(h),c=this._objectRequestParams("GET",h,r),c.successStatuses=[200],u.next=7,g.default.awrap(this.request(c));case 7:return i=u.sent,u.next=10,g.default.awrap(this.parseXML(i.data));case 10:return n=u.sent,l=n.TagSet.Tag,l=l&&_(l)?[l]:l||[],f={},l.forEach(function(o){f[o.Key]=o.Value}),u.abrupt("return",{status:i.status,res:i.res,tag:f});case 16:case"end":return u.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=b(N),w=B("babel-runtime/core-js/object/assign"),k=b(w);function b(T){return T&&T.__esModule?T:{default:T}}var m=D;m.getSymlink=function(_){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,r,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return t.subres=(0,k.default)({symlink:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),_=this._objectName(_),h=this._objectRequestParams("GET",_,t),h.successStatuses=[200],n.next=7,g.default.awrap(this.request(h));case 7:return r=n.sent,c=r.res.headers["x-oss-symlink-target"],n.abrupt("return",{targetName:decodeURIComponent(c),res:r.res});case 10:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=T(N),w=B("babel-runtime/core-js/object/keys"),k=T(w),b=B("babel-runtime/core-js/object/assign"),m=T(b);function T(t){return t&&t.__esModule?t:{default:t}}var _=D;_.head=function(h){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,i,n;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return r.subres=(0,m.default)({},r.subres),r.versionId&&(r.subres.versionId=r.versionId),c=this._objectRequestParams("HEAD",h,r),c.successStatuses=[200,304],f.next=6,g.default.awrap(this.request(c));case 6:return i=f.sent,n={meta:null,res:i.res,status:i.status},i.status===200&&(0,k.default)(i.headers).forEach(function(d){d.indexOf("x-oss-meta-")===0&&(n.meta||(n.meta={}),n.meta[d.substring(11)]=i.headers[d])}),f.abrupt("return",n);case 10:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=b(N),w=B("babel-runtime/core-js/object/assign"),k=b(w);function b(T){return T&&T.__esModule?T:{default:T}}var m=D;m.putACL=function(_,t,h){var r,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return h=h||{},h.subres=(0,k.default)({acl:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),h.headers=h.headers||{},h.headers["x-oss-object-acl"]=t,_=this._objectName(_),r=this._objectRequestParams("PUT",_,h),r.successStatuses=[200],n.next=10,g.default.awrap(this.request(r));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(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=T(N),w=B("babel-runtime/core-js/object/keys"),k=T(w),b=B("babel-runtime/core-js/object/assign"),m=T(b);function T(i){return i&&i.__esModule?i:{default:i}}var _=B("../utils/obj2xml"),t=_.obj2xml,h=B("../utils/checkObjectTag"),r=h.checkObjectTag,c=D;c.putObjectTagging=function(n,l){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d,u,o;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return r(l),f.subres=(0,m.default)({tagging:""},f.subres),f.versionId&&(f.subres.versionId=f.versionId),n=this._objectName(n),d=this._objectRequestParams("PUT",n,f),d.successStatuses=[200],l=(0,k.default)(l).map(function(v){return{Key:v,Value:l[v]}}),u={Tagging:{TagSet:{Tag:l}}},d.mime="xml",d.content=t(u),E.next=12,g.default.awrap(this.request(d));case 12:return o=E.sent,E.abrupt("return",{res:o.res,status:o.status});case 14:case"end":return E.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(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=b(N),w=B("babel-runtime/core-js/object/assign"),k=b(w);function b(T){return T&&T.__esModule?T:{default:T}}var m=D;m.putSymlink=function(_,t,h){var r,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return h=h||{},h.headers=h.headers||{},t=this._escape(this._objectName(t)),this._convertMetaToHeaders(h.meta,h.headers),h.headers["x-oss-symlink-target"]=t,h.subres=(0,k.default)({symlink:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),h.storageClass&&(h.headers["x-oss-storage-class"]=h.storageClass),_=this._objectName(_),r=this._objectRequestParams("PUT",_,h),r.successStatuses=[200],n.next=13,g.default.awrap(this.request(r));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(B,Q,D){"use strict";var N=B("babel-runtime/regenerator"),g=b(N),w=B("babel-runtime/core-js/promise"),k=b(w);function b(T){return T&&T.__esModule?T:{default:T}}var m=D;m._parallelNode=function(_,t,h,r){var c,i,n,l,f,d,u,o;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:c=this,i=[],n=[],l=_.length/t,f=_.length%t,d=f===0?l:(_.length-f)/t+1,u=1,o=0;case 8:if(!(o<_.length)){E.next=26;break}if(!c.isCancel()){E.next=11;break}return E.abrupt("break",26);case 11:if(r?n.push(h(c,_[o],r)):n.push(h(c,_[o])),!(n.length===t||u===d&&o===_.length-1)){E.next=23;break}return E.prev=13,u+=1,E.next=17,g.default.awrap(k.default.all(n));case 17:E.next=22;break;case 19:E.prev=19,E.t0=E.catch(13),i.push(E.t0);case 22:n=[];case 23:o++,E.next=8;break;case 26:return E.abrupt("return",i);case 27:case"end":return E.stop()}},null,this,[[13,19]])},m._parallel=function(_,t,h){var r=this;return new k.default(function(c){var i=[];if(t<=0||!_){c(i);return}function n(p){return function(){if(p===null)throw new Error("Callback was already called.");var I=p;p=null;for(var R=arguments.length,y=Array(R),x=0;x<R;x++)y[x]=arguments[x];I.apply(this,y)}}function l(p){var I=-1,R=p.length;return function(){return++I<R&&!r.isCancel()?{value:p[I],key:I}:null}}var f=l(_),d=!1,u=0,o=!1;function s(p,I){u-=1,p?(d=!0,i.push(p),c(i)):I==={}||d&&u<=0?(d=!0,c(i)):o||(r.isCancel()?c(i):v())}function E(p,I){h(p).then(function(R){I(null,R)}).catch(function(R){I(R)})}function v(){for(o=!0;u<t&&!d&&!r.isCancel();){var p=f();if(p===null||i.length>0){d=!0,u<=0&&c(i);return}u+=1,E(p.value,n(s))}o=!1}v()})},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(B,Q,D){(function(N){"use strict";var g=B("babel-runtime/core-js/json/stringify"),w=m(g),k=B("babel-runtime/core-js/object/keys"),b=m(k);function m(t){return t&&t.__esModule?t:{default:t}}var T=B("./../../shims/crypto/crypto.js"),_=B("is-type-of");D.buildCanonicalizedResource=function(h,r){var c=""+h,i="?";if(_.string(r)&&r.trim()!=="")c+=i+r;else if(_.array(r))r.sort(),c+=i+r.join("&");else if(r){var n=function(d,u){return d[0]>u[0]?1:d[0]<u[0]?-1:0},l=function(d){c+=i+d,r[d]&&(c+="="+r[d]),i="&"};(0,b.default)(r).sort(n).forEach(l)}return c},D.buildCanonicalString=function(h,r,c,i){c=c||{};var n=c.headers||{},l="x-oss-",f=[],d={},u=[h.toUpperCase(),n["Content-Md5"]||"",n["Content-Type"]||n["Content-Type".toLowerCase()],i||n["x-oss-date"]];return(0,b.default)(n).forEach(function(o){var s=o.toLowerCase();s.indexOf(l)===0&&(d[s]=String(n[o]).trim())}),(0,b.default)(d).sort().forEach(function(o){f.push(o+":"+d[o])}),u=u.concat(f),u.push(this.buildCanonicalizedResource(r,c.parameters)),u.join(`
|
|
|
`)},D.computeSignature=function(h,r){var c=T.createHmac("sha1",h);return c.update(N.from(r,"utf8")).digest("base64")},D.authorization=function(h,r,c){return"OSS "+h+":"+this.computeSignature(r,c)},D._signatureForURL=function(h){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments[2],i=arguments[3],n={},l=r.subResource,f=l===void 0?{}:l;if(r.process){var d="x-oss-process";f[d]=r.process}if(r.trafficLimit){var u="x-oss-traffic-limit";f[u]=r.trafficLimit}if(r.response&&(0,b.default)(r.response).forEach(function(v){var p="response-"+v.toLowerCase();f[p]=r.response[v]}),(0,b.default)(r).forEach(function(v){var p=v.toLowerCase(),I=r[v];p.indexOf("x-oss-")===0?n[p]=I:(p.indexOf("content-md5")===0||p.indexOf("content-type")===0)&&(n[v]=I)}),Object.prototype.hasOwnProperty.call(r,"security-token")&&(f["security-token"]=r["security-token"]),Object.prototype.hasOwnProperty.call(r,"callback")){var o={callbackUrl:encodeURI(r.callback.url),callbackBody:r.callback.body};if(r.callback.host&&(o.callbackHost=r.callback.host),r.callback.contentType&&(o.callbackBodyType=r.callback.contentType),f.callback=N.from((0,w.default)(o)).toString("base64"),r.callback.customValue){var s={};(0,b.default)(r.callback.customValue).forEach(function(v){s["x:"+v]=r.callback.customValue[v]}),f["callback-var"]=N.from((0,w.default)(s)).toString("base64")}}var E=this.buildCanonicalString(r.method,c,{headers:n,parameters:f},i.toString());return{Signature:this.computeSignature(h,E),subResource:f}}}).call(this,B("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(B,Q,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.checkBucketName=void 0,D.checkBucketName=function(N,g){var w=g?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!w.test(N))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/entries"),g=w(N);function w(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(D,"__esModule",{value:!0}),D.checkObjectTag=void 0;var k=B("./checkValid"),b=k.checkValid,m=B("./isObject"),T=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 h(r){if(!T(r))throw new Error("tag must be Object");var c=(0,g.default)(r);if(c.length>10)throw new Error("maximum of 10 tags for a object");var i=["key","value"];c.forEach(function(n){n.forEach(function(l,f){b(l,t[i[f]])})})}D.checkObjectTag=h},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(B,Q,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.checkValid=void 0;function N(g,w){w.forEach(function(k){if(k.validator)k.validator(g);else if(k.pattern&&!k.pattern.test(g))throw new Error(k.msg)})}D.checkValid=N},{}],38:[function(B,Q,D){(function(N){"use strict";var g=B("babel-runtime/core-js/object/assign"),w=k(g);function k(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(D,"__esModule",{value:!0}),D.createRequest=void 0;var b=B("./../../../shims/crypto/crypto.js"),m=B("debug")("ali-oss"),T=B("mime"),_=B("dateformat"),t=B("copy-to"),h=B("path");function r(n,l){return n[l]||n[l.toLowerCase()]}function c(n,l){delete n[l],delete n[l.toLowerCase()]}function i(n){var l=new Date;this.options.amendTimeSkewed&&(l=+new Date+this.options.amendTimeSkewed);var f={"x-oss-date":_(l,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(f["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,w.default)(f,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(f["x-oss-security-token"]=this.options.stsToken),t(n.headers).to(f),r(f,"Content-Type")||(n.mime&&n.mime.indexOf("/")>0?f["Content-Type"]=n.mime:f["Content-Type"]=T.getType(n.mime||h.extname(n.object||""))),r(f,"Content-Type")||c(f,"Content-Type"),n.content&&(f["Content-Md5"]=b.createHash("md5").update(N.from(n.content,"utf8")).digest("base64"),f["Content-Length"]||(f["Content-Length"]=n.content.length));var d=this._getResource(n);f.authorization=this.authorization(n.method,d,n.subres,f);var u=this._getReqUrl(n);m("request %s %s, with headers %j, !!stream: %s",n.method,u,f,!!n.stream);var o=n.timeout||this.options.timeout,s={method:n.method,content:n.content,stream:n.stream,headers:f,timeout:o,writeStream:n.writeStream,customResponse:n.customResponse,ctx:n.ctx||this.ctx};return this.agent&&(s.agent=this.agent),this.httpsAgent&&(s.httpsAgent=this.httpsAgent),{url:u,params:s}}D.createRequest=i}).call(this,B("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(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/keys"),g=b(N),w=B("babel-runtime/helpers/typeof"),k=b(w);function b(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,k.default)(m))!=="object")return m;var T=Array.isArray(m)?[]:{};return(0,g.default)(m).forEach(function(_){T[_]=D.deepCopy(m[_])}),T}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/keys"),g=b(N),w=B("babel-runtime/helpers/typeof"),k=b(w);function b(_){return _&&_.__esModule?_:{default:_}}Object.defineProperty(D,"__esModule",{value:!0}),D.formatObjKey=void 0;function m(_,t){if(_===null||(typeof _=="undefined"?"undefined":(0,k.default)(_))!=="object")return _;var h=void 0;if(Array.isArray(_)){h=[];for(var r=0;r<_.length;r++)h.push(m(_[r],t))}else h={},(0,g.default)(_).forEach(function(c){h[T(c,t)]=m(_[c],t)});return h}D.formatObjKey=m;function T(_,t){return t==="firstUpperCase"?_=_.replace(/^./,function(h){return h.toUpperCase()}):t==="firstLowerCase"&&(_=_.replace(/^./,function(h){return h.toLowerCase()})),_}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(B,Q,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.getStrBytesCount=void 0;function N(g){for(var w=0,k=0;k<g.length;k++){var b=g.charAt(k);/^[\u00-\uff]$/.test(b)?w+=1:w+=2}return w}D.getStrBytesCount=N},{}],42:[function(B,Q,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isArray=void 0,D.isArray=function(N){return Object.prototype.toString.call(N)==="[object Array]"}},{}],43:[function(B,Q,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isBlob=void 0;function N(g){return typeof Blob!="undefined"&&g instanceof Blob}D.isBlob=N},{}],44:[function(B,Q,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isFile=void 0,D.isFile=function(N){return typeof File!="undefined"&&N instanceof File}},{}],45:[function(B,Q,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isIP=void 0,D.isIP=function(N){var g=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,w=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return g.test(N)||w.test(N)}},{}],46:[function(B,Q,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isObject=void 0,D.isObject=function(N){return Object.prototype.toString.call(N)==="[object Object]"}},{}],47:[function(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/keys"),g=w(N);function w(T){return T&&T.__esModule?T:{default:T}}Object.defineProperty(D,"__esModule",{value:!0}),D.obj2xml=void 0;var k=B("./formatObjKey");function b(T){return Object.prototype.toString.call(T).replace(/(.*? |])/g,"").toLowerCase()}function m(T,_){var t="";return _&&_.headers&&(t=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
`),_&&_.firstUpperCase&&(T=k.formatObjKey(T,"firstUpperCase")),b(T)==="object"?(0,g.default)(T).forEach(function(h){b(T[h])==="string"||b(T[h])==="number"?t+="<"+h+">"+T[h]+"</"+h+">":b(T[h])==="object"?t+="<"+h+">"+m(T[h])+"</"+h+">":b(T[h])==="array"?t+=T[h].map(function(r){return"<"+h+">"+m(r)+"</"+h+">"}).join(""):t+="<"+h+">"+T[h].toString()+"</"+h+">"}):t+=T.toString(),t}D.obj2xml=m},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(B,Q,D){Q.exports=N,Q.exports.HttpsAgent=N;function N(){}},{}],49:[function(B,Q,D){Q.exports=B("./register")().Promise},{"./register":51}],50:[function(B,Q,D){"use strict";var N="@@any-promise/REGISTRATION",g=null;Q.exports=function(w,k){return function(m,T){m=m||null,T=T||{};var _=T.global!==!1;if(g===null&&_&&(g=w[N]||null),g!==null&&m!==null&&g.implementation!==m)throw new Error('any-promise already defined as "'+g.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return g===null&&(m!==null&&typeof T.Promise!="undefined"?g={Promise:T.Promise,implementation:m}:g=k(m),_&&(w[N]=g)),g}}},{}],51:[function(B,Q,D){"use strict";Q.exports=B("./loader")(window,N);function N(){if(typeof window.Promise=="undefined")throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}},{"./loader":50}],52:[function(B,Q,D){Q.exports={default:B("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(B,Q,D){Q.exports={default:B("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(B,Q,D){Q.exports={default:B("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(B,Q,D){Q.exports={default:B("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(B,Q,D){Q.exports={default:B("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(B,Q,D){Q.exports={default:B("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(B,Q,D){Q.exports={default:B("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(B,Q,D){Q.exports={default:B("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(B,Q,D){Q.exports={default:B("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(B,Q,D){Q.exports={default:B("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(B,Q,D){Q.exports={default:B("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(B,Q,D){Q.exports={default:B("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(B,Q,D){Q.exports={default:B("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(B,Q,D){Q.exports={default:B("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(B,Q,D){Q.exports={default:B("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(B,Q,D){"use strict";D.__esModule=!0;var N=B("../core-js/symbol/iterator"),g=m(N),w=B("../core-js/symbol"),k=m(w),b=typeof k.default=="function"&&typeof g.default=="symbol"?function(T){return typeof T}:function(T){return T&&typeof k.default=="function"&&T.constructor===k.default&&T!==k.default.prototype?"symbol":typeof T};function m(T){return T&&T.__esModule?T:{default:T}}D.default=typeof k.default=="function"&&b(g.default)==="symbol"?function(T){return typeof T=="undefined"?"undefined":b(T)}:function(T){return T&&typeof k.default=="function"&&T.constructor===k.default&&T!==k.default.prototype?"symbol":typeof T=="undefined"?"undefined":b(T)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(B,Q,D){Q.exports=B("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(B,Q,D){"use strict";D.byteLength=_,D.toByteArray=h,D.fromByteArray=i;for(var N=[],g=[],w=typeof Uint8Array!="undefined"?Uint8Array:Array,k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b=0,m=k.length;b<m;++b)N[b]=k[b],g[k.charCodeAt(b)]=b;g["-".charCodeAt(0)]=62,g["_".charCodeAt(0)]=63;function T(n){var l=n.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=n.indexOf("=");f===-1&&(f=l);var d=f===l?0:4-f%4;return[f,d]}function _(n){var l=T(n),f=l[0],d=l[1];return(f+d)*3/4-d}function t(n,l,f){return(l+f)*3/4-f}function h(n){var l,f=T(n),d=f[0],u=f[1],o=new w(t(n,d,u)),s=0,E=u>0?d-4:d,v;for(v=0;v<E;v+=4)l=g[n.charCodeAt(v)]<<18|g[n.charCodeAt(v+1)]<<12|g[n.charCodeAt(v+2)]<<6|g[n.charCodeAt(v+3)],o[s++]=l>>16&255,o[s++]=l>>8&255,o[s++]=l&255;return u===2&&(l=g[n.charCodeAt(v)]<<2|g[n.charCodeAt(v+1)]>>4,o[s++]=l&255),u===1&&(l=g[n.charCodeAt(v)]<<10|g[n.charCodeAt(v+1)]<<4|g[n.charCodeAt(v+2)]>>2,o[s++]=l>>8&255,o[s++]=l&255),o}function r(n){return N[n>>18&63]+N[n>>12&63]+N[n>>6&63]+N[n&63]}function c(n,l,f){for(var d,u=[],o=l;o<f;o+=3)d=(n[o]<<16&16711680)+(n[o+1]<<8&65280)+(n[o+2]&255),u.push(r(d));return u.join("")}function i(n){for(var l,f=n.length,d=f%3,u=[],o=16383,s=0,E=f-d;s<E;s+=o)u.push(c(n,s,s+o>E?E:s+o));return d===1?(l=n[f-1],u.push(N[l>>2]+N[l<<4&63]+"==")):d===2&&(l=(n[f-2]<<8)+n[f-1],u.push(N[l>>10]+N[l>>4&63]+N[l<<2&63]+"=")),u.join("")}},{}],70:[function(B,Q,D){/*!
|
|
|
* Bowser - a browser detector
|
|
|
* https://github.com/ded/bowser
|
|
|
* MIT License | (c) Dustin Diaz 2015
|
|
|
*/!function(N,g,w){typeof Q!="undefined"&&Q.exports?Q.exports=w():typeof define=="function"&&define.amd?define(g,w):N[g]=w()}(this,"bowser",function(){var N=!0;function g(t){function h(H){var U=t.match(H);return U&&U.length>1&&U[1]||""}function r(H){var U=t.match(H);return U&&U.length>1&&U[2]||""}var c=h(/(ipod|iphone|ipad)/i).toLowerCase(),i=/like android/i.test(t),n=!i&&/android/i.test(t),l=/nexus\s*[0-6]\s*/i.test(t),f=!l&&/nexus\s*[0-9]+/i.test(t),d=/CrOS/.test(t),u=/silk/i.test(t),o=/sailfish/i.test(t),s=/tizen/i.test(t),E=/(web|hpw)(o|0)s/i.test(t),v=/windows phone/i.test(t),p=/SamsungBrowser/i.test(t),I=!v&&/windows/i.test(t),R=!c&&!u&&/macintosh/i.test(t),y=!n&&!o&&!s&&!E&&/linux/i.test(t),x=r(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),C=h(/version\/(\d+(\.\d+)?)/i),S=/tablet/i.test(t)&&!/tablet pc/i.test(t),F=!S&&/[^-]mobi/i.test(t),j=/xbox/i.test(t),A;/opera/i.test(t)?A={name:"Opera",opera:N,version:C||h(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(t)?A={name:"Opera",opera:N,version:h(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||C}:/SamsungBrowser/i.test(t)?A={name:"Samsung Internet for Android",samsungBrowser:N,version:C||h(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(t)?A={name:"NAVER Whale browser",whale:N,version:h(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(t)?A={name:"MZ Browser",mzbrowser:N,version:h(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(t)?A={name:"Opera Coast",coast:N,version:C||h(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(t)?A={name:"Focus",focus:N,version:h(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(t)?A={name:"Yandex Browser",yandexbrowser:N,version:C||h(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(t)?A={name:"UC Browser",ucbrowser:N,version:h(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(t)?A={name:"Maxthon",maxthon:N,version:h(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(t)?A={name:"Epiphany",epiphany:N,version:h(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(t)?A={name:"Puffin",puffin:N,version:h(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(t)?A={name:"Sleipnir",sleipnir:N,version:h(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(t)?A={name:"K-Meleon",kMeleon:N,version:h(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:v?(A={name:"Windows Phone",osname:"Windows Phone",windowsphone:N},x?(A.msedge=N,A.version=x):(A.msie=N,A.version=h(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?A={name:"Internet Explorer",msie:N,version:h(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:d?A={name:"Chrome",osname:"Chrome OS",chromeos:N,chromeBook:N,chrome:N,version:h(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(t)?A={name:"Microsoft Edge",msedge:N,version:x}:/vivaldi/i.test(t)?A={name:"Vivaldi",vivaldi:N,version:h(/vivaldi\/(\d+(\.\d+)?)/i)||C}:o?A={name:"Sailfish",osname:"Sailfish OS",sailfish:N,version:h(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?A={name:"SeaMonkey",seamonkey:N,version:h(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(t)?(A={name:"Firefox",firefox:N,version:h(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(A.firefoxos=N,A.osname="Firefox OS")):u?A={name:"Amazon Silk",silk:N,version:h(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(t)?A={name:"PhantomJS",phantom:N,version:h(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(t)?A={name:"SlimerJS",slimer:N,version:h(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(t)||/rim\stablet/i.test(t)?A={name:"BlackBerry",osname:"BlackBerry OS",blackberry:N,version:C||h(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:E?(A={name:"WebOS",osname:"WebOS",webos:N,version:C||h(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(t)&&(A.touchpad=N)):/bada/i.test(t)?A={name:"Bada",osname:"Bada",bada:N,version:h(/dolfin\/(\d+(\.\d+)?)/i)}:s?A={name:"Tizen",osname:"Tizen",tizen:N,version:h(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||C}:/qupzilla/i.test(t)?A={name:"QupZilla",qupzilla:N,version:h(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||C}:/chromium/i.test(t)?A={name:"Chromium",chromium:N,version:h(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||C}:/chrome|crios|crmo/i.test(t)?A={name:"Chrome",chrome:N,version:h(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:n?A={name:"Android",version:C}:/safari|applewebkit/i.test(t)?(A={name:"Safari",safari:N},C&&(A.version=C)):c?(A={name:c=="iphone"?"iPhone":c=="ipad"?"iPad":"iPod"},C&&(A.version=C)):/googlebot/i.test(t)?A={name:"Googlebot",googlebot:N,version:h(/googlebot\/(\d+(\.\d+))/i)||C}:A={name:h(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!A.msedge&&/(apple)?webkit/i.test(t)?(/(apple)?webkit\/537\.36/i.test(t)?(A.name=A.name||"Blink",A.blink=N):(A.name=A.name||"Webkit",A.webkit=N),!A.version&&C&&(A.version=C)):!A.opera&&/gecko\//i.test(t)&&(A.name=A.name||"Gecko",A.gecko=N,A.version=A.version||h(/gecko\/(\d+(\.\d+)?)/i)),!A.windowsphone&&(n||A.silk)?(A.android=N,A.osname="Android"):!A.windowsphone&&c?(A[c]=N,A.ios=N,A.osname="iOS"):R?(A.mac=N,A.osname="macOS"):j?(A.xbox=N,A.osname="Xbox"):I?(A.windows=N,A.osname="Windows"):y&&(A.linux=N,A.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 z="";A.windows?z=Y(h(/Windows ((NT|XP)( \d\d?.\d)?)/i)):A.windowsphone?z=h(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):A.mac?(z=h(/Mac OS X (\d+([_\.\s]\d+)*)/i),z=z.replace(/[_\s]/g,".")):c?(z=h(/os (\d+([_\s]\d+)*) like mac os x/i),z=z.replace(/[_\s]/g,".")):n?z=h(/android[ \/-](\d+(\.\d+)*)/i):A.webos?z=h(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):A.blackberry?z=h(/rim\stablet\sos\s(\d+(\.\d+)*)/i):A.bada?z=h(/bada\/(\d+(\.\d+)*)/i):A.tizen&&(z=h(/tizen[\/\s](\d+(\.\d+)*)/i)),z&&(A.osversion=z);var O=!A.windows&&z.split(".")[0];return S||f||c=="ipad"||n&&(O==3||O>=4&&!F)||A.silk?A.tablet=N:(F||c=="iphone"||c=="ipod"||n||l||A.blackberry||A.webos||A.bada)&&(A.mobile=N),A.msedge||A.msie&&A.version>=10||A.yandexbrowser&&A.version>=15||A.vivaldi&&A.version>=1||A.chrome&&A.version>=20||A.samsungBrowser&&A.version>=4||A.whale&&m([A.version,"1.0"])===1||A.mzbrowser&&m([A.version,"6.0"])===1||A.focus&&m([A.version,"1.0"])===1||A.firefox&&A.version>=20||A.safari&&A.version>=6||A.opera&&A.version>=10||A.ios&&A.osversion&&A.osversion.split(".")[0]>=6||A.blackberry&&A.version>=10.1||A.chromium&&A.version>=20?A.a=N:A.msie&&A.version<10||A.chrome&&A.version<20||A.firefox&&A.version<20||A.safari&&A.version<6||A.opera&&A.version<10||A.ios&&A.osversion&&A.osversion.split(".")[0]<6||A.chromium&&A.version<20?A.c=N:A.x=N,A}var w=g(typeof navigator!="undefined"&&navigator.userAgent||"");w.test=function(t){for(var h=0;h<t.length;++h){var r=t[h];if(typeof r=="string"&&r in w)return!0}return!1};function k(t){return t.split(".").length}function b(t,h){var r=[],c;if(Array.prototype.map)return Array.prototype.map.call(t,h);for(c=0;c<t.length;c++)r.push(h(t[c]));return r}function m(t){for(var h=Math.max(k(t[0]),k(t[1])),r=b(t,function(c){var i=h-k(c);return c=c+new Array(i+1).join(".0"),b(c.split("."),function(n){return new Array(20-n.length).join("0")+n}).reverse()});--h>=0;){if(r[0][h]>r[1][h])return 1;if(r[0][h]===r[1][h]){if(h===0)return 0}else return-1}}function T(t,h,r){var c=w;typeof h=="string"&&(r=h,h=void 0),h===void 0&&(h=!1),r&&(c=g(r));var i=""+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([i,t[n]])<0}return h}function _(t,h,r){return!T(t,h,r)}return w.isUnsupportedBrowser=T,w.compareVersions=m,w.check=_,w._detect=g,w.detect=g,w})},{}],71:[function(B,Q,D){},{}],72:[function(B,Q,D){var N=B("buffer").Buffer,g=N.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 w(_){if(_&&!g(_))throw new Error("Unknown encoding: "+_)}var k=D.StringDecoder=function(_){this.encoding=(_||"utf8").toLowerCase().replace(/[-_]/,""),w(_);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=T;break;default:this.write=b;return}this.charBuffer=new N(6),this.charReceived=0,this.charLength=0};k.prototype.write=function(_){for(var t="";this.charLength;){var h=_.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:_.length;if(_.copy(this.charBuffer,this.charReceived,0,h),this.charReceived+=h,this.charReceived<this.charLength)return"";_=_.slice(h,_.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 r=_.length;this.charLength&&(_.copy(this.charBuffer,0,_.length-this.charReceived,r),r-=this.charReceived),t+=_.toString(this.encoding,0,r);var r=t.length-1,c=t.charCodeAt(r);if(c>=55296&&c<=56319){var i=this.surrogateSize;return this.charLength+=i,this.charReceived+=i,this.charBuffer.copy(this.charBuffer,i,0,i),_.copy(this.charBuffer,0,0,i),t.substring(0,r)}return t},k.prototype.detectIncompleteChar=function(_){for(var t=_.length>=3?3:_.length;t>0;t--){var h=_[_.length-t];if(t==1&&h>>5==6){this.charLength=2;break}if(t<=2&&h>>4==14){this.charLength=3;break}if(t<=3&&h>>3==30){this.charLength=4;break}}this.charReceived=t},k.prototype.end=function(_){var t="";if(_&&_.length&&(t=this.write(_)),this.charReceived){var h=this.charReceived,r=this.charBuffer,c=this.encoding;t+=r.slice(0,h).toString(c)}return t};function b(_){return _.toString(this.encoding)}function m(_){this.charReceived=_.length%2,this.charLength=this.charReceived?2:0}function T(_){this.charReceived=_.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(B,Q,D){(function(N,g){/*!
|
|
|
* The buffer module from node.js, for the browser.
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
|
* @license MIT
|
|
|
*/"use strict";var w=B("base64-js"),k=B("ieee754"),b=B("isarray");D.Buffer=g,D.SlowBuffer=u,D.INSPECT_MAX_BYTES=50,g.TYPED_ARRAY_SUPPORT=N.TYPED_ARRAY_SUPPORT!==void 0?N.TYPED_ARRAY_SUPPORT:m(),D.kMaxLength=T();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(ne){return!1}}function T(){return g.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function _(ie,ne){if(T()<ne)throw new RangeError("Invalid typed array length");return g.TYPED_ARRAY_SUPPORT?(ie=new Uint8Array(ne),ie.__proto__=g.prototype):(ie===null&&(ie=new g(ne)),ie.length=ne),ie}function g(ie,ne,J){if(!g.TYPED_ARRAY_SUPPORT&&!(this instanceof g))return new g(ie,ne,J);if(typeof ie=="number"){if(typeof ne=="string")throw new Error("If encoding is specified then the first argument must be a string");return c(this,ie)}return t(this,ie,ne,J)}g.poolSize=8192,g._augment=function(ie){return ie.__proto__=g.prototype,ie};function t(ie,ne,J,$){if(typeof ne=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&ne instanceof ArrayBuffer?l(ie,ne,J,$):typeof ne=="string"?i(ie,ne,J):f(ie,ne)}g.from=function(ie,ne,J){return t(null,ie,ne,J)},g.TYPED_ARRAY_SUPPORT&&(g.prototype.__proto__=Uint8Array.prototype,g.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&g[Symbol.species]===g&&Object.defineProperty(g,Symbol.species,{value:null,configurable:!0}));function h(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 r(ie,ne,J,$){return h(ne),ne<=0?_(ie,ne):J!==void 0?typeof $=="string"?_(ie,ne).fill(J,$):_(ie,ne).fill(J):_(ie,ne)}g.alloc=function(ie,ne,J){return r(null,ie,ne,J)};function c(ie,ne){if(h(ne),ie=_(ie,ne<0?0:d(ne)|0),!g.TYPED_ARRAY_SUPPORT)for(var J=0;J<ne;++J)ie[J]=0;return ie}g.allocUnsafe=function(ie){return c(null,ie)},g.allocUnsafeSlow=function(ie){return c(null,ie)};function i(ie,ne,J){if((typeof J!="string"||J==="")&&(J="utf8"),!g.isEncoding(J))throw new TypeError('"encoding" must be a valid string encoding');var $=o(ne,J)|0;ie=_(ie,$);var le=ie.write(ne,J);return le!==$&&(ie=ie.slice(0,le)),ie}function n(ie,ne){var J=ne.length<0?0:d(ne.length)|0;ie=_(ie,J);for(var $=0;$<J;$+=1)ie[$]=ne[$]&255;return ie}function l(ie,ne,J,$){if(ne.byteLength,J<0||ne.byteLength<J)throw new RangeError("'offset' is out of bounds");if(ne.byteLength<J+($||0))throw new RangeError("'length' is out of bounds");return J===void 0&&$===void 0?ne=new Uint8Array(ne):$===void 0?ne=new Uint8Array(ne,J):ne=new Uint8Array(ne,J,$),g.TYPED_ARRAY_SUPPORT?(ie=ne,ie.__proto__=g.prototype):ie=n(ie,ne),ie}function f(ie,ne){if(g.isBuffer(ne)){var J=d(ne.length)|0;return ie=_(ie,J),ie.length===0||ne.copy(ie,0,0,J),ie}if(ne){if(typeof ArrayBuffer!="undefined"&&ne.buffer instanceof ArrayBuffer||"length"in ne)return typeof ne.length!="number"||q(ne.length)?_(ie,0):n(ie,ne);if(ne.type==="Buffer"&&b(ne.data))return n(ie,ne.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(ie){if(ie>=T())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+T().toString(16)+" bytes");return ie|0}function u(ie){return+ie!=ie&&(ie=0),g.alloc(+ie)}g.isBuffer=function(ne){return!!(ne!=null&&ne._isBuffer)},g.compare=function(ne,J){if(!g.isBuffer(ne)||!g.isBuffer(J))throw new TypeError("Arguments must be Buffers");if(ne===J)return 0;for(var $=ne.length,le=J.length,he=0,Se=Math.min($,le);he<Se;++he)if(ne[he]!==J[he]){$=ne[he],le=J[he];break}return $<le?-1:le<$?1:0},g.isEncoding=function(ne){switch(String(ne).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},g.concat=function(ne,J){if(!b(ne))throw new TypeError('"list" argument must be an Array of Buffers');if(ne.length===0)return g.alloc(0);var $;if(J===void 0)for(J=0,$=0;$<ne.length;++$)J+=ne[$].length;var le=g.allocUnsafe(J),he=0;for($=0;$<ne.length;++$){var Se=ne[$];if(!g.isBuffer(Se))throw new TypeError('"list" argument must be an Array of Buffers');Se.copy(le,he),he+=Se.length}return le};function o(ie,ne){if(g.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 J=ie.length;if(J===0)return 0;for(var $=!1;;)switch(ne){case"ascii":case"latin1":case"binary":return J;case"utf8":case"utf-8":case void 0:return te(ie).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J*2;case"hex":return J>>>1;case"base64":return V(ie).length;default:if($)return te(ie).length;ne=(""+ne).toLowerCase(),$=!0}}g.byteLength=o;function s(ie,ne,J){var $=!1;if((ne===void 0||ne<0)&&(ne=0),ne>this.length)return"";if((J===void 0||J>this.length)&&(J=this.length),J<=0)return"";if(J>>>=0,ne>>>=0,J<=ne)return"";for(ie||(ie="utf8");;)switch(ie){case"hex":return H(this,ne,J);case"utf8":case"utf-8":return j(this,ne,J);case"ascii":return z(this,ne,J);case"latin1":case"binary":return O(this,ne,J);case"base64":return F(this,ne,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,ne,J);default:if($)throw new TypeError("Unknown encoding: "+ie);ie=(ie+"").toLowerCase(),$=!0}}g.prototype._isBuffer=!0;function E(ie,ne,J){var $=ie[ne];ie[ne]=ie[J],ie[J]=$}g.prototype.swap16=function(){var ne=this.length;if(ne%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var J=0;J<ne;J+=2)E(this,J,J+1);return this},g.prototype.swap32=function(){var ne=this.length;if(ne%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var J=0;J<ne;J+=4)E(this,J,J+3),E(this,J+1,J+2);return this},g.prototype.swap64=function(){var ne=this.length;if(ne%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var J=0;J<ne;J+=8)E(this,J,J+7),E(this,J+1,J+6),E(this,J+2,J+5),E(this,J+3,J+4);return this},g.prototype.toString=function(){var ne=this.length|0;return ne===0?"":arguments.length===0?j(this,0,ne):s.apply(this,arguments)},g.prototype.equals=function(ne){if(!g.isBuffer(ne))throw new TypeError("Argument must be a Buffer");return this===ne?!0:g.compare(this,ne)===0},g.prototype.inspect=function(){var ne="",J=D.INSPECT_MAX_BYTES;return this.length>0&&(ne=this.toString("hex",0,J).match(/.{2}/g).join(" "),this.length>J&&(ne+=" ... ")),"<Buffer "+ne+">"},g.prototype.compare=function(ne,J,$,le,he){if(!g.isBuffer(ne))throw new TypeError("Argument must be a Buffer");if(J===void 0&&(J=0),$===void 0&&($=ne?ne.length:0),le===void 0&&(le=0),he===void 0&&(he=this.length),J<0||$>ne.length||le<0||he>this.length)throw new RangeError("out of range index");if(le>=he&&J>=$)return 0;if(le>=he)return-1;if(J>=$)return 1;if(J>>>=0,$>>>=0,le>>>=0,he>>>=0,this===ne)return 0;for(var Se=he-le,Ue=$-J,Xe=Math.min(Se,Ue),$e=this.slice(le,he),Ye=ne.slice(J,$),et=0;et<Xe;++et)if($e[et]!==Ye[et]){Se=$e[et],Ue=Ye[et];break}return Se<Ue?-1:Ue<Se?1:0};function v(ie,ne,J,$,le){if(ie.length===0)return-1;if(typeof J=="string"?($=J,J=0):J>2147483647?J=2147483647:J<-2147483648&&(J=-2147483648),J=+J,isNaN(J)&&(J=le?0:ie.length-1),J<0&&(J=ie.length+J),J>=ie.length){if(le)return-1;J=ie.length-1}else if(J<0)if(le)J=0;else return-1;if(typeof ne=="string"&&(ne=g.from(ne,$)),g.isBuffer(ne))return ne.length===0?-1:p(ie,ne,J,$,le);if(typeof ne=="number")return ne=ne&255,g.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(ie,ne,J):Uint8Array.prototype.lastIndexOf.call(ie,ne,J):p(ie,[ne],J,$,le);throw new TypeError("val must be string, number or Buffer")}function p(ie,ne,J,$,le){var he=1,Se=ie.length,Ue=ne.length;if($!==void 0&&($=String($).toLowerCase(),$==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(ie.length<2||ne.length<2)return-1;he=2,Se/=2,Ue/=2,J/=2}function Xe(Pe,Ie){return he===1?Pe[Ie]:Pe.readUInt16BE(Ie*he)}var $e;if(le){var Ye=-1;for($e=J;$e<Se;$e++)if(Xe(ie,$e)===Xe(ne,Ye===-1?0:$e-Ye)){if(Ye===-1&&(Ye=$e),$e-Ye+1===Ue)return Ye*he}else Ye!==-1&&($e-=$e-Ye),Ye=-1}else for(J+Ue>Se&&(J=Se-Ue),$e=J;$e>=0;$e--){for(var et=!0,qe=0;qe<Ue;qe++)if(Xe(ie,$e+qe)!==Xe(ne,qe)){et=!1;break}if(et)return $e}return-1}g.prototype.includes=function(ne,J,$){return this.indexOf(ne,J,$)!==-1},g.prototype.indexOf=function(ne,J,$){return v(this,ne,J,$,!0)},g.prototype.lastIndexOf=function(ne,J,$){return v(this,ne,J,$,!1)};function I(ie,ne,J,$){J=Number(J)||0;var le=ie.length-J;$?($=Number($),$>le&&($=le)):$=le;var he=ne.length;if(he%2!==0)throw new TypeError("Invalid hex string");$>he/2&&($=he/2);for(var Se=0;Se<$;++Se){var Ue=parseInt(ne.substr(Se*2,2),16);if(isNaN(Ue))return Se;ie[J+Se]=Ue}return Se}function R(ie,ne,J,$){return Z(te(ne,ie.length-J),ie,J,$)}function y(ie,ne,J,$){return Z(W(ne),ie,J,$)}function x(ie,ne,J,$){return y(ie,ne,J,$)}function C(ie,ne,J,$){return Z(V(ne),ie,J,$)}function S(ie,ne,J,$){return Z(X(ne,ie.length-J),ie,J,$)}g.prototype.write=function(ne,J,$,le){if(J===void 0)le="utf8",$=this.length,J=0;else if($===void 0&&typeof J=="string")le=J,$=this.length,J=0;else if(isFinite(J))J=J|0,isFinite($)?($=$|0,le===void 0&&(le="utf8")):(le=$,$=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var he=this.length-J;if(($===void 0||$>he)&&($=he),ne.length>0&&($<0||J<0)||J>this.length)throw new RangeError("Attempt to write outside buffer bounds");le||(le="utf8");for(var Se=!1;;)switch(le){case"hex":return I(this,ne,J,$);case"utf8":case"utf-8":return R(this,ne,J,$);case"ascii":return y(this,ne,J,$);case"latin1":case"binary":return x(this,ne,J,$);case"base64":return C(this,ne,J,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,ne,J,$);default:if(Se)throw new TypeError("Unknown encoding: "+le);le=(""+le).toLowerCase(),Se=!0}},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F(ie,ne,J){return ne===0&&J===ie.length?w.fromByteArray(ie):w.fromByteArray(ie.slice(ne,J))}function j(ie,ne,J){J=Math.min(ie.length,J);for(var $=[],le=ne;le<J;){var he=ie[le],Se=null,Ue=he>239?4:he>223?3:he>191?2:1;if(le+Ue<=J){var Xe,$e,Ye,et;switch(Ue){case 1:he<128&&(Se=he);break;case 2:Xe=ie[le+1],(Xe&192)===128&&(et=(he&31)<<6|Xe&63,et>127&&(Se=et));break;case 3:Xe=ie[le+1],$e=ie[le+2],(Xe&192)===128&&($e&192)===128&&(et=(he&15)<<12|(Xe&63)<<6|$e&63,et>2047&&(et<55296||et>57343)&&(Se=et));break;case 4:Xe=ie[le+1],$e=ie[le+2],Ye=ie[le+3],(Xe&192)===128&&($e&192)===128&&(Ye&192)===128&&(et=(he&15)<<18|(Xe&63)<<12|($e&63)<<6|Ye&63,et>65535&&et<1114112&&(Se=et))}}Se===null?(Se=65533,Ue=1):Se>65535&&(Se-=65536,$.push(Se>>>10&1023|55296),Se=56320|Se&1023),$.push(Se),le+=Ue}return Y($)}var A=4096;function Y(ie){var ne=ie.length;if(ne<=A)return String.fromCharCode.apply(String,ie);for(var J="",$=0;$<ne;)J+=String.fromCharCode.apply(String,ie.slice($,$+=A));return J}function z(ie,ne,J){var $="";J=Math.min(ie.length,J);for(var le=ne;le<J;++le)$+=String.fromCharCode(ie[le]&127);return $}function O(ie,ne,J){var $="";J=Math.min(ie.length,J);for(var le=ne;le<J;++le)$+=String.fromCharCode(ie[le]);return $}function H(ie,ne,J){var $=ie.length;(!ne||ne<0)&&(ne=0),(!J||J<0||J>$)&&(J=$);for(var le="",he=ne;he<J;++he)le+=ce(ie[he]);return le}function U(ie,ne,J){for(var $=ie.slice(ne,J),le="",he=0;he<$.length;he+=2)le+=String.fromCharCode($[he]+$[he+1]*256);return le}g.prototype.slice=function(ne,J){var $=this.length;ne=~~ne,J=J===void 0?$:~~J,ne<0?(ne+=$,ne<0&&(ne=0)):ne>$&&(ne=$),J<0?(J+=$,J<0&&(J=0)):J>$&&(J=$),J<ne&&(J=ne);var le;if(g.TYPED_ARRAY_SUPPORT)le=this.subarray(ne,J),le.__proto__=g.prototype;else{var he=J-ne;le=new g(he,void 0);for(var Se=0;Se<he;++Se)le[Se]=this[Se+ne]}return le};function L(ie,ne,J){if(ie%1!==0||ie<0)throw new RangeError("offset is not uint");if(ie+ne>J)throw new RangeError("Trying to access beyond buffer length")}g.prototype.readUIntLE=function(ne,J,$){ne=ne|0,J=J|0,$||L(ne,J,this.length);for(var le=this[ne],he=1,Se=0;++Se<J&&(he*=256);)le+=this[ne+Se]*he;return le},g.prototype.readUIntBE=function(ne,J,$){ne=ne|0,J=J|0,$||L(ne,J,this.length);for(var le=this[ne+--J],he=1;J>0&&(he*=256);)le+=this[ne+--J]*he;return le},g.prototype.readUInt8=function(ne,J){return J||L(ne,1,this.length),this[ne]},g.prototype.readUInt16LE=function(ne,J){return J||L(ne,2,this.length),this[ne]|this[ne+1]<<8},g.prototype.readUInt16BE=function(ne,J){return J||L(ne,2,this.length),this[ne]<<8|this[ne+1]},g.prototype.readUInt32LE=function(ne,J){return J||L(ne,4,this.length),(this[ne]|this[ne+1]<<8|this[ne+2]<<16)+this[ne+3]*16777216},g.prototype.readUInt32BE=function(ne,J){return J||L(ne,4,this.length),this[ne]*16777216+(this[ne+1]<<16|this[ne+2]<<8|this[ne+3])},g.prototype.readIntLE=function(ne,J,$){ne=ne|0,J=J|0,$||L(ne,J,this.length);for(var le=this[ne],he=1,Se=0;++Se<J&&(he*=256);)le+=this[ne+Se]*he;return he*=128,le>=he&&(le-=Math.pow(2,8*J)),le},g.prototype.readIntBE=function(ne,J,$){ne=ne|0,J=J|0,$||L(ne,J,this.length);for(var le=J,he=1,Se=this[ne+--le];le>0&&(he*=256);)Se+=this[ne+--le]*he;return he*=128,Se>=he&&(Se-=Math.pow(2,8*J)),Se},g.prototype.readInt8=function(ne,J){return J||L(ne,1,this.length),this[ne]&128?(255-this[ne]+1)*-1:this[ne]},g.prototype.readInt16LE=function(ne,J){J||L(ne,2,this.length);var $=this[ne]|this[ne+1]<<8;return $&32768?$|4294901760:$},g.prototype.readInt16BE=function(ne,J){J||L(ne,2,this.length);var $=this[ne+1]|this[ne]<<8;return $&32768?$|4294901760:$},g.prototype.readInt32LE=function(ne,J){return J||L(ne,4,this.length),this[ne]|this[ne+1]<<8|this[ne+2]<<16|this[ne+3]<<24},g.prototype.readInt32BE=function(ne,J){return J||L(ne,4,this.length),this[ne]<<24|this[ne+1]<<16|this[ne+2]<<8|this[ne+3]},g.prototype.readFloatLE=function(ne,J){return J||L(ne,4,this.length),k.read(this,ne,!0,23,4)},g.prototype.readFloatBE=function(ne,J){return J||L(ne,4,this.length),k.read(this,ne,!1,23,4)},g.prototype.readDoubleLE=function(ne,J){return J||L(ne,8,this.length),k.read(this,ne,!0,52,8)},g.prototype.readDoubleBE=function(ne,J){return J||L(ne,8,this.length),k.read(this,ne,!1,52,8)};function K(ie,ne,J,$,le,he){if(!g.isBuffer(ie))throw new TypeError('"buffer" argument must be a Buffer instance');if(ne>le||ne<he)throw new RangeError('"value" argument is out of bounds');if(J+$>ie.length)throw new RangeError("Index out of range")}g.prototype.writeUIntLE=function(ne,J,$,le){if(ne=+ne,J=J|0,$=$|0,!le){var he=Math.pow(2,8*$)-1;K(this,ne,J,$,he,0)}var Se=1,Ue=0;for(this[J]=ne&255;++Ue<$&&(Se*=256);)this[J+Ue]=ne/Se&255;return J+$},g.prototype.writeUIntBE=function(ne,J,$,le){if(ne=+ne,J=J|0,$=$|0,!le){var he=Math.pow(2,8*$)-1;K(this,ne,J,$,he,0)}var Se=$-1,Ue=1;for(this[J+Se]=ne&255;--Se>=0&&(Ue*=256);)this[J+Se]=ne/Ue&255;return J+$},g.prototype.writeUInt8=function(ne,J,$){return ne=+ne,J=J|0,$||K(this,ne,J,1,255,0),g.TYPED_ARRAY_SUPPORT||(ne=Math.floor(ne)),this[J]=ne&255,J+1};function ee(ie,ne,J,$){ne<0&&(ne=65535+ne+1);for(var le=0,he=Math.min(ie.length-J,2);le<he;++le)ie[J+le]=(ne&255<<8*($?le:1-le))>>>($?le:1-le)*8}g.prototype.writeUInt16LE=function(ne,J,$){return ne=+ne,J=J|0,$||K(this,ne,J,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[J]=ne&255,this[J+1]=ne>>>8):ee(this,ne,J,!0),J+2},g.prototype.writeUInt16BE=function(ne,J,$){return ne=+ne,J=J|0,$||K(this,ne,J,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[J]=ne>>>8,this[J+1]=ne&255):ee(this,ne,J,!1),J+2};function oe(ie,ne,J,$){ne<0&&(ne=4294967295+ne+1);for(var le=0,he=Math.min(ie.length-J,4);le<he;++le)ie[J+le]=ne>>>($?le:3-le)*8&255}g.prototype.writeUInt32LE=function(ne,J,$){return ne=+ne,J=J|0,$||K(this,ne,J,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[J+3]=ne>>>24,this[J+2]=ne>>>16,this[J+1]=ne>>>8,this[J]=ne&255):oe(this,ne,J,!0),J+4},g.prototype.writeUInt32BE=function(ne,J,$){return ne=+ne,J=J|0,$||K(this,ne,J,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[J]=ne>>>24,this[J+1]=ne>>>16,this[J+2]=ne>>>8,this[J+3]=ne&255):oe(this,ne,J,!1),J+4},g.prototype.writeIntLE=function(ne,J,$,le){if(ne=+ne,J=J|0,!le){var he=Math.pow(2,8*$-1);K(this,ne,J,$,he-1,-he)}var Se=0,Ue=1,Xe=0;for(this[J]=ne&255;++Se<$&&(Ue*=256);)ne<0&&Xe===0&&this[J+Se-1]!==0&&(Xe=1),this[J+Se]=(ne/Ue>>0)-Xe&255;return J+$},g.prototype.writeIntBE=function(ne,J,$,le){if(ne=+ne,J=J|0,!le){var he=Math.pow(2,8*$-1);K(this,ne,J,$,he-1,-he)}var Se=$-1,Ue=1,Xe=0;for(this[J+Se]=ne&255;--Se>=0&&(Ue*=256);)ne<0&&Xe===0&&this[J+Se+1]!==0&&(Xe=1),this[J+Se]=(ne/Ue>>0)-Xe&255;return J+$},g.prototype.writeInt8=function(ne,J,$){return ne=+ne,J=J|0,$||K(this,ne,J,1,127,-128),g.TYPED_ARRAY_SUPPORT||(ne=Math.floor(ne)),ne<0&&(ne=255+ne+1),this[J]=ne&255,J+1},g.prototype.writeInt16LE=function(ne,J,$){return ne=+ne,J=J|0,$||K(this,ne,J,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[J]=ne&255,this[J+1]=ne>>>8):ee(this,ne,J,!0),J+2},g.prototype.writeInt16BE=function(ne,J,$){return ne=+ne,J=J|0,$||K(this,ne,J,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[J]=ne>>>8,this[J+1]=ne&255):ee(this,ne,J,!1),J+2},g.prototype.writeInt32LE=function(ne,J,$){return ne=+ne,J=J|0,$||K(this,ne,J,4,2147483647,-2147483648),g.TYPED_ARRAY_SUPPORT?(this[J]=ne&255,this[J+1]=ne>>>8,this[J+2]=ne>>>16,this[J+3]=ne>>>24):oe(this,ne,J,!0),J+4},g.prototype.writeInt32BE=function(ne,J,$){return ne=+ne,J=J|0,$||K(this,ne,J,4,2147483647,-2147483648),ne<0&&(ne=4294967295+ne+1),g.TYPED_ARRAY_SUPPORT?(this[J]=ne>>>24,this[J+1]=ne>>>16,this[J+2]=ne>>>8,this[J+3]=ne&255):oe(this,ne,J,!1),J+4};function ae(ie,ne,J,$,le,he){if(J+$>ie.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("Index out of range")}function be(ie,ne,J,$,le){return le||ae(ie,ne,J,4,34028234663852886e22,-34028234663852886e22),k.write(ie,ne,J,$,23,4),J+4}g.prototype.writeFloatLE=function(ne,J,$){return be(this,ne,J,!0,$)},g.prototype.writeFloatBE=function(ne,J,$){return be(this,ne,J,!1,$)};function _e(ie,ne,J,$,le){return le||ae(ie,ne,J,8,17976931348623157e292,-17976931348623157e292),k.write(ie,ne,J,$,52,8),J+8}g.prototype.writeDoubleLE=function(ne,J,$){return _e(this,ne,J,!0,$)},g.prototype.writeDoubleBE=function(ne,J,$){return _e(this,ne,J,!1,$)},g.prototype.copy=function(ne,J,$,le){if($||($=0),!le&&le!==0&&(le=this.length),J>=ne.length&&(J=ne.length),J||(J=0),le>0&&le<$&&(le=$),le===$)return 0;if(ne.length===0||this.length===0)return 0;if(J<0)throw new RangeError("targetStart out of bounds");if($<0||$>=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),ne.length-J<le-$&&(le=ne.length-J+$);var he=le-$,Se;if(this===ne&&$<J&&J<le)for(Se=he-1;Se>=0;--Se)ne[Se+J]=this[Se+$];else if(he<1e3||!g.TYPED_ARRAY_SUPPORT)for(Se=0;Se<he;++Se)ne[Se+J]=this[Se+$];else Uint8Array.prototype.set.call(ne,this.subarray($,$+he),J);return he},g.prototype.fill=function(ne,J,$,le){if(typeof ne=="string"){if(typeof J=="string"?(le=J,J=0,$=this.length):typeof $=="string"&&(le=$,$=this.length),ne.length===1){var he=ne.charCodeAt(0);he<256&&(ne=he)}if(le!==void 0&&typeof le!="string")throw new TypeError("encoding must be a string");if(typeof le=="string"&&!g.isEncoding(le))throw new TypeError("Unknown encoding: "+le)}else typeof ne=="number"&&(ne=ne&255);if(J<0||this.length<J||this.length<$)throw new RangeError("Out of range index");if($<=J)return this;J=J>>>0,$=$===void 0?this.length:$>>>0,ne||(ne=0);var Se;if(typeof ne=="number")for(Se=J;Se<$;++Se)this[Se]=ne;else{var Ue=g.isBuffer(ne)?ne:te(new g(ne,le).toString()),Xe=Ue.length;for(Se=0;Se<$-J;++Se)this[Se+J]=Ue[Se%Xe]}return this};var fe=/[^+\/0-9A-Za-z-_]/g;function Re(ie){if(ie=Ce(ie).replace(fe,""),ie.length<2)return"";for(;ie.length%4!==0;)ie=ie+"=";return ie}function Ce(ie){return ie.trim?ie.trim():ie.replace(/^\s+|\s+$/g,"")}function ce(ie){return ie<16?"0"+ie.toString(16):ie.toString(16)}function te(ie,ne){ne=ne||Infinity;for(var J,$=ie.length,le=null,he=[],Se=0;Se<$;++Se){if(J=ie.charCodeAt(Se),J>55295&&J<57344){if(!le){if(J>56319){(ne-=3)>-1&&he.push(239,191,189);continue}else if(Se+1===$){(ne-=3)>-1&&he.push(239,191,189);continue}le=J;continue}if(J<56320){(ne-=3)>-1&&he.push(239,191,189),le=J;continue}J=(le-55296<<10|J-56320)+65536}else le&&((ne-=3)>-1&&he.push(239,191,189));if(le=null,J<128){if((ne-=1)<0)break;he.push(J)}else if(J<2048){if((ne-=2)<0)break;he.push(J>>6|192,J&63|128)}else if(J<65536){if((ne-=3)<0)break;he.push(J>>12|224,J>>6&63|128,J&63|128)}else if(J<1114112){if((ne-=4)<0)break;he.push(J>>18|240,J>>12&63|128,J>>6&63|128,J&63|128)}else throw new Error("Invalid code point")}return he}function W(ie){for(var ne=[],J=0;J<ie.length;++J)ne.push(ie.charCodeAt(J)&255);return ne}function X(ie,ne){for(var J,$,le,he=[],Se=0;Se<ie.length&&!((ne-=2)<0);++Se)J=ie.charCodeAt(Se),$=J>>8,le=J%256,he.push(le),he.push($);return he}function V(ie){return w.toByteArray(Re(ie))}function Z(ie,ne,J,$){for(var le=0;le<$&&!(le+J>=ne.length||le>=ie.length);++le)ne[le+J]=ie[le];return le}function q(ie){return ie!==ie}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},B("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(B,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(B,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(B,Q,D){/*!
|
|
|
* copy-to - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var N=Array.prototype.slice;Q.exports=g;function g(k,b){if(!(this instanceof g))return new g(k,b);this.src=k,this._withAccess=b}g.prototype.withAccess=function(k){return this._withAccess=k!==!1,this},g.prototype.pick=function(k){return Array.isArray(k)||(k=N.call(arguments)),k.length&&(this.keys=k),this},g.prototype.to=function(k){if(k=k||{},!this.src)return k;var b=this.keys||Object.keys(this.src);if(!this._withAccess){for(var m=0;m<b.length;m++){if(T=b[m],k[T]!==void 0)continue;k[T]=this.src[T]}return k}for(var m=0;m<b.length;m++){var T=b[m];if(!w(k,T))continue;var _=this.src.__lookupGetter__(T),t=this.src.__lookupSetter__(T);_&&k.__defineGetter__(T,_),t&&k.__defineSetter__(T,t),!_&&!t&&(k[T]=this.src[T])}return k},g.prototype.toCover=function(k){for(var b=this.keys||Object.keys(this.src),m=0;m<b.length;m++){var T=b[m];delete k[T];var _=this.src.__lookupGetter__(T),t=this.src.__lookupSetter__(T);_&&k.__defineGetter__(T,_),t&&k.__defineSetter__(T,t),!_&&!t&&(k[T]=this.src[T])}},g.prototype.override=g.prototype.toCover,g.prototype.and=function(k){var b={};return this.to(b),this.src=k,this.to(b),this.src=b,this};function w(k,b){return k[b]===void 0&&k.__lookupGetter__(b)===void 0&&k.__lookupSetter__(b)===void 0}},{}],77:[function(B,Q,D){B("../../modules/es6.string.iterator"),B("../../modules/es6.array.from"),Q.exports=B("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(B,Q,D){var N=B("../../modules/_core"),g=N.JSON||(N.JSON={stringify:JSON.stringify});Q.exports=function(k){return g.stringify.apply(g,arguments)}},{"../../modules/_core":99}],79:[function(B,Q,D){B("../../modules/es6.object.assign"),Q.exports=B("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(B,Q,D){B("../../modules/es6.object.create");var N=B("../../modules/_core").Object;Q.exports=function(w,k){return N.create(w,k)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(B,Q,D){B("../../modules/es6.object.define-property");var N=B("../../modules/_core").Object;Q.exports=function(w,k,b){return N.defineProperty(w,k,b)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(B,Q,D){B("../../modules/es7.object.entries"),Q.exports=B("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(B,Q,D){B("../../modules/es6.object.get-own-property-names");var N=B("../../modules/_core").Object;Q.exports=function(w){return N.getOwnPropertyNames(w)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(B,Q,D){B("../../modules/es6.object.get-prototype-of"),Q.exports=B("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(B,Q,D){B("../../modules/es6.object.keys"),Q.exports=B("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(B,Q,D){B("../modules/es6.object.to-string"),B("../modules/es6.string.iterator"),B("../modules/web.dom.iterable"),B("../modules/es6.promise"),B("../modules/es7.promise.finally"),B("../modules/es7.promise.try"),Q.exports=B("../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(B,Q,D){B("../modules/web.immediate"),Q.exports=B("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(B,Q,D){B("../../modules/es6.string.from-code-point"),Q.exports=B("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(B,Q,D){B("../../modules/es6.function.has-instance"),Q.exports=B("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(B,Q,D){B("../../modules/es6.symbol"),B("../../modules/es6.object.to-string"),B("../../modules/es7.symbol.async-iterator"),B("../../modules/es7.symbol.observable"),Q.exports=B("../../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(B,Q,D){B("../../modules/es6.string.iterator"),B("../../modules/web.dom.iterable"),Q.exports=B("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(B,Q,D){Q.exports=function(N){if(typeof N!="function")throw TypeError(N+" is not a function!");return N}},{}],93:[function(B,Q,D){Q.exports=function(){}},{}],94:[function(B,Q,D){Q.exports=function(N,g,w,k){if(!(N instanceof g)||k!==void 0&&k in N)throw TypeError(w+": incorrect invocation!");return N}},{}],95:[function(B,Q,D){var N=B("./_is-object");Q.exports=function(g){if(!N(g))throw TypeError(g+" is not an object!");return g}},{"./_is-object":119}],96:[function(B,Q,D){var N=B("./_to-iobject"),g=B("./_to-length"),w=B("./_to-absolute-index");Q.exports=function(k){return function(b,m,T){var _=N(b),t=g(_.length),h=w(T,t),r;if(k&&m!=m){for(;t>h;)if(r=_[h++],r!=r)return!0}else for(;t>h;h++)if((k||h in _)&&_[h]===m)return k||h||0;return!k&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(B,Q,D){var N=B("./_cof"),g=B("./_wks")("toStringTag"),w=N(function(){return arguments}())=="Arguments",k=function(b,m){try{return b[m]}catch(T){}};Q.exports=function(b){var m,T,_;return b===void 0?"Undefined":b===null?"Null":typeof(T=k(m=Object(b),g))=="string"?T:w?N(m):(_=N(m))=="Object"&&typeof m.callee=="function"?"Arguments":_}},{"./_cof":98,"./_wks":166}],98:[function(B,Q,D){var N={}.toString;Q.exports=function(g){return N.call(g).slice(8,-1)}},{}],99:[function(B,Q,D){var N=Q.exports={version:"2.6.11"};typeof __e=="number"&&(__e=N)},{}],100:[function(B,Q,D){"use strict";var N=B("./_object-dp"),g=B("./_property-desc");Q.exports=function(w,k,b){k in w?N.f(w,k,g(0,b)):w[k]=b}},{"./_object-dp":132,"./_property-desc":146}],101:[function(B,Q,D){var N=B("./_a-function");Q.exports=function(g,w,k){if(N(g),w===void 0)return g;switch(k){case 1:return function(b){return g.call(w,b)};case 2:return function(b,m){return g.call(w,b,m)};case 3:return function(b,m,T){return g.call(w,b,m,T)}}return function(){return g.apply(w,arguments)}}},{"./_a-function":92}],102:[function(B,Q,D){Q.exports=function(N){if(N==null)throw TypeError("Can't call method on "+N);return N}},{}],103:[function(B,Q,D){Q.exports=!B("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(B,Q,D){var N=B("./_is-object"),g=B("./_global").document,w=N(g)&&N(g.createElement);Q.exports=function(k){return w?g.createElement(k):{}}},{"./_global":110,"./_is-object":119}],105:[function(B,Q,D){Q.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(B,Q,D){var N=B("./_object-keys"),g=B("./_object-gops"),w=B("./_object-pie");Q.exports=function(k){var b=N(k),m=g.f;if(m)for(var T=m(k),_=w.f,t=0,h;T.length>t;)_.call(k,h=T[t++])&&b.push(h);return b}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(B,Q,D){var N=B("./_global"),g=B("./_core"),w=B("./_ctx"),k=B("./_hide"),b=B("./_has"),m="prototype",T=function(_,t,h){var r=_&T.F,c=_&T.G,i=_&T.S,n=_&T.P,l=_&T.B,f=_&T.W,d=c?g:g[t]||(g[t]={}),u=d[m],o=c?N:i?N[t]:(N[t]||{})[m],s,E,v;c&&(h=t);for(s in h){if(E=!r&&o&&o[s]!==void 0,E&&b(d,s))continue;v=E?o[s]:h[s],d[s]=c&&typeof o[s]!="function"?h[s]:l&&E?w(v,N):f&&o[s]==v?function(p){var I=function(R,y,x){if(this instanceof p){switch(arguments.length){case 0:return new p;case 1:return new p(R);case 2:return new p(R,y)}return new p(R,y,x)}return p.apply(this,arguments)};return I[m]=p[m],I}(v):n&&typeof v=="function"?w(Function.call,v):v,n&&((d.virtual||(d.virtual={}))[s]=v,_&T.R&&u&&!u[s]&&k(u,s,v))}};T.F=1,T.G=2,T.S=4,T.P=8,T.B=16,T.W=32,T.U=64,T.R=128,Q.exports=T},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(B,Q,D){Q.exports=function(N){try{return!!N()}catch(g){return!0}}},{}],109:[function(B,Q,D){var N=B("./_ctx"),g=B("./_iter-call"),w=B("./_is-array-iter"),k=B("./_an-object"),b=B("./_to-length"),m=B("./core.get-iterator-method"),T={},_={},D=Q.exports=function(t,h,r,c,i){var n=i?function(){return t}:m(t),l=N(r,c,h?2:1),f=0,d,u,o,s;if(typeof n!="function")throw TypeError(t+" is not iterable!");if(w(n)){for(d=b(t.length);d>f;f++)if(s=h?l(k(u=t[f])[0],u[1]):l(t[f]),s===T||s===_)return s}else for(o=n.call(t);!(u=o.next()).done;)if(s=g(o,l,u.value,h),s===T||s===_)return s};D.BREAK=T,D.RETURN=_},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(B,Q,D){var N=Q.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=N)},{}],111:[function(B,Q,D){var N={}.hasOwnProperty;Q.exports=function(g,w){return N.call(g,w)}},{}],112:[function(B,Q,D){var N=B("./_object-dp"),g=B("./_property-desc");Q.exports=B("./_descriptors")?function(w,k,b){return N.f(w,k,g(1,b))}:function(w,k,b){return w[k]=b,w}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(B,Q,D){var N=B("./_global").document;Q.exports=N&&N.documentElement},{"./_global":110}],114:[function(B,Q,D){Q.exports=!B("./_descriptors")&&!B("./_fails")(function(){return Object.defineProperty(B("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(B,Q,D){Q.exports=function(N,g,w){var k=w===void 0;switch(g.length){case 0:return k?N():N.call(w);case 1:return k?N(g[0]):N.call(w,g[0]);case 2:return k?N(g[0],g[1]):N.call(w,g[0],g[1]);case 3:return k?N(g[0],g[1],g[2]):N.call(w,g[0],g[1],g[2]);case 4:return k?N(g[0],g[1],g[2],g[3]):N.call(w,g[0],g[1],g[2],g[3])}return N.apply(w,g)}},{}],116:[function(B,Q,D){var N=B("./_cof");Q.exports=Object("z").propertyIsEnumerable(0)?Object:function(g){return N(g)=="String"?g.split(""):Object(g)}},{"./_cof":98}],117:[function(B,Q,D){var N=B("./_iterators"),g=B("./_wks")("iterator"),w=Array.prototype;Q.exports=function(k){return k!==void 0&&(N.Array===k||w[g]===k)}},{"./_iterators":125,"./_wks":166}],118:[function(B,Q,D){var N=B("./_cof");Q.exports=Array.isArray||function(w){return N(w)=="Array"}},{"./_cof":98}],119:[function(B,Q,D){Q.exports=function(N){return typeof N=="object"?N!==null:typeof N=="function"}},{}],120:[function(B,Q,D){var N=B("./_an-object");Q.exports=function(g,w,k,b){try{return b?w(N(k)[0],k[1]):w(k)}catch(T){var m=g.return;throw m!==void 0&&N(m.call(g)),T}}},{"./_an-object":95}],121:[function(B,Q,D){"use strict";var N=B("./_object-create"),g=B("./_property-desc"),w=B("./_set-to-string-tag"),k={};B("./_hide")(k,B("./_wks")("iterator"),function(){return this}),Q.exports=function(b,m,T){b.prototype=N(k,{next:g(1,T)}),w(b,m+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(B,Q,D){"use strict";var N=B("./_library"),g=B("./_export"),w=B("./_redefine"),k=B("./_hide"),b=B("./_iterators"),m=B("./_iter-create"),T=B("./_set-to-string-tag"),_=B("./_object-gpo"),t=B("./_wks")("iterator"),h=!([].keys&&"next"in[].keys()),r="@@iterator",c="keys",i="values",n=function(){return this};Q.exports=function(l,f,d,u,o,s,E){m(d,f,u);var v=function(z){if(!h&&z in y)return y[z];switch(z){case c:return function(){return new d(this,z)};case i:return function(){return new d(this,z)}}return function(){return new d(this,z)}},p=f+" Iterator",I=o==i,R=!1,y=l.prototype,x=y[t]||y[r]||o&&y[o],C=x||v(o),S=o?I?v("entries"):C:void 0,F=f=="Array"&&y.entries||x,j,A,Y;if(F&&(Y=_(F.call(new l)),Y!==Object.prototype&&Y.next&&(T(Y,p,!0),!N&&typeof Y[t]!="function"&&k(Y,t,n))),I&&x&&x.name!==i&&(R=!0,C=function(){return x.call(this)}),(!N||E)&&(h||R||!y[t])&&k(y,t,C),b[f]=C,b[p]=n,o)if(j={values:I?C:v(i),keys:s?C:v(c),entries:S},E)for(A in j)A in y||w(y,A,j[A]);else g(g.P+g.F*(h||R),f,j);return j}},{"./_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(B,Q,D){var N=B("./_wks")("iterator"),g=!1;try{var w=[7][N]();w.return=function(){g=!0},Array.from(w,function(){throw 2})}catch(k){}Q.exports=function(k,b){if(!b&&!g)return!1;var m=!1;try{var T=[7],_=T[N]();_.next=function(){return{done:m=!0}},T[N]=function(){return _},k(T)}catch(t){}return m}},{"./_wks":166}],124:[function(B,Q,D){Q.exports=function(N,g){return{value:g,done:!!N}}},{}],125:[function(B,Q,D){Q.exports={}},{}],126:[function(B,Q,D){Q.exports=!0},{}],127:[function(B,Q,D){var N=B("./_uid")("meta"),g=B("./_is-object"),w=B("./_has"),k=B("./_object-dp").f,b=0,m=Object.isExtensible||function(){return!0},T=!B("./_fails")(function(){return m(Object.preventExtensions({}))}),_=function(i){k(i,N,{value:{i:"O"+ ++b,w:{}}})},t=function(i,n){if(!g(i))return typeof i=="symbol"?i:(typeof i=="string"?"S":"P")+i;if(!w(i,N)){if(!m(i))return"F";if(!n)return"E";_(i)}return i[N].i},h=function(i,n){if(!w(i,N)){if(!m(i))return!0;if(!n)return!1;_(i)}return i[N].w},r=function(i){return T&&c.NEED&&m(i)&&!w(i,N)&&_(i),i},c=Q.exports={KEY:N,NEED:!1,fastKey:t,getWeak:h,onFreeze:r}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(B,Q,D){var N=B("./_global"),g=B("./_task").set,w=N.MutationObserver||N.WebKitMutationObserver,k=N.process,b=N.Promise,m=B("./_cof")(k)=="process";Q.exports=function(){var T,_,t,h=function(){var n,l;for(m&&(n=k.domain)&&n.exit();T;){l=T.fn,T=T.next;try{l()}catch(f){throw T?t():_=void 0,f}}_=void 0,n&&n.enter()};if(m)t=function(){k.nextTick(h)};else if(w&&!(N.navigator&&N.navigator.standalone)){var r=!0,c=document.createTextNode("");new w(h).observe(c,{characterData:!0}),t=function(){c.data=r=!r}}else if(b&&b.resolve){var i=b.resolve(void 0);t=function(){i.then(h)}}else t=function(){g.call(N,h)};return function(n){var l={fn:n,next:void 0};_&&(_.next=l),T||(T=l,t()),_=l}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(B,Q,D){"use strict";var N=B("./_a-function");function g(w){var k,b;this.promise=new w(function(m,T){if(k!==void 0||b!==void 0)throw TypeError("Bad Promise constructor");k=m,b=T}),this.resolve=N(k),this.reject=N(b)}Q.exports.f=function(w){return new g(w)}},{"./_a-function":92}],130:[function(B,Q,D){"use strict";var N=B("./_descriptors"),g=B("./_object-keys"),w=B("./_object-gops"),k=B("./_object-pie"),b=B("./_to-object"),m=B("./_iobject"),T=Object.assign;Q.exports=!T||B("./_fails")(function(){var _={},t={},h=Symbol(),r="abcdefghijklmnopqrst";return _[h]=7,r.split("").forEach(function(c){t[c]=c}),T({},_)[h]!=7||Object.keys(T({},t)).join("")!=r})?function(t,h){for(var r=b(t),c=arguments.length,i=1,n=w.f,l=k.f;c>i;)for(var f=m(arguments[i++]),d=n?g(f).concat(n(f)):g(f),u=d.length,o=0,s;u>o;)s=d[o++],(!N||l.call(f,s))&&(r[s]=f[s]);return r}:T},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(B,Q,D){var N=B("./_an-object"),g=B("./_object-dps"),w=B("./_enum-bug-keys"),k=B("./_shared-key")("IE_PROTO"),b=function(){},m="prototype",T=function(){var _=B("./_dom-create")("iframe"),t=w.length,h="<",r=">",c;for(_.style.display="none",B("./_html").appendChild(_),_.src="javascript:",c=_.contentWindow.document,c.open(),c.write(h+"script"+r+"document.F=Object"+h+"/script"+r),c.close(),T=c.F;t--;)delete T[m][w[t]];return T()};Q.exports=Object.create||function(t,h){var r;return t!==null?(b[m]=N(t),r=new b,b[m]=null,r[k]=t):r=T(),h===void 0?r:g(r,h)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(B,Q,D){var N=B("./_an-object"),g=B("./_ie8-dom-define"),w=B("./_to-primitive"),k=Object.defineProperty;D.f=B("./_descriptors")?Object.defineProperty:function(m,T,_){if(N(m),T=w(T,!0),N(_),g)try{return k(m,T,_)}catch(t){}if("get"in _||"set"in _)throw TypeError("Accessors not supported!");return"value"in _&&(m[T]=_.value),m}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(B,Q,D){var N=B("./_object-dp"),g=B("./_an-object"),w=B("./_object-keys");Q.exports=B("./_descriptors")?Object.defineProperties:function(b,m){g(b);for(var T=w(m),_=T.length,t=0,h;_>t;)N.f(b,h=T[t++],m[h]);return b}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(B,Q,D){var N=B("./_object-pie"),g=B("./_property-desc"),w=B("./_to-iobject"),k=B("./_to-primitive"),b=B("./_has"),m=B("./_ie8-dom-define"),T=Object.getOwnPropertyDescriptor;D.f=B("./_descriptors")?T:function(t,h){if(t=w(t),h=k(h,!0),m)try{return T(t,h)}catch(r){}if(b(t,h))return g(!N.f.call(t,h),t[h])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(B,Q,D){var N=B("./_to-iobject"),g=B("./_object-gopn").f,w={}.toString,k=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],b=function(m){try{return g(m)}catch(T){return k.slice()}};Q.exports.f=function(T){return k&&w.call(T)=="[object Window]"?b(T):g(N(T))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(B,Q,D){var N=B("./_object-keys-internal"),g=B("./_enum-bug-keys").concat("length","prototype");D.f=Object.getOwnPropertyNames||function(k){return N(k,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(B,Q,D){D.f=Object.getOwnPropertySymbols},{}],138:[function(B,Q,D){var N=B("./_has"),g=B("./_to-object"),w=B("./_shared-key")("IE_PROTO"),k=Object.prototype;Q.exports=Object.getPrototypeOf||function(b){return b=g(b),N(b,w)?b[w]:typeof b.constructor=="function"&&b instanceof b.constructor?b.constructor.prototype:b instanceof Object?k:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(B,Q,D){var N=B("./_has"),g=B("./_to-iobject"),w=B("./_array-includes")(!1),k=B("./_shared-key")("IE_PROTO");Q.exports=function(b,m){var T=g(b),_=0,t=[],h;for(h in T)h!=k&&(N(T,h)&&t.push(h));for(;m.length>_;)N(T,h=m[_++])&&(~w(t,h)||t.push(h));return t}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(B,Q,D){var N=B("./_object-keys-internal"),g=B("./_enum-bug-keys");Q.exports=Object.keys||function(k){return N(k,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(B,Q,D){D.f={}.propertyIsEnumerable},{}],142:[function(B,Q,D){var N=B("./_export"),g=B("./_core"),w=B("./_fails");Q.exports=function(k,b){var m=(g.Object||{})[k]||Object[k],T={};T[k]=b(m),N(N.S+N.F*w(function(){m(1)}),"Object",T)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(B,Q,D){var N=B("./_descriptors"),g=B("./_object-keys"),w=B("./_to-iobject"),k=B("./_object-pie").f;Q.exports=function(b){return function(m){for(var T=w(m),_=g(T),t=_.length,h=0,r=[],c;t>h;)c=_[h++],(!N||k.call(T,c))&&r.push(b?[c,T[c]]:T[c]);return r}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(B,Q,D){Q.exports=function(N){try{return{e:!1,v:N()}}catch(g){return{e:!0,v:g}}}},{}],145:[function(B,Q,D){var N=B("./_an-object"),g=B("./_is-object"),w=B("./_new-promise-capability");Q.exports=function(k,b){if(N(k),g(b)&&b.constructor===k)return b;var m=w.f(k),T=m.resolve;return T(b),m.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(B,Q,D){Q.exports=function(N,g){return{enumerable:!(N&1),configurable:!(N&2),writable:!(N&4),value:g}}},{}],147:[function(B,Q,D){var N=B("./_hide");Q.exports=function(g,w,k){for(var b in w)k&&g[b]?g[b]=w[b]:N(g,b,w[b]);return g}},{"./_hide":112}],148:[function(B,Q,D){Q.exports=B("./_hide")},{"./_hide":112}],149:[function(B,Q,D){"use strict";var N=B("./_global"),g=B("./_core"),w=B("./_object-dp"),k=B("./_descriptors"),b=B("./_wks")("species");Q.exports=function(m){var T=typeof g[m]=="function"?g[m]:N[m];k&&T&&!T[b]&&w.f(T,b,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(B,Q,D){var N=B("./_object-dp").f,g=B("./_has"),w=B("./_wks")("toStringTag");Q.exports=function(k,b,m){k&&!g(k=m?k:k.prototype,w)&&N(k,w,{configurable:!0,value:b})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(B,Q,D){var N=B("./_shared")("keys"),g=B("./_uid");Q.exports=function(w){return N[w]||(N[w]=g(w))}},{"./_shared":152,"./_uid":162}],152:[function(B,Q,D){var N=B("./_core"),g=B("./_global"),w="__core-js_shared__",k=g[w]||(g[w]={});(Q.exports=function(b,m){return k[b]||(k[b]=m!==void 0?m:{})})("versions",[]).push({version:N.version,mode:B("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(B,Q,D){var N=B("./_an-object"),g=B("./_a-function"),w=B("./_wks")("species");Q.exports=function(k,b){var m=N(k).constructor,T;return m===void 0||(T=N(m)[w])==null?b:g(T)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(B,Q,D){var N=B("./_to-integer"),g=B("./_defined");Q.exports=function(w){return function(k,b){var m=String(g(k)),T=N(b),_=m.length,t,h;return T<0||T>=_?w?"":void 0:(t=m.charCodeAt(T),t<55296||t>56319||T+1===_||(h=m.charCodeAt(T+1))<56320||h>57343?w?m.charAt(T):t:w?m.slice(T,T+2):(t-55296<<10)+(h-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(B,Q,D){var N=B("./_ctx"),g=B("./_invoke"),w=B("./_html"),k=B("./_dom-create"),b=B("./_global"),m=b.process,T=b.setImmediate,_=b.clearImmediate,t=b.MessageChannel,h=b.Dispatch,r=0,c={},i="onreadystatechange",n,l,f,d=function(){var o=+this;if(c.hasOwnProperty(o)){var s=c[o];delete c[o],s()}},u=function(o){d.call(o.data)};(!T||!_)&&(T=function(s){for(var E=[],v=1;arguments.length>v;)E.push(arguments[v++]);return c[++r]=function(){g(typeof s=="function"?s:Function(s),E)},n(r),r},_=function(s){delete c[s]},B("./_cof")(m)=="process"?n=function(o){m.nextTick(N(d,o,1))}:h&&h.now?n=function(o){h.now(N(d,o,1))}:t?(l=new t,f=l.port2,l.port1.onmessage=u,n=N(f.postMessage,f,1)):b.addEventListener&&typeof postMessage=="function"&&!b.importScripts?(n=function(o){b.postMessage(o+"","*")},b.addEventListener("message",u,!1)):i in k("script")?n=function(o){w.appendChild(k("script"))[i]=function(){w.removeChild(this),d.call(o)}}:n=function(o){setTimeout(N(d,o,1),0)}),Q.exports={set:T,clear:_}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(B,Q,D){var N=B("./_to-integer"),g=Math.max,w=Math.min;Q.exports=function(k,b){return k=N(k),k<0?g(k+b,0):w(k,b)}},{"./_to-integer":157}],157:[function(B,Q,D){var N=Math.ceil,g=Math.floor;Q.exports=function(w){return isNaN(w=+w)?0:(w>0?g:N)(w)}},{}],158:[function(B,Q,D){var N=B("./_iobject"),g=B("./_defined");Q.exports=function(w){return N(g(w))}},{"./_defined":102,"./_iobject":116}],159:[function(B,Q,D){var N=B("./_to-integer"),g=Math.min;Q.exports=function(w){return w>0?g(N(w),9007199254740991):0}},{"./_to-integer":157}],160:[function(B,Q,D){var N=B("./_defined");Q.exports=function(g){return Object(N(g))}},{"./_defined":102}],161:[function(B,Q,D){var N=B("./_is-object");Q.exports=function(g,w){if(!N(g))return g;var k,b;if(w&&typeof(k=g.toString)=="function"&&!N(b=k.call(g)))return b;if(typeof(k=g.valueOf)=="function"&&!N(b=k.call(g)))return b;if(!w&&typeof(k=g.toString)=="function"&&!N(b=k.call(g)))return b;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(B,Q,D){var N=0,g=Math.random();Q.exports=function(w){return"Symbol(".concat(w===void 0?"":w,")_",(++N+g).toString(36))}},{}],163:[function(B,Q,D){var N=B("./_global"),g=N.navigator;Q.exports=g&&g.userAgent||""},{"./_global":110}],164:[function(B,Q,D){var N=B("./_global"),g=B("./_core"),w=B("./_library"),k=B("./_wks-ext"),b=B("./_object-dp").f;Q.exports=function(m){var T=g.Symbol||(g.Symbol=w?{}:N.Symbol||{});m.charAt(0)!="_"&&!(m in T)&&b(T,m,{value:k.f(m)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(B,Q,D){D.f=B("./_wks")},{"./_wks":166}],166:[function(B,Q,D){var N=B("./_shared")("wks"),g=B("./_uid"),w=B("./_global").Symbol,k=typeof w=="function",b=Q.exports=function(m){return N[m]||(N[m]=k&&w[m]||(k?w:g)("Symbol."+m))};b.store=N},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(B,Q,D){var N=B("./_classof"),g=B("./_wks")("iterator"),w=B("./_iterators");Q.exports=B("./_core").getIteratorMethod=function(k){if(k!=null)return k[g]||k["@@iterator"]||w[N(k)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(B,Q,D){"use strict";var N=B("./_ctx"),g=B("./_export"),w=B("./_to-object"),k=B("./_iter-call"),b=B("./_is-array-iter"),m=B("./_to-length"),T=B("./_create-property"),_=B("./core.get-iterator-method");g(g.S+g.F*!B("./_iter-detect")(function(t){Array.from(t)}),"Array",{from:function(h){var r=w(h),c=typeof this=="function"?this:Array,i=arguments.length,n=i>1?arguments[1]:void 0,l=n!==void 0,f=0,d=_(r),u,o,s,E;if(l&&(n=N(n,i>2?arguments[2]:void 0,2)),d!=null&&!(c==Array&&b(d)))for(E=d.call(r),o=new c;!(s=E.next()).done;f++)T(o,f,l?k(E,n,[s.value,f],!0):s.value);else for(u=m(r.length),o=new c(u);u>f;f++)T(o,f,l?n(r[f],f):r[f]);return o.length=f,o}})},{"./_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(B,Q,D){"use strict";var N=B("./_add-to-unscopables"),g=B("./_iter-step"),w=B("./_iterators"),k=B("./_to-iobject");Q.exports=B("./_iter-define")(Array,"Array",function(b,m){this._t=k(b),this._i=0,this._k=m},function(){var b=this._t,m=this._k,T=this._i++;return!b||T>=b.length?(this._t=void 0,g(1)):m=="keys"?g(0,T):m=="values"?g(0,b[T]):g(0,[T,b[T]])},"values"),w.Arguments=w.Array,N("keys"),N("values"),N("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(B,Q,D){"use strict";var N=B("./_is-object"),g=B("./_object-gpo"),w=B("./_wks")("hasInstance"),k=Function.prototype;w in k||B("./_object-dp").f(k,w,{value:function(b){if(typeof this!="function"||!N(b))return!1;if(!N(this.prototype))return b instanceof this;for(;b=g(b);)if(this.prototype===b)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(B,Q,D){var N=B("./_export");N(N.S+N.F,"Object",{assign:B("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(B,Q,D){var N=B("./_export");N(N.S,"Object",{create:B("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(B,Q,D){var N=B("./_export");N(N.S+N.F*!B("./_descriptors"),"Object",{defineProperty:B("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(B,Q,D){B("./_object-sap")("getOwnPropertyNames",function(){return B("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(B,Q,D){var N=B("./_to-object"),g=B("./_object-gpo");B("./_object-sap")("getPrototypeOf",function(){return function(k){return g(N(k))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(B,Q,D){var N=B("./_to-object"),g=B("./_object-keys");B("./_object-sap")("keys",function(){return function(k){return g(N(k))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(B,Q,D){arguments[4][71][0].apply(D,arguments)},{dup:71}],178:[function(B,Q,D){"use strict";var N=B("./_library"),g=B("./_global"),w=B("./_ctx"),k=B("./_classof"),b=B("./_export"),m=B("./_is-object"),T=B("./_a-function"),_=B("./_an-instance"),t=B("./_for-of"),h=B("./_species-constructor"),r=B("./_task").set,c=B("./_microtask")(),i=B("./_new-promise-capability"),n=B("./_perform"),l=B("./_user-agent"),f=B("./_promise-resolve"),d="Promise",u=g.TypeError,o=g.process,s=o&&o.versions,E=s&&s.v8||"",v=g[d],p=k(o)=="process",I=function(){},R,y,x,C,S=y=i.f,F=!!function(){try{var L=v.resolve(1),K=(L.constructor={})[B("./_wks")("species")]=function(ee){ee(I,I)};return(p||typeof PromiseRejectionEvent=="function")&&L.then(I)instanceof K&&E.indexOf("6.6")!==0&&l.indexOf("Chrome/66")===-1}catch(ee){}}(),j=function(L){var K;return m(L)&&typeof(K=L.then)=="function"?K:!1},A=function(L,K){if(L._n)return;L._n=!0;var ee=L._c;c(function(){for(var oe=L._v,ae=L._s==1,be=0,_e=function(fe){var Re=ae?fe.ok:fe.fail,Ce=fe.resolve,ce=fe.reject,te=fe.domain,W,X,V;try{Re?(ae||(L._h==2&&O(L),L._h=1),Re===!0?W=oe:(te&&te.enter(),W=Re(oe),te&&(te.exit(),V=!0)),W===fe.promise?ce(u("Promise-chain cycle")):(X=j(W))?X.call(W,Ce,ce):Ce(W)):ce(oe)}catch(Z){te&&!V&&te.exit(),ce(Z)}};ee.length>be;)_e(ee[be++]);L._c=[],L._n=!1,K&&!L._h&&Y(L)})},Y=function(L){r.call(g,function(){var K=L._v,ee=z(L),oe,ae,be;if(ee&&(oe=n(function(){p?o.emit("unhandledRejection",K,L):(ae=g.onunhandledrejection)?ae({promise:L,reason:K}):(be=g.console)&&be.error&&be.error("Unhandled promise rejection",K)}),L._h=p||z(L)?2:1),L._a=void 0,ee&&oe.e)throw oe.v})},z=function(L){return L._h!==1&&(L._a||L._c).length===0},O=function(L){r.call(g,function(){var K;p?o.emit("rejectionHandled",L):(K=g.onrejectionhandled)&&K({promise:L,reason:L._v})})},H=function(L){var K=this;if(K._d)return;K._d=!0,K=K._w||K,K._v=L,K._s=2,K._a||(K._a=K._c.slice()),A(K,!0)},U=function(L){var K=this,ee;if(K._d)return;K._d=!0,K=K._w||K;try{if(K===L)throw u("Promise can't be resolved itself");(ee=j(L))?c(function(){var oe={_w:K,_d:!1};try{ee.call(L,w(U,oe,1),w(H,oe,1))}catch(ae){H.call(oe,ae)}}):(K._v=L,K._s=1,A(K,!1))}catch(oe){H.call({_w:K,_d:!1},oe)}};F||(v=function(K){_(this,v,d,"_h"),T(K),R.call(this);try{K(w(U,this,1),w(H,this,1))}catch(ee){H.call(this,ee)}},R=function(K){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},R.prototype=B("./_redefine-all")(v.prototype,{then:function(K,ee){var oe=S(h(this,v));return oe.ok=typeof K=="function"?K:!0,oe.fail=typeof ee=="function"&&ee,oe.domain=p?o.domain:void 0,this._c.push(oe),this._a&&this._a.push(oe),this._s&&A(this,!1),oe.promise},catch:function(L){return this.then(void 0,L)}}),x=function(){var L=new R;this.promise=L,this.resolve=w(U,L,1),this.reject=w(H,L,1)},i.f=S=function(L){return L===v||L===C?new x(L):y(L)}),b(b.G+b.W+b.F*!F,{Promise:v}),B("./_set-to-string-tag")(v,d),B("./_set-species")(d),C=B("./_core")[d],b(b.S+b.F*!F,d,{reject:function(K){var ee=S(this),oe=ee.reject;return oe(K),ee.promise}}),b(b.S+b.F*(N||!F),d,{resolve:function(K){return f(N&&this===C?v:this,K)}}),b(b.S+b.F*!(F&&B("./_iter-detect")(function(L){v.all(L).catch(I)})),d,{all:function(K){var ee=this,oe=S(ee),ae=oe.resolve,be=oe.reject,_e=n(function(){var fe=[],Re=0,Ce=1;t(K,!1,function(ce){var te=Re++,W=!1;fe.push(void 0),Ce++,ee.resolve(ce).then(function(X){if(W)return;W=!0,fe[te]=X,--Ce||ae(fe)},be)}),--Ce||ae(fe)});return _e.e&&be(_e.v),oe.promise},race:function(K){var ee=this,oe=S(ee),ae=oe.reject,be=n(function(){t(K,!1,function(_e){ee.resolve(_e).then(oe.resolve,ae)})});return be.e&&ae(be.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(B,Q,D){var N=B("./_export"),g=B("./_to-absolute-index"),w=String.fromCharCode,k=String.fromCodePoint;N(N.S+N.F*(!!k&&k.length!=1),"String",{fromCodePoint:function(m){for(var T=[],_=arguments.length,t=0,h;_>t;){if(h=+arguments[t++],g(h,1114111)!==h)throw RangeError(h+" is not a valid code point");T.push(h<65536?w(h):w(((h-=65536)>>10)+55296,h%1024+56320))}return T.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(B,Q,D){"use strict";var N=B("./_string-at")(!0);B("./_iter-define")(String,"String",function(g){this._t=String(g),this._i=0},function(){var g=this._t,w=this._i,k;return w>=g.length?{value:void 0,done:!0}:(k=N(g,w),this._i+=k.length,{value:k,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(B,Q,D){"use strict";var N=B("./_global"),g=B("./_has"),w=B("./_descriptors"),k=B("./_export"),b=B("./_redefine"),m=B("./_meta").KEY,T=B("./_fails"),_=B("./_shared"),t=B("./_set-to-string-tag"),h=B("./_uid"),r=B("./_wks"),c=B("./_wks-ext"),i=B("./_wks-define"),n=B("./_enum-keys"),l=B("./_is-array"),f=B("./_an-object"),d=B("./_is-object"),u=B("./_to-object"),o=B("./_to-iobject"),s=B("./_to-primitive"),E=B("./_property-desc"),v=B("./_object-create"),p=B("./_object-gopn-ext"),I=B("./_object-gopd"),R=B("./_object-gops"),y=B("./_object-dp"),x=B("./_object-keys"),C=I.f,S=y.f,F=p.f,j=N.Symbol,A=N.JSON,Y=A&&A.stringify,z="prototype",O=r("_hidden"),H=r("toPrimitive"),U={}.propertyIsEnumerable,L=_("symbol-registry"),K=_("symbols"),ee=_("op-symbols"),oe=Object[z],ae=typeof j=="function"&&!!R.f,be=N.QObject,_e=!be||!be[z]||!be[z].findChild,fe=w&&T(function(){return v(S({},"a",{get:function(){return S(this,"a",{value:7}).a}})).a!=7})?function(he,Se,Ue){var Xe=C(oe,Se);Xe&&delete oe[Se],S(he,Se,Ue),Xe&&he!==oe&&S(oe,Se,Xe)}:S,Re=function(he){var Se=K[he]=v(j[z]);return Se._k=he,Se},Ce=ae&&typeof j.iterator=="symbol"?function(he){return typeof he=="symbol"}:function(he){return he instanceof j},ce=function(Se,Ue,Xe){return Se===oe&&ce(ee,Ue,Xe),f(Se),Ue=s(Ue,!0),f(Xe),g(K,Ue)?(Xe.enumerable?(g(Se,O)&&Se[O][Ue]&&(Se[O][Ue]=!1),Xe=v(Xe,{enumerable:E(0,!1)})):(g(Se,O)||S(Se,O,E(1,{})),Se[O][Ue]=!0),fe(Se,Ue,Xe)):S(Se,Ue,Xe)},te=function(Se,Ue){f(Se);for(var Xe=n(Ue=o(Ue)),$e=0,Ye=Xe.length,et;Ye>$e;)ce(Se,et=Xe[$e++],Ue[et]);return Se},W=function(Se,Ue){return Ue===void 0?v(Se):te(v(Se),Ue)},X=function(Se){var Ue=U.call(this,Se=s(Se,!0));return this===oe&&g(K,Se)&&!g(ee,Se)?!1:Ue||!g(this,Se)||!g(K,Se)||g(this,O)&&this[O][Se]?Ue:!0},V=function(Se,Ue){if(Se=o(Se),Ue=s(Ue,!0),Se===oe&&g(K,Ue)&&!g(ee,Ue))return;var Xe=C(Se,Ue);return Xe&&g(K,Ue)&&!(g(Se,O)&&Se[O][Ue])&&(Xe.enumerable=!0),Xe},Z=function(Se){for(var Ue=F(o(Se)),Xe=[],$e=0,Ye;Ue.length>$e;)!g(K,Ye=Ue[$e++])&&Ye!=O&&Ye!=m&&Xe.push(Ye);return Xe},q=function(Se){for(var Ue=Se===oe,Xe=F(Ue?ee:o(Se)),$e=[],Ye=0,et;Xe.length>Ye;)g(K,et=Xe[Ye++])&&(Ue?g(oe,et):!0)&&$e.push(K[et]);return $e};ae||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var Se=h(arguments.length>0?arguments[0]:void 0),Ue=function(Xe){this===oe&&Ue.call(ee,Xe),g(this,O)&&g(this[O],Se)&&(this[O][Se]=!1),fe(this,Se,E(1,Xe))};return w&&_e&&fe(oe,Se,{configurable:!0,set:Ue}),Re(Se)},b(j[z],"toString",function(){return this._k}),I.f=V,y.f=ce,B("./_object-gopn").f=p.f=Z,B("./_object-pie").f=X,R.f=q,w&&!B("./_library")&&b(oe,"propertyIsEnumerable",X,!0),c.f=function(he){return Re(r(he))}),k(k.G+k.W+k.F*!ae,{Symbol:j});for(var ie="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;ie.length>ne;)r(ie[ne++]);for(var J=x(r.store),$=0;J.length>$;)i(J[$++]);k(k.S+k.F*!ae,"Symbol",{for:function(he){return g(L,he+="")?L[he]:L[he]=j(he)},keyFor:function(Se){if(!Ce(Se))throw TypeError(Se+" is not a symbol!");for(var Ue in L)if(L[Ue]===Se)return Ue},useSetter:function(){_e=!0},useSimple:function(){_e=!1}}),k(k.S+k.F*!ae,"Object",{create:W,defineProperty:ce,defineProperties:te,getOwnPropertyDescriptor:V,getOwnPropertyNames:Z,getOwnPropertySymbols:q});var le=T(function(){R.f(1)});k(k.S+k.F*le,"Object",{getOwnPropertySymbols:function(Se){return R.f(u(Se))}}),A&&k(k.S+k.F*(!ae||T(function(){var he=j();return Y([he])!="[null]"||Y({a:he})!="{}"||Y(Object(he))!="{}"})),"JSON",{stringify:function(Se){for(var Ue=[Se],Xe=1,$e,Ye;arguments.length>Xe;)Ue.push(arguments[Xe++]);return Ye=$e=Ue[1],!d($e)&&Se===void 0||Ce(Se)?void 0:(l($e)||($e=function(et,qe){if(typeof Ye=="function"&&(qe=Ye.call(this,et,qe)),!Ce(qe))return qe}),Ue[1]=$e,Y.apply(A,Ue))}}),j[z][H]||B("./_hide")(j[z],H,j[z].valueOf),t(j,"Symbol"),t(Math,"Math",!0),t(N.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(B,Q,D){var N=B("./_export"),g=B("./_object-to-array")(!0);N(N.S,"Object",{entries:function(k){return g(k)}})},{"./_export":107,"./_object-to-array":143}],183:[function(B,Q,D){"use strict";var N=B("./_export"),g=B("./_core"),w=B("./_global"),k=B("./_species-constructor"),b=B("./_promise-resolve");N(N.P+N.R,"Promise",{finally:function(m){var T=k(this,g.Promise||w.Promise),_=typeof m=="function";return this.then(_?function(t){return b(T,m()).then(function(){return t})}:m,_?function(t){return b(T,m()).then(function(){throw t})}:m)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(B,Q,D){"use strict";var N=B("./_export"),g=B("./_new-promise-capability"),w=B("./_perform");N(N.S,"Promise",{try:function(k){var b=g.f(this),m=w(k);return(m.e?b.reject:b.resolve)(m.v),b.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(B,Q,D){B("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(B,Q,D){B("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(B,Q,D){B("./es6.array.iterator");for(var N=B("./_global"),g=B("./_hide"),w=B("./_iterators"),k=B("./_wks")("toStringTag"),b="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<b.length;m++){var T=b[m],_=N[T],t=_&&_.prototype;t&&!t[k]&&g(t,k,T),w[T]=w.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(B,Q,D){var N=B("./_export"),g=B("./_task");N(N.G+N.B,{setImmediate:g.set,clearImmediate:g.clear})},{"./_export":107,"./_task":155}],189:[function(B,Q,D){(function(N){"use strict";var g=B("babel-runtime/helpers/typeof"),w=k(g);function k(s){return s&&s.__esModule?s:{default:s}}function b(s){return Array.isArray?Array.isArray(s):o(s)==="[object Array]"}D.isArray=b;function m(s){return typeof s=="boolean"}D.isBoolean=m;function T(s){return s===null}D.isNull=T;function _(s){return s==null}D.isNullOrUndefined=_;function t(s){return typeof s=="number"}D.isNumber=t;function h(s){return typeof s=="string"}D.isString=h;function r(s){return(typeof s=="undefined"?"undefined":(0,w.default)(s))==="symbol"}D.isSymbol=r;function c(s){return s===void 0}D.isUndefined=c;function i(s){return o(s)==="[object RegExp]"}D.isRegExp=i;function n(s){return(typeof s=="undefined"?"undefined":(0,w.default)(s))==="object"&&s!==null}D.isObject=n;function l(s){return o(s)==="[object Date]"}D.isDate=l;function f(s){return o(s)==="[object Error]"||s instanceof Error}D.isError=f;function d(s){return typeof s=="function"}D.isFunction=d;function u(s){return s===null||typeof s=="boolean"||typeof s=="number"||typeof s=="string"||(typeof s=="undefined"?"undefined":(0,w.default)(s))==="symbol"||typeof s=="undefined"}D.isPrimitive=u,D.isBuffer=N.isBuffer;function o(s){return Object.prototype.toString.call(s)}}).call(this,{isBuffer:B("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(B,Q,D){"use strict";var N=B("babel-runtime/helpers/typeof"),g=w(N);function w(k){return k&&k.__esModule?k:{default:k}}(function(k){"use strict";var b=function(){var h=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,r=/\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(i,n,l,f){if(arguments.length===1&&t(i)==="string"&&!/\d/.test(i)&&(n=i,i=void 0),i=i||new Date,i instanceof Date||(i=new Date(i)),isNaN(i))throw TypeError("Invalid date");n=String(b.masks[n]||n||b.masks.default);var d=n.slice(0,4);(d==="UTC:"||d==="GMT:")&&(n=n.slice(4),l=!0,d==="GMT:"&&(f=!0));var u=l?"getUTC":"get",o=i[u+"Date"](),s=i[u+"Day"](),E=i[u+"Month"](),v=i[u+"FullYear"](),p=i[u+"Hours"](),I=i[u+"Minutes"](),R=i[u+"Seconds"](),y=i[u+"Milliseconds"](),x=l?0:i.getTimezoneOffset(),C=T(i),S=_(i),F={d:o,dd:m(o),ddd:b.i18n.dayNames[s],dddd:b.i18n.dayNames[s+7],m:E+1,mm:m(E+1),mmm:b.i18n.monthNames[E],mmmm:b.i18n.monthNames[E+12],yy:String(v).slice(2),yyyy:v,h:p%12||12,hh:m(p%12||12),H:p,HH:m(p),M:I,MM:m(I),s:R,ss:m(R),l:m(y,3),L:m(Math.round(y/10)),t:p<12?"a":"p",tt:p<12?"am":"pm",T:p<12?"A":"P",TT:p<12?"AM":"PM",Z:f?"GMT":l?"UTC":(String(i).match(r)||[""]).pop().replace(c,""),o:(x>0?"-":"+")+m(Math.floor(Math.abs(x)/60)*100+Math.abs(x)%60,4),S:["th","st","nd","rd"][o%10>3?0:(o%100-o%10!=10)*o%10],W:C,N:S};return n.replace(h,function(j){return j in F?F[j]:j.slice(1,j.length-1)})}}();b.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"},b.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(h,r){for(h=String(h),r=r||2;h.length<r;)h="0"+h;return h}function T(h){var r=new Date(h.getFullYear(),h.getMonth(),h.getDate());r.setDate(r.getDate()-(r.getDay()+6)%7+3);var c=new Date(r.getFullYear(),0,4);c.setDate(c.getDate()-(c.getDay()+6)%7+3);var i=r.getTimezoneOffset()-c.getTimezoneOffset();r.setHours(r.getHours()-i);var n=(r-c)/(864e5*7);return 1+Math.floor(n)}function _(h){var r=h.getDay();return r===0&&(r=7),r}function t(h){return h===null?"null":h===void 0?"undefined":(typeof h=="undefined"?"undefined":(0,g.default)(h))!=="object"?typeof h=="undefined"?"undefined":(0,g.default)(h):Array.isArray(h)?"array":{}.toString.call(h).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return b}):(typeof D=="undefined"?"undefined":(0,g.default)(D))==="object"?Q.exports=b:k.dateFormat=b})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(B,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 N=/["'&<>]/;Q.exports=g;function g(w){var k=""+w,b=N.exec(k);if(!b)return k;var m,T="",_=0,t=0;for(_=b.index;_<k.length;_++){switch(k.charCodeAt(_)){case 34:m=""";break;case 38:m="&";break;case 39:m="'";break;case 60:m="<";break;case 62:m=">";break;default:continue}t!==_&&(T+=k.substring(t,_)),t=_+1,T+=m}return t!==_?T+k.substring(t,_):T}},{}],192:[function(B,Q,D){function N(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}Q.exports=N,N.EventEmitter=N,N.prototype._events=void 0,N.prototype._maxListeners=void 0,N.defaultMaxListeners=10,N.prototype.setMaxListeners=function(m){if(!w(m)||m<0||isNaN(m))throw TypeError("n must be a positive number");return this._maxListeners=m,this},N.prototype.emit=function(m){var T,_,t,h,r,c;if(this._events||(this._events={}),m==="error"&&(!this._events.error||k(this._events.error)&&!this._events.error.length)){if(T=arguments[1],T instanceof Error)throw T;var i=new Error('Uncaught, unspecified "error" event. ('+T+")");throw i.context=T,i}if(_=this._events[m],b(_))return!1;if(g(_))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:h=Array.prototype.slice.call(arguments,1),_.apply(this,h)}else if(k(_))for(h=Array.prototype.slice.call(arguments,1),c=_.slice(),t=c.length,r=0;r<t;r++)c[r].apply(this,h);return!0},N.prototype.addListener=function(m,T){var _;if(!g(T))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",m,g(T.listener)?T.listener:T),this._events[m]?k(this._events[m])?this._events[m].push(T):this._events[m]=[this._events[m],T]:this._events[m]=T,k(this._events[m])&&!this._events[m].warned&&(b(this._maxListeners)?_=N.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},N.prototype.on=N.prototype.addListener,N.prototype.once=function(m,T){if(!g(T))throw TypeError("listener must be a function");var _=!1;function t(){this.removeListener(m,t),_||(_=!0,T.apply(this,arguments))}return t.listener=T,this.on(m,t),this},N.prototype.removeListener=function(m,T){var _,t,h,r;if(!g(T))throw TypeError("listener must be a function");if(!this._events||!this._events[m])return this;if(_=this._events[m],h=_.length,t=-1,_===T||g(_.listener)&&_.listener===T)delete this._events[m],this._events.removeListener&&this.emit("removeListener",m,T);else if(k(_)){for(r=h;r-- >0;)if(_[r]===T||_[r].listener&&_[r].listener===T){t=r;break}if(t<0)return this;_.length===1?(_.length=0,delete this._events[m]):_.splice(t,1),this._events.removeListener&&this.emit("removeListener",m,T)}return this},N.prototype.removeAllListeners=function(m){var T,_;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(T in this._events){if(T==="removeListener")continue;this.removeAllListeners(T)}return this.removeAllListeners("removeListener"),this._events={},this}if(_=this._events[m],g(_))this.removeListener(m,_);else if(_)for(;_.length;)this.removeListener(m,_[_.length-1]);return delete this._events[m],this},N.prototype.listeners=function(m){var T;return!this._events||!this._events[m]?T=[]:g(this._events[m])?T=[this._events[m]]:T=this._events[m].slice(),T},N.prototype.listenerCount=function(m){if(this._events){var T=this._events[m];if(g(T))return 1;if(T)return T.length}return 0},N.listenerCount=function(m,T){return m.listenerCount(T)};function g(m){return typeof m=="function"}function w(m){return typeof m=="number"}function k(m){return typeof m=="object"&&m!==null}function b(m){return m===void 0}},{}],193:[function(B,Q,D){var N=B("http"),g=Q.exports;for(var w in N)N.hasOwnProperty(w)&&(g[w]=N[w]);g.request=function(k,b){return k||(k={}),k.scheme="https",k.protocol="https:",N.request.call(this,k,b)}},{http:231}],194:[function(B,Q,D){/*!
|
|
|
* humanize-ms - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var N=B("util"),g=B("ms");Q.exports=function(w){if(typeof w=="number")return w;var k=g(w);if(k===void 0){var b=new Error(N.format("humanize-ms(%j) result undefined",w));console.warn(b.stack)}return k}},{ms:204,util:243}],195:[function(B,Q,D){D.read=function(N,g,w,k,b){var m,T,_=b*8-k-1,t=(1<<_)-1,h=t>>1,r=-7,c=w?b-1:0,i=w?-1:1,n=N[g+c];for(c+=i,m=n&(1<<-r)-1,n>>=-r,r+=_;r>0;m=m*256+N[g+c],c+=i,r-=8);for(T=m&(1<<-r)-1,m>>=-r,r+=k;r>0;T=T*256+N[g+c],c+=i,r-=8);if(m===0)m=1-h;else{if(m===t)return T?NaN:(n?-1:1)*Infinity;T=T+Math.pow(2,k),m=m-h}return(n?-1:1)*T*Math.pow(2,m-k)},D.write=function(N,g,w,k,b,m){var T,_,t,h=m*8-b-1,r=(1<<h)-1,c=r>>1,i=b===23?Math.pow(2,-24)-Math.pow(2,-77):0,n=k?0:m-1,l=k?1:-1,f=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===Infinity?(_=isNaN(g)?1:0,T=r):(T=Math.floor(Math.log(g)/Math.LN2),g*(t=Math.pow(2,-T))<1&&(T--,t*=2),T+c>=1?g+=i/t:g+=i*Math.pow(2,1-c),g*t>=2&&(T++,t/=2),T+c>=r?(_=0,T=r):T+c>=1?(_=(g*t-1)*Math.pow(2,b),T=T+c):(_=g*Math.pow(2,c-1)*Math.pow(2,b),T=0));b>=8;N[w+n]=_&255,n+=l,_/=256,b-=8);for(T=T<<b|_,h+=b;h>0;N[w+n]=T&255,n+=l,T/=256,h-=8);N[w+n-l]|=f*128}},{}],196:[function(B,Q,D){typeof Object.create=="function"?Q.exports=function(g,w){w&&(g.super_=w,g.prototype=Object.create(w.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}))}:Q.exports=function(g,w){if(w){g.super_=w;var k=function(){};k.prototype=w.prototype,g.prototype=new k,g.prototype.constructor=g}}},{}],197:[function(B,Q,D){/*!
|
|
|
* Determine if an object is a Buffer
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
|
* @license MIT
|
|
|
*/Q.exports=function(w){return w!=null&&(N(w)||g(w)||!!w._isBuffer)};function N(w){return!!w.constructor&&typeof w.constructor.isBuffer=="function"&&w.constructor.isBuffer(w)}function g(w){return typeof w.readFloatLE=="function"&&typeof w.slice=="function"&&N(w.slice(0,0))}},{}],198:[function(B,Q,D){var N={}.toString;Q.exports=Array.isArray||function(g){return N.call(g)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(B,Q){typeof exports=="object"&&typeof module!="undefined"?module.exports=Q(B):typeof define=="function"&&define.amd?define(Q):Q(B)})(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(B){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(B){for(var Q={},D=0,N=B.length;D<N;D++)Q[B.charAt(D)]=D;return Q}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(B){if(B.length<2){var Q=B.charCodeAt(0);return Q<128?B: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+(B.charCodeAt(0)-55296)*1024+(B.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(B){return B.replace(re_utob,cb_utob)},cb_encode=function(B){var Q=[0,2,1][B.length%3],D=B.charCodeAt(0)<<16|(B.length>1?B.charCodeAt(1):0)<<8|(B.length>2?B.charCodeAt(2):0),N=[b64chars.charAt(D>>>18),b64chars.charAt(D>>>12&63),Q>=2?"=":b64chars.charAt(D>>>6&63),Q>=1?"=":b64chars.charAt(D&63)];return N.join("")},btoa=global.btoa?function(B){return global.btoa(B)}:function(B){return B.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(B){var Q=Object.prototype.toString.call(B)==="[object Uint8Array]";return Q?B.toString("base64"):btoa(utob(String(B)))},encode=function(B,Q){return Q?_encode(String(B)).replace(/[+\/]/g,function(D){return D=="+"?"-":"_"}).replace(/=/g,""):_encode(B)},encodeURI=function(B){return encode(B,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(B){switch(B.length){case 4:var Q=(7&B.charCodeAt(0))<<18|(63&B.charCodeAt(1))<<12|(63&B.charCodeAt(2))<<6|63&B.charCodeAt(3),D=Q-65536;return fromCharCode((D>>>10)+55296)+fromCharCode((D&1023)+56320);case 3:return fromCharCode((15&B.charCodeAt(0))<<12|(63&B.charCodeAt(1))<<6|63&B.charCodeAt(2));default:return fromCharCode((31&B.charCodeAt(0))<<6|63&B.charCodeAt(1))}},btou=function(B){return B.replace(re_btou,cb_btou)},cb_decode=function(B){var Q=B.length,D=Q%4,N=(Q>0?b64tab[B.charAt(0)]<<18:0)|(Q>1?b64tab[B.charAt(1)]<<12:0)|(Q>2?b64tab[B.charAt(2)]<<6:0)|(Q>3?b64tab[B.charAt(3)]:0),g=[fromCharCode(N>>>16),fromCharCode(N>>>8&255),fromCharCode(N&255)];return g.length-=[0,0,2,1][D],g.join("")},_atob=global.atob?function(B){return global.atob(B)}:function(B){return B.replace(/\S{1,4}/g,cb_decode)},atob=function(B){return _atob(String(B).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(B){return(B.constructor===buffer.constructor?B:buffer.from(B,"base64")).toString()}:function(B){return(B.constructor===buffer.constructor?B:new buffer(B,"base64")).toString()}:function(B){return btou(_atob(B))},decode=function(B){return _decode(String(B).replace(/[-_]/g,function(Q){return Q=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var B=global.Base64;return global.Base64=_Base64,B};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(B){return{value:B,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(B){return encode(this,B)})),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(B,Q,D){/*!
|
|
|
* merge-descriptors
|
|
|
* Copyright(c) 2014 Jonathan Ong
|
|
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
|
* MIT Licensed
|
|
|
*/"use strict";Q.exports=g;var N=Object.prototype.hasOwnProperty;function g(w,k,b){if(!w)throw new TypeError("argument dest is required");if(!k)throw new TypeError("argument src is required");return b===void 0&&(b=!0),Object.getOwnPropertyNames(k).forEach(function(T){if(!b&&N.call(w,T))return;var _=Object.getOwnPropertyDescriptor(k,T);Object.defineProperty(w,T,_)}),w}},{}],201:[function(B,Q,D){"use strict";function N(){this._types=Object.create(null),this._extensions=Object.create(null);for(var g=0;g<arguments.length;g++)this.define(arguments[g]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}N.prototype.define=function(g,w){for(var k in g){var b=g[k].map(function(_){return _.toLowerCase()});k=k.toLowerCase();for(var m=0;m<b.length;m++){var T=b[m];if(T[0]=="*")continue;if(!w&&T in this._types)throw new Error('Attempt to change mapping for "'+T+'" extension from "'+this._types[T]+'" to "'+k+'". Pass `force=true` to allow this, otherwise remove "'+T+'" from the list of extensions for "'+k+'".');this._types[T]=k}if(w||!this._extensions[k]){var T=b[0];this._extensions[k]=T[0]!="*"?T:T.substr(1)}}},N.prototype.getType=function(g){g=String(g);var w=g.replace(/^.*[/\\]/,"").toLowerCase(),k=w.replace(/^.*\./,"").toLowerCase(),b=w.length<g.length,m=k.length<w.length-1;return(m||!b)&&this._types[k]||null},N.prototype.getExtension=function(g){return g=/^\s*([^;\s]*)/.test(g)&&RegExp.$1,g&&this._extensions[g.toLowerCase()]||null},Q.exports=N},{}],202:[function(B,Q,D){"use strict";var N=B("./Mime");Q.exports=new N(B("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(B,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(B,Q,D){var N=1e3,g=N*60,w=g*60,k=w*24,b=k*7,m=k*365.25;Q.exports=function(r,c){c=c||{};var i=typeof r;if(i==="string"&&r.length>0)return T(r);if(i==="number"&&isFinite(r))return c.long?t(r):_(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function T(r){if(r=String(r),r.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(r);if(!c)return;var i=parseFloat(c[1]),n=(c[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return i*m;case"weeks":case"week":case"w":return i*b;case"days":case"day":case"d":return i*k;case"hours":case"hour":case"hrs":case"hr":case"h":return i*w;case"minutes":case"minute":case"mins":case"min":case"m":return i*g;case"seconds":case"second":case"secs":case"sec":case"s":return i*N;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}function _(r){var c=Math.abs(r);return c>=k?Math.round(r/k)+"d":c>=w?Math.round(r/w)+"h":c>=g?Math.round(r/g)+"m":c>=N?Math.round(r/N)+"s":r+"ms"}function t(r){var c=Math.abs(r);return c>=k?h(r,c,k,"day"):c>=w?h(r,c,w,"hour"):c>=g?h(r,c,g,"minute"):c>=N?h(r,c,N,"second"):r+" ms"}function h(r,c,i,n){var l=c>=i*1.5;return Math.round(r/i)+" "+n+(l?"s":"")}},{}],205:[function(B,Q,D){(function(N){function g(m,T){for(var _=0,t=m.length-1;t>=0;t--){var h=m[t];h==="."?m.splice(t,1):h===".."?(m.splice(t,1),_++):_&&(m.splice(t,1),_--)}if(T)for(;_--;_)m.unshift("..");return m}D.resolve=function(){for(var m="",T=!1,_=arguments.length-1;_>=-1&&!T;_--){var t=_>=0?arguments[_]:N.cwd();if(typeof t!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!t)continue;m=t+"/"+m,T=t.charAt(0)==="/"}return m=g(k(m.split("/"),function(h){return!!h}),!T).join("/"),(T?"/":"")+m||"."},D.normalize=function(m){var T=D.isAbsolute(m),_=b(m,-1)==="/";return m=g(k(m.split("/"),function(t){return!!t}),!T).join("/"),!m&&!T&&(m="."),m&&_&&(m+="/"),(T?"/":"")+m},D.isAbsolute=function(m){return m.charAt(0)==="/"},D.join=function(){var m=Array.prototype.slice.call(arguments,0);return D.normalize(k(m,function(T,_){if(typeof T!="string")throw new TypeError("Arguments to path.join must be strings");return T}).join("/"))},D.relative=function(m,T){m=D.resolve(m).substr(1),T=D.resolve(T).substr(1);function _(l){for(var f=0;f<l.length&&!(l[f]!=="");f++);for(var d=l.length-1;d>=0&&!(l[d]!=="");d--);return f>d?[]:l.slice(f,d-f+1)}for(var t=_(m.split("/")),h=_(T.split("/")),r=Math.min(t.length,h.length),c=r,i=0;i<r;i++)if(t[i]!==h[i]){c=i;break}for(var n=[],i=c;i<t.length;i++)n.push("..");return n=n.concat(h.slice(c)),n.join("/")},D.sep="/",D.delimiter=":",D.dirname=function(m){if(typeof m!="string"&&(m=m+""),m.length===0)return".";for(var T=m.charCodeAt(0),_=T===47,t=-1,h=!0,r=m.length-1;r>=1;--r)if(T=m.charCodeAt(r),T===47){if(!h){t=r;break}}else h=!1;return t===-1?_?"/":".":_&&t===1?"/":m.slice(0,t)};function w(m){typeof m!="string"&&(m=m+"");var T=0,_=-1,t=!0,h;for(h=m.length-1;h>=0;--h)if(m.charCodeAt(h)===47){if(!t){T=h+1;break}}else _===-1&&(t=!1,_=h+1);return _===-1?"":m.slice(T,_)}D.basename=function(m,T){var _=w(m);return T&&_.substr(-1*T.length)===T&&(_=_.substr(0,_.length-T.length)),_},D.extname=function(m){typeof m!="string"&&(m=m+"");for(var T=-1,_=0,t=-1,h=!0,r=0,c=m.length-1;c>=0;--c){var i=m.charCodeAt(c);if(i===47){if(!h){_=c+1;break}continue}t===-1&&(h=!1,t=c+1),i===46?T===-1?T=c:r!==1&&(r=1):T!==-1&&(r=-1)}return T===-1||t===-1||r===0||r===1&&T===t-1&&T===_+1?"":m.slice(T,t)};function k(m,T){if(m.filter)return m.filter(T);for(var _=[],t=0;t<m.length;t++)T(m[t],t,m)&&_.push(m[t]);return _}var b="ab".substr(-1)==="b"?function(m,T,_){return m.substr(T,_)}:function(m,T,_){return T<0&&(T=m.length+T),m.substr(T,_)}}).call(this,B("_process"))},{_process:208}],206:[function(B,Q,D){(function(N){/*!
|
|
|
* Platform.js <https://mths.be/platform>
|
|
|
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
|
|
|
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
|
|
|
* Available under MIT license <https://mths.be/mit>
|
|
|
*/(function(){"use strict";var g={function:!0,object:!0},w=g[typeof window]&&window||this,k=w,b=g[typeof D]&&D,m=g[typeof Q]&&Q&&!Q.nodeType&&Q,T=b&&m&&typeof N=="object"&&N;T&&(T.global===T||T.window===T||T.self===T)&&(w=T);var _=Math.pow(2,53)-1,t=/\bOpera/,h=this,r=Object.prototype,c=r.hasOwnProperty,i=r.toString;function n(y){return y=String(y),y.charAt(0).toUpperCase()+y.slice(1)}function l(y,x,C){var S={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return x&&C&&/^Win/i.test(y)&&!/^Windows Phone /i.test(y)&&(S=S[/[\d.]+$/.exec(y)])&&(y="Windows "+S),y=String(y),x&&C&&(y=y.replace(RegExp(x,"i"),C)),y=d(y.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]),y}function f(y,x){var C=-1,S=y?y.length:0;if(typeof S=="number"&&S>-1&&S<=_)for(;++C<S;)x(y[C],C,y);else u(y,x)}function d(y){return y=p(y),/^(?:webOS|i(?:OS|P))/.test(y)?y:n(y)}function u(y,x){for(var C in y)c.call(y,C)&&x(y[C],C,y)}function o(y){return y==null?n(y):i.call(y).slice(8,-1)}function s(y,x){var C=y!=null?typeof y[x]:"number";return!/^(?:boolean|number|string|undefined)$/.test(C)&&(C=="object"?!!y[x]:!0)}function E(y){return String(y).replace(/([ -])(?!$)/g,"$1?")}function v(y,x){var C=null;return f(y,function(S,F){C=x(C,S,F,y)}),C}function p(y){return String(y).replace(/^ +| +$/g,"")}function I(y){var x=w,C=y&&typeof y=="object"&&o(y)!="String";C&&(x=y,y=null);var S=x.navigator||{},F=S.userAgent||"";y||(y=F);var j=C||h==k,A=C?!!S.likeChrome:/\bChrome\b/.test(y)&&!/internal|\n/i.test(i.toString()),Y="Object",z=C?Y:"ScriptBridgingProxyObject",O=C?Y:"Environment",H=C&&x.java?"JavaPackage":o(x.java),U=C?Y:"RuntimeObject",L=/\bJava/.test(H)&&x.java,K=L&&o(x.environment)==O,ee=L?"a":"\u03B1",oe=L?"b":"\u03B2",ae=x.document||{},be=x.operamini||x.opera,_e=t.test(_e=C&&be?be["[[Class]]"]:o(be))?_e:be=null,fe,Re=y,Ce=[],ce=null,te=y==F,W=te&&be&&typeof be.version=="function"&&be.version(),X,V=J([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Z=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"]),q=Se([{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=$({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}}),ne=he(["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 J(Ye){return v(Ye,function(et,qe){return et||RegExp("\\b"+(qe.pattern||E(qe))+"\\b","i").exec(y)&&(qe.label||qe)})}function $(Ye){return v(Ye,function(et,qe,Pe){return et||(qe[q]||qe[/^[a-z]+(?: +[a-z]+\b)*/i.exec(q)]||RegExp("\\b"+E(Pe)+"(?:\\b|\\w*\\d)","i").exec(y))&&Pe})}function le(Ye){return v(Ye,function(et,qe){return et||RegExp("\\b"+(qe.pattern||E(qe))+"\\b","i").exec(y)&&(qe.label||qe)})}function he(Ye){return v(Ye,function(et,qe){var Pe=qe.pattern||E(qe);return!et&&(et=RegExp("\\b"+Pe+"(?:/[\\d.]+|[ \\w.]*)","i").exec(y))&&(et=l(et,Pe,qe.label||qe)),et})}function Se(Ye){return v(Ye,function(et,qe){var Pe=qe.pattern||E(qe);return!et&&(et=RegExp("\\b"+Pe+" *\\d+[.\\w_]*","i").exec(y)||RegExp("\\b"+Pe+" *\\w+-[\\w]*","i").exec(y)||RegExp("\\b"+Pe+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(y))&&((et=String(qe.label&&!RegExp(Pe,"i").test(qe.label)?qe.label:et).split("/"))[1]&&!/[\d.]+/.test(et[0])&&(et[0]+=" "+et[1]),qe=qe.label||qe,et=d(et[0].replace(RegExp(Pe,"i"),qe).replace(RegExp("; *(?:"+qe+"[_-])?","i")," ").replace(RegExp("("+qe+")[-_.]?(\\w)","i"),"$1 $2"))),et})}function Ue(Ye){return v(Ye,function(et,qe){return et||(RegExp(qe+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(y)||0)[1]||null})}function Xe(){return this.description||""}if(V&&(V=[V]),ie&&!q&&(q=Se([ie])),(fe=/\bGoogle TV\b/.exec(q))&&(q=fe[0]),/\bSimulator\b/i.test(y)&&(q=(q?q+" ":"")+"Simulator"),Z=="Opera Mini"&&/\bOPiOS\b/.test(y)&&Ce.push("running in Turbo/Uncompressed mode"),Z=="IE"&&/\blike iPhone OS\b/.test(y)?(fe=I(y.replace(/like iPhone OS/,"")),ie=fe.manufacturer,q=fe.product):/^iP/.test(q)?(Z||(Z="Safari"),ne="iOS"+((fe=/ OS ([\d_]+)/i.exec(y))?" "+fe[1].replace(/_/g,"."):"")):Z=="Konqueror"&&!/buntu/i.test(ne)?ne="Kubuntu":ie&&ie!="Google"&&(/Chrome/.test(Z)&&!/\bMobile Safari\b/i.test(y)||/\bVita\b/.test(q))||/\bAndroid\b/.test(ne)&&/^Chrome/.test(Z)&&/\bVersion\//i.test(y)?(Z="Android Browser",ne=/\bAndroid\b/.test(ne)?ne:"Android"):Z=="Silk"?(/\bMobi/i.test(y)||(ne="Android",Ce.unshift("desktop mode")),/Accelerated *= *true/i.test(y)&&Ce.unshift("accelerated")):Z=="PaleMoon"&&(fe=/\bFirefox\/([\d.]+)\b/.exec(y))?Ce.push("identifying as Firefox "+fe[1]):Z=="Firefox"&&(fe=/\b(Mobile|Tablet|TV)\b/i.exec(y))?(ne||(ne="Firefox OS"),q||(q=fe[1])):!Z||(fe=!/\bMinefield\b/i.test(y)&&/\b(?:Firefox|Safari)\b/.exec(Z))?(Z&&!q&&/[\/,]|^[^(]+?\)/.test(y.slice(y.indexOf(fe+"/")+8))&&(Z=null),(fe=q||ie||ne)&&(q||ie||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(ne))&&(Z=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(ne)?ne:fe)+" Browser")):Z=="Electron"&&(fe=(/\bChrome\/([\d.]+)\b/.exec(y)||0)[1])&&Ce.push("Chromium "+fe),W||(W=Ue(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",E(Z),"(?:Firefox|Minefield|NetFront)"])),(fe=V=="iCab"&&parseFloat(W)>3&&"WebKit"||/\bOpera\b/.test(Z)&&(/\bOPR\b/.test(y)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(y)&&!/^(?:Trident|EdgeHTML)$/.test(V)&&"WebKit"||!V&&/\bMSIE\b/i.test(y)&&(ne=="Mac OS"?"Tasman":"Trident")||V=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Z)&&"NetFront")&&(V=[fe]),Z=="IE"&&(fe=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(y)||0)[1])?(Z+=" Mobile",ne="Windows Phone "+(/\+$/.test(fe)?fe:fe+".x"),Ce.unshift("desktop mode")):/\bWPDesktop\b/i.test(y)?(Z="IE Mobile",ne="Windows Phone 8.x",Ce.unshift("desktop mode"),W||(W=(/\brv:([\d.]+)/.exec(y)||0)[1])):Z!="IE"&&V=="Trident"&&(fe=/\brv:([\d.]+)/.exec(y))&&(Z&&Ce.push("identifying as "+Z+(W?" "+W:"")),Z="IE",W=fe[1]),te){if(s(x,"global"))if(L&&(fe=L.lang.System,Re=fe.getProperty("os.arch"),ne=ne||fe.getProperty("os.name")+" "+fe.getProperty("os.version")),K){try{W=x.require("ringo/engine").version.join("."),Z="RingoJS"}catch(Ye){(fe=x.system)&&fe.global.system==x.system&&(Z="Narwhal",ne||(ne=fe[0].os||null))}Z||(Z="Rhino")}else typeof x.process=="object"&&!x.process.browser&&(fe=x.process)&&(typeof fe.versions=="object"&&(typeof fe.versions.electron=="string"?(Ce.push("Node "+fe.versions.node),Z="Electron",W=fe.versions.electron):typeof fe.versions.nw=="string"&&(Ce.push("Chromium "+W,"Node "+fe.versions.node),Z="NW.js",W=fe.versions.nw)),Z||(Z="Node.js",Re=fe.arch,ne=fe.platform,W=/[\d.]+/.exec(fe.version),W=W?W[0]:null));else o(fe=x.runtime)==z?(Z="Adobe AIR",ne=fe.flash.system.Capabilities.os):o(fe=x.phantom)==U?(Z="PhantomJS",W=(fe=fe.version||null)&&fe.major+"."+fe.minor+"."+fe.patch):typeof ae.documentMode=="number"&&(fe=/\bTrident\/(\d+)/i.exec(y))?(W=[W,ae.documentMode],(fe=+fe[1]+4)!=W[1]&&(Ce.push("IE "+W[1]+" mode"),V&&(V[1]=""),W[1]=fe),W=Z=="IE"?String(W[1].toFixed(1)):W[0]):typeof ae.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Z)&&(Ce.push("masking as "+Z+" "+W),Z="IE",W="11.0",V=["Trident"],ne="Windows");ne=ne&&d(ne)}if(W&&(fe=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(W)||/(?:alpha|beta)(?: ?\d)?/i.exec(y+";"+(te&&S.appMinorVersion))||/\bMinefield\b/i.test(y)&&"a")&&(ce=/b/i.test(fe)?"beta":"alpha",W=W.replace(RegExp(fe+"\\+?$"),"")+(ce=="beta"?oe:ee)+(/\d+\+?/.exec(fe)||"")),Z=="Fennec"||Z=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(ne))Z="Firefox Mobile";else if(Z=="Maxthon"&&W)W=W.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(q))q=="Xbox 360"&&(ne=null),q=="Xbox 360"&&/\bIEMobile\b/.test(y)&&Ce.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Z)||Z&&!q&&!/Browser|Mobi/.test(Z))&&(ne=="Windows CE"||/Mobi/i.test(y)))Z+=" Mobile";else if(Z=="IE"&&te)try{x.external===null&&Ce.unshift("platform preview")}catch(Ye){Ce.unshift("embedded")}else(/\bBlackBerry\b/.test(q)||/\bBB10\b/.test(y))&&(fe=(RegExp(q.replace(/ +/g," *")+"/([.\\d]+)","i").exec(y)||0)[1]||W)?(fe=[fe,/BB10/.test(y)],ne=(fe[1]?(q=null,ie="BlackBerry"):"Device Software")+" "+fe[0],W=null):this!=u&&q!="Wii"&&(te&&be||/Opera/.test(Z)&&/\b(?:MSIE|Firefox)\b/i.test(y)||Z=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(ne)||Z=="IE"&&(ne&&!/^Win/.test(ne)&&W>5.5||/\bWindows XP\b/.test(ne)&&W>8||W==8&&!/\bTrident\b/.test(y)))&&!t.test(fe=I.call(u,y.replace(t,"")+";"))&&fe.name&&(fe="ing as "+fe.name+((fe=fe.version)?" "+fe:""),t.test(Z)?(/\bIE\b/.test(fe)&&ne=="Mac OS"&&(ne=null),fe="identify"+fe):(fe="mask"+fe,_e?Z=d(_e.replace(/([a-z])([A-Z])/g,"$1 $2")):Z="Opera",/\bIE\b/.test(fe)&&(ne=null),te||(W=null)),V=["Presto"],Ce.push(fe));(fe=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(y)||0)[1])&&(fe=[parseFloat(fe.replace(/\.(\d)$/,".0$1")),fe],Z=="Safari"&&fe[1].slice(-1)=="+"?(Z="WebKit Nightly",ce="alpha",W=fe[1].slice(0,-1)):(W==fe[1]||W==(fe[2]=(/\bSafari\/([\d.]+\+?)/i.exec(y)||0)[1]))&&(W=null),fe[1]=(/\bChrome\/([\d.]+)/i.exec(y)||0)[1],fe[0]==537.36&&fe[2]==537.36&&parseFloat(fe[1])>=28&&V=="WebKit"&&(V=["Blink"]),!te||!A&&!fe[1]?(V&&(V[1]="like Safari"),fe=(fe=fe[0],fe<400?1:fe<500?2:fe<526?3:fe<533?4:fe<534?"4+":fe<535?5:fe<537?6:fe<538?7:fe<601?8:"8")):(V&&(V[1]="like Chrome"),fe=fe[1]||(fe=fe[0],fe<530?1:fe<532?2:fe<532.05?3:fe<533?4:fe<534.03?5:fe<534.07?6:fe<534.1?7:fe<534.13?8:fe<534.16?9:fe<534.24?10:fe<534.3?11:fe<535.01?12:fe<535.02?"13+":fe<535.07?15:fe<535.11?16:fe<535.19?17:fe<536.05?18:fe<536.1?19:fe<537.01?20:fe<537.11?"21+":fe<537.13?23:fe<537.18?24:fe<537.24?25:fe<537.36?26:V!="Blink"?"27":"28")),V&&(V[1]+=" "+(fe+=typeof fe=="number"?".x":/[.+]/.test(fe)?"":"+")),Z=="Safari"&&(!W||parseInt(W)>45)&&(W=fe)),Z=="Opera"&&(fe=/\bzbov|zvav$/.exec(ne))?(Z+=" ",Ce.unshift("desktop mode"),fe=="zvav"?(Z+="Mini",W=null):Z+="Mobile",ne=ne.replace(RegExp(" *"+fe+"$"),"")):Z=="Safari"&&/\bChrome\b/.exec(V&&V[1])&&(Ce.unshift("desktop mode"),Z="Chrome Mobile",W=null,/\bOS X\b/.test(ne)?(ie="Apple",ne="iOS 4.3+"):ne=null),W&&W.indexOf(fe=/[\d.]+$/.exec(ne))==0&&y.indexOf("/"+fe+"-")>-1&&(ne=p(ne.replace(fe,""))),V&&!/\b(?:Avant|Nook)\b/.test(Z)&&(/Browser|Lunascape|Maxthon/.test(Z)||Z!="Safari"&&/^iOS/.test(ne)&&/\bSafari\b/.test(V[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Z)&&V[1])&&((fe=V[V.length-1])&&Ce.push(fe)),Ce.length&&(Ce=["("+Ce.join("; ")+")"]),ie&&q&&q.indexOf(ie)<0&&Ce.push("on "+ie),q&&Ce.push((/^on /.test(Ce[Ce.length-1])?"":"on ")+q),ne&&(fe=/ ([\d.+]+)$/.exec(ne),X=fe&&ne.charAt(ne.length-fe[0].length-1)=="/",ne={architecture:32,family:fe&&!X?ne.replace(fe[0],""):ne,version:fe?fe[1]:null,toString:function(){var Ye=this.version;return this.family+(Ye&&!X?" "+Ye:"")+(this.architecture==64?" 64-bit":"")}}),(fe=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Re))&&!/\bi686\b/i.test(Re)?(ne&&(ne.architecture=64,ne.family=ne.family.replace(RegExp(" *"+fe),"")),Z&&(/\bWOW64\b/i.test(y)||te&&/\w(?:86|32)$/.test(S.cpuClass||S.platform)&&!/\bWin64; x64\b/i.test(y))&&Ce.unshift("32-bit")):ne&&/^OS X/.test(ne.family)&&Z=="Chrome"&&parseFloat(W)>=39&&(ne.architecture=64),y||(y=null);var $e={};return $e.description=y,$e.layout=V&&V[0],$e.manufacturer=ie,$e.name=Z,$e.prerelease=ce,$e.product=q,$e.ua=y,$e.version=Z&&W,$e.os=ne||{architecture:null,family:null,version:null,toString:function(){return"null"}},$e.parse=I,$e.toString=Xe,$e.version&&Ce.unshift(W),$e.name&&Ce.unshift(Z),ne&&Z&&!(ne==String(ne).split(" ")[0]&&(ne==Z.split(" ")[0]||q))&&Ce.push(q?"("+ne+")":"on "+ne),Ce.length&&($e.description=Ce.join(" ")),$e}var R=I();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(w.platform=R,define(function(){return R})):b&&m?u(R,function(y,x){b[x]=y}):w.platform=R}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(B,Q,D){(function(N){"use strict";typeof N=="undefined"||!N.version||N.version.indexOf("v0.")===0||N.version.indexOf("v1.")===0&&N.version.indexOf("v1.8.")!==0?Q.exports={nextTick:g}:Q.exports=N;function g(w,k,b,m){if(typeof w!="function")throw new TypeError('"callback" argument must be a function');var T=arguments.length,_,t;switch(T){case 0:case 1:return N.nextTick(w);case 2:return N.nextTick(function(){w.call(null,k)});case 3:return N.nextTick(function(){w.call(null,k,b)});case 4:return N.nextTick(function(){w.call(null,k,b,m)});default:for(_=new Array(T-1),t=0;t<_.length;)_[t++]=arguments[t];return N.nextTick(function(){w.apply(null,_)})}}}).call(this,B("_process"))},{_process:208}],208:[function(B,Q,D){var N=Q.exports={},g,w;function k(){throw new Error("setTimeout has not been defined")}function b(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?g=setTimeout:g=k}catch(f){g=k}try{typeof clearTimeout=="function"?w=clearTimeout:w=b}catch(f){w=b}})();function m(f){if(g===setTimeout)return setTimeout(f,0);if((g===k||!g)&&setTimeout)return g=setTimeout,setTimeout(f,0);try{return g(f,0)}catch(d){try{return g.call(null,f,0)}catch(u){return g.call(this,f,0)}}}function T(f){if(w===clearTimeout)return clearTimeout(f);if((w===b||!w)&&clearTimeout)return w=clearTimeout,clearTimeout(f);try{return w(f)}catch(d){try{return w.call(null,f)}catch(u){return w.call(this,f)}}}var _=[],t=!1,h,r=-1;function c(){if(!t||!h)return;t=!1,h.length?_=h.concat(_):r=-1,_.length&&i()}function i(){if(t)return;var f=m(c);t=!0;for(var d=_.length;d;){for(h=_,_=[];++r<d;)h&&h[r].run();r=-1,d=_.length}h=null,t=!1,T(f)}N.nextTick=function(f){var d=new Array(arguments.length-1);if(arguments.length>1)for(var u=1;u<arguments.length;u++)d[u-1]=arguments[u];_.push(new n(f,d)),_.length===1&&!t&&m(i)};function n(f,d){this.fun=f,this.array=d}n.prototype.run=function(){this.fun.apply(null,this.array)},N.title="browser",N.browser=!0,N.env={},N.argv=[],N.version="",N.versions={};function l(){}N.on=l,N.addListener=l,N.once=l,N.off=l,N.removeListener=l,N.removeAllListeners=l,N.emit=l,N.prependListener=l,N.prependOnceListener=l,N.listeners=function(f){return[]},N.binding=function(f){throw new Error("process.binding is not supported")},N.cwd=function(){return"/"},N.chdir=function(f){throw new Error("process.chdir is not supported")},N.umask=function(){return 0}},{}],209:[function(B,Q,D){(function(N){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(g){var w=typeof D=="object"&&D&&!D.nodeType&&D,k=typeof Q=="object"&&Q&&!Q.nodeType&&Q,b=typeof N=="object"&&N;(b.global===b||b.window===b||b.self===b)&&(g=b);var m,T=2147483647,_=36,t=1,h=26,r=38,c=700,i=72,n=128,l="-",f=/^xn--/,d=/[^\x20-\x7E]/,u=/[\x2E\u3002\uFF0E\uFF61]/g,o={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},s=_-t,E=Math.floor,v=String.fromCharCode,p;function I(H){throw new RangeError(o[H])}function R(H,U){for(var L=H.length,K=[];L--;)K[L]=U(H[L]);return K}function y(H,U){var L=H.split("@"),K="";L.length>1&&(K=L[0]+"@",H=L[1]),H=H.replace(u,".");var ee=H.split("."),oe=R(ee,U).join(".");return K+oe}function x(H){for(var U=[],L=0,K=H.length,ee,oe;L<K;)ee=H.charCodeAt(L++),ee>=55296&&ee<=56319&&L<K?(oe=H.charCodeAt(L++),(oe&64512)==56320?U.push(((ee&1023)<<10)+(oe&1023)+65536):(U.push(ee),L--)):U.push(ee);return U}function C(H){return R(H,function(U){var L="";return U>65535&&(U-=65536,L+=v(U>>>10&1023|55296),U=56320|U&1023),L+=v(U),L}).join("")}function S(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 j(H,U,L){var K=0;for(H=L?E(H/c):H>>1,H+=E(H/U);H>s*h>>1;K+=_)H=E(H/s);return E(K+(s+1)*H/(H+r))}function A(H){var U=[],L=H.length,K,ee=0,oe=n,ae=i,be,_e,fe,Re,Ce,ce,te,W,X;for(be=H.lastIndexOf(l),be<0&&(be=0),_e=0;_e<be;++_e)H.charCodeAt(_e)>=128&&I("not-basic"),U.push(H.charCodeAt(_e));for(fe=be>0?be+1:0;fe<L;){for(Re=ee,Ce=1,ce=_;!(fe>=L&&I("invalid-input"),te=S(H.charCodeAt(fe++)),(te>=_||te>E((T-ee)/Ce))&&I("overflow"),ee+=te*Ce,W=ce<=ae?t:ce>=ae+h?h:ce-ae,te<W);ce+=_)X=_-W,Ce>E(T/X)&&I("overflow"),Ce*=X;K=U.length+1,ae=j(ee-Re,K,Re==0),E(ee/K)>T-oe&&I("overflow"),oe+=E(ee/K),ee%=K,U.splice(ee++,0,oe)}return C(U)}function Y(H){var U,L,K,ee,oe,ae,be,_e,fe,Re,Ce,ce=[],te,W,X,V;for(H=x(H),te=H.length,U=n,L=0,oe=i,ae=0;ae<te;++ae)Ce=H[ae],Ce<128&&ce.push(v(Ce));for(K=ee=ce.length,ee&&ce.push(l);K<te;){for(be=T,ae=0;ae<te;++ae)Ce=H[ae],Ce>=U&&Ce<be&&(be=Ce);for(W=K+1,be-U>E((T-L)/W)&&I("overflow"),L+=(be-U)*W,U=be,ae=0;ae<te;++ae)if(Ce=H[ae],Ce<U&&++L>T&&I("overflow"),Ce==U){for(_e=L,fe=_;!(Re=fe<=oe?t:fe>=oe+h?h:fe-oe,_e<Re);fe+=_)V=_e-Re,X=_-Re,ce.push(v(F(Re+V%X,0))),_e=E(V/X);ce.push(v(F(_e,0))),oe=j(L,W,K==ee),L=0,++K}++L,++U}return ce.join("")}function z(H){return y(H,function(U){return f.test(U)?A(U.slice(4).toLowerCase()):U})}function O(H){return y(H,function(U){return d.test(U)?"xn--"+Y(U):U})}if(m={version:"1.4.1",ucs2:{decode:x,encode:C},decode:A,encode:Y,toASCII:O,toUnicode:z},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return m});else if(w&&k)if(Q.exports==w)k.exports=m;else for(p in m)m.hasOwnProperty(p)&&(w[p]=m[p]);else g.punycode=m})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(B,Q,D){"use strict";function N(w,k){return Object.prototype.hasOwnProperty.call(w,k)}Q.exports=function(w,k,b,m){k=k||"&",b=b||"=";var T={};if(typeof w!="string"||w.length===0)return T;var _=/\+/g;w=w.split(k);var t=1e3;m&&typeof m.maxKeys=="number"&&(t=m.maxKeys);var h=w.length;t>0&&h>t&&(h=t);for(var r=0;r<h;++r){var c=w[r].replace(_,"%20"),i=c.indexOf(b),n,l,f,d;i>=0?(n=c.substr(0,i),l=c.substr(i+1)):(n=c,l=""),f=decodeURIComponent(n),d=decodeURIComponent(l),N(T,f)?g(T[f])?T[f].push(d):T[f]=[T[f],d]:T[f]=d}return T};var g=Array.isArray||function(w){return Object.prototype.toString.call(w)==="[object Array]"}},{}],211:[function(B,Q,D){"use strict";var N=function(b){switch(typeof b){case"string":return b;case"boolean":return b?"true":"false";case"number":return isFinite(b)?b:"";default:return""}};Q.exports=function(b,m,T,_){return m=m||"&",T=T||"=",b===null&&(b=void 0),typeof b=="object"?w(k(b),function(t){var h=encodeURIComponent(N(t))+T;return g(b[t])?w(b[t],function(r){return h+encodeURIComponent(N(r))}).join(m):h+encodeURIComponent(N(b[t]))}).join(m):_?encodeURIComponent(N(_))+T+encodeURIComponent(N(b)):""};var g=Array.isArray||function(b){return Object.prototype.toString.call(b)==="[object Array]"};function w(b,m){if(b.map)return b.map(m);for(var T=[],_=0;_<b.length;_++)T.push(m(b[_],_));return T}var k=Object.keys||function(b){var m=[];for(var T in b)Object.prototype.hasOwnProperty.call(b,T)&&m.push(T);return m}},{}],212:[function(B,Q,D){"use strict";D.decode=D.parse=B("./decode"),D.encode=D.stringify=B("./encode")},{"./decode":210,"./encode":211}],213:[function(B,Q,D){Q.exports=B("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/create"),g=b(N),w=B("babel-runtime/core-js/object/keys"),k=b(w);function b(d){return d&&d.__esModule?d:{default:d}}var m=B("process-nextick-args"),T=k.default||function(d){var u=[];for(var o in d)u.push(o);return u};Q.exports=n;var _=(0,g.default)(B("core-util-is"));_.inherits=B("inherits");var t=B("./_stream_readable"),h=B("./_stream_writable");_.inherits(n,t);for(var r=T(h.prototype),c=0;c<r.length;c++){var i=r[c];n.prototype[i]||(n.prototype[i]=h.prototype[i])}function n(d){if(!(this instanceof n))return new n(d);t.call(this,d),h.call(this,d),d&&d.readable===!1&&(this.readable=!1),d&&d.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,d&&d.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",l)}Object.defineProperty(n.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function l(){if(this.allowHalfOpen||this._writableState.ended)return;m.nextTick(f,this)}function f(d){d.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(u){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=u,this._writableState.destroyed=u}}),n.prototype._destroy=function(d,u){this.push(null),this.end(),m.nextTick(u,d)}},{"./_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(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/create"),g=w(N);function w(T){return T&&T.__esModule?T:{default:T}}Q.exports=m;var k=B("./_stream_transform"),b=(0,g.default)(B("core-util-is"));b.inherits=B("inherits"),b.inherits(m,k);function m(T){if(!(this instanceof m))return new m(T);k.call(this,T)}m.prototype._transform=function(T,_,t){t(null,T)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(B,Q,D){(function(N,g){"use strict";var w=B("babel-runtime/core-js/object/get-prototype-of"),k=T(w),b=B("babel-runtime/core-js/object/create"),m=T(b);function T(V){return V&&V.__esModule?V:{default:V}}var _=B("process-nextick-args");Q.exports=x;var t=B("isarray"),h;x.ReadableState=y;var r=B("events").EventEmitter,c=function(Z,q){return Z.listeners(q).length},i=B("./internal/streams/stream"),n=B("safe-buffer").Buffer,l=g.Uint8Array||function(){};function f(V){return n.from(V)}function d(V){return n.isBuffer(V)||V instanceof l}var u=(0,m.default)(B("core-util-is"));u.inherits=B("inherits");var o=B("util"),s=void 0;o&&o.debuglog?s=o.debuglog("stream"):s=function(){};var E=B("./internal/streams/BufferList"),v=B("./internal/streams/destroy"),p;u.inherits(x,i);var I=["error","close","destroy","pause","resume"];function R(V,Z,q){if(typeof V.prependListener=="function")return V.prependListener(Z,q);!V._events||!V._events[Z]?V.on(Z,q):t(V._events[Z])?V._events[Z].unshift(q):V._events[Z]=[q,V._events[Z]]}function y(V,Z){h=h||B("./_stream_duplex"),V=V||{};var q=Z instanceof h;this.objectMode=!!V.objectMode,q&&(this.objectMode=this.objectMode||!!V.readableObjectMode);var ie=V.highWaterMark,ne=V.readableHighWaterMark,J=this.objectMode?16:16*1024;ie||ie===0?this.highWaterMark=ie:q&&(ne||ne===0)?this.highWaterMark=ne:this.highWaterMark=J,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new E,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=V.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,V.encoding&&(p||(p=B("string_decoder/").StringDecoder),this.decoder=new p(V.encoding),this.encoding=V.encoding)}function x(V){if(h=h||B("./_stream_duplex"),!(this instanceof x))return new x(V);this._readableState=new y(V,this),this.readable=!0,V&&(typeof V.read=="function"&&(this._read=V.read),typeof V.destroy=="function"&&(this._destroy=V.destroy)),i.call(this)}Object.defineProperty(x.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Z){if(!this._readableState)return;this._readableState.destroyed=Z}}),x.prototype.destroy=v.destroy,x.prototype._undestroy=v.undestroy,x.prototype._destroy=function(V,Z){this.push(null),Z(V)},x.prototype.push=function(V,Z){var q=this._readableState,ie;return q.objectMode?ie=!0:typeof V=="string"&&(Z=Z||q.defaultEncoding,Z!==q.encoding&&(V=n.from(V,Z),Z=""),ie=!0),C(this,V,Z,!1,ie)},x.prototype.unshift=function(V){return C(this,V,null,!0,!1)};function C(V,Z,q,ie,ne){var J=V._readableState;if(Z===null)J.reading=!1,O(V,J);else{var $;ne||($=F(J,Z)),$?V.emit("error",$):J.objectMode||Z&&Z.length>0?(typeof Z!="string"&&!J.objectMode&&(0,k.default)(Z)!==n.prototype&&(Z=f(Z)),ie?J.endEmitted?V.emit("error",new Error("stream.unshift() after end event")):S(V,J,Z,!0):J.ended?V.emit("error",new Error("stream.push() after EOF")):(J.reading=!1,J.decoder&&!q?(Z=J.decoder.write(Z),J.objectMode||Z.length!==0?S(V,J,Z,!1):L(V,J)):S(V,J,Z,!1))):ie||(J.reading=!1)}return j(J)}function S(V,Z,q,ie){Z.flowing&&Z.length===0&&!Z.sync?(V.emit("data",q),V.read(0)):(Z.length+=Z.objectMode?1:q.length,ie?Z.buffer.unshift(q):Z.buffer.push(q),Z.needReadable&&H(V)),L(V,Z)}function F(V,Z){var q;return!d(Z)&&typeof Z!="string"&&Z!==void 0&&!V.objectMode&&(q=new TypeError("Invalid non-string/buffer chunk")),q}function j(V){return!V.ended&&(V.needReadable||V.length<V.highWaterMark||V.length===0)}x.prototype.isPaused=function(){return this._readableState.flowing===!1},x.prototype.setEncoding=function(V){return p||(p=B("string_decoder/").StringDecoder),this._readableState.decoder=new p(V),this._readableState.encoding=V,this};var A=8388608;function Y(V){return V>=A?V=A:(V--,V|=V>>>1,V|=V>>>2,V|=V>>>4,V|=V>>>8,V|=V>>>16,V++),V}function z(V,Z){return V<=0||Z.length===0&&Z.ended?0:Z.objectMode?1:V!==V?Z.flowing&&Z.length?Z.buffer.head.data.length:Z.length:(V>Z.highWaterMark&&(Z.highWaterMark=Y(V)),V<=Z.length?V:Z.ended?Z.length:(Z.needReadable=!0,0))}x.prototype.read=function(V){s("read",V),V=parseInt(V,10);var Z=this._readableState,q=V;if(V!==0&&(Z.emittedReadable=!1),V===0&&Z.needReadable&&(Z.length>=Z.highWaterMark||Z.ended))return s("read: emitReadable",Z.length,Z.ended),Z.length===0&&Z.ended?te(this):H(this),null;if(V=z(V,Z),V===0&&Z.ended)return Z.length===0&&te(this),null;var ie=Z.needReadable;s("need readable",ie),(Z.length===0||Z.length-V<Z.highWaterMark)&&(ie=!0,s("length less than watermark",ie)),Z.ended||Z.reading?(ie=!1,s("reading or ended",ie)):ie&&(s("do read"),Z.reading=!0,Z.sync=!0,Z.length===0&&(Z.needReadable=!0),this._read(Z.highWaterMark),Z.sync=!1,Z.reading||(V=z(q,Z)));var ne;return V>0?ne=fe(V,Z):ne=null,ne===null?(Z.needReadable=!0,V=0):Z.length-=V,Z.length===0&&(Z.ended||(Z.needReadable=!0),q!==V&&Z.ended&&te(this)),ne!==null&&this.emit("data",ne),ne};function O(V,Z){if(Z.ended)return;if(Z.decoder){var q=Z.decoder.end();q&&q.length&&(Z.buffer.push(q),Z.length+=Z.objectMode?1:q.length)}Z.ended=!0,H(V)}function H(V){var Z=V._readableState;Z.needReadable=!1,Z.emittedReadable||(s("emitReadable",Z.flowing),Z.emittedReadable=!0,Z.sync?_.nextTick(U,V):U(V))}function U(V){s("emit readable"),V.emit("readable"),_e(V)}function L(V,Z){Z.readingMore||(Z.readingMore=!0,_.nextTick(K,V,Z))}function K(V,Z){for(var q=Z.length;!Z.reading&&!Z.flowing&&!Z.ended&&Z.length<Z.highWaterMark&&!(s("maybeReadMore read 0"),V.read(0),q===Z.length);)q=Z.length;Z.readingMore=!1}x.prototype._read=function(V){this.emit("error",new Error("_read() is not implemented"))},x.prototype.pipe=function(V,Z){var q=this,ie=this._readableState;switch(ie.pipesCount){case 0:ie.pipes=V;break;case 1:ie.pipes=[ie.pipes,V];break;default:ie.pipes.push(V);break}ie.pipesCount+=1,s("pipe count=%d opts=%j",ie.pipesCount,Z);var ne=(!Z||Z.end!==!1)&&V!==N.stdout&&V!==N.stderr,J=ne?le:Pe;ie.endEmitted?_.nextTick(J):q.once("end",J),V.on("unpipe",$);function $(Ie,Ze){s("onunpipe"),Ie===q&&(Ze&&Ze.hasUnpiped===!1&&(Ze.hasUnpiped=!0,Ue()))}function le(){s("onend"),V.end()}var he=ee(q);V.on("drain",he);var Se=!1;function Ue(){s("cleanup"),V.removeListener("close",et),V.removeListener("finish",qe),V.removeListener("drain",he),V.removeListener("error",Ye),V.removeListener("unpipe",$),q.removeListener("end",le),q.removeListener("end",Pe),q.removeListener("data",$e),Se=!0,ie.awaitDrain&&(!V._writableState||V._writableState.needDrain)&&he()}var Xe=!1;q.on("data",$e);function $e(Ie){s("ondata"),Xe=!1;var Ze=V.write(Ie);Ze===!1&&!Xe&&((ie.pipesCount===1&&ie.pipes===V||ie.pipesCount>1&&X(ie.pipes,V)!==-1)&&!Se&&(s("false write response, pause",q._readableState.awaitDrain),q._readableState.awaitDrain++,Xe=!0),q.pause())}function Ye(Ie){s("onerror",Ie),Pe(),V.removeListener("error",Ye),c(V,"error")===0&&V.emit("error",Ie)}R(V,"error",Ye);function et(){V.removeListener("finish",qe),Pe()}V.once("close",et);function qe(){s("onfinish"),V.removeListener("close",et),Pe()}V.once("finish",qe);function Pe(){s("unpipe"),q.unpipe(V)}return V.emit("pipe",q),ie.flowing||(s("pipe resume"),q.resume()),V};function ee(V){return function(){var Z=V._readableState;s("pipeOnDrain",Z.awaitDrain),Z.awaitDrain&&Z.awaitDrain--,Z.awaitDrain===0&&c(V,"data")&&(Z.flowing=!0,_e(V))}}x.prototype.unpipe=function(V){var Z=this._readableState,q={hasUnpiped:!1};if(Z.pipesCount===0)return this;if(Z.pipesCount===1)return V&&V!==Z.pipes?this:(V||(V=Z.pipes),Z.pipes=null,Z.pipesCount=0,Z.flowing=!1,V&&V.emit("unpipe",this,q),this);if(!V){var ie=Z.pipes,ne=Z.pipesCount;Z.pipes=null,Z.pipesCount=0,Z.flowing=!1;for(var J=0;J<ne;J++)ie[J].emit("unpipe",this,q);return this}var $=X(Z.pipes,V);return $===-1?this:(Z.pipes.splice($,1),Z.pipesCount-=1,Z.pipesCount===1&&(Z.pipes=Z.pipes[0]),V.emit("unpipe",this,q),this)},x.prototype.on=function(V,Z){var q=i.prototype.on.call(this,V,Z);if(V==="data")this._readableState.flowing!==!1&&this.resume();else if(V==="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 q},x.prototype.addListener=x.prototype.on;function oe(V){s("readable nexttick read 0"),V.read(0)}x.prototype.resume=function(){var V=this._readableState;return V.flowing||(s("resume"),V.flowing=!0,ae(this,V)),this};function ae(V,Z){Z.resumeScheduled||(Z.resumeScheduled=!0,_.nextTick(be,V,Z))}function be(V,Z){Z.reading||(s("resume read 0"),V.read(0)),Z.resumeScheduled=!1,Z.awaitDrain=0,V.emit("resume"),_e(V),Z.flowing&&!Z.reading&&V.read(0)}x.prototype.pause=function(){return s("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(s("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function _e(V){var Z=V._readableState;for(s("flow",Z.flowing);Z.flowing&&V.read()!==null;);}x.prototype.wrap=function(V){var Z=this,q=this._readableState,ie=!1;V.on("end",function(){if(s("wrapped end"),q.decoder&&!q.ended){var $=q.decoder.end();$&&$.length&&Z.push($)}Z.push(null)}),V.on("data",function($){if(s("wrapped data"),q.decoder&&($=q.decoder.write($)),q.objectMode&&$==null)return;if(!q.objectMode&&(!$||!$.length))return;var le=Z.push($);le||(ie=!0,V.pause())});for(var ne in V)this[ne]===void 0&&typeof V[ne]=="function"&&(this[ne]=function($){return function(){return V[$].apply(V,arguments)}}(ne));for(var J=0;J<I.length;J++)V.on(I[J],this.emit.bind(this,I[J]));return this._read=function($){s("wrapped _read",$),ie&&(ie=!1,V.resume())},this},Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),x._fromList=fe;function fe(V,Z){if(Z.length===0)return null;var q;return Z.objectMode?q=Z.buffer.shift():!V||V>=Z.length?(Z.decoder?q=Z.buffer.join(""):Z.buffer.length===1?q=Z.buffer.head.data:q=Z.buffer.concat(Z.length),Z.buffer.clear()):q=Re(V,Z.buffer,Z.decoder),q}function Re(V,Z,q){var ie;return V<Z.head.data.length?(ie=Z.head.data.slice(0,V),Z.head.data=Z.head.data.slice(V)):V===Z.head.data.length?ie=Z.shift():ie=q?Ce(V,Z):ce(V,Z),ie}function Ce(V,Z){var q=Z.head,ie=1,ne=q.data;for(V-=ne.length;q=q.next;){var J=q.data,$=V>J.length?J.length:V;if($===J.length?ne+=J:ne+=J.slice(0,V),V-=$,V===0){$===J.length?(++ie,q.next?Z.head=q.next:Z.head=Z.tail=null):(Z.head=q,q.data=J.slice($));break}++ie}return Z.length-=ie,ne}function ce(V,Z){var q=n.allocUnsafe(V),ie=Z.head,ne=1;for(ie.data.copy(q),V-=ie.data.length;ie=ie.next;){var J=ie.data,$=V>J.length?J.length:V;if(J.copy(q,q.length-V,0,$),V-=$,V===0){$===J.length?(++ne,ie.next?Z.head=ie.next:Z.head=Z.tail=null):(Z.head=ie,ie.data=J.slice($));break}++ne}return Z.length-=ne,q}function te(V){var Z=V._readableState;if(Z.length>0)throw new Error('"endReadable()" called on non-empty stream');Z.endEmitted||(Z.ended=!0,_.nextTick(W,Z,V))}function W(V,Z){!V.endEmitted&&V.length===0&&(V.endEmitted=!0,Z.readable=!1,Z.emit("end"))}function X(V,Z){for(var q=0,ie=V.length;q<ie;q++)if(V[q]===Z)return q;return-1}}).call(this,B("_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(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/create"),g=w(N);function w(h){return h&&h.__esModule?h:{default:h}}Q.exports=T;var k=B("./_stream_duplex"),b=(0,g.default)(B("core-util-is"));b.inherits=B("inherits"),b.inherits(T,k);function m(h,r){var c=this._transformState;c.transforming=!1;var i=c.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));c.writechunk=null,c.writecb=null,r!=null&&this.push(r),i(h);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function T(h){if(!(this instanceof T))return new T(h);k.call(this,h),this._transformState={afterTransform:m.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,h&&(typeof h.transform=="function"&&(this._transform=h.transform),typeof h.flush=="function"&&(this._flush=h.flush)),this.on("prefinish",_)}function _(){var h=this;typeof this._flush=="function"?this._flush(function(r,c){t(h,r,c)}):t(this,null,null)}T.prototype.push=function(h,r){return this._transformState.needTransform=!1,k.prototype.push.call(this,h,r)},T.prototype._transform=function(h,r,c){throw new Error("_transform() is not implemented")},T.prototype._write=function(h,r,c){var i=this._transformState;if(i.writecb=c,i.writechunk=h,i.writeencoding=r,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},T.prototype._read=function(h){var r=this._transformState;r.writechunk!==null&&r.writecb&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0},T.prototype._destroy=function(h,r){var c=this;k.prototype._destroy.call(this,h,function(i){r(i),c.emit("close")})};function t(h,r,c){if(r)return h.emit("error",r);if(c!=null&&h.push(c),h._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(h._transformState.transforming)throw new Error("Calling transform done when still transforming");return h.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(B,Q,D){(function(N,g){"use strict";var w=B("babel-runtime/core-js/object/define-property"),k=i(w),b=B("babel-runtime/core-js/symbol/has-instance"),m=i(b),T=B("babel-runtime/core-js/symbol"),_=i(T),t=B("babel-runtime/core-js/object/create"),h=i(t),r=B("babel-runtime/core-js/set-immediate"),c=i(r);function i(ce){return ce&&ce.__esModule?ce:{default:ce}}var n=B("process-nextick-args");Q.exports=F;function l(ce,te,W){this.chunk=ce,this.encoding=te,this.callback=W,this.next=null}function f(ce){var te=this;this.next=null,this.entry=null,this.finish=function(){Ce(te,ce)}}var d=!N.browser&&["v0.10","v0.9."].indexOf(N.version.slice(0,5))>-1?c.default:n.nextTick,u;F.WritableState=C;var o=(0,h.default)(B("core-util-is"));o.inherits=B("inherits");var s={deprecate:B("util-deprecate")},E=B("./internal/streams/stream"),v=B("safe-buffer").Buffer,p=g.Uint8Array||function(){};function I(ce){return v.from(ce)}function R(ce){return v.isBuffer(ce)||ce instanceof p}var y=B("./internal/streams/destroy");o.inherits(F,E);function x(){}function C(ce,te){u=u||B("./_stream_duplex"),ce=ce||{};var W=te instanceof u;this.objectMode=!!ce.objectMode,W&&(this.objectMode=this.objectMode||!!ce.writableObjectMode);var X=ce.highWaterMark,V=ce.writableHighWaterMark,Z=this.objectMode?16:16*1024;X||X===0?this.highWaterMark=X:W&&(V||V===0)?this.highWaterMark=V:this.highWaterMark=Z,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 q=ce.decodeStrings===!1;this.decodeStrings=!q,this.defaultEncoding=ce.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ie){L(te,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 f(this)}C.prototype.getBuffer=function(){for(var te=this.bufferedRequest,W=[];te;)W.push(te),te=te.next;return W},function(){try{Object.defineProperty(C.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ce){}}();var S;typeof _.default=="function"&&m.default&&typeof Function.prototype[m.default]=="function"?(S=Function.prototype[m.default],(0,k.default)(F,m.default,{value:function(te){return S.call(this,te)?!0:this!==F?!1:te&&te._writableState instanceof C}})):S=function(te){return te instanceof this};function F(ce){if(u=u||B("./_stream_duplex"),!S.call(F,this)&&!(this instanceof u))return new F(ce);this._writableState=new C(ce,this),this.writable=!0,ce&&(typeof ce.write=="function"&&(this._write=ce.write),typeof ce.writev=="function"&&(this._writev=ce.writev),typeof ce.destroy=="function"&&(this._destroy=ce.destroy),typeof ce.final=="function"&&(this._final=ce.final)),E.call(this)}F.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function j(ce,te){var W=new Error("write after end");ce.emit("error",W),n.nextTick(te,W)}function A(ce,te,W,X){var V=!0,Z=!1;return W===null?Z=new TypeError("May not write null values to stream"):typeof W!="string"&&W!==void 0&&!te.objectMode&&(Z=new TypeError("Invalid non-string/buffer chunk")),Z&&(ce.emit("error",Z),n.nextTick(X,Z),V=!1),V}F.prototype.write=function(ce,te,W){var X=this._writableState,V=!1,Z=!X.objectMode&&R(ce);return Z&&!v.isBuffer(ce)&&(ce=I(ce)),typeof te=="function"&&(W=te,te=null),Z?te="buffer":te||(te=X.defaultEncoding),typeof W!="function"&&(W=x),X.ended?j(this,W):(Z||A(this,X,ce,W))&&(X.pendingcb++,V=z(this,X,Z,ce,te,W)),V},F.prototype.cork=function(){var ce=this._writableState;ce.corked++},F.prototype.uncork=function(){var ce=this._writableState;ce.corked&&(ce.corked--,!ce.writing&&!ce.corked&&!ce.finished&&!ce.bufferProcessing&&ce.bufferedRequest&&oe(this,ce))},F.prototype.setDefaultEncoding=function(te){if(typeof te=="string"&&(te=te.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((te+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+te);return this._writableState.defaultEncoding=te,this};function Y(ce,te,W){return!ce.objectMode&&ce.decodeStrings!==!1&&typeof te=="string"&&(te=v.from(te,W)),te}Object.defineProperty(F.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(ce,te,W,X,V,Z){if(!W){var q=Y(te,X,V);X!==q&&(W=!0,V="buffer",X=q)}var ie=te.objectMode?1:X.length;te.length+=ie;var ne=te.length<te.highWaterMark;if(ne||(te.needDrain=!0),te.writing||te.corked){var J=te.lastBufferedRequest;te.lastBufferedRequest={chunk:X,encoding:V,isBuf:W,callback:Z,next:null},J?J.next=te.lastBufferedRequest:te.bufferedRequest=te.lastBufferedRequest,te.bufferedRequestCount+=1}else O(ce,te,!1,ie,X,V,Z);return ne}function O(ce,te,W,X,V,Z,q){te.writelen=X,te.writecb=q,te.writing=!0,te.sync=!0,W?ce._writev(V,te.onwrite):ce._write(V,Z,te.onwrite),te.sync=!1}function H(ce,te,W,X,V){--te.pendingcb,W?(n.nextTick(V,X),n.nextTick(fe,ce,te),ce._writableState.errorEmitted=!0,ce.emit("error",X)):(V(X),ce._writableState.errorEmitted=!0,ce.emit("error",X),fe(ce,te))}function U(ce){ce.writing=!1,ce.writecb=null,ce.length-=ce.writelen,ce.writelen=0}function L(ce,te){var W=ce._writableState,X=W.sync,V=W.writecb;if(U(W),te)H(ce,W,X,te,V);else{var Z=ae(W);!Z&&!W.corked&&!W.bufferProcessing&&W.bufferedRequest&&oe(ce,W),X?d(K,ce,W,Z,V):K(ce,W,Z,V)}}function K(ce,te,W,X){W||ee(ce,te),te.pendingcb--,X(),fe(ce,te)}function ee(ce,te){te.length===0&&te.needDrain&&(te.needDrain=!1,ce.emit("drain"))}function oe(ce,te){te.bufferProcessing=!0;var W=te.bufferedRequest;if(ce._writev&&W&&W.next){var X=te.bufferedRequestCount,V=new Array(X),Z=te.corkedRequestsFree;Z.entry=W;for(var q=0,ie=!0;W;)V[q]=W,W.isBuf||(ie=!1),W=W.next,q+=1;V.allBuffers=ie,O(ce,te,!0,te.length,V,"",Z.finish),te.pendingcb++,te.lastBufferedRequest=null,Z.next?(te.corkedRequestsFree=Z.next,Z.next=null):te.corkedRequestsFree=new f(te),te.bufferedRequestCount=0}else{for(;W;){var ne=W.chunk,J=W.encoding,$=W.callback,le=te.objectMode?1:ne.length;if(O(ce,te,!1,le,ne,J,$),W=W.next,te.bufferedRequestCount--,te.writing)break}W===null&&(te.lastBufferedRequest=null)}te.bufferedRequest=W,te.bufferProcessing=!1}F.prototype._write=function(ce,te,W){W(new Error("_write() is not implemented"))},F.prototype._writev=null,F.prototype.end=function(ce,te,W){var X=this._writableState;typeof ce=="function"?(W=ce,ce=null,te=null):typeof te=="function"&&(W=te,te=null),ce!=null&&this.write(ce,te),X.corked&&(X.corked=1,this.uncork()),!X.ending&&!X.finished&&Re(this,X,W)};function ae(ce){return ce.ending&&ce.length===0&&ce.bufferedRequest===null&&!ce.finished&&!ce.writing}function be(ce,te){ce._final(function(W){te.pendingcb--,W&&ce.emit("error",W),te.prefinished=!0,ce.emit("prefinish"),fe(ce,te)})}function _e(ce,te){!te.prefinished&&!te.finalCalled&&(typeof ce._final=="function"?(te.pendingcb++,te.finalCalled=!0,n.nextTick(be,ce,te)):(te.prefinished=!0,ce.emit("prefinish")))}function fe(ce,te){var W=ae(te);return W&&(_e(ce,te),te.pendingcb===0&&(te.finished=!0,ce.emit("finish"))),W}function Re(ce,te,W){te.ending=!0,fe(ce,te),W&&(te.finished?n.nextTick(W):ce.once("finish",W)),te.ended=!0,ce.writable=!1}function Ce(ce,te,W){var X=ce.entry;for(ce.entry=null;X;){var V=X.callback;te.pendingcb--,V(W),X=X.next}te.corkedRequestsFree?te.corkedRequestsFree.next=ce:te.corkedRequestsFree=ce}Object.defineProperty(F.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(te){if(!this._writableState)return;this._writableState.destroyed=te}}),F.prototype.destroy=y.destroy,F.prototype._undestroy=y.undestroy,F.prototype._destroy=function(ce,te){this.end(),te(ce)}}).call(this,B("_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(B,Q,D){"use strict";function N(b,m){if(!(b instanceof m))throw new TypeError("Cannot call a class as a function")}var g=B("safe-buffer").Buffer,w=B("util");function k(b,m,T){b.copy(m,T)}Q.exports=function(){function b(){N(this,b),this.head=null,this.tail=null,this.length=0}return b.prototype.push=function(T){var _={data:T,next:null};this.length>0?this.tail.next=_:this.head=_,this.tail=_,++this.length},b.prototype.unshift=function(T){var _={data:T,next:this.head};this.length===0&&(this.tail=_),this.head=_,++this.length},b.prototype.shift=function(){if(this.length===0)return;var T=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,T},b.prototype.clear=function(){this.head=this.tail=null,this.length=0},b.prototype.join=function(T){if(this.length===0)return"";for(var _=this.head,t=""+_.data;_=_.next;)t+=T+_.data;return t},b.prototype.concat=function(T){if(this.length===0)return g.alloc(0);if(this.length===1)return this.head.data;for(var _=g.allocUnsafe(T>>>0),t=this.head,h=0;t;)k(t.data,_,h),h+=t.data.length,t=t.next;return _},b}(),w&&w.inspect&&w.inspect.custom&&(Q.exports.prototype[w.inspect.custom]=function(){var b=w.inspect({length:this.length});return this.constructor.name+" "+b})},{"safe-buffer":228,util:71}],220:[function(B,Q,D){"use strict";var N=B("process-nextick-args");function g(b,m){var T=this,_=this._readableState&&this._readableState.destroyed,t=this._writableState&&this._writableState.destroyed;return _||t?(m?m(b):b&&(!this._writableState||!this._writableState.errorEmitted)&&N.nextTick(k,this,b),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(b||null,function(h){!m&&h?(N.nextTick(k,T,h),T._writableState&&(T._writableState.errorEmitted=!0)):m&&m(h)}),this)}function w(){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 k(b,m){b.emit("error",m)}Q.exports={destroy:g,undestroy:w}},{"process-nextick-args":207}],221:[function(B,Q,D){"use strict";Q.exports=B("events").EventEmitter},{events:192}],222:[function(B,Q,D){Q.exports=B("./readable").PassThrough},{"./readable":223}],223:[function(B,Q,D){D=Q.exports=B("./lib/_stream_readable.js"),D.Stream=D,D.Readable=D,D.Writable=B("./lib/_stream_writable.js"),D.Duplex=B("./lib/_stream_duplex.js"),D.Transform=B("./lib/_stream_transform.js"),D.PassThrough=B("./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(B,Q,D){Q.exports=B("./readable").Transform},{"./readable":223}],225:[function(B,Q,D){Q.exports=B("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(B,Q,D){var N=function(){return this}()||Function("return this")(),g=N.regeneratorRuntime&&Object.getOwnPropertyNames(N).indexOf("regeneratorRuntime")>=0,w=g&&N.regeneratorRuntime;if(N.regeneratorRuntime=void 0,Q.exports=B("./runtime"),g)N.regeneratorRuntime=w;else try{delete N.regeneratorRuntime}catch(k){N.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(B,Q,D){!function(N){"use strict";var g=Object.prototype,w=g.hasOwnProperty,k,b=typeof Symbol=="function"?Symbol:{},m=b.iterator||"@@iterator",T=b.asyncIterator||"@@asyncIterator",_=b.toStringTag||"@@toStringTag",t=typeof Q=="object",h=N.regeneratorRuntime;if(h){t&&(Q.exports=h);return}h=N.regeneratorRuntime=t?Q.exports:{};function r(z,O,H,U){var L=O&&O.prototype instanceof u?O:u,K=Object.create(L.prototype),ee=new j(U||[]);return K._invoke=x(z,H,ee),K}h.wrap=r;function c(z,O,H){try{return{type:"normal",arg:z.call(O,H)}}catch(U){return{type:"throw",arg:U}}}var i="suspendedStart",n="suspendedYield",l="executing",f="completed",d={};function u(){}function o(){}function s(){}var E={};E[m]=function(){return this};var v=Object.getPrototypeOf,p=v&&v(v(A([])));p&&p!==g&&w.call(p,m)&&(E=p);var I=s.prototype=u.prototype=Object.create(E);o.prototype=I.constructor=s,s.constructor=o,s[_]=o.displayName="GeneratorFunction";function R(z){["next","throw","return"].forEach(function(O){z[O]=function(H){return this._invoke(O,H)}})}h.isGeneratorFunction=function(z){var O=typeof z=="function"&&z.constructor;return O?O===o||(O.displayName||O.name)==="GeneratorFunction":!1},h.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,s):(z.__proto__=s,_ in z||(z[_]="GeneratorFunction")),z.prototype=Object.create(I),z},h.awrap=function(z){return{__await:z}};function y(z){function O(L,K,ee,oe){var ae=c(z[L],z,K);if(ae.type==="throw")oe(ae.arg);else{var be=ae.arg,_e=be.value;return _e&&typeof _e=="object"&&w.call(_e,"__await")?Promise.resolve(_e.__await).then(function(fe){O("next",fe,ee,oe)},function(fe){O("throw",fe,ee,oe)}):Promise.resolve(_e).then(function(fe){be.value=fe,ee(be)},oe)}}var H;function U(L,K){function ee(){return new Promise(function(oe,ae){O(L,K,oe,ae)})}return H=H?H.then(ee,ee):ee()}this._invoke=U}R(y.prototype),y.prototype[T]=function(){return this},h.AsyncIterator=y,h.async=function(z,O,H,U){var L=new y(r(z,O,H,U));return h.isGeneratorFunction(O)?L:L.next().then(function(K){return K.done?K.value:L.next()})};function x(z,O,H){var U=i;return function(K,ee){if(U===l)throw new Error("Generator is already running");if(U===f){if(K==="throw")throw ee;return Y()}for(H.method=K,H.arg=ee;;){var oe=H.delegate;if(oe){var ae=C(oe,H);if(ae){if(ae===d)continue;return ae}}if(H.method==="next")H.sent=H._sent=H.arg;else if(H.method==="throw"){if(U===i)throw U=f,H.arg;H.dispatchException(H.arg)}else H.method==="return"&&H.abrupt("return",H.arg);U=l;var be=c(z,O,H);if(be.type==="normal"){if(U=H.done?f:n,be.arg===d)continue;return{value:be.arg,done:H.done}}else be.type==="throw"&&(U=f,H.method="throw",H.arg=be.arg)}}}function C(z,O){var H=z.iterator[O.method];if(H===k){if(O.delegate=null,O.method==="throw"){if(z.iterator.return&&(O.method="return",O.arg=k,C(z,O),O.method==="throw"))return d;O.method="throw",O.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var U=c(H,z.iterator,O.arg);if(U.type==="throw")return O.method="throw",O.arg=U.arg,O.delegate=null,d;var L=U.arg;if(!L)return O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,d;if(L.done)O[z.resultName]=L.value,O.next=z.nextLoc,O.method!=="return"&&(O.method="next",O.arg=k);else return L;return O.delegate=null,d}R(I),I[_]="Generator",I[m]=function(){return this},I.toString=function(){return"[object Generator]"};function S(z){var O={tryLoc:z[0]};1 in z&&(O.catchLoc=z[1]),2 in z&&(O.finallyLoc=z[2],O.afterLoc=z[3]),this.tryEntries.push(O)}function F(z){var O=z.completion||{};O.type="normal",delete O.arg,z.completion=O}function j(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(S,this),this.reset(!0)}h.keys=function(z){var O=[];for(var H in z)O.push(H);return O.reverse(),function U(){for(;O.length;){var L=O.pop();if(L in z)return U.value=L,U.done=!1,U}return U.done=!0,U}};function A(z){if(z){var O=z[m];if(O)return O.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var H=-1,U=function L(){for(;++H<z.length;)if(w.call(z,H))return L.value=z[H],L.done=!1,L;return L.value=k,L.done=!0,L};return U.next=U}}return{next:Y}}h.values=A;function Y(){return{value:k,done:!0}}j.prototype={constructor:j,reset:function(z){if(this.prev=0,this.next=0,this.sent=this._sent=k,this.done=!1,this.delegate=null,this.method="next",this.arg=k,this.tryEntries.forEach(F),!z)for(var O in this)O.charAt(0)==="t"&&w.call(this,O)&&!isNaN(+O.slice(1))&&(this[O]=k)},stop:function(){this.done=!0;var z=this.tryEntries[0],O=z.completion;if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(z){if(this.done)throw z;var O=this;function H(ae,be){return K.type="throw",K.arg=z,O.next=ae,be&&(O.method="next",O.arg=k),!!be}for(var U=this.tryEntries.length-1;U>=0;--U){var L=this.tryEntries[U],K=L.completion;if(L.tryLoc==="root")return H("end");if(L.tryLoc<=this.prev){var ee=w.call(L,"catchLoc"),oe=w.call(L,"finallyLoc");if(ee&&oe){if(this.prev<L.catchLoc)return H(L.catchLoc,!0);if(this.prev<L.finallyLoc)return H(L.finallyLoc)}else if(ee){if(this.prev<L.catchLoc)return H(L.catchLoc,!0)}else if(oe){if(this.prev<L.finallyLoc)return H(L.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(z,O){for(var H=this.tryEntries.length-1;H>=0;--H){var U=this.tryEntries[H];if(U.tryLoc<=this.prev&&w.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var L=U;break}}L&&(z==="break"||z==="continue")&&L.tryLoc<=O&&O<=L.finallyLoc&&(L=null);var K=L?L.completion:{};return K.type=z,K.arg=O,L?(this.method="next",this.next=L.finallyLoc,d):this.complete(K)},complete:function(z,O){if(z.type==="throw")throw z.arg;return z.type==="break"||z.type==="continue"?this.next=z.arg:z.type==="return"?(this.rval=this.arg=z.arg,this.method="return",this.next="end"):z.type==="normal"&&O&&(this.next=O),d},finish:function(z){for(var O=this.tryEntries.length-1;O>=0;--O){var H=this.tryEntries[O];if(H.finallyLoc===z)return this.complete(H.completion,H.afterLoc),F(H),d}},catch:function(z){for(var O=this.tryEntries.length-1;O>=0;--O){var H=this.tryEntries[O];if(H.tryLoc===z){var U=H.completion;if(U.type==="throw"){var L=U.arg;F(H)}return L}}throw new Error("illegal catch attempt")},delegateYield:function(z,O,H){return this.delegate={iterator:A(z),resultName:O,nextLoc:H},this.method==="next"&&(this.arg=k),d}}}(function(){return this}()||Function("return this")())},{}],228:[function(B,Q,D){var N=B("buffer"),g=N.Buffer;function w(b,m){for(var T in b)m[T]=b[T]}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?Q.exports=N:(w(N,D),D.Buffer=k);function k(b,m,T){return g(b,m,T)}w(g,k),k.from=function(b,m,T){if(typeof b=="number")throw new TypeError("Argument must not be a number");return g(b,m,T)},k.alloc=function(b,m,T){if(typeof b!="number")throw new TypeError("Argument must be a number");var _=g(b);return m!==void 0?typeof T=="string"?_.fill(m,T):_.fill(m):_.fill(0),_},k.allocUnsafe=function(b){if(typeof b!="number")throw new TypeError("Argument must be a number");return g(b)},k.allocUnsafeSlow=function(b){if(typeof b!="number")throw new TypeError("Argument must be a number");return N.SlowBuffer(b)}},{buffer:73}],229:[function(B,Q,D){(function(N){"use strict";var g=B("babel-runtime/core-js/string/from-code-point"),w=n(g),k=B("babel-runtime/core-js/json/stringify"),b=n(k),m=B("babel-runtime/helpers/typeof"),T=n(m),_=B("babel-runtime/core-js/object/define-property"),t=n(_),h=B("babel-runtime/core-js/object/keys"),r=n(h),c=B("babel-runtime/core-js/object/create"),i=n(c);function n(l){return l&&l.__esModule?l:{default:l}}(function(l){l.parser=function(J,$){return new d(J,$)},l.SAXParser=d,l.SAXStream=I,l.createStream=p,l.MAX_BUFFER_LENGTH=64*1024;var f=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];l.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function d(J,$){if(!(this instanceof d))return new d(J,$);var le=this;o(le),le.q=le.c="",le.bufferCheckPosition=l.MAX_BUFFER_LENGTH,le.opt=$||{},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=!!J,le.noscript=!!(J||le.opt.noscript),le.state=K.BEGIN,le.strictEntities=le.opt.strictEntities,le.ENTITIES=le.strictEntities?(0,i.default)(l.XML_ENTITIES):(0,i.default)(l.ENTITIES),le.attribList=[],le.opt.xmlns&&(le.ns=(0,i.default)(S)),le.trackPosition=le.opt.position!==!1,le.trackPosition&&(le.position=le.line=le.column=0),oe(le,"onready")}i.default||(Object.create=function(J){function $(){}$.prototype=J;var le=new $;return le}),r.default||(Object.keys=function(J){var $=[];for(var le in J)J.hasOwnProperty(le)&&$.push(le);return $});function u(J){for(var $=Math.max(l.MAX_BUFFER_LENGTH,10),le=0,he=0,Se=f.length;he<Se;he++){var Ue=J[f[he]].length;if(Ue>$)switch(f[he]){case"textNode":be(J);break;case"cdata":ae(J,"oncdata",J.cdata),J.cdata="";break;case"script":ae(J,"onscript",J.script),J.script="";break;default:fe(J,"Max buffer length exceeded: "+f[he])}le=Math.max(le,Ue)}var Xe=l.MAX_BUFFER_LENGTH-le;J.bufferCheckPosition=Xe+J.position}function o(J){for(var $=0,le=f.length;$<le;$++)J[f[$]]=""}function s(J){be(J),J.cdata!==""&&(ae(J,"oncdata",J.cdata),J.cdata=""),J.script!==""&&(ae(J,"onscript",J.script),J.script="")}d.prototype={end:function(){Re(this)},write:ne,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){s(this)}};var E;try{E=B("stream").Stream}catch(J){E=function(){}}var v=l.EVENTS.filter(function(J){return J!=="error"&&J!=="end"});function p(J,$){return new I(J,$)}function I(J,$){if(!(this instanceof I))return new I(J,$);E.apply(this),this._parser=new d(J,$),this.writable=!0,this.readable=!0;var le=this;this._parser.onend=function(){le.emit("end")},this._parser.onerror=function(he){le.emit("error",he),le._parser.error=null},this._decoder=null,v.forEach(function(he){(0,t.default)(le,"on"+he,{get:function(){return le._parser["on"+he]},set:function(Ue){if(!Ue)return le.removeAllListeners(he),le._parser["on"+he]=Ue,Ue;le.on(he,Ue)},enumerable:!0,configurable:!1})})}I.prototype=(0,i.default)(E.prototype,{constructor:{value:I}}),I.prototype.write=function(J){if(typeof N=="function"&&typeof N.isBuffer=="function"&&N.isBuffer(J)){if(!this._decoder){var $=B("string_decoder").StringDecoder;this._decoder=new $("utf8")}J=this._decoder.write(J)}return this._parser.write(J.toString()),this.emit("data",J),!0},I.prototype.end=function(J){return J&&J.length&&this.write(J),this._parser.end(),!0},I.prototype.on=function(J,$){var le=this;return!le._parser["on"+J]&&v.indexOf(J)!==-1&&(le._parser["on"+J]=function(){var he=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);he.splice(0,0,J),le.emit.apply(le,he)}),E.prototype.on.call(le,J,$)};var R="[CDATA[",y="DOCTYPE",x="http://www.w3.org/XML/1998/namespace",C="http://www.w3.org/2000/xmlns/",S={xml:x,xmlns:C},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]/,j=/[:_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-]/,A=/[#:_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 z(J){return J===" "||J===`
|
|
|
`||J==="\r"||J===" "}function O(J){return J==='"'||J==="'"}function H(J){return J===">"||z(J)}function U(J,$){return J.test($)}function L(J,$){return!U(J,$)}var K=0;l.STATE={BEGIN:K++,BEGIN_WHITESPACE:K++,TEXT:K++,TEXT_ENTITY:K++,OPEN_WAKA:K++,SGML_DECL:K++,SGML_DECL_QUOTED:K++,DOCTYPE:K++,DOCTYPE_QUOTED:K++,DOCTYPE_DTD:K++,DOCTYPE_DTD_QUOTED:K++,COMMENT_STARTING:K++,COMMENT:K++,COMMENT_ENDING:K++,COMMENT_ENDED:K++,CDATA:K++,CDATA_ENDING:K++,CDATA_ENDING_2:K++,PROC_INST:K++,PROC_INST_BODY:K++,PROC_INST_ENDING:K++,OPEN_TAG:K++,OPEN_TAG_SLASH:K++,ATTRIB:K++,ATTRIB_NAME:K++,ATTRIB_NAME_SAW_WHITE:K++,ATTRIB_VALUE:K++,ATTRIB_VALUE_QUOTED:K++,ATTRIB_VALUE_CLOSED:K++,ATTRIB_VALUE_UNQUOTED:K++,ATTRIB_VALUE_ENTITY_Q:K++,ATTRIB_VALUE_ENTITY_U:K++,CLOSE_TAG:K++,CLOSE_TAG_SAW_WHITE:K++,SCRIPT:K++,SCRIPT_ENDING:K++},l.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},l.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,r.default)(l.ENTITIES).forEach(function(J){var $=l.ENTITIES[J],le=typeof $=="number"?String.fromCharCode($):$;l.ENTITIES[J]=le});for(var ee in l.STATE)l.STATE[l.STATE[ee]]=ee;K=l.STATE;function oe(J,$,le){J[$]&&J[$](le)}function ae(J,$,le){J.textNode&&be(J),oe(J,$,le)}function be(J){J.textNode=_e(J.opt,J.textNode),J.textNode&&oe(J,"ontext",J.textNode),J.textNode=""}function _e(J,$){return J.trim&&($=$.trim()),J.normalize&&($=$.replace(/\s+/g," ")),$}function fe(J,$){return be(J),J.trackPosition&&($+=`
|
|
|
Line: `+J.line+`
|
|
|
Column: `+J.column+`
|
|
|
Char: `+J.c),$=new Error($),J.error=$,oe(J,"onerror",$),J}function Re(J){return J.sawRoot&&!J.closedRoot&&Ce(J,"Unclosed root tag"),J.state!==K.BEGIN&&J.state!==K.BEGIN_WHITESPACE&&J.state!==K.TEXT&&fe(J,"Unexpected end"),be(J),J.c="",J.closed=!0,oe(J,"onend"),d.call(J,J.strict,J.opt),J}function Ce(J,$){if((typeof J=="undefined"?"undefined":(0,T.default)(J))!=="object"||!(J instanceof d))throw new Error("bad call to strictFail");J.strict&&fe(J,$)}function ce(J){J.strict||(J.tagName=J.tagName[J.looseCase]());var $=J.tags[J.tags.length-1]||J,le=J.tag={name:J.tagName,attributes:{}};J.opt.xmlns&&(le.ns=$.ns),J.attribList.length=0,ae(J,"onopentagstart",le)}function te(J,$){var le=J.indexOf(":"),he=le<0?["",J]:J.split(":"),Se=he[0],Ue=he[1];return $&&J==="xmlns"&&(Se="xmlns",Ue=""),{prefix:Se,local:Ue}}function W(J){if(J.strict||(J.attribName=J.attribName[J.looseCase]()),J.attribList.indexOf(J.attribName)!==-1||J.tag.attributes.hasOwnProperty(J.attribName)){J.attribName=J.attribValue="";return}if(J.opt.xmlns){var $=te(J.attribName,!0),le=$.prefix,he=$.local;if(le==="xmlns")if(he==="xml"&&J.attribValue!==x)Ce(J,"xml: prefix must be bound to "+x+`
|
|
|
Actual: `+J.attribValue);else if(he==="xmlns"&&J.attribValue!==C)Ce(J,"xmlns: prefix must be bound to "+C+`
|
|
|
Actual: `+J.attribValue);else{var Se=J.tag,Ue=J.tags[J.tags.length-1]||J;Se.ns===Ue.ns&&(Se.ns=(0,i.default)(Ue.ns)),Se.ns[he]=J.attribValue}J.attribList.push([J.attribName,J.attribValue])}else J.tag.attributes[J.attribName]=J.attribValue,ae(J,"onattribute",{name:J.attribName,value:J.attribValue});J.attribName=J.attribValue=""}function X(J,$){if(J.opt.xmlns){var le=J.tag,he=te(J.tagName);le.prefix=he.prefix,le.local=he.local,le.uri=le.ns[he.prefix]||"",le.prefix&&!le.uri&&(Ce(J,"Unbound namespace prefix: "+(0,b.default)(J.tagName)),le.uri=he.prefix);var Se=J.tags[J.tags.length-1]||J;le.ns&&Se.ns!==le.ns&&(0,r.default)(le.ns).forEach(function(ye){ae(J,"onopennamespace",{prefix:ye,uri:le.ns[ye]})});for(var Ue=0,Xe=J.attribList.length;Ue<Xe;Ue++){var $e=J.attribList[Ue],Ye=$e[0],et=$e[1],qe=te(Ye,!0),Pe=qe.prefix,Ie=qe.local,Ze=Pe===""?"":le.ns[Pe]||"",nt={name:Ye,value:et,prefix:Pe,local:Ie,uri:Ze};Pe&&Pe!=="xmlns"&&!Ze&&(Ce(J,"Unbound namespace prefix: "+(0,b.default)(Pe)),nt.uri=Pe),J.tag.attributes[Ye]=nt,ae(J,"onattribute",nt)}J.attribList.length=0}J.tag.isSelfClosing=!!$,J.sawRoot=!0,J.tags.push(J.tag),ae(J,"onopentag",J.tag),$||(!J.noscript&&J.tagName.toLowerCase()==="script"?J.state=K.SCRIPT:J.state=K.TEXT,J.tag=null,J.tagName=""),J.attribName=J.attribValue="",J.attribList.length=0}function V(J){if(!J.tagName){Ce(J,"Weird empty close tag."),J.textNode+="</>",J.state=K.TEXT;return}if(J.script){if(J.tagName!=="script"){J.script+="</"+J.tagName+">",J.tagName="",J.state=K.SCRIPT;return}ae(J,"onscript",J.script),J.script=""}var $=J.tags.length,le=J.tagName;J.strict||(le=le[J.looseCase]());for(var he=le;$--;){var Se=J.tags[$];if(Se.name!==he)Ce(J,"Unexpected close tag");else break}if($<0){Ce(J,"Unmatched closing tag: "+J.tagName),J.textNode+="</"+J.tagName+">",J.state=K.TEXT;return}J.tagName=le;for(var Ue=J.tags.length;Ue-- >$;){var Xe=J.tag=J.tags.pop();J.tagName=J.tag.name,ae(J,"onclosetag",J.tagName);var $e={};for(var Ye in Xe.ns)$e[Ye]=Xe.ns[Ye];var et=J.tags[J.tags.length-1]||J;J.opt.xmlns&&Xe.ns!==et.ns&&(0,r.default)(Xe.ns).forEach(function(qe){var Pe=Xe.ns[qe];ae(J,"onclosenamespace",{prefix:qe,uri:Pe})})}$===0&&(J.closedRoot=!0),J.tagName=J.attribValue=J.attribName="",J.attribList.length=0,J.state=K.TEXT}function Z(J){var $=J.entity,le=$.toLowerCase(),he,Se="";return J.ENTITIES[$]?J.ENTITIES[$]:J.ENTITIES[le]?J.ENTITIES[le]:($=le,$.charAt(0)==="#"&&($.charAt(1)==="x"?($=$.slice(2),he=parseInt($,16),Se=he.toString(16)):($=$.slice(1),he=parseInt($,10),Se=he.toString(10))),$=$.replace(/^0+/,""),isNaN(he)||Se.toLowerCase()!==$?(Ce(J,"Invalid character entity"),"&"+J.entity+";"):(0,w.default)(he))}function q(J,$){$==="<"?(J.state=K.OPEN_WAKA,J.startTagPosition=J.position):z($)||(Ce(J,"Non-whitespace before first tag."),J.textNode=$,J.state=K.TEXT)}function ie(J,$){var le="";return $<J.length&&(le=J.charAt($)),le}function ne(J){var $=this;if(this.error)throw this.error;if($.closed)return fe($,"Cannot write after close. Assign an onready handler.");if(J===null)return Re($);(typeof J=="undefined"?"undefined":(0,T.default)(J))==="object"&&(J=J.toString());for(var le=0,he="";!(he=ie(J,le++),$.c=he,!he);){$.trackPosition&&($.position++,he===`
|
|
|
`?($.line++,$.column=0):$.column++);switch($.state){case K.BEGIN:if($.state=K.BEGIN_WHITESPACE,he==="\uFEFF")continue;q($,he);continue;case K.BEGIN_WHITESPACE:q($,he);continue;case K.TEXT:if($.sawRoot&&!$.closedRoot){for(var Se=le-1;he&&he!=="<"&&he!=="&";)he=ie(J,le++),he&&$.trackPosition&&($.position++,he===`
|
|
|
`?($.line++,$.column=0):$.column++);$.textNode+=J.substring(Se,le-1)}he==="<"&&!($.sawRoot&&$.closedRoot&&!$.strict)?($.state=K.OPEN_WAKA,$.startTagPosition=$.position):(!z(he)&&(!$.sawRoot||$.closedRoot)&&Ce($,"Text data outside of root node."),he==="&"?$.state=K.TEXT_ENTITY:$.textNode+=he);continue;case K.SCRIPT:he==="<"?$.state=K.SCRIPT_ENDING:$.script+=he;continue;case K.SCRIPT_ENDING:he==="/"?$.state=K.CLOSE_TAG:($.script+="<"+he,$.state=K.SCRIPT);continue;case K.OPEN_WAKA:if(he==="!")$.state=K.SGML_DECL,$.sgmlDecl="";else if(!z(he))if(U(F,he))$.state=K.OPEN_TAG,$.tagName=he;else if(he==="/")$.state=K.CLOSE_TAG,$.tagName="";else if(he==="?")$.state=K.PROC_INST,$.procInstName=$.procInstBody="";else{if(Ce($,"Unencoded <"),$.startTagPosition+1<$.position){var Ue=$.position-$.startTagPosition;he=new Array(Ue).join(" ")+he}$.textNode+="<"+he,$.state=K.TEXT}continue;case K.SGML_DECL:($.sgmlDecl+he).toUpperCase()===R?(ae($,"onopencdata"),$.state=K.CDATA,$.sgmlDecl="",$.cdata=""):$.sgmlDecl+he==="--"?($.state=K.COMMENT,$.comment="",$.sgmlDecl=""):($.sgmlDecl+he).toUpperCase()===y?($.state=K.DOCTYPE,($.doctype||$.sawRoot)&&Ce($,"Inappropriately located doctype declaration"),$.doctype="",$.sgmlDecl=""):he===">"?(ae($,"onsgmldeclaration",$.sgmlDecl),$.sgmlDecl="",$.state=K.TEXT):(O(he)&&($.state=K.SGML_DECL_QUOTED),$.sgmlDecl+=he);continue;case K.SGML_DECL_QUOTED:he===$.q&&($.state=K.SGML_DECL,$.q=""),$.sgmlDecl+=he;continue;case K.DOCTYPE:he===">"?($.state=K.TEXT,ae($,"ondoctype",$.doctype),$.doctype=!0):($.doctype+=he,he==="["?$.state=K.DOCTYPE_DTD:O(he)&&($.state=K.DOCTYPE_QUOTED,$.q=he));continue;case K.DOCTYPE_QUOTED:$.doctype+=he,he===$.q&&($.q="",$.state=K.DOCTYPE);continue;case K.DOCTYPE_DTD:$.doctype+=he,he==="]"?$.state=K.DOCTYPE:O(he)&&($.state=K.DOCTYPE_DTD_QUOTED,$.q=he);continue;case K.DOCTYPE_DTD_QUOTED:$.doctype+=he,he===$.q&&($.state=K.DOCTYPE_DTD,$.q="");continue;case K.COMMENT:he==="-"?$.state=K.COMMENT_ENDING:$.comment+=he;continue;case K.COMMENT_ENDING:he==="-"?($.state=K.COMMENT_ENDED,$.comment=_e($.opt,$.comment),$.comment&&ae($,"oncomment",$.comment),$.comment=""):($.comment+="-"+he,$.state=K.COMMENT);continue;case K.COMMENT_ENDED:he!==">"?(Ce($,"Malformed comment"),$.comment+="--"+he,$.state=K.COMMENT):$.state=K.TEXT;continue;case K.CDATA:he==="]"?$.state=K.CDATA_ENDING:$.cdata+=he;continue;case K.CDATA_ENDING:he==="]"?$.state=K.CDATA_ENDING_2:($.cdata+="]"+he,$.state=K.CDATA);continue;case K.CDATA_ENDING_2:he===">"?($.cdata&&ae($,"oncdata",$.cdata),ae($,"onclosecdata"),$.cdata="",$.state=K.TEXT):he==="]"?$.cdata+="]":($.cdata+="]]"+he,$.state=K.CDATA);continue;case K.PROC_INST:he==="?"?$.state=K.PROC_INST_ENDING:z(he)?$.state=K.PROC_INST_BODY:$.procInstName+=he;continue;case K.PROC_INST_BODY:if(!$.procInstBody&&z(he))continue;he==="?"?$.state=K.PROC_INST_ENDING:$.procInstBody+=he;continue;case K.PROC_INST_ENDING:he===">"?(ae($,"onprocessinginstruction",{name:$.procInstName,body:$.procInstBody}),$.procInstName=$.procInstBody="",$.state=K.TEXT):($.procInstBody+="?"+he,$.state=K.PROC_INST_BODY);continue;case K.OPEN_TAG:U(j,he)?$.tagName+=he:(ce($),he===">"?X($):he==="/"?$.state=K.OPEN_TAG_SLASH:(z(he)||Ce($,"Invalid character in tag name"),$.state=K.ATTRIB));continue;case K.OPEN_TAG_SLASH:he===">"?(X($,!0),V($)):(Ce($,"Forward-slash in opening tag not followed by >"),$.state=K.ATTRIB);continue;case K.ATTRIB:if(z(he))continue;he===">"?X($):he==="/"?$.state=K.OPEN_TAG_SLASH:U(F,he)?($.attribName=he,$.attribValue="",$.state=K.ATTRIB_NAME):Ce($,"Invalid attribute name");continue;case K.ATTRIB_NAME:he==="="?$.state=K.ATTRIB_VALUE:he===">"?(Ce($,"Attribute without value"),$.attribValue=$.attribName,W($),X($)):z(he)?$.state=K.ATTRIB_NAME_SAW_WHITE:U(j,he)?$.attribName+=he:Ce($,"Invalid attribute name");continue;case K.ATTRIB_NAME_SAW_WHITE:if(he==="=")$.state=K.ATTRIB_VALUE;else{if(z(he))continue;Ce($,"Attribute without value"),$.tag.attributes[$.attribName]="",$.attribValue="",ae($,"onattribute",{name:$.attribName,value:""}),$.attribName="",he===">"?X($):U(F,he)?($.attribName=he,$.state=K.ATTRIB_NAME):(Ce($,"Invalid attribute name"),$.state=K.ATTRIB)}continue;case K.ATTRIB_VALUE:if(z(he))continue;O(he)?($.q=he,$.state=K.ATTRIB_VALUE_QUOTED):(Ce($,"Unquoted attribute value"),$.state=K.ATTRIB_VALUE_UNQUOTED,$.attribValue=he);continue;case K.ATTRIB_VALUE_QUOTED:if(he!==$.q){he==="&"?$.state=K.ATTRIB_VALUE_ENTITY_Q:$.attribValue+=he;continue}W($),$.q="",$.state=K.ATTRIB_VALUE_CLOSED;continue;case K.ATTRIB_VALUE_CLOSED:z(he)?$.state=K.ATTRIB:he===">"?X($):he==="/"?$.state=K.OPEN_TAG_SLASH:U(F,he)?(Ce($,"No whitespace between attributes"),$.attribName=he,$.attribValue="",$.state=K.ATTRIB_NAME):Ce($,"Invalid attribute name");continue;case K.ATTRIB_VALUE_UNQUOTED:if(!H(he)){he==="&"?$.state=K.ATTRIB_VALUE_ENTITY_U:$.attribValue+=he;continue}W($),he===">"?X($):$.state=K.ATTRIB;continue;case K.CLOSE_TAG:if($.tagName)he===">"?V($):U(j,he)?$.tagName+=he:$.script?($.script+="</"+$.tagName,$.tagName="",$.state=K.SCRIPT):(z(he)||Ce($,"Invalid tagname in closing tag"),$.state=K.CLOSE_TAG_SAW_WHITE);else{if(z(he))continue;L(F,he)?$.script?($.script+="</"+he,$.state=K.SCRIPT):Ce($,"Invalid tagname in closing tag."):$.tagName=he}continue;case K.CLOSE_TAG_SAW_WHITE:if(z(he))continue;he===">"?V($):Ce($,"Invalid characters in closing tag");continue;case K.TEXT_ENTITY:case K.ATTRIB_VALUE_ENTITY_Q:case K.ATTRIB_VALUE_ENTITY_U:var Xe,$e;switch($.state){case K.TEXT_ENTITY:Xe=K.TEXT,$e="textNode";break;case K.ATTRIB_VALUE_ENTITY_Q:Xe=K.ATTRIB_VALUE_QUOTED,$e="attribValue";break;case K.ATTRIB_VALUE_ENTITY_U:Xe=K.ATTRIB_VALUE_UNQUOTED,$e="attribValue";break}he===";"?($[$e]+=Z($),$.entity="",$.state=Xe):U($.entity.length?Y:A,he)?$.entity+=he:(Ce($,"Invalid character in entity name"),$[$e]+="&"+$.entity+he,$.entity="",$.state=Xe);continue;default:throw new Error($,"Unknown state: "+$.state)}}return $.position>=$.bufferCheckPosition&&u($),$}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */w.default||function(){var J=String.fromCharCode,$=Math.floor,le=function(){var Se=16384,Ue=[],Xe,$e,Ye=-1,et=arguments.length;if(!et)return"";for(var qe="";++Ye<et;){var Pe=Number(arguments[Ye]);if(!isFinite(Pe)||Pe<0||Pe>1114111||$(Pe)!==Pe)throw RangeError("Invalid code point: "+Pe);Pe<=65535?Ue.push(Pe):(Pe-=65536,Xe=(Pe>>10)+55296,$e=Pe%1024+56320,Ue.push(Xe,$e)),(Ye+1===et||Ue.length>Se)&&(qe+=J.apply(null,Ue),Ue.length=0)}return qe};t.default?Object.defineProperty(String,"fromCodePoint",{value:le,configurable:!0,writable:!0}):String.fromCodePoint=le}()})(typeof D=="undefined"?(void 0).sax={}:D)}).call(this,B("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(B,Q,D){Q.exports=w;var N=B("events").EventEmitter,g=B("inherits");g(w,N),w.Readable=B("readable-stream/readable.js"),w.Writable=B("readable-stream/writable.js"),w.Duplex=B("readable-stream/duplex.js"),w.Transform=B("readable-stream/transform.js"),w.PassThrough=B("readable-stream/passthrough.js"),w.Stream=w;function w(){N.call(this)}w.prototype.pipe=function(k,b){var m=this;function T(n){k.writable&&(k.write(n)===!1&&m.pause&&m.pause())}m.on("data",T);function _(){m.readable&&m.resume&&m.resume()}k.on("drain",_),!k._isStdio&&(!b||b.end!==!1)&&(m.on("end",h),m.on("close",r));var t=!1;function h(){if(t)return;t=!0,k.end()}function r(){if(t)return;t=!0,typeof k.destroy=="function"&&k.destroy()}function c(n){if(i(),N.listenerCount(this,"error")===0)throw n}m.on("error",c),k.on("error",c);function i(){m.removeListener("data",T),k.removeListener("drain",_),m.removeListener("end",h),m.removeListener("close",r),m.removeListener("error",c),k.removeListener("error",c),m.removeListener("end",i),m.removeListener("close",i),k.removeListener("close",i)}return m.on("end",i),m.on("close",i),k.on("close",i),k.emit("pipe",m),k}},{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(B,Q,D){(function(N){var g=B("./lib/request"),w=B("./lib/response"),k=B("xtend"),b=B("builtin-status-codes"),m=B("url"),T=D;T.request=function(_,t){typeof _=="string"?_=m.parse(_):_=k(_);var h=N.location.protocol.search(/^https?:$/)===-1?"http:":"",r=_.protocol||h,c=_.hostname||_.host,i=_.port,n=_.path||"/";c&&c.indexOf(":")!==-1&&(c="["+c+"]"),_.url=(c?r+"//"+c:"")+(i?":"+i:"")+n,_.method=(_.method||"GET").toUpperCase(),_.headers=_.headers||{};var l=new g(_);return t&&l.on("response",t),l},T.get=function(t,h){var r=T.request(t,h);return r.end(),r},T.ClientRequest=g,T.IncomingMessage=w.IncomingMessage,T.Agent=function(){},T.Agent.defaultMaxSockets=4,T.globalAgent=new T.Agent,T.STATUS_CODES=b,T.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(B,Q,D){(function(N){"use strict";D.fetch=T(N.fetch)&&T(N.ReadableStream),D.writableStream=T(N.WritableStream),D.abortController=T(N.AbortController),D.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),D.blobConstructor=!0}catch(_){}var g;function w(){if(g!==void 0)return g;if(N.XMLHttpRequest){g=new N.XMLHttpRequest;try{g.open("GET",N.XDomainRequest?"/":"https://example.com")}catch(_){g=null}}else g=null;return g}function k(_){var t=w();if(!t)return!1;try{return t.responseType=_,t.responseType===_}catch(h){}return!1}var b=typeof N.ArrayBuffer!="undefined",m=b&&T(N.ArrayBuffer.prototype.slice);D.arraybuffer=D.fetch||b&&k("arraybuffer"),D.msstream=!D.fetch&&m&&k("ms-stream"),D.mozchunkedarraybuffer=!D.fetch&&b&&k("moz-chunked-arraybuffer"),D.overrideMimeType=D.fetch||(w()?T(w().overrideMimeType):!1),D.vbArray=T(N.VBArray);function T(_){return typeof _=="function"}g=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(B,Q,D){(function(N,g,w){"use strict";var k=B("babel-runtime/core-js/object/keys"),b=m(k);function m(u){return u&&u.__esModule?u:{default:u}}var T=B("./capability"),_=B("inherits"),t=B("./response"),h=B("readable-stream"),r=B("to-arraybuffer"),c=t.IncomingMessage,i=t.readyStates;function n(u,o){return T.fetch&&o?"fetch":T.mozchunkedarraybuffer?"moz-chunked-arraybuffer":T.msstream?"ms-stream":T.arraybuffer&&u?"arraybuffer":T.vbArray&&u?"text:vbarray":"text"}var l=Q.exports=function(u){var o=this;h.Writable.call(o),o._opts=u,o._body=[],o._headers={},u.auth&&o.setHeader("Authorization","Basic "+new w(u.auth).toString("base64")),(0,b.default)(u.headers).forEach(function(v){o.setHeader(v,u.headers[v])});var s,E=!0;if(u.mode==="disable-fetch"||"requestTimeout"in u&&!T.abortController)E=!1,s=!0;else if(u.mode==="prefer-streaming")s=!1;else if(u.mode==="allow-wrong-content-type")s=!T.overrideMimeType;else if(!u.mode||u.mode==="default"||u.mode==="prefer-fast")s=!0;else throw new Error("Invalid value for opts.mode");o._mode=n(s,E),o._fetchTimer=null,o.on("finish",function(){o._onFinish()})};_(l,h.Writable),l.prototype.setHeader=function(u,o){var s=this,E=u.toLowerCase();if(d.indexOf(E)!==-1)return;s._headers[E]={name:u,value:o}},l.prototype.getHeader=function(u){var o=this._headers[u.toLowerCase()];return o?o.value:null},l.prototype.removeHeader=function(u){var o=this;delete o._headers[u.toLowerCase()]},l.prototype._onFinish=function(){var u=this;if(u._destroyed)return;var o=u._opts,s=u._headers,E=null;o.method!=="GET"&&o.method!=="HEAD"&&(T.arraybuffer?E=r(w.concat(u._body)):T.blobConstructor?E=new g.Blob(u._body.map(function(x){return r(x)}),{type:(s["content-type"]||{}).value||""}):E=w.concat(u._body).toString());var v=[];if((0,b.default)(s).forEach(function(x){var C=s[x].name,S=s[x].value;Array.isArray(S)?S.forEach(function(F){v.push([C,F])}):v.push([C,S])}),u._mode==="fetch"){var p=null,I=null;if(T.abortController){var R=new AbortController;p=R.signal,u._fetchAbortController=R,"requestTimeout"in o&&o.requestTimeout!==0&&(u._fetchTimer=g.setTimeout(function(){u.emit("requestTimeout"),u._fetchAbortController&&u._fetchAbortController.abort()},o.requestTimeout))}g.fetch(u._opts.url,{method:u._opts.method,headers:v,body:E||void 0,mode:"cors",credentials:o.withCredentials?"include":"same-origin",signal:p}).then(function(x){u._fetchResponse=x,u._connect()},function(x){g.clearTimeout(u._fetchTimer),u._destroyed||u.emit("error",x)})}else{var y=u._xhr=new g.XMLHttpRequest;try{y.open(u._opts.method,u._opts.url,!0)}catch(x){N.nextTick(function(){u.emit("error",x)});return}"responseType"in y&&(y.responseType=u._mode.split(":")[0]),"withCredentials"in y&&(y.withCredentials=!!o.withCredentials),u._mode==="text"&&"overrideMimeType"in y&&y.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in o&&(y.timeout=o.requestTimeout,y.ontimeout=function(){u.emit("requestTimeout")}),v.forEach(function(x){y.setRequestHeader(x[0],x[1])}),u._response=null,y.onreadystatechange=function(){switch(y.readyState){case i.LOADING:case i.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(y.onprogress=function(){u._onXHRProgress()}),y.onerror=function(){if(u._destroyed)return;u.emit("error",new Error("XHR error"))};try{y.send(E)}catch(x){N.nextTick(function(){u.emit("error",x)});return}}};function f(u){try{var o=u.status;return o!==null&&o!==0}catch(s){return!1}}l.prototype._onXHRProgress=function(){var u=this;if(!f(u._xhr)||u._destroyed)return;u._response||u._connect(),u._response._onXHRProgress()},l.prototype._connect=function(){var u=this;if(u._destroyed)return;u._response=new c(u._xhr,u._fetchResponse,u._mode,u._fetchTimer),u._response.on("error",function(o){u.emit("error",o)}),u.emit("response",u._response)},l.prototype._write=function(u,o,s){var E=this;E._body.push(u),s()},l.prototype.abort=l.prototype.destroy=function(){var u=this;u._destroyed=!0,g.clearTimeout(u._fetchTimer),u._response&&(u._response._destroyed=!0),u._xhr?u._xhr.abort():u._fetchAbortController&&u._fetchAbortController.abort()},l.prototype.end=function(u,o,s){var E=this;typeof u=="function"&&(s=u,u=void 0),h.Writable.prototype.end.call(E,u,o,s)},l.prototype.flushHeaders=function(){},l.prototype.setTimeout=function(){},l.prototype.setNoDelay=function(){},l.prototype.setSocketKeepAlive=function(){};var d=["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,B("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},B("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(B,Q,D){(function(N,g,w){"use strict";var k=B("babel-runtime/core-js/promise"),b=m(k);function m(c){return c&&c.__esModule?c:{default:c}}var T=B("./capability"),_=B("inherits"),t=B("readable-stream"),h=D.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},r=D.IncomingMessage=function(c,i,n,l){var f=this;if(t.Readable.call(f),f._mode=n,f.headers={},f.rawHeaders=[],f.trailers={},f.rawTrailers=[],f.on("end",function(){N.nextTick(function(){f.emit("close")})}),n==="fetch"){var d=function p(){o.read().then(function(I){if(f._destroyed)return;if(I.done){g.clearTimeout(l),f.push(null);return}f.push(new w(I.value)),p()}).catch(function(I){g.clearTimeout(l),f._destroyed||f.emit("error",I)})};if(f._fetchResponse=i,f.url=i.url,f.statusCode=i.status,f.statusMessage=i.statusText,i.headers.forEach(function(p,I){f.headers[I.toLowerCase()]=p,f.rawHeaders.push(I,p)}),T.writableStream){var u=new WritableStream({write:function(I){return new b.default(function(R,y){f._destroyed?y():f.push(new w(I))?R():f._resumeFetch=R})},close:function(){g.clearTimeout(l),f._destroyed||f.push(null)},abort:function(I){f._destroyed||f.emit("error",I)}});try{i.body.pipeTo(u).catch(function(p){g.clearTimeout(l),f._destroyed||f.emit("error",p)});return}catch(p){}}var o=i.body.getReader();d()}else{f._xhr=c,f._pos=0,f.url=c.responseURL,f.statusCode=c.status,f.statusMessage=c.statusText;var s=c.getAllResponseHeaders().split(/\r?\n/);if(s.forEach(function(p){var I=p.match(/^([^:]+):\s*(.*)/);if(I){var R=I[1].toLowerCase();R==="set-cookie"?(f.headers[R]===void 0&&(f.headers[R]=[]),f.headers[R].push(I[2])):f.headers[R]!==void 0?f.headers[R]+=", "+I[2]:f.headers[R]=I[2],f.rawHeaders.push(I[1],I[2])}}),f._charset="x-user-defined",!T.overrideMimeType){var E=f.rawHeaders["mime-type"];if(E){var v=E.match(/;\s*charset=([^;])(;|$)/);v&&(f._charset=v[1].toLowerCase())}f._charset||(f._charset="utf-8")}}};_(r,t.Readable),r.prototype._read=function(){var c=this,i=c._resumeFetch;i&&(c._resumeFetch=null,i())},r.prototype._onXHRProgress=function(){var c=this,i=c._xhr,n=null;switch(c._mode){case"text:vbarray":if(i.readyState!==h.DONE)break;try{n=new g.VBArray(i.responseBody).toArray()}catch(o){}if(n!==null){c.push(new w(n));break}case"text":try{n=i.responseText}catch(o){c._mode="text:vbarray";break}if(n.length>c._pos){var l=n.substr(c._pos);if(c._charset==="x-user-defined"){for(var f=new w(l.length),d=0;d<l.length;d++)f[d]=l.charCodeAt(d)&255;c.push(f)}else c.push(l,c._charset);c._pos=n.length}break;case"arraybuffer":if(i.readyState!==h.DONE||!i.response)break;n=i.response,c.push(new w(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=i.response,i.readyState!==h.LOADING||!n)break;c.push(new w(new Uint8Array(n)));break;case"ms-stream":if(n=i.response,i.readyState!==h.LOADING)break;var u=new g.MSStreamReader;u.onprogress=function(){u.result.byteLength>c._pos&&(c.push(new w(new Uint8Array(u.result.slice(c._pos)))),c._pos=u.result.byteLength)},u.onload=function(){c.push(null)},u.readAsArrayBuffer(n);break}c._xhr.readyState===h.DONE&&c._mode!=="ms-stream"&&c.push(null)}}).call(this,B("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},B("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(B,Q,D){"use strict";var N=B("safe-buffer").Buffer,g=N.isEncoding||function(u){u=""+u;switch(u&&u.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 w(u){if(!u)return"utf8";for(var o;;)switch(u){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 u;default:if(o)return;u=(""+u).toLowerCase(),o=!0}}function k(u){var o=w(u);if(typeof o!="string"&&(N.isEncoding===g||!g(u)))throw new Error("Unknown encoding: "+u);return o||u}D.StringDecoder=b;function b(u){this.encoding=k(u);var o;switch(this.encoding){case"utf16le":this.text=c,this.end=i,o=4;break;case"utf8":this.fillLast=t,o=4;break;case"base64":this.text=n,this.end=l,o=3;break;default:this.write=f,this.end=d;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=N.allocUnsafe(o)}b.prototype.write=function(u){if(u.length===0)return"";var o,s;if(this.lastNeed){if(o=this.fillLast(u),o===void 0)return"";s=this.lastNeed,this.lastNeed=0}else s=0;return s<u.length?o?o+this.text(u,s):this.text(u,s):o||""},b.prototype.end=r,b.prototype.text=h,b.prototype.fillLast=function(u){if(this.lastNeed<=u.length)return u.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,this.lastTotal-this.lastNeed,0,u.length),this.lastNeed-=u.length};function m(u){return u<=127?0:u>>5===6?2:u>>4===14?3:u>>3===30?4:u>>6===2?-1:-2}function T(u,o,s){var E=o.length-1;if(E<s)return 0;var v=m(o[E]);return v>=0?(v>0&&(u.lastNeed=v-1),v):--E<s||v===-2?0:(v=m(o[E]),v>=0?(v>0&&(u.lastNeed=v-2),v):--E<s||v===-2?0:(v=m(o[E]),v>=0?(v>0&&(v===2?v=0:u.lastNeed=v-3),v):0))}function _(u,o,s){if((o[0]&192)!==128)return u.lastNeed=0,"\uFFFD";if(u.lastNeed>1&&o.length>1){if((o[1]&192)!==128)return u.lastNeed=1,"\uFFFD";if(u.lastNeed>2&&o.length>2&&(o[2]&192)!==128)return u.lastNeed=2,"\uFFFD"}}function t(u){var o=this.lastTotal-this.lastNeed,s=_(this,u,o);if(s!==void 0)return s;if(this.lastNeed<=u.length)return u.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,o,0,u.length),this.lastNeed-=u.length}function h(u,o){var s=T(this,u,o);if(!this.lastNeed)return u.toString("utf8",o);this.lastTotal=s;var E=u.length-(s-this.lastNeed);return u.copy(this.lastChar,0,E),u.toString("utf8",o,E)}function r(u){var o=u&&u.length?this.write(u):"";return this.lastNeed?o+"\uFFFD":o}function c(u,o){if((u.length-o)%2===0){var s=u.toString("utf16le",o);if(s){var E=s.charCodeAt(s.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1],s.slice(0,-1)}return s}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=u[u.length-1],u.toString("utf16le",o,u.length-1)}function i(u){var o=u&&u.length?this.write(u):"";if(this.lastNeed){var s=this.lastTotal-this.lastNeed;return o+this.lastChar.toString("utf16le",0,s)}return o}function n(u,o){var s=(u.length-o)%3;return s===0?u.toString("base64",o):(this.lastNeed=3-s,this.lastTotal=3,s===1?this.lastChar[0]=u[u.length-1]:(this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1]),u.toString("base64",o,u.length-s))}function l(u){var o=u&&u.length?this.write(u):"";return this.lastNeed?o+this.lastChar.toString("base64",0,3-this.lastNeed):o}function f(u){return u.toString(this.encoding)}function d(u){return u&&u.length?this.write(u):""}},{"safe-buffer":228}],236:[function(B,Q,D){(function(N,g){var w=B("process/browser.js").nextTick,k=Function.prototype.apply,b=Array.prototype.slice,m={},T=0;D.setTimeout=function(){return new _(k.call(setTimeout,window,arguments),clearTimeout)},D.setInterval=function(){return new _(k.call(setInterval,window,arguments),clearInterval)},D.clearTimeout=D.clearInterval=function(t){t.close()};function _(t,h){this._id=t,this._clearFn=h}_.prototype.unref=_.prototype.ref=function(){},_.prototype.close=function(){this._clearFn.call(window,this._id)},D.enroll=function(t,h){clearTimeout(t._idleTimeoutId),t._idleTimeout=h},D.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},D._unrefActive=D.active=function(t){clearTimeout(t._idleTimeoutId);var h=t._idleTimeout;h>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},h))},D.setImmediate=typeof N=="function"?N:function(t){var h=T++,r=arguments.length<2?!1:b.call(arguments,1);return m[h]=!0,w(function(){m[h]&&(r?t.apply(null,r):t.call(null),D.clearImmediate(h))}),h},D.clearImmediate=typeof g=="function"?g:function(t){delete m[t]}}).call(this,B("timers").setImmediate,B("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(B,Q,D){var N=B("buffer").Buffer;Q.exports=function(g){if(g instanceof Uint8Array){if(g.byteOffset===0&&g.byteLength===g.buffer.byteLength)return g.buffer;if(typeof g.buffer.slice=="function")return g.buffer.slice(g.byteOffset,g.byteOffset+g.byteLength)}if(N.isBuffer(g)){for(var w=new Uint8Array(g.length),k=g.length,b=0;b<k;b++)w[b]=g[b];return w.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(B,Q,D){"use strict";var N=B("punycode"),g=B("./util");D.parse=o,D.resolve=E,D.resolveObject=v,D.format=s,D.Url=w;function w(){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 k=/^([a-z0-9.+-]+:)/i,b=/:[0-9]*$/,m=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,T=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],_=["{","}","|","\\","^","`"].concat(T),t=["'"].concat(_),h=["%","/","?",";","#"].concat(t),r=["/","?","#"],c=255,i=/^[+a-z0-9A-Z_-]{0,63}$/,n=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,l={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},d={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},u=B("querystring");function o(p,I,R){if(p&&g.isObject(p)&&p instanceof w)return p;var y=new w;return y.parse(p,I,R),y}w.prototype.parse=function(p,I,R){if(!g.isString(p))throw new TypeError("Parameter 'url' must be a string, not "+typeof p);var y=p.indexOf("?"),x=y!==-1&&y<p.indexOf("#")?"?":"#",C=p.split(x),S=/\\/g;C[0]=C[0].replace(S,"/"),p=C.join(x);var F=p;if(F=F.trim(),!R&&p.split("#").length===1){var j=m.exec(F);if(j)return this.path=F,this.href=F,this.pathname=j[1],j[2]?(this.search=j[2],I?this.query=u.parse(this.search.substr(1)):this.query=this.search.substr(1)):I&&(this.search="",this.query={}),this}var A=k.exec(F);if(A){A=A[0];var Y=A.toLowerCase();this.protocol=Y,F=F.substr(A.length)}if(R||A||F.match(/^\/\/[^@\/]+@[^@\/]+/)){var z=F.substr(0,2)==="//";z&&!(A&&f[A])&&(F=F.substr(2),this.slashes=!0)}if(!f[A]&&(z||A&&!d[A])){for(var O=-1,H=0;H<r.length;H++){var U=F.indexOf(r[H]);U!==-1&&(O===-1||U<O)&&(O=U)}var L,K;O===-1?K=F.lastIndexOf("@"):K=F.lastIndexOf("@",O),K!==-1&&(L=F.slice(0,K),F=F.slice(K+1),this.auth=decodeURIComponent(L)),O=-1;for(var H=0;H<h.length;H++){var U=F.indexOf(h[H]);U!==-1&&(O===-1||U<O)&&(O=U)}O===-1&&(O=F.length),this.host=F.slice(0,O),F=F.slice(O),this.parseHost(),this.hostname=this.hostname||"";var ee=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ee)for(var oe=this.hostname.split(/\./),H=0,ae=oe.length;H<ae;H++){var be=oe[H];if(!be)continue;if(!be.match(i)){for(var _e="",fe=0,Re=be.length;fe<Re;fe++)be.charCodeAt(fe)>127?_e+="x":_e+=be[fe];if(!_e.match(i)){var Ce=oe.slice(0,H),ce=oe.slice(H+1),te=be.match(n);te&&(Ce.push(te[1]),ce.unshift(te[2])),ce.length&&(F="/"+ce.join(".")+F),this.hostname=Ce.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),ee||(this.hostname=N.toASCII(this.hostname));var W=this.port?":"+this.port:"",X=this.hostname||"";this.host=X+W,this.href+=this.host,ee&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),F[0]!=="/"&&(F="/"+F))}if(!l[Y])for(var H=0,ae=t.length;H<ae;H++){var V=t[H];if(F.indexOf(V)===-1)continue;var Z=encodeURIComponent(V);Z===V&&(Z=escape(V)),F=F.split(V).join(Z)}var q=F.indexOf("#");q!==-1&&(this.hash=F.substr(q),F=F.slice(0,q));var ie=F.indexOf("?");if(ie!==-1?(this.search=F.substr(ie),this.query=F.substr(ie+1),I&&(this.query=u.parse(this.query)),F=F.slice(0,ie)):I&&(this.search="",this.query={}),F&&(this.pathname=F),d[Y]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var W=this.pathname||"",ne=this.search||"";this.path=W+ne}return this.href=this.format(),this};function s(p){return g.isString(p)&&(p=o(p)),p instanceof w?p.format():w.prototype.format.call(p)}w.prototype.format=function(){var p=this.auth||"";p&&(p=encodeURIComponent(p),p=p.replace(/%3A/i,":"),p+="@");var I=this.protocol||"",R=this.pathname||"",y=this.hash||"",x=!1,C="";this.host?x=p+this.host:this.hostname&&(x=p+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(x+=":"+this.port)),this.query&&g.isObject(this.query)&&Object.keys(this.query).length&&(C=u.stringify(this.query));var S=this.search||C&&"?"+C||"";return I&&I.substr(-1)!==":"&&(I+=":"),this.slashes||(!I||d[I])&&x!==!1?(x="//"+(x||""),R&&R.charAt(0)!=="/"&&(R="/"+R)):x||(x=""),y&&y.charAt(0)!=="#"&&(y="#"+y),S&&S.charAt(0)!=="?"&&(S="?"+S),R=R.replace(/[?#]/g,function(F){return encodeURIComponent(F)}),S=S.replace("#","%23"),I+x+R+S+y};function E(p,I){return o(p,!1,!0).resolve(I)}w.prototype.resolve=function(p){return this.resolveObject(o(p,!1,!0)).format()};function v(p,I){return p?o(p,!1,!0).resolveObject(I):I}w.prototype.resolveObject=function(p){if(g.isString(p)){var I=new w;I.parse(p,!1,!0),p=I}for(var R=new w,y=Object.keys(this),x=0;x<y.length;x++){var C=y[x];R[C]=this[C]}if(R.hash=p.hash,p.href==="")return R.href=R.format(),R;if(p.slashes&&!p.protocol){for(var S=Object.keys(p),F=0;F<S.length;F++){var j=S[F];j!=="protocol"&&(R[j]=p[j])}return d[R.protocol]&&R.hostname&&!R.pathname&&(R.path=R.pathname="/"),R.href=R.format(),R}if(p.protocol&&p.protocol!==R.protocol){if(!d[p.protocol]){for(var A=Object.keys(p),Y=0;Y<A.length;Y++){var z=A[Y];R[z]=p[z]}return R.href=R.format(),R}if(R.protocol=p.protocol,!p.host&&!f[p.protocol]){for(var ae=(p.pathname||"").split("/");ae.length&&!(p.host=ae.shift()););p.host||(p.host=""),p.hostname||(p.hostname=""),ae[0]!==""&&ae.unshift(""),ae.length<2&&ae.unshift(""),R.pathname=ae.join("/")}else R.pathname=p.pathname;if(R.search=p.search,R.query=p.query,R.host=p.host||"",R.auth=p.auth,R.hostname=p.hostname||p.host,R.port=p.port,R.pathname||R.search){var O=R.pathname||"",H=R.search||"";R.path=O+H}return R.slashes=R.slashes||p.slashes,R.href=R.format(),R}var U=R.pathname&&R.pathname.charAt(0)==="/",L=p.host||p.pathname&&p.pathname.charAt(0)==="/",K=L||U||R.host&&p.pathname,ee=K,oe=R.pathname&&R.pathname.split("/")||[],ae=p.pathname&&p.pathname.split("/")||[],be=R.protocol&&!d[R.protocol];if(be&&(R.hostname="",R.port=null,R.host&&(oe[0]===""?oe[0]=R.host:oe.unshift(R.host)),R.host="",p.protocol&&(p.hostname=null,p.port=null,p.host&&(ae[0]===""?ae[0]=p.host:ae.unshift(p.host)),p.host=null),K=K&&(ae[0]===""||oe[0]==="")),L)R.host=p.host||p.host===""?p.host:R.host,R.hostname=p.hostname||p.hostname===""?p.hostname:R.hostname,R.search=p.search,R.query=p.query,oe=ae;else if(ae.length)oe||(oe=[]),oe.pop(),oe=oe.concat(ae),R.search=p.search,R.query=p.query;else if(!g.isNullOrUndefined(p.search)){if(be){R.hostname=R.host=oe.shift();var _e=R.host&&R.host.indexOf("@")>0?R.host.split("@"):!1;_e&&(R.auth=_e.shift(),R.host=R.hostname=_e.shift())}return R.search=p.search,R.query=p.query,(!g.isNull(R.pathname)||!g.isNull(R.search))&&(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.href=R.format(),R}if(!oe.length)return R.pathname=null,R.search?R.path="/"+R.search:R.path=null,R.href=R.format(),R;for(var fe=oe.slice(-1)[0],Re=(R.host||p.host||oe.length>1)&&(fe==="."||fe==="..")||fe==="",Ce=0,ce=oe.length;ce>=0;ce--)fe=oe[ce],fe==="."?oe.splice(ce,1):fe===".."?(oe.splice(ce,1),Ce++):Ce&&(oe.splice(ce,1),Ce--);if(!K&&!ee)for(;Ce--;Ce)oe.unshift("..");K&&oe[0]!==""&&(!oe[0]||oe[0].charAt(0)!=="/")&&oe.unshift(""),Re&&oe.join("/").substr(-1)!=="/"&&oe.push("");var te=oe[0]===""||oe[0]&&oe[0].charAt(0)==="/";if(be){R.hostname=R.host=te?"":oe.length?oe.shift():"";var _e=R.host&&R.host.indexOf("@")>0?R.host.split("@"):!1;_e&&(R.auth=_e.shift(),R.host=R.hostname=_e.shift())}return K=K||R.host&&oe.length,K&&!te&&oe.unshift(""),oe.length?R.pathname=oe.join("/"):(R.pathname=null,R.path=null),(!g.isNull(R.pathname)||!g.isNull(R.search))&&(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.auth=p.auth||R.auth,R.slashes=R.slashes||p.slashes,R.href=R.format(),R},w.prototype.parseHost=function(){var p=this.host,I=b.exec(p);I&&(I=I[0],I!==":"&&(this.port=I.substr(1)),p=p.substr(0,p.length-I.length)),p&&(this.hostname=p)}},{"./util":239,punycode:209,querystring:212}],239:[function(B,Q,D){"use strict";Q.exports={isString:function(N){return typeof N=="string"},isObject:function(N){return typeof N=="object"&&N!==null},isNull:function(N){return N===null},isNullOrUndefined:function(N){return N==null}}},{}],240:[function(B,Q,D){(function(N){Q.exports=g;function g(k,b){if(w("noDeprecation"))return k;var m=!1;function T(){if(!m){if(w("throwDeprecation"))throw new Error(b);w("traceDeprecation")?console.trace(b):console.warn(b),m=!0}return k.apply(this,arguments)}return T}function w(k){try{if(!N.localStorage)return!1}catch(m){return!1}var b=N.localStorage[k];return b==null?!1:String(b).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(B,Q,D){typeof Object.create=="function"?Q.exports=function(g,w){g.super_=w,g.prototype=Object.create(w.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})}:Q.exports=function(g,w){g.super_=w;var k=function(){};k.prototype=w.prototype,g.prototype=new k,g.prototype.constructor=g}},{}],242:[function(B,Q,D){Q.exports=function(g){return g&&typeof g=="object"&&typeof g.copy=="function"&&typeof g.fill=="function"&&typeof g.readUInt8=="function"}},{}],243:[function(B,Q,D){(function(N,g){var w=/%[sdj%]/g;D.format=function(O){if(!E(O)){for(var H=[],U=0;U<arguments.length;U++)H.push(m(arguments[U]));return H.join(" ")}for(var U=1,L=arguments,K=L.length,ee=String(O).replace(w,function(ae){if(ae==="%%")return"%";if(U>=K)return ae;switch(ae){case"%s":return String(L[U++]);case"%d":return Number(L[U++]);case"%j":try{return JSON.stringify(L[U++])}catch(be){return"[Circular]"}default:return ae}}),oe=L[U];U<K;oe=L[++U])u(oe)||!R(oe)?ee+=" "+oe:ee+=" "+m(oe);return ee},D.deprecate=function(O,H){if(p(g.process))return function(){return D.deprecate(O,H).apply(this,arguments)};if(N.noDeprecation===!0)return O;var U=!1;function L(){if(!U){if(N.throwDeprecation)throw new Error(H);N.traceDeprecation?console.trace(H):console.error(H),U=!0}return O.apply(this,arguments)}return L};var k={},b;D.debuglog=function(O){if(p(b)&&(b=N.env.NODE_DEBUG||""),O=O.toUpperCase(),!k[O])if(new RegExp("\\b"+O+"\\b","i").test(b)){var H=N.pid;k[O]=function(){var U=D.format.apply(D,arguments);console.error("%s %d: %s",O,H,U)}}else k[O]=function(){};return k[O]};function m(O,H){var U={seen:[],stylize:_};return arguments.length>=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),d(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=T),h(U,O,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 T(O,H){var U=m.styles[H];return U?"["+m.colors[U][0]+"m"+O+"["+m.colors[U][1]+"m":O}function _(O,H){return O}function t(O){var H={};return O.forEach(function(U,L){H[U]=!0}),H}function h(O,H,U){if(O.customInspect&&H&&C(H.inspect)&&H.inspect!==D.inspect&&!(H.constructor&&H.constructor.prototype===H)){var L=H.inspect(U,O);return E(L)||(L=h(O,L,U)),L}var K=r(O,H);if(K)return K;var ee=Object.keys(H),oe=t(ee);if(O.showHidden&&(ee=Object.getOwnPropertyNames(H)),x(H)&&(ee.indexOf("message")>=0||ee.indexOf("description")>=0))return c(H);if(ee.length===0){if(C(H)){var ae=H.name?": "+H.name:"";return O.stylize("[Function"+ae+"]","special")}if(I(H))return O.stylize(RegExp.prototype.toString.call(H),"regexp");if(y(H))return O.stylize(Date.prototype.toString.call(H),"date");if(x(H))return c(H)}var be="",_e=!1,fe=["{","}"];if(f(H)&&(_e=!0,fe=["[","]"]),C(H)){var Re=H.name?": "+H.name:"";be=" [Function"+Re+"]"}if(I(H)&&(be=" "+RegExp.prototype.toString.call(H)),y(H)&&(be=" "+Date.prototype.toUTCString.call(H)),x(H)&&(be=" "+c(H)),ee.length===0&&(!_e||H.length==0))return fe[0]+be+fe[1];if(U<0)return I(H)?O.stylize(RegExp.prototype.toString.call(H),"regexp"):O.stylize("[Object]","special");O.seen.push(H);var Ce;return _e?Ce=i(O,H,U,oe,ee):Ce=ee.map(function(ce){return n(O,H,U,oe,ce,_e)}),O.seen.pop(),l(Ce,be,fe)}function r(O,H){if(p(H))return O.stylize("undefined","undefined");if(E(H)){var U="'"+JSON.stringify(H).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return O.stylize(U,"string")}if(s(H))return O.stylize(""+H,"number");if(d(H))return O.stylize(""+H,"boolean");if(u(H))return O.stylize("null","null")}function c(O){return"["+Error.prototype.toString.call(O)+"]"}function i(O,H,U,L,K){for(var ee=[],oe=0,ae=H.length;oe<ae;++oe)z(H,String(oe))?ee.push(n(O,H,U,L,String(oe),!0)):ee.push("");return K.forEach(function(be){be.match(/^\d+$/)||ee.push(n(O,H,U,L,be,!0))}),ee}function n(O,H,U,L,K,ee){var oe,ae,be;if(be=Object.getOwnPropertyDescriptor(H,K)||{value:H[K]},be.get?be.set?ae=O.stylize("[Getter/Setter]","special"):ae=O.stylize("[Getter]","special"):be.set&&(ae=O.stylize("[Setter]","special")),z(L,K)||(oe="["+K+"]"),ae||(O.seen.indexOf(be.value)<0?(u(U)?ae=h(O,be.value,null):ae=h(O,be.value,U-1),ae.indexOf(`
|
|
|
`)>-1&&(ee?ae=ae.split(`
|
|
|
`).map(function(_e){return" "+_e}).join(`
|
|
|
`).substr(2):ae=`
|
|
|
`+ae.split(`
|
|
|
`).map(function(_e){return" "+_e}).join(`
|
|
|
`))):ae=O.stylize("[Circular]","special")),p(oe)){if(ee&&K.match(/^\d+$/))return ae;oe=JSON.stringify(""+K),oe.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(oe=oe.substr(1,oe.length-2),oe=O.stylize(oe,"name")):(oe=oe.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),oe=O.stylize(oe,"string"))}return oe+": "+ae}function l(O,H,U){var L=0,K=O.reduce(function(ee,oe){return L++,oe.indexOf(`
|
|
|
`)>=0&&L++,ee+oe.replace(/\u001b\[\d\d?m/g,"").length+1},0);return K>60?U[0]+(H===""?"":H+`
|
|
|
`)+" "+O.join(`,
|
|
|
`)+" "+U[1]:U[0]+H+" "+O.join(", ")+" "+U[1]}function f(O){return Array.isArray(O)}D.isArray=f;function d(O){return typeof O=="boolean"}D.isBoolean=d;function u(O){return O===null}D.isNull=u;function o(O){return O==null}D.isNullOrUndefined=o;function s(O){return typeof O=="number"}D.isNumber=s;function E(O){return typeof O=="string"}D.isString=E;function v(O){return typeof O=="symbol"}D.isSymbol=v;function p(O){return O===void 0}D.isUndefined=p;function I(O){return R(O)&&F(O)==="[object RegExp]"}D.isRegExp=I;function R(O){return typeof O=="object"&&O!==null}D.isObject=R;function y(O){return R(O)&&F(O)==="[object Date]"}D.isDate=y;function x(O){return R(O)&&(F(O)==="[object Error]"||O instanceof Error)}D.isError=x;function C(O){return typeof O=="function"}D.isFunction=C;function S(O){return O===null||typeof O=="boolean"||typeof O=="number"||typeof O=="string"||typeof O=="symbol"||typeof O=="undefined"}D.isPrimitive=S,D.isBuffer=B("./support/isBuffer");function F(O){return Object.prototype.toString.call(O)}function j(O){return O<10?"0"+O.toString(10):O.toString(10)}var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Y(){var O=new Date,H=[j(O.getHours()),j(O.getMinutes()),j(O.getSeconds())].join(":");return[O.getDate(),A[O.getMonth()],H].join(" ")}D.log=function(){console.log("%s - %s",Y(),D.format.apply(D,arguments))},D.inherits=B("inherits"),D._extend=function(O,H){if(!H||!R(H))return O;for(var U=Object.keys(H),L=U.length;L--;)O[U[L]]=H[U[L]];return O};function z(O,H){return Object.prototype.hasOwnProperty.call(O,H)}}).call(this,B("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(B,Q,D){"use strict";(function(){"use strict";D.stripBOM=function(N){return N[0]==="\uFEFF"?N.substring(1):N}}).call(void 0)},{}],245:[function(B,Q,D){"use strict";var N=B("babel-runtime/helpers/typeof"),g=b(N),w=B("babel-runtime/core-js/object/keys"),k=b(w);function b(m){return m&&m.__esModule?m:{default:m}}(function(){"use strict";var m,T,_,t,h,r={}.hasOwnProperty;m=B("xmlbuilder"),T=B("./defaults").defaults,t=function(i){return typeof i=="string"&&(i.indexOf("&")>=0||i.indexOf(">")>=0||i.indexOf("<")>=0)},h=function(i){return"<![CDATA["+_(i)+"]]>"},_=function(i){return i.replace("]]>","]]]]><![CDATA[>")},D.Builder=function(){function c(i){var n,l,f;this.options={},l=T["0.2"];for(n in l){if(!r.call(l,n))continue;f=l[n],this.options[n]=f}for(n in i){if(!r.call(i,n))continue;f=i[n],this.options[n]=f}}return c.prototype.buildObject=function(i){var n,l,f,d,u;return n=this.options.attrkey,l=this.options.charkey,(0,k.default)(i).length===1&&this.options.rootName===T["0.2"].rootName?(u=(0,k.default)(i)[0],i=i[u]):u=this.options.rootName,f=function(o){return function(s,E){var v,p,I,R,y,x;if((typeof E=="undefined"?"undefined":(0,g.default)(E))!=="object")o.options.cdata&&t(E)?s.raw(h(E)):s.txt(E);else if(Array.isArray(E))for(R in E){if(!r.call(E,R))continue;p=E[R];for(y in p)I=p[y],s=f(s.ele(y),I).up()}else for(y in E){if(!r.call(E,y))continue;if(p=E[y],y===n){if((typeof p=="undefined"?"undefined":(0,g.default)(p))==="object")for(v in p)x=p[v],s=s.att(v,x)}else if(y===l)o.options.cdata&&t(p)?s=s.raw(h(p)):s=s.txt(p);else if(Array.isArray(p))for(R in p){if(!r.call(p,R))continue;I=p[R],typeof I=="string"?o.options.cdata&&t(I)?s=s.ele(y).raw(h(I)).up():s=s.ele(y,I).up():s=f(s.ele(y),I).up()}else(typeof p=="undefined"?"undefined":(0,g.default)(p))==="object"?s=f(s.ele(y),p).up():typeof p=="string"&&o.options.cdata&&t(p)?s=s.ele(y).raw(h(p)).up():(p==null&&(p=""),s=s.ele(y,p.toString()).up())}return s}}(this),d=m.create(u,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),f(d,i).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(B,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(B,Q,D){"use strict";var N=B("babel-runtime/core-js/promise"),g=t(N),w=B("babel-runtime/core-js/object/get-own-property-names"),k=t(w),b=B("babel-runtime/core-js/object/keys"),m=t(b),T=B("babel-runtime/helpers/typeof"),_=t(T);function t(h){return h&&h.__esModule?h:{default:h}}(function(){"use strict";var h,r,c,i,n,l,f,d,u=function(v,p){return function(){return v.apply(p,arguments)}},o=function(v,p){for(var I in p)s.call(p,I)&&(v[I]=p[I]);function R(){this.constructor=v}return R.prototype=p.prototype,v.prototype=new R,v.__super__=p.prototype,v},s={}.hasOwnProperty;f=B("sax"),c=B("events"),h=B("./bom"),l=B("./processors"),d=B("timers").setImmediate,r=B("./defaults").defaults,i=function(v){return(typeof v=="undefined"?"undefined":(0,_.default)(v))==="object"&&v!=null&&(0,m.default)(v).length===0},n=function(v,p,I){var R,y,x;for(R=0,y=v.length;R<y;R++)x=v[R],p=x(p,I);return p},D.Parser=function(E){o(v,E);function v(p){this.parseStringPromise=u(this.parseStringPromise,this),this.parseString=u(this.parseString,this),this.reset=u(this.reset,this),this.assignOrPush=u(this.assignOrPush,this),this.processAsync=u(this.processAsync,this);var I,R,y;if(!(this instanceof D.Parser))return new D.Parser(p);this.options={},R=r["0.2"];for(I in R){if(!s.call(R,I))continue;y=R[I],this.options[I]=y}for(I in p){if(!s.call(p,I))continue;y=p[I],this.options[I]=y}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(l.normalize)),this.reset()}return v.prototype.processAsync=function(){var p,I;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),d(this.processAsync))}catch(R){if(I=R,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(I)}},v.prototype.assignOrPush=function(p,I,R){return I in p?(p[I]instanceof Array||(p[I]=[p[I]]),p[I].push(R)):this.options.explicitArray?p[I]=[R]:p[I]=R},v.prototype.reset=function(){var p,I,R,y;return this.removeAllListeners(),this.saxParser=f.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(x){return function(C){if(x.saxParser.resume(),!x.saxParser.errThrown)return x.saxParser.errThrown=!0,x.emit("error",C)}}(this),this.saxParser.onend=function(x){return function(){if(!x.saxParser.ended)return x.saxParser.ended=!0,x.emit("end",x.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,y=[],p=this.options.attrkey,I=this.options.charkey,this.saxParser.onopentag=function(x){return function(C){var S,F,j,A,Y;if(j={},j[I]="",!x.options.ignoreAttrs){Y=C.attributes;for(S in Y){if(!s.call(Y,S))continue;!(p in j)&&!x.options.mergeAttrs&&(j[p]={}),F=x.options.attrValueProcessors?n(x.options.attrValueProcessors,C.attributes[S],S):C.attributes[S],A=x.options.attrNameProcessors?n(x.options.attrNameProcessors,S):S,x.options.mergeAttrs?x.assignOrPush(j,A,F):j[p][A]=F}}return j["#name"]=x.options.tagNameProcessors?n(x.options.tagNameProcessors,C.name):C.name,x.options.xmlns&&(j[x.options.xmlnskey]={uri:C.uri,local:C.local}),y.push(j)}}(this),this.saxParser.onclosetag=function(x){return function(){var C,S,F,j,A,Y,z,O,H,U;if(Y=y.pop(),A=Y["#name"],(!x.options.explicitChildren||!x.options.preserveChildrenOrder)&&delete Y["#name"],Y.cdata===!0&&(C=Y.cdata,delete Y.cdata),H=y[y.length-1],Y[I].match(/^\s*$/)&&!C?(S=Y[I],delete Y[I]):(x.options.trim&&(Y[I]=Y[I].trim()),x.options.normalize&&(Y[I]=Y[I].replace(/\s{2,}/g," ").trim()),Y[I]=x.options.valueProcessors?n(x.options.valueProcessors,Y[I],A):Y[I],(0,m.default)(Y).length===1&&I in Y&&!x.EXPLICIT_CHARKEY&&(Y=Y[I])),i(Y)&&(Y=x.options.emptyTag!==""?x.options.emptyTag:S),x.options.validator!=null&&(U="/"+function(){var L,K,ee;for(ee=[],L=0,K=y.length;L<K;L++)j=y[L],ee.push(j["#name"]);return ee}().concat(A).join("/"),function(){var L;try{return Y=x.options.validator(U,H&&H[A],Y)}catch(K){return L=K,x.emit("error",L)}}()),x.options.explicitChildren&&!x.options.mergeAttrs&&(typeof Y=="undefined"?"undefined":(0,_.default)(Y))==="object"){if(!x.options.preserveChildrenOrder)j={},x.options.attrkey in Y&&(j[x.options.attrkey]=Y[x.options.attrkey],delete Y[x.options.attrkey]),!x.options.charsAsChildren&&x.options.charkey in Y&&(j[x.options.charkey]=Y[x.options.charkey],delete Y[x.options.charkey]),(0,k.default)(Y).length>0&&(j[x.options.childkey]=Y),Y=j;else if(H){H[x.options.childkey]=H[x.options.childkey]||[],z={};for(F in Y){if(!s.call(Y,F))continue;z[F]=Y[F]}H[x.options.childkey].push(z),delete Y["#name"],(0,m.default)(Y).length===1&&I in Y&&!x.EXPLICIT_CHARKEY&&(Y=Y[I])}}return y.length>0?x.assignOrPush(H,A,Y):(x.options.explicitRoot&&(O=Y,Y={},Y[A]=O),x.resultObject=Y,x.saxParser.ended=!0,x.emit("end",x.resultObject))}}(this),R=function(x){return function(C){var S,F;if(F=y[y.length-1],F)return F[I]+=C,x.options.explicitChildren&&x.options.preserveChildrenOrder&&x.options.charsAsChildren&&(x.options.includeWhiteChars||C.replace(/\\n/g,"").trim()!=="")&&(F[x.options.childkey]=F[x.options.childkey]||[],S={"#name":"__text__"},S[I]=C,x.options.normalize&&(S[I]=S[I].replace(/\s{2,}/g," ").trim()),F[x.options.childkey].push(S)),F}}(this),this.saxParser.ontext=R,this.saxParser.oncdata=function(x){return function(C){var S;if(S=R(C),S)return S.cdata=!0}}(this)},v.prototype.parseString=function(p,I){var R;I!=null&&typeof I=="function"&&(this.on("end",function(y){return this.reset(),I(null,y)}),this.on("error",function(y){return this.reset(),I(y)}));try{return p=p.toString(),p.trim()===""?(this.emit("end",null),!0):(p=h.stripBOM(p),this.options.async?(this.remaining=p,d(this.processAsync),this.saxParser):this.saxParser.write(p).close())}catch(y){if(R=y,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw R}else return this.emit("error",R),this.saxParser.errThrown=!0}},v.prototype.parseStringPromise=function(p){return new g.default(function(I){return function(R,y){return I.parseString(p,function(x,C){return x?y(x):R(C)})}}(this))},v}(c),D.parseString=function(E,v,p){var I,R,y;return p!=null?(typeof p=="function"&&(I=p),(typeof v=="undefined"?"undefined":(0,_.default)(v))==="object"&&(R=v)):(typeof v=="function"&&(I=v),R={}),y=new D.Parser(R),y.parseString(E,I)},D.parseStringPromise=function(E,v){var p,I;return(typeof v=="undefined"?"undefined":(0,_.default)(v))==="object"&&(p=v),I=new D.Parser(p),I.parseStringPromise(E)}}).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(B,Q,D){"use strict";(function(){"use strict";var N;N=new RegExp(/(?!xmlns)^.*:/),D.normalize=function(g){return g.toLowerCase()},D.firstCharLowerCase=function(g){return g.charAt(0).toLowerCase()+g.slice(1)},D.stripPrefix=function(g){return g.replace(N,"")},D.parseNumbers=function(g){return isNaN(g)||(g=g%1===0?parseInt(g,10):parseFloat(g)),g},D.parseBooleans=function(g){return/^(?:true|false)$/i.test(g)&&(g=g.toLowerCase()==="true"),g}}).call(void 0)},{}],249:[function(B,Q,D){"use strict";(function(){"use strict";var N,g,w,k,b=function(_,t){for(var h in t)m.call(t,h)&&(_[h]=t[h]);function r(){this.constructor=_}return r.prototype=t.prototype,_.prototype=new r,_.__super__=t.prototype,_},m={}.hasOwnProperty;g=B("./defaults"),N=B("./builder"),w=B("./parser"),k=B("./processors"),D.defaults=g.defaults,D.processors=k,D.ValidationError=function(T){b(_,T);function _(t){this.message=t}return _}(Error),D.Builder=N.Builder,D.Parser=w.Parser,D.parseString=w.parseString,D.parseStringPromise=w.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(B,Q,D){"use strict";(function(){Q.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(B,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(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/get-prototype-of"),g=T(N),w=B("babel-runtime/helpers/typeof"),k=T(w),b=B("babel-runtime/core-js/object/assign"),m=T(b);function T(_){return _&&_.__esModule?_:{default:_}}(function(){var _,t,h,r,c,i,n,l=[].slice,f={}.hasOwnProperty;_=function(){var u,o,s,E,v,p;if(p=arguments[0],v=2<=arguments.length?l.call(arguments,1):[],c(m.default))m.default.apply(null,arguments);else for(u=0,s=v.length;u<s;u++)if(E=v[u],E!=null)for(o in E){if(!f.call(E,o))continue;p[o]=E[o]}return p},c=function(u){return!!u&&Object.prototype.toString.call(u)==="[object Function]"},i=function(u){var o;return!!u&&((o=typeof u=="undefined"?"undefined":(0,k.default)(u))==="function"||o==="object")},h=function(u){return c(Array.isArray)?Array.isArray(u):Object.prototype.toString.call(u)==="[object Array]"},r=function(u){var o;if(h(u))return!u.length;for(o in u){if(!f.call(u,o))continue;return!1}return!0},n=function(u){var o,s;return i(u)&&(s=(0,g.default)(u))&&(o=s.constructor)&&typeof o=="function"&&o instanceof o&&Function.prototype.toString.call(o)===Function.prototype.toString.call(Object)},t=function(u){return c(u.valueOf)?u.valueOf():u},Q.exports.assign=_,Q.exports.isFunction=c,Q.exports.isObject=i,Q.exports.isArray=h,Q.exports.isEmpty=r,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(B,Q,D){"use strict";(function(){Q.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/create"),g=w(N);function w(k){return k&&k.__esModule?k:{default:k}}(function(){var k,b,m;k=B("./NodeType"),m=B("./XMLNode"),Q.exports=b=function(){function T(_,t,h){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(h),this.type=k.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(T.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(T.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(T.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(T.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(T.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(T.prototype,"specified",{get:function(){return!0}}),T.prototype.clone=function(){return(0,g.default)(this)},T.prototype.toString=function(_){return this.options.writer.attribute(this,this.options.writer.filterOptions(_))},T.prototype.debugInfo=function(_){return _=_||this.name,_==null?"parent: <"+this.parent.name+">":"attribute: {"+_+"}, parent: <"+this.parent.name+">"},T.prototype.isEqualNode=function(_){return _.namespaceURI!==this.namespaceURI||(_.prefix!==this.prefix||_.localName!==this.localName)?!1:!(_.value!==this.value)},T}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/create"),g=w(N);function w(k){return k&&k.__esModule?k:{default:k}}(function(){var k,b,m,T=function(h,r){for(var c in r)_.call(r,c)&&(h[c]=r[c]);function i(){this.constructor=h}return i.prototype=r.prototype,h.prototype=new i,h.__super__=r.prototype,h},_={}.hasOwnProperty;k=B("./NodeType"),m=B("./XMLCharacterData"),Q.exports=b=function(t){T(h,t);function h(r,c){if(h.__super__.constructor.call(this,r),c==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=k.CData,this.value=this.stringify.cdata(c)}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(r){return this.options.writer.cdata(this,this.options.writer.filterOptions(r))},h}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/create"),g=w(N);function w(k){return k&&k.__esModule?k:{default:k}}(function(){var k,b,m=function(t,h){for(var r in h)T.call(h,r)&&(t[r]=h[r]);function c(){this.constructor=t}return c.prototype=h.prototype,t.prototype=new c,t.__super__=h.prototype,t},T={}.hasOwnProperty;b=B("./XMLNode"),Q.exports=k=function(_){m(t,_);function t(h){t.__super__.constructor.call(this,h),this.value=""}return Object.defineProperty(t.prototype,"data",{get:function(){return this.value},set:function(r){return this.value=r||""}}),Object.defineProperty(t.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}}),t.prototype.clone=function(){return(0,g.default)(this)},t.prototype.substringData=function(h,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.appendData=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.insertData=function(h,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.deleteData=function(h,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.replaceData=function(h,r,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isEqualNode=function(h){return t.__super__.isEqualNode.apply(this,arguments).isEqualNode(h)?!(h.data!==this.data):!1},t}(b)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/create"),g=w(N);function w(k){return k&&k.__esModule?k:{default:k}}(function(){var k,b,m,T=function(h,r){for(var c in r)_.call(r,c)&&(h[c]=r[c]);function i(){this.constructor=h}return i.prototype=r.prototype,h.prototype=new i,h.__super__=r.prototype,h},_={}.hasOwnProperty;k=B("./NodeType"),b=B("./XMLCharacterData"),Q.exports=m=function(t){T(h,t);function h(r,c){if(h.__super__.constructor.call(this,r),c==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=k.Comment,this.value=this.stringify.comment(c)}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(r){return this.options.writer.comment(this,this.options.writer.filterOptions(r))},h}(b)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/keys"),g=b(N),w=B("babel-runtime/core-js/object/create"),k=b(w);function b(m){return m&&m.__esModule?m:{default:m}}(function(){var m,T,_;T=B("./XMLDOMErrorHandler"),_=B("./XMLDOMStringList"),Q.exports=m=function(){function t(){var h;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new T,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=h=(0,k.default)(this.defaultParams)}return Object.defineProperty(t.prototype,"parameterNames",{get:function(){return new _((0,g.default)(this.defaultParams))}}),t.prototype.getParameter=function(h){return this.params.hasOwnProperty(h)?this.params[h]:null},t.prototype.canSetParameter=function(h,r){return!0},t.prototype.setParameter=function(h,r){return r!=null?this.params[h]=r:delete this.params[h]},t}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(B,Q,D){"use strict";(function(){var N;Q.exports=N=function(){function g(){}return g.prototype.handleError=function(w){throw new Error(w)},g}()}).call(void 0)},{}],260:[function(B,Q,D){"use strict";(function(){var N;Q.exports=N=function(){function g(){}return g.prototype.hasFeature=function(w,k){return!0},g.prototype.createDocumentType=function(w,k,b){throw new Error("This DOM method is not implemented.")},g.prototype.createDocument=function(w,k,b){throw new Error("This DOM method is not implemented.")},g.prototype.createHTMLDocument=function(w){throw new Error("This DOM method is not implemented.")},g.prototype.getFeature=function(w,k){throw new Error("This DOM method is not implemented.")},g}()}).call(void 0)},{}],261:[function(B,Q,D){"use strict";(function(){var N;Q.exports=N=function(){function g(w){this.arr=w||[]}return Object.defineProperty(g.prototype,"length",{get:function(){return this.arr.length}}),g.prototype.item=function(w){return this.arr[w]||null},g.prototype.contains=function(w){return this.arr.indexOf(w)!==-1},g}()}).call(void 0)},{}],262:[function(B,Q,D){"use strict";(function(){var N,g,w,k=function(T,_){for(var t in _)b.call(_,t)&&(T[t]=_[t]);function h(){this.constructor=T}return h.prototype=_.prototype,T.prototype=new h,T.__super__=_.prototype,T},b={}.hasOwnProperty;w=B("./XMLNode"),N=B("./NodeType"),Q.exports=g=function(m){k(T,m);function T(_,t,h,r,c,i){if(T.__super__.constructor.call(this,_),t==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(h==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(t));if(!r)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(i&&!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=N.AttributeDeclaration,this.attributeName=this.stringify.name(h),this.attributeType=this.stringify.dtdAttType(r),i&&(this.defaultValue=this.stringify.dtdAttDefault(i)),this.defaultValueType=c}return T.prototype.toString=function(_){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(_))},T}(w)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(B,Q,D){"use strict";(function(){var N,g,w,k=function(T,_){for(var t in _)b.call(_,t)&&(T[t]=_[t]);function h(){this.constructor=T}return h.prototype=_.prototype,T.prototype=new h,T.__super__=_.prototype,T},b={}.hasOwnProperty;w=B("./XMLNode"),N=B("./NodeType"),Q.exports=g=function(m){k(T,m);function T(_,t,h){if(T.__super__.constructor.call(this,_),t==null)throw new Error("Missing DTD element name. "+this.debugInfo());h||(h="(#PCDATA)"),Array.isArray(h)&&(h="("+h.join(",")+")"),this.name=this.stringify.name(t),this.type=N.ElementDeclaration,this.value=this.stringify.dtdElementValue(h)}return T.prototype.toString=function(_){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(_))},T}(w)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(B,Q,D){"use strict";(function(){var N,g,w,k,b=function(_,t){for(var h in t)m.call(t,h)&&(_[h]=t[h]);function r(){this.constructor=_}return r.prototype=t.prototype,_.prototype=new r,_.__super__=t.prototype,_},m={}.hasOwnProperty;k=B("./Utility").isObject,w=B("./XMLNode"),N=B("./NodeType"),Q.exports=g=function(T){b(_,T);function _(t,h,r,c){if(_.__super__.constructor.call(this,t),r==null)throw new Error("Missing DTD entity name. "+this.debugInfo(r));if(c==null)throw new Error("Missing DTD entity value. "+this.debugInfo(r));if(this.pe=!!h,this.name=this.stringify.name(r),this.type=N.EntityDeclaration,!k(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(r));if(c.pubID&&!c.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(r));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(r))}}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))},_}(w)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(B,Q,D){"use strict";(function(){var N,g,w,k=function(T,_){for(var t in _)b.call(_,t)&&(T[t]=_[t]);function h(){this.constructor=T}return h.prototype=_.prototype,T.prototype=new h,T.__super__=_.prototype,T},b={}.hasOwnProperty;w=B("./XMLNode"),N=B("./NodeType"),Q.exports=g=function(m){k(T,m);function T(_,t,h){if(T.__super__.constructor.call(this,_),t==null)throw new Error("Missing DTD notation name. "+this.debugInfo(t));if(!h.pubID&&!h.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=N.NotationDeclaration,h.pubID!=null&&(this.pubID=this.stringify.dtdPubID(h.pubID)),h.sysID!=null&&(this.sysID=this.stringify.dtdSysID(h.sysID))}return Object.defineProperty(T.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(T.prototype,"systemId",{get:function(){return this.sysID}}),T.prototype.toString=function(_){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(_))},T}(w)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(B,Q,D){"use strict";(function(){var N,g,w,k,b=function(_,t){for(var h in t)m.call(t,h)&&(_[h]=t[h]);function r(){this.constructor=_}return r.prototype=t.prototype,_.prototype=new r,_.__super__=t.prototype,_},m={}.hasOwnProperty;k=B("./Utility").isObject,w=B("./XMLNode"),N=B("./NodeType"),Q.exports=g=function(T){b(_,T);function _(t,h,r,c){var i;_.__super__.constructor.call(this,t),k(h)&&(i=h,h=i.version,r=i.encoding,c=i.standalone),h||(h="1.0"),this.type=N.Declaration,this.version=this.stringify.xmlVersion(h),r!=null&&(this.encoding=this.stringify.xmlEncoding(r)),c!=null&&(this.standalone=this.stringify.xmlStandalone(c))}return _.prototype.toString=function(t){return this.options.writer.declaration(this,this.options.writer.filterOptions(t))},_}(w)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(B,Q,D){"use strict";(function(){var N,g,w,k,b,m,T,_,t,h=function(i,n){for(var l in n)r.call(n,l)&&(i[l]=n[l]);function f(){this.constructor=i}return f.prototype=n.prototype,i.prototype=new f,i.__super__=n.prototype,i},r={}.hasOwnProperty;t=B("./Utility").isObject,_=B("./XMLNode"),N=B("./NodeType"),g=B("./XMLDTDAttList"),k=B("./XMLDTDEntity"),w=B("./XMLDTDElement"),b=B("./XMLDTDNotation"),T=B("./XMLNamedNodeMap"),Q.exports=m=function(c){h(i,c);function i(n,l,f){var d,u,o,s,E,v;if(i.__super__.constructor.call(this,n),this.type=N.DocType,n.children){for(s=n.children,u=0,o=s.length;u<o;u++)if(d=s[u],d.type===N.Element){this.name=d.name;break}}this.documentObject=n,t(l)&&(E=l,l=E.pubID,f=E.sysID),f==null&&(v=[l,f],f=v[0],l=v[1]),l!=null&&(this.pubID=this.stringify.dtdPubID(l)),f!=null&&(this.sysID=this.stringify.dtdSysID(f))}return Object.defineProperty(i.prototype,"entities",{get:function(){var l,f,d,u,o;for(u={},o=this.children,f=0,d=o.length;f<d;f++)l=o[f],l.type===N.EntityDeclaration&&!l.pe&&(u[l.name]=l);return new T(u)}}),Object.defineProperty(i.prototype,"notations",{get:function(){var l,f,d,u,o;for(u={},o=this.children,f=0,d=o.length;f<d;f++)l=o[f],l.type===N.NotationDeclaration&&(u[l.name]=l);return new T(u)}}),Object.defineProperty(i.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(i.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(i.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),i.prototype.element=function(n,l){var f;return f=new w(this,n,l),this.children.push(f),this},i.prototype.attList=function(n,l,f,d,u){var o;return o=new g(this,n,l,f,d,u),this.children.push(o),this},i.prototype.entity=function(n,l){var f;return f=new k(this,!1,n,l),this.children.push(f),this},i.prototype.pEntity=function(n,l){var f;return f=new k(this,!0,n,l),this.children.push(f),this},i.prototype.notation=function(n,l){var f;return f=new b(this,n,l),this.children.push(f),this},i.prototype.toString=function(n){return this.options.writer.docType(this,this.options.writer.filterOptions(n))},i.prototype.ele=function(n,l){return this.element(n,l)},i.prototype.att=function(n,l,f,d,u){return this.attList(n,l,f,d,u)},i.prototype.ent=function(n,l){return this.entity(n,l)},i.prototype.pent=function(n,l){return this.pEntity(n,l)},i.prototype.not=function(n,l){return this.notation(n,l)},i.prototype.up=function(){return this.root()||this.documentObject},i.prototype.isEqualNode=function(n){return i.__super__.isEqualNode.apply(this,arguments).isEqualNode(n)?n.name!==this.name||n.publicId!==this.publicId?!1:!(n.systemId!==this.systemId):!1},i}(_)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(B,Q,D){"use strict";(function(){var N,g,w,k,b,m,T,_,t=function(c,i){for(var n in i)h.call(i,n)&&(c[n]=i[n]);function l(){this.constructor=c}return l.prototype=i.prototype,c.prototype=new l,c.__super__=i.prototype,c},h={}.hasOwnProperty;_=B("./Utility").isPlainObject,w=B("./XMLDOMImplementation"),g=B("./XMLDOMConfiguration"),b=B("./XMLNode"),N=B("./NodeType"),T=B("./XMLStringifier"),m=B("./XMLStringWriter"),Q.exports=k=function(r){t(c,r);function c(i){c.__super__.constructor.call(this,null),this.name="#document",this.type=N.Document,this.documentURI=null,this.domConfig=new g,i||(i={}),i.writer||(i.writer=new m),this.options=i,this.stringify=new T(i)}return Object.defineProperty(c.prototype,"implementation",{value:new w}),Object.defineProperty(c.prototype,"doctype",{get:function(){var n,l,f,d;for(d=this.children,l=0,f=d.length;l<f;l++)if(n=d[l],n.type===N.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===N.Declaration?this.children[0].encoding:null}}),Object.defineProperty(c.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===N.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(c.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===N.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(i){var n;return n={},i?_(i)&&(n=i,i=this.options.writer):i=this.options.writer,i.document(this,i.filterOptions(n))},c.prototype.toString=function(i){return this.options.writer.document(this,this.options.writer.filterOptions(i))},c.prototype.createElement=function(i){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(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createComment=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createCDATASection=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createProcessingInstruction=function(i,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createAttribute=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createEntityReference=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagName=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.importNode=function(i,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createElementNS=function(i,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createAttributeNS=function(i,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagNameNS=function(i,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementById=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.adoptNode=function(i){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(i,n,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByClassName=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createEvent=function(i){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(i,n,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createTreeWalker=function(i,n,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c}(b)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(B,Q,D){"use strict";(function(){var N,g,w,k,b,m,T,_,t,h,r,c,i,n,l,f,d,u,o,s,E,v,p,I,R={}.hasOwnProperty;I=B("./Utility"),v=I.isObject,E=I.isFunction,p=I.isPlainObject,s=I.getValue,N=B("./NodeType"),c=B("./XMLDocument"),n=B("./XMLElement"),k=B("./XMLCData"),b=B("./XMLComment"),f=B("./XMLRaw"),o=B("./XMLText"),l=B("./XMLProcessingInstruction"),h=B("./XMLDeclaration"),r=B("./XMLDocType"),m=B("./XMLDTDAttList"),_=B("./XMLDTDEntity"),T=B("./XMLDTDElement"),t=B("./XMLDTDNotation"),w=B("./XMLAttribute"),u=B("./XMLStringifier"),d=B("./XMLStringWriter"),g=B("./WriterState"),Q.exports=i=function(){function y(x,C,S){var F;this.name="?xml",this.type=N.Document,x||(x={}),F={},x.writer?p(x.writer)&&(F=x.writer,x.writer=new d):x.writer=new d,this.options=x,this.writer=x.writer,this.writerOptions=this.writer.filterOptions(F),this.stringify=new u(x),this.onDataCallback=C||function(){},this.onEndCallback=S||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return y.prototype.createChildNode=function(x){var C,S,F,j,A,Y,z,O;switch(x.type){case N.CData:this.cdata(x.value);break;case N.Comment:this.comment(x.value);break;case N.Element:F={},z=x.attribs;for(S in z){if(!R.call(z,S))continue;C=z[S],F[S]=C.value}this.node(x.name,F);break;case N.Dummy:this.dummy();break;case N.Raw:this.raw(x.value);break;case N.Text:this.text(x.value);break;case N.ProcessingInstruction:this.instruction(x.target,x.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+x.constructor.name)}for(O=x.children,A=0,Y=O.length;A<Y;A++)j=O[A],this.createChildNode(j),j.type===N.Element&&this.up();return this},y.prototype.dummy=function(){return this},y.prototype.node=function(x,C,S){var F;if(x==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(x));return this.openCurrent(),x=s(x),C==null&&(C={}),C=s(C),v(C)||(F=[C,S],S=F[0],C=F[1]),this.currentNode=new n(this,x,C),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,S!=null&&this.text(S),this},y.prototype.element=function(x,C,S){var F,j,A,Y,z,O;if(this.currentNode&&this.currentNode.type===N.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(x)||v(x)||E(x))for(Y=this.options.noValidation,this.options.noValidation=!0,O=new c(this.options).element("TEMP_ROOT"),O.element(x),this.options.noValidation=Y,z=O.children,j=0,A=z.length;j<A;j++)F=z[j],this.createChildNode(F),F.type===N.Element&&this.up();else this.node(x,C,S);return this},y.prototype.attribute=function(x,C){var S,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(x));if(x!=null&&(x=s(x)),v(x))for(S in x){if(!R.call(x,S))continue;F=x[S],this.attribute(S,F)}else E(C)&&(C=C.apply()),this.options.keepNullAttributes&&C==null?this.currentNode.attribs[x]=new w(this,x,""):C!=null&&(this.currentNode.attribs[x]=new w(this,x,C));return this},y.prototype.text=function(x){var C;return this.openCurrent(),C=new o(this,x),this.onData(this.writer.text(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.cdata=function(x){var C;return this.openCurrent(),C=new k(this,x),this.onData(this.writer.cdata(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.comment=function(x){var C;return this.openCurrent(),C=new b(this,x),this.onData(this.writer.comment(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.raw=function(x){var C;return this.openCurrent(),C=new f(this,x),this.onData(this.writer.raw(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.instruction=function(x,C){var S,F,j,A,Y;if(this.openCurrent(),x!=null&&(x=s(x)),C!=null&&(C=s(C)),Array.isArray(x))for(S=0,A=x.length;S<A;S++)F=x[S],this.instruction(F);else if(v(x))for(F in x){if(!R.call(x,F))continue;j=x[F],this.instruction(F,j)}else E(C)&&(C=C.apply()),Y=new l(this,x,C),this.onData(this.writer.processingInstruction(Y,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},y.prototype.declaration=function(x,C,S){var F;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return F=new h(this,x,C,S),this.onData(this.writer.declaration(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.doctype=function(x,C,S){if(this.openCurrent(),x==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new r(this,C,S),this.currentNode.rootNodeName=x,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},y.prototype.dtdElement=function(x,C){var S;return this.openCurrent(),S=new T(this,x,C),this.onData(this.writer.dtdElement(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.attList=function(x,C,S,F,j){var A;return this.openCurrent(),A=new m(this,x,C,S,F,j),this.onData(this.writer.dtdAttList(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.entity=function(x,C){var S;return this.openCurrent(),S=new _(this,!1,x,C),this.onData(this.writer.dtdEntity(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.pEntity=function(x,C){var S;return this.openCurrent(),S=new _(this,!0,x,C),this.onData(this.writer.dtdEntity(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.notation=function(x,C){var S;return this.openCurrent(),S=new t(this,x,C),this.onData(this.writer.dtdNotation(S,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.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},y.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},y.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},y.prototype.openNode=function(x){var C,S,F,j;if(!x.isOpen){if(!this.root&&this.currentLevel===0&&x.type===N.Element&&(this.root=x),S="",x.type===N.Element){this.writerOptions.state=g.OpenTag,S=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<"+x.name,j=x.attribs;for(F in j){if(!R.call(j,F))continue;C=j[F],S+=this.writer.attribute(C,this.writerOptions,this.currentLevel)}S+=(x.children?">":"/>")+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=g.InsideTag}else this.writerOptions.state=g.OpenTag,S=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+x.rootNodeName,x.pubID&&x.sysID?S+=' PUBLIC "'+x.pubID+'" "'+x.sysID+'"':x.sysID&&(S+=' SYSTEM "'+x.sysID+'"'),x.children?(S+=" [",this.writerOptions.state=g.InsideTag):(this.writerOptions.state=g.CloseTag,S+=">"),S+=this.writer.endline(x,this.writerOptions,this.currentLevel);return this.onData(S,this.currentLevel),x.isOpen=!0}},y.prototype.closeNode=function(x){var C;if(!x.isClosed)return C="",this.writerOptions.state=g.CloseTag,x.type===N.Element?C=this.writer.indent(x,this.writerOptions,this.currentLevel)+"</"+x.name+">"+this.writer.endline(x,this.writerOptions,this.currentLevel):C=this.writer.indent(x,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=g.None,this.onData(C,this.currentLevel),x.isClosed=!0},y.prototype.onData=function(x,C){return this.documentStarted=!0,this.onDataCallback(x,C+1)},y.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},y.prototype.debugInfo=function(x){return x==null?"":"node: <"+x+">"},y.prototype.ele=function(){return this.element.apply(this,arguments)},y.prototype.nod=function(x,C,S){return this.node(x,C,S)},y.prototype.txt=function(x){return this.text(x)},y.prototype.dat=function(x){return this.cdata(x)},y.prototype.com=function(x){return this.comment(x)},y.prototype.ins=function(x,C){return this.instruction(x,C)},y.prototype.dec=function(x,C,S){return this.declaration(x,C,S)},y.prototype.dtd=function(x,C,S){return this.doctype(x,C,S)},y.prototype.e=function(x,C,S){return this.element(x,C,S)},y.prototype.n=function(x,C,S){return this.node(x,C,S)},y.prototype.t=function(x){return this.text(x)},y.prototype.d=function(x){return this.cdata(x)},y.prototype.c=function(x){return this.comment(x)},y.prototype.r=function(x){return this.raw(x)},y.prototype.i=function(x,C){return this.instruction(x,C)},y.prototype.att=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},y.prototype.a=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},y.prototype.ent=function(x,C){return this.entity(x,C)},y.prototype.pent=function(x,C){return this.pEntity(x,C)},y.prototype.not=function(x,C){return this.notation(x,C)},y}()}).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(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/create"),g=w(N);function w(k){return k&&k.__esModule?k:{default:k}}(function(){var k,b,m,T=function(h,r){for(var c in r)_.call(r,c)&&(h[c]=r[c]);function i(){this.constructor=h}return i.prototype=r.prototype,h.prototype=new i,h.__super__=r.prototype,h},_={}.hasOwnProperty;m=B("./XMLNode"),k=B("./NodeType"),Q.exports=b=function(t){T(h,t);function h(r){h.__super__.constructor.call(this,r),this.type=k.Dummy}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(r){return""},h}(m)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/create"),g=w(N);function w(k){return k&&k.__esModule?k:{default:k}}(function(){var k,b,m,T,_,t,h,r,c,i=function(f,d){for(var u in d)n.call(d,u)&&(f[u]=d[u]);function o(){this.constructor=f}return o.prototype=d.prototype,f.prototype=new o,f.__super__=d.prototype,f},n={}.hasOwnProperty;c=B("./Utility"),r=c.isObject,h=c.isFunction,t=c.getValue,_=B("./XMLNode"),k=B("./NodeType"),b=B("./XMLAttribute"),T=B("./XMLNamedNodeMap"),Q.exports=m=function(l){i(f,l);function f(d,u,o){var s,E,v,p;if(f.__super__.constructor.call(this,d),u==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(u),this.type=k.Element,this.attribs={},this.schemaTypeInfo=null,o!=null&&this.attribute(o),d.type===k.Document&&(this.isRoot=!0,this.documentObject=d,d.rootObject=this,d.children)){for(p=d.children,E=0,v=p.length;E<v;E++)if(s=p[E],s.type===k.DocType){s.name=this.name;break}}}return Object.defineProperty(f.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(f.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(f.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(f.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(f.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(f.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(f.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(f.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new T(this.attribs)),this.attributeMap}}),f.prototype.clone=function(){var d,u,o,s;o=(0,g.default)(this),o.isRoot&&(o.documentObject=null),o.attribs={},s=this.attribs;for(u in s){if(!n.call(s,u))continue;d=s[u],o.attribs[u]=d.clone()}return o.children=[],this.children.forEach(function(E){var v;return v=E.clone(),v.parent=o,o.children.push(v)}),o},f.prototype.attribute=function(d,u){var o,s;if(d!=null&&(d=t(d)),r(d))for(o in d){if(!n.call(d,o))continue;s=d[o],this.attribute(o,s)}else h(u)&&(u=u.apply()),this.options.keepNullAttributes&&u==null?this.attribs[d]=new b(this,d,""):u!=null&&(this.attribs[d]=new b(this,d,u));return this},f.prototype.removeAttribute=function(d){var u,o,s;if(d==null)throw new Error("Missing attribute name. "+this.debugInfo());if(d=t(d),Array.isArray(d))for(o=0,s=d.length;o<s;o++)u=d[o],delete this.attribs[u];else delete this.attribs[d];return this},f.prototype.toString=function(d){return this.options.writer.element(this,this.options.writer.filterOptions(d))},f.prototype.att=function(d,u){return this.attribute(d,u)},f.prototype.a=function(d,u){return this.attribute(d,u)},f.prototype.getAttribute=function(d){return this.attribs.hasOwnProperty(d)?this.attribs[d].value:null},f.prototype.setAttribute=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.getAttributeNode=function(d){return this.attribs.hasOwnProperty(d)?this.attribs[d]:null},f.prototype.setAttributeNode=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.removeAttributeNode=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.getElementsByTagName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.getAttributeNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.setAttributeNS=function(d,u,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.removeAttributeNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.getAttributeNodeNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.setAttributeNodeNS=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.getElementsByTagNameNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.hasAttribute=function(d){return this.attribs.hasOwnProperty(d)},f.prototype.hasAttributeNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.setIdAttribute=function(d,u){return this.attribs.hasOwnProperty(d)?this.attribs[d].isId:u},f.prototype.setIdAttributeNS=function(d,u,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.setIdAttributeNode=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.getElementsByTagName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.getElementsByTagNameNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.getElementsByClassName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.isEqualNode=function(d){var u,o,s;if(!f.__super__.isEqualNode.apply(this,arguments).isEqualNode(d))return!1;if(d.namespaceURI!==this.namespaceURI)return!1;if(d.prefix!==this.prefix)return!1;if(d.localName!==this.localName)return!1;if(d.attribs.length!==this.attribs.length)return!1;for(u=o=0,s=this.attribs.length-1;0<=s?o<=s:o>=s;u=0<=s?++o:--o)if(!this.attribs[u].isEqualNode(d.attribs[u]))return!1;return!0},f}(_)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/keys"),g=w(N);function w(k){return k&&k.__esModule?k:{default:k}}(function(){var k;Q.exports=k=function(){function b(m){this.nodes=m}return Object.defineProperty(b.prototype,"length",{get:function(){return(0,g.default)(this.nodes).length||0}}),b.prototype.clone=function(){return this.nodes=null},b.prototype.getNamedItem=function(m){return this.nodes[m]},b.prototype.setNamedItem=function(m){var T;return T=this.nodes[m.nodeName],this.nodes[m.nodeName]=m,T||null},b.prototype.removeNamedItem=function(m){var T;return T=this.nodes[m],delete this.nodes[m],T||null},b.prototype.item=function(m){return this.nodes[(0,g.default)(this.nodes)[m]]||null},b.prototype.getNamedItemNS=function(m,T){throw new Error("This DOM method is not implemented.")},b.prototype.setNamedItemNS=function(m){throw new Error("This DOM method is not implemented.")},b.prototype.removeNamedItemNS=function(m,T){throw new Error("This DOM method is not implemented.")},b}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(B,Q,D){"use strict";(function(){var N,g,w,k,b,m,T,_,t,h,r,c,i,n,l,f,d,u,o,s={}.hasOwnProperty;o=B("./Utility"),u=o.isObject,d=o.isFunction,f=o.isEmpty,l=o.getValue,_=null,w=null,k=null,b=null,m=null,i=null,n=null,c=null,T=null,g=null,r=null,t=null,N=null,Q.exports=h=function(){function E(v){this.parent=v,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,_||(_=B("./XMLElement"),w=B("./XMLCData"),k=B("./XMLComment"),b=B("./XMLDeclaration"),m=B("./XMLDocType"),i=B("./XMLRaw"),n=B("./XMLText"),c=B("./XMLProcessingInstruction"),T=B("./XMLDummy"),g=B("./NodeType"),r=B("./XMLNodeList"),t=B("./XMLNamedNodeMap"),N=B("./DocumentPosition"))}return Object.defineProperty(E.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(E.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(E.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(E.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(E.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new r(this.children)),this.childNodeList}}),Object.defineProperty(E.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(E.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(E.prototype,"previousSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p-1]||null}}),Object.defineProperty(E.prototype,"nextSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p+1]||null}}),Object.defineProperty(E.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(E.prototype,"textContent",{get:function(){var p,I,R,y,x;if(this.nodeType===g.Element||this.nodeType===g.DocumentFragment){for(x="",y=this.children,I=0,R=y.length;I<R;I++)p=y[I],p.textContent&&(x+=p.textContent);return x}else return null},set:function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),E.prototype.setParent=function(v){var p,I,R,y,x;for(this.parent=v,v&&(this.options=v.options,this.stringify=v.stringify),y=this.children,x=[],I=0,R=y.length;I<R;I++)p=y[I],x.push(p.setParent(this));return x},E.prototype.element=function(v,p,I){var R,y,x,C,S,F,j,A,Y,z,O;if(F=null,p===null&&I==null&&(Y=[{},null],p=Y[0],I=Y[1]),p==null&&(p={}),p=l(p),u(p)||(z=[p,I],I=z[0],p=z[1]),v!=null&&(v=l(v)),Array.isArray(v))for(x=0,j=v.length;x<j;x++)y=v[x],F=this.element(y);else if(d(v))F=this.element(v.apply());else if(u(v))for(S in v){if(!s.call(v,S))continue;if(O=v[S],d(O)&&(O=O.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&S.indexOf(this.stringify.convertAttKey)===0)F=this.attribute(S.substr(this.stringify.convertAttKey.length),O);else if(!this.options.separateArrayItems&&Array.isArray(O)&&f(O))F=this.dummy();else if(u(O)&&f(O))F=this.element(S);else if(!this.options.keepNullNodes&&O==null)F=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(O))for(C=0,A=O.length;C<A;C++)y=O[C],R={},R[S]=y,F=this.element(R);else u(O)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&S.indexOf(this.stringify.convertTextKey)===0?F=this.element(O):(F=this.element(S),F.element(O)):F=this.element(S,O)}else!this.options.keepNullNodes&&I===null?F=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&v.indexOf(this.stringify.convertTextKey)===0?F=this.text(I):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&v.indexOf(this.stringify.convertCDataKey)===0?F=this.cdata(I):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&v.indexOf(this.stringify.convertCommentKey)===0?F=this.comment(I):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&v.indexOf(this.stringify.convertRawKey)===0?F=this.raw(I):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&v.indexOf(this.stringify.convertPIKey)===0?F=this.instruction(v.substr(this.stringify.convertPIKey.length),I):F=this.node(v,p,I);if(F==null)throw new Error("Could not create any elements with: "+v+". "+this.debugInfo());return F},E.prototype.insertBefore=function(v,p,I){var R,y,x,C,S;if(v!=null?v.type:void 0)return x=v,C=p,x.setParent(this),C?(y=children.indexOf(C),S=children.splice(y),children.push(x),Array.prototype.push.apply(children,S)):children.push(x),x;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(v));return y=this.parent.children.indexOf(this),S=this.parent.children.splice(y),R=this.parent.element(v,p,I),Array.prototype.push.apply(this.parent.children,S),R},E.prototype.insertAfter=function(v,p,I){var R,y,x;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(v));return y=this.parent.children.indexOf(this),x=this.parent.children.splice(y+1),R=this.parent.element(v,p,I),Array.prototype.push.apply(this.parent.children,x),R},E.prototype.remove=function(){var v,p;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return v=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[v,v-v+1].concat(p=[])),this.parent},E.prototype.node=function(v,p,I){var R,y;return v!=null&&(v=l(v)),p||(p={}),p=l(p),u(p)||(y=[p,I],I=y[0],p=y[1]),R=new _(this,v,p),I!=null&&R.text(I),this.children.push(R),R},E.prototype.text=function(v){var p;return u(v)&&this.element(v),p=new n(this,v),this.children.push(p),this},E.prototype.cdata=function(v){var p;return p=new w(this,v),this.children.push(p),this},E.prototype.comment=function(v){var p;return p=new k(this,v),this.children.push(p),this},E.prototype.commentBefore=function(v){var p,I,R;return I=this.parent.children.indexOf(this),R=this.parent.children.splice(I),p=this.parent.comment(v),Array.prototype.push.apply(this.parent.children,R),this},E.prototype.commentAfter=function(v){var p,I,R;return I=this.parent.children.indexOf(this),R=this.parent.children.splice(I+1),p=this.parent.comment(v),Array.prototype.push.apply(this.parent.children,R),this},E.prototype.raw=function(v){var p;return p=new i(this,v),this.children.push(p),this},E.prototype.dummy=function(){var v;return v=new T(this),v},E.prototype.instruction=function(v,p){var I,R,y,x,C;if(v!=null&&(v=l(v)),p!=null&&(p=l(p)),Array.isArray(v))for(x=0,C=v.length;x<C;x++)I=v[x],this.instruction(I);else if(u(v))for(I in v){if(!s.call(v,I))continue;R=v[I],this.instruction(I,R)}else d(p)&&(p=p.apply()),y=new c(this,v,p),this.children.push(y);return this},E.prototype.instructionBefore=function(v,p){var I,R,y;return R=this.parent.children.indexOf(this),y=this.parent.children.splice(R),I=this.parent.instruction(v,p),Array.prototype.push.apply(this.parent.children,y),this},E.prototype.instructionAfter=function(v,p){var I,R,y;return R=this.parent.children.indexOf(this),y=this.parent.children.splice(R+1),I=this.parent.instruction(v,p),Array.prototype.push.apply(this.parent.children,y),this},E.prototype.declaration=function(v,p,I){var R,y;return R=this.document(),y=new b(R,v,p,I),R.children.length===0?R.children.unshift(y):R.children[0].type===g.Declaration?R.children[0]=y:R.children.unshift(y),R.root()||R},E.prototype.dtd=function(v,p){var I,R,y,x,C,S,F,j,A,Y;for(R=this.document(),y=new m(R,v,p),A=R.children,x=C=0,F=A.length;C<F;x=++C)if(I=A[x],I.type===g.DocType)return R.children[x]=y,y;for(Y=R.children,x=S=0,j=Y.length;S<j;x=++S)if(I=Y[x],I.isRoot)return R.children.splice(x,0,y),y;return R.children.push(y),y},E.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},E.prototype.root=function(){var v;for(v=this;v;){if(v.type===g.Document)return v.rootObject;if(v.isRoot)return v;v=v.parent}},E.prototype.document=function(){var v;for(v=this;v;){if(v.type===g.Document)return v;v=v.parent}},E.prototype.end=function(v){return this.document().end(v)},E.prototype.prev=function(){var v;if(v=this.parent.children.indexOf(this),v<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[v-1]},E.prototype.next=function(){var v;if(v=this.parent.children.indexOf(this),v===-1||v===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[v+1]},E.prototype.importDocument=function(v){var p;return p=v.root().clone(),p.parent=this,p.isRoot=!1,this.children.push(p),this},E.prototype.debugInfo=function(v){var p,I;return v=v||this.name,v==null&&!((p=this.parent)!=null?p.name:void 0)?"":v==null?"parent: <"+this.parent.name+">":((I=this.parent)!=null?I.name:void 0)?"node: <"+v+">, parent: <"+this.parent.name+">":"node: <"+v+">"},E.prototype.ele=function(v,p,I){return this.element(v,p,I)},E.prototype.nod=function(v,p,I){return this.node(v,p,I)},E.prototype.txt=function(v){return this.text(v)},E.prototype.dat=function(v){return this.cdata(v)},E.prototype.com=function(v){return this.comment(v)},E.prototype.ins=function(v,p){return this.instruction(v,p)},E.prototype.doc=function(){return this.document()},E.prototype.dec=function(v,p,I){return this.declaration(v,p,I)},E.prototype.e=function(v,p,I){return this.element(v,p,I)},E.prototype.n=function(v,p,I){return this.node(v,p,I)},E.prototype.t=function(v){return this.text(v)},E.prototype.d=function(v){return this.cdata(v)},E.prototype.c=function(v){return this.comment(v)},E.prototype.r=function(v){return this.raw(v)},E.prototype.i=function(v,p){return this.instruction(v,p)},E.prototype.u=function(){return this.up()},E.prototype.importXMLBuilder=function(v){return this.importDocument(v)},E.prototype.replaceChild=function(v,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.removeChild=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.appendChild=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.hasChildNodes=function(){return this.children.length!==0},E.prototype.cloneNode=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isSupported=function(v,p){return!0},E.prototype.hasAttributes=function(){return this.attribs.length!==0},E.prototype.compareDocumentPosition=function(v){var p,I;return p=this,p===v?0:this.document()!==v.document()?(I=N.Disconnected|N.ImplementationSpecific,Math.random()<.5?I|=N.Preceding:I|=N.Following,I):p.isAncestor(v)?N.Contains|N.Preceding:p.isDescendant(v)?N.Contains|N.Following:p.isPreceding(v)?N.Preceding:N.Following},E.prototype.isSameNode=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.lookupPrefix=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isDefaultNamespace=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.lookupNamespaceURI=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isEqualNode=function(v){var p,I,R;if(v.nodeType!==this.nodeType)return!1;if(v.children.length!==this.children.length)return!1;for(p=I=0,R=this.children.length-1;0<=R?I<=R:I>=R;p=0<=R?++I:--I)if(!this.children[p].isEqualNode(v.children[p]))return!1;return!0},E.prototype.getFeature=function(v,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setUserData=function(v,p,I){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getUserData=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.contains=function(v){return v?v===this||this.isDescendant(v):!1},E.prototype.isDescendant=function(v){var p,I,R,y,x;for(x=this.children,R=0,y=x.length;R<y;R++){if(p=x[R],v===p)return!0;if(I=p.isDescendant(v),I)return!0}return!1},E.prototype.isAncestor=function(v){return v.isDescendant(this)},E.prototype.isPreceding=function(v){var p,I;return p=this.treePosition(v),I=this.treePosition(this),p===-1||I===-1?!1:p<I},E.prototype.isFollowing=function(v){var p,I;return p=this.treePosition(v),I=this.treePosition(this),p===-1||I===-1?!1:p>I},E.prototype.treePosition=function(v){var p,I;return I=0,p=!1,this.foreachTreeNode(this.document(),function(R){if(I++,!p&&R===v)return p=!0}),p?I:-1},E.prototype.foreachTreeNode=function(v,p){var I,R,y,x,C;for(v||(v=this.document()),x=v.children,R=0,y=x.length;R<y;R++){if(I=x[R],C=p(I))return C;if(C=this.foreachTreeNode(I,p),C)return C}},E}()}).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(B,Q,D){"use strict";(function(){var N;Q.exports=N=function(){function g(w){this.nodes=w}return Object.defineProperty(g.prototype,"length",{get:function(){return this.nodes.length||0}}),g.prototype.clone=function(){return this.nodes=null},g.prototype.item=function(w){return this.nodes[w]||null},g}()}).call(void 0)},{}],275:[function(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/create"),g=w(N);function w(k){return k&&k.__esModule?k:{default:k}}(function(){var k,b,m,T=function(h,r){for(var c in r)_.call(r,c)&&(h[c]=r[c]);function i(){this.constructor=h}return i.prototype=r.prototype,h.prototype=new i,h.__super__=r.prototype,h},_={}.hasOwnProperty;k=B("./NodeType"),b=B("./XMLCharacterData"),Q.exports=m=function(t){T(h,t);function h(r,c,i){if(h.__super__.constructor.call(this,r),c==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=k.ProcessingInstruction,this.target=this.stringify.insTarget(c),this.name=this.target,i&&(this.value=this.stringify.insValue(i))}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(r){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(r))},h.prototype.isEqualNode=function(r){return h.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)?!(r.target!==this.target):!1},h}(b)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/create"),g=w(N);function w(k){return k&&k.__esModule?k:{default:k}}(function(){var k,b,m,T=function(h,r){for(var c in r)_.call(r,c)&&(h[c]=r[c]);function i(){this.constructor=h}return i.prototype=r.prototype,h.prototype=new i,h.__super__=r.prototype,h},_={}.hasOwnProperty;k=B("./NodeType"),b=B("./XMLNode"),Q.exports=m=function(t){T(h,t);function h(r,c){if(h.__super__.constructor.call(this,r),c==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=k.Raw,this.value=this.stringify.raw(c)}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(r){return this.options.writer.raw(this,this.options.writer.filterOptions(r))},h}(b)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(B,Q,D){"use strict";(function(){var N,g,w,k,b=function(_,t){for(var h in t)m.call(t,h)&&(_[h]=t[h]);function r(){this.constructor=_}return r.prototype=t.prototype,_.prototype=new r,_.__super__=t.prototype,_},m={}.hasOwnProperty;N=B("./NodeType"),k=B("./XMLWriterBase"),g=B("./WriterState"),Q.exports=w=function(T){b(_,T);function _(t,h){this.stream=t,_.__super__.constructor.call(this,h)}return _.prototype.endline=function(t,h,r){return t.isLastRootNode&&h.state===g.CloseTag?"":_.__super__.endline.call(this,t,h,r)},_.prototype.document=function(t,h){var r,c,i,n,l,f,d,u,o;for(d=t.children,c=i=0,l=d.length;i<l;c=++i)r=d[c],r.isLastRootNode=c===t.children.length-1;for(h=this.filterOptions(h),u=t.children,o=[],n=0,f=u.length;n<f;n++)r=u[n],o.push(this.writeChildNode(r,h,0));return o},_.prototype.attribute=function(t,h,r){return this.stream.write(_.__super__.attribute.call(this,t,h,r))},_.prototype.cdata=function(t,h,r){return this.stream.write(_.__super__.cdata.call(this,t,h,r))},_.prototype.comment=function(t,h,r){return this.stream.write(_.__super__.comment.call(this,t,h,r))},_.prototype.declaration=function(t,h,r){return this.stream.write(_.__super__.declaration.call(this,t,h,r))},_.prototype.docType=function(t,h,r){var c,i,n,l;if(r||(r=0),this.openNode(t,h,r),h.state=g.OpenTag,this.stream.write(this.indent(t,h,r)),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,h,r)),h.state=g.InsideTag,l=t.children,i=0,n=l.length;i<n;i++)c=l[i],this.writeChildNode(c,h,r+1);h.state=g.CloseTag,this.stream.write("]")}return h.state=g.CloseTag,this.stream.write(h.spaceBeforeSlash+">"),this.stream.write(this.endline(t,h,r)),h.state=g.None,this.closeNode(t,h,r)},_.prototype.element=function(t,h,r){var c,i,n,l,f,d,u,o,s,E;r||(r=0),this.openNode(t,h,r),h.state=g.OpenTag,this.stream.write(this.indent(t,h,r)+"<"+t.name),s=t.attribs;for(u in s){if(!m.call(s,u))continue;c=s[u],this.attribute(c,h,r)}if(n=t.children.length,l=n===0?null:t.children[0],n===0||t.children.every(function(v){return(v.type===N.Text||v.type===N.Raw)&&v.value===""}))h.allowEmpty?(this.stream.write(">"),h.state=g.CloseTag,this.stream.write("</"+t.name+">")):(h.state=g.CloseTag,this.stream.write(h.spaceBeforeSlash+"/>"));else if(h.pretty&&n===1&&(l.type===N.Text||l.type===N.Raw)&&l.value!=null)this.stream.write(">"),h.state=g.InsideTag,h.suppressPrettyCount++,o=!0,this.writeChildNode(l,h,r+1),h.suppressPrettyCount--,o=!1,h.state=g.CloseTag,this.stream.write("</"+t.name+">");else{for(this.stream.write(">"+this.endline(t,h,r)),h.state=g.InsideTag,E=t.children,f=0,d=E.length;f<d;f++)i=E[f],this.writeChildNode(i,h,r+1);h.state=g.CloseTag,this.stream.write(this.indent(t,h,r)+"</"+t.name+">")}return this.stream.write(this.endline(t,h,r)),h.state=g.None,this.closeNode(t,h,r)},_.prototype.processingInstruction=function(t,h,r){return this.stream.write(_.__super__.processingInstruction.call(this,t,h,r))},_.prototype.raw=function(t,h,r){return this.stream.write(_.__super__.raw.call(this,t,h,r))},_.prototype.text=function(t,h,r){return this.stream.write(_.__super__.text.call(this,t,h,r))},_.prototype.dtdAttList=function(t,h,r){return this.stream.write(_.__super__.dtdAttList.call(this,t,h,r))},_.prototype.dtdElement=function(t,h,r){return this.stream.write(_.__super__.dtdElement.call(this,t,h,r))},_.prototype.dtdEntity=function(t,h,r){return this.stream.write(_.__super__.dtdEntity.call(this,t,h,r))},_.prototype.dtdNotation=function(t,h,r){return this.stream.write(_.__super__.dtdNotation.call(this,t,h,r))},_}(k)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(B,Q,D){"use strict";(function(){var N,g,w=function(m,T){for(var _ in T)k.call(T,_)&&(m[_]=T[_]);function t(){this.constructor=m}return t.prototype=T.prototype,m.prototype=new t,m.__super__=T.prototype,m},k={}.hasOwnProperty;g=B("./XMLWriterBase"),Q.exports=N=function(b){w(m,b);function m(T){m.__super__.constructor.call(this,T)}return m.prototype.document=function(T,_){var t,h,r,c,i;for(_=this.filterOptions(_),c="",i=T.children,h=0,r=i.length;h<r;h++)t=i[h],c+=this.writeChildNode(t,_,0);return _.pretty&&c.slice(-_.newline.length)===_.newline&&(c=c.slice(0,-_.newline.length)),c},m}(g)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(B,Q,D){"use strict";(function(){var N,g=function(b,m){return function(){return b.apply(m,arguments)}},w={}.hasOwnProperty;Q.exports=N=function(){function k(b){this.assertLegalName=g(this.assertLegalName,this),this.assertLegalChar=g(this.assertLegalChar,this);var m,T,_;b||(b={}),this.options=b,this.options.version||(this.options.version="1.0"),T=b.stringify||{};for(m in T){if(!w.call(T,m))continue;_=T[m],this[m]=_}}return k.prototype.name=function(b){return this.options.noValidation?b:this.assertLegalName(""+b||"")},k.prototype.text=function(b){return this.options.noValidation?b:this.assertLegalChar(this.textEscape(""+b||""))},k.prototype.cdata=function(b){return this.options.noValidation?b:(b=""+b||"",b=b.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(b))},k.prototype.comment=function(b){if(this.options.noValidation)return b;if(b=""+b||"",b.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+b);return this.assertLegalChar(b)},k.prototype.raw=function(b){return this.options.noValidation?b:""+b||""},k.prototype.attValue=function(b){return this.options.noValidation?b:this.assertLegalChar(this.attEscape(b=""+b||""))},k.prototype.insTarget=function(b){return this.options.noValidation?b:this.assertLegalChar(""+b||"")},k.prototype.insValue=function(b){if(this.options.noValidation)return b;if(b=""+b||"",b.match(/\?>/))throw new Error("Invalid processing instruction value: "+b);return this.assertLegalChar(b)},k.prototype.xmlVersion=function(b){if(this.options.noValidation)return b;if(b=""+b||"",!b.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+b);return b},k.prototype.xmlEncoding=function(b){if(this.options.noValidation)return b;if(b=""+b||"",!b.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+b);return this.assertLegalChar(b)},k.prototype.xmlStandalone=function(b){return this.options.noValidation?b:b?"yes":"no"},k.prototype.dtdPubID=function(b){return this.options.noValidation?b:this.assertLegalChar(""+b||"")},k.prototype.dtdSysID=function(b){return this.options.noValidation?b:this.assertLegalChar(""+b||"")},k.prototype.dtdElementValue=function(b){return this.options.noValidation?b:this.assertLegalChar(""+b||"")},k.prototype.dtdAttType=function(b){return this.options.noValidation?b:this.assertLegalChar(""+b||"")},k.prototype.dtdAttDefault=function(b){return this.options.noValidation?b:this.assertLegalChar(""+b||"")},k.prototype.dtdEntityValue=function(b){return this.options.noValidation?b:this.assertLegalChar(""+b||"")},k.prototype.dtdNData=function(b){return this.options.noValidation?b:this.assertLegalChar(""+b||"")},k.prototype.convertAttKey="@",k.prototype.convertPIKey="?",k.prototype.convertTextKey="#text",k.prototype.convertCDataKey="#cdata",k.prototype.convertCommentKey="#comment",k.prototype.convertRawKey="#raw",k.prototype.assertLegalChar=function(b){var m,T;if(this.options.noValidation)return b;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]/,T=b.match(m))throw new Error("Invalid character in string: "+b+" at index "+T.index)}else if(this.options.version==="1.1"&&(m=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,T=b.match(m)))throw new Error("Invalid character in string: "+b+" at index "+T.index);return b},k.prototype.assertLegalName=function(b){var m;if(this.options.noValidation)return b;if(this.assertLegalChar(b),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])*$/,!b.match(m))throw new Error("Invalid character in name");return b},k.prototype.textEscape=function(b){var m;return this.options.noValidation?b:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,b.replace(m,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},k.prototype.attEscape=function(b){var m;return this.options.noValidation?b:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,b.replace(m,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},k}()}).call(void 0)},{}],280:[function(B,Q,D){"use strict";var N=B("babel-runtime/core-js/object/create"),g=w(N);function w(k){return k&&k.__esModule?k:{default:k}}(function(){var k,b,m,T=function(h,r){for(var c in r)_.call(r,c)&&(h[c]=r[c]);function i(){this.constructor=h}return i.prototype=r.prototype,h.prototype=new i,h.__super__=r.prototype,h},_={}.hasOwnProperty;k=B("./NodeType"),b=B("./XMLCharacterData"),Q.exports=m=function(t){T(h,t);function h(r,c){if(h.__super__.constructor.call(this,r),c==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=k.Text,this.value=this.stringify.text(c)}return Object.defineProperty(h.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(h.prototype,"wholeText",{get:function(){var c,i,n;for(n="",i=this.previousSibling;i;)n=i.data+n,i=i.previousSibling;for(n+=this.data,c=this.nextSibling;c;)n=n+c.data,c=c.nextSibling;return n}}),h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(r){return this.options.writer.text(this,this.options.writer.filterOptions(r))},h.prototype.splitText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.replaceWholeText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},h}(b)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(B,Q,D){"use strict";(function(){var N,g,w,k,b,m,T,_,t,h,r,c,i,n,l,f,d,u={}.hasOwnProperty;d=B("./Utility").assign,N=B("./NodeType"),t=B("./XMLDeclaration"),h=B("./XMLDocType"),w=B("./XMLCData"),k=B("./XMLComment"),c=B("./XMLElement"),n=B("./XMLRaw"),l=B("./XMLText"),i=B("./XMLProcessingInstruction"),r=B("./XMLDummy"),b=B("./XMLDTDAttList"),m=B("./XMLDTDElement"),T=B("./XMLDTDEntity"),_=B("./XMLDTDNotation"),g=B("./WriterState"),Q.exports=f=function(){function o(s){var E,v,p;s||(s={}),this.options=s,v=s.writer||{};for(E in v){if(!u.call(v,E))continue;p=v[E],this["_"+E]=this[E],this[E]=p}}return o.prototype.filterOptions=function(s){var E,v,p,I,R,y,x,C;return s||(s={}),s=d({},this.options,s),E={writer:this},E.pretty=s.pretty||!1,E.allowEmpty=s.allowEmpty||!1,E.indent=(v=s.indent)!=null?v:" ",E.newline=(p=s.newline)!=null?p:`
|
|
|
`,E.offset=(I=s.offset)!=null?I:0,E.dontPrettyTextNodes=(R=(y=s.dontPrettyTextNodes)!=null?y:s.dontprettytextnodes)!=null?R:0,E.spaceBeforeSlash=(x=(C=s.spaceBeforeSlash)!=null?C:s.spacebeforeslash)!=null?x:"",E.spaceBeforeSlash===!0&&(E.spaceBeforeSlash=" "),E.suppressPrettyCount=0,E.user={},E.state=g.None,E},o.prototype.indent=function(s,E,v){var p;return!E.pretty||E.suppressPrettyCount?"":E.pretty&&(p=(v||0)+E.offset+1,p>0)?new Array(p).join(E.indent):""},o.prototype.endline=function(s,E,v){return!E.pretty||E.suppressPrettyCount?"":E.newline},o.prototype.attribute=function(s,E,v){var p;return this.openAttribute(s,E,v),p=" "+s.name+'="'+s.value+'"',this.closeAttribute(s,E,v),p},o.prototype.cdata=function(s,E,v){var p;return this.openNode(s,E,v),E.state=g.OpenTag,p=this.indent(s,E,v)+"<![CDATA[",E.state=g.InsideTag,p+=s.value,E.state=g.CloseTag,p+="]]>"+this.endline(s,E,v),E.state=g.None,this.closeNode(s,E,v),p},o.prototype.comment=function(s,E,v){var p;return this.openNode(s,E,v),E.state=g.OpenTag,p=this.indent(s,E,v)+"<!-- ",E.state=g.InsideTag,p+=s.value,E.state=g.CloseTag,p+=" -->"+this.endline(s,E,v),E.state=g.None,this.closeNode(s,E,v),p},o.prototype.declaration=function(s,E,v){var p;return this.openNode(s,E,v),E.state=g.OpenTag,p=this.indent(s,E,v)+"<?xml",E.state=g.InsideTag,p+=' version="'+s.version+'"',s.encoding!=null&&(p+=' encoding="'+s.encoding+'"'),s.standalone!=null&&(p+=' standalone="'+s.standalone+'"'),E.state=g.CloseTag,p+=E.spaceBeforeSlash+"?>",p+=this.endline(s,E,v),E.state=g.None,this.closeNode(s,E,v),p},o.prototype.docType=function(s,E,v){var p,I,R,y,x;if(v||(v=0),this.openNode(s,E,v),E.state=g.OpenTag,y=this.indent(s,E,v),y+="<!DOCTYPE "+s.root().name,s.pubID&&s.sysID?y+=' PUBLIC "'+s.pubID+'" "'+s.sysID+'"':s.sysID&&(y+=' SYSTEM "'+s.sysID+'"'),s.children.length>0){for(y+=" [",y+=this.endline(s,E,v),E.state=g.InsideTag,x=s.children,I=0,R=x.length;I<R;I++)p=x[I],y+=this.writeChildNode(p,E,v+1);E.state=g.CloseTag,y+="]"}return E.state=g.CloseTag,y+=E.spaceBeforeSlash+">",y+=this.endline(s,E,v),E.state=g.None,this.closeNode(s,E,v),y},o.prototype.element=function(s,E,v){var p,I,R,y,x,C,S,F,j,A,Y,z,O,H;v||(v=0),A=!1,Y="",this.openNode(s,E,v),E.state=g.OpenTag,Y+=this.indent(s,E,v)+"<"+s.name,z=s.attribs;for(j in z){if(!u.call(z,j))continue;p=z[j],Y+=this.attribute(p,E,v)}if(R=s.children.length,y=R===0?null:s.children[0],R===0||s.children.every(function(U){return(U.type===N.Text||U.type===N.Raw)&&U.value===""}))E.allowEmpty?(Y+=">",E.state=g.CloseTag,Y+="</"+s.name+">"+this.endline(s,E,v)):(E.state=g.CloseTag,Y+=E.spaceBeforeSlash+"/>"+this.endline(s,E,v));else if(E.pretty&&R===1&&(y.type===N.Text||y.type===N.Raw)&&y.value!=null)Y+=">",E.state=g.InsideTag,E.suppressPrettyCount++,A=!0,Y+=this.writeChildNode(y,E,v+1),E.suppressPrettyCount--,A=!1,E.state=g.CloseTag,Y+="</"+s.name+">"+this.endline(s,E,v);else{if(E.dontPrettyTextNodes){for(O=s.children,x=0,S=O.length;x<S;x++)if(I=O[x],(I.type===N.Text||I.type===N.Raw)&&I.value!=null){E.suppressPrettyCount++,A=!0;break}}for(Y+=">"+this.endline(s,E,v),E.state=g.InsideTag,H=s.children,C=0,F=H.length;C<F;C++)I=H[C],Y+=this.writeChildNode(I,E,v+1);E.state=g.CloseTag,Y+=this.indent(s,E,v)+"</"+s.name+">",A&&E.suppressPrettyCount--,Y+=this.endline(s,E,v),E.state=g.None}return this.closeNode(s,E,v),Y},o.prototype.writeChildNode=function(s,E,v){switch(s.type){case N.CData:return this.cdata(s,E,v);case N.Comment:return this.comment(s,E,v);case N.Element:return this.element(s,E,v);case N.Raw:return this.raw(s,E,v);case N.Text:return this.text(s,E,v);case N.ProcessingInstruction:return this.processingInstruction(s,E,v);case N.Dummy:return"";case N.Declaration:return this.declaration(s,E,v);case N.DocType:return this.docType(s,E,v);case N.AttributeDeclaration:return this.dtdAttList(s,E,v);case N.ElementDeclaration:return this.dtdElement(s,E,v);case N.EntityDeclaration:return this.dtdEntity(s,E,v);case N.NotationDeclaration:return this.dtdNotation(s,E,v);default:throw new Error("Unknown XML node type: "+s.constructor.name)}},o.prototype.processingInstruction=function(s,E,v){var p;return this.openNode(s,E,v),E.state=g.OpenTag,p=this.indent(s,E,v)+"<?",E.state=g.InsideTag,p+=s.target,s.value&&(p+=" "+s.value),E.state=g.CloseTag,p+=E.spaceBeforeSlash+"?>",p+=this.endline(s,E,v),E.state=g.None,this.closeNode(s,E,v),p},o.prototype.raw=function(s,E,v){var p;return this.openNode(s,E,v),E.state=g.OpenTag,p=this.indent(s,E,v),E.state=g.InsideTag,p+=s.value,E.state=g.CloseTag,p+=this.endline(s,E,v),E.state=g.None,this.closeNode(s,E,v),p},o.prototype.text=function(s,E,v){var p;return this.openNode(s,E,v),E.state=g.OpenTag,p=this.indent(s,E,v),E.state=g.InsideTag,p+=s.value,E.state=g.CloseTag,p+=this.endline(s,E,v),E.state=g.None,this.closeNode(s,E,v),p},o.prototype.dtdAttList=function(s,E,v){var p;return this.openNode(s,E,v),E.state=g.OpenTag,p=this.indent(s,E,v)+"<!ATTLIST",E.state=g.InsideTag,p+=" "+s.elementName+" "+s.attributeName+" "+s.attributeType,s.defaultValueType!=="#DEFAULT"&&(p+=" "+s.defaultValueType),s.defaultValue&&(p+=' "'+s.defaultValue+'"'),E.state=g.CloseTag,p+=E.spaceBeforeSlash+">"+this.endline(s,E,v),E.state=g.None,this.closeNode(s,E,v),p},o.prototype.dtdElement=function(s,E,v){var p;return this.openNode(s,E,v),E.state=g.OpenTag,p=this.indent(s,E,v)+"<!ELEMENT",E.state=g.InsideTag,p+=" "+s.name+" "+s.value,E.state=g.CloseTag,p+=E.spaceBeforeSlash+">"+this.endline(s,E,v),E.state=g.None,this.closeNode(s,E,v),p},o.prototype.dtdEntity=function(s,E,v){var p;return this.openNode(s,E,v),E.state=g.OpenTag,p=this.indent(s,E,v)+"<!ENTITY",E.state=g.InsideTag,s.pe&&(p+=" %"),p+=" "+s.name,s.value?p+=' "'+s.value+'"':(s.pubID&&s.sysID?p+=' PUBLIC "'+s.pubID+'" "'+s.sysID+'"':s.sysID&&(p+=' SYSTEM "'+s.sysID+'"'),s.nData&&(p+=" NDATA "+s.nData)),E.state=g.CloseTag,p+=E.spaceBeforeSlash+">"+this.endline(s,E,v),E.state=g.None,this.closeNode(s,E,v),p},o.prototype.dtdNotation=function(s,E,v){var p;return this.openNode(s,E,v),E.state=g.OpenTag,p=this.indent(s,E,v)+"<!NOTATION",E.state=g.InsideTag,p+=" "+s.name,s.pubID&&s.sysID?p+=' PUBLIC "'+s.pubID+'" "'+s.sysID+'"':s.pubID?p+=' PUBLIC "'+s.pubID+'"':s.sysID&&(p+=' SYSTEM "'+s.sysID+'"'),E.state=g.CloseTag,p+=E.spaceBeforeSlash+">"+this.endline(s,E,v),E.state=g.None,this.closeNode(s,E,v),p},o.prototype.openNode=function(s,E,v){},o.prototype.closeNode=function(s,E,v){},o.prototype.openAttribute=function(s,E,v){},o.prototype.closeAttribute=function(s,E,v){},o}()}).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(B,Q,D){"use strict";(function(){var N,g,w,k,b,m,T,_,t,h;h=B("./Utility"),_=h.assign,t=h.isFunction,w=B("./XMLDOMImplementation"),k=B("./XMLDocument"),b=B("./XMLDocumentCB"),T=B("./XMLStringWriter"),m=B("./XMLStreamWriter"),N=B("./NodeType"),g=B("./WriterState"),Q.exports.create=function(r,c,i,n){var l,f;if(r==null)throw new Error("Root element needs a name.");return n=_({},c,i,n),l=new k(n),f=l.element(r),n.headless||(l.declaration(n),(n.pubID!=null||n.sysID!=null)&&l.dtd(n)),f},Q.exports.begin=function(r,c,i){var n;return t(r)&&(n=[r,c],c=n[0],i=n[1],r={}),c?new b(r,c,i):new k(r)},Q.exports.stringWriter=function(r){return new T(r)},Q.exports.streamWriter=function(r,c){return new m(r,c)},Q.exports.implementation=new w,Q.exports.nodeType=N,Q.exports.writerState=g}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(B,Q,D){Q.exports=g;var N=Object.prototype.hasOwnProperty;function g(){for(var w={},k=0;k<arguments.length;k++){var b=arguments[k];for(var m in b)N.call(b,m)&&(w[m]=b[m])}return w}},{}],284:[function(B,Q,D){"use strict";var N=B("buffer").Buffer,g=B("./sha"),w=B("./md5"),k={sha1:g,md5:w},b=64,m=N.alloc(b);m.fill(0);function T(h,r,c){N.isBuffer(r)||(r=N.from(r)),N.isBuffer(c)||(c=N.from(c)),r.length>b?r=h(r):r.length<b&&(r=N.concat([r,m],b));for(var i=N.alloc(b),n=N.alloc(b),l=0;l<b;l++)i[l]=r[l]^54,n[l]=r[l]^92;var f=h(N.concat([i,c]));return h(N.concat([n,f]))}function _(h,r){h=h||"sha1";var c=k[h],i=[],n=0;return c||t("algorithm:",h,"is not yet supported"),{update:function(f){return N.isBuffer(f)||(f=N.from(f)),i.push(f),n+=f.length,this},digest:function(f){var d=N.concat(i),u=r?T(c,r,d):c(d);return i=null,f?u.toString(f):u}}}function t(){var h=[].slice.call(arguments).join(" ");throw new Error([h,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}D.createHash=function(h){return _(h)},D.createHmac=function(h,r){return _(h,r)},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(B,Q,D){"use strict";var N=B("buffer").Buffer,g=4,w=N.alloc(g);w.fill(0);var k=8;function b(_,t){if(_.length%g!==0){var h=_.length+(g-_.length%g);_=N.concat([_,w],h)}for(var r=[],c=t?_.readInt32BE:_.readInt32LE,i=0;i<_.length;i+=g)r.push(c.call(_,i));return r}function m(_,t,h){for(var r=N.alloc(t),c=h?r.writeInt32BE:r.writeInt32LE,i=0;i<_.length;i++)c.call(r,_[i],i*4,!0);return r}function T(_,t,h,r){N.isBuffer(_)||(_=N.from(_));var c=t(b(_,r),_.length*k);return m(c,h,r)}Q.exports={hash:T}},{buffer:73}],286:[function(B,Q,D){"use strict";var N=B("./helpers");function g(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function w(r,c){r[c>>5]|=128<<c%32,r[(c+64>>>9<<4)+14]=c;for(var i=1732584193,n=-271733879,l=-1732584194,f=271733878,d=0;d<r.length;d+=16){var u=i,o=n,s=l,E=f;i=b(i,n,l,f,r[d+0],7,-680876936),f=b(f,i,n,l,r[d+1],12,-389564586),l=b(l,f,i,n,r[d+2],17,606105819),n=b(n,l,f,i,r[d+3],22,-1044525330),i=b(i,n,l,f,r[d+4],7,-176418897),f=b(f,i,n,l,r[d+5],12,1200080426),l=b(l,f,i,n,r[d+6],17,-1473231341),n=b(n,l,f,i,r[d+7],22,-45705983),i=b(i,n,l,f,r[d+8],7,1770035416),f=b(f,i,n,l,r[d+9],12,-1958414417),l=b(l,f,i,n,r[d+10],17,-42063),n=b(n,l,f,i,r[d+11],22,-1990404162),i=b(i,n,l,f,r[d+12],7,1804603682),f=b(f,i,n,l,r[d+13],12,-40341101),l=b(l,f,i,n,r[d+14],17,-1502002290),n=b(n,l,f,i,r[d+15],22,1236535329),i=m(i,n,l,f,r[d+1],5,-165796510),f=m(f,i,n,l,r[d+6],9,-1069501632),l=m(l,f,i,n,r[d+11],14,643717713),n=m(n,l,f,i,r[d+0],20,-373897302),i=m(i,n,l,f,r[d+5],5,-701558691),f=m(f,i,n,l,r[d+10],9,38016083),l=m(l,f,i,n,r[d+15],14,-660478335),n=m(n,l,f,i,r[d+4],20,-405537848),i=m(i,n,l,f,r[d+9],5,568446438),f=m(f,i,n,l,r[d+14],9,-1019803690),l=m(l,f,i,n,r[d+3],14,-187363961),n=m(n,l,f,i,r[d+8],20,1163531501),i=m(i,n,l,f,r[d+13],5,-1444681467),f=m(f,i,n,l,r[d+2],9,-51403784),l=m(l,f,i,n,r[d+7],14,1735328473),n=m(n,l,f,i,r[d+12],20,-1926607734),i=T(i,n,l,f,r[d+5],4,-378558),f=T(f,i,n,l,r[d+8],11,-2022574463),l=T(l,f,i,n,r[d+11],16,1839030562),n=T(n,l,f,i,r[d+14],23,-35309556),i=T(i,n,l,f,r[d+1],4,-1530992060),f=T(f,i,n,l,r[d+4],11,1272893353),l=T(l,f,i,n,r[d+7],16,-155497632),n=T(n,l,f,i,r[d+10],23,-1094730640),i=T(i,n,l,f,r[d+13],4,681279174),f=T(f,i,n,l,r[d+0],11,-358537222),l=T(l,f,i,n,r[d+3],16,-722521979),n=T(n,l,f,i,r[d+6],23,76029189),i=T(i,n,l,f,r[d+9],4,-640364487),f=T(f,i,n,l,r[d+12],11,-421815835),l=T(l,f,i,n,r[d+15],16,530742520),n=T(n,l,f,i,r[d+2],23,-995338651),i=_(i,n,l,f,r[d+0],6,-198630844),f=_(f,i,n,l,r[d+7],10,1126891415),l=_(l,f,i,n,r[d+14],15,-1416354905),n=_(n,l,f,i,r[d+5],21,-57434055),i=_(i,n,l,f,r[d+12],6,1700485571),f=_(f,i,n,l,r[d+3],10,-1894986606),l=_(l,f,i,n,r[d+10],15,-1051523),n=_(n,l,f,i,r[d+1],21,-2054922799),i=_(i,n,l,f,r[d+8],6,1873313359),f=_(f,i,n,l,r[d+15],10,-30611744),l=_(l,f,i,n,r[d+6],15,-1560198380),n=_(n,l,f,i,r[d+13],21,1309151649),i=_(i,n,l,f,r[d+4],6,-145523070),f=_(f,i,n,l,r[d+11],10,-1120210379),l=_(l,f,i,n,r[d+2],15,718787259),n=_(n,l,f,i,r[d+9],21,-343485551),i=t(i,u),n=t(n,o),l=t(l,s),f=t(f,E)}return Array(i,n,l,f)}function k(r,c,i,n,l,f){return t(h(t(t(c,r),t(n,f)),l),i)}function b(r,c,i,n,l,f,d){return k(c&i|~c&n,r,c,l,f,d)}function m(r,c,i,n,l,f,d){return k(c&n|i&~n,r,c,l,f,d)}function T(r,c,i,n,l,f,d){return k(c^i^n,r,c,l,f,d)}function _(r,c,i,n,l,f,d){return k(i^(c|~n),r,c,l,f,d)}function t(r,c){var i=(r&65535)+(c&65535),n=(r>>16)+(c>>16)+(i>>16);return n<<16|i&65535}function h(r,c){return r<<c|r>>>32-c}Q.exports=function(c){return N.hash(c,w,16)}},{"./helpers":285}],287:[function(B,Q,D){"use strict";var N=B("./helpers");function g(T,_){T[_>>5]|=128<<24-_%32,T[(_+64>>9<<4)+15]=_;for(var t=Array(80),h=1732584193,r=-271733879,c=-1732584194,i=271733878,n=-1009589776,l=0;l<T.length;l+=16){for(var f=h,d=r,u=c,o=i,s=n,E=0;E<80;E++){E<16?t[E]=T[l+E]:t[E]=m(t[E-3]^t[E-8]^t[E-14]^t[E-16],1);var v=b(b(m(h,5),w(E,r,c,i)),b(b(n,t[E]),k(E)));n=i,i=c,c=m(r,30),r=h,h=v}h=b(h,f),r=b(r,d),c=b(c,u),i=b(i,o),n=b(n,s)}return Array(h,r,c,i,n)}function w(T,_,t,h){return T<20?_&t|~_&h:T<40?_^t^h:T<60?_&t|_&h|t&h:_^t^h}function k(T){return T<20?1518500249:T<40?1859775393:T<60?-1894007588:-899497514}function b(T,_){var t=(T&65535)+(_&65535),h=(T>>16)+(_>>16)+(t>>16);return h<<16|t&65535}function m(T,_){return T<<_|T>>>32-_}Q.exports=function(_){return N.hash(_,g,20,!0)}},{"./helpers":285}],288:[function(B,Q,D){"use strict";Q.exports=function(){return function(){}}},{}],289:[function(B,Q,D){(function(N){"use strict";var g=B("babel-runtime/helpers/typeof"),w=k(g);function k(h){return h&&h.__esModule?h:{default:h}}var b=B("stream"),m=b.Stream,T=B("../lib/common/utils/isArray"),_=T.isArray;Q.exports.string=function(r){return typeof r=="string"},Q.exports.array=_,Q.exports.buffer=N.isBuffer;function t(h){return h instanceof m}Q.exports.writableStream=function(r){return t(r)&&typeof r._write=="function"&&(0,w.default)(r._writableState)==="object"}}).call(this,{isBuffer:B("../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(B,Q,D){"use strict";D.encodeURIComponent=function(N){try{return encodeURIComponent(N)}catch(g){return N}},D.escape=B("escape-html"),D.timestamp=function(g){if(g){var w=g;return typeof w=="string"&&(w=Number(w)),String(g).length===10&&(w*=1e3),new Date(w)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(B,Q,D){(function(N,g){"use strict";var w=B("babel-runtime/core-js/json/stringify"),k=T(w),b=B("babel-runtime/helpers/typeof"),m=T(b);function T(E){return E&&E.__esModule?E:{default:E}}var _=B("util"),t=B("url"),h=B("http"),r=B("https"),c=B("debug")("urllib"),i=B("humanize-ms"),n,l=0,f=Math.pow(2,31)-10,d=/^https?:\/\//i;function u(E,v){return E===void 0?v:E}function o(E,v){return function(p,I,R){if(p)return v(p);E({data:I,status:R.statusCode,headers:R.headers,res:R})}}D.TIMEOUTS=[i("300s"),i("300s")];var s=["json","text"];D.request=function(v,p,I){return arguments.length===2&&typeof p=="function"&&(I=p,p=null),typeof I=="function"?D.requestWithCallback(v,p,I):(n||(n=B("any-promise")),new n(function(R,y){D.requestWithCallback(v,p,o(R,y))}))},D.requestWithCallback=function(v,p,I){if(!v||typeof v!="string"&&(typeof v=="undefined"?"undefined":(0,m.default)(v))!=="object"){var R=_.format("expect request url to be a string or a http request options, but got %j",v);throw new Error(R)}arguments.length===2&&typeof p=="function"&&(I=p,p=null),p=p||{},l>=f&&(l=0);var y=++l;p.requestUrls=p.requestUrls||[];var x={requestId:y,url:v,args:p,ctx:p.ctx};p.emitter&&p.emitter.emit("request",x),p.timeout=p.timeout||D.TIMEOUTS,p.maxRedirects=p.maxRedirects||10,p.streaming=p.streaming||p.customResponse;var C=Date.now(),S;typeof v=="string"?(d.test(v)||(v="http://"+v),S=t.parse(v)):S=v;var F=(p.type||p.method||S.method||"GET").toUpperCase(),j=S.port||80,A=h,Y=u(p.agent,D.agent),z=p.fixJSONCtlChars;S.protocol==="https:"&&(A=r,Y=u(p.httpsAgent,D.httpsAgent),S.port||(j=443));var O={host:S.hostname||S.host||"localhost",path:S.path||"/",method:F,port:j,agent:Y,headers:p.headers||{},lookup:p.lookup};Array.isArray(p.timeout)?O.requestTimeout=p.timeout[p.timeout.length-1]:typeof p.timeout!="undefined"&&(O.requestTimeout=p.timeout);for(var H=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U<H.length;U++){var L=H[U];p.hasOwnProperty(L)&&(O[L]=p[L])}O.rejectUnauthorized===!1&&!O.hasOwnProperty("secureOptions")&&(O.secureOptions=B("constants").SSL_OP_NO_TLSv1_2);var K=p.auth||S.auth;K&&(O.auth=K);var ee=p.content||p.data,oe=F==="GET"||F==="HEAD"||p.dataAsQueryString;if(!p.content&&(ee&&!(typeof ee=="string"||g.isBuffer(ee))))if(oe)ee=p.nestedQuerystring?qs.stringify(ee):querystring.stringify(ee);else{var ae=O.headers["Content-Type"]||O.headers["content-type"];ae||(p.contentType==="json"?ae="application/json":ae="application/x-www-form-urlencoded",O.headers["Content-Type"]=ae),parseContentType(ae).type==="application/json"?ee=(0,k.default)(ee):ee=p.nestedQuerystring?qs.stringify(ee):querystring.stringify(ee)}oe&&ee&&(O.path+=(S.query?"&":"?")+ee,ee=null);var be=0;if(ee){var _e=ee.length;g.isBuffer(ee)||(_e=g.byteLength(ee)),be=O.headers["Content-Length"]=_e}p.dataType==="json"&&(O.headers.Accept="application/json"),typeof p.beforeRequest=="function"&&p.beforeRequest(O);var fe=null,Re=null,Ce=null,ce=!1,te=!1,W=0,X=-1,V=!1,Z="",q="",ie=null;p.timing&&(ie={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function ne(){fe&&(clearTimeout(fe),fe=null)}function J(){Re&&(clearTimeout(Re),Re=null)}function $(Ie,Ze,nt){if(J(),!I){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),y,N.pid,O.method,v),Ie&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),y,N.pid,Ie.name,Ie.message,Ie.stack);return}var ye=I;I=null;var ue={};if(nt&&(X=nt.statusCode,ue=nt.headers),X===401&&ue["www-authenticate"]&&(!p.headers||!p.headers.Authorization)&&p.digestAuth){var pe=ue["www-authenticate"];if(pe.indexOf("Digest ")>=0)return c("Request#%d %s: got digest auth header WWW-Authenticate: %s",y,v,pe),p.headers=p.headers||{},p.headers.Authorization=digestAuthHeader(O.method,O.path,pe,p.digestAuth),c("Request#%d %s: auth with digest header: %s",y,v,p.headers.Authorization),nt.headers["set-cookie"]&&(p.headers.Cookie=nt.headers["set-cookie"].join(";")),D.requestWithCallback(v,p,ye)}var me=Date.now()-C;ie&&(ie.contentDownload=me),c("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",me,W,X,O.method,O.host,O.path,te,ie);var Oe={status:X,statusCode:X,headers:ue,size:W,aborted:V,rt:me,keepAliveSocket:te,data:Ze,requestUrls:p.requestUrls,timing:ie,remoteAddress:Z,remotePort:q};if(Ie){var ve="";Y&&typeof Y.getCurrentStatus=="function"&&(ve=", agent status: "+(0,k.default)(Y.getCurrentStatus())),Ie.message+=", "+O.method+" "+v+" "+X+" (connected: "+ce+", keepalive socket: "+te+ve+`)
|
|
|
headers: `+(0,k.default)(ue),Ie.data=Ze,Ie.path=O.path,Ie.status=X,Ie.headers=ue,Ie.res=Oe}ye(Ie,Ze,p.streaming?nt:Oe),p.emitter&&(x.url=v,x.socket=qe&&qe.connection,x.options=O,x.size=be,p.emitter.emit("response",{requestId:y,error:Ie,ctx:p.ctx,req:x,res:Oe}))}function le(Ie){var Ze=null;if(p.followRedirect&&statuses.redirect[Ie.statusCode]){p._followRedirectCount=(p._followRedirectCount||0)+1;var nt=Ie.headers.location;if(!nt)Ze=new Error("Got statusCode "+Ie.statusCode+" but cannot resolve next location from headers"),Ze.name="FollowRedirectError";else if(p._followRedirectCount>p.maxRedirects)Ze=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+v),Ze.name="MaxRedirectError";else{var ye=p.formatRedirectUrl?p.formatRedirectUrl(v,nt):t.resolve(v,nt);c("Request#%d %s: `redirected` from %s to %s",y,O.path,v,ye),J(),p.headers&&p.headers.Host&&d.test(nt)&&(p.headers.Host=null);var ue=I;return I=null,D.requestWithCallback(ye,p,ue),{redirect:!0,error:null}}}return{redirect:!1,error:Ze}}!O.headers["User-Agent"]&&!O.headers["user-agent"]&&(O.headers["User-Agent"]=navigator.userAgent),p.gzip&&(!O.headers["Accept-Encoding"]&&!O.headers["accept-encoding"]&&(O.headers["Accept-Encoding"]="gzip"));function he(Ie,Ze,nt){var ye=Ie.headers["content-encoding"];return nt(null,Ze,ye)}var Se=p.writeStream;c("Request#%d %s %s with headers %j, options.path: %s",y,F,v,O.headers,O.path),p.requestUrls.push(v);function Ue(Ie){if(ie&&(ie.waiting=Date.now()-C),c("Request#%d %s `req response` event emit: status %d, headers: %j",y,v,Ie.statusCode,Ie.headers),p.streaming){var Ze=le(Ie);if(Ze.redirect){Ie.resume();return}return Ze.error?(Ie.resume(),$(Ze.error,null,Ie)):$(null,null,Ie)}if(Ie.on("close",function(){c("Request#%d %s: `res close` event emit, total size %d",y,v,W)}),Ie.on("error",function(){c("Request#%d %s: `res error` event emit, total size %d",y,v,W)}),Ie.on("aborted",function(){V=!0,c("Request#%d %s: `res aborted` event emit, total size %d",y,v,W)}),Se){var Ze=le(Ie);if(Ze.redirect){Ie.resume();return}return Ze.error?(Ie.resume(),Se.end(),$(Ze.error,null,Ie)):(p.consumeWriteStream===!1?Ie.on("end",$.bind(null,null,null,Ie)):isNode010||isNode012?first([[Se,"close"],[Ie,"aborted"]],function(ue,pe,me){c("Request#%d %s: writeStream or res %s event emitted",y,v,me),$(Ce||null,null,Ie)}):Se.on("close",function(){c("Request#%d %s: writeStream close event emitted",y,v),$(Ce||null,null,Ie)}),Ie.pipe(Se))}var nt=[];Ie.on("data",function(ye){c("Request#%d %s: `res data` event emit, size %d",y,v,ye.length),W+=ye.length,nt.push(ye)}),Ie.on("end",function(){var ye=g.concat(nt,W);if(c("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",y,v,W,Ie._dumped),Ce)return $(Ce,ye,Ie);var ue=le(Ie);if(ue.error)return $(ue.error,ye,Ie);if(ue.redirect)return;he(Ie,ye,function(pe,me,Oe){if(pe)return $(pe,ye,Ie);if(!Oe&&s.indexOf(p.dataType)>=0){try{me=decodeBodyByCharset(me,Ie)}catch(xe){return c("decodeBodyByCharset error: %s",xe),$(null,me,Ie)}if(p.dataType==="json")if(W===0)me=null;else{var ve=parseJSON(me,z);ve.error?pe=ve.error:me=ve.data}}V&&c("Request#%d %s: Remote socket was terminated before `response.end()` was called",y,v),$(pe,me,Ie)})})}var Xe,$e;Array.isArray(p.timeout)?(Xe=i(p.timeout[0]),$e=i(p.timeout[1])):Xe=$e=i(p.timeout),c("ConnectTimeout: %d, ResponseTimeout: %d",Xe,$e);function Ye(){c("Connect timer ticking, timeout: %d",Xe),fe=setTimeout(function(){fe=null,X===-1&&(X=-2);var Ie="Connect timeout for "+Xe+"ms",Ze="ConnectionTimeoutError";qe.socket||(Ze="SocketAssignTimeoutError",Ie+=", working sockets is full"),Ce=new Error(Ie),Ce.name=Ze,Ce.requestId=y,c("ConnectTimeout: Request#%d %s %s: %s, connected: %s",y,v,Ce.name,Ie,ce),Pe()},Xe)}function et(){c("Response timer ticking, timeout: %d",$e),Re=setTimeout(function(){Re=null;var Ie="Response timeout for "+$e+"ms",Ze="ResponseTimeoutError";Ce=new Error(Ie),Ce.name=Ze,Ce.requestId=y,c("ResponseTimeout: Request#%d %s %s: %s, connected: %s",y,v,Ce.name,Ie,ce),Pe()},$e)}var qe;O.mode=p.mode?p.mode:"";try{qe=A.request(O,Ue)}catch(Ie){return $(Ie)}typeof window=="undefined"?Ye():qe.on("requestTimeout",function(){X===-1&&(X=-2);var Ie="Connect timeout for "+Xe+"ms",Ze="ConnectionTimeoutError";Ce=new Error(Ie),Ce.name=Ze,Ce.requestId=y,Pe()});function Pe(){c("Request#%d %s abort, connected: %s",y,v,ce),qe.socket||(Ce.noSocket=!0,$(Ce)),qe.abort()}return ie&&qe.on("finish",function(){ie.requestSent=Date.now()-C}),qe.once("socket",function(Ie){ie&&(ie.queuing=Date.now()-C),isNode010&&Ie.socket&&(Ie=Ie.socket);var Ze=Ie.readyState;if(Ze==="opening"){Ie.once("lookup",function(nt,ye,ue){c("Request#%d %s lookup: %s, %s, %s",y,v,nt,ye,ue),ie&&(ie.dnslookup=Date.now()-C),ye&&(Z=ye)}),Ie.once("connect",function(){ie&&(ie.connected=Date.now()-C),ne(),et(),c("Request#%d %s new socket connected",y,v),ce=!0,Z||(Z=Ie.remoteAddress),q=Ie.remotePort});return}c("Request#%d %s reuse socket connected, readyState: %s",y,v,Ze),ce=!0,te=!0,Z||(Z=Ie.remoteAddress),q=Ie.remotePort,ne(),et()}),qe.on("error",function(Ie){(Ie.name==="Error"||Ie.name==="TypeError")&&(Ie.name=ce?"ResponseError":"RequestError"),Ie.message+=' (req "error")',c("Request#%d %s `req error` event emit, %s: %s",y,v,Ie.name,Ie.message),$(Ce||Ie)}),Se&&Se.once("error",function(Ie){Ie.message+=' (writeStream "error")',Ce=Ie,c("Request#%d %s `writeStream error` event emit, %s: %s",y,v,Ie.name,Ie.message),Pe()}),p.stream?(p.stream.pipe(qe),p.stream.once("error",function(Ie){Ie.message+=' (stream "error")',Ce=Ie,c("Request#%d %s `readStream error` event emit, %s: %s",y,v,Ie.name,Ie.message),Pe()})):qe.end(ee),qe.requestId=y,qe}}).call(this,B("_process"),B("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(B,Q,D){"use strict";D.d(Q,"a",function(){return _});var N=D("q1tI"),g=D("biw7"),w=D("fyJ8");function k(t){var h=t.className,r=t.index,c=t.children,i=t.colSpan,n=t.rowSpan,l=N.useContext(g.a),f=l.prefixCls,d=l.fixedInfoList,u=d[r];return N.createElement(w.a,Object.assign({className:h,index:r,component:"td",prefixCls:f,record:null,dataIndex:null,render:function(){return{children:c,props:{colSpan:i,rowSpan:n}}}},u))}function b(t){return N.createElement("tr",Object.assign({},t))}function m(t){var h=t.children,r=N.useContext(g.a),c=r.prefixCls;return N.createElement("tfoot",{className:"".concat(c,"-summary")},h)}var T=Q.b=m,_={Cell:k,Row:b}},nEHx:function(B,Q,D){"use strict";D.d(Q,"a",function(){return N});var N;(function(g){g.DARK="dark",g.LIGHT="light",g.HIGH_CONTRAST="hc"})(N||(N={}))},nj2k:function(B,Q,D){B.exports=D.p+"static/nodata.c3b0b86c.svg"},nnTU:function(B,Q,D){"use strict";D.d(Q,"b",function(){return T}),D.d(Q,"a",function(){return _});var N=D("MI8n"),g=D("JYp7"),w=D("pmY6"),k=D("24hK"),b=D("746U"),m=D("Cg/j");const T=Object(m.c)("commandService"),_=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new N.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(t,h){if(!t)throw new Error("invalid command");if(typeof t=="string"){if(!h)throw new Error("invalid command");return this.registerCommand({id:t,handler:h})}if(t.description){const l=[];for(let d of t.description.args)l.push(d.constraint);const f=t.handler;t.handler=function(d,...u){return Object(b.o)(u,l),f(d,...u)}}const{id:r}=t;let c=this._commands.get(r);c||(c=new k.a,this._commands.set(r,c));let i=c.unshift(t),n=Object(w.i)(()=>{i();const l=this._commands.get(r);(l==null?void 0:l.isEmpty())&&this._commands.delete(r)});return this._onDidRegisterCommand.fire(r),n}registerCommandAlias(t,h){return _.registerCommand(t,(r,...c)=>r.get(T).executeCommand(h,...c))}getCommand(t){const h=this._commands.get(t);return!h||h.isEmpty()?void 0:g.a.first(h)}getCommands(){const t=new Map;for(const h of this._commands.keys()){const r=this.getCommand(h);r&&t.set(h,r)}return t}};_.registerCommand("noop",()=>{})},oRuE:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("OLod"))})(this,function(N){return N.pad.Iso10126={pad:function(g,w){var k=w*4,b=k-g.sigBytes%k;g.concat(N.lib.WordArray.random(b-1)).concat(N.lib.WordArray.create([b<<24],1))},unpad:function(g){var w=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=w}},N.pad.Iso10126})},osHv:function(B,Q,D){(function(N){N(D("VrN/"))})(function(N){"use strict";var g=N.Pos;function w(d,u){return d.line-u.line||d.ch-u.ch}var k="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",b=k+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",m=new RegExp("<(/?)(["+k+"]["+b+"]*)","g");function T(d,u,o,s){this.line=u,this.ch=o,this.cm=d,this.text=d.getLine(u),this.min=s?Math.max(s.from,d.firstLine()):d.firstLine(),this.max=s?Math.min(s.to-1,d.lastLine()):d.lastLine()}function _(d,u){var o=d.cm.getTokenTypeAt(g(d.line,u));return o&&/\btag\b/.test(o)}function t(d){return d.line>=d.max?void 0:(d.ch=0,d.text=d.cm.getLine(++d.line),!0)}function h(d){return d.line<=d.min?void 0:(d.text=d.cm.getLine(--d.line),d.ch=d.text.length,!0)}function r(d){for(;;){var u=d.text.indexOf(">",d.ch);if(u==-1){if(t(d))continue;return}if(!_(d,u+1)){d.ch=u+1;continue}var o=d.text.lastIndexOf("/",u),s=o>-1&&!/\S/.test(d.text.slice(o+1,u));return d.ch=u+1,s?"selfClose":"regular"}}function c(d){for(;;){var u=d.ch?d.text.lastIndexOf("<",d.ch-1):-1;if(u==-1){if(h(d))continue;return}if(!_(d,u+1)){d.ch=u;continue}m.lastIndex=u,d.ch=u;var o=m.exec(d.text);if(o&&o.index==u)return o}}function i(d){for(;;){m.lastIndex=d.ch;var u=m.exec(d.text);if(!u){if(t(d))continue;return}if(!_(d,u.index+1)){d.ch=u.index+1;continue}return d.ch=u.index+u[0].length,u}}function n(d){for(;;){var u=d.ch?d.text.lastIndexOf(">",d.ch-1):-1;if(u==-1){if(h(d))continue;return}if(!_(d,u+1)){d.ch=u;continue}var o=d.text.lastIndexOf("/",u),s=o>-1&&!/\S/.test(d.text.slice(o+1,u));return d.ch=u+1,s?"selfClose":"regular"}}function l(d,u){for(var o=[];;){var s=i(d),E,v=d.line,p=d.ch-(s?s[0].length:0);if(!s||!(E=r(d)))return;if(E=="selfClose")continue;if(s[1]){for(var I=o.length-1;I>=0;--I)if(o[I]==s[2]){o.length=I;break}if(I<0&&(!u||u==s[2]))return{tag:s[2],from:g(v,p),to:g(d.line,d.ch)}}else o.push(s[2])}}function f(d,u){for(var o=[];;){var s=n(d);if(!s)return;if(s=="selfClose"){c(d);continue}var E=d.line,v=d.ch,p=c(d);if(!p)return;if(p[1])o.push(p[2]);else{for(var I=o.length-1;I>=0;--I)if(o[I]==p[2]){o.length=I;break}if(I<0&&(!u||u==p[2]))return{tag:p[2],from:g(d.line,d.ch),to:g(E,v)}}}}N.registerHelper("fold","xml",function(d,u){for(var o=new T(d,u.line,0);;){var s=i(o);if(!s||o.line!=u.line)return;var E=r(o);if(!E)return;if(!s[1]&&E!="selfClose"){var v=g(o.line,o.ch),p=l(o,s[2]);return p&&w(p.from,v)>0?{from:v,to:p.from}:null}}}),N.findMatchingTag=function(d,u,o){var s=new T(d,u.line,u.ch,o);if(s.text.indexOf(">")==-1&&s.text.indexOf("<")==-1)return;var E=r(s),v=E&&g(s.line,s.ch),p=E&&c(s);if(!E||!p||w(s,u)>0)return;var I={from:g(s.line,s.ch),to:v,tag:p[2]};return E=="selfClose"?{open:I,close:null,at:"open"}:p[1]?{open:f(s,p[2]),close:I,at:"close"}:(s=new T(d,v.line,v.ch,o),{open:I,close:l(s,p[2]),at:"open"})},N.findEnclosingTag=function(d,u,o,s){for(var E=new T(d,u.line,u.ch,o);;){var v=f(E,s);if(!v)break;var p=new T(d,u.line,u.ch,o),I=l(p,v.tag);if(I)return{open:v,close:I}}},N.scanForClosingTag=function(d,u,o,s){var E=new T(d,u.line,u.ch,s?{from:0,to:s}:null);return l(E,o)}})},p5ED:function(B,Q,D){"use strict";var N=D("+L6B"),g=D("2/Rp"),w=D("5Dmo"),k=D("3S7+"),b=D("k1fw"),m=D("9og8"),T=D("tJVT"),_=D("WmNS"),t=D.n(_),h=D("q1tI"),r=D.n(h),c=D("vHTk"),i=D.n(c),n=D("yEEn"),l=D("ZW9T"),f=D("1vsH"),d=D("V0Rq"),u=D("m3rI");Q.a=function(o){var s,E,v,p,I,R,y,x=o.editOffice,C=x===void 0?"view":x,S=o.data,F=o.theme,j=o.type,A=o.filename,Y=o.monacoEditor,z=o.className,O=o.style,H=o.close,U=o.onClose,L=o.hasMask,K=o.disabledDownload,ee=Object(h.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),oe=Object(T.a)(ee,2),ae=oe[0],be=oe[1],_e=Object(h.useState)(""),fe=Object(T.a)(_e,2),Re=fe[0],Ce=fe[1],ce=Object(h.useState)(),te=Object(T.a)(ce,2),W=te[0],X=te[1],V=window.ENV==="build"?"/react/build":"",Z=u.a.PROXY_SERVER||location.origin,q,ie=1024*1024,ne=10*ie,J=Object(h.useRef)();(s=S)!==null&&s!==void 0&&s.startsWith("/api")&&j!=="txt"&&(S=(u.a.API_SERVER||location.origin)+S),j==="office"&&(q=Object(f.T)(S).filesize,q>ne&&(j="other")),A&&Y&&(Y.filename=A),Object(h.useEffect)(function(){var Se,Ue,Xe=(Se=document.cookie)===null||Se===void 0||((Ue=Se.replace(/\s/g,""))===null||Ue===void 0)?void 0:Ue.split(";");Xe==null||Xe.map(function($e){var Ye=$e.split("=");Ye[0]==="_educoder_session"&&Ce(Ye[1])})},[]),Object(h.useEffect)(function(){j==="office"&&$()},[j,S]);var $=function(){var Se=Object(m.a)(t.a.mark(function Ue(){var Xe,$e,Ye;return t.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return console.log("data:",S),Xe=S,S.startsWith("http")||(Xe=location.origin+Xe),$e=new URL(Xe).pathname.split("/").pop(),qe.next=6,Object(d.V)({attachment_id:$e});case 6:Ye=qe.sent,X(Ye);case 8:case"end":return qe.stop()}},Ue)}));return function(){return Se.apply(this,arguments)}}(),le=function(){if(S.startsWith("http")||S.startsWith("blob:")){he();return}Object(f.z)(A||"educoder",S,A)},he=function(){Object(f.x)(A||"educoder",decodeURIComponent(S))};return r.a.createElement("div",{style:Object(b.a)({},O||{}),className:"".concat(L&&i.a.bgBlack," ").concat(j?i.a.wrp:"hide")},H&&r.a.createElement("div",{className:i.a.close,ref:J},!K&&r.a.createElement(k.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return J.current}},r.a.createElement("span",{onClick:he},r.a.createElement("i",{className:"icon-quxiaozhiding"}))),r.a.createElement(k.a,{title:"\u5173\u95ED",getPopupContainer:function(){return J.current}},r.a.createElement("span",{className:"",onClick:U},r.a.createElement("i",{className:"icon-guanbi1"})))),r.a.createElement("div",{className:"".concat(i.a[z]," ").concat(z," ").concat(i.a.monaco," ").concat(j==="txt"?"show":"hide")},j==="txt"&&r.a.createElement(l.b,Y)),j==="audio"&&r.a.createElement("audio",{src:"".concat(((E=S)===null||E===void 0?void 0:E.indexOf("http://"))>-1||((v=S)===null||v===void 0?void 0:v.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(S),autoPlay:!0}),j==="video"&&r.a.createElement(r.a.Fragment,null,((p=S)===null||p===void 0?void 0:p.indexOf("http"))>-1?r.a.createElement("video",{controls:!0,src:"".concat(S),autoPlay:!0}):r.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(S),autoPlay:!0})),j==="office"&&W&&r.a.createElement("iframe",{src:"".concat(V,"/office.html?key=").concat(W.key,"&url=").concat(Z+W.url,"&callbackUrl=").concat(Z+W.callbackUrl,"&fileType=").concat(W.fileType,"&title=").concat(W.title,"&model=").concat(C,"&officeServer=").concat(u.a.OFFICE_SERVER,"&disabledDownload=").concat(!!K)}),j==="html"&&r.a.createElement("iframe",{src:S+"&disposition=inline"}),j==="pdf"&&r.a.createElement("iframe",{src:"".concat(V,"/js/pdfview/index.html?url=").concat(S,"&disabledDownload=").concat(!!K)}),j==="image"&&r.a.createElement("img",{src:"".concat(((I=S)===null||I===void 0?void 0:I.indexOf("http://"))>-1||((R=S)===null||R===void 0?void 0:R.indexOf("https://"))>-1||(y=S)!==null&&y!==void 0&&y.startsWith("/api")?"":"data:image/png;base64,").concat(S)}),j==="other"&&r.a.createElement("div",null,r.a.createElement(g.a,{type:"primary",size:"large",onClick:le},r.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),j==="download"&&r.a.createElement(g.a,{type:"primary",size:"large",onClick:le},r.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(B,Q,D){},pA7S:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(N){return function(){var g=N,w=g.lib,k=w.WordArray,b=w.BlockCipher,m=g.algo,T=[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],h=[{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}],r=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],c=m.DES=b.extend({_doReset:function(){for(var f=this._key,d=f.words,u=[],o=0;o<56;o++){var s=T[o]-1;u[o]=d[s>>>5]>>>31-s%32&1}for(var E=this._subKeys=[],v=0;v<16;v++){for(var p=E[v]=[],I=t[v],o=0;o<24;o++)p[o/6|0]|=u[(_[o]-1+I)%28]<<31-o%6,p[4+(o/6|0)]|=u[28+(_[o+24]-1+I)%28]<<31-o%6;p[0]=p[0]<<1|p[0]>>>31;for(var o=1;o<7;o++)p[o]=p[o]>>>(o-1)*4+3;p[7]=p[7]<<5|p[7]>>>27}for(var R=this._invSubKeys=[],o=0;o<16;o++)R[o]=E[15-o]},encryptBlock:function(f,d){this._doCryptBlock(f,d,this._subKeys)},decryptBlock:function(f,d){this._doCryptBlock(f,d,this._invSubKeys)},_doCryptBlock:function(f,d,u){this._lBlock=f[d],this._rBlock=f[d+1],i.call(this,4,252645135),i.call(this,16,65535),n.call(this,2,858993459),n.call(this,8,16711935),i.call(this,1,1431655765);for(var o=0;o<16;o++){for(var s=u[o],E=this._lBlock,v=this._rBlock,p=0,I=0;I<8;I++)p|=h[I][((v^s[I])&r[I])>>>0];this._lBlock=v,this._rBlock=E^p}var R=this._lBlock;this._lBlock=this._rBlock,this._rBlock=R,i.call(this,1,1431655765),n.call(this,8,16711935),n.call(this,2,858993459),i.call(this,16,65535),i.call(this,4,252645135),f[d]=this._lBlock,f[d+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function i(f,d){var u=(this._lBlock>>>f^this._rBlock)&d;this._rBlock^=u,this._lBlock^=u<<f}function n(f,d){var u=(this._rBlock>>>f^this._lBlock)&d;this._lBlock^=u,this._rBlock^=u<<f}g.DES=b._createHelper(c);var l=m.TripleDES=b.extend({_doReset:function(){var f=this._key,d=f.words;if(d.length!==2&&d.length!==4&&d.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var u=d.slice(0,2),o=d.length<4?d.slice(0,2):d.slice(2,4),s=d.length<6?d.slice(0,2):d.slice(4,6);this._des1=c.createEncryptor(k.create(u)),this._des2=c.createEncryptor(k.create(o)),this._des3=c.createEncryptor(k.create(s))},encryptBlock:function(f,d){this._des1.encryptBlock(f,d),this._des2.decryptBlock(f,d),this._des3.encryptBlock(f,d)},decryptBlock:function(f,d){this._des3.decryptBlock(f,d),this._des2.encryptBlock(f,d),this._des1.decryptBlock(f,d)},keySize:192/32,ivSize:64/32,blockSize:64/32});g.TripleDES=b._createHelper(l)}(),N.TripleDES})},pmY6:function(B,Q,D){"use strict";D.d(Q,"h",function(){return h}),D.d(Q,"g",function(){return c}),D.d(Q,"f",function(){return i}),D.d(Q,"e",function(){return n}),D.d(Q,"i",function(){return l}),D.d(Q,"b",function(){return f}),D.d(Q,"a",function(){return d}),D.d(Q,"d",function(){return u}),D.d(Q,"c",function(){return o});var N=D("C/vA"),g=D("JYp7");const w=!1;let k=null;function b(s){k=s}if(w){const s="__is_disposable_tracked__";b(new class{trackDisposable(E){const v=new Error("Potentially leaked disposable").stack;setTimeout(()=>{E[s]||console.log(v)},3e3)}setParent(E,v){if(E&&E!==d.None)try{E[s]=!0}catch(p){}}markAsDisposed(E){if(E&&E!==d.None)try{E[s]=!0}catch(v){}}markAsSingleton(E){}})}function m(s){return k==null||k.trackDisposable(s),s}function T(s){k==null||k.markAsDisposed(s)}function _(s,E){k==null||k.setParent(s,E)}function t(s,E){if(!k)return;for(const v of s)k.setParent(v,E)}function h(s){return k==null||k.markAsSingleton(s),s}class r extends Error{constructor(s){super(`Encountered errors while disposing of store. Errors: [${s.join(", ")}]`);this.errors=s}}function c(s){return typeof s.dispose=="function"&&s.dispose.length===0}function i(s){if(g.a.is(s)){let E=[];for(const v of s)if(v)try{v.dispose()}catch(p){E.push(p)}if(E.length===1)throw E[0];if(E.length>1)throw new r(E);return Array.isArray(s)?[]:s}else if(s)return s.dispose(),s}function n(...s){const E=l(()=>i(s));return t(s,E),E}function l(s){const E=m({dispose:Object(N.a)(()=>{T(E),s()})});return E}class f{constructor(){this._toDispose=new Set,this._isDisposed=!1,m(this)}dispose(){if(this._isDisposed)return;T(this),this._isDisposed=!0,this.clear()}clear(){try{i(this._toDispose.values())}finally{this._toDispose.clear()}}add(s){if(!s)return s;if(s===this)throw new Error("Cannot register a disposable on itself!");return _(s,this),this._isDisposed?f.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(s),s}}f.DISABLE_DISPOSED_WARNING=!1;class d{constructor(){this._store=new f,m(this),_(this._store,this)}dispose(){T(this),this._store.dispose()}_register(s){if(s===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(s)}}d.None=Object.freeze({dispose(){}});class u{constructor(){this._isDisposed=!1,m(this)}get value(){return this._isDisposed?void 0:this._value}set value(s){var E;if(this._isDisposed||s===this._value)return;(E=this._value)===null||E===void 0||E.dispose(),s&&_(s,this),this._value=s}clear(){this.value=void 0}dispose(){var s;this._isDisposed=!0,T(this),(s=this._value)===null||s===void 0||s.dispose(),this._value=void 0}clearAndLeak(){const s=this._value;return this._value=void 0,s&&_(s,null),s}}class o{constructor(s){this.object=s}dispose(){}}},psGv:function(B,Q,D){var N,g;(function(){var w;(function(){"use strict";var T=[,,function(r){function c(l){this.__parent=l,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 l=new c(this.__parent);return l.set_indent(this.__indent_count,this.__alignment_count),l},c.prototype.item=function(l){return l<0?this.__items[this.__items.length+l]:this.__items[l]},c.prototype.has_match=function(l){for(var f=this.__items.length-1;f>=0;f--)if(this.__items[f].match(l))return!0;return!1},c.prototype.set_indent=function(l,f){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=f||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 l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__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(l){this.__items.push(l);var f=l.lastIndexOf(`
|
|
|
`);f!==-1?this.__character_count=l.length-f:this.__character_count+=l.length},c.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},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 l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function i(l,f){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),f=f||"",l.indent_level>0&&(f=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=f,this.__base_string_length=f.length}i.prototype.get_indent_size=function(l,f){var d=this.__base_string_length;return f=f||0,l<0&&(d=0),d+=l*this.__indent_size,d+=f,d},i.prototype.get_indent_string=function(l,f){var d=this.__base_string;return f=f||0,l<0&&(l=0,d=""),f+=l*this.__indent_size,this.__ensure_cache(f),d+=this.__cache[f],d},i.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var l=this.__cache.length,f=0,d="";this.__indent_size&&l>=this.__indent_size&&(f=Math.floor(l/this.__indent_size),l-=f*this.__indent_size,d=new Array(f+1).join(this.__indent_string)),l&&(d+=new Array(l+1).join(" ")),this.__cache.push(d)};function n(l,f){this.__indent_cache=new i(l,f),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.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(l,f){return this.__indent_cache.get_indent_string(l,f)},n.prototype.get_indent_size=function(l,f){return this.__indent_cache.get_indent_size(l,f)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},n.prototype.get_code=function(l){this.trim(!0);var f=this.current_line.pop();f&&(f[f.length-1]===`
|
|
|
`&&(f=f.replace(/\n+$/g,"")),this.current_line.push(f)),this._end_with_newline&&this.__add_outputline();var d=this.__lines.join(`
|
|
|
`);return l!==`
|
|
|
`&&(d=d.replace(/[\n]/g,l)),d},n.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},n.prototype.set_indent=function(l,f){return l=l||0,f=f||0,this.next_line.set_indent(l,f),this.__lines.length>1?(this.current_line.set_indent(l,f),!0):(this.current_line.set_indent(),!1)},n.prototype.add_raw_token=function(l){for(var f=0;f<l.newlines;f++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(l.whitespace_before),this.current_line.push(l.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},n.prototype.add_token=function(l){this.__add_space_before_token(),this.current_line.push(l),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(l){for(var f=this.__lines.length;l<f;)this.__lines[l]._remove_indent(),l++;this.current_line._remove_wrap_indent()},n.prototype.trim=function(l){for(l=l===void 0?!1:l,this.current_line.trim();l&&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(l,f){for(var d=this.__lines.length-2;d>=0;){var u=this.__lines[d];if(u.is_empty())break;if(u.item(0).indexOf(l)!==0&&u.item(-1)!==f){this.__lines.splice(d+1,0,new c(this)),this.previous_line=this.__lines[this.__lines.length-2];break}d--}},r.exports.Output=n},function(r){function c(i,n,l,f){this.type=i,this.text=n,this.comments_before=null,this.newlines=l||0,this.whitespace_before=f||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}r.exports.Token=c},,,function(r){function c(l,f){this.raw_options=i(l,f),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(l,f){var d=this.raw_options[l],u=f||[];return typeof d=="object"?d!==null&&typeof d.concat=="function"&&(u=d.concat()):typeof d=="string"&&(u=d.split(/[^a-zA-Z0-9_\/\-]+/)),u},c.prototype._get_boolean=function(l,f){var d=this.raw_options[l],u=d===void 0?!!f:!!d;return u},c.prototype._get_characters=function(l,f){var d=this.raw_options[l],u=f||"";return typeof d=="string"&&(u=d.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),u},c.prototype._get_number=function(l,f){var d=this.raw_options[l];f=parseInt(f,10),isNaN(f)&&(f=0);var u=parseInt(d,10);return isNaN(u)&&(u=f),u},c.prototype._get_selection=function(l,f,d){var u=this._get_selection_list(l,f,d);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+l+`' can only be one of the following values:
|
|
|
`+f+`
|
|
|
You passed in: '`+this.raw_options[l]+"'");return u[0]},c.prototype._get_selection_list=function(l,f,d){if(!f||f.length===0)throw new Error("Selection list cannot be empty.");if(d=d||[f[0]],!this._is_valid_selection(d,f))throw new Error("Invalid Default Value!");var u=this._get_array(l,d);if(!this._is_valid_selection(u,f))throw new Error("Invalid Option Value: The option '"+l+`' can contain only the following values:
|
|
|
`+f+`
|
|
|
You passed in: '`+this.raw_options[l]+"'");return u},c.prototype._is_valid_selection=function(l,f){return l.length&&f.length&&!l.some(function(d){return f.indexOf(d)===-1})};function i(l,f){var d={};l=n(l);var u;for(u in l)u!==f&&(d[u]=l[u]);if(f&&l[f])for(u in l[f])d[u]=l[f][u];return d}function n(l){var f={},d;for(d in l){var u=d.replace(/-/g,"_");f[u]=l[d]}return f}r.exports.Options=c,r.exports.normalizeOpts=n,r.exports.mergeOpts=i},,function(r){var c=RegExp.prototype.hasOwnProperty("sticky");function i(n){this.__input=n||"",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 n=null;return this.hasNext()&&(n=this.__input.charAt(this.__position),this.__position+=1),n},i.prototype.peek=function(n){var l=null;return n=n||0,n+=this.__position,n>=0&&n<this.__input_length&&(l=this.__input.charAt(n)),l},i.prototype.__match=function(n,l){n.lastIndex=l;var f=n.exec(this.__input);return f&&!(c&&n.sticky)&&(f.index!==l&&(f=null)),f},i.prototype.test=function(n,l){return l=l||0,l+=this.__position,l>=0&&l<this.__input_length?!!this.__match(n,l):!1},i.prototype.testChar=function(n,l){var f=this.peek(l);return n.lastIndex=0,f!==null&&n.test(f)},i.prototype.match=function(n){var l=this.__match(n,this.__position);return l?this.__position+=l[0].length:l=null,l},i.prototype.read=function(n,l,f){var d="",u;return n&&(u=this.match(n),u&&(d+=u[0])),l&&(u||!n)&&(d+=this.readUntil(l,f)),d},i.prototype.readUntil=function(n,l){var f="",d=this.__position;n.lastIndex=this.__position;var u=n.exec(this.__input);return u?(d=u.index,l&&(d+=u[0].length)):d=this.__input_length,f=this.__input.substring(this.__position,d),this.__position=d,f},i.prototype.readUntilAfter=function(n){return this.readUntil(n,!0)},i.prototype.get_regexp=function(n,l){var f=null,d="g";return l&&c&&(d="y"),typeof n=="string"&&n!==""?f=new RegExp(n,d):n&&(f=new RegExp(n.source,d)),f},i.prototype.get_literal_regexp=function(n){return RegExp(n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},i.prototype.peekUntilAfter=function(n){var l=this.__position,f=this.readUntilAfter(n);return this.__position=l,f},i.prototype.lookBack=function(n){var l=this.__position-1;return l>=n.length&&this.__input.substring(l-n.length,l).toLowerCase()===n},r.exports.InputScanner=i},function(r,c,i){var n=i(8).InputScanner,l=i(3).Token,f=i(10).TokenStream,d=i(11).WhitespacePattern,u={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(s,E){this._input=new n(s),this._options=E||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new d(this._input)};o.prototype.tokenize=function(){this._input.restart(),this.__tokens=new f,this._reset();for(var s,E=new l(u.START,""),v=null,p=[],I=new f;E.type!==u.EOF;){for(s=this._get_next_token(E,v);this._is_comment(s);)I.add(s),s=this._get_next_token(E,v);I.isEmpty()||(s.comments_before=I,I=new f),s.parent=v,this._is_opening(s)?(p.push(v),v=s):v&&this._is_closing(s,v)&&(s.opened=v,v.closed=s,v=p.pop(),s.parent=v),s.previous=E,E.next=s,this.__tokens.add(s),E=s}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(s,E){this._readWhitespace();var v=this._input.read(/.+/g);return v?this._create_token(u.RAW,v):this._create_token(u.EOF,"")},o.prototype._is_comment=function(s){return!1},o.prototype._is_opening=function(s){return!1},o.prototype._is_closing=function(s,E){return!1},o.prototype._create_token=function(s,E){var v=new l(s,E,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return v},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},r.exports.Tokenizer=o,r.exports.TOKEN=u},function(r){function c(i){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=i}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 i=null;return this.hasNext()&&(i=this.__tokens[this.__position],this.__position+=1),i},c.prototype.peek=function(i){var n=null;return i=i||0,i+=this.__position,i>=0&&i<this.__tokens_length&&(n=this.__tokens[i]),n},c.prototype.add=function(i){this.__parent_token&&(i.parent=this.__parent_token),this.__tokens.push(i),this.__tokens_length+=1},r.exports.TokenStream=c},function(r,c,i){var n=i(12).Pattern;function l(f,d){n.call(this,f,d),d?this._line_regexp=this._input.get_regexp(d._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}l.prototype=new n,l.prototype.__set_whitespace_patterns=function(f,d){f+="\\t ",d+="\\n\\r",this._match_pattern=this._input.get_regexp("["+f+d+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+d+"]")},l.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var f=this._input.read(this._match_pattern);if(f===" ")this.whitespace_before_token=" ";else if(f){var d=this.__split(this._newline_regexp,f);this.newline_count=d.length-1,this.whitespace_before_token=d[this.newline_count]}return f},l.prototype.matching=function(f,d){var u=this._create();return u.__set_whitespace_patterns(f,d),u._update(),u},l.prototype._create=function(){return new l(this._input,this)},l.prototype.__split=function(f,d){f.lastIndex=0;for(var u=0,o=[],s=f.exec(d);s;)o.push(d.substring(u,s.index)),u=s.index+s[0].length,s=f.exec(d);return u<d.length?o.push(d.substring(u,d.length)):o.push(""),o},r.exports.WhitespacePattern=l},function(r){function c(i,n){this._input=i,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 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},c.prototype.read_match=function(){return this._input.match(this._match_pattern)},c.prototype.until_after=function(i){var n=this._create();return n._until_after=!0,n._until_pattern=this._input.get_regexp(i),n._update(),n},c.prototype.until=function(i){var n=this._create();return n._until_after=!1,n._until_pattern=this._input.get_regexp(i),n._update(),n},c.prototype.starting_with=function(i){var n=this._create();return n._starting_pattern=this._input.get_regexp(i,!0),n._update(),n},c.prototype.matching=function(i){var n=this._create();return n._match_pattern=this._input.get_regexp(i,!0),n._update(),n},c.prototype._create=function(){return new c(this._input,this)},c.prototype._update=function(){},r.exports.Pattern=c},function(r){function c(i,n){i=typeof i=="string"?i:i.source,n=typeof n=="string"?n:n.source,this.__directives_block_pattern=new RegExp(i+/ beautify( \w+[:]\w+)+ /.source+n,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(i+/\sbeautify\signore:end\s/.source+n,"g")}c.prototype.get_directives=function(i){if(!i.match(this.__directives_block_pattern))return null;var n={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(i);l;)n[l[1]]=l[2],l=this.__directive_pattern.exec(i);return n},c.prototype.readIgnored=function(i){return i.readUntilAfter(this.__directives_end_ignore_pattern)},r.exports.Directives=c},function(r,c,i){var n=i(12).Pattern,l={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function f(d,u){n.call(this,d,u),this.__template_pattern=null,this._disabled=Object.assign({},l),this._excluded=Object.assign({},l),u&&(this.__template_pattern=this._input.get_regexp(u.__template_pattern),this._excluded=Object.assign(this._excluded,u._excluded),this._disabled=Object.assign(this._disabled,u._disabled));var o=new n(d);this.__patterns={handlebars_comment:o.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:o.starting_with(/{{{/).until_after(/}}}/),handlebars:o.starting_with(/{{/).until_after(/}}/),php:o.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:o.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:o.starting_with(/{%/).until_after(/%}/),django_value:o.starting_with(/{{/).until_after(/}}/),django_comment:o.starting_with(/{#/).until_after(/#}/),smarty:o.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:o.starting_with(/{\*/).until_after(/\*}/),smarty_literal:o.starting_with(/{literal}/).until_after(/{\/literal}/)}}f.prototype=new n,f.prototype._create=function(){return new f(this._input,this)},f.prototype._update=function(){this.__set_templated_pattern()},f.prototype.disable=function(d){var u=this._create();return u._disabled[d]=!0,u._update(),u},f.prototype.read_options=function(d){var u=this._create();for(var o in l)u._disabled[o]=d.templating.indexOf(o)===-1;return u._update(),u},f.prototype.exclude=function(d){var u=this._create();return u._excluded[d]=!0,u._update(),u},f.prototype.read=function(){var d="";this._match_pattern?d=this._input.read(this._starting_pattern):d=this._input.read(this._starting_pattern,this.__template_pattern);for(var u=this._read_template();u;)this._match_pattern?u+=this._input.read(this._match_pattern):u+=this._input.readUntil(this.__template_pattern),d+=u,u=this._read_template();return this._until_after&&(d+=this._input.readUntilAfter(this._until_pattern)),d},f.prototype.__set_templated_pattern=function(){var d=[];this._disabled.php||d.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||d.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||d.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(d.push(this.__patterns.django._starting_pattern.source),d.push(this.__patterns.django_value._starting_pattern.source),d.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||d.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&d.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+d.join("|")+")")},f.prototype._read_template=function(){var d="",u=this._input.peek();if(u==="<"){var o=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&o==="?"&&(d=d||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&o==="%"&&(d=d||this.__patterns.erb.read())}else u==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(d=d||this.__patterns.handlebars_comment.read(),d=d||this.__patterns.handlebars_unescaped.read(),d=d||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(d=d||this.__patterns.django_value.read()),this._excluded.django||(d=d||this.__patterns.django_comment.read(),d=d||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(d=d||this.__patterns.smarty_comment.read(),d=d||this.__patterns.smarty_literal.read(),d=d||this.__patterns.smarty.read()));return d},r.exports.TemplatablePattern=f},,,,function(r,c,i){var n=i(19).Beautifier,l=i(20).Options;function f(d,u,o,s){var E=new n(d,u,o,s);return E.beautify()}r.exports=f,r.exports.defaultOptions=function(){return new l}},function(r,c,i){var n=i(20).Options,l=i(2).Output,f=i(21).Tokenizer,d=i(21).TOKEN,u=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,s=function(F,j){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 l(F,j)};s.prototype.current_line_has_match=function(F){return this._output.current_line.has_match(F)},s.prototype.set_space_before_token=function(F,j){this._output.space_before_token=F,this._output.non_breaking_space=j},s.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},s.prototype.add_raw_token=function(F){this._output.add_raw_token(F)},s.prototype.print_preserved_newlines=function(F){var j=0;F.type!==d.TEXT&&F.previous.type!==d.TEXT&&(j=F.newlines?1:0),this.preserve_newlines&&(j=F.newlines<this.max_preserve_newlines+1?F.newlines:this.max_preserve_newlines+1);for(var A=0;A<j;A++)this.print_newline(A>0);return j!==0},s.prototype.traverse_whitespace=function(F){return F.whitespace_before||F.newlines?(this.print_preserved_newlines(F)||(this._output.space_before_token=!0),!0):!1},s.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},s.prototype.print_newline=function(F){this._output.add_new_line(F)},s.prototype.print_token=function(F){F.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(F.text))},s.prototype.indent=function(){this.indent_level++},s.prototype.get_full_indent=function(F){return F=this.indent_level+(F||0),F<1?"":this._output.get_indent_string(F)};var E=function(F){for(var j=null,A=F.next;A.type!==d.EOF&&F.closed!==A;){if(A.type===d.ATTRIBUTE&&A.text==="type"){A.next&&A.next.type===d.EQUALS&&A.next.next&&A.next.next.type===d.VALUE&&(j=A.next.next.text);break}A=A.next}return j},v=function(F,j){var A=null,Y=null;return j.closed?(F==="script"?A="text/javascript":F==="style"&&(A="text/css"),A=E(j)||A,A.search("text/css")>-1?Y="css":A.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?Y="javascript":A.search(/(text|application|dojo)\/(x-)?(html)/)>-1?Y="html":A.search(/test\/null/)>-1&&(Y="null"),Y):null};function p(F,j){return j.indexOf(F)!==-1}function I(F,j,A){this.parent=F||null,this.tag=j?j.tag_name:"",this.indent_level=A||0,this.parser_token=j||null}function R(F){this._printer=F,this._current_frame=null}R.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},R.prototype.record_tag=function(F){var j=new I(this._current_frame,F,this._printer.indent_level);this._current_frame=j},R.prototype._try_pop_frame=function(F){var j=null;return F&&(j=F.parser_token,this._printer.indent_level=F.indent_level,this._current_frame=F.parent),j},R.prototype._get_frame=function(F,j){for(var A=this._current_frame;A&&!(F.indexOf(A.tag)!==-1);){if(j&&j.indexOf(A.tag)!==-1){A=null;break}A=A.parent}return A},R.prototype.try_pop=function(F,j){var A=this._get_frame([F],j);return this._try_pop_frame(A)},R.prototype.indent_to_tag=function(F){var j=this._get_frame(F);j&&(this._printer.indent_level=j.indent_level)};function y(F,j,A,Y){this._source_text=F||"",j=j||{},this._js_beautify=A,this._css_beautify=Y,this._tag_stack=null;var z=new n(j,"html");this._options=z,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"}y.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var F=this._source_text,j=this._options.eol;this._options.eol==="auto"&&(j=`
|
|
|
`,F&&u.test(F)&&(j=F.match(u)[0])),F=F.replace(o,`
|
|
|
`);var A=F.match(/^[\t ]*/)[0],Y={text:"",type:""},z=new x,O=new s(this._options,A),H=new f(F,this._options).tokenize();this._tag_stack=new R(O);for(var U=null,L=H.next();L.type!==d.EOF;)L.type===d.TAG_OPEN||L.type===d.COMMENT?(U=this._handle_tag_open(O,L,z,Y),z=U):L.type===d.ATTRIBUTE||L.type===d.EQUALS||L.type===d.VALUE||L.type===d.TEXT&&!z.tag_complete?U=this._handle_inside_tag(O,L,z,H):L.type===d.TAG_CLOSE?U=this._handle_tag_close(O,L,z):L.type===d.TEXT?U=this._handle_text(O,L,z):O.add_raw_token(L),Y=U,L=H.next();var K=O._output.get_code(j);return K},y.prototype._handle_tag_close=function(F,j,A){var Y={text:j.text,type:j.type};return F.alignment_size=0,A.tag_complete=!0,F.set_space_before_token(j.newlines||j.whitespace_before!=="",!0),A.is_unformatted?F.add_raw_token(j):(A.tag_start_char==="<"&&(F.set_space_before_token(j.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&A.has_wrapped_attrs&&F.print_newline(!1)),F.print_token(j)),A.indent_content&&!(A.is_unformatted||A.is_content_unformatted)&&(F.indent(),A.indent_content=!1),!A.is_inline_element&&!(A.is_unformatted||A.is_content_unformatted)&&F.set_wrap_point(),Y},y.prototype._handle_inside_tag=function(F,j,A,Y){var z=A.has_wrapped_attrs,O={text:j.text,type:j.type};if(F.set_space_before_token(j.newlines||j.whitespace_before!=="",!0),A.is_unformatted)F.add_raw_token(j);else if(A.tag_start_char==="{"&&j.type===d.TEXT)F.print_preserved_newlines(j)?(j.newlines=0,F.add_raw_token(j)):F.print_token(j);else{if(j.type===d.ATTRIBUTE?(F.set_space_before_token(!0),A.attr_count+=1):(j.type===d.EQUALS||j.type===d.VALUE&&j.previous.type===d.EQUALS)&&F.set_space_before_token(!1),j.type===d.ATTRIBUTE&&A.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(F.traverse_whitespace(j),z=z||j.newlines!==0),this._is_wrap_attributes_force)){var H=A.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&A.attr_count===1){var U=!0,L=0,K;do{if(K=Y.peek(L),K.type===d.ATTRIBUTE){U=!1;break}L+=1}while(L<4&&K.type!==d.EOF&&K.type!==d.TAG_CLOSE);H=!U}H&&(F.print_newline(!1),z=!0)}F.print_token(j),z=z||F.previous_token_wrapped(),A.has_wrapped_attrs=z}return O},y.prototype._handle_text=function(F,j,A){var Y={text:j.text,type:"TK_CONTENT"};return A.custom_beautifier_name?this._print_custom_beatifier_text(F,j,A):A.is_unformatted||A.is_content_unformatted?F.add_raw_token(j):(F.traverse_whitespace(j),F.print_token(j)),Y},y.prototype._print_custom_beatifier_text=function(F,j,A){var Y=this;if(j.text!==""){var z=j.text,O,H=1,U="",L="";A.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?O=this._js_beautify:A.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?O=this._css_beautify:A.custom_beautifier_name==="html"&&(O=function(_e,fe){var Re=new y(_e,fe,Y._js_beautify,Y._css_beautify);return Re.beautify()}),this._options.indent_scripts==="keep"?H=0:this._options.indent_scripts==="separate"&&(H=-F.indent_level);var K=F.get_full_indent(H);if(z=z.replace(/\n[ \t]*$/,""),A.custom_beautifier_name!=="html"&&z[0]==="<"&&z.match(/^(<!--|<!\[CDATA\[)/)){var ee=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(z);if(!ee){F.add_raw_token(j);return}U=K+ee[1]+`
|
|
|
`,z=ee[4],ee[5]&&(L=K+ee[5]),z=z.replace(/\n[ \t]*$/,""),(ee[2]||ee[3].indexOf(`
|
|
|
`)!==-1)&&(ee=ee[3].match(/[ \t]+$/),ee&&(j.whitespace_before=ee[0]))}if(z)if(O){var oe=function(){this.eol=`
|
|
|
`};oe.prototype=this._options.raw_options;var ae=new oe;z=O(K+z,ae)}else{var be=j.whitespace_before;be&&(z=z.replace(new RegExp(`
|
|
|
(`+be+")?","g"),`
|
|
|
`)),z=K+z.replace(/\n/g,`
|
|
|
`+K)}U&&(z?z=U+z+`
|
|
|
`+L:z=U+L),F.print_newline(!1),z&&(j.text=z,j.whitespace_before="",j.newlines=0,F.add_raw_token(j),F.print_newline(!0))}},y.prototype._handle_tag_open=function(F,j,A,Y){var z=this._get_tag_open_token(j);return(A.is_unformatted||A.is_content_unformatted)&&!A.is_empty_element&&j.type===d.TAG_OPEN&&j.text.indexOf("</")===0?(F.add_raw_token(j),z.start_tag_token=this._tag_stack.try_pop(z.tag_name)):(F.traverse_whitespace(j),this._set_tag_position(F,j,z,A,Y),z.is_inline_element||F.set_wrap_point(),F.print_token(j)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(z.alignment_size=j.text.length+1),!z.tag_complete&&!z.is_unformatted&&(F.alignment_size=z.alignment_size),z};var x=function(F,j){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="",!j)this.tag_complete=!0;else{var A;this.tag_start_char=j.text[0],this.text=j.text,this.tag_start_char==="<"?(A=j.text.match(/^<([^\s>]*)/),this.tag_check=A?A[1]:""):(A=j.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=A?A[1]:"",(j.text.startsWith("{{#>")||j.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&j.next!==null?this.tag_check=j.next.text.split(" ")[0]:this.tag_check=j.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),j.type===d.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||j.closed&&j.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)))}};y.prototype._get_tag_open_token=function(F){var j=new x(this._tag_stack.get_parser_token(),F);return j.alignment_size=this._options.wrap_attributes_indent_size,j.is_end_tag=j.is_end_tag||p(j.tag_check,this._options.void_elements),j.is_empty_element=j.tag_complete||j.is_start_tag&&j.is_end_tag,j.is_unformatted=!j.tag_complete&&p(j.tag_check,this._options.unformatted),j.is_content_unformatted=!j.is_empty_element&&p(j.tag_check,this._options.content_unformatted),j.is_inline_element=p(j.tag_name,this._options.inline)||j.tag_name.includes("-")||j.tag_start_char==="{",j},y.prototype._set_tag_position=function(F,j,A,Y,z){if(A.is_empty_element||(A.is_end_tag?A.start_tag_token=this._tag_stack.try_pop(A.tag_name):(this._do_optional_end_element(A)&&(A.is_inline_element||F.print_newline(!1)),this._tag_stack.record_tag(A),(A.tag_name==="script"||A.tag_name==="style")&&!(A.is_unformatted||A.is_content_unformatted)&&(A.custom_beautifier_name=v(A.tag_check,j)))),p(A.tag_check,this._options.extra_liners)&&(F.print_newline(!1),F._output.just_added_blankline()||F.print_newline(!0)),A.is_empty_element){if(A.tag_start_char==="{"&&A.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),A.indent_content=!0;var O=F.current_line_has_match(/{{#if/);O||F.print_newline(!1)}A.tag_name==="!--"&&z.type===d.TAG_CLOSE&&Y.is_end_tag&&A.text.indexOf(`
|
|
|
`)===-1||(A.is_inline_element||A.is_unformatted||F.print_newline(!1),this._calcluate_parent_multiline(F,A))}else if(A.is_end_tag){var H=!1;H=A.start_tag_token&&A.start_tag_token.multiline_content,H=H||!A.is_inline_element&&!(Y.is_inline_element||Y.is_unformatted)&&!(z.type===d.TAG_CLOSE&&A.start_tag_token===Y)&&z.type!=="TK_CONTENT",(A.is_content_unformatted||A.is_unformatted)&&(H=!1),H&&F.print_newline(!1)}else A.indent_content=!A.custom_beautifier_name,A.tag_start_char==="<"&&(A.tag_name==="html"?A.indent_content=this._options.indent_inner_html:A.tag_name==="head"?A.indent_content=this._options.indent_head_inner_html:A.tag_name==="body"&&(A.indent_content=this._options.indent_body_inner_html)),!(A.is_inline_element||A.is_unformatted)&&(z.type!=="TK_CONTENT"||A.is_content_unformatted)&&F.print_newline(!1),this._calcluate_parent_multiline(F,A)},y.prototype._calcluate_parent_multiline=function(F,j){j.parent&&F._output.just_added_newline()&&!((j.is_inline_element||j.is_unformatted)&&j.parent.is_inline_element)&&(j.parent.multiline_content=!0)};var C=["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"],S=["a","audio","del","ins","map","noscript","video"];y.prototype._do_optional_end_element=function(F){var j=null;if(F.is_empty_element||!F.is_start_tag||!F.parent)return;if(F.tag_name==="body")j=j||this._tag_stack.try_pop("head");else if(F.tag_name==="li")j=j||this._tag_stack.try_pop("li",["ol","ul"]);else if(F.tag_name==="dd"||F.tag_name==="dt")j=j||this._tag_stack.try_pop("dt",["dl"]),j=j||this._tag_stack.try_pop("dd",["dl"]);else if(F.parent.tag_name==="p"&&C.indexOf(F.tag_name)!==-1){var A=F.parent.parent;(!A||S.indexOf(A.tag_name)===-1)&&(j=j||this._tag_stack.try_pop("p"))}else F.tag_name==="rp"||F.tag_name==="rt"?(j=j||this._tag_stack.try_pop("rt",["ruby","rtc"]),j=j||this._tag_stack.try_pop("rp",["ruby","rtc"])):F.tag_name==="optgroup"?j=j||this._tag_stack.try_pop("optgroup",["select"]):F.tag_name==="option"?j=j||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):F.tag_name==="colgroup"?j=j||this._tag_stack.try_pop("caption",["table"]):F.tag_name==="thead"?(j=j||this._tag_stack.try_pop("caption",["table"]),j=j||this._tag_stack.try_pop("colgroup",["table"])):F.tag_name==="tbody"||F.tag_name==="tfoot"?(j=j||this._tag_stack.try_pop("caption",["table"]),j=j||this._tag_stack.try_pop("colgroup",["table"]),j=j||this._tag_stack.try_pop("thead",["table"]),j=j||this._tag_stack.try_pop("tbody",["table"])):F.tag_name==="tr"?(j=j||this._tag_stack.try_pop("caption",["table"]),j=j||this._tag_stack.try_pop("colgroup",["table"]),j=j||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(F.tag_name==="th"||F.tag_name==="td")&&(j=j||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),j=j||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return F.parent=this._tag_stack.get_parser_token(),j},r.exports.Beautifier=y},function(r,c,i){var n=i(6).Options;function l(f){n.call(this,f,"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"])}l.prototype=new n,r.exports.Options=l},function(r,c,i){var n=i(9).Tokenizer,l=i(9).TOKEN,f=i(13).Directives,d=i(14).TemplatablePattern,u=i(12).Pattern,o={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:l.START,RAW:l.RAW,EOF:l.EOF},s=new f(/<\!--/,/-->/),E=function(v,p){n.call(this,v,p),this._current_tag_name="";var I=new d(this._input).read_options(this._options),R=new u(this._input);if(this.__patterns={word:I.until(/[\n\r\t <]/),single_quote:I.until_after(/'/),double_quote:I.until_after(/"/),attribute:I.until(/[\n\r\t =>]|\/>/),element_name:I.until(/[\n\r\t >\/]/),handlebars_comment:R.starting_with(/{{!--/).until_after(/--}}/),handlebars:R.starting_with(/{{/).until_after(/}}/),handlebars_open:R.until(/[\n\r\t }]/),handlebars_raw_close:R.until(/}}/),comment:R.starting_with(/<!--/).until_after(/-->/),cdata:R.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:R.starting_with(/<!\[/).until_after(/]>/),processing:R.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 y=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=R.matching(y).until_after(y)}};E.prototype=new n,E.prototype._is_comment=function(v){return!1},E.prototype._is_opening=function(v){return v.type===o.TAG_OPEN},E.prototype._is_closing=function(v,p){return v.type===o.TAG_CLOSE&&p&&((v.text===">"||v.text==="/>")&&p.text[0]==="<"||v.text==="}}"&&p.text[0]==="{"&&p.text[1]==="{")},E.prototype._reset=function(){this._current_tag_name=""},E.prototype._get_next_token=function(v,p){var I=null;this._readWhitespace();var R=this._input.peek();return R===null?this._create_token(o.EOF,""):(I=I||this._read_open_handlebars(R,p),I=I||this._read_attribute(R,v,p),I=I||this._read_close(R,p),I=I||this._read_raw_content(R,v,p),I=I||this._read_content_word(R),I=I||this._read_comment_or_cdata(R),I=I||this._read_processing(R),I=I||this._read_open(R,p),I=I||this._create_token(o.UNKNOWN,this._input.next()),I)},E.prototype._read_comment_or_cdata=function(v){var p=null,I=null,R=null;if(v==="<"){var y=this._input.peek(1);y==="!"&&(I=this.__patterns.comment.read(),I?(R=s.get_directives(I),R&&R.ignore==="start"&&(I+=s.readIgnored(this._input))):I=this.__patterns.cdata.read()),I&&(p=this._create_token(o.COMMENT,I),p.directives=R)}return p},E.prototype._read_processing=function(v){var p=null,I=null,R=null;if(v==="<"){var y=this._input.peek(1);(y==="!"||y==="?")&&(I=this.__patterns.conditional_comment.read(),I=I||this.__patterns.processing.read()),I&&(p=this._create_token(o.COMMENT,I),p.directives=R)}return p},E.prototype._read_open=function(v,p){var I=null,R=null;return p||v==="<"&&(I=this._input.next(),this._input.peek()==="/"&&(I+=this._input.next()),I+=this.__patterns.element_name.read(),R=this._create_token(o.TAG_OPEN,I)),R},E.prototype._read_open_handlebars=function(v,p){var I=null,R=null;return p||this._options.indent_handlebars&&v==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(I=this.__patterns.handlebars_comment.read(),I=I||this.__patterns.handlebars.read(),R=this._create_token(o.COMMENT,I)):(I=this.__patterns.handlebars_open.read(),R=this._create_token(o.TAG_OPEN,I))),R},E.prototype._read_close=function(v,p){var I=null,R=null;return p&&(p.text[0]==="<"&&(v===">"||v==="/"&&this._input.peek(1)===">")?(I=this._input.next(),v==="/"&&(I+=this._input.next()),R=this._create_token(o.TAG_CLOSE,I)):p.text[0]==="{"&&v==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),R=this._create_token(o.TAG_CLOSE,"}}"))),R},E.prototype._read_attribute=function(v,p,I){var R=null,y="";if(I&&I.text[0]==="<")if(v==="=")R=this._create_token(o.EQUALS,this._input.next());else if(v==='"'||v==="'"){var x=this._input.next();v==='"'?x+=this.__patterns.double_quote.read():x+=this.__patterns.single_quote.read(),R=this._create_token(o.VALUE,x)}else y=this.__patterns.attribute.read(),y&&(p.type===o.EQUALS?R=this._create_token(o.VALUE,y):R=this._create_token(o.ATTRIBUTE,y));return R},E.prototype._is_content_unformatted=function(v){return this._options.void_elements.indexOf(v)===-1&&(this._options.content_unformatted.indexOf(v)!==-1||this._options.unformatted.indexOf(v)!==-1)},E.prototype._read_raw_content=function(v,p,I){var R="";if(I&&I.text[0]==="{")R=this.__patterns.handlebars_raw_close.read();else if(p.type===o.TAG_CLOSE&&p.opened.text[0]==="<"&&p.text[0]!=="/"){var y=p.opened.text.substr(1).toLowerCase();if(y==="script"||y==="style"){var x=this._read_comment_or_cdata(v);if(x)return x.type=o.TEXT,x;R=this._input.readUntil(new RegExp("</"+y+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(y)&&(R=this._input.readUntil(new RegExp("</"+y+"[\\n\\r\\t ]*?>","ig")))}return R?this._create_token(o.TEXT,R):null},E.prototype._read_content_word=function(v){var p="";if(this._options.unformatted_content_delimiter&&(v===this._options.unformatted_content_delimiter[0]&&(p=this.__patterns.unformatted_content_delimiter.read())),p||(p=this.__patterns.word.read()),p)return this._create_token(o.TEXT,p)},r.exports.Tokenizer=E,r.exports.TOKEN=o}],_={};function t(r){var c=_[r];if(c!==void 0)return c.exports;var i=_[r]={exports:{}};return T[r](i,i.exports,t),i.exports}var h=t(18);w=h})();var k=w;if(!0)!(N=[D,D("6UM0"),D("TXwP")],g=function(T){var _=D("6UM0"),t=D("TXwP");return{html_beautify:function(h,r){return k(h,r,_.js_beautify,t.css_beautify)}}}.apply(Q,N),g!==void 0&&(B.exports=g));else var b,m})()},qBft:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("OLod"))})(this,function(N){return N.pad.AnsiX923={pad:function(g,w){var k=g.sigBytes,b=w*4,m=b-k%b,T=k+m-1;g.clamp(),g.words[T>>>2]|=m<<24-T%4*8,g.sigBytes+=m},unpad:function(g){var w=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=w}},N.pad.Ansix923})},qM6L:function(B,Q,D){(function(N,g){B.exports=Q=g(D("Ib8C"))})(this,function(N){return function(){var g=N,w=g.lib,k=w.WordArray,b=g.enc,m=b.Utf16=b.Utf16BE={stringify:function(_){for(var t=_.words,h=_.sigBytes,r=[],c=0;c<h;c+=2){var i=t[c>>>2]>>>16-c%4*8&65535;r.push(String.fromCharCode(i))}return r.join("")},parse:function(_){for(var t=_.length,h=[],r=0;r<t;r++)h[r>>>1]|=_.charCodeAt(r)<<16-r%2*16;return k.create(h,t*2)}};b.Utf16LE={stringify:function(_){for(var t=_.words,h=_.sigBytes,r=[],c=0;c<h;c+=2){var i=T(t[c>>>2]>>>16-c%4*8&65535);r.push(String.fromCharCode(i))}return r.join("")},parse:function(_){for(var t=_.length,h=[],r=0;r<t;r++)h[r>>>1]|=T(_.charCodeAt(r)<<16-r%2*16);return k.create(h,t*2)}};function T(_){return _<<8&4278255360|_>>>8&16711935}}(),N.enc.Utf16})},qu8F:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("OLod"))})(this,function(N){/** @preserve
|
|
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
|
* derived from CryptoJS.mode.CTR
|
|
|
* Jan Hruby jhruby.web@gmail.com
|
|
|
*/return N.mode.CTRGladman=function(){var g=N.lib.BlockCipherMode.extend();function w(m){if((m>>24&255)===255){var T=m>>16&255,_=m>>8&255,t=m&255;T===255?(T=0,_===255?(_=0,t===255?t=0:++t):++_):++T,m=0,m+=T<<16,m+=_<<8,m+=t}else m+=1<<24;return m}function k(m){return(m[0]=w(m[0]))===0&&(m[1]=w(m[1])),m}var b=g.Encryptor=g.extend({processBlock:function(m,T){var _=this._cipher,t=_.blockSize,h=this._iv,r=this._counter;h&&(r=this._counter=h.slice(0),this._iv=void 0),k(r);var c=r.slice(0);_.encryptBlock(c,0);for(var i=0;i<t;i++)m[T+i]^=c[i]}});return g.Decryptor=b,g}(),N.mode.CTRGladman})},"rAM+":function(B,Q,D){"use strict";D.d(Q,"a",function(){return g});var N=D("Qw5x");function g(w,k){var b;if(typeof Symbol=="undefined"||w[Symbol.iterator]==null){if(Array.isArray(w)||(b=Object(N.a)(w))||k&&w&&typeof w.length=="number"){b&&(w=b);var m=0,T=function(){};return{s:T,n:function(){return m>=w.length?{done:!0}:{done:!1,value:w[m++]}},e:function(c){throw c},f:T}}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,h;return{s:function(){b=w[Symbol.iterator]()},n:function(){var c=b.next();return _=c.done,c},e:function(c){t=!0,h=c},f:function(){try{!_&&b.return!=null&&b.return()}finally{if(t)throw h}}}}},rUJ1:function(B,Q){const D=/[&<>"']/,N=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,w=/[<>"']|&(?!#?\w+;)/g,k={"&":"&","<":"<",">":">",'"':""","'":"'"},b=R=>k[R];function m(R,y){if(y){if(D.test(R))return R.replace(N,b)}else if(g.test(R))return R.replace(w,b);return R}const T=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function _(R){return R.replace(T,(y,x)=>(x=x.toLowerCase(),x==="colon"?":":x.charAt(0)==="#"?x.charAt(1)==="x"?String.fromCharCode(parseInt(x.substring(2),16)):String.fromCharCode(+x.substring(1)):""))}const t=/(^|[^\[])\^/g;function h(R,y){R=R.source||R,y=y||"";const x={replace:(C,S)=>(S=S.source||S,S=S.replace(t,"$1"),R=R.replace(C,S),x),getRegex:()=>new RegExp(R,y)};return x}const r=/[^\w:]/g,c=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function i(R,y,x){if(R){let C;try{C=decodeURIComponent(_(x)).replace(r,"").toLowerCase()}catch(S){return null}if(C.indexOf("javascript:")===0||C.indexOf("vbscript:")===0||C.indexOf("data:")===0)return null}y&&!c.test(x)&&(x=u(y,x));try{x=encodeURI(x).replace(/%25/g,"%")}catch(C){return null}return x}const n={},l=/^[^:]+:\/*[^/]*$/,f=/^([^:]+:)[\s\S]*$/,d=/^([^:]+:\/*[^/]*)[\s\S]*$/;function u(R,y){n[" "+R]||(l.test(R)?n[" "+R]=R+"/":n[" "+R]=v(R,"/",!0)),R=n[" "+R];const x=R.indexOf(":")===-1;return y.substring(0,2)==="//"?x?y:R.replace(f,"$1")+y:y.charAt(0)==="/"?x?y:R.replace(d,"$1")+y:R+y}const o={exec:function(){}};function s(R){let y=1,x,C;for(;y<arguments.length;y++){x=arguments[y];for(C in x)Object.prototype.hasOwnProperty.call(x,C)&&(R[C]=x[C])}return R}function E(R,y){const x=R.replace(/\|/g,(F,j,A)=>{let Y=!1,z=j;for(;--z>=0&&A[z]==="\\";)Y=!Y;return Y?"|":" |"}),C=x.split(/ \|/);let S=0;if(C.length>y)C.splice(y);else for(;C.length<y;)C.push("");for(;S<C.length;S++)C[S]=C[S].trim().replace(/\\\|/g,"|");return C}function v(R,y,x){const C=R.length;if(C===0)return"";let S=0;for(;S<C;){const F=R.charAt(C-S-1);if(F===y&&!x)S++;else if(F!==y&&x)S++;else break}return R.substr(0,C-S)}function p(R,y){if(R.indexOf(y[1])===-1)return-1;const x=R.length;let C=0,S=0;for(;S<x;S++)if(R[S]==="\\")S++;else if(R[S]===y[0])C++;else if(R[S]===y[1]&&(C--,C<0))return S;return-1}function I(R){R&&R.sanitize&&!R.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")}B.exports={escape:m,unescape:_,edit:h,cleanUrl:i,resolveUrl:u,noopTest:o,merge:s,splitCells:E,rtrim:v,findClosingBracket:p,checkSanitizeDeprecation:I}},rWjI:function(B,Q,D){"use strict";D.r(Q),D.d(Q,"Types",function(){return Tt});var N=D("P2fV"),g=D("NJEC"),w=D("CiB2"),k=D("DYRE"),b=D("zeV3"),m=D("sRBo"),T=D("kaz8"),_=D("7Kak"),t=D("9yH6"),h=D("giR+"),r=D("fyUT"),c=D("OaEy"),i=D("2fM7"),n=D("oBTY"),l=D("rAM+"),f=D("T2oS"),d=D("W9HT"),u=D("g9YV"),o=D("wCAj"),s=D("+L6B"),E=D("2/Rp"),v=D("14J3"),p=D("BMrR"),I=D("jCWc"),R=D("kPKH"),y=D("miYZ"),x=D("tsqr"),C=D("9og8"),S=D("y8nQ"),F=D("Vl3Y"),j=D("tJVT"),A=D("k1fw"),Y=D("fu2T"),z=D("gK9i"),O=D("2qtc"),H=D("kLXV"),U=D("5NDa"),L=D("5rEg"),K=D("WmNS"),ee=D.n(K),oe=D("q1tI"),ae=D.n(oe),be=D("eRFJ"),_e=D.n(be),fe=D("jrin"),Re,Ce=i.a.Option,ce;(function(pt){pt[pt.language=0]="language",pt[pt.difficulty=1]="difficulty",pt[pt.category=2]="category",pt[pt.openOrNot=3]="openOrNot"})(ce||(ce={}));var te=(Re={},Object(fe.a)(Re,ce.language,[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"},{title:"JavaScript",key:"JavaScript"},{title:"Ruby",key:"Ruby"}]),Object(fe.a)(Re,ce.difficulty,[{title:"\u7B80\u5355",key:1},{title:"\u9002\u4E2D",key:2},{title:"\u56F0\u96BE",key:3}]),Object(fe.a)(Re,ce.category,[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}]),Object(fe.a)(Re,ce.openOrNot,[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]),Re);function W(pt){return te[pt].map(function(St){return ae.a.createElement(Ce,{key:St.title,value:St.key}," ",St.title," ")})}function X(pt,St){pt.map(function(dt){var Ht=dt.id,Gt=dt.name,vt=dt.sub_disciplines,xt={value:Ht,label:Gt};St.push(xt),vt&&vt.length>0&&(xt.children=[],X(vt,xt.children))})}function V(pt,St){for(var dt=[],Ht=0;Ht<pt.length;Ht++){var Gt,vt=pt[Ht];if(((Gt=vt.sub_disciplines)===null||Gt===void 0?void 0:Gt.length)>0){dt[0]=vt.id;for(var xt=0;xt<vt.sub_disciplines.length;xt++){var Kt=vt.sub_disciplines[xt];if(Kt.id===St)return dt[1]=Kt.id,[dt,Kt.tag_disciplines||Kt.sub_disciplines||[]]}}}return[dt,[]]}var Z=D("Ty5D"),q=D("9kvl"),ie=D("J66h"),ne=D("GIiI"),J=D("2BaD"),$=D("Ot1p"),le=D("ErOA");function he(pt){return Object(le.f)("practices.json",pt)}function Se(){return Object(le.c)("problems/new.json")}function Ue(pt){return Object(le.c)("practices/".concat(pt,"/edit.json"))}function Xe(pt,St){return Object(le.g)("practices/".concat(pt),St)}function $e(pt,St){return Object(le.f)("exercises/".concat(pt,"/exercise_questions.json"),St)}function Ye(pt,St){return Object(le.g)("exercise_questions/".concat(pt,".json"),St)}var et=D("cDPC"),qe=D("bbsP"),Pe=D("/wGt"),Ie=D("0Owb"),Ze=D("ZW9T"),nt=D("ZD9Y"),ye=D("M8RZ"),ue=D("bCnd"),pe=D("1T2W"),me=D.n(pe),Oe={theme:Object(ue.a)("cmCodeMode","vs-dark"),fontSize:Object(ue.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(ue.a)("cmTabToSpace",!0)},ve;(function(pt){pt[pt.set_font_size=0]="set_font_size",pt[pt.set_theme=1]="set_theme",pt[pt.on_tab_to_space=2]="on_tab_to_space",pt[pt.set_show_editor_setting=3]="set_show_editor_setting"})(ve||(ve={}));function xe(pt,St){switch(St.type){case ve.set_show_editor_setting:return Object(A.a)(Object(A.a)({},pt),{},{showEditorSetting:St.payload});case ve.set_theme:return Object(A.a)(Object(A.a)({},pt),{},{theme:St.payload});case ve.set_font_size:return Object(A.a)(Object(A.a)({},pt),{},{fontSize:St.payload});case ve.on_tab_to_space:return Object(A.a)(Object(A.a)({},pt),{},{tabToSpace:St.payload});default:throw new Error}}var Ae=function(pt){var St=pt.value,dt=pt.onChange,Ht=pt.language,Gt=pt.onLanguage,vt=pt.languageItems,xt=pt.ActionBarRender,Kt=xt===void 0?function(jr){return ae.a.createElement(Le,{languageItems:vt,onLanguage:Gt,language:Ht,onShowCodeSetting:jr})}:xt,Ar=Object(oe.useReducer)(xe,Oe),qt=Object(j.a)(Ar,2),ut=qt[0],Lt=qt[1],Hr=ut.theme,Yr=ut.fontSize,On=ut.showEditorSetting,cn=ut.tabToSpace;console.log(St,Ht,"value");var zr={onFontSizeChange:function(xr){Lt({type:ve.set_font_size,payload:xr}),Object(ue.b)("cmFontSize",xr)},tabToSpace:cn,cmFontSize:Yr,className:"oj",cmCodeMode:Hr,onTabToSpace:function(xr){Lt({type:ve.on_tab_to_space,payload:xr}),Object(ue.b)("cmTabToSpace",xr)},onCodeModeChange:function(xr){Lt({type:ve.set_theme,payload:xr}),Object(ue.b)("cmCodeMode",xr)}};function Pt(){Lt({type:ve.set_show_editor_setting,payload:!1})}function dn(){Lt({type:ve.set_show_editor_setting,payload:!0})}var ct={value:St,language:Ht,onChange:dt,theme:Hr,height:"calc(100% - 56px)",options:{fontSize:Yr,insertSpaces:cn}};return ae.a.createElement(oe.Fragment,null,ae.a.createElement("div",{className:me.a["code-panel-container"]},Kt(dn),ae.a.createElement(Ze.b,Object(Ie.a)({key:Ht},ct))),ae.a.createElement(ye.a,null,ae.a.createElement(Pe.a,{className:"oj",title:null,placement:"right",closable:!1,visible:On,onClose:Pt},ae.a.createElement(nt.a,zr))))};function Le(pt){var St=pt.languageItems,dt=pt.language,Ht=pt.onShowCodeSetting,Gt=pt.onLanguage;return ae.a.createElement("div",{className:me.a["action-oj-bar"]},St==null?void 0:St.map(function(vt){return ae.a.createElement("div",{className:dt===(vt==null?void 0:vt.language)?me.a.active:"",onClick:function(){return Gt(vt==null?void 0:vt.language)},key:vt==null?void 0:vt.language},vt==null?void 0:vt.language)}),ae.a.createElement("a",{onClick:Ht},ae.a.createElement("i",{className:"iconfont icon-shezhi"})))}var Me=D("Znn+"),We=D("ZTPi"),rt=D("L9qf"),at=D.n(rt),it=function(St){var dt=St.visible,Ht=St.onOK,Gt=St.onCancel,vt=Object(oe.useState)(!1),xt=Object(j.a)(vt,2),Kt=xt[0],Ar=xt[1],qt=Object(oe.useState)(!1),ut=Object(j.a)(qt,2),Lt=ut[0],Hr=ut[1],Yr=Object(oe.useState)("1"),On=Object(j.a)(Yr,2),cn=On[0],zr=On[1],Pt=Object(oe.useState)(""),dn=Object(j.a)(Pt,2),ct=dn[0],jr=dn[1],xr=Object(oe.useState)([]),Gn=Object(j.a)(xr,2),An=Gn[0],hn=Gn[1],Ei=function(){var Vr=Object(C.a)(ee.a.mark(function dr(){var nn;return ee.a.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:if(ct){jt.next=3;break}return x.b.warn("\u9898\u76EE".concat(fn,"\u4E0D\u80FD\u4E3A\u7A7A")),jt.abrupt("return");case 3:return Hr(!0),jt.next=6,Object(le.a)("/api/tag_disciplines.json",{method:"post",body:{target:dt,name:ct}});case 6:if(nn=jt.sent,!((nn==null?void 0:nn.status)===0)){jt.next=10;break}return Ht(),jt.abrupt("return");case 10:Hr(!1);case 11:case"end":return jt.stop()}},dr)}));return function(){return Vr.apply(this,arguments)}}(),Kn=function(){var Vr=Object(C.a)(ee.a.mark(function dr(){var nn,_n,jt=arguments;return ee.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:return nn=jt.length>0&&jt[0]!==void 0?jt[0]:"",Ar(!0),ur.next=4,Object(le.a)("/api/tag_disciplines.json",{method:"get",params:{target:dt,search:nn}});case 4:_n=ur.sent,hn(_n.tag_disciplines||[]),Ar(!1);case 7:case"end":return ur.stop()}},dr)}));return function(){return Vr.apply(this,arguments)}}(),bn=function(dr){var nn=dr.name;H.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:ae.a.createElement("div",null,ae.a.createElement(L.a,{defaultValue:nn,placeholder:"\u8BF7\u8F93\u5165".concat(fn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20,onChange:function(jt){nn=jt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var _n=Object(C.a)(ee.a.mark(function lr(){var ur;return ee.a.wrap(function(br){for(;;)switch(br.prev=br.next){case 0:if(nn){br.next=3;break}return x.b.warn("\u9898\u76EE".concat(fn,"\u4E0D\u80FD\u4E3A\u7A7A")),br.abrupt("return",Promise.reject());case 3:return br.next=5,Object(le.a)("/api/tag_disciplines/".concat(dr.id,"/rename.json"),{method:"post",body:{id:dr.id,name:nn}});case 5:ur=br.sent,(ur==null?void 0:ur.status)===0&&Kn();case 7:case"end":return br.stop()}},lr)}));function jt(){return _n.apply(this,arguments)}return jt}()})},Fr=function(dr){H.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:dt==="practice"?ae.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",ae.a.createElement("span",{className:"c-light-primary"},dr.name),"\u201D\u5220\u9664\u5417\uFF1F",ae.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):ae.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",ae.a.createElement("span",{className:"c-light-primary"},dr.name),"\u201D\u5220\u9664\u5417\uFF1F",ae.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u77E5\u8BC6\u70B9\u8FDB\u884C\u6E05\u9664\u3002"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var nn=Object(C.a)(ee.a.mark(function jt(){var lr;return ee.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:return Rr.next=2,Object(le.a)("/api/tag_disciplines/".concat(dr.id,".json"),{method:"delete",body:{id:dr.id}});case 2:lr=Rr.sent,(lr==null?void 0:lr.status)===0&&Kn();case 4:case"end":return Rr.stop()}},jt)}));function _n(){return nn.apply(this,arguments)}return _n}()})},di=function(dr){Kn(dr)},fn=dt==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return ae.a.createElement(H.a,{afterClose:function(){Hr(!1),Ar(!1),jr(""),zr("1"),hn([])},centered:!0,keyboard:!1,width:600,title:"".concat(fn,"\u7BA1\u7406"),visible:!!dt,className:at.a.customModal,footer:null,onCancel:Gt},ae.a.createElement("section",{className:at.a.wrap},ae.a.createElement(We.a,{activeKey:cn,onChange:function(dr){jr(""),zr(dr),Kn()}},ae.a.createElement(We.a.TabPane,{tab:"\u65B0\u589E".concat(fn),key:"1"},ae.a.createElement(L.a,{value:ct,onChange:function(dr){return jr(dr.target.value)},className:at.a.in,placeholder:"\u8F93\u5165".concat(fn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20}),ae.a.createElement("div",{className:at.a.btns},ae.a.createElement(E.a,{onClick:Gt,className:"mr20"},"\u53D6\u6D88"," "),ae.a.createElement(E.a,{loading:Lt,onClick:Ei,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),ae.a.createElement(We.a.TabPane,{tab:"\u5DF2\u6709".concat(fn),key:"2"},ae.a.createElement(L.a.Search,{allowClear:!0,onSearch:di,value:ct,onChange:function(dr){return jr(dr.target.value)},className:at.a.in,placeholder:"\u8F93\u5165".concat(fn,"\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2")}),ae.a.createElement(o.a,{dataSource:An,bordered:!1,loading:Kt,scroll:An.length>7?{y:300}:{},style:{padding:"0 40px 20px 40px"},columns:[{title:"".concat(fn,"\u540D\u79F0"),dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:function(dr,nn){return ae.a.createElement("span",null,ae.a.createElement("span",{onClick:function(){return bn(nn)},className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),ae.a.createElement("span",{onClick:function(){return Fr(nn)},className:"current c-grey-666"},"\u5220\u9664"))}}],pagination:!1})))))},st=it,Ct=D("m3rI"),yt=D("B7Ph"),ht=D("wd/R"),Ut=D.n(ht),kt=D("1vsH"),Yt=D("9Bee"),Zt=D("xKgJ"),Mt=L.a.TextArea,wt=H.a.confirm,$t=z.a.Panel,Dt={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0},Tt;(function(pt){pt[pt.SET_INITAL_DATA=0]="SET_INITAL_DATA",pt[pt.SET_LOADING=1]="SET_LOADING",pt[pt.SET_STATUS=2]="SET_STATUS"})(Tt||(Tt={}));var _t="#### \u9898\u76EE\u63CF\u8FF0\n\u73B0\u6709\u4E00\u4E2A\u6574\u578B\u6570\u7EC4 `nums`\uFF0C\u8BF7\u7F16\u5199\u7A0B\u5E8F\u5C06\u6570\u7EC4 `nums` \u4E2D\u7684\u6240\u6709 `$$0$$` \u79FB\u52A8\u5230\u6570\u7EC4\u7684\u672B\u5C3E\uFF0C\u4F46\u4E0D\u6539\u53D8\u975E\u96F6\u5143\u7D20\u5728\u6570\u7EC4\u4E2D\u7684\u76F8\u5BF9\u4F4D\u7F6E\u3002\u8BF7\u5728\u539F\u6570\u7EC4 `nums` \u4E0A\u8FDB\u884C\u64CD\u4F5C\u3002\n#### \u8F93\u5165\u8F93\u51FA\u683C\u5F0F\n**\u8F93\u5165\u683C\u5F0F**\n\u7B2C\u4E00\u884C\u6709\u4E00\u4E2A\u6574\u6570 `numsSize`\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u5927\u5C0F\uFF1B\n\u7B2C\u4E8C\u884C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n**\u8F93\u51FA\u683C\u5F0F**\n\u4E00\u884C\u8F93\u51FA\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B1\n**\u8F93\u5165**\n`4`\n`0 1 2 3`\n**\u8F93\u51FA**\n`1 2 3 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B2\n**\u8F93\u5165**\n`5`\n`1 1 0 1 0`\n**\u8F93\u51FA**\n`1 1 1 0 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8BF4\u660E\u63D0\u793A\n-`1\u2264n\u2264100`";function Et(pt,St){switch(St.type){case Tt.SET_INITAL_DATA:return Object(A.a)(Object(A.a)({},pt),St.payload);case Tt.SET_LOADING:return Object(A.a)(Object(A.a)({},pt),{},{loading:St.payload});case Tt.SET_STATUS:return Object(A.a)(Object(A.a)({},pt),{},{status:St.payload});default:throw new Error}}var Bt=Q.default=function(){var pt,St,dt,Ht=Object(Z.h)(),Gt=Object(Z.g)(),vt=Object(Z.i)(),xt=vt.id,Kt=F.a.useForm(),Ar=Object(j.a)(Kt,1),qt=Ar[0],ut=Object(oe.useState)(),Lt=Object(j.a)(ut,2),Hr=Lt[0],Yr=Lt[1],On=Object(oe.useState)(!1),cn=Object(j.a)(On,2),zr=cn[0],Pt=cn[1],dn=Object(oe.useState)([]),ct=Object(j.a)(dn,2),jr=ct[0],xr=ct[1],Gn=Object(oe.useState)([]),An=Object(j.a)(Gn,2),hn=An[0],Ei=An[1],Kn=Object(oe.useState)([]),bn=Object(j.a)(Kn,2),Fr=bn[0],di=bn[1],fn=Object(oe.useState)([]),Vr=Object(j.a)(fn,2),dr=Vr[0],nn=Vr[1],_n=Object(oe.useState)([]),jt=Object(j.a)(_n,2),lr=jt[0],ur=jt[1],Rr=Object(oe.useState)("C"),br=Object(j.a)(Rr,2),hi=br[0],Fn=br[1],$i=Object(oe.useReducer)(Et,Dt),Ji=Object(j.a)($i,2),Oi=Ji[0],pn=Ji[1],Ki=Oi.loading,Zr=Oi.data,ri=Oi.user,kn=Oi.status,sn=Zr==null?void 0:Zr.hack_sets,Tn=Zr==null||((pt=Zr.hack)===null||pt===void 0)?void 0:pt.test_set_average,fi=Object(oe.useState)(!1),zn=Object(j.a)(fi,2),Vn=zn[0],ki=zn[1],Mi=Object(oe.useRef)([]),Xn=Object(oe.useState)(!1),ji=Object(j.a)(Xn,2),pi=ji[0],mi=ji[1],Yn=Object(oe.useState)(!1),$n=Object(j.a)(Yn,2),Pi=$n[0],ni=$n[1],gi=Object(oe.useRef)(!0),Fi=Object(oe.useState)({}),ii=Object(j.a)(Fi,2),Ur=ii[0],Ft=ii[1];Object(oe.useEffect)(function(){return Object(q.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(q.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(q.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(q.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}},[]),Object(oe.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)});var er=function(){var tr=Object(C.a)(ee.a.mark(function It(){var ir,or;return ee.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,Object(le.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}});case 2:return ir=vr.sent,vr.next=5,Object(le.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});case 5:or=vr.sent,Ei(ir.tag_disciplines||[]),di(or.tag_disciplines||[]);case 8:case"end":return vr.stop()}},It)}));return function(){return tr.apply(this,arguments)}}(),zt=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}],ar=Object(oe.useCallback)(Object(C.a)(ee.a.mark(function tr(){var It,ir,or,Wr,vr,mn,an,Ai,In,Mn,Bn,Xi,ke,Ge,Ve,Ne,Ee,De,Te,je,Be,ze,Ke,Je,ot,gt,mt;return ee.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:if(pn({type:Tt.SET_LOADING,payload:!0}),!xt){Xt.next=19;break}return Xt.next=4,Ue(xt);case 4:It=Xt.sent,ir=It.user,or=It.language,Wr=It.practice_sets,vr=It.practice_codes,mn=It.description,an=It.difficulty,Ai=It.name,In=It.open_or_not,Mn=It.time_limit,Bn=It.test_set_average,Xi=It.test_set_score,ke=It.status,Ge=It.tag_discipline_ids,Ve=It.source_discipline_ids,Ne=It.item_banks_group_id,Ee=It.is_file,De=Ee===void 0?!1:Ee,Te=It.hide_actual_output,je=It.review_privilege,Be=It.review_description,ze={review_privilege:je,status:ke,review_description:Be,name:Ai},Ft(ze),ki(Te),Ke=De?[{input:"",output:"",score:100,position:1}]:Wr,De?(xr(Wr),qt.setFieldsValue({hack_sets:Ke})):xr([]),Je={loading:!0,user:ir,status:ke,data:{hack:{difficulty:an,name:Ai,description:mn,open_or_not:In,time_limit:Mn,test_set_average:Bn,test_set_score:Xi,tag_discipline_ids:Ge,source_discipline_ids:Ve,is_file:De},hack_sets:Ke}},pn({type:Tt.SET_INITAL_DATA,payload:Je}),Yr({hack:{difficulty:an,name:Ai,description:mn,open_or_not:In,time_limit:Mn,test_set_average:Bn,test_set_score:Xi,tag_discipline_ids:Ge,source_discipline_ids:Ve,is_file:De}}),ot=vr==null?void 0:vr.map(function(sr){return Object(A.a)(Object(A.a)({},sr),{},{code:ie.Base64.decode(sr==null?void 0:sr.code)})}),ur(ot),Mi.current=ot,Xt.next=27;break;case 19:return Xt.next=21,Se();case 21:gt=Xt.sent,mt=gt.user,pn({type:Tt.SET_INITAL_DATA,payload:{loading:!0,status:0,user:mt,data:{hack:{difficulty:"",time_limit:3,description:_t,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),Yr({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),ur(zt),Mi.current=zt;case 27:pn({type:Tt.SET_LOADING,payload:!1});case 28:case"end":return Xt.stop()}},tr)})),[xt]);Object(oe.useEffect)(function(){try{ar(),er()}catch(tr){console.log(tr,"----")}},[]);function _r(tr,It){return Lr.apply(this,arguments)}function Lr(){return Lr=Object(C.a)(ee.a.mark(function tr(It,ir){var or,Wr,vr,mn,an,Ai,In,Mn,Bn,Xi,ke,Ge,Ve,Ne,Ee,De,Te,je;return ee.a.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:Wr=Object(A.a)({},It),vr=Wr.hack_sets,mn=Wr.hack,mn.hide_actual_output=Vn,an=[],Ai=[],In=0,Mn=mn!=null&&mn.is_file?jr.map(function(Ke,Je){return Object(A.a)(Object(A.a)({},Ke),{},{position:Je+1})}):vr.map(function(Ke){return Object(A.a)(Object(A.a)({},Ke),{},{is_file:!1})}),Bn=Object(l.a)(Mn);try{for(Bn.s();!(Xi=Bn.n()).done;)ke=Xi.value,In+=ke.score,ke.id&&ke.id>=0?an.push(ke):Ai.push(ke)}catch(Ke){Bn.e(Ke)}finally{Bn.f()}if(Mn!=null&&Mn.length){ze.next=11;break}return x.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),ze.abrupt("return");case 11:if(!(In!==100&&!mn.test_set_score)){ze.next=14;break}return x.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),ze.abrupt("return");case 14:if(!(Mn!=null&&Mn.some(function(Ke){return!Ke.output}))){ze.next=17;break}return x.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),ze.abrupt("return");case 17:if(gi.current?mi(!0):ni(!0),Ve=lr==null?void 0:lr.map(function(Ke){return Object(A.a)(Object(A.a)({},Ke),{},{code:ie.Base64.encode(Ke==null?void 0:Ke.code)})}),!xt){ze.next=25;break}return ze.next=22,Xe(xt,{practice:mn,practice_codes:Ve,practice_sets:Ai,update_practice_sets:an});case 22:Ge=ze.sent,ze.next=28;break;case 25:return ze.next=27,he({practice:mn,practice_codes:Ve,practice_sets:Mn,publish:!gi.current});case 27:Ge=ze.sent;case 28:if(mi(!1),ni(!1),!(((or=Ge)===null||or===void 0?void 0:or.status)===0)){ze.next=46;break}if(!((Ne=Ge)!==null&&Ne!==void 0&&(Ee=Ne.similar_practice)!==null&&Ee!==void 0&&Ee.length)){ze.next=35;break}return Pt(!0),nn((De=Ge)===null||De===void 0?void 0:De.similar_practice),ze.abrupt("return");case 35:if(!xt){ze.next=44;break}if(x.b.success("\u4FDD\u5B58\u6210\u529F"),gi.current){ze.next=42;break}return ze.next=40,Object(le.a)("/api/practices/".concat(xt,"/start"),{method:"get"});case 40:Te=ze.sent,(Te==null?void 0:Te.status)===0&&Gt.push("/problems/".concat(Te==null?void 0:Te.identifier,"/oj/").concat(xt));case 42:ze.next=46;break;case 44:x.b.success("\u65B0\u5EFA\u6210\u529F"),Gt.replace("/problems/".concat((je=Ge)===null||je===void 0?void 0:je.identifier,"/ojedit"));case 46:case"end":return ze.stop()}},tr)})),Lr.apply(this,arguments)}function mr(){Gt.replace("/problems")}var qr=function(It){var ir=Math.floor(100/It.length),or=ir+100%It.length;It=It.map(function(Wr,vr){return vr===It.length-1?Object(A.a)(Object(A.a)({},Wr),{},{score:or}):Object(A.a)(Object(A.a)({},Wr),{},{score:ir})}),xr(It)};function Un(tr){tr.target.value||qr(jr),pn({type:Tt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack:Object(A.a)(Object(A.a)({},Zr.hack),{},{test_set_score:tr.target.value})})}})}function hr(tr){pn({type:Tt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack:Object(A.a)(Object(A.a)({},Zr.hack),{},{is_file:tr.target.value})})}})}function vi(tr){ki(tr.target.checked)}function kr(tr){var It=tr.target.value;It&&qr(jr),pn({type:Tt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack:Object(A.a)(Object(A.a)({},Zr.hack),{},{test_set_average:It})})}})}function Sn(){var tr=qt.getFieldValue("hack_sets"),It=tr.length+1,ir=Math.floor(100/It),or=100%It;tr.map(function(Wr,vr){return Tn&&(Wr.score=ir),Wr.position=vr+1,Wr}),tr.push({input:"",output:"",position:It,score:Tn?ir+or:0}),qt.setFieldsValue({hack_sets:tr}),pn({type:Tt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack_sets:tr})}})}Object(oe.useEffect)(function(){if(Tn){var tr=sn==null?void 0:sn.length,It=Math.floor(100/tr),ir=100%tr;sn==null||sn.map(function(or,Wr){return or.score=It,or.position=Wr+1,Wr===tr-1&&(or.score=It+ir),or}),pn({type:Tt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack_sets:sn})}}),qt.setFieldsValue({hack_sets:sn})}},[Tn]);function Rn(tr){var It=qt.getFieldValue("hack_sets"),ir=(It==null?void 0:It.length)-1,or=Math.ceil(100/ir),Wr=100%ir;It.splice(tr,1),It==null||It.map(function(vr,mn){return Tn&&(vr.score=or,mn===ir-1&&(vr.score=or+Wr)),vr.position=mn+1,vr}),pn({type:Tt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack_sets:It})}}),qt.setFieldsValue({hack_sets:It})}function li(tr){Fn(tr)}var ua=function(It){var ir,or=(ir=Mi.current)===null||ir===void 0?void 0:ir.findIndex(function(Wr){return Wr.language===hi});Mi.current[or].code=It,ur(Mi.current)},Mr=function(It){Yr(Object(A.a)({},qt.getFieldsValue()))},wr=function(){var tr=Object(C.a)(ee.a.mark(function It(ir){var or;return ee.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,Object(le.a)("/api/practices/".concat(ir,"/start"),{method:"get"});case 2:or=vr.sent,(or==null?void 0:or.status)===0&&Object(kt.S)("/problems/".concat(or==null?void 0:or.identifier,"/oj/").concat(ir));case 4:case"end":return vr.stop()}},It)}));return function(ir){return tr.apply(this,arguments)}}(),gr=function(){var tr=Object(C.a)(ee.a.mark(function It(){var ir,or,Wr,vr,mn,an;return ee.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,Ue(xt);case 2:ir=In.sent,or=ir.name,Wr=ir.status,vr=ir.review_privilege,mn=ir.review_description,an={review_privilege:vr,status:Wr,review_description:mn,name:or},Ft(an);case 6:case"end":return In.stop()}},It)}));return function(){return tr.apply(this,arguments)}}(),ai=function(){var It="";H.a.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:ae.a.createElement("div",{className:"mt20"},ae.a.createElement($.a,{className:_e.a.MdEditor,defaultValue:It,onChange:function(or){It=or}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var ir=Object(C.a)(ee.a.mark(function Wr(){var vr;return ee.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:if(It){an.next=3;break}return x.b.warn("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),an.abrupt("return",Promise.reject());case 3:return an.next=5,Object(le.a)("/api/practices/".concat(xt,"/review.json"),{method:"post",body:{op:"fail",description:It}});case 5:vr=an.sent,(vr==null?void 0:vr.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),gr());case 7:case"end":return an.stop()}},Wr)}));function or(){return ir.apply(this,arguments)}return or}()})},zi=function(){var tr=Object(C.a)(ee.a.mark(function It(){return ee.a.wrap(function(or){for(;;)switch(or.prev=or.next){case 0:H.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u63D0\u793A",content:"\u786E\u8BA4\u5C06\u9898\u76EE\u300A".concat(Ur==null?void 0:Ur.name,"\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Wr=Object(C.a)(ee.a.mark(function mn(){var an;return ee.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,Object(le.a)("/api/practices/".concat(xt,"/review.json"),{method:"post",body:{op:"pass"}});case 2:an=In.sent,(an==null?void 0:an.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),gr());case 4:case"end":return In.stop()}},mn)}));function vr(){return Wr.apply(this,arguments)}return vr}()});case 1:case"end":return or.stop()}},It)}));return function(){return tr.apply(this,arguments)}}(),Vi=function(){var It=H.a.confirm({icon:null,width:700,className:"".concat(_e.a.cusModal," custom-modal-divider"),centered:!0,title:ae.a.createElement(p.a,null,ae.a.createElement(R.a,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),ae.a.createElement(R.a,null,ae.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return It.destroy()}}))),content:ae.a.createElement("div",null,ae.a.createElement(Yt.a,{className:"mt20",value:(Ur==null?void 0:Ur.review_description)||""}))})};return ae.a.createElement(d.a,{spinning:Ki,size:"large",className:_e.a["oj-custom-large-spin"]},Zr?ae.a.createElement(oe.Fragment,null,ae.a.createElement("header",{className:_e.a.header},ae.a.createElement("div",null,ae.a.createElement("img",{src:"".concat(Ct.a.IMG_SERVER,"/images/").concat(ri==null?void 0:ri.image_url),alt:"user",width:30}),ae.a.createElement("span",null,ri==null?void 0:ri.name)),ae.a.createElement("h2",null," ",Zr==null||((St=Zr.hack)===null||St===void 0)?void 0:St.name," "),xt?ae.a.createElement("a",{className:_e.a.btn_back,onClick:mr}," ",ae.a.createElement(ne.a,null),"\u9000\u51FA"):null),ae.a.createElement(F.a,{form:qt,initialValues:Zr,layout:"vertical",className:_e.a["oj-form-container"],onValuesChange:Mr,onFinish:_r},ae.a.createElement(et.a,{hideResize:!0,className:_e.a["oj-problems"],leftChild:ae.a.createElement(Dr,{formValue:Hr,onRemoveTestCase:Rn,onAddTestCase:Sn,hack:Zr.hack,onChangeScore:Un,onChangehide:vi,onChangeAverage:kr,onChangeFile:hr,uploadData:jr,setUploadData:xr,handleUploadRatio:qr,ischecked:Vn,pointData:hn,sourceData:Fr,getPointData:er,id:xt}),rightChild:ae.a.createElement(Ae,{value:lr==null||((dt=lr.find(function(tr){return tr.language===hi}))===null||dt===void 0)?void 0:dt.code,onChange:ua,onLanguage:li,languageItems:lr,language:hi})}),ae.a.createElement("div",{className:_e.a.footer},!!xt&&ae.a.createElement("div",{className:_e.a.result},ae.a.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),Ur!=null&&Ur.review_privilege?ae.a.createElement(ae.a.Fragment,null,ae.a.createElement("div",{onClick:zi,className:_e.a.pass},"\u901A\u8FC7"),ae.a.createElement("div",{onClick:ai,className:_e.a.noPass},"\u4E0D\u901A\u8FC7")):ae.a.createElement(ae.a.Fragment,null,(Ur==null?void 0:Ur.status)===0&&ae.a.createElement("div",{className:_e.a.passText},ae.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(Ur==null?void 0:Ur.status)===1&&ae.a.createElement("div",{className:_e.a.passText},ae.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(Ur==null?void 0:Ur.status)===2&&ae.a.createElement("div",{className:_e.a.passText},ae.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(Ur==null?void 0:Ur.status)===3&&ae.a.createElement("div",{className:_e.a.passText},ae.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(Ur==null?void 0:Ur.status)===4&&ae.a.createElement("div",{className:_e.a.passText},ae.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(Ur==null?void 0:Ur.status)===5&&ae.a.createElement("div",{className:_e.a.noPassText},ae.a.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",ae.a.createElement("span",{onClick:Vi},"\u67E5\u770B\u539F\u56E0")))),ae.a.createElement(E.a,{type:"primary",ghost:!0,onClick:mr},"\u9000\u51FA\u7F16\u8F91"),ae.a.createElement(E.a,{disabled:Pi,loading:pi,type:"primary",onClick:function(){gi.current=!0,qt.submit()}},"\u4FDD\u5B58"," "),xt?ae.a.createElement(E.a,{disabled:pi,loading:Pi,style:{background:"#2FC25B",border:0},type:"primary",onClick:function(){gi.current=!1,qt.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):ae.a.createElement(E.a,{disabled:pi,loading:Pi,type:"primary",onClick:function(){gi.current=!1,qt.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,ae.a.createElement(H.a,{centered:!0,destroyOnClose:!0,footer:null,visible:zr,onCancel:function(){return Pt(!1)},title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},ae.a.createElement("div",null,ae.a.createElement("p",{className:"font14"},"\u7ECF\u7CFB\u7EDF\u68C0\u6D4B\u53D1\u73B0\uFF0C\u672C\u9898\u76EE\u4E0E\u7CFB\u7EDF\u4E2D\u5DF2\u521B\u5EFA\u7684\u9898\u76EE\u9AD8\u5EA6\u96F7\u540C\uFF0C\u8BF7\u8C03\u6574\u9898\u76EE\u540E\u518D\u8FDB\u884C\u4FDD\u5B58"),ae.a.createElement(o.a,{dataSource:dr,bordered:!1,scroll:dr.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:function(It,ir){return ae.a.createElement("span",{onClick:function(){return wr(ir==null?void 0:ir.identifier)},style:{textDecorationLine:"underline"},className:"current c-light-primary"},It)}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:function(It){var ir;return(ir=Ut()(It))===null||ir===void 0?void 0:ir.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function Dr(pt){var St,dt,Ht=pt.ischecked,Gt=pt.formValue,vt=pt.hack,xt=pt.onChangeAverage,Kt=pt.onChangeScore,Ar=pt.onChangehide,qt=pt.onChangeFile,ut=pt.onAddTestCase,Lt=pt.onRemoveTestCase,Hr=pt.uploadData,Yr=pt.setUploadData,On=pt.handleUploadRatio,cn=pt.pointData,zr=pt.sourceData,Pt=pt.getPointData,dn=pt.id,ct=vt.test_set_average,jr=vt.test_set_score,xr=Object(oe.useState)(!1),Gn=Object(j.a)(xr,2),An=Gn[0],hn=Gn[1],Ei=Object(oe.useState)(!1),Kn=Object(j.a)(Ei,2),bn=Kn[0],Fr=Kn[1],di=function(lr,ur){var Rr=Object(n.a)(Hr);Rr.splice(ur,1),ct?On(Rr):Yr(Rr)},fn=function(lr,ur){console.log(lr,ur);var Rr=Hr.map(function(br,hi){return hi===ur?Object(A.a)(Object(A.a)({},br),{},{score:lr.target.value?Number(lr.target.value):0}):br});Yr(Rr)},Vr=function(lr){var ur=Hr.concat(lr);vt.test_set_average?On(ur):Yr(ur)};function dr(jt){jt.stopPropagation()}function nn(){if(Object(Zt.w)()){Fr("practice");return}var jt="";H.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:ae.a.createElement("div",null,ae.a.createElement(L.a,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(ur){jt=ur.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var lr=Object(C.a)(ee.a.mark(function Rr(){var br;return ee.a.wrap(function(Fn){for(;;)switch(Fn.prev=Fn.next){case 0:return Fn.next=2,Object(le.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:jt}});case 2:br=Fn.sent,(br==null?void 0:br.status)===0&&Pt();case 4:case"end":return Fn.stop()}},Rr)}));function ur(){return lr.apply(this,arguments)}return ur}()})}function _n(){if(Object(Zt.w)()){Fr("practice_source");return}var jt="";H.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:ae.a.createElement("div",null,ae.a.createElement(L.a,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(ur){jt=ur.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var lr=Object(C.a)(ee.a.mark(function Rr(){var br;return ee.a.wrap(function(Fn){for(;;)switch(Fn.prev=Fn.next){case 0:return Fn.next=2,Object(le.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:jt}});case 2:br=Fn.sent,(br==null?void 0:br.status)===0&&Pt();case 4:case"end":return Fn.stop()}},Rr)}));function ur(){return lr.apply(this,arguments)}return ur}()})}return ae.a.createElement("div",{className:_e.a["oj-left-panel"]},ae.a.createElement("div",{className:_e.a["oj-form-info"]},ae.a.createElement(F.a.Item,{label:"\u9898\u76EE\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0"}],className:_e.a.inputOne},ae.a.createElement(L.a,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:ae.a.createElement("span",null,(Gt==null||((St=Gt.hack)===null||St===void 0||((dt=St.name)===null||dt===void 0))?void 0:dt.length)||0,"/",ae.a.createElement("span",{className:"c-grey-999"},"60"))})),ae.a.createElement(F.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},ae.a.createElement($.a,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),ae.a.createElement("div",{className:_e.a.row},ae.a.createElement("div",{className:_e.a.a},ae.a.createElement(F.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},ae.a.createElement(i.a,null,W(ce.difficulty)))),ae.a.createElement("div",{className:_e.a.b},ae.a.createElement(F.a.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},ae.a.createElement(i.a,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(lr){return lr.parentNode}},zr.map(function(jt){return ae.a.createElement(i.a.Option,{key:jt.id,value:jt.id},jt.name)}))),ae.a.createElement(E.a,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:function(){return _n()}},Object(Zt.w)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),ae.a.createElement("div",{className:_e.a.row},ae.a.createElement("div",{className:_e.a.b,style:{width:"100%",marginLeft:0}},ae.a.createElement(F.a.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},ae.a.createElement(i.a,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(lr){return lr.parentNode}},cn.map(function(jt){return ae.a.createElement(i.a.Option,{key:jt.id,value:jt.id},jt.name)}))),ae.a.createElement(E.a,{type:"primary",ghost:!0,onClick:function(){return nn()}},Object(Zt.w)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),ae.a.createElement("div",{className:_e.a.field},ae.a.createElement(F.a.Item,{label:"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236",name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],className:_e.a.inputTwo,extra:ae.a.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",ae.a.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},ae.a.createElement(r.a,{style:{width:185},min:3}))),ae.a.createElement("div",{className:"tst-case-info"},ae.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!vt.is_file&&ae.a.createElement(E.a,{style:{height:40},type:"primary",ghost:!0,onClick:ut},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),ae.a.createElement(F.a.Item,{name:["hack","test_set_score"]},ae.a.createElement(t.a.Group,{onChange:Kt},ae.a.createElement(t.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",ae.a.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u4EC5\u5F53\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u83B7\u5F97\u4E00\u6B21\u6027\u5956\u52B1\uFF09")),ae.a.createElement(t.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",ae.a.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u901A\u8FC7\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5BF9\u5E94\u5956\u52B1\uFF09")))),ae.a.createElement(T.a,{style:{marginBottom:"5px"},checked:Ht,onChange:Ar},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u505A\u9898\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),ae.a.createElement(F.a.Item,{className:_e.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},ae.a.createElement(t.a.Group,{onChange:qt},ae.a.createElement(b.a,{direction:"horizontal"},ae.a.createElement(t.a,{value:!1},"\u6587\u672C"),ae.a.createElement(t.a,{value:!0},"\u6587\u4EF6")))),!vt.test_set_score&&ae.a.createElement(F.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},ae.a.createElement(t.a.Group,{onChange:xt},ae.a.createElement(t.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),ae.a.createElement(t.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),vt.is_file&&ae.a.createElement("div",{className:_e.a.upBtn},ae.a.createElement(E.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return hn(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),ae.a.createElement(yt.a,{disabled:vt==null?void 0:vt.test_set_average,inputChange:fn,showScore:!vt.test_set_score,data:Hr,onRemove:di})),!vt.is_file&&ae.a.createElement(F.a.List,{name:"hack_sets"},function(jt,lr){return Object(w.a)(lr),ae.a.createElement(z.a,{accordion:!0},jt.map(function(ur,Rr){return ae.a.createElement($t,{key:"".concat(ur.key,"--").concat(Rr),header:ae.a.createElement("a",{className:_e.a["test-case-name"]},ae.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",Rr+1),jr?null:ae.a.createElement(ae.a.Fragment,null,ae.a.createElement(F.a.Item,{name:[ur.name,"score"],fieldKey:[ur.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(Rr+1,"\u8BC4\u5206")}]},ae.a.createElement(r.a,{onClick:dr,min:0,max:100,disabled:ct})),ae.a.createElement("span",null,"%"))),extra:Rr>0?ae.a.createElement("div",{onClick:dr},ae.a.createElement(g.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(Rr+1),onConfirm:function(){Lt(Rr)}},ae.a.createElement(J.a,{className:_e.a["btn-remove-case"]}))):null},ae.a.createElement(F.a.Item,{label:"\u8F93\u5165",name:[ur.name,"input"],fieldKey:[ur.fieldKey,"input"]},ae.a.createElement(Mt,null)),ae.a.createElement(F.a.Item,{label:"\u8F93\u51FA",name:[ur.name,"output"],fieldKey:[ur.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},ae.a.createElement(Mt,null)))}))}))),ae.a.createElement(yt.b,{rootIdentifier:dn,visible:An,onClose:function(){return hn(!1)},onOK:Vr}),ae.a.createElement(st,{visible:bn,onCancel:function(){Fr(!1),Pt()},onOK:function(){Fr(!1),Pt()}}))}},rdUC:function(B,Q,D){var N=D("MFOe"),g=N.Global;B.exports={name:"localStorage",read:k,write:b,each:m,remove:T,clearAll:_};function w(){return g.localStorage}function k(t){return w().getItem(t)}function b(t,h){return w().setItem(t,h)}function m(t){for(var h=w().length-1;h>=0;h--){var r=w().key(h);t(k(r),r)}}function T(t){return w().removeItem(t)}function _(){return w().clear()}},sR1s:function(B,Q,D){"use strict";D.d(Q,"b",function(){return k}),D.d(Q,"a",function(){return b}),D.d(Q,"c",function(){return m}),D.d(Q,"d",function(){return T});var N=D("U8pU"),g="RC_TABLE_KEY";function w(_){return _==null?[]:Array.isArray(_)?_:[_]}function k(_,t){if(!t&&typeof t!="number")return _;for(var h=w(t),r=_,c=0;c<h.length;c+=1){if(!r)return null;var i=h[c];r=r[i]}return r}function b(_){var t=[],h={};return _.forEach(function(r){for(var c=r||{},i=c.key,n=c.dataIndex,l=i||w(n).join("-")||g;h[l];)l="".concat(l,"_next");h[l]=!0,t.push(l)}),t}function m(){var _={};function t(i,n){n&&Object.keys(n).forEach(function(l){var f=n[l];f&&Object(N.a)(f)==="object"?(i[l]=i[l]||{},t(i[l],f)):i[l]=f})}for(var h=arguments.length,r=new Array(h),c=0;c<h;c++)r[c]=arguments[c];return r.forEach(function(i){t(_,i)}),_}function T(_){return _!=null}},sboe:function(B,Q,D){"use strict";D.d(Q,"a",function(){return w});var N=D("q1tI"),g=D.n(N),w=N.createContext(null)},t23M:function(B,Q,D){"use strict";var N=D("VTBJ"),g=D("1OyB"),w=D("vuIU"),k=D("Ji7U"),b=D("LK+K"),m=D("q1tI"),T=D.n(m),_=D("m+aA"),t=D("Zm9Q"),h=D("Kwbf"),r=D("c+Xe"),c=D("bdgK"),i="rc-observer-key",n=function(l){Object(k.a)(d,l);var f=Object(b.a)(d);function d(){var u;return Object(g.a)(this,d),u=f.apply(this,arguments),u.resizeObserver=null,u.childNode=null,u.currentElement=null,u.state={width:0,height:0,offsetHeight:0,offsetWidth:0},u.onResize=function(o){var s=u.props.onResize,E=o[0].target,v=E.getBoundingClientRect(),p=v.width,I=v.height,R=E.offsetWidth,y=E.offsetHeight,x=Math.floor(p),C=Math.floor(I);if(u.state.width!==x||u.state.height!==C||u.state.offsetWidth!==R||u.state.offsetHeight!==y){var S={width:x,height:C,offsetWidth:R,offsetHeight:y};u.setState(S),s&&Promise.resolve().then(function(){s(Object(N.a)(Object(N.a)({},S),{},{offsetWidth:R,offsetHeight:y}))})}},u.setChildNode=function(o){u.childNode=o},u}return Object(w.a)(d,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var o=this.props.disabled;if(o){this.destroyObserver();return}var s=Object(_.a)(this.childNode||this),E=s!==this.currentElement;E&&(this.destroyObserver(),this.currentElement=s),!this.resizeObserver&&s&&(this.resizeObserver=new c.default(this.onResize),this.resizeObserver.observe(s))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var o=this.props.children,s=Object(t.a)(o);if(s.length>1)Object(h.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(s.length===0)return Object(h.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var E=s[0];if(m.isValidElement(E)&&Object(r.c)(E)){var v=E.ref;s[0]=m.cloneElement(E,{ref:Object(r.a)(v,this.setChildNode)})}return s.length===1?s[0]:s.map(function(p,I){return!m.isValidElement(p)||"key"in p&&p.key!==null?p:m.cloneElement(p,{key:"".concat(i,"-").concat(I)})})}}]),d}(m.Component);n.displayName="ResizeObserver",Q.a=n},t9D7:function(B,Q,D){"use strict";D.d(Q,"b",function(){return T}),D.d(Q,"g",function(){return t}),D.d(Q,"d",function(){return h}),D.d(Q,"e",function(){return r}),D.d(Q,"a",function(){return c}),D.d(Q,"f",function(){return l}),D.d(Q,"c",function(){return f});var N=D("Vhoy"),g=D("MI8n"),w=D("pmY6"),k=D("Cg/j"),b=D("ic2d"),m=D("nEHx");const T=Object(k.c)("themeService");var _;(function(d){function u(o){return o&&typeof o=="object"&&typeof o.id=="string"}d.isThemeColor=u})(_||(_={}));function t(d){return{id:d}}var h;(function(d){function u(I){return I&&typeof I=="object"&&typeof I.id=="string"&&(typeof I.color=="undefined"||_.isThemeColor(I.color))}d.isThemeIcon=u;const o=new RegExp(`^\\$\\((${N.a.iconNameExpression}(?:${N.a.iconModifierExpression})?)\\)$`);function s(I){const R=o.exec(I);if(!R)return;let[,y]=R;return{id:y}}d.fromString=s;function E(I,R){let y=I.id;const x=y.lastIndexOf("~");return x!==-1&&(y=y.substring(0,x)),R&&(y=`${y}~${R}`),{id:y}}d.modify=E;function v(I,R){var y,x;return I.id===R.id&&((y=I.color)===null||y===void 0?void 0:y.id)===((x=R.color)===null||x===void 0?void 0:x.id)}d.isEqual=v;function p(I,R){return{id:I.id,color:R?t(R):void 0}}d.asThemeIcon=p,d.asClassNameArray=N.a.asClassNameArray,d.asClassName=N.a.asClassName,d.asCSSSelector=N.a.asCSSSelector})(h||(h={}));function r(d){switch(d){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 i{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new g.b}onColorThemeChange(d){return this.themingParticipants.push(d),this.onThemingParticipantAddedEmitter.fire(d),Object(w.i)(()=>{const u=this.themingParticipants.indexOf(d);this.themingParticipants.splice(u,1)})}getThemingParticipants(){return this.themingParticipants}}let n=new i;b.a.add(c.ThemingContribution,n);function l(d){return n.onColorThemeChange(d)}class f extends w.a{constructor(d){super();this.themeService=d,this.theme=d.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(u=>this.onThemeChange(u)))}onThemeChange(d){this.theme=d,this.updateStyles()}updateStyles(){}}},uGsb:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("MlIO"),D("1uat"))})(this,function(N){return function(){var g=N,w=g.x64,k=w.Word,b=w.WordArray,m=g.algo,T=m.SHA512,_=m.SHA384=T.extend({_doReset:function(){this._hash=new b.init([new k.init(3418070365,3238371032),new k.init(1654270250,914150663),new k.init(2438529370,812702999),new k.init(355462360,4144912697),new k.init(1731405415,4290775857),new k.init(2394180231,1750603025),new k.init(3675008525,1694076839),new k.init(1203062813,3204075428)])},_doFinalize:function(){var t=T._doFinalize.call(this);return t.sigBytes-=16,t}});g.SHA384=T._createHelper(_),g.HmacSHA384=T._createHmacHelper(_)}(),N.SHA384})},uGxW:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("OLod"))})(this,function(N){return N.pad.NoPadding={pad:function(){},unpad:function(){}},N.pad.NoPadding})},uQRt:function(B,Q,D){B.exports=N;function N(){return D("gaXo"),{}}},ulZh:function(B,Q,D){typeof window!="undefined"&&function(g,w){B.exports=w()}(this,function(){return function(N){var g={};function w(k){if(g[k])return g[k].exports;var b=g[k]={i:k,l:!1,exports:{}};return N[k].call(b.exports,b,b.exports,w),b.l=!0,b.exports}return w.m=N,w.c=g,w.d=function(k,b,m){w.o(k,b)||Object.defineProperty(k,b,{enumerable:!0,get:m})},w.r=function(k){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(k,"__esModule",{value:!0})},w.t=function(k,b){if(b&1&&(k=w(k)),b&8)return k;if(b&4&&typeof k=="object"&&k&&k.__esModule)return k;var m=Object.create(null);if(w.r(m),Object.defineProperty(m,"default",{enumerable:!0,value:k}),b&2&&typeof k!="string")for(var T in k)w.d(m,T,function(_){return k[_]}.bind(null,T));return m},w.n=function(k){var b=k&&k.__esModule?function(){return k.default}:function(){return k};return w.d(b,"a",b),b},w.o=function(k,b){return Object.prototype.hasOwnProperty.call(k,b)},w.p="/dist/",w(w.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(N,g,w){"use strict";var k=Object.prototype.hasOwnProperty,b="~";function m(){}Object.create&&(m.prototype=Object.create(null),new m().__proto__||(b=!1));function T(r,c,i){this.fn=r,this.context=c,this.once=i||!1}function _(r,c,i,n,l){if(typeof i!="function")throw new TypeError("The listener must be a function");var f=new T(i,n||r,l),d=b?b+c:c;return r._events[d]?r._events[d].fn?r._events[d]=[r._events[d],f]:r._events[d].push(f):(r._events[d]=f,r._eventsCount++),r}function t(r,c){--r._eventsCount===0?r._events=new m:delete r._events[c]}function h(){this._events=new m,this._eventsCount=0}h.prototype.eventNames=function(){var c=[],i,n;if(this._eventsCount===0)return c;for(n in i=this._events)k.call(i,n)&&c.push(b?n.slice(1):n);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(i)):c},h.prototype.listeners=function(c){var i=b?b+c:c,n=this._events[i];if(!n)return[];if(n.fn)return[n.fn];for(var l=0,f=n.length,d=new Array(f);l<f;l++)d[l]=n[l].fn;return d},h.prototype.listenerCount=function(c){var i=b?b+c:c,n=this._events[i];return n?n.fn?1:n.length:0},h.prototype.emit=function(c,i,n,l,f,d){var u=b?b+c:c;if(!this._events[u])return!1;var o=this._events[u],s=arguments.length,E,v;if(o.fn){o.once&&this.removeListener(c,o.fn,void 0,!0);switch(s){case 1:return o.fn.call(o.context),!0;case 2:return o.fn.call(o.context,i),!0;case 3:return o.fn.call(o.context,i,n),!0;case 4:return o.fn.call(o.context,i,n,l),!0;case 5:return o.fn.call(o.context,i,n,l,f),!0;case 6:return o.fn.call(o.context,i,n,l,f,d),!0}for(v=1,E=new Array(s-1);v<s;v++)E[v-1]=arguments[v];o.fn.apply(o.context,E)}else{var p=o.length,I;for(v=0;v<p;v++){o[v].once&&this.removeListener(c,o[v].fn,void 0,!0);switch(s){case 1:o[v].fn.call(o[v].context);break;case 2:o[v].fn.call(o[v].context,i);break;case 3:o[v].fn.call(o[v].context,i,n);break;case 4:o[v].fn.call(o[v].context,i,n,l);break;default:if(!E)for(I=1,E=new Array(s-1);I<s;I++)E[I-1]=arguments[I];o[v].fn.apply(o[v].context,E)}}}return!0},h.prototype.on=function(c,i,n){return _(this,c,i,n,!1)},h.prototype.once=function(c,i,n){return _(this,c,i,n,!0)},h.prototype.removeListener=function(c,i,n,l){var f=b?b+c:c;if(!this._events[f])return this;if(!i)return t(this,f),this;var d=this._events[f];if(d.fn)d.fn===i&&(!l||d.once)&&(!n||d.context===n)&&t(this,f);else{for(var u=0,o=[],s=d.length;u<s;u++)(d[u].fn!==i||l&&!d[u].once||n&&d[u].context!==n)&&o.push(d[u]);o.length?this._events[f]=o.length===1?o[0]:o:t(this,f)}return this},h.prototype.removeAllListeners=function(c){var i;return c?(i=b?b+c:c,this._events[i]&&t(this,i)):(this._events=new m,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prefixed=b,h.EventEmitter=h,N.exports=h},"./node_modules/url-toolkit/src/url-toolkit.js":function(N,g,w){(function(k){var b=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,m=/^([^\/?#]*)([^]*)$/,T=/(?:\/|^)\.(?=\/)/g,_=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,t={buildAbsoluteURL:function(h,r,c){if(c=c||{},h=h.trim(),r=r.trim(),!r){if(!c.alwaysNormalize)return h;var i=t.parseURL(h);if(!i)throw new Error("Error trying to parse base URL.");return i.path=t.normalizePath(i.path),t.buildURLFromParts(i)}var n=t.parseURL(r);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)):r;var l=t.parseURL(h);if(!l)throw new Error("Error trying to parse base URL.");if(!l.netLoc&&l.path&&l.path[0]!=="/"){var f=m.exec(l.path);l.netLoc=f[1],l.path=f[2]}l.netLoc&&!l.path&&(l.path="/");var d={scheme:l.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(d.netLoc=l.netLoc,n.path[0]!=="/"))if(!n.path)d.path=l.path,n.params||(d.params=l.params,n.query||(d.query=l.query));else{var u=l.path,o=u.substring(0,u.lastIndexOf("/")+1)+n.path;d.path=t.normalizePath(o)}return d.path===null&&(d.path=c.alwaysNormalize?t.normalizePath(n.path):n.path),t.buildURLFromParts(d)},parseURL:function(h){var r=b.exec(h);return r?{scheme:r[1]||"",netLoc:r[2]||"",path:r[3]||"",params:r[4]||"",query:r[5]||"",fragment:r[6]||""}:null},normalizePath:function(h){for(h=h.split("").reverse().join("").replace(T,"");h.length!==(h=h.replace(_,"")).length;);return h.split("").reverse().join("")},buildURLFromParts:function(h){return h.scheme+h.netLoc+h.path+h.params+h.query+h.fragment}};N.exports=t})(this)},"./node_modules/webworkify-webpack/index.js":function(N,g,w){function k(c){var i={};function n(f){if(i[f])return i[f].exports;var d=i[f]={i:f,l:!1,exports:{}};return c[f].call(d.exports,d,d.exports,n),d.l=!0,d.exports}n.m=c,n.c=i,n.i=function(f){return f},n.d=function(f,d,u){n.o(f,d)||Object.defineProperty(f,d,{configurable:!1,enumerable:!0,get:u})},n.r=function(f){Object.defineProperty(f,"__esModule",{value:!0})},n.n=function(f){var d=f&&f.__esModule?function(){return f.default}:function(){return f};return n.d(d,"a",d),d},n.o=function(f,d){return Object.prototype.hasOwnProperty.call(f,d)},n.p="/",n.oe=function(f){throw console.error(f),f};var l=n(n.s=ENTRY_MODULE);return l.default||l}var b="[\\.|\\-|\\+|\\w|/|@]+",m="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+b+").*?\\)";function T(c){return(c+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function _(c){return!isNaN(1*c)}function t(c,i,n){var l={};l[n]=[];var f=i.toString(),d=f.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!d)return l;for(var u=d[1],o=new RegExp("(\\\\n|\\W)"+T(u)+m,"g"),s;s=o.exec(f);){if(s[3]==="dll-reference")continue;l[n].push(s[3])}for(o=new RegExp("\\("+T(u)+'\\("(dll-reference\\s('+b+'))"\\)\\)'+m,"g");s=o.exec(f);)c[s[2]]||(l[n].push(s[1]),c[s[2]]=w(s[1]).m),l[s[2]]=l[s[2]]||[],l[s[2]].push(s[4]);for(var E=Object.keys(l),v=0;v<E.length;v++)for(var p=0;p<l[E[v]].length;p++)_(l[E[v]][p])&&(l[E[v]][p]=1*l[E[v]][p]);return l}function h(c){var i=Object.keys(c);return i.reduce(function(n,l){return n||c[l].length>0},!1)}function r(c,i){for(var n={main:[i]},l={main:[]},f={main:{}};h(n);)for(var d=Object.keys(n),u=0;u<d.length;u++){var o=d[u],s=n[o],E=s.pop();if(f[o]=f[o]||{},f[o][E]||!c[o][E])continue;f[o][E]=!0,l[o]=l[o]||[],l[o].push(E);for(var v=t(c,c[o][E],o),p=Object.keys(v),I=0;I<p.length;I++)n[p[I]]=n[p[I]]||[],n[p[I]]=n[p[I]].concat(v[p[I]])}return l}N.exports=function(c,i){i=i||{};var n={main:w.m},l=i.all?{main:Object.keys(n.main)}:r(n,c),f="";Object.keys(l).filter(function(E){return E!=="main"}).forEach(function(E){for(var v=0;l[E][v];)v++;l[E].push(v),n[E][v]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",f=f+"var "+E+" = ("+k.toString().replace("ENTRY_MODULE",JSON.stringify(v))+")({"+l[E].map(function(p){return""+JSON.stringify(p)+": "+n[E][p].toString()}).join(",")+`});
|
|
|
`}),f=f+"new (("+k.toString().replace("ENTRY_MODULE",JSON.stringify(c))+")({"+l.main.map(function(E){return""+JSON.stringify(E)+": "+n.main[E].toString()}).join(",")+"}))(self);";var d=new window.Blob([f],{type:"text/javascript"});if(i.bare)return d;var u=window.URL||window.webkitURL||window.mozURL||window.msURL,o=u.createObjectURL(d),s=new window.Worker(o);return s.objectURL=o,s}},"./src/config.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"hlsDefaultConfig",function(){return I}),w.d(g,"mergeConfig",function(){return y}),w.d(g,"enableStreamingMode",function(){return x});var k=w("./src/controller/abr-controller.ts"),b=w("./src/controller/audio-stream-controller.ts"),m=w("./src/controller/audio-track-controller.ts"),T=w("./src/controller/subtitle-stream-controller.ts"),_=w("./src/controller/subtitle-track-controller.ts"),t=w("./src/controller/buffer-controller.ts"),h=w("./src/controller/timeline-controller.ts"),r=w("./src/controller/cap-level-controller.ts"),c=w("./src/controller/fps-controller.ts"),i=w("./src/controller/eme-controller.ts"),n=w("./src/controller/cmcd-controller.ts"),l=w("./src/utils/xhr-loader.ts"),f=w("./src/utils/fetch-loader.ts"),d=w("./src/utils/cues.ts"),u=w("./src/utils/mediakeys-helper.ts"),o=w("./src/utils/logger.ts");function s(){return s=Object.assign||function(C){for(var S=1;S<arguments.length;S++){var F=arguments[S];for(var j in F)Object.prototype.hasOwnProperty.call(F,j)&&(C[j]=F[j])}return C},s.apply(this,arguments)}function E(C,S){var F=Object.keys(C);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(C);S&&(j=j.filter(function(A){return Object.getOwnPropertyDescriptor(C,A).enumerable})),F.push.apply(F,j)}return F}function v(C){for(var S=1;S<arguments.length;S++){var F=arguments[S]!=null?arguments[S]:{};S%2?E(Object(F),!0).forEach(function(j){p(C,j,F[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(F)):E(Object(F)).forEach(function(j){Object.defineProperty(C,j,Object.getOwnPropertyDescriptor(F,j))})}return C}function p(C,S,F){return S in C?Object.defineProperty(C,S,{value:F,enumerable:!0,configurable:!0,writable:!0}):C[S]=F,C}var I=v(v({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:l.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:k.default,bufferController:t.default,capLevelController:r.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:u.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},R()),{},{subtitleStreamController:T.SubtitleStreamController,subtitleTrackController:_.default,timelineController:h.TimelineController,audioStreamController:b.default,audioTrackController:m.default,emeController:i.default,cmcdController:n.default});function R(){return{cueHandler:d.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 y(C,S){if((S.liveSyncDurationCount||S.liveMaxLatencyDurationCount)&&(S.liveSyncDuration||S.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(S.liveMaxLatencyDurationCount!==void 0&&(S.liveSyncDurationCount===void 0||S.liveMaxLatencyDurationCount<=S.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(S.liveMaxLatencyDuration!==void 0&&(S.liveSyncDuration===void 0||S.liveMaxLatencyDuration<=S.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return s({},C,S)}function x(C){var S=C.loader;if(S!==f.default&&S!==l.default)o.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),C.progressive=!1;else{var F=Object(f.fetchSupported)();F&&(C.loader=f.default,C.progressive=!0,C.enableSoftwareAES=!0,o.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/polyfills/number.ts"),b=w("./src/utils/ewma-bandwidth-estimator.ts"),m=w("./src/events.ts"),T=w("./src/utils/buffer-helper.ts"),_=w("./src/errors.ts"),t=w("./src/types/loader.ts"),h=w("./src/utils/logger.ts");function r(n,l){for(var f=0;f<l.length;f++){var d=l[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(n,d.key,d)}}function c(n,l,f){return l&&r(n.prototype,l),f&&r(n,f),n}var i=function(){function n(f){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=f;var d=f.config;this.bwEstimator=new b.default(d.abrEwmaSlowVoD,d.abrEwmaFastVoD,d.abrEwmaDefaultEstimate),this.registerListeners()}var l=n.prototype;return l.registerListeners=function(){var d=this.hls;d.on(m.Events.FRAG_LOADING,this.onFragLoading,this),d.on(m.Events.FRAG_LOADED,this.onFragLoaded,this),d.on(m.Events.FRAG_BUFFERED,this.onFragBuffered,this),d.on(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.on(m.Events.ERROR,this.onError,this)},l.unregisterListeners=function(){var d=this.hls;d.off(m.Events.FRAG_LOADING,this.onFragLoading,this),d.off(m.Events.FRAG_LOADED,this.onFragLoaded,this),d.off(m.Events.FRAG_BUFFERED,this.onFragBuffered,this),d.off(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.off(m.Events.ERROR,this.onError,this)},l.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},l.onFragLoading=function(d,u){var o=u.frag;if(o.type===t.PlaylistLevelType.MAIN&&!this.timer){var s;this.fragCurrent=o,this.partCurrent=(s=u.part)!=null?s:null,this.timer=self.setInterval(this.onCheck,100)}},l.onLevelLoaded=function(d,u){var o=this.hls.config;u.details.live?this.bwEstimator.update(o.abrEwmaSlowLive,o.abrEwmaFastLive):this.bwEstimator.update(o.abrEwmaSlowVoD,o.abrEwmaFastVoD)},l._abandonRulesCheck=function(){var d=this.fragCurrent,u=this.partCurrent,o=this.hls,s=o.autoLevelEnabled,E=o.config,v=o.media;if(!d||!v)return;var p=u?u.stats:d.stats,I=u?u.duration:d.duration;if(p.aborted){h.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!s||v.paused||!v.playbackRate||!v.readyState)return;var R=performance.now()-p.loading.start,y=Math.abs(v.playbackRate);if(R<=500*I/y)return;var x=o.levels,C=o.minAutoLevel,S=x[d.level],F=p.total||Math.max(p.loaded,Math.round(I*S.maxBitrate/8)),j=Math.max(1,p.bwEstimate?p.bwEstimate/8:p.loaded*1e3/R),A=(F-p.loaded)/j,Y=v.currentTime,z=(T.BufferHelper.bufferInfo(v,Y,E.maxBufferHole).end-Y)/y;if(z>=2*I/y||A<=z)return;var O=Number.POSITIVE_INFINITY,H;for(H=d.level-1;H>C;H--){var U=x[H].maxBitrate;if(O=I*U/(8*.8*j),O<z)break}if(O>=A)return;var L=this.bwEstimator.getEstimate();h.logger.warn("Fragment "+d.sn+(u?" part "+u.index:"")+" of level "+d.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+H+`
|
|
|
Current BW estimate: `+(Object(k.isFiniteNumber)(L)?(L/1024).toFixed(3):"Unknown")+` Kb/s
|
|
|
Estimated load time for current fragment: `+A.toFixed(3)+` s
|
|
|
Estimated load time for the next fragment: `+O.toFixed(3)+` s
|
|
|
Time to underbuffer: `+z.toFixed(3)+" s"),o.nextLoadLevel=H,this.bwEstimator.sample(R,p.loaded),this.clearTimer(),d.loader&&(this.fragCurrent=this.partCurrent=null,d.loader.abort()),o.trigger(m.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:d,part:u,stats:p})},l.onFragLoaded=function(d,u){var o=u.frag,s=u.part;if(o.type===t.PlaylistLevelType.MAIN&&Object(k.isFiniteNumber)(o.sn)){var E=s?s.stats:o.stats,v=s?s.duration:o.duration;if(this.clearTimer(),this.lastLoadedFragLevel=o.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var p=this.hls.levels[o.level],I=(p.loaded?p.loaded.bytes:0)+E.loaded,R=(p.loaded?p.loaded.duration:0)+v;p.loaded={bytes:I,duration:R},p.realBitrate=Math.round(8*I/R)}if(o.bitrateTest){var y={stats:E,frag:o,part:s,id:o.type};this.onFragBuffered(m.Events.FRAG_BUFFERED,y),o.bitrateTest=!1}}},l.onFragBuffered=function(d,u){var o=u.frag,s=u.part,E=s?s.stats:o.stats;if(E.aborted)return;if(o.type!==t.PlaylistLevelType.MAIN||o.sn==="initSegment")return;var v=E.parsing.end-E.loading.start;this.bwEstimator.sample(v,E.loaded),E.bwEstimate=this.bwEstimator.getEstimate(),o.bitrateTest?this.bitrateTestDelay=v/1e3:this.bitrateTestDelay=0},l.onError=function(d,u){switch(u.details){case _.ErrorDetails.FRAG_LOAD_ERROR:case _.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},l.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},l.getNextABRAutoLevel=function(){var d=this.fragCurrent,u=this.partCurrent,o=this.hls,s=o.maxAutoLevel,E=o.config,v=o.minAutoLevel,p=o.media,I=u?u.duration:d?d.duration:0,R=p?p.currentTime:0,y=p&&p.playbackRate!==0?Math.abs(p.playbackRate):1,x=this.bwEstimator?this.bwEstimator.getEstimate():E.abrEwmaDefaultEstimate,C=(T.BufferHelper.bufferInfo(p,R,E.maxBufferHole).end-R)/y,S=this.findBestLevel(x,v,s,C,E.abrBandWidthFactor,E.abrBandWidthUpFactor);if(S>=0)return S;h.logger.trace((C?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var F=I?Math.min(I,E.maxStarvationDelay):E.maxStarvationDelay,j=E.abrBandWidthFactor,A=E.abrBandWidthUpFactor;if(!C){var Y=this.bitrateTestDelay;if(Y){var z=I?Math.min(I,E.maxLoadingDelay):E.maxLoadingDelay;F=z-Y,h.logger.trace("bitrate test took "+Math.round(1e3*Y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*F)+" ms"),j=A=1}}return S=this.findBestLevel(x,v,s,C+F,j,A),Math.max(S,0)},l.findBestLevel=function(d,u,o,s,E,v){for(var p,I=this.fragCurrent,R=this.partCurrent,y=this.lastLoadedFragLevel,x=this.hls.levels,C=x[y],S=!!(C!=null&&(p=C.details)!==null&&p!==void 0&&p.live),F=C==null?void 0:C.codecSet,j=R?R.duration:I?I.duration:0,A=o;A>=u;A--){var Y=x[A];if(!Y||F&&Y.codecSet!==F)continue;var z=Y.details,O=(R?z==null?void 0:z.partTarget:z==null?void 0:z.averagetargetduration)||j,H=void 0;A<=y?H=E*d:H=v*d;var U=x[A].maxBitrate,L=U*O/H;if(h.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+A+"/"+Math.round(H)+"/"+U+"/"+O+"/"+s+"/"+L),H>U&&(!L||S&&!this.bitrateTestDelay||L<s))return A}return-1},c(n,[{key:"nextAutoLevel",get:function(){var d=this._nextAutoLevel,u=this.bwEstimator;if(d!==-1&&(!u||!u.canEstimate()))return d;var o=this.getNextABRAutoLevel();return d!==-1&&(o=Math.min(d,o)),o},set:function(d){this._nextAutoLevel=d}}]),n}();g.default=i},"./src/controller/audio-stream-controller.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/polyfills/number.ts"),b=w("./src/controller/base-stream-controller.ts"),m=w("./src/events.ts"),T=w("./src/utils/buffer-helper.ts"),_=w("./src/controller/fragment-tracker.ts"),t=w("./src/types/level.ts"),h=w("./src/types/loader.ts"),r=w("./src/loader/fragment.ts"),c=w("./src/demux/chunk-cache.ts"),i=w("./src/demux/transmuxer-interface.ts"),n=w("./src/types/transmuxer.ts"),l=w("./src/controller/fragment-finders.ts"),f=w("./src/utils/discontinuities.ts"),d=w("./src/errors.ts"),u=w("./src/utils/logger.ts");function o(){return o=Object.assign||function(I){for(var R=1;R<arguments.length;R++){var y=arguments[R];for(var x in y)Object.prototype.hasOwnProperty.call(y,x)&&(I[x]=y[x])}return I},o.apply(this,arguments)}function s(I,R){I.prototype=Object.create(R.prototype),I.prototype.constructor=I,E(I,R)}function E(I,R){return E=Object.setPrototypeOf||function(x,C){return x.__proto__=C,x},E(I,R)}var v=100,p=function(I){s(R,I);function R(x,C){var S;return S=I.call(this,x,C,"[audio-stream-controller]")||this,S.videoBuffer=null,S.videoTrackCC=-1,S.waitingVideoCC=-1,S.audioSwitch=!1,S.trackId=-1,S.waitingData=null,S.mainDetails=null,S.bufferFlushed=!1,S._registerListeners(),S}var y=R.prototype;return y.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},y._registerListeners=function(){var C=this.hls;C.on(m.Events.MEDIA_ATTACHED,this.onMediaAttached,this),C.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),C.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),C.on(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),C.on(m.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),C.on(m.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),C.on(m.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),C.on(m.Events.ERROR,this.onError,this),C.on(m.Events.BUFFER_RESET,this.onBufferReset,this),C.on(m.Events.BUFFER_CREATED,this.onBufferCreated,this),C.on(m.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),C.on(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),C.on(m.Events.FRAG_BUFFERED,this.onFragBuffered,this)},y._unregisterListeners=function(){var C=this.hls;C.off(m.Events.MEDIA_ATTACHED,this.onMediaAttached,this),C.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),C.off(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),C.off(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),C.off(m.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),C.off(m.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),C.off(m.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),C.off(m.Events.ERROR,this.onError,this),C.off(m.Events.BUFFER_RESET,this.onBufferReset,this),C.off(m.Events.BUFFER_CREATED,this.onBufferCreated,this),C.off(m.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),C.off(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),C.off(m.Events.FRAG_BUFFERED,this.onFragBuffered,this)},y.onInitPtsFound=function(C,S){var F=S.frag,j=S.id,A=S.initPTS;if(j==="main"){var Y=F.cc;this.initPTS[F.cc]=A,this.log("InitPTS for cc: "+Y+" found from main: "+A),this.videoTrackCC=Y,this.state===b.State.WAITING_INIT_PTS&&this.tick()}},y.startLoad=function(C){if(!this.levels){this.startPosition=C,this.state=b.State.STOPPED;return}var S=this.lastCurrentTime;this.stopLoad(),this.setInterval(v),this.fragLoadError=0,S>0&&C===-1?(this.log("Override startPosition with lastCurrentTime @"+S.toFixed(3)),this.state=b.State.IDLE):(this.loadedmetadata=!1,this.state=b.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=C,this.tick()},y.doTick=function(){switch(this.state){case b.State.IDLE:this.doTickIdle();break;case b.State.WAITING_TRACK:{var C,S=this.levels,F=this.trackId,j=S==null||((C=S[F])===null||C===void 0)?void 0:C.details;if(j){if(this.waitForCdnTuneIn(j))break;this.state=b.State.WAITING_INIT_PTS}break}case b.State.FRAG_LOADING_WAITING_RETRY:{var A,Y=performance.now(),z=this.retryDate;(!z||Y>=z||(A=this.media)!==null&&A!==void 0&&A.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=b.State.IDLE);break}case b.State.WAITING_INIT_PTS:{var O=this.waitingData;if(O){var H=O.frag,U=O.part,L=O.cache,K=O.complete;if(this.initPTS[H.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=b.State.FRAG_LOADING;var ee=L.flush(),oe={frag:H,part:U,payload:ee,networkDetails:null};this._handleFragmentLoadProgress(oe),K&&I.prototype._handleFragmentLoadComplete.call(this,oe)}else if(this.videoTrackCC!==this.waitingVideoCC)u.logger.log("Waiting fragment cc ("+H.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var ae=this.getLoadPosition(),be=T.BufferHelper.bufferInfo(this.mediaBuffer,ae,this.config.maxBufferHole),_e=Object(l.fragmentWithinToleranceTest)(be.end,this.config.maxFragLookUpTolerance,H);_e<0&&(u.logger.log("Waiting fragment cc ("+H.cc+") @ "+H.start+" cancelled because another fragment at "+be.end+" is needed"),this.clearWaitingFragment())}}else this.state=b.State.IDLE}}this.onTickEnd()},y.clearWaitingFragment=function(){var C=this.waitingData;C&&(this.fragmentTracker.removeFragment(C.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=b.State.IDLE)},y.onTickEnd=function(){var C=this.media;if(!C||!C.readyState)return;var S=this.mediaBuffer?this.mediaBuffer:C,F=S.buffered;!this.loadedmetadata&&F.length&&(this.loadedmetadata=!0),this.lastCurrentTime=C.currentTime},y.doTickIdle=function(){var C,S,F=this.hls,j=this.levels,A=this.media,Y=this.trackId,z=F.config;if(!j||!j[Y])return;if(!A&&(this.startFragRequested||!z.startFragPrefetch))return;var O=j[Y],H=O.details;if(!H||H.live&&this.levelLastLoaded!==Y||this.waitForCdnTuneIn(H)){this.state=b.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,r.ElementaryStreamTypes.AUDIO,h.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,h.PlaylistLevelType.AUDIO);if(U===null)return;var L=U.len,K=this.getMaxBufferLength(),ee=this.audioSwitch;if(L>=K&&!ee)return;if(!ee&&this._streamEnded(U,H)){F.trigger(m.Events.BUFFER_EOS,{type:"audio"}),this.state=b.State.ENDED;return}var oe=H.fragments,ae=oe[0].start,be=U.end;if(ee){var _e=this.getLoadPosition();be=_e,H.PTSKnown&&_e<ae&&((U.end>ae||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),A.currentTime=ae+.05))}var fe=this.getNextFragment(be,H);if(!fe){this.bufferFlushed=!0;return}((C=fe.decryptdata)===null||C===void 0?void 0:C.keyFormat)==="identity"&&!((S=fe.decryptdata)!==null&&S!==void 0&&S.key)?this.loadKey(fe,H):this.loadFragment(fe,H,be)},y.getMaxBufferLength=function(){var C=I.prototype.getMaxBufferLength.call(this),S=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,h.PlaylistLevelType.MAIN);return S===null?C:Math.max(C,S.len)},y.onMediaDetaching=function(){this.videoBuffer=null,I.prototype.onMediaDetaching.call(this)},y.onAudioTracksUpdated=function(C,S){var F=S.audioTracks;this.resetTransmuxer(),this.levels=F.map(function(j){return new t.Level(j)})},y.onAudioTrackSwitching=function(C,S){var F=!!S.url;this.trackId=S.id;var j=this.fragCurrent;j!=null&&j.loader&&j.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),F?this.setInterval(v):this.resetTransmuxer(),F?(this.audioSwitch=!0,this.state=b.State.IDLE):this.state=b.State.STOPPED,this.tick()},y.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},y.onLevelLoaded=function(C,S){this.mainDetails=S.details},y.onAudioTrackLoaded=function(C,S){var F,j=this.levels,A=S.details,Y=S.id;if(!j){this.warn("Audio tracks were reset while loading level "+Y);return}this.log("Track "+Y+" loaded ["+A.startSN+","+A.endSN+"],duration:"+A.totalduration);var z=j[Y],O=0;if(A.live||(F=z.details)!==null&&F!==void 0&&F.live){var H=this.mainDetails;if(A.fragments[0]||(A.deltaUpdateFailed=!0),A.deltaUpdateFailed||!H)return;!z.details&&A.hasProgramDateTime&&H.hasProgramDateTime?(Object(f.alignMediaPlaylistByPDT)(A,H),O=A.fragments[0].start):O=this.alignPlaylists(A,z.details)}z.details=A,this.levelLastLoaded=Y,!this.startFragRequested&&(this.mainDetails||!A.live)&&this.setStartPosition(z.details,O),this.state===b.State.WAITING_TRACK&&!this.waitForCdnTuneIn(A)&&(this.state=b.State.IDLE),this.tick()},y._handleFragmentLoadProgress=function(C){var S,F=C.frag,j=C.part,A=C.payload,Y=this.config,z=this.trackId,O=this.levels;if(!O){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=O[z];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 L=Y.defaultAudioCodec||H.audioCodec||"mp4a.40.2",K=this.transmuxer;K||(K=this.transmuxer=new i.default(this.hls,h.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ee=this.initPTS[F.cc],oe=(S=F.initSegment)===null||S===void 0?void 0:S.data;if(ee!==void 0){var ae=!1,be=j?j.index:-1,_e=be!==-1,fe=new n.ChunkMetadata(F.level,F.sn,F.stats.chunkCount,A.byteLength,be,_e);K.push(A,oe,L,"",F,j,U.totalduration,ae,fe,ee)}else{u.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 "+z);var Re=this.waitingData=this.waitingData||{frag:F,part:j,cache:new c.default,complete:!1},Ce=Re.cache;Ce.push(new Uint8Array(A)),this.waitingVideoCC=this.videoTrackCC,this.state=b.State.WAITING_INIT_PTS}},y._handleFragmentLoadComplete=function(C){if(this.waitingData){this.waitingData.complete=!0;return}I.prototype._handleFragmentLoadComplete.call(this,C)},y.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},y.onBufferCreated=function(C,S){var F=S.tracks.audio;F&&(this.mediaBuffer=F.buffer),S.tracks.video&&(this.videoBuffer=S.tracks.video.buffer)},y.onFragBuffered=function(C,S){var F=S.frag,j=S.part;if(F.type!==h.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(F)){this.warn("Fragment "+F.sn+(j?" p: "+j.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,j)},y.onError=function(C,S){switch(S.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:case d.ErrorDetails.KEY_LOAD_ERROR:case d.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(h.PlaylistLevelType.AUDIO,S);break;case d.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case d.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==b.State.ERROR&&this.state!==b.State.STOPPED&&(this.state=S.fatal?b.State.ERROR:b.State.IDLE,this.warn(S.details+" while loading frag, switching to "+this.state+" state"));break;case d.ErrorDetails.BUFFER_FULL_ERROR:if(S.parent==="audio"&&(this.state===b.State.PARSING||this.state===b.State.PARSED)){var F=!0,j=this.getFwdBufferInfo(this.mediaBuffer,h.PlaylistLevelType.AUDIO);j&&j.len>.5&&(F=!this.reduceMaxBufferLength(j.len)),F&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,I.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},y.onBufferFlushed=function(C,S){var F=S.type;F===r.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},y._handleTransmuxComplete=function(C){var S,F="audio",j=this.hls,A=C.remuxResult,Y=C.chunkMeta,z=this.getCurrentContext(Y);if(!z){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 O=z.frag,H=z.part,U=A.audio,L=A.text,K=A.id3,ee=A.initSegment;if(this.fragContextChanged(O))return;if(this.state=b.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),ee!=null&&ee.tracks&&(this._bufferInitSegment(ee.tracks,O,Y),j.trigger(m.Events.FRAG_PARSING_INIT_SEGMENT,{frag:O,id:F,tracks:ee.tracks})),U){var oe=U.startPTS,ae=U.endPTS,be=U.startDTS,_e=U.endDTS;H&&(H.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:oe,endPTS:ae,startDTS:be,endDTS:_e}),O.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,oe,ae,be,_e),this.bufferFragmentData(U,O,H,Y)}if(K!=null&&(S=K.samples)!==null&&S!==void 0&&S.length){var fe=o({frag:O,id:F},K);j.trigger(m.Events.FRAG_PARSING_METADATA,fe)}if(L){var Re=o({frag:O,id:F},L);j.trigger(m.Events.FRAG_PARSING_USERDATA,Re)}},y._bufferInitSegment=function(C,S,F){if(this.state!==b.State.PARSING)return;C.video&&delete C.video;var j=C.audio;if(!j)return;j.levelCodec=j.codec,j.id="audio",this.log("Init audio buffer, container:"+j.container+", codecs[parsed]=["+j.codec+"]"),this.hls.trigger(m.Events.BUFFER_CODECS,C);var A=j.initSegment;if(A!=null&&A.byteLength){var Y={type:"audio",frag:S,part:null,chunkMeta:F,parent:S.type,data:A};this.hls.trigger(m.Events.BUFFER_APPENDING,Y)}this.tick()},y.loadFragment=function(C,S,F){var j=this.fragmentTracker.getState(C);this.fragCurrent=C,(this.audioSwitch||j===_.FragmentState.NOT_LOADED||j===_.FragmentState.PARTIAL)&&(C.sn==="initSegment"?this._loadInitSegment(C):S.live&&!Object(k.isFiniteNumber)(this.initPTS[C.cc])?(this.log("Waiting for video PTS in continuity counter "+C.cc+" of live stream before loading audio fragment "+C.sn+" of level "+this.trackId),this.state=b.State.WAITING_INIT_PTS):(this.startFragRequested=!0,I.prototype.loadFragment.call(this,C,S,F)))},y.completeAudioSwitch=function(){var C=this.hls,S=this.media,F=this.trackId;S&&(this.log("Switching audio track : flushing all audio"),I.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,C.trigger(m.Events.AUDIO_TRACK_SWITCHED,{id:F})},R}(b.default);g.default=p},"./src/controller/audio-track-controller.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/events.ts"),b=w("./src/errors.ts"),m=w("./src/controller/base-playlist-controller.ts"),T=w("./src/types/loader.ts");function _(i,n){for(var l=0;l<n.length;l++){var f=n[l];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(i,f.key,f)}}function t(i,n,l){return n&&_(i.prototype,n),l&&_(i,l),i}function h(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,r(i,n)}function r(i,n){return r=Object.setPrototypeOf||function(f,d){return f.__proto__=d,f},r(i,n)}var c=function(i){h(n,i);function n(f){var d;return d=i.call(this,f,"[audio-track-controller]")||this,d.tracks=[],d.groupId=null,d.tracksInGroup=[],d.trackId=-1,d.trackName="",d.selectDefaultTrack=!0,d.registerListeners(),d}var l=n.prototype;return l.registerListeners=function(){var d=this.hls;d.on(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.on(k.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.on(k.Events.LEVEL_LOADING,this.onLevelLoading,this),d.on(k.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),d.on(k.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),d.on(k.Events.ERROR,this.onError,this)},l.unregisterListeners=function(){var d=this.hls;d.off(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(k.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.off(k.Events.LEVEL_LOADING,this.onLevelLoading,this),d.off(k.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),d.off(k.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),d.off(k.Events.ERROR,this.onError,this)},l.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,i.prototype.destroy.call(this)},l.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},l.onManifestParsed=function(d,u){this.tracks=u.audioTracks||[]},l.onAudioTrackLoaded=function(d,u){var o=u.id,s=u.details,E=this.tracksInGroup[o];if(!E){this.warn("Invalid audio track id "+o);return}var v=E.details;E.details=u.details,this.log("audioTrack "+o+" loaded ["+s.startSN+"-"+s.endSN+"]"),o===this.trackId&&(this.retryCount=0,this.playlistLoaded(o,u,v))},l.onLevelLoading=function(d,u){this.switchLevel(u.level)},l.onLevelSwitching=function(d,u){this.switchLevel(u.level)},l.switchLevel=function(d){var u=this.hls.levels[d];if(!(u!=null&&u.audioGroupIds))return;var o=u.audioGroupIds[u.urlId];if(this.groupId!==o){this.groupId=o;var s=this.tracks.filter(function(v){return!o||v.groupId===o});this.selectDefaultTrack&&!s.some(function(v){return v.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=s;var E={audioTracks:s};this.log("Updating audio tracks, "+s.length+' track(s) found in "'+o+'" group-id'),this.hls.trigger(k.Events.AUDIO_TRACKS_UPDATED,E),this.selectInitialTrack()}},l.onError=function(d,u){if(i.prototype.onError.call(this,d,u),u.fatal||!u.context)return;u.context.type===T.PlaylistContextType.AUDIO_TRACK&&u.context.id===this.trackId&&u.context.groupId===this.groupId&&this.retryLoadingOrFail(u)},l.setAudioTrack=function(d){var u=this.tracksInGroup;if(d<0||d>=u.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var o=u[this.trackId];this.log("Now switching to audio-track index "+d);var s=u[d],E=s.id,v=s.groupId,p=v===void 0?"":v,I=s.name,R=s.type,y=s.url;if(this.trackId=d,this.trackName=I,this.selectDefaultTrack=!1,this.hls.trigger(k.Events.AUDIO_TRACK_SWITCHING,{id:E,groupId:p,name:I,type:R,url:y}),s.details&&!s.details.live)return;var x=this.switchParams(s.url,o==null?void 0:o.details);this.loadPlaylist(x)},l.selectInitialTrack=function(){var d=this.tracksInGroup;console.assert(d.length,"Initial audio track should be selected when tracks are known");var u=this.trackName,o=this.findTrackId(u)||this.findTrackId();o!==-1?this.setAudioTrack(o):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(k.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},l.findTrackId=function(d){for(var u=this.tracksInGroup,o=0;o<u.length;o++){var s=u[o];if((!this.selectDefaultTrack||s.default)&&(!d||d===s.name))return s.id}return-1},l.loadPlaylist=function(d){var u=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(u)){var o=u.id,s=u.groupId,E=u.url;if(d)try{E=d.addDirectives(E)}catch(v){this.warn("Could not construct new URL with HLS Delivery Directives: "+v)}this.log("loading audio-track playlist for id: "+o),this.clearTimer(),this.hls.trigger(k.Events.AUDIO_TRACK_LOADING,{url:E,id:o,groupId:s,deliveryDirectives:d||null})}},t(n,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(d){this.selectDefaultTrack=!1,this.setAudioTrack(d)}}]),n}(m.default);g.default=c},"./src/controller/base-playlist-controller.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return t});var k=w("./src/polyfills/number.ts"),b=w("./src/types/level.ts"),m=w("./src/controller/level-helper.ts"),T=w("./src/utils/logger.ts"),_=w("./src/errors.ts"),t=function(){function h(c,i){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=T.logger.log.bind(T.logger,i+":"),this.warn=T.logger.warn.bind(T.logger,i+":"),this.hls=c}var r=h.prototype;return r.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},r.onError=function(i,n){n.fatal&&n.type===_.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},r.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},r.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},r.stopLoad=function(){this.canLoad=!1,this.clearTimer()},r.switchParams=function(i,n){var l=n==null?void 0:n.renditionReports;if(l)for(var f=0;f<l.length;f++){var d=l[f],u=""+d.URI;if(u===i.substr(-u.length)){var o=parseInt(d["LAST-MSN"]),s=parseInt(d["LAST-PART"]);if(n&&this.hls.config.lowLatencyMode){var E=Math.min(n.age-n.partTarget,n.targetduration);s!==void 0&&E>n.partTarget&&(s+=1)}if(Object(k.isFiniteNumber)(o))return new b.HlsUrlParameters(o,Object(k.isFiniteNumber)(s)?s:void 0,b.HlsSkip.No)}}},r.loadPlaylist=function(i){},r.shouldLoadTrack=function(i){return this.canLoad&&i&&!!i.url&&(!i.details||i.details.live)},r.playlistLoaded=function(i,n,l){var f=this,d=n.details,u=n.stats,o=u.loading.end?Math.max(0,self.performance.now()-u.loading.end):0;if(d.advancedDateTime=Date.now()-o,d.live||l!=null&&l.live){if(d.reloaded(l),l&&this.log("live playlist "+i+" "+(d.advanced?"REFRESHED "+d.lastPartSn+"-"+d.lastPartIndex:"MISSED")),l&&d.fragments.length>0&&Object(m.mergeDetails)(l,d),!this.canLoad||!d.live)return;var s,E=void 0,v=void 0;if(d.canBlockReload&&d.endSN&&d.advanced){var p=this.hls.config.lowLatencyMode,I=d.lastPartSn,R=d.endSN,y=d.lastPartIndex,x=y!==-1,C=I===R,S=p?0:y;x?(E=C?R+1:I,v=C?S:y+1):E=R+1;var F=d.age,j=F+d.ageHeader,A=Math.min(j-d.partTarget,d.targetduration*1.5);if(A>0){if(l&&A>l.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+l.tuneInGoal+" to: "+A+" with playlist age: "+d.age),A=0;else{var Y=Math.floor(A/d.targetduration);if(E+=Y,v!==void 0){var z=Math.round(A%d.targetduration/d.partTarget);v+=z}this.log("CDN Tune-in age: "+d.ageHeader+"s last advanced "+F.toFixed(2)+"s goal: "+A+" skip sn "+Y+" to part "+v)}d.tuneInGoal=A}if(s=this.getDeliveryDirectives(d,n.deliveryDirectives,E,v),p||!C){this.loadPlaylist(s);return}}else s=this.getDeliveryDirectives(d,n.deliveryDirectives,E,v);var O=Object(m.computeReloadInterval)(d,u);E!==void 0&&d.canBlockReload&&(O-=d.partTarget||1),this.log("reload live playlist "+i+" in "+Math.round(O)+" ms"),this.timer=self.setTimeout(function(){return f.loadPlaylist(s)},O)}else this.clearTimer()},r.getDeliveryDirectives=function(i,n,l,f){var d=Object(b.getSkipValue)(i,l);return n!=null&&n.skip&&i.deltaUpdateFailed&&(l=n.msn,f=n.part,d=b.HlsSkip.No),new b.HlsUrlParameters(l,f,d)},r.retryLoadingOrFail=function(i){var n=this,l=this.hls.config,f=this.retryCount<l.levelLoadingMaxRetry;if(f){var d;if(this.retryCount++,i.details.indexOf("LoadTimeOut")>-1&&(d=i.context)!==null&&d!==void 0&&d.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+i.details+'"'),this.loadPlaylist();else{var u=Math.min(Math.pow(2,this.retryCount)*l.levelLoadingRetryDelay,l.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return n.loadPlaylist()},u),this.warn("retry playlist loading #"+this.retryCount+" in "+u+' ms after "'+i.details+'"')}}else this.warn('cannot recover from error "'+i.details+'"'),this.clearTimer(),i.fatal=!0;return f},h}()},"./src/controller/base-stream-controller.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"State",function(){return R}),w.d(g,"default",function(){return y});var k=w("./src/polyfills/number.ts"),b=w("./src/task-loop.ts"),m=w("./src/controller/fragment-tracker.ts"),T=w("./src/utils/buffer-helper.ts"),_=w("./src/utils/logger.ts"),t=w("./src/events.ts"),h=w("./src/errors.ts"),r=w("./src/types/transmuxer.ts"),c=w("./src/utils/mp4-tools.ts"),i=w("./src/utils/discontinuities.ts"),n=w("./src/controller/fragment-finders.ts"),l=w("./src/controller/level-helper.ts"),f=w("./src/loader/fragment-loader.ts"),d=w("./src/crypt/decrypter.ts"),u=w("./src/utils/time-ranges.ts"),o=w("./src/types/loader.ts");function s(x,C){for(var S=0;S<C.length;S++){var F=C[S];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(x,F.key,F)}}function E(x,C,S){return C&&s(x.prototype,C),S&&s(x,S),x}function v(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function p(x,C){x.prototype=Object.create(C.prototype),x.prototype.constructor=x,I(x,C)}function I(x,C){return I=Object.setPrototypeOf||function(F,j){return F.__proto__=j,F},I(x,C)}var R={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"},y=function(x){p(C,x);function C(F,j,A){var Y;return Y=x.call(this)||this,Y.hls=void 0,Y.fragPrevious=null,Y.fragCurrent=null,Y.fragmentTracker=void 0,Y.transmuxer=null,Y._state=R.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=A,Y.log=_.logger.log.bind(_.logger,A+":"),Y.warn=_.logger.warn.bind(_.logger,A+":"),Y.hls=F,Y.fragmentLoader=new f.default(F.config),Y.fragmentTracker=j,Y.config=F.config,Y.decrypter=new d.default(F,F.config),F.on(t.Events.KEY_LOADED,Y.onKeyLoaded,v(Y)),Y}var S=C.prototype;return S.doTick=function(){this.onTickEnd()},S.onTickEnd=function(){},S.startLoad=function(j){},S.stopLoad=function(){this.fragmentLoader.abort();var j=this.fragCurrent;j&&this.fragmentTracker.removeFragment(j),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=R.STOPPED},S._streamEnded=function(j,A){var Y=this.fragCurrent,z=this.fragmentTracker;if(!A.live&&Y&&Y.sn===A.endSN&&!j.nextStart){var O=z.getState(Y);return O===m.FragmentState.PARTIAL||O===m.FragmentState.OK}return!1},S.onMediaAttached=function(j,A){var Y=this.media=this.mediaBuffer=A.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),Y.addEventListener("seeking",this.onvseeking),Y.addEventListener("ended",this.onvended);var z=this.config;this.levels&&z.autoStartLoad&&this.state===R.STOPPED&&this.startLoad(z.startPosition)},S.onMediaDetaching=function(){var j=this.media;j!=null&&j.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),j&&(j.removeEventListener("seeking",this.onvseeking),j.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},S.onMediaSeeking=function(){var j=this.config,A=this.fragCurrent,Y=this.media,z=this.mediaBuffer,O=this.state,H=Y?Y.currentTime:0,U=T.BufferHelper.bufferInfo(z||Y,H,j.maxBufferHole);if(this.log("media seeking to "+(Object(k.isFiniteNumber)(H)?H.toFixed(3):H)+", state: "+O),O===R.ENDED)this.resetLoadingState();else if(A&&!U.len){var L=j.maxFragLookUpTolerance,K=A.start-L,ee=A.start+A.duration+L,oe=H>ee;(H<K||oe)&&(oe&&A.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),A.loader.abort()),this.resetLoadingState())}Y&&(this.lastCurrentTime=H),!this.loadedmetadata&&!U.len&&(this.nextLoadPosition=this.startPosition=H),this.tickImmediate()},S.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},S.onKeyLoaded=function(j,A){if(this.state!==R.KEY_LOADING||A.frag!==this.fragCurrent||!this.levels)return;this.state=R.IDLE;var Y=this.levels[A.frag.level].details;Y&&this.loadFragment(A.frag,Y,A.frag.start)},S.onHandlerDestroying=function(){this.stopLoad(),x.prototype.onHandlerDestroying.call(this)},S.onHandlerDestroyed=function(){this.state=R.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,x.prototype.onHandlerDestroyed.call(this)},S.loadKey=function(j,A){this.log("Loading key for "+j.sn+" of ["+A.startSN+"-"+A.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+j.level),this.state=R.KEY_LOADING,this.fragCurrent=j,this.hls.trigger(t.Events.KEY_LOADING,{frag:j})},S.loadFragment=function(j,A,Y){this._loadFragForPlayback(j,A,Y)},S._loadFragForPlayback=function(j,A,Y){var z=this,O=function(U){if(z.fragContextChanged(j)){z.warn("Fragment "+j.sn+(U.part?" p: "+U.part.index:"")+" of level "+j.level+" was dropped during download."),z.fragmentTracker.removeFragment(j);return}j.stats.chunkCount++,z._handleFragmentLoadProgress(U)};this._doFragLoad(j,A,Y,O).then(function(H){if(!H)return;z.fragLoadError=0;var U=z.state;if(z.fragContextChanged(j)){(U===R.FRAG_LOADING||U===R.BACKTRACKING||!z.fragCurrent&&U===R.PARSING)&&(z.fragmentTracker.removeFragment(j),z.state=R.IDLE);return}if("payload"in H&&(z.log("Loaded fragment "+j.sn+" of level "+j.level),z.hls.trigger(t.Events.FRAG_LOADED,H),z.state===R.BACKTRACKING)){z.fragmentTracker.backtrack(j,H),z.resetFragmentLoading(j);return}z._handleFragmentLoadComplete(H)}).catch(function(H){z.warn(H),z.resetFragmentLoading(j)})},S.flushMainBuffer=function(j,A,Y){if(Y===void 0&&(Y=null),!(j-A))return;var z={startOffset:j,endOffset:A,type:Y};this.fragLoadError=0,this.hls.trigger(t.Events.BUFFER_FLUSHING,z)},S._loadInitSegment=function(j){var A=this;this._doFragLoad(j).then(function(Y){if(!Y||A.fragContextChanged(j)||!A.levels)throw new Error("init load aborted");return Y}).then(function(Y){var z=A.hls,O=Y.payload,H=j.decryptdata;if(O&&O.byteLength>0&&H&&H.key&&H.iv&&H.method==="AES-128"){var U=self.performance.now();return A.decrypter.webCryptoDecrypt(new Uint8Array(O),H.key.buffer,H.iv.buffer).then(function(L){var K=self.performance.now();return z.trigger(t.Events.FRAG_DECRYPTED,{frag:j,payload:L,stats:{tstart:U,tdecrypt:K}}),Y.payload=L,Y})}return Y}).then(function(Y){var z=A.fragCurrent,O=A.hls,H=A.levels;if(!H)throw new Error("init load aborted, missing levels");var U=H[j.level].details;console.assert(U,"Level details are defined when init segment is loaded");var L=j.stats;A.state=R.IDLE,A.fragLoadError=0,j.data=new Uint8Array(Y.payload),L.parsing.start=L.buffering.start=self.performance.now(),L.parsing.end=L.buffering.end=self.performance.now(),Y.frag===z&&O.trigger(t.Events.FRAG_BUFFERED,{stats:L,frag:z,part:null,id:j.type}),A.tick()}).catch(function(Y){A.warn(Y),A.resetFragmentLoading(j)})},S.fragContextChanged=function(j){var A=this.fragCurrent;return!j||!A||j.level!==A.level||j.sn!==A.sn||j.urlId!==A.urlId},S.fragBufferedComplete=function(j,A){var Y=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+j.type+" sn: "+j.sn+(A?" part: "+A.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+j.level+" "+u.default.toString(T.BufferHelper.getBuffered(Y))),this.state=R.IDLE,this.tick()},S._handleFragmentLoadComplete=function(j){var A=this.transmuxer;if(!A)return;var Y=j.frag,z=j.part,O=j.partsLoaded,H=!O||O.length===0||O.some(function(L){return!L}),U=new r.ChunkMetadata(Y.level,Y.sn,Y.stats.chunkCount+1,0,z?z.index:-1,!H);A.flush(U)},S._handleFragmentLoadProgress=function(j){},S._doFragLoad=function(j,A,Y,z){var O=this;if(Y===void 0&&(Y=null),!this.levels)throw new Error("frag load aborted, missing levels");if(Y=Math.max(j.start,Y||0),this.config.lowLatencyMode&&A){var H=A.partList;if(H&&z){Y>j.end&&A.fragmentHint&&(j=A.fragmentHint);var U=this.getNextPart(H,j,Y);if(U>-1){var L=H[U];return this.log("Loading part sn: "+j.sn+" p: "+L.index+" cc: "+j.cc+" of playlist ["+A.startSN+"-"+A.endSN+"] parts [0-"+U+"-"+(H.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+j.level+", target: "+parseFloat(Y.toFixed(3))),this.nextLoadPosition=L.start+L.duration,this.state=R.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:j,part:H[U],targetBufferTime:Y}),this.doFragPartsLoad(j,H,U,z).catch(function(K){return O.handleFragLoadError(K)})}else if(!j.url||this.loadedEndOfParts(H,Y))return Promise.resolve(null)}}return this.log("Loading fragment "+j.sn+" cc: "+j.cc+" "+(A?"of ["+A.startSN+"-"+A.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+j.level+", target: "+parseFloat(Y.toFixed(3))),Object(k.isFiniteNumber)(j.sn)&&!this.bitrateTest&&(this.nextLoadPosition=j.start+j.duration),this.state=R.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:j,targetBufferTime:Y}),this.fragmentLoader.load(j,z).catch(function(K){return O.handleFragLoadError(K)})},S.doFragPartsLoad=function(j,A,Y,z){var O=this;return new Promise(function(H,U){var L=[],K=function ee(oe){var ae=A[oe];O.fragmentLoader.loadPart(j,ae,z).then(function(be){L[ae.index]=be;var _e=be.part;O.hls.trigger(t.Events.FRAG_LOADED,be);var fe=A[oe+1];if(fe&&fe.fragment===j)ee(oe+1);else return H({frag:j,part:_e,partsLoaded:L})}).catch(U)};K(Y)})},S.handleFragLoadError=function(j){var A=j.data;return A&&A.details===h.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(A.frag,A.part):this.hls.trigger(t.Events.ERROR,A),null},S._handleTransmuxerFlush=function(j){var A=this.getCurrentContext(j);if(!A||this.state!==R.PARSING){this.fragCurrent||(this.state=R.IDLE);return}var Y=A.frag,z=A.part,O=A.level,H=self.performance.now();Y.stats.parsing.end=H,z&&(z.stats.parsing.end=H),this.updateLevelTiming(Y,z,O,j.partial)},S.getCurrentContext=function(j){var A=this.levels,Y=j.level,z=j.sn,O=j.part;if(!A||!A[Y])return this.warn("Levels object was unset while buffering fragment "+z+" of level "+Y+". The current chunk will not be buffered."),null;var H=A[Y],U=O>-1?Object(l.getPartWith)(H,z,O):null,L=U?U.fragment:Object(l.getFragmentWithSN)(H,z,this.fragCurrent);return L?{frag:L,part:U,level:H}:null},S.bufferFragmentData=function(j,A,Y,z){if(!j||this.state!==R.PARSING)return;var O=j.data1,H=j.data2,U=O;if(O&&H&&(U=Object(c.appendUint8Array)(O,H)),!U||!U.length)return;var L={type:j.type,frag:A,part:Y,chunkMeta:z,parent:A.type,data:U};this.hls.trigger(t.Events.BUFFER_APPENDING,L),j.dropped&&j.independent&&!Y&&this.flushBufferGap(A)},S.flushBufferGap=function(j){var A=this.media;if(!A)return;if(!T.BufferHelper.isBuffered(A,A.currentTime)){this.flushMainBuffer(0,j.start);return}var Y=A.currentTime,z=T.BufferHelper.bufferInfo(A,Y,0),O=j.duration,H=Math.min(this.config.maxFragLookUpTolerance*2,O*.25),U=Math.max(Math.min(j.start-H,z.end-H),Y+H);j.start-U>H&&this.flushMainBuffer(U,j.start)},S.getFwdBufferInfo=function(j,A){var Y=this.config,z=this.getLoadPosition();if(!Object(k.isFiniteNumber)(z))return null;var O=T.BufferHelper.bufferInfo(j,z,Y.maxBufferHole);if(O.len===0&&O.nextStart!==void 0){var H=this.fragmentTracker.getBufferedFrag(z,A);if(H&&O.nextStart<H.end)return T.BufferHelper.bufferInfo(j,z,Math.max(O.nextStart,Y.maxBufferHole))}return O},S.getMaxBufferLength=function(j){var A=this.config,Y;return j?Y=Math.max(8*A.maxBufferSize/j,A.maxBufferLength):Y=A.maxBufferLength,Math.min(Y,A.maxMaxBufferLength)},S.reduceMaxBufferLength=function(j){var A=this.config,Y=j||A.maxBufferLength;return A.maxMaxBufferLength>=Y?(A.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+A.maxMaxBufferLength+"s"),!0):!1},S.getNextFragment=function(j,A){var Y,z,O=A.fragments,H=O.length;if(!H)return null;var U=this.config,L=O[0].start,K;if(A.live){var ee=U.initialLiveManifestSize;if(H<ee)return this.warn("Not enough fragments to start playback (have: "+H+", need: "+ee+")"),null;!A.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(K=this.getInitialLiveFragment(A,O),this.startPosition=K?this.hls.liveSyncPosition||K.start:j)}else j<=L&&(K=O[0]);if(!K){var oe=U.lowLatencyMode?A.partEnd:A.fragmentEnd;K=this.getFragmentAtPosition(j,oe,A)}return(Y=K)!==null&&Y!==void 0&&Y.initSegment&&!((z=K)!==null&&z!==void 0&&z.initSegment.data)&&!this.bitrateTest&&(K=K.initSegment),K},S.getNextPart=function(j,A,Y){for(var z=-1,O=!1,H=!0,U=0,L=j.length;U<L;U++){var K=j[U];if(H=H&&!K.independent,z>-1&&Y<K.start)break;var ee=K.loaded;!ee&&(O||K.independent||H)&&K.fragment===A&&(z=U),O=ee}return z},S.loadedEndOfParts=function(j,A){var Y=j[j.length-1];return Y&&A>Y.start&&Y.loaded},S.getInitialLiveFragment=function(j,A){var Y=this.fragPrevious,z=null;if(Y){if(j.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+Y.programDateTime),z=Object(n.findFragmentByPDT)(A,Y.endProgramDateTime,this.config.maxFragLookUpTolerance)),!z){var O=Y.sn+1;if(O>=j.startSN&&O<=j.endSN){var H=A[O-j.startSN];Y.cc===H.cc&&(z=H,this.log("Live playlist, switching playlist, load frag with next SN: "+z.sn))}z||(z=Object(n.findFragWithCC)(A,Y.cc),z&&this.log("Live playlist, switching playlist, load frag with same CC: "+z.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(z=this.getFragmentAtPosition(U,this.bitrateTest?j.fragmentEnd:j.edge,j))}return z},S.getFragmentAtPosition=function(j,A,Y){var z=this.config,O=this.fragPrevious,H=Y.fragments,U=Y.endSN,L=Y.fragmentHint,K=z.maxFragLookUpTolerance,ee=!!(z.lowLatencyMode&&Y.partList&&L);ee&&L&&!this.bitrateTest&&(H=H.concat(L),U=L.sn);var oe;if(j<A){var ae=j>A-K?0:K;oe=Object(n.findFragmentByPTS)(O,H,j,ae)}else oe=H[H.length-1];if(oe){var be=oe.sn-Y.startSN,_e=O&&oe.level===O.level,fe=H[be+1],Re=this.fragmentTracker.getState(oe);if(Re===m.FragmentState.BACKTRACKED){oe=null;for(var Ce=be;H[Ce]&&this.fragmentTracker.getState(H[Ce])===m.FragmentState.BACKTRACKED;)O?oe=H[Ce--]:oe=H[--Ce];oe||(oe=fe)}else O&&oe.sn===O.sn&&!ee&&(_e&&(oe.sn<U&&this.fragmentTracker.getState(fe)!==m.FragmentState.OK?(this.log("SN "+oe.sn+" just loaded, load next one: "+fe.sn),oe=fe):oe=null))}return oe},S.synchronizeToLiveEdge=function(j){var A=this.config,Y=this.media;if(!Y)return;var z=this.hls.liveSyncPosition,O=Y.currentTime,H=j.fragments[0].start,U=j.edge,L=O>=H-A.maxFragLookUpTolerance&&O<=U;if(z!==null&&Y.duration>z&&(O<z||!L)){var K=A.liveMaxLatencyDuration!==void 0?A.liveMaxLatencyDuration:A.liveMaxLatencyDurationCount*j.targetduration;(!L&&Y.readyState<4||O<U-K)&&(this.loadedmetadata||(this.nextLoadPosition=z),Y.readyState&&(this.warn("Playback: "+O.toFixed(3)+" is located too far from the end of live sliding playlist: "+U+", reset currentTime to : "+z.toFixed(3)),Y.currentTime=z))}},S.alignPlaylists=function(j,A){var Y=this.levels,z=this.levelLastLoaded,O=this.fragPrevious,H=z!==null?Y[z]:null,U=j.fragments.length;if(!U)return this.warn("No fragments in live playlist"),0;var L=j.fragments[0].start,K=!A,ee=j.alignedSliding&&Object(k.isFiniteNumber)(L);if(K||!ee&&!L){Object(i.alignStream)(O,H,j);var oe=j.fragments[0].start;return this.log("Live playlist sliding: "+oe.toFixed(2)+" start-sn: "+(A?A.startSN:"na")+"->"+j.startSN+" prev-sn: "+(O?O.sn:"na")+" fragments: "+U),oe}return L},S.waitForCdnTuneIn=function(j){var A=3;return j.live&&j.canBlockReload&&j.tuneInGoal>Math.max(j.partHoldBack,j.partTarget*A)},S.setStartPosition=function(j,A){var Y=this.startPosition;if(Y<A&&(Y=-1),Y===-1||this.lastCurrentTime===-1){var z=j.startTimeOffset;Object(k.isFiniteNumber)(z)?(Y=A+z,z<0&&(Y+=j.totalduration),Y=Math.min(Math.max(A,Y),A+j.totalduration),this.log("Start time offset "+z+" found in playlist, adjust startPosition to "+Y),this.startPosition=Y):j.live?Y=this.hls.liveSyncPosition||A:this.startPosition=Y=0,this.lastCurrentTime=Y}this.nextLoadPosition=Y},S.getLoadPosition=function(){var j=this.media,A=0;return this.loadedmetadata&&j?A=j.currentTime:this.nextLoadPosition&&(A=this.nextLoadPosition),A},S.handleFragLoadAborted=function(j,A){this.transmuxer&&j.sn!=="initSegment"&&j.stats.aborted&&(this.warn("Fragment "+j.sn+(A?" part"+A.index:"")+" of level "+j.level+" was aborted"),this.resetFragmentLoading(j))},S.resetFragmentLoading=function(j){(!this.fragCurrent||!this.fragContextChanged(j))&&(this.state=R.IDLE)},S.onFragmentOrKeyLoadError=function(j,A){if(A.fatal)return;var Y=A.frag;if(!Y||Y.type!==j)return;var z=this.fragCurrent;console.assert(z&&Y.sn===z.sn&&Y.level===z.level&&Y.urlId===z.urlId,"Frag load error must match current frag to retry");var O=this.config;if(this.fragLoadError+1<=O.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(Y.level))return;var H=Math.min(Math.pow(2,this.fragLoadError)*O.fragLoadingRetryDelay,O.fragLoadingMaxRetryTimeout);this.warn("Fragment "+Y.sn+" of "+j+" "+Y.level+" failed to load, retrying in "+H+"ms"),this.retryDate=self.performance.now()+H,this.fragLoadError++,this.state=R.FRAG_LOADING_WAITING_RETRY}else A.levelRetry?(j===o.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=R.IDLE):(_.logger.error(A.details+" reaches max retry, redispatch as fatal ..."),A.fatal=!0,this.hls.stopLoad(),this.state=R.ERROR)},S.afterBufferFlushed=function(j,A,Y){if(!j)return;var z=T.BufferHelper.getBuffered(j);this.fragmentTracker.detectEvictedFragments(A,z,Y),this.state===R.ENDED&&this.resetLoadingState()},S.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=R.IDLE},S.resetLiveStartWhenNotLoaded=function(j){if(!this.loadedmetadata){this.startFragRequested=!1;var A=this.levels?this.levels[j].details:null;if(A!=null&&A.live)return this.startPosition=-1,this.setStartPosition(A,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},S.updateLevelTiming=function(j,A,Y,z){var O=this,H=Y.details;console.assert(!!H,"level.details must be defined");var U=Object.keys(j.elementaryStreams).reduce(function(L,K){var ee=j.elementaryStreams[K];if(ee){var oe=ee.endPTS-ee.startPTS;if(oe<=0)return O.warn("Could not parse fragment "+j.sn+" "+K+" duration reliably ("+oe+") resetting transmuxer to fallback to playlist timing"),O.resetTransmuxer(),L||!1;var ae=z?0:Object(l.updateFragPTSDTS)(H,j,ee.startPTS,ee.endPTS,ee.startDTS,ee.endDTS);return O.hls.trigger(t.Events.LEVEL_PTS_UPDATED,{details:H,level:Y,drift:ae,type:K,frag:j,start:ee.startPTS,end:ee.endPTS}),!0}return L},!1);U?(this.state=R.PARSED,this.hls.trigger(t.Events.FRAG_PARSED,{frag:j,part:A})):this.resetLoadingState()},S.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},E(C,[{key:"state",get:function(){return this._state},set:function(j){var A=this._state;A!==j&&(this._state=j,this.log(A+"->"+j))}}]),C}(b.default)},"./src/controller/buffer-controller.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return n});var k=w("./src/polyfills/number.ts"),b=w("./src/events.ts"),m=w("./src/utils/logger.ts"),T=w("./src/errors.ts"),_=w("./src/utils/buffer-helper.ts"),t=w("./src/utils/mediasource-helper.ts"),h=w("./src/loader/fragment.ts"),r=w("./src/controller/buffer-operation-queue.ts"),c=Object(t.getMediaSource)(),i=/([ha]vc.)(?:\.[^.,]+)+/,n=function(){function l(d){var u=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 o=u.hls,s=u.media,E=u.mediaSource;m.logger.log("[buffer-controller]: Media source opened"),s&&(u.updateMediaElementDuration(),o.trigger(b.Events.MEDIA_ATTACHED,{media:s})),E&&E.removeEventListener("sourceopen",u._onMediaSourceOpen),u.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=d,this._initSourceBuffer(),this.registerListeners()}var f=l.prototype;return f.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},f.destroy=function(){this.unregisterListeners(),this.details=null},f.registerListeners=function(){var u=this.hls;u.on(b.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.on(b.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(b.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(b.Events.BUFFER_RESET,this.onBufferReset,this),u.on(b.Events.BUFFER_APPENDING,this.onBufferAppending,this),u.on(b.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.on(b.Events.BUFFER_EOS,this.onBufferEos,this),u.on(b.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),u.on(b.Events.LEVEL_UPDATED,this.onLevelUpdated,this),u.on(b.Events.FRAG_PARSED,this.onFragParsed,this),u.on(b.Events.FRAG_CHANGED,this.onFragChanged,this)},f.unregisterListeners=function(){var u=this.hls;u.off(b.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.off(b.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(b.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(b.Events.BUFFER_RESET,this.onBufferReset,this),u.off(b.Events.BUFFER_APPENDING,this.onBufferAppending,this),u.off(b.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.off(b.Events.BUFFER_EOS,this.onBufferEos,this),u.off(b.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),u.off(b.Events.LEVEL_UPDATED,this.onLevelUpdated,this),u.off(b.Events.FRAG_PARSED,this.onFragParsed,this),u.off(b.Events.FRAG_CHANGED,this.onFragChanged,this)},f._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new r.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},f.onManifestParsed=function(u,o){var s=2;(o.audio&&!o.video||!o.altAudio)&&(s=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=s,this.details=null,m.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},f.onMediaAttaching=function(u,o){var s=this.media=o.media;if(s&&c){var E=this.mediaSource=new c;E.addEventListener("sourceopen",this._onMediaSourceOpen),E.addEventListener("sourceended",this._onMediaSourceEnded),E.addEventListener("sourceclose",this._onMediaSourceClose),s.src=self.URL.createObjectURL(E),this._objectUrl=s.src}},f.onMediaDetaching=function(){var u=this.media,o=this.mediaSource,s=this._objectUrl;if(o){if(m.logger.log("[buffer-controller]: media source detaching"),o.readyState==="open")try{o.endOfStream()}catch(E){m.logger.warn("[buffer-controller]: onMediaDetaching: "+E.message+" while calling endOfStream")}this.onBufferReset(),o.removeEventListener("sourceopen",this._onMediaSourceOpen),o.removeEventListener("sourceended",this._onMediaSourceEnded),o.removeEventListener("sourceclose",this._onMediaSourceClose),u&&(s&&self.URL.revokeObjectURL(s),u.src===s?(u.removeAttribute("src"),u.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(b.Events.MEDIA_DETACHED,void 0)},f.onBufferReset=function(){var u=this;this.getSourceBufferTypes().forEach(function(o){var s=u.sourceBuffer[o];try{s&&(u.removeBufferListeners(o),u.mediaSource&&u.mediaSource.removeSourceBuffer(s),u.sourceBuffer[o]=void 0)}catch(E){m.logger.warn("[buffer-controller]: Failed to reset the "+o+" buffer",E)}}),this._initSourceBuffer()},f.onBufferCodecs=function(u,o){var s=this,E=this.getSourceBufferTypes().length;if(Object.keys(o).forEach(function(v){if(E){var p=s.tracks[v];if(p&&typeof p.buffer.changeType=="function"){var I=o[v],R=I.codec,y=I.levelCodec,x=I.container,C=(p.levelCodec||p.codec).replace(i,"$1"),S=(y||R).replace(i,"$1");if(C!==S){var F=x+";codecs="+(y||R);s.appendChangeType(v,F)}}}else s.pendingTracks[v]=o[v]}),E)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},f.appendChangeType=function(u,o){var s=this,E=this.operationQueue,v={execute:function(){var I=s.sourceBuffer[u];I&&(m.logger.log("[buffer-controller]: changing "+u+" sourceBuffer type to "+o),I.changeType(o)),E.shiftAndExecuteNext(u)},onStart:function(){},onComplete:function(){},onError:function(I){m.logger.warn("[buffer-controller]: Failed to change "+u+" SourceBuffer type",I)}};E.append(v,u)},f.onBufferAppending=function(u,o){var s=this,E=this.hls,v=this.operationQueue,p=this.tracks,I=o.data,R=o.type,y=o.frag,x=o.part,C=o.chunkMeta,S=C.buffering[R],F=self.performance.now();S.start=F;var j=y.stats.buffering,A=x?x.stats.buffering:null;j.start===0&&(j.start=F),A&&A.start===0&&(A.start=F);var Y=p.audio,z=R==="audio"&&C.id===1&&(Y==null?void 0:Y.container)==="audio/mpeg",O={execute:function(){if(S.executeStart=self.performance.now(),z){var U=s.sourceBuffer[R];if(U){var L=y.start-U.timestampOffset;Math.abs(L)>=.1&&(m.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+y.start+" (delta: "+L+") sn: "+y.sn+")"),U.timestampOffset=y.start)}}s.appendExecutor(I,R)},onStart:function(){},onComplete:function(){var U=self.performance.now();S.executeEnd=S.end=U,j.first===0&&(j.first=U),A&&A.first===0&&(A.first=U);var L=s.sourceBuffer,K={};for(var ee in L)K[ee]=_.BufferHelper.getBuffered(L[ee]);s.appendError=0,s.hls.trigger(b.Events.BUFFER_APPENDED,{type:R,frag:y,part:x,chunkMeta:C,parent:y.type,timeRanges:K})},onError:function(U){m.logger.error("[buffer-controller]: Error encountered while trying to append to the "+R+" SourceBuffer",U);var L={type:T.ErrorTypes.MEDIA_ERROR,parent:y.type,details:T.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?L.details=T.ErrorDetails.BUFFER_FULL_ERROR:(s.appendError++,L.details=T.ErrorDetails.BUFFER_APPEND_ERROR,s.appendError>E.config.appendErrorMaxRetry&&(m.logger.error("[buffer-controller]: Failed "+E.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),L.fatal=!0)),E.trigger(b.Events.ERROR,L)}};v.append(O,R)},f.onBufferFlushing=function(u,o){var s=this,E=this.operationQueue,v=function(I){return{execute:s.removeExecutor.bind(s,I,o.startOffset,o.endOffset),onStart:function(){},onComplete:function(){s.hls.trigger(b.Events.BUFFER_FLUSHED,{type:I})},onError:function(y){m.logger.warn("[buffer-controller]: Failed to remove from "+I+" SourceBuffer",y)}}};o.type?E.append(v(o.type),o.type):this.getSourceBufferTypes().forEach(function(p){E.append(v(p),p)})},f.onFragParsed=function(u,o){var s=this,E=o.frag,v=o.part,p=[],I=v?v.elementaryStreams:E.elementaryStreams;I[h.ElementaryStreamTypes.AUDIOVIDEO]?p.push("audiovideo"):(I[h.ElementaryStreamTypes.AUDIO]&&p.push("audio"),I[h.ElementaryStreamTypes.VIDEO]&&p.push("video"));var R=function(){var x=self.performance.now();E.stats.buffering.end=x,v&&(v.stats.buffering.end=x);var C=v?v.stats:E.stats;s.hls.trigger(b.Events.FRAG_BUFFERED,{frag:E,part:v,stats:C,id:E.type})};p.length===0&&m.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+E.type+" level: "+E.level+" sn: "+E.sn),this.blockBuffers(R,p)},f.onFragChanged=function(u,o){this.flushBackBuffer()},f.onBufferEos=function(u,o){var s=this,E=this.getSourceBufferTypes().reduce(function(v,p){var I=s.sourceBuffer[p];return(!o.type||o.type===p)&&(I&&!I.ended&&(I.ended=!0,m.logger.log("[buffer-controller]: "+p+" sourceBuffer now EOS"))),v&&!!(!I||I.ended)},!0);E&&this.blockBuffers(function(){var v=s.mediaSource;if(!v||v.readyState!=="open")return;v.endOfStream()})},f.onLevelUpdated=function(u,o){var s=o.details;if(!s.fragments.length)return;this.details=s,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},f.flushBackBuffer=function(){var u=this.hls,o=this.details,s=this.media,E=this.sourceBuffer;if(!s||o===null)return;var v=this.getSourceBufferTypes();if(!v.length)return;var p=o.live&&u.config.liveBackBufferLength!==null?u.config.liveBackBufferLength:u.config.backBufferLength;if(!Object(k.isFiniteNumber)(p)||p<0)return;var I=s.currentTime,R=o.levelTargetDuration,y=Math.max(p,R),x=Math.floor(I/R)*R-y;v.forEach(function(C){var S=E[C];if(S){var F=_.BufferHelper.getBuffered(S);F.length>0&&x>F.start(0)&&(u.trigger(b.Events.BACK_BUFFER_REACHED,{bufferEnd:x}),o.live&&u.trigger(b.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:x}),u.trigger(b.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:x,type:C}))}})},f.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var u=this.details,o=this.hls,s=this.media,E=this.mediaSource,v=u.fragments[0].start+u.totalduration,p=s.duration,I=Object(k.isFiniteNumber)(E.duration)?E.duration:0;u.live&&o.config.liveDurationInfinity?(m.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),E.duration=Infinity,this.updateSeekableRange(u)):(v>I&&v>p||!Object(k.isFiniteNumber)(p))&&(m.logger.log("[buffer-controller]: Updating Media Source duration to "+v.toFixed(3)),E.duration=v)},f.updateSeekableRange=function(u){var o=this.mediaSource,s=u.fragments,E=s.length;if(E&&u.live&&o!==null&&o!==void 0&&o.setLiveSeekableRange){var v=Math.max(0,s[0].start),p=Math.max(v,v+u.totalduration);o.setLiveSeekableRange(v,p)}},f.checkPendingTracks=function(){var u=this.bufferCodecEventsExpected,o=this.operationQueue,s=this.pendingTracks,E=Object.keys(s).length;if(E&&!u||E===2){this.createSourceBuffers(s),this.pendingTracks={};var v=this.getSourceBufferTypes();if(v.length===0){this.hls.trigger(b.Events.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}v.forEach(function(p){o.executeNext(p)})}},f.createSourceBuffers=function(u){var o=this.sourceBuffer,s=this.mediaSource;if(!s)throw Error("createSourceBuffers called when mediaSource was null");var E=0;for(var v in u)if(!o[v]){var p=u[v];if(!p)throw Error("source buffer exists for track "+v+", however track does not");var I=p.levelCodec||p.codec,R=p.container+";codecs="+I;m.logger.log("[buffer-controller]: creating sourceBuffer("+R+")");try{var y=o[v]=s.addSourceBuffer(R),x=v;this.addBufferListener(x,"updatestart",this._onSBUpdateStart),this.addBufferListener(x,"updateend",this._onSBUpdateEnd),this.addBufferListener(x,"error",this._onSBUpdateError),this.tracks[v]={buffer:y,codec:I,container:p.container,levelCodec:p.levelCodec,id:p.id},E++}catch(C){m.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+C.message),this.hls.trigger(b.Events.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:C,mimeType:R})}}E&&this.hls.trigger(b.Events.BUFFER_CREATED,{tracks:this.tracks})},f._onSBUpdateStart=function(u){var o=this.operationQueue,s=o.current(u);s.onStart()},f._onSBUpdateEnd=function(u){var o=this.operationQueue,s=o.current(u);s.onComplete(),o.shiftAndExecuteNext(u)},f._onSBUpdateError=function(u,o){m.logger.error("[buffer-controller]: "+u+" SourceBuffer error",o),this.hls.trigger(b.Events.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var s=this.operationQueue.current(u);s&&s.onError(o)},f.removeExecutor=function(u,o,s){var E=this.media,v=this.mediaSource,p=this.operationQueue,I=this.sourceBuffer,R=I[u];if(!E||!v||!R){m.logger.warn("[buffer-controller]: Attempting to remove from the "+u+" SourceBuffer, but it does not exist"),p.shiftAndExecuteNext(u);return}var y=Object(k.isFiniteNumber)(E.duration)?E.duration:Infinity,x=Object(k.isFiniteNumber)(v.duration)?v.duration:Infinity,C=Math.max(0,o),S=Math.min(s,y,x);S>C?(m.logger.log("[buffer-controller]: Removing ["+C+","+S+"] from the "+u+" SourceBuffer"),console.assert(!R.updating,u+" sourceBuffer must not be updating"),R.remove(C,S)):p.shiftAndExecuteNext(u)},f.appendExecutor=function(u,o){var s=this.operationQueue,E=this.sourceBuffer,v=E[o];if(!v){m.logger.warn("[buffer-controller]: Attempting to append to the "+o+" SourceBuffer, but it does not exist"),s.shiftAndExecuteNext(o);return}v.ended=!1,console.assert(!v.updating,o+" sourceBuffer must not be updating"),v.appendBuffer(u)},f.blockBuffers=function(u,o){var s=this;if(o===void 0&&(o=this.getSourceBufferTypes()),!o.length){m.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(u);return}var E=this.operationQueue,v=o.map(function(p){return E.appendBlocker(p)});Promise.all(v).then(function(){u(),o.forEach(function(p){var I=s.sourceBuffer[p];(!I||!I.updating)&&E.shiftAndExecuteNext(p)})})},f.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},f.addBufferListener=function(u,o,s){var E=this.sourceBuffer[u];if(!E)return;var v=s.bind(this,u);this.listeners[u].push({event:o,listener:v}),E.addEventListener(o,v)},f.removeBufferListeners=function(u){var o=this.sourceBuffer[u];if(!o)return;this.listeners[u].forEach(function(s){o.removeEventListener(s.event,s.listener)})},l}()},"./src/controller/buffer-operation-queue.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return b});var k=w("./src/utils/logger.ts"),b=function(){function m(_){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=_}var T=m.prototype;return T.append=function(t,h){var r=this.queues[h];r.push(t),r.length===1&&this.buffers[h]&&this.executeNext(h)},T.insertAbort=function(t,h){var r=this.queues[h];r.unshift(t),this.executeNext(h)},T.appendBlocker=function(t){var h,r=new Promise(function(i){h=i}),c={execute:h,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(c,t),r},T.executeNext=function(t){var h=this.buffers,r=this.queues,c=h[t],i=r[t];if(i.length){var n=i[0];try{n.execute()}catch(l){k.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),n.onError(l),(!c||!c.updating)&&(i.shift(),this.executeNext(t))}}},T.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},T.current=function(t){return this.queues[t][0]},m}()},"./src/controller/cap-level-controller.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/events.ts");function b(_,t){for(var h=0;h<t.length;h++){var r=t[h];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(_,r.key,r)}}function m(_,t,h){return t&&b(_.prototype,t),h&&b(_,h),_}var T=function(){function _(h){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=h,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(r){this.streamController=r},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 r=this.hls;r.on(k.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.on(k.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(k.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(k.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.on(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.unregisterListener=function(){var r=this.hls;r.off(k.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.off(k.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(k.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(k.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.off(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.onFpsDropLevelCapping=function(r,c){_.isLevelAllowed(c.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(c.droppedLevel)},t.onMediaAttaching=function(r,c){this.media=c.media instanceof HTMLVideoElement?c.media:null},t.onManifestParsed=function(r,c){var i=this.hls;this.restrictedLevels=[],this.firstLevel=c.firstLevel,i.config.capLevelToPlayerSize&&c.video&&this.startCapping()},t.onBufferCodecs=function(r,c){var i=this.hls;i.config.capLevelToPlayerSize&&c.video&&this.startCapping()},t.onMediaDetaching=function(){this.stopCapping()},t.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var r=this.hls.levels;if(r.length){var c=this.hls;c.autoLevelCapping=this.getMaxLevel(r.length-1),c.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=c.autoLevelCapping}}},t.getMaxLevel=function(r){var c=this,i=this.hls.levels;if(!i.length)return-1;var n=i.filter(function(l,f){return _.isLevelAllowed(f,c.restrictedLevels)&&f<=r});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 r=this.media,c={width:0,height:0};if(r){var i=r.getBoundingClientRect();c.width=i.width,c.height=i.height,!c.width&&!c.height&&(c.width=i.right-i.left||r.width||0,c.height=i.bottom-i.top||r.height||0)}return this.clientRect=c,c},_.isLevelAllowed=function(r,c){return c===void 0&&(c=[]),c.indexOf(r)===-1},_.getMaxLevelByMediaSize=function(r,c,i){if(!r||!r.length)return-1;for(var n=function(o,s){return s?o.width!==s.width||o.height!==s.height:!0},l=r.length-1,f=0;f<r.length;f+=1){var d=r[f];if((d.width>=c||d.height>=i)&&n(d,r[f+1])){l=f;break}}return l},m(_,[{key:"mediaWidth",get:function(){return this.getDimensions().width*_.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*_.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var r=1;try{r=self.devicePixelRatio}catch(c){}return r}}]),_}();g.default=T},"./src/controller/cmcd-controller.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return n});var k=w("./src/events.ts"),b=w("./src/types/cmcd.ts"),m=w("./src/utils/buffer-helper.ts"),T=w("./src/utils/logger.ts");function _(l,f){for(var d=0;d<f.length;d++){var u=f[d];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(l,u.key,u)}}function t(l,f,d){return f&&_(l.prototype,f),d&&_(l,d),l}function h(l,f){var d=typeof Symbol!="undefined"&&l[Symbol.iterator]||l["@@iterator"];if(d)return(d=d.call(l)).next.bind(d);if(Array.isArray(l)||(d=r(l))||f&&l&&typeof l.length=="number"){d&&(l=d);var u=0;return function(){return u>=l.length?{done:!0}:{done:!1,value:l[u++]}}}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 r(l,f){if(!l)return;if(typeof l=="string")return c(l,f);var d=Object.prototype.toString.call(l).slice(8,-1);if(d==="Object"&&l.constructor&&(d=l.constructor.name),d==="Map"||d==="Set")return Array.from(l);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return c(l,f)}function c(l,f){(f==null||f>l.length)&&(f=l.length);for(var d=0,u=new Array(f);d<f;d++)u[d]=l[d];return u}function i(){return i=Object.assign||function(l){for(var f=1;f<arguments.length;f++){var d=arguments[f];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(l[u]=d[u])}return l},i.apply(this,arguments)}var n=function(){function l(d){var u=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(){u.initialized&&(u.starved=!0),u.buffering=!0},this.onPlaying=function(){u.initialized||(u.initialized=!0),u.buffering=!1},this.applyPlaylistData=function(E){try{u.apply(E,{ot:b.CMCDObjectType.MANIFEST,su:!u.initialized})}catch(v){T.logger.warn("Could not generate manifest CMCD data.",v)}},this.applyFragmentData=function(E){try{var v=E.frag,p=u.hls.levels[v.level],I=u.getObjectType(v),R={d:v.duration*1e3,ot:I};(I===b.CMCDObjectType.VIDEO||I===b.CMCDObjectType.AUDIO||I==b.CMCDObjectType.MUXED)&&(R.br=p.bitrate/1e3,R.tb=u.getTopBandwidth(I),R.bl=u.getBufferLength(I)),u.apply(E,R)}catch(y){T.logger.warn("Could not generate segment CMCD data.",y)}},this.hls=d;var o=this.config=d.config,s=o.cmcd;s!=null&&(o.pLoader=this.createPlaylistLoader(),o.fLoader=this.createFragmentLoader(),this.sid=s.sessionId||l.uuid(),this.cid=s.contentId,this.useHeaders=s.useHeaders===!0,this.registerListeners())}var f=l.prototype;return f.registerListeners=function(){var u=this.hls;u.on(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(k.Events.MEDIA_DETACHED,this.onMediaDetached,this),u.on(k.Events.BUFFER_CREATED,this.onBufferCreated,this)},f.unregisterListeners=function(){var u=this.hls;u.off(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(k.Events.MEDIA_DETACHED,this.onMediaDetached,this),u.off(k.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},f.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},f.onMediaAttached=function(u,o){this.media=o.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},f.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},f.onBufferCreated=function(u,o){var s,E;this.audioBuffer=(s=o.tracks.audio)===null||s===void 0?void 0:s.buffer,this.videoBuffer=(E=o.tracks.video)===null||E===void 0?void 0:E.buffer},f.createData=function(){var u;return{v:b.CMCDVersion,sf:b.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(u=this.media)===null||u===void 0?void 0:u.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},f.apply=function(u,o){o===void 0&&(o={}),i(o,this.createData());var s=o.ot===b.CMCDObjectType.INIT||o.ot===b.CMCDObjectType.VIDEO||o.ot===b.CMCDObjectType.MUXED;if(this.starved&&s&&(o.bs=!0,o.su=!0,this.starved=!1),o.su==null&&(o.su=this.buffering),this.useHeaders){var E=l.toHeaders(o);if(!Object.keys(E).length)return;u.headers||(u.headers={}),i(u.headers,E)}else{var v=l.toQuery(o);if(!v)return;u.url=l.appendQueryToUri(u.url,v)}},f.getObjectType=function(u){var o=u.type;return o==="subtitle"?b.CMCDObjectType.TIMED_TEXT:u.sn==="initSegment"?b.CMCDObjectType.INIT:o==="audio"?b.CMCDObjectType.AUDIO:o==="main"?this.hls.audioTracks.length?b.CMCDObjectType.VIDEO:b.CMCDObjectType.MUXED:void 0},f.getTopBandwidth=function(u){for(var o=0,s=u===b.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,E=h(s),v;!(v=E()).done;){var p=v.value;p.bitrate>o&&(o=p.bitrate)}return o>0?o:NaN},f.getBufferLength=function(u){var o=this.hls.media,s=u===b.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!s||!o)return NaN;var E=m.BufferHelper.bufferInfo(s,o.currentTime,this.config.maxBufferHole);return E.len*1e3},f.createPlaylistLoader=function(){var u=this.config.pLoader,o=this.applyPlaylistData,s=u||this.config.loader;return function(){function E(p){this.loader=void 0,this.loader=new s(p)}var v=E.prototype;return v.destroy=function(){this.loader.destroy()},v.abort=function(){this.loader.abort()},v.load=function(I,R,y){o(I),this.loader.load(I,R,y)},t(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},f.createFragmentLoader=function(){var u=this.config.fLoader,o=this.applyFragmentData,s=u||this.config.loader;return function(){function E(p){this.loader=void 0,this.loader=new s(p)}var v=E.prototype;return v.destroy=function(){this.loader.destroy()},v.abort=function(){this.loader.abort()},v.load=function(I,R,y){o(I),this.loader.load(I,R,y)},t(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},l.uuid=function(){var u=URL.createObjectURL(new Blob),o=u.toString();return URL.revokeObjectURL(u),o.substr(o.lastIndexOf("/")+1)},l.serialize=function(u){for(var o=[],s=function(z){return!Number.isNaN(z)&&z!=null&&z!==""&&z!==!1},E=function(z){return Math.round(z)},v=function(z){return E(z/100)*100},p=function(z){return encodeURIComponent(z)},I={br:E,d:E,bl:v,dl:v,mtp:v,nor:p,rtp:v,tb:E},R=Object.keys(u||{}).sort(),y=h(R),x;!(x=y()).done;){var C=x.value,S=u[C];if(!s(S))continue;if(C==="v"&&S===1)continue;if(C=="pr"&&S===1)continue;var F=I[C];F&&(S=F(S));var j=typeof S,A=void 0;C==="ot"||C==="sf"||C==="st"?A=C+"="+S:j==="boolean"?A=C:j==="number"?A=C+"="+S:A=C+"="+JSON.stringify(S),o.push(A)}return o.join(",")},l.toHeaders=function(u){for(var o=Object.keys(u),s={},E=["Object","Request","Session","Status"],v=[{},{},{},{}],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},I=0,R=o;I<R.length;I++){var y=R[I],x=p[y]!=null?p[y]:1;v[x][y]=u[y]}for(var C=0;C<v.length;C++){var S=l.serialize(v[C]);S&&(s["CMCD-"+E[C]]=S)}return s},l.toQuery=function(u){return"CMCD="+encodeURIComponent(l.serialize(u))},l.appendQueryToUri=function(u,o){if(!o)return u;var s=u.includes("?")?"&":"?";return""+u+s+o},l}()},"./src/controller/eme-controller.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/events.ts"),b=w("./src/errors.ts"),m=w("./src/utils/logger.ts"),T=w("./src/utils/mediakeys-helper.ts");function _(n,l){for(var f=0;f<l.length;f++){var d=l[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(n,d.key,d)}}function t(n,l,f){return l&&_(n.prototype,l),f&&_(n,f),n}var h=3,r=function(l,f,d){var u={audioCapabilities:[],videoCapabilities:[]};return l.forEach(function(o){u.audioCapabilities.push({contentType:'audio/mp4; codecs="'+o+'"',robustness:d.audioRobustness||""})}),f.forEach(function(o){u.videoCapabilities.push({contentType:'video/mp4; codecs="'+o+'"',robustness:d.videoRobustness||""})}),[u]},c=function(l,f,d,u){switch(l){case T.KeySystems.WIDEVINE:return r(f,d,u);default:throw new Error("Unknown key-system: "+l)}},i=function(){function n(f){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=f,this._config=f.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 l=n.prototype;return l.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},l._registerListeners=function(){this.hls.on(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(k.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(k.Events.MANIFEST_PARSED,this.onManifestParsed,this)},l._unregisterListeners=function(){this.hls.off(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(k.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(k.Events.MANIFEST_PARSED,this.onManifestParsed,this)},l.getLicenseServerUrl=function(d){switch(d){case T.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+d+'"')},l._attemptKeySystemAccess=function(d,u,o){var s=this,E=c(d,u,o,this._drmSystemOptions);m.logger.log("Requesting encrypted media key-system access");var v=this.requestMediaKeySystemAccess(d,E);this.mediaKeysPromise=v.then(function(p){return s._onMediaKeySystemAccessObtained(d,p)}),v.catch(function(p){m.logger.error('Failed to obtain key-system "'+d+'" access:',p)})},l._onMediaKeySystemAccessObtained=function(d,u){var o=this;m.logger.log('Access for key-system "'+d+'" obtained');var s={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:u,mediaKeySystemDomain:d};this._mediaKeysList.push(s);var E=Promise.resolve().then(function(){return u.createMediaKeys()}).then(function(v){return s.mediaKeys=v,m.logger.log('Media-keys created for key-system "'+d+'"'),o._onMediaKeysCreated(),v});return E.catch(function(v){m.logger.error("Failed to create media-keys:",v)}),E},l._onMediaKeysCreated=function(){var d=this;this._mediaKeysList.forEach(function(u){u.mediaKeysSession||(u.mediaKeysSession=u.mediaKeys.createSession(),d._onNewMediaKeySession(u.mediaKeysSession))})},l._onNewMediaKeySession=function(d){var u=this;m.logger.log("New key-system session "+d.sessionId),d.addEventListener("message",function(o){u._onKeySessionMessage(d,o.message)},!1)},l._onKeySessionMessage=function(d,u){m.logger.log("Got EME message event, creating license request"),this._requestLicense(u,function(o){m.logger.log("Received license data (length: "+(o&&o.byteLength)+"), updating key-session"),d.update(o)})},l.onMediaEncrypted=function(d){var u=this;if(m.logger.log('Media is encrypted using "'+d.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(k.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var o=function(E){if(!u._media)return;u._attemptSetMediaKeys(E),u._generateRequestWithPreferredKeySession(d.initDataType,d.initData)};this.mediaKeysPromise.then(o).catch(o)},l._attemptSetMediaKeys=function(d){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var u=this._mediaKeysList[0];if(!u||!u.mediaKeys){m.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(k.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}m.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(u.mediaKeys),this._hasSetMediaKeys=!0}},l._generateRequestWithPreferredKeySession=function(d,u){var o=this,s=this._mediaKeysList[0];if(!s){m.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(k.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(s.mediaKeysSessionInitialized){m.logger.warn("Key-Session already initialized but requested again");return}var E=s.mediaKeysSession;if(!E){m.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(k.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!u){m.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(k.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}m.logger.log('Generating key-session request for "'+d+'" init data type'),s.mediaKeysSessionInitialized=!0,E.generateRequest(d,u).then(function(){m.logger.debug("Key-session generation succeeded")}).catch(function(v){m.logger.error("Error generating key-session request:",v),o.hls.trigger(k.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},l._createLicenseXhr=function(d,u,o){var s=new XMLHttpRequest;s.responseType="arraybuffer",s.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,s,d,u,o);var E=this._licenseXhrSetup;if(E)try{E.call(this.hls,s,d),E=void 0}catch(v){m.logger.error(v)}try{s.readyState||s.open("POST",d,!0),E&&E.call(this.hls,s,d)}catch(v){throw new Error("issue setting up KeySystem license XHR "+v)}return s},l._onLicenseRequestReadyStageChange=function(d,u,o,s){switch(d.readyState){case 4:if(d.status===200){this._requestLicenseFailureCount=0,m.logger.log("License request succeeded");var E=d.response,v=this._licenseResponseCallback;if(v)try{E=v.call(this.hls,d,u)}catch(I){m.logger.error(I)}s(E)}else{if(m.logger.error("License Request XHR failed ("+u+"). Status: "+d.status+" ("+d.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>h){this.hls.trigger(k.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var p=h-this._requestLicenseFailureCount+1;m.logger.warn("Retrying license request, "+p+" attempts left"),this._requestLicense(o,s)}break}},l._generateLicenseRequestChallenge=function(d,u){switch(d.mediaKeySystemDomain){case T.KeySystems.WIDEVINE:return u}throw new Error("unsupported key-system: "+d.mediaKeySystemDomain)},l._requestLicense=function(d,u){m.logger.log("Requesting content license for key-system");var o=this._mediaKeysList[0];if(!o){m.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(k.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var s=this.getLicenseServerUrl(o.mediaKeySystemDomain),E=this._createLicenseXhr(s,d,u);m.logger.log("Sending license request to URL: "+s);var v=this._generateLicenseRequestChallenge(o,d);E.send(v)}catch(p){m.logger.error("Failure requesting DRM license: "+p),this.hls.trigger(k.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},l.onMediaAttached=function(d,u){if(!this._emeEnabled)return;var o=u.media;this._media=o,o.addEventListener("encrypted",this._onMediaEncrypted)},l.onMediaDetached=function(){var d=this._media,u=this._mediaKeysList;if(!d)return;d.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(u.map(function(o){if(o.mediaKeysSession)return o.mediaKeysSession.close().catch(function(){})})).then(function(){return d.setMediaKeys(null)}).catch(function(){})},l.onManifestParsed=function(d,u){if(!this._emeEnabled)return;var o=u.levels.map(function(E){return E.audioCodec}).filter(function(E){return!!E}),s=u.levels.map(function(E){return E.videoCodec}).filter(function(E){return!!E});this._attemptKeySystemAccess(T.KeySystems.WIDEVINE,o,s)},t(n,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),n}();g.default=i},"./src/controller/fps-controller.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/events.ts"),b=w("./src/utils/logger.ts"),m=function(){function T(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 _=T.prototype;return _.setStreamController=function(h){this.streamController=h},_.registerListeners=function(){this.hls.on(k.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},_.unregisterListeners=function(){this.hls.off(k.Events.MEDIA_ATTACHING,this.onMediaAttaching)},_.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},_.onMediaAttaching=function(h,r){var c=this.hls.config;if(c.capLevelOnFPSDrop){var i=r.media instanceof self.HTMLVideoElement?r.media:null;this.media=i,i&&typeof i.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),c.fpsDroppedMonitoringPeriod)}},_.checkFPS=function(h,r,c){var i=performance.now();if(r){if(this.lastTime){var n=i-this.lastTime,l=c-this.lastDroppedFrames,f=r-this.lastDecodedFrames,d=1e3*l/n,u=this.hls;if(u.trigger(k.Events.FPS_DROP,{currentDropped:l,currentDecoded:f,totalDroppedFrames:c}),d>0&&l>u.config.fpsDroppedMonitoringThreshold*f){var o=u.currentLevel;b.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+o),o>0&&(u.autoLevelCapping===-1||u.autoLevelCapping>=o)&&(o=o-1,u.trigger(k.Events.FPS_DROP_LEVEL_CAPPING,{level:o,droppedLevel:u.currentLevel}),u.autoLevelCapping=o,this.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=c,this.lastDecodedFrames=r}},_.checkFPSInterval=function(){var h=this.media;if(h)if(this.isVideoPlaybackQualityAvailable){var r=h.getVideoPlaybackQuality();this.checkFPS(h,r.totalVideoFrames,r.droppedVideoFrames)}else this.checkFPS(h,h.webkitDecodedFrameCount,h.webkitDroppedFrameCount)},T}();g.default=m},"./src/controller/fragment-finders.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"findFragmentByPDT",function(){return m}),w.d(g,"findFragmentByPTS",function(){return T}),w.d(g,"fragmentWithinToleranceTest",function(){return _}),w.d(g,"pdtWithinToleranceTest",function(){return t}),w.d(g,"findFragWithCC",function(){return h});var k=w("./src/polyfills/number.ts"),b=w("./src/utils/binary-search.ts");function m(r,c,i){if(c===null||!Array.isArray(r)||!r.length||!Object(k.isFiniteNumber)(c))return null;var n=r[0].programDateTime;if(c<(n||0))return null;var l=r[r.length-1].endProgramDateTime;if(c>=(l||0))return null;i=i||0;for(var f=0;f<r.length;++f){var d=r[f];if(t(c,i,d))return d}return null}function T(r,c,i,n){i===void 0&&(i=0),n===void 0&&(n=0);var l=null;if(r?l=c[r.sn-c[0].sn+1]||null:i===0&&c[0].start===0&&(l=c[0]),l&&_(i,n,l)===0)return l;var f=b.default.search(c,_.bind(null,i,n));return f||l}function _(r,c,i){r===void 0&&(r=0),c===void 0&&(c=0);var n=Math.min(c,i.duration+(i.deltaPTS?i.deltaPTS:0));return i.start+i.duration-n<=r?1:i.start-n>r&&i.start?-1:0}function t(r,c,i){var n=Math.min(c,i.duration+(i.deltaPTS?i.deltaPTS:0))*1e3,l=i.endProgramDateTime||0;return l-n>r}function h(r,c){return b.default.search(r,function(i){return i.cc<c?1:i.cc>c?-1:0})}},"./src/controller/fragment-tracker.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"FragmentState",function(){return m}),w.d(g,"FragmentTracker",function(){return T});var k=w("./src/events.ts"),b=w("./src/types/loader.ts"),m;(function(h){h.NOT_LOADED="NOT_LOADED",h.BACKTRACKED="BACKTRACKED",h.APPENDING="APPENDING",h.PARTIAL="PARTIAL",h.OK="OK"})(m||(m={}));var T=function(){function h(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 r=h.prototype;return r._registerListeners=function(){var i=this.hls;i.on(k.Events.BUFFER_APPENDED,this.onBufferAppended,this),i.on(k.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.on(k.Events.FRAG_LOADED,this.onFragLoaded,this)},r._unregisterListeners=function(){var i=this.hls;i.off(k.Events.BUFFER_APPENDED,this.onBufferAppended,this),i.off(k.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.off(k.Events.FRAG_LOADED,this.onFragLoaded,this)},r.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},r.getAppendedFrag=function(i,n){if(n===b.PlaylistLevelType.MAIN){var l=this.activeFragment,f=this.activeParts;if(!l)return null;if(f)for(var d=f.length;d--;){var u=f[d],o=u?u.end:l.appendedPTS;if(u.start<=i&&o!==void 0&&i<=o)return d>9&&(this.activeParts=f.slice(d-9)),u}else if(l.start<=i&&l.appendedPTS!==void 0&&i<=l.appendedPTS)return l}return this.getBufferedFrag(i,n)},r.getBufferedFrag=function(i,n){for(var l=this.fragments,f=Object.keys(l),d=f.length;d--;){var u=l[f[d]];if((u==null?void 0:u.body.type)===n&&u.buffered){var o=u.body;if(o.start<=i&&i<=o.end)return o}}return null},r.detectEvictedFragments=function(i,n,l){var f=this;Object.keys(this.fragments).forEach(function(d){var u=f.fragments[d];if(!u)return;if(!u.buffered){u.body.type===l&&f.removeFragment(u.body);return}var o=u.range[i];if(!o)return;o.time.some(function(s){var E=!f.isTimeBuffered(s.startPTS,s.endPTS,n);return E&&f.removeFragment(u.body),E})})},r.detectPartialFragments=function(i){var n=this,l=this.timeRanges,f=i.frag,d=i.part;if(!l||f.sn==="initSegment")return;var u=t(f),o=this.fragments[u];if(!o)return;Object.keys(l).forEach(function(s){var E=f.elementaryStreams[s];if(!E)return;var v=l[s],p=d!==null||E.partial===!0;o.range[s]=n.getBufferedTimes(f,d,p,v)}),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body)},r.fragBuffered=function(i){var n=t(i),l=this.fragments[n];l&&(l.backtrack=l.loaded=null,l.buffered=!0)},r.getBufferedTimes=function(i,n,l,f){for(var d={time:[],partial:l},u=n?n.start:i.start,o=n?n.end:i.end,s=i.minEndPTS||o,E=i.maxStartPTS||u,v=0;v<f.length;v++){var p=f.start(v)-this.bufferPadding,I=f.end(v)+this.bufferPadding;if(E>=p&&s<=I){d.time.push({startPTS:Math.max(u,f.start(v)),endPTS:Math.min(o,f.end(v))});break}else if(u<I&&o>p)d.partial=!0,d.time.push({startPTS:Math.max(u,f.start(v)),endPTS:Math.min(o,f.end(v))});else if(o<=p)break}return d},r.getPartialFragment=function(i){var n=null,l,f,d,u=0,o=this.bufferPadding,s=this.fragments;return Object.keys(s).forEach(function(E){var v=s[E];if(!v)return;_(v)&&(f=v.body.start-o,d=v.body.end+o,i>=f&&i<=d&&(l=Math.min(i-f,d-i),u<=l&&(n=v.body,u=l)))}),n},r.getState=function(i){var n=t(i),l=this.fragments[n];return l?l.buffered?_(l)?m.PARTIAL:m.OK:l.backtrack?m.BACKTRACKED:m.APPENDING:m.NOT_LOADED},r.backtrack=function(i,n){var l=t(i),f=this.fragments[l];if(!f||f.backtrack)return null;var d=f.backtrack=n||f.loaded;return f.loaded=null,d},r.getBacktrackData=function(i){var n=t(i),l=this.fragments[n];if(l){var f,d=l.backtrack;if(d!=null&&(f=d.payload)!==null&&f!==void 0&&f.byteLength)return d;this.removeFragment(i)}return null},r.isTimeBuffered=function(i,n,l){for(var f,d,u=0;u<l.length;u++){if(f=l.start(u)-this.bufferPadding,d=l.end(u)+this.bufferPadding,i>=f&&n<=d)return!0;if(n<=f)return!1}return!1},r.onFragLoaded=function(i,n){var l=n.frag,f=n.part;if(l.sn==="initSegment"||l.bitrateTest||f)return;var d=t(l);this.fragments[d]={body:l,loaded:n,backtrack:null,buffered:!1,range:Object.create(null)}},r.onBufferAppended=function(i,n){var l=this,f=n.frag,d=n.part,u=n.timeRanges;if(f.type===b.PlaylistLevelType.MAIN)if(this.activeFragment=f,d){var o=this.activeParts;o||(this.activeParts=o=[]),o.push(d)}else this.activeParts=null;this.timeRanges=u,Object.keys(u).forEach(function(s){var E=u[s];if(l.detectEvictedFragments(s,E),!d)for(var v=0;v<E.length;v++)f.appendedPTS=Math.max(E.end(v),f.appendedPTS||0)})},r.onFragBuffered=function(i,n){this.detectPartialFragments(n)},r.hasFragment=function(i){var n=t(i);return!!this.fragments[n]},r.removeFragmentsInRange=function(i,n,l){var f=this;Object.keys(this.fragments).forEach(function(d){var u=f.fragments[d];if(!u)return;if(u.buffered){var o=u.body;o.type===l&&o.start<n&&o.end>i&&f.removeFragment(o)}})},r.removeFragment=function(i){var n=t(i);i.stats.loaded=0,i.clearElementaryStreamInfo(),delete this.fragments[n]},r.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},h}();function _(h){var r,c;return h.buffered&&(((r=h.range.video)===null||r===void 0?void 0:r.partial)||((c=h.range.audio)===null||c===void 0?void 0:c.partial))}function t(h){return h.type+"_"+h.level+"_"+h.urlId+"_"+h.sn}},"./src/controller/gap-controller.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"STALL_MINIMUM_DURATION_MS",function(){return _}),w.d(g,"MAX_START_GAP_JUMP",function(){return t}),w.d(g,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return h}),w.d(g,"SKIP_BUFFER_RANGE_START",function(){return r}),w.d(g,"default",function(){return c});var k=w("./src/utils/buffer-helper.ts"),b=w("./src/errors.ts"),m=w("./src/events.ts"),T=w("./src/utils/logger.ts"),_=250,t=2,h=.1,r=.05,c=function(){function i(l,f,d,u){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=l,this.media=f,this.fragmentTracker=d,this.hls=u}var n=i.prototype;return n.destroy=function(){this.hls=this.fragmentTracker=this.media=null},n.poll=function(f){var d=this.config,u=this.media,o=this.stalled,s=u.currentTime,E=u.seeking,v=this.seeking&&!E,p=!this.seeking&&E;if(this.seeking=E,s!==f){if(this.moved=!0,o!==null){if(this.stallReported){var I=self.performance.now()-o;T.logger.warn("playback not stuck anymore @"+s+", after "+Math.round(I)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((p||v)&&(this.stalled=null),u.paused||u.ended||u.playbackRate===0||!k.BufferHelper.getBuffered(u).length)return;var R=k.BufferHelper.bufferInfo(u,s,0),y=R.len>0,x=R.nextStart||0;if(!y&&!x)return;if(E){var C=R.len>t,S=!x||x-s>t&&!this.fragmentTracker.getPartialFragment(s);if(C||S)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var F,j=Math.max(x,R.start||0)-s,A=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,Y=A==null||((F=A.details)===null||F===void 0)?void 0:F.live,z=Y?A.details.targetduration*2:t;if(j>0&&j<=z){this._trySkipBufferHole(null);return}}var O=self.performance.now();if(o===null){this.stalled=O;return}var H=O-o;!E&&H>=_&&this._reportStall(R.len);var U=k.BufferHelper.bufferInfo(u,s,d.maxBufferHole);this._tryFixBufferStall(U,H)},n._tryFixBufferStall=function(f,d){var u=this.config,o=this.fragmentTracker,s=this.media,E=s.currentTime,v=o.getPartialFragment(E);if(v){var p=this._trySkipBufferHole(v);if(p)return}f.len>u.maxBufferHole&&d>u.highBufferWatchdogPeriod*1e3&&(T.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},n._reportStall=function(f){var d=this.hls,u=this.media,o=this.stallReported;o||(this.stallReported=!0,T.logger.warn("Playback stalling at @"+u.currentTime+" due to low buffer (buffer="+f+")"),d.trigger(m.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:f}))},n._trySkipBufferHole=function(f){for(var d=this.config,u=this.hls,o=this.media,s=o.currentTime,E=0,v=k.BufferHelper.getBuffered(o),p=0;p<v.length;p++){var I=v.start(p);if(s+d.maxBufferHole>=E&&s<I){var R=Math.max(I+r,o.currentTime+h);return T.logger.warn("skipping hole, adjusting currentTime from "+s+" to "+R),this.moved=!0,this.stalled=null,o.currentTime=R,f&&u.trigger(m.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+s+" to "+R,frag:f}),R}E=v.end(p)}return 0},n._tryNudgeBuffer=function(){var f=this.config,d=this.hls,u=this.media,o=u.currentTime,s=(this.nudgeRetry||0)+1;if(this.nudgeRetry=s,s<f.nudgeMaxRetry){var E=o+s*f.nudgeOffset;T.logger.warn("Nudging 'currentTime' from "+o+" to "+E),u.currentTime=E,d.trigger(m.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else T.logger.error("Playhead still not moving while enough data buffered @"+o+" after "+f.nudgeMaxRetry+" nudges"),d.trigger(m.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},i}()},"./src/controller/id3-track-controller.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/events.ts"),b=w("./src/utils/texttrack-utils.ts"),m=w("./src/demux/id3.ts"),T=.25,_=function(){function t(r){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=r,this._registerListeners()}var h=t.prototype;return h.destroy=function(){this._unregisterListeners()},h._registerListeners=function(){var c=this.hls;c.on(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.on(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(k.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),c.on(k.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},h._unregisterListeners=function(){var c=this.hls;c.off(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.off(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(k.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),c.off(k.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},h.onMediaAttached=function(c,i){this.media=i.media},h.onMediaDetaching=function(){if(!this.id3Track)return;Object(b.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},h.getID3Track=function(c){if(!this.media)return;for(var i=0;i<c.length;i++){var n=c[i];if(n.kind==="metadata"&&n.label==="id3")return Object(b.sendAddTrackEvent)(n,this.media),n}return this.media.addTextTrack("metadata","id3")},h.onFragParsingMetadata=function(c,i){if(!this.media)return;var n=i.frag,l=i.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var f=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,d=0;d<l.length;d++){var u=m.getID3Frames(l[d].data);if(u){var o=l[d].pts,s=d<l.length-1?l[d+1].pts:n.end,E=s-o;E<=0&&(s=o+T);for(var v=0;v<u.length;v++){var p=u[v];if(!m.isTimeStampFrame(p)){var I=new f(o,s,"");I.value=p,this.id3Track.addCue(I)}}}}},h.onBufferFlushing=function(c,i){var n=i.startOffset,l=i.endOffset,f=i.type;if(!f||f==="audio"){var d=this.id3Track;d&&Object(b.removeCuesInRange)(d,n,l)}},t}();g.default=_},"./src/controller/latency-controller.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return t});var k=w("./src/errors.ts"),b=w("./src/events.ts"),m=w("./src/utils/logger.ts");function T(h,r){for(var c=0;c<r.length;c++){var i=r[c];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(h,i.key,i)}}function _(h,r,c){return r&&T(h.prototype,r),c&&T(h,c),h}var t=function(){function h(c){var i=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 i.timeupdate()},this.hls=c,this.config=c.config,this.registerListeners()}var r=h.prototype;return r.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},r.registerListeners=function(){this.hls.on(b.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(b.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(b.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(b.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(b.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){this.hls.off(b.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(b.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(b.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(b.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(b.Events.ERROR,this.onError)},r.onMediaAttached=function(i,n){this.media=n.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},r.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},r.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},r.onLevelUpdated=function(i,n){var l=n.details;this.levelDetails=l,l.advanced&&this.timeupdate(),!l.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},r.onError=function(i,n){if(n.details!==k.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,m.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},r.timeupdate=function(){var i=this.media,n=this.levelDetails;if(!i||!n)return;this.currentTime=i.currentTime;var l=this.computeLatency();if(l===null)return;this._latency=l;var f=this.config,d=f.lowLatencyMode,u=f.maxLiveSyncPlaybackRate;if(!d||u===1)return;var o=this.targetLatency;if(o===null)return;var s=l-o,E=Math.min(this.maxLatency,o+n.targetduration),v=s<E;if(n.live&&v&&s>.05&&this.forwardBufferLength>1){var p=Math.min(2,Math.max(1,u)),I=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;i.playbackRate=Math.min(p,Math.max(1,I))}else i.playbackRate!==1&&i.playbackRate!==0&&(i.playbackRate=1)},r.estimateLiveEdge=function(){var i=this.levelDetails;return i===null?null:i.edge+i.age},r.computeLatency=function(){var i=this.estimateLiveEdge();return i===null?null:i-this.currentTime},_(h,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var i=this.config,n=this.levelDetails;return i.liveMaxLatencyDuration!==void 0?i.liveMaxLatencyDuration:n?i.liveMaxLatencyDurationCount*n.targetduration:0}},{key:"targetLatency",get:function(){var i=this.levelDetails;if(i===null)return null;var n=i.holdBack,l=i.partHoldBack,f=i.targetduration,d=this.config,u=d.liveSyncDuration,o=d.liveSyncDurationCount,s=d.lowLatencyMode,E=this.hls.userConfig,v=s&&l||n;(E.liveSyncDuration||E.liveSyncDurationCount||v===0)&&(v=u!==void 0?u:o*f);var p=f,I=1;return v+Math.min(this.stallCount*I,p)}},{key:"liveSyncPosition",get:function(){var i=this.estimateLiveEdge(),n=this.targetLatency,l=this.levelDetails;if(i===null||n===null||l===null)return null;var f=l.edge,d=i-n-this.edgeStalled,u=f-l.totalduration,o=f-(this.config.lowLatencyMode&&l.partTarget||l.targetduration);return Math.min(Math.max(u,d),o)}},{key:"drift",get:function(){var i=this.levelDetails;return i===null?1:i.drift}},{key:"edgeStalled",get:function(){var i=this.levelDetails;if(i===null)return 0;var n=(this.config.lowLatencyMode&&i.partTarget||i.targetduration)*3;return Math.max(i.age-n,0)}},{key:"forwardBufferLength",get:function(){var i=this.media,n=this.levelDetails;if(!i||!n)return 0;var l=i.buffered.length;return l?i.buffered.end(l-1):n.edge-this.currentTime}}]),h}()},"./src/controller/level-controller.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return d});var k=w("./src/types/level.ts"),b=w("./src/events.ts"),m=w("./src/errors.ts"),T=w("./src/utils/codecs.ts"),_=w("./src/controller/level-helper.ts"),t=w("./src/controller/base-playlist-controller.ts"),h=w("./src/types/loader.ts");function r(){return r=Object.assign||function(u){for(var o=1;o<arguments.length;o++){var s=arguments[o];for(var E in s)Object.prototype.hasOwnProperty.call(s,E)&&(u[E]=s[E])}return u},r.apply(this,arguments)}function c(u,o){for(var s=0;s<o.length;s++){var E=o[s];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(u,E.key,E)}}function i(u,o,s){return o&&c(u.prototype,o),s&&c(u,s),u}function n(u,o){u.prototype=Object.create(o.prototype),u.prototype.constructor=u,l(u,o)}function l(u,o){return l=Object.setPrototypeOf||function(E,v){return E.__proto__=v,E},l(u,o)}var f=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),d=function(u){n(o,u);function o(E){var v;return v=u.call(this,E,"[level-controller]")||this,v._levels=[],v._firstLevel=-1,v._startLevel=void 0,v.currentLevelIndex=-1,v.manualLevelIndex=-1,v.onParsedComplete=void 0,v._registerListeners(),v}var s=o.prototype;return s._registerListeners=function(){var v=this.hls;v.on(b.Events.MANIFEST_LOADED,this.onManifestLoaded,this),v.on(b.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.on(b.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.on(b.Events.FRAG_LOADED,this.onFragLoaded,this),v.on(b.Events.ERROR,this.onError,this)},s._unregisterListeners=function(){var v=this.hls;v.off(b.Events.MANIFEST_LOADED,this.onManifestLoaded,this),v.off(b.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.off(b.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.off(b.Events.FRAG_LOADED,this.onFragLoaded,this),v.off(b.Events.ERROR,this.onError,this)},s.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,u.prototype.destroy.call(this)},s.startLoad=function(){var v=this._levels;v.forEach(function(p){p.loadError=0}),u.prototype.startLoad.call(this)},s.onManifestLoaded=function(v,p){var I=[],R=[],y=[],x,C={},S,F=!1,j=!1,A=!1;if(p.levels.forEach(function(H){var U=H.attrs;F=F||!!(H.width&&H.height),j=j||!!H.videoCodec,A=A||!!H.audioCodec,f&&H.audioCodec&&H.audioCodec.indexOf("mp4a.40.34")!==-1&&(H.audioCodec=void 0);var L=H.bitrate+"-"+H.attrs.RESOLUTION+"-"+H.attrs.CODECS;S=C[L],S?S.url.push(H.url):(S=new k.Level(H),C[L]=S,I.push(S)),U&&(U.AUDIO&&Object(_.addGroupId)(S,"audio",U.AUDIO),U.SUBTITLES&&Object(_.addGroupId)(S,"text",U.SUBTITLES))}),(F||j)&&A&&(I=I.filter(function(H){var U=H.videoCodec,L=H.width,K=H.height;return!!U||!!(L&&K)})),I=I.filter(function(H){var U=H.audioCodec,L=H.videoCodec;return(!U||Object(T.isCodecSupportedInMp4)(U,"audio"))&&(!L||Object(T.isCodecSupportedInMp4)(L,"video"))}),p.audioTracks&&(R=p.audioTracks.filter(function(H){return!H.audioCodec||Object(T.isCodecSupportedInMp4)(H.audioCodec,"audio")}),Object(_.assignTrackIdsByGroup)(R)),p.subtitles&&(y=p.subtitles,Object(_.assignTrackIdsByGroup)(y)),I.length>0){x=I[0].bitrate,I.sort(function(H,U){return H.bitrate-U.bitrate}),this._levels=I;for(var Y=0;Y<I.length;Y++)if(I[Y].bitrate===x){this._firstLevel=Y,this.log("manifest loaded, "+I.length+" level(s) found, first bitrate: "+x);break}var z=A&&!j,O={levels:I,audioTracks:R,subtitleTracks:y,firstLevel:this._firstLevel,stats:p.stats,audio:A,video:j,altAudio:!z&&R.some(function(H){return!!H.url})};this.hls.trigger(b.Events.MANIFEST_PARSED,O),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(b.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"})},s.onError=function(v,p){if(u.prototype.onError.call(this,v,p),p.fatal)return;var I=p.context,R=this._levels[this.currentLevelIndex];if(I&&(I.type===h.PlaylistContextType.AUDIO_TRACK&&R.audioGroupIds&&I.groupId===R.audioGroupIds[R.urlId]||I.type===h.PlaylistContextType.SUBTITLE_TRACK&&R.textGroupIds&&I.groupId===R.textGroupIds[R.urlId])){this.redundantFailover(this.currentLevelIndex);return}var y=!1,x=!0,C;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 S=this._levels[p.frag.level];S?(S.fragmentError++,S.fragmentError>this.hls.config.fragLoadingMaxRetry&&(C=p.frag.level)):C=p.frag.level}break;case m.ErrorDetails.LEVEL_LOAD_ERROR:case m.ErrorDetails.LEVEL_LOAD_TIMEOUT:I&&(I.deliveryDirectives&&(x=!1),C=I.level),y=!0;break;case m.ErrorDetails.REMUX_ALLOC_ERROR:C=p.level,y=!0;break}C!==void 0&&this.recoverLevel(p,C,y,x)},s.recoverLevel=function(v,p,I,R){var y=v.details,x=this._levels[p];if(x.loadError++,I){var C=this.retryLoadingOrFail(v);if(C)v.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(R){var S=x.url.length;if(S>1&&x.loadError<S)v.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(y+": switch to "+F),v.levelRetry=!0,this.hls.nextAutoLevel=F)}}},s.redundantFailover=function(v){var p=this._levels[v],I=p.url.length;if(I>1){var R=(p.urlId+1)%I;this.warn("Switching to redundant URL-id "+R),this._levels.forEach(function(y){y.urlId=R}),this.level=v}},s.onFragLoaded=function(v,p){var I=p.frag;if(I!==void 0&&I.type===h.PlaylistLevelType.MAIN){var R=this._levels[I.level];R!==void 0&&(R.fragmentError=0,R.loadError=0)}},s.onLevelLoaded=function(v,p){var I,R=p.level,y=p.details,x=this._levels[R];if(!x){var C;this.warn("Invalid level index "+R),(C=p.deliveryDirectives)!==null&&C!==void 0&&C.skip&&(y.deltaUpdateFailed=!0);return}R===this.currentLevelIndex?(x.fragmentError===0&&(x.loadError=0,this.retryCount=0),this.playlistLoaded(R,p,x.details)):(I=p.deliveryDirectives)!==null&&I!==void 0&&I.skip&&(y.deltaUpdateFailed=!0)},s.onAudioTrackSwitched=function(v,p){var I=this.hls.levels[this.currentLevelIndex];if(!I)return;if(I.audioGroupIds){for(var R=-1,y=this.hls.audioTracks[p.id].groupId,x=0;x<I.audioGroupIds.length;x++)if(I.audioGroupIds[x]===y){R=x;break}R!==I.urlId&&(I.urlId=R,this.startLoad())}},s.loadPlaylist=function(v){var p=this.currentLevelIndex,I=this._levels[p];if(this.canLoad&&I&&I.url.length>0){var R=I.urlId,y=I.url[R];if(v)try{y=v.addDirectives(y)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Attempt loading level index "+p+(v?" at sn "+v.msn+" part "+v.part:"")+" with URL-id "+R+" "+y),this.clearTimer(),this.hls.trigger(b.Events.LEVEL_LOADING,{url:y,level:p,id:R,deliveryDirectives:v||null})}},s.removeLevel=function(v,p){var I=function(x,C){return C!==p},R=this._levels.filter(function(y,x){return x!==v?!0:y.url.length>1&&p!==void 0?(y.url=y.url.filter(I),y.audioGroupIds&&(y.audioGroupIds=y.audioGroupIds.filter(I)),y.textGroupIds&&(y.textGroupIds=y.textGroupIds.filter(I)),y.urlId=0,!0):!1}).map(function(y,x){var C=y.details;return C!=null&&C.fragments&&C.fragments.forEach(function(S){S.level=x}),y});this._levels=R,this.hls.trigger(b.Events.LEVELS_UPDATED,{levels:R})},i(o,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(v){var p,I=this._levels;if(I.length===0)return;if(this.currentLevelIndex===v&&(p=I[v])!==null&&p!==void 0&&p.details)return;if(v<0||v>=I.length){var R=v<0;if(this.hls.trigger(b.Events.ERROR,{type:m.ErrorTypes.OTHER_ERROR,details:m.ErrorDetails.LEVEL_SWITCH_ERROR,level:v,fatal:R,reason:"invalid level idx"}),R)return;v=Math.min(v,I.length-1)}this.clearTimer();var y=this.currentLevelIndex,x=I[y],C=I[v];this.log("switching to level "+v+" from "+y),this.currentLevelIndex=v;var S=r({},C,{level:v,maxBitrate:C.maxBitrate,uri:C.uri,urlId:C.urlId});delete S._urlId,this.hls.trigger(b.Events.LEVEL_SWITCHING,S);var F=C.details;if(!F||F.live){var j=this.switchParams(C.uri,x==null?void 0:x.details);this.loadPlaylist(j)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(v){this.manualLevelIndex=v,this._startLevel===void 0&&(this._startLevel=v),v!==-1&&(this.level=v)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(v){this._firstLevel=v}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var v=this.hls.config.startLevel;return v!==void 0?v:this._firstLevel}else return this._startLevel},set:function(v){this._startLevel=v}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(v){this.level=v,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=v)}}]),o}(t.default)},"./src/controller/level-helper.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"addGroupId",function(){return m}),w.d(g,"assignTrackIdsByGroup",function(){return T}),w.d(g,"updatePTS",function(){return _}),w.d(g,"updateFragPTSDTS",function(){return h}),w.d(g,"mergeDetails",function(){return r}),w.d(g,"mapPartIntersection",function(){return c}),w.d(g,"mapFragmentIntersection",function(){return i}),w.d(g,"adjustSliding",function(){return n}),w.d(g,"addSliding",function(){return l}),w.d(g,"computeReloadInterval",function(){return f}),w.d(g,"getFragmentWithSN",function(){return d}),w.d(g,"getPartWith",function(){return u});var k=w("./src/polyfills/number.ts"),b=w("./src/utils/logger.ts");function m(o,s,E){switch(s){case"audio":o.audioGroupIds||(o.audioGroupIds=[]),o.audioGroupIds.push(E);break;case"text":o.textGroupIds||(o.textGroupIds=[]),o.textGroupIds.push(E);break}}function T(o){var s={};o.forEach(function(E){var v=E.groupId||"";E.id=s[v]=s[v]||0,s[v]++})}function _(o,s,E){var v=o[s],p=o[E];t(v,p)}function t(o,s){var E=s.startPTS;if(Object(k.isFiniteNumber)(E)){var v=0,p;s.sn>o.sn?(v=E-o.start,p=o):(v=o.start-E,p=s),p.duration!==v&&(p.duration=v)}else if(s.sn>o.sn){var I=o.cc===s.cc;I&&o.minEndPTS?s.start=o.start+(o.minEndPTS-o.start):s.start=o.start+o.duration}else s.start=Math.max(o.start-s.duration,0)}function h(o,s,E,v,p,I){var R=v-E;R<=0&&(b.logger.warn("Fragment should have a positive duration",s),v=E+s.duration,I=p+s.duration);var y=E,x=v,C=s.startPTS,S=s.endPTS;if(Object(k.isFiniteNumber)(C)){var F=Math.abs(C-E);Object(k.isFiniteNumber)(s.deltaPTS)?s.deltaPTS=Math.max(F,s.deltaPTS):s.deltaPTS=F,y=Math.max(E,C),E=Math.min(E,C),p=Math.min(p,s.startDTS),x=Math.min(v,S),v=Math.max(v,S),I=Math.max(I,s.endDTS)}s.duration=v-E;var j=E-s.start;s.appendedPTS=v,s.start=s.startPTS=E,s.maxStartPTS=y,s.startDTS=p,s.endPTS=v,s.minEndPTS=x,s.endDTS=I;var A=s.sn;if(!o||A<o.startSN||A>o.endSN)return 0;var Y,z=A-o.startSN,O=o.fragments;for(O[z]=s,Y=z;Y>0;Y--)t(O[Y],O[Y-1]);for(Y=z;Y<O.length-1;Y++)t(O[Y],O[Y+1]);return o.fragmentHint&&t(O[O.length-1],o.fragmentHint),o.PTSKnown=o.alignedSliding=!0,j}function r(o,s){for(var E=null,v=o.fragments,p=v.length-1;p>=0;p--){var I=v[p].initSegment;if(I){E=I;break}}o.fragmentHint&&delete o.fragmentHint.endPTS;var R=0,y;if(i(o,s,function(Y,z){Y.relurl&&(R=Y.cc-z.cc),Object(k.isFiniteNumber)(Y.startPTS)&&Object(k.isFiniteNumber)(Y.endPTS)&&(z.start=z.startPTS=Y.startPTS,z.startDTS=Y.startDTS,z.appendedPTS=Y.appendedPTS,z.maxStartPTS=Y.maxStartPTS,z.endPTS=Y.endPTS,z.endDTS=Y.endDTS,z.minEndPTS=Y.minEndPTS,z.duration=Y.endPTS-Y.startPTS,z.duration&&(y=z),s.PTSKnown=s.alignedSliding=!0),z.elementaryStreams=Y.elementaryStreams,z.loader=Y.loader,z.stats=Y.stats,z.urlId=Y.urlId,Y.initSegment&&(z.initSegment=Y.initSegment,E=Y.initSegment)}),E){var x=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments;x.forEach(function(Y){var z;(!Y.initSegment||Y.initSegment.relurl===((z=E)===null||z===void 0?void 0:z.relurl))&&(Y.initSegment=E)})}if(s.skippedSegments&&(s.deltaUpdateFailed=s.fragments.some(function(Y){return!Y}),s.deltaUpdateFailed)){b.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var C=s.skippedSegments;C--;)s.fragments.shift();s.startSN=s.fragments[0].sn,s.startCC=s.fragments[0].cc}var S=s.fragments;if(R){b.logger.warn("discontinuity sliding from playlist, take drift into account");for(var F=0;F<S.length;F++)S[F].cc+=R}s.skippedSegments&&(s.startCC=s.fragments[0].cc),c(o.partList,s.partList,function(Y,z){z.elementaryStreams=Y.elementaryStreams,z.stats=Y.stats}),y?h(s,y,y.startPTS,y.endPTS,y.startDTS,y.endDTS):n(o,s),S.length&&(s.totalduration=s.edge-S[0].start),s.driftStartTime=o.driftStartTime,s.driftStart=o.driftStart;var j=s.advancedDateTime;if(s.advanced&&j){var A=s.edge;s.driftStart||(s.driftStartTime=j,s.driftStart=A),s.driftEndTime=j,s.driftEnd=A}else s.driftEndTime=o.driftEndTime,s.driftEnd=o.driftEnd,s.advancedDateTime=o.advancedDateTime}function c(o,s,E){if(o&&s)for(var v=0,p=0,I=o.length;p<=I;p++){var R=o[p],y=s[p+v];R&&y&&R.index===y.index&&R.fragment.sn===y.fragment.sn?E(R,y):v--}}function i(o,s,E){for(var v=s.skippedSegments,p=Math.max(o.startSN,s.startSN)-s.startSN,I=(o.fragmentHint?1:0)+(v?s.endSN:Math.min(o.endSN,s.endSN))-s.startSN,R=s.startSN-o.startSN,y=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments,x=o.fragmentHint?o.fragments.concat(o.fragmentHint):o.fragments,C=p;C<=I;C++){var S=x[R+C],F=y[C];v&&!F&&C<v&&(F=s.fragments[C]=S),S&&F&&E(S,F)}}function n(o,s){var E=s.startSN+s.skippedSegments-o.startSN,v=o.fragments;if(E<0||E>=v.length)return;l(s,v[E].start)}function l(o,s){if(s){for(var E=o.fragments,v=o.skippedSegments;v<E.length;v++)E[v].start+=s;o.fragmentHint&&(o.fragmentHint.start+=s)}}function f(o,s){var E=1e3*o.levelTargetDuration,v=E/2,p=o.age,I=p>0&&p<E*3,R=s.loading.end-s.loading.start,y,x=o.availabilityDelay;if(o.updated===!1)if(I){var C=333*o.misses;y=Math.max(Math.min(v,R*2),C),o.availabilityDelay=(o.availabilityDelay||0)+y}else y=v;else I?(x=Math.min(x||E/2,p),o.availabilityDelay=x,y=x+E-p):y=E-R;return Math.round(y)}function d(o,s,E){if(!o||!o.details)return null;var v=o.details,p=v.fragments[s-v.startSN];return p||(p=v.fragmentHint,p&&p.sn===s?p:s<v.startSN&&E&&E.sn===s?E:null)}function u(o,s,E){if(!o||!o.details)return null;var v=o.details.partList;if(v)for(var p=v.length;p--;){var I=v[p];if(I.index===E&&I.fragment.sn===s)return I}return null}},"./src/controller/stream-controller.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return v});var k=w("./src/polyfills/number.ts"),b=w("./src/controller/base-stream-controller.ts"),m=w("./src/is-supported.ts"),T=w("./src/events.ts"),_=w("./src/utils/buffer-helper.ts"),t=w("./src/controller/fragment-tracker.ts"),h=w("./src/types/loader.ts"),r=w("./src/loader/fragment.ts"),c=w("./src/demux/transmuxer-interface.ts"),i=w("./src/types/transmuxer.ts"),n=w("./src/controller/gap-controller.ts"),l=w("./src/errors.ts"),f=w("./src/utils/logger.ts");function d(p,I){for(var R=0;R<I.length;R++){var y=I[R];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,y.key,y)}}function u(p,I,R){return I&&d(p.prototype,I),R&&d(p,R),p}function o(p,I){p.prototype=Object.create(I.prototype),p.prototype.constructor=p,s(p,I)}function s(p,I){return s=Object.setPrototypeOf||function(y,x){return y.__proto__=x,y},s(p,I)}var E=100,v=function(p){o(I,p);function I(y,x){var C;return C=p.call(this,y,x,"[stream-controller]")||this,C.audioCodecSwap=!1,C.gapController=null,C.level=-1,C._forceStartLoad=!1,C.altAudio=!1,C.audioOnly=!1,C.fragPlaying=null,C.onvplaying=null,C.onvseeked=null,C.fragLastKbps=0,C.stalled=!1,C.couldBacktrack=!1,C.audioCodecSwitch=!1,C.videoBuffer=null,C._registerListeners(),C}var R=I.prototype;return R._registerListeners=function(){var x=this.hls;x.on(T.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(T.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(T.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(T.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.on(T.Events.LEVEL_LOADING,this.onLevelLoading,this),x.on(T.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(T.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.on(T.Events.ERROR,this.onError,this),x.on(T.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.on(T.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.on(T.Events.BUFFER_CREATED,this.onBufferCreated,this),x.on(T.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.on(T.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.on(T.Events.FRAG_BUFFERED,this.onFragBuffered,this)},R._unregisterListeners=function(){var x=this.hls;x.off(T.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(T.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(T.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(T.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.off(T.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(T.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.off(T.Events.ERROR,this.onError,this),x.off(T.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.off(T.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.off(T.Events.BUFFER_CREATED,this.onBufferCreated,this),x.off(T.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.off(T.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.off(T.Events.FRAG_BUFFERED,this.onFragBuffered,this)},R.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},R.startLoad=function(x){if(this.levels){var C=this.lastCurrentTime,S=this.hls;if(this.stopLoad(),this.setInterval(E),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var F=S.startLevel;F===-1&&(S.config.testBandwidth?(F=0,this.bitrateTest=!0):F=S.nextAutoLevel),this.level=S.nextLoadLevel=F,this.loadedmetadata=!1}C>0&&x===-1&&(this.log("Override startPosition with lastCurrentTime @"+C.toFixed(3)),x=C),this.state=b.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,this.tick()}else this._forceStartLoad=!0,this.state=b.State.STOPPED},R.stopLoad=function(){this._forceStartLoad=!1,p.prototype.stopLoad.call(this)},R.doTick=function(){switch(this.state){case b.State.IDLE:this.doTickIdle();break;case b.State.WAITING_LEVEL:{var x,C=this.levels,S=this.level,F=C==null||((x=C[S])===null||x===void 0)?void 0:x.details;if(F&&(!F.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(F))break;this.state=b.State.IDLE;break}break}case b.State.FRAG_LOADING_WAITING_RETRY:{var j,A=self.performance.now(),Y=this.retryDate;(!Y||A>=Y||(j=this.media)!==null&&j!==void 0&&j.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=b.State.IDLE)}break;default:break}this.onTickEnd()},R.onTickEnd=function(){p.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},R.doTickIdle=function(){var x,C,S=this.hls,F=this.levelLastLoaded,j=this.levels,A=this.media,Y=S.config,z=S.nextLoadLevel;if(F===null||!A&&(this.startFragRequested||!Y.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!j||!j[z])return;var O=j[z];this.level=S.nextLoadLevel=z;var H=O.details;if(!H||this.state===b.State.WAITING_LEVEL||H.live&&this.levelLastLoaded!==z){this.state=b.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:A,h.PlaylistLevelType.MAIN);if(U===null)return;var L=U.len,K=this.getMaxBufferLength(O.maxBitrate);if(L>=K)return;if(this._streamEnded(U,H)){var ee={};this.altAudio&&(ee.type="video"),this.hls.trigger(T.Events.BUFFER_EOS,ee),this.state=b.State.ENDED;return}var oe=U.end,ae=this.getNextFragment(oe,H);if(this.couldBacktrack&&!this.fragPrevious&&ae&&ae.sn!=="initSegment"){var be=ae.sn-H.startSN;be>1&&(ae=H.fragments[be-1],this.fragmentTracker.removeFragment(ae))}if(ae&&this.fragmentTracker.getState(ae)===t.FragmentState.OK&&this.nextLoadPosition>oe){var _e=this.audioOnly&&!this.altAudio?r.ElementaryStreamTypes.AUDIO:r.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(A,_e,h.PlaylistLevelType.MAIN),ae=this.getNextFragment(this.nextLoadPosition,H)}if(!ae)return;ae.initSegment&&!ae.initSegment.data&&!this.bitrateTest&&(ae=ae.initSegment),((x=ae.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((C=ae.decryptdata)!==null&&C!==void 0&&C.key)?this.loadKey(ae,H):this.loadFragment(ae,H,oe)},R.loadFragment=function(x,C,S){var F,j=this.fragmentTracker.getState(x);if(this.fragCurrent=x,j===t.FragmentState.BACKTRACKED){var A=this.fragmentTracker.getBacktrackData(x);if(A){this._handleFragmentLoadProgress(A),this._handleFragmentLoadComplete(A);return}else j=t.FragmentState.NOT_LOADED}j===t.FragmentState.NOT_LOADED||j===t.FragmentState.PARTIAL?x.sn==="initSegment"?this._loadInitSegment(x):this.bitrateTest?(x.bitrateTest=!0,this.log("Fragment "+x.sn+" of level "+x.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(x)):(this.startFragRequested=!0,p.prototype.loadFragment.call(this,x,C,S)):j===t.FragmentState.APPENDING?this.reduceMaxBufferLength(x.duration)&&this.fragmentTracker.removeFragment(x):((F=this.media)===null||F===void 0?void 0:F.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},R.getAppendedFrag=function(x){var C=this.fragmentTracker.getAppendedFrag(x,h.PlaylistLevelType.MAIN);return C&&"fragment"in C?C.fragment:C},R.getBufferedFrag=function(x){return this.fragmentTracker.getBufferedFrag(x,h.PlaylistLevelType.MAIN)},R.followingBufferedFrag=function(x){return x?this.getBufferedFrag(x.end+.5):null},R.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},R.nextLevelSwitch=function(){var x=this.levels,C=this.media;if(C!=null&&C.readyState){var S,F=this.getAppendedFrag(C.currentTime);if(F&&F.start>1&&this.flushMainBuffer(0,F.start-1),!C.paused&&x){var j=this.hls.nextLoadLevel,A=x[j],Y=this.fragLastKbps;Y&&this.fragCurrent?S=this.fragCurrent.duration*A.maxBitrate/(1e3*Y)+1:S=0}else S=0;var z=this.getBufferedFrag(C.currentTime+S);if(z){var O=this.followingBufferedFrag(z);if(O){this.abortCurrentFrag();var H=O.maxStartPTS?O.maxStartPTS:O.start,U=O.duration,L=Math.max(z.end,H+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(L,Number.POSITIVE_INFINITY)}}}},R.abortCurrentFrag=function(){var x=this.fragCurrent;this.fragCurrent=null,x!=null&&x.loader&&x.loader.abort(),this.state===b.State.KEY_LOADING&&(this.state=b.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},R.flushMainBuffer=function(x,C){p.prototype.flushMainBuffer.call(this,x,C,this.altAudio?"video":null)},R.onMediaAttached=function(x,C){p.prototype.onMediaAttached.call(this,x,C);var S=C.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),S.addEventListener("playing",this.onvplaying),S.addEventListener("seeked",this.onvseeked),this.gapController=new n.default(this.config,S,this.fragmentTracker,this.hls)},R.onMediaDetaching=function(){var x=this.media;x&&(x.removeEventListener("playing",this.onvplaying),x.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),p.prototype.onMediaDetaching.call(this)},R.onMediaPlaying=function(){this.tick()},R.onMediaSeeked=function(){var x=this.media,C=x?x.currentTime:null;Object(k.isFiniteNumber)(C)&&this.log("Media seeked to "+C.toFixed(3)),this.tick()},R.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(T.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},R.onManifestParsed=function(x,C){var S=!1,F=!1,j;C.levels.forEach(function(A){j=A.audioCodec,j&&(j.indexOf("mp4a.40.2")!==-1&&(S=!0),j.indexOf("mp4a.40.5")!==-1&&(F=!0))}),this.audioCodecSwitch=S&&F&&!Object(m.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=C.levels,this.startFragRequested=!1},R.onLevelLoading=function(x,C){var S=this.levels;if(!S||this.state!==b.State.IDLE)return;var F=S[C.level];(!F.details||F.details.live&&this.levelLastLoaded!==C.level||this.waitForCdnTuneIn(F.details))&&(this.state=b.State.WAITING_LEVEL)},R.onLevelLoaded=function(x,C){var S,F=this.levels,j=C.level,A=C.details,Y=A.totalduration;if(!F){this.warn("Levels were reset while loading level "+j);return}this.log("Level "+j+" loaded ["+A.startSN+","+A.endSN+"], cc ["+A.startCC+", "+A.endCC+"] duration:"+Y);var z=this.fragCurrent;z&&(this.state===b.State.FRAG_LOADING||this.state===b.State.FRAG_LOADING_WAITING_RETRY)&&(z.level!==C.level&&z.loader&&(this.state=b.State.IDLE,z.loader.abort()));var O=F[j],H=0;if(A.live||(S=O.details)!==null&&S!==void 0&&S.live){if(A.fragments[0]||(A.deltaUpdateFailed=!0),A.deltaUpdateFailed)return;H=this.alignPlaylists(A,O.details)}if(O.details=A,this.levelLastLoaded=j,this.hls.trigger(T.Events.LEVEL_UPDATED,{details:A,level:j}),this.state===b.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(A))return;this.state=b.State.IDLE}this.startFragRequested?A.live&&this.synchronizeToLiveEdge(A):this.setStartPosition(A,H),this.tick()},R._handleFragmentLoadProgress=function(x){var C,S=x.frag,F=x.part,j=x.payload,A=this.levels;if(!A){this.warn("Levels were reset while fragment load was in progress. Fragment "+S.sn+" of level "+S.level+" will not be buffered");return}var Y=A[S.level],z=Y.details;if(!z){this.warn("Dropping fragment "+S.sn+" of level "+S.level+" after level details were reset");return}var O=Y.videoCodec,H=z.PTSKnown||!z.live,U=(C=S.initSegment)===null||C===void 0?void 0:C.data,L=this._getAudioCodec(Y),K=this.transmuxer=this.transmuxer||new c.default(this.hls,h.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ee=F?F.index:-1,oe=ee!==-1,ae=new i.ChunkMetadata(S.level,S.sn,S.stats.chunkCount,j.byteLength,ee,oe),be=this.initPTS[S.cc];K.push(j,U,L,O,S,F,z.totalduration,H,ae,be)},R.onAudioTrackSwitching=function(x,C){var S=this.altAudio,F=!!C.url,j=C.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 A=this.fragCurrent;A!=null&&A.loader&&(this.log("Switching to main audio track, cancel main fragment load"),A.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var Y=this.hls;S&&Y.trigger(T.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),Y.trigger(T.Events.AUDIO_TRACK_SWITCHED,{id:j})}},R.onAudioTrackSwitched=function(x,C){var S=C.id,F=!!this.hls.audioTracks[S].url;if(F){var j=this.videoBuffer;j&&this.mediaBuffer!==j&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=j)}this.altAudio=F,this.tick()},R.onBufferCreated=function(x,C){var S=C.tracks,F,j,A=!1;for(var Y in S){var z=S[Y];if(z.id==="main"){if(j=Y,F=z,Y==="video"){var O=S[Y];O&&(this.videoBuffer=O.buffer)}}else A=!0}A&&F?(this.log("Alternate track found, use "+j+".buffered to schedule main fragment loading"),this.mediaBuffer=F.buffer):this.mediaBuffer=this.media},R.onFragBuffered=function(x,C){var S=C.frag,F=C.part;if(S&&S.type!==h.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(S)){this.warn("Fragment "+S.sn+(F?" p: "+F.index:"")+" of level "+S.level+" finished buffering, but was aborted. state: "+this.state),this.state===b.State.PARSED&&(this.state=b.State.IDLE);return}var j=F?F.stats:S.stats;this.fragLastKbps=Math.round(8*j.total/(j.buffering.end-j.loading.first)),S.sn!=="initSegment"&&(this.fragPrevious=S),this.fragBufferedComplete(S,F)},R.onError=function(x,C){switch(C.details){case l.ErrorDetails.FRAG_LOAD_ERROR:case l.ErrorDetails.FRAG_LOAD_TIMEOUT:case l.ErrorDetails.KEY_LOAD_ERROR:case l.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(h.PlaylistLevelType.MAIN,C);break;case l.ErrorDetails.LEVEL_LOAD_ERROR:case l.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==b.State.ERROR&&(C.fatal?(this.warn(""+C.details),this.state=b.State.ERROR):!C.levelRetry&&this.state===b.State.WAITING_LEVEL&&(this.state=b.State.IDLE));break;case l.ErrorDetails.BUFFER_FULL_ERROR:if(C.parent==="main"&&(this.state===b.State.PARSING||this.state===b.State.PARSED)){var S=!0,F=this.getFwdBufferInfo(this.media,h.PlaylistLevelType.MAIN);F&&F.len>.5&&(S=!this.reduceMaxBufferLength(F.len)),S&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},R.checkBuffer=function(){var x=this.media,C=this.gapController;if(!x||!C||!x.readyState)return;var S=_.BufferHelper.getBuffered(x);!this.loadedmetadata&&S.length?(this.loadedmetadata=!0,this.seekToStartPos()):C.poll(this.lastCurrentTime),this.lastCurrentTime=x.currentTime},R.onFragLoadEmergencyAborted=function(){this.state=b.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},R.onBufferFlushed=function(x,C){var S=C.type;if(S!==r.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var F=(S===r.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(F,S,h.PlaylistLevelType.MAIN)}},R.onLevelsUpdated=function(x,C){this.levels=C.levels},R.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},R.seekToStartPos=function(){var x=this.media,C=x.currentTime,S=this.startPosition;if(S>=0&&C<S){if(x.seeking){f.logger.log("could not seek to "+S+", already seeking at "+C);return}var F=_.BufferHelper.getBuffered(x),j=F.length?F.start(0):0,A=j-S;A>0&&(A<this.config.maxBufferHole||A<this.config.maxFragLookUpTolerance)&&(f.logger.log("adjusting start position by "+A+" to match buffer start"),S+=A,this.startPosition=S),this.log("seek to target start position "+S+" from current time "+C),x.currentTime=S}},R._getAudioCodec=function(x){var C=this.config.defaultAudioCodec||x.audioCodec;return this.audioCodecSwap&&C&&(this.log("Swapping audio codec"),C.indexOf("mp4a.40.5")!==-1?C="mp4a.40.2":C="mp4a.40.5"),C},R._loadBitrateTestFrag=function(x){var C=this;this._doFragLoad(x).then(function(S){var F=C.hls;if(!S||F.nextLoadLevel||C.fragContextChanged(x))return;C.fragLoadError=0,C.state=b.State.IDLE,C.startFragRequested=!1,C.bitrateTest=!1;var j=x.stats;j.parsing.start=j.parsing.end=j.buffering.start=j.buffering.end=self.performance.now(),F.trigger(T.Events.FRAG_LOADED,S)})},R._handleTransmuxComplete=function(x){var C,S="main",F=this.hls,j=x.remuxResult,A=x.chunkMeta,Y=this.getCurrentContext(A);if(!Y){this.warn("The loading context changed while buffering fragment "+A.sn+" of level "+A.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(A.level);return}var z=Y.frag,O=Y.part,H=Y.level,U=j.video,L=j.text,K=j.id3,ee=j.initSegment,oe=this.altAudio?void 0:j.audio;if(this.fragContextChanged(z))return;if(this.state=b.State.PARSING,ee){ee.tracks&&(this._bufferInitSegment(H,ee.tracks,z,A),F.trigger(T.Events.FRAG_PARSING_INIT_SEGMENT,{frag:z,id:S,tracks:ee.tracks}));var ae=ee.initPTS,be=ee.timescale;Object(k.isFiniteNumber)(ae)&&(this.initPTS[z.cc]=ae,F.trigger(T.Events.INIT_PTS_FOUND,{frag:z,id:S,initPTS:ae,timescale:be}))}if(U&&j.independent!==!1){if(H.details){var _e=U.startPTS,fe=U.endPTS,Re=U.startDTS,Ce=U.endDTS;if(O)O.elementaryStreams[U.type]={startPTS:_e,endPTS:fe,startDTS:Re,endDTS:Ce};else if(U.firstKeyFrame&&U.independent&&(this.couldBacktrack=!0),U.dropped&&U.independent){var ce=this.getLoadPosition()+this.config.maxBufferHole;if(ce<_e){this.backtrack(z);return}z.setElementaryStreamInfo(U.type,z.start,fe,z.start,Ce,!0)}z.setElementaryStreamInfo(U.type,_e,fe,Re,Ce),this.bufferFragmentData(U,z,O,A)}}else if(j.independent===!1){this.backtrack(z);return}if(oe){var te=oe.startPTS,W=oe.endPTS,X=oe.startDTS,V=oe.endDTS;O&&(O.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:te,endPTS:W,startDTS:X,endDTS:V}),z.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,te,W,X,V),this.bufferFragmentData(oe,z,O,A)}if(K!=null&&(C=K.samples)!==null&&C!==void 0&&C.length){var Z={frag:z,id:S,samples:K.samples};F.trigger(T.Events.FRAG_PARSING_METADATA,Z)}if(L){var q={frag:z,id:S,samples:L.samples};F.trigger(T.Events.FRAG_PARSING_USERDATA,q)}},R._bufferInitSegment=function(x,C,S,F){var j=this;if(this.state!==b.State.PARSING)return;this.audioOnly=!!C.audio&&!C.video,this.altAudio&&!this.audioOnly&&delete C.audio;var A=C.audio,Y=C.video,z=C.audiovideo;if(A){var O=x.audioCodec,H=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(O&&(O.indexOf("mp4a.40.5")!==-1?O="mp4a.40.2":O="mp4a.40.5"),A.metadata.channelCount!==1&&H.indexOf("firefox")===-1&&(O="mp4a.40.5")),H.indexOf("android")!==-1&&A.container!=="audio/mpeg"&&(O="mp4a.40.2",this.log("Android: force audio codec to "+O)),x.audioCodec&&x.audioCodec!==O&&this.log('Swapping manifest audio codec "'+x.audioCodec+'" for "'+O+'"'),A.levelCodec=O,A.id="main",this.log("Init audio buffer, container:"+A.container+", codecs[selected/level/parsed]=["+(O||"")+"/"+(x.audioCodec||"")+"/"+A.codec+"]")}Y&&(Y.levelCodec=x.videoCodec,Y.id="main",this.log("Init video buffer, container:"+Y.container+", codecs[level/parsed]=["+(x.videoCodec||"")+"/"+Y.codec+"]")),z&&this.log("Init audiovideo buffer, container:"+z.container+", codecs[level/parsed]=["+(x.attrs.CODECS||"")+"/"+z.codec+"]"),this.hls.trigger(T.Events.BUFFER_CODECS,C),Object.keys(C).forEach(function(U){var L=C[U],K=L.initSegment;K!=null&&K.byteLength&&j.hls.trigger(T.Events.BUFFER_APPENDING,{type:U,data:K,frag:S,part:null,chunkMeta:F,parent:S.type})}),this.tick()},R.backtrack=function(x){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(x);var C=this.fragmentTracker.backtrack(x);this.fragPrevious=null,this.nextLoadPosition=x.start,C?this.resetFragmentLoading(x):this.state=b.State.BACKTRACKING},R.checkFragmentChanged=function(){var x=this.media,C=null;if(x&&x.readyState>1&&x.seeking===!1){var S=x.currentTime;if(_.BufferHelper.isBuffered(x,S)?C=this.getAppendedFrag(S):_.BufferHelper.isBuffered(x,S+.1)&&(C=this.getAppendedFrag(S+.1)),C){var F=this.fragPlaying,j=C.level;(!F||C.sn!==F.sn||F.level!==j||C.urlId!==F.urlId)&&(this.hls.trigger(T.Events.FRAG_CHANGED,{frag:C}),(!F||F.level!==j)&&this.hls.trigger(T.Events.LEVEL_SWITCHED,{level:j}),this.fragPlaying=C)}}},u(I,[{key:"nextLevel",get:function(){var x=this.nextBufferedFrag;return x?x.level:-1}},{key:"currentLevel",get:function(){var x=this.media;if(x){var C=this.getAppendedFrag(x.currentTime);if(C)return C.level}return-1}},{key:"nextBufferedFrag",get:function(){var x=this.media;if(x){var C=this.getAppendedFrag(x.currentTime);return this.followingBufferedFrag(C)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),I}(b.default)},"./src/controller/subtitle-stream-controller.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"SubtitleStreamController",function(){return o});var k=w("./src/events.ts"),b=w("./src/utils/logger.ts"),m=w("./src/utils/buffer-helper.ts"),T=w("./src/controller/fragment-finders.ts"),_=w("./src/utils/discontinuities.ts"),t=w("./src/controller/level-helper.ts"),h=w("./src/controller/fragment-tracker.ts"),r=w("./src/controller/base-stream-controller.ts"),c=w("./src/types/loader.ts"),i=w("./src/types/level.ts");function n(s,E){for(var v=0;v<E.length;v++){var p=E[v];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(s,p.key,p)}}function l(s,E,v){return E&&n(s.prototype,E),v&&n(s,v),s}function f(s,E){s.prototype=Object.create(E.prototype),s.prototype.constructor=s,d(s,E)}function d(s,E){return d=Object.setPrototypeOf||function(p,I){return p.__proto__=I,p},d(s,E)}var u=500,o=function(s){f(E,s);function E(p,I){var R;return R=s.call(this,p,I,"[subtitle-stream-controller]")||this,R.levels=[],R.currentTrackId=-1,R.tracksBuffered=[],R.mainDetails=null,R._registerListeners(),R}var v=E.prototype;return v.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},v._registerListeners=function(){var I=this.hls;I.on(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),I.on(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),I.on(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),I.on(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),I.on(k.Events.ERROR,this.onError,this),I.on(k.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),I.on(k.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),I.on(k.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),I.on(k.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),I.on(k.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},v._unregisterListeners=function(){var I=this.hls;I.off(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),I.off(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),I.off(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),I.off(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),I.off(k.Events.ERROR,this.onError,this),I.off(k.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),I.off(k.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),I.off(k.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),I.off(k.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),I.off(k.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},v.startLoad=function(){this.stopLoad(),this.state=r.State.IDLE,this.setInterval(u),this.tick()},v.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},v.onLevelLoaded=function(I,R){this.mainDetails=R.details},v.onSubtitleFragProcessed=function(I,R){var y=R.frag,x=R.success;if(this.fragPrevious=y,this.state=r.State.IDLE,!x)return;var C=this.tracksBuffered[this.currentTrackId];if(!C)return;for(var S,F=y.start,j=0;j<C.length;j++)if(F>=C[j].start&&F<=C[j].end){S=C[j];break}var A=y.start+y.duration;S?S.end=A:(S={start:F,end:A},C.push(S)),this.fragmentTracker.fragBuffered(y)},v.onBufferFlushing=function(I,R){var y=R.startOffset,x=R.endOffset;if(y===0&&x!==Number.POSITIVE_INFINITY){var C=this.currentTrackId,S=this.levels;if(!S.length||!S[C]||!S[C].details)return;var F=S[C].details,j=F.targetduration,A=x-j;if(A<=0)return;R.endOffsetSubtitles=Math.max(0,A),this.tracksBuffered.forEach(function(Y){for(var z=0;z<Y.length;){if(Y[z].end<=A){Y.shift();continue}else if(Y[z].start<A)Y[z].start=A;else break;z++}}),this.fragmentTracker.removeFragmentsInRange(y,A,c.PlaylistLevelType.SUBTITLE)}},v.onError=function(I,R){var y,x=R.frag;if(!x||x.type!==c.PlaylistLevelType.SUBTITLE)return;(y=this.fragCurrent)!==null&&y!==void 0&&y.loader&&this.fragCurrent.loader.abort(),this.state=r.State.IDLE},v.onSubtitleTracksUpdated=function(I,R){var y=this,x=R.subtitleTracks;this.tracksBuffered=[],this.levels=x.map(function(C){return new i.Level(C)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(C){y.tracksBuffered[C.id]=[]}),this.mediaBuffer=null},v.onSubtitleTrackSwitch=function(I,R){if(this.currentTrackId=R.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var y=this.levels[this.currentTrackId];y!=null&&y.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,y&&this.setInterval(u)},v.onSubtitleTrackLoaded=function(I,R){var y,x=R.details,C=R.id,S=this.currentTrackId,F=this.levels;if(!F.length)return;var j=F[S];if(C>=F.length||C!==S||!j)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,x.live||(y=j.details)!==null&&y!==void 0&&y.live){var A=this.mainDetails;if(x.deltaUpdateFailed||!A)return;var Y=A.fragments[0];if(!j.details)x.hasProgramDateTime&&A.hasProgramDateTime?Object(_.alignMediaPlaylistByPDT)(x,A):Y&&Object(t.addSliding)(x,Y.start);else{var z=this.alignPlaylists(x,j.details);z===0&&Y&&Object(t.addSliding)(x,Y.start)}}if(j.details=x,this.levelLastLoaded=C,this.tick(),x.live&&!this.fragCurrent&&this.media&&this.state===r.State.IDLE){var O=Object(T.findFragmentByPTS)(null,x.fragments,this.media.currentTime,0);O||(this.warn("Subtitle playlist not aligned with playback"),j.details=void 0)}},v._handleFragmentLoadComplete=function(I){var R=I.frag,y=I.payload,x=R.decryptdata,C=this.hls;if(this.fragContextChanged(R))return;if(y&&y.byteLength>0&&x&&x.key&&x.iv&&x.method==="AES-128"){var S=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(y),x.key.buffer,x.iv.buffer).then(function(F){var j=performance.now();C.trigger(k.Events.FRAG_DECRYPTED,{frag:R,payload:F,stats:{tstart:S,tdecrypt:j}})})}},v.doTick=function(){if(!this.media){this.state=r.State.IDLE;return}if(this.state===r.State.IDLE){var I,R=this.currentTrackId,y=this.levels;if(!y.length||!y[R]||!y[R].details)return;var x=y[R].details,C=x.targetduration,S=this.config,F=this.media,j=m.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,F.currentTime-C,S.maxBufferHole),A=j.end,Y=j.len,z=this.getMaxBufferLength()+C;if(Y>z)return;console.assert(x,"Subtitle track details are defined on idle subtitle stream controller tick");var O=x.fragments,H=O.length,U=x.edge,L,K=this.fragPrevious;if(A<U){var ee=S.maxFragLookUpTolerance;K&&x.hasProgramDateTime&&(L=Object(T.findFragmentByPDT)(O,K.endProgramDateTime,ee)),L||(L=Object(T.findFragmentByPTS)(K,O,A,ee),!L&&K&&K.start<O[0].start&&(L=O[0]))}else L=O[H-1];(I=L)!==null&&I!==void 0&&I.encrypted?(b.logger.log("Loading key for "+L.sn),this.state=r.State.KEY_LOADING,this.hls.trigger(k.Events.KEY_LOADING,{frag:L})):L&&this.fragmentTracker.getState(L)===h.FragmentState.NOT_LOADED&&this.loadFragment(L,x,A)}},v.loadFragment=function(I,R,y){this.fragCurrent=I,s.prototype.loadFragment.call(this,I,R,y)},l(E,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),E}(r.default)},"./src/controller/subtitle-track-controller.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/events.ts"),b=w("./src/utils/texttrack-utils.ts"),m=w("./src/controller/base-playlist-controller.ts"),T=w("./src/types/loader.ts");function _(n,l){for(var f=0;f<l.length;f++){var d=l[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(n,d.key,d)}}function t(n,l,f){return l&&_(n.prototype,l),f&&_(n,f),n}function h(n,l){n.prototype=Object.create(l.prototype),n.prototype.constructor=n,r(n,l)}function r(n,l){return r=Object.setPrototypeOf||function(d,u){return d.__proto__=u,d},r(n,l)}var c=function(n){h(l,n);function l(d){var u;return u=n.call(this,d,"[subtitle-track-controller]")||this,u.media=null,u.tracks=[],u.groupId=null,u.tracksInGroup=[],u.trackId=-1,u.selectDefaultTrack=!0,u.queuedDefaultTrack=-1,u.trackChangeListener=function(){return u.onTextTracksChanged()},u.asyncPollTrackChange=function(){return u.pollTrackChange(0)},u.useTextTrackPolling=!1,u.subtitlePollingInterval=-1,u.subtitleDisplay=!0,u.registerListeners(),u}var f=l.prototype;return f.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,n.prototype.destroy.call(this)},f.registerListeners=function(){var u=this.hls;u.on(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(k.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(k.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(k.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.on(k.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),u.on(k.Events.ERROR,this.onError,this)},f.unregisterListeners=function(){var u=this.hls;u.off(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(k.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(k.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(k.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.off(k.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),u.off(k.Events.ERROR,this.onError,this)},f.onMediaAttached=function(u,o){if(this.media=o.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)},f.pollTrackChange=function(u){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,u)},f.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 u=i(this.media.textTracks);u.forEach(function(o){Object(b.clearCurrentCues)(o)}),this.subtitleTrack=-1,this.media=null},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(u,o){this.tracks=o.subtitleTracks},f.onSubtitleTrackLoaded=function(u,o){var s=o.id,E=o.details,v=this.trackId,p=this.tracksInGroup[v];if(!p){this.warn("Invalid subtitle track id "+s);return}var I=p.details;p.details=o.details,this.log("subtitle track "+s+" loaded ["+E.startSN+"-"+E.endSN+"]"),s===this.trackId&&(this.retryCount=0,this.playlistLoaded(s,o,I))},f.onLevelLoading=function(u,o){this.switchLevel(o.level)},f.onLevelSwitching=function(u,o){this.switchLevel(o.level)},f.switchLevel=function(u){var o=this.hls.levels[u];if(!(o!=null&&o.textGroupIds))return;var s=o.textGroupIds[o.urlId];if(this.groupId!==s){var E=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,v=this.tracks.filter(function(R){return!s||R.groupId===s});this.tracksInGroup=v;var p=this.findTrackId(E==null?void 0:E.name)||this.findTrackId();this.groupId=s;var I={subtitleTracks:v};this.log("Updating subtitle tracks, "+v.length+' track(s) found in "'+s+'" group-id'),this.hls.trigger(k.Events.SUBTITLE_TRACKS_UPDATED,I),p!==-1&&this.setSubtitleTrack(p,E)}},f.findTrackId=function(u){for(var o=this.tracksInGroup,s=0;s<o.length;s++){var E=o[s];if((!this.selectDefaultTrack||E.default)&&(!u||u===E.name))return E.id}return-1},f.onError=function(u,o){if(n.prototype.onError.call(this,u,o),o.fatal||!o.context)return;o.context.type===T.PlaylistContextType.SUBTITLE_TRACK&&o.context.id===this.trackId&&o.context.groupId===this.groupId&&this.retryLoadingOrFail(o)},f.loadPlaylist=function(u){var o=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(o)){var s=o.id,E=o.groupId,v=o.url;if(u)try{v=u.addDirectives(v)}catch(p){this.warn("Could not construct new URL with HLS Delivery Directives: "+p)}this.log("Loading subtitle playlist for id "+s),this.hls.trigger(k.Events.SUBTITLE_TRACK_LOADING,{url:v,id:s,groupId:E,deliveryDirectives:u||null})}},f.toggleTrackModes=function(u){var o=this,s=this.media,E=this.subtitleDisplay,v=this.trackId;if(!s)return;var p=i(s.textTracks),I=p.filter(function(x){return x.groupId===o.groupId});if(u===-1)[].slice.call(p).forEach(function(x){x.mode="disabled"});else{var R=I[v];R&&(R.mode="disabled")}var y=I[u];y&&(y.mode=E?"showing":"hidden")},f.setSubtitleTrack=function(u,o){var s,E=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=u;return}if(this.trackId!==u&&this.toggleTrackModes(u),this.trackId===u&&(u===-1||(s=E[u])!==null&&s!==void 0&&s.details)||u<-1||u>=E.length)return;this.clearTimer();var v=E[u];if(this.log("Switching to subtitle track "+u),this.trackId=u,v){var p=v.id,I=v.groupId,R=I===void 0?"":I,y=v.name,x=v.type,C=v.url;this.hls.trigger(k.Events.SUBTITLE_TRACK_SWITCH,{id:p,groupId:R,name:y,type:x,url:C});var S=this.switchParams(v.url,o==null?void 0:o.details);this.loadPlaylist(S)}else this.hls.trigger(k.Events.SUBTITLE_TRACK_SWITCH,{id:u})},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var u=-1,o=i(this.media.textTracks),s=0;s<o.length;s++)if(o[s].mode==="hidden")u=s;else if(o[s].mode==="showing"){u=s;break}this.subtitleTrack!==u&&(this.subtitleTrack=u)},t(l,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(u){this.selectDefaultTrack=!1;var o=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(u,o)}}]),l}(m.default);function i(n){for(var l=[],f=0;f<n.length;f++){var d=n[f];d.kind==="subtitles"&&d.label&&l.push(n[f])}return l}g.default=c},"./src/controller/timeline-controller.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"TimelineController",function(){return i});var k=w("./src/polyfills/number.ts"),b=w("./src/events.ts"),m=w("./src/utils/cea-608-parser.ts"),T=w("./src/utils/output-filter.ts"),_=w("./src/utils/webvtt-parser.ts"),t=w("./src/utils/texttrack-utils.ts"),h=w("./src/utils/imsc1-ttml-parser.ts"),r=w("./src/types/loader.ts"),c=w("./src/utils/logger.ts"),i=function(){function d(o){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=f(),this.captionsProperties=void 0,this.hls=o,this.config=o.config,this.Cues=o.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 s=new T.default(this,"textTrack1"),E=new T.default(this,"textTrack2"),v=new T.default(this,"textTrack3"),p=new T.default(this,"textTrack4");this.cea608Parser1=new m.default(1,s,E),this.cea608Parser2=new m.default(3,v,p)}o.on(b.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.on(b.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(b.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(b.Events.MANIFEST_LOADED,this.onManifestLoaded,this),o.on(b.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),o.on(b.Events.FRAG_LOADING,this.onFragLoading,this),o.on(b.Events.FRAG_LOADED,this.onFragLoaded,this),o.on(b.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),o.on(b.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),o.on(b.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),o.on(b.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),o.on(b.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var u=d.prototype;return u.destroy=function(){var s=this.hls;s.off(b.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.off(b.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.off(b.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(b.Events.MANIFEST_LOADED,this.onManifestLoaded,this),s.off(b.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),s.off(b.Events.FRAG_LOADING,this.onFragLoading,this),s.off(b.Events.FRAG_LOADED,this.onFragLoaded,this),s.off(b.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),s.off(b.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),s.off(b.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),s.off(b.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),s.off(b.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},u.addCues=function(s,E,v,p,I){for(var R=!1,y=I.length;y--;){var x=I[y],C=l(x[0],x[1],E,v);if(C>=0&&(x[0]=Math.min(x[0],E),x[1]=Math.max(x[1],v),R=!0,C/(v-E)>.5))return}if(R||I.push([E,v]),this.config.renderTextTracksNatively){var S=this.captionsTracks[s];this.Cues.newCue(S,E,v,p)}else{var F=this.Cues.newCue(null,E,v,p);this.hls.trigger(b.Events.CUES_PARSED,{type:"captions",cues:F,track:s})}},u.onInitPtsFound=function(s,E){var v=this,p=E.frag,I=E.id,R=E.initPTS,y=E.timescale,x=this.unparsedVttFrags;I==="main"&&(this.initPTS[p.cc]=R,this.timescale[p.cc]=y),x.length&&(this.unparsedVttFrags=[],x.forEach(function(C){v.onFragLoaded(b.Events.FRAG_LOADED,C)}))},u.getExistingTrack=function(s){var E=this.media;if(E)for(var v=0;v<E.textTracks.length;v++){var p=E.textTracks[v];if(p[s])return p}return null},u.createCaptionsTrack=function(s){this.config.renderTextTracksNatively?this.createNativeTrack(s):this.createNonNativeTrack(s)},u.createNativeTrack=function(s){if(this.captionsTracks[s])return;var E=this.captionsProperties,v=this.captionsTracks,p=this.media,I=E[s],R=I.label,y=I.languageCode,x=this.getExistingTrack(s);if(x)v[s]=x,Object(t.clearCurrentCues)(v[s]),Object(t.sendAddTrackEvent)(v[s],p);else{var C=this.createTextTrack("captions",R,y);C&&(C[s]=!0,v[s]=C)}},u.createNonNativeTrack=function(s){if(this.nonNativeCaptionsTracks[s])return;var E=this.captionsProperties[s];if(!E)return;var v=E.label,p={_id:s,label:v,kind:"captions",default:E.media?!!E.media.default:!1,closedCaptions:E.media};this.nonNativeCaptionsTracks[s]=p,this.hls.trigger(b.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[p]})},u.createTextTrack=function(s,E,v){var p=this.media;return p?p.addTextTrack(s,E,v):void 0},u.onMediaAttaching=function(s,E){this.media=E.media,this._cleanTracks()},u.onMediaDetaching=function(){var s=this.captionsTracks;Object.keys(s).forEach(function(E){Object(t.clearCurrentCues)(s[E]),delete s[E]}),this.nonNativeCaptionsTracks={}},u.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=f(),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())},u._cleanTracks=function(){var s=this.media;if(!s)return;var E=s.textTracks;if(E)for(var v=0;v<E.length;v++)Object(t.clearCurrentCues)(E[v])},u.onSubtitleTracksUpdated=function(s,E){var v=this;this.textTracks=[];var p=E.subtitleTracks||[],I=p.some(function(C){return C.textCodec===h.IMSC1_CODEC});if(this.config.enableWebVTT||I&&this.config.enableIMSC1){var R=this.tracks&&p&&this.tracks.length===p.length;if(this.tracks=p||[],this.config.renderTextTracksNatively){var y=this.media?this.media.textTracks:[];this.tracks.forEach(function(C,S){var F;if(S<y.length){for(var j=null,A=0;A<y.length;A++)if(n(y[A],C)){j=y[A];break}j&&(F=j)}F?Object(t.clearCurrentCues)(F):(F=v.createTextTrack("subtitles",C.name,C.lang),F&&(F.mode="disabled")),F&&(F.groupId=C.groupId,v.textTracks.push(F))})}else if(!R&&this.tracks&&this.tracks.length){var x=this.tracks.map(function(C){return{label:C.name,kind:C.type.toLowerCase(),default:C.default,subtitleTrack:C}});this.hls.trigger(b.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:x})}}},u.onManifestLoaded=function(s,E){var v=this;this.config.enableCEA708Captions&&E.captions&&E.captions.forEach(function(p){var I=/(?:CC|SERVICE)([1-4])/.exec(p.instreamId);if(!I)return;var R="textTrack"+I[1],y=v.captionsProperties[R];if(!y)return;y.label=p.name,p.lang&&(y.languageCode=p.lang),y.media=p})},u.onFragLoading=function(s,E){var v=this.cea608Parser1,p=this.cea608Parser2,I=this.lastSn,R=this.lastPartIndex;if(!this.enabled||!(v&&p))return;if(E.frag.type===r.PlaylistLevelType.MAIN){var y,x,C=E.frag.sn,S=(y=E==null||((x=E.part)===null||x===void 0)?void 0:x.index)!=null?y:-1;C===I+1||C===I&&S===R+1||(v.reset(),p.reset()),this.lastSn=C,this.lastPartIndex=S}},u.onFragLoaded=function(s,E){var v=E.frag,p=E.payload,I=this.initPTS,R=this.unparsedVttFrags;if(v.type===r.PlaylistLevelType.SUBTITLE)if(p.byteLength){if(!Object(k.isFiniteNumber)(I[v.cc])){R.push(E),I.length&&this.hls.trigger(b.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:v,error:new Error("Missing initial subtitle PTS")});return}var y=v.decryptdata;if(y==null||y.key==null||y.method!=="AES-128"){var x=this.tracks[v.level],C=this.vttCCs;C[v.cc]||(C[v.cc]={start:v.start,prevCC:this.prevCC,new:!0},this.prevCC=v.cc),x&&x.textCodec===h.IMSC1_CODEC?this._parseIMSC1(v,p):this._parseVTTs(v,p,C)}}else this.hls.trigger(b.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:v,error:new Error("Empty subtitle payload")})},u._parseIMSC1=function(s,E){var v=this,p=this.hls;Object(h.parseIMSC1)(E,this.initPTS[s.cc],this.timescale[s.cc],function(I){v._appendCues(I,s.level),p.trigger(b.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:s})},function(I){c.logger.log("Failed to parse IMSC1: "+I),p.trigger(b.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:I})})},u._parseVTTs=function(s,E,v){var p=this,I=this.hls;Object(_.parseWebVTT)(E,this.initPTS[s.cc],this.timescale[s.cc],v,s.cc,s.start,function(R){p._appendCues(R,s.level),I.trigger(b.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:s})},function(R){p._fallbackToIMSC1(s,E),c.logger.log("Failed to parse VTT cue: "+R),I.trigger(b.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:R})})},u._fallbackToIMSC1=function(s,E){var v=this,p=this.tracks[s.level];p.textCodec||Object(h.parseIMSC1)(E,this.initPTS[s.cc],this.timescale[s.cc],function(){p.textCodec=h.IMSC1_CODEC,v._parseIMSC1(s,E)},function(){p.textCodec="wvtt"})},u._appendCues=function(s,E){var v=this.hls;if(this.config.renderTextTracksNatively){var p=this.textTracks[E];if(p.mode==="disabled")return;s.forEach(function(y){return Object(t.addCueToTrack)(p,y)})}else{var I=this.tracks[E],R=I.default?"default":"subtitles"+E;v.trigger(b.Events.CUES_PARSED,{type:"subtitles",cues:s,track:R})}},u.onFragDecrypted=function(s,E){var v=E.frag;if(v.type===r.PlaylistLevelType.SUBTITLE){if(!Object(k.isFiniteNumber)(this.initPTS[v.cc])){this.unparsedVttFrags.push(E);return}this.onFragLoaded(b.Events.FRAG_LOADED,E)}},u.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},u.onFragParsingUserdata=function(s,E){var v=this.cea608Parser1,p=this.cea608Parser2;if(!this.enabled||!(v&&p))return;for(var I=0;I<E.samples.length;I++){var R=E.samples[I].bytes;if(R){var y=this.extractCea608Data(R);v.addData(E.samples[I].pts,y[0]),p.addData(E.samples[I].pts,y[1])}}},u.onBufferFlushing=function(s,E){var v=E.startOffset,p=E.endOffset,I=E.endOffsetSubtitles,R=E.type,y=this.media;if(!y||y.currentTime<p)return;if(!R||R==="video"){var x=this.captionsTracks;Object.keys(x).forEach(function(S){return Object(t.removeCuesInRange)(x[S],v,p)})}if(this.config.renderTextTracksNatively&&(v===0&&I!==void 0)){var C=this.textTracks;Object.keys(C).forEach(function(S){return Object(t.removeCuesInRange)(C[S],v,I)})}},u.extractCea608Data=function(s){for(var E=s[0]&31,v=2,p=[[],[]],I=0;I<E;I++){var R=s[v++],y=127&s[v++],x=127&s[v++],C=(4&R)!==0,S=3&R;if(y===0&&x===0)continue;C&&((S===0||S===1)&&(p[S].push(y),p[S].push(x)))}return p},d}();function n(d,u){return d&&d.label===u.name&&!(d.textTrack1||d.textTrack2)}function l(d,u,o,s){return Math.min(u,s)-Math.max(d,o)}function f(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return k});var k=function(){function b(T,_){this.subtle=void 0,this.aesIV=void 0,this.subtle=T,this.aesIV=_}var m=b.prototype;return m.decrypt=function(_,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,_)},b}()},"./src/crypt/aes-decryptor.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"removePadding",function(){return b}),w.d(g,"default",function(){return m});var k=w("./src/utils/typed-array.ts");function b(T){var _=T.byteLength,t=_&&new DataView(T.buffer).getUint8(_-1);return t?Object(k.sliceUint8)(T,0,_-t):T}var m=function(){function T(){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 _=T.prototype;return _.uint8ArrayToUint32Array_=function(h){for(var r=new DataView(h),c=new Uint32Array(4),i=0;i<4;i++)c[i]=r.getUint32(i*4);return c},_.initTable=function(){var h=this.sBox,r=this.invSBox,c=this.subMix,i=c[0],n=c[1],l=c[2],f=c[3],d=this.invSubMix,u=d[0],o=d[1],s=d[2],E=d[3],v=new Uint32Array(256),p=0,I=0,R=0;for(R=0;R<256;R++)R<128?v[R]=R<<1:v[R]=R<<1^283;for(R=0;R<256;R++){var y=I^I<<1^I<<2^I<<3^I<<4;y=y>>>8^y&255^99,h[p]=y,r[y]=p;var x=v[p],C=v[x],S=v[C],F=v[y]*257^y*16843008;i[p]=F<<24|F>>>8,n[p]=F<<16|F>>>16,l[p]=F<<8|F>>>24,f[p]=F,F=S*16843009^C*65537^x*257^p*16843008,u[y]=F<<24|F>>>8,o[y]=F<<16|F>>>16,s[y]=F<<8|F>>>24,E[y]=F,p?(p=x^v[v[v[S^x]]],I^=v[v[I]]):p=I=1}},_.expandKey=function(h){for(var r=this.uint8ArrayToUint32Array_(h),c=!0,i=0;i<r.length&&c;)c=r[i]===this.key[i],i++;if(c)return;this.key=r;var n=this.keySize=r.length;if(n!==4&&n!==6&&n!==8)throw new Error("Invalid aes key size="+n);var l=this.ksRows=(n+6+1)*4,f,d,u=this.keySchedule=new Uint32Array(l),o=this.invKeySchedule=new Uint32Array(l),s=this.sBox,E=this.rcon,v=this.invSubMix,p=v[0],I=v[1],R=v[2],y=v[3],x,C;for(f=0;f<l;f++){if(f<n){x=u[f]=r[f];continue}C=x,f%n===0?(C=C<<8|C>>>24,C=s[C>>>24]<<24|s[C>>>16&255]<<16|s[C>>>8&255]<<8|s[C&255],C^=E[f/n|0]<<24):n>6&&f%n===4&&(C=s[C>>>24]<<24|s[C>>>16&255]<<16|s[C>>>8&255]<<8|s[C&255]),u[f]=x=(u[f-n]^C)>>>0}for(d=0;d<l;d++)f=l-d,d&3?C=u[f]:C=u[f-4],d<4||f<=4?o[d]=C:o[d]=p[s[C>>>24]]^I[s[C>>>16&255]]^R[s[C>>>8&255]]^y[s[C&255]],o[d]=o[d]>>>0},_.networkToHostOrderSwap=function(h){return h<<24|(h&65280)<<8|(h&16711680)>>8|h>>>24},_.decrypt=function(h,r,c){for(var i=this.keySize+6,n=this.invKeySchedule,l=this.invSBox,f=this.invSubMix,d=f[0],u=f[1],o=f[2],s=f[3],E=this.uint8ArrayToUint32Array_(c),v=E[0],p=E[1],I=E[2],R=E[3],y=new Int32Array(h),x=new Int32Array(y.length),C,S,F,j,A,Y,z,O,H,U,L,K,ee,oe,ae=this.networkToHostOrderSwap;r<y.length;){for(H=ae(y[r]),U=ae(y[r+1]),L=ae(y[r+2]),K=ae(y[r+3]),A=H^n[0],Y=K^n[1],z=L^n[2],O=U^n[3],ee=4,oe=1;oe<i;oe++)C=d[A>>>24]^u[Y>>16&255]^o[z>>8&255]^s[O&255]^n[ee],S=d[Y>>>24]^u[z>>16&255]^o[O>>8&255]^s[A&255]^n[ee+1],F=d[z>>>24]^u[O>>16&255]^o[A>>8&255]^s[Y&255]^n[ee+2],j=d[O>>>24]^u[A>>16&255]^o[Y>>8&255]^s[z&255]^n[ee+3],A=C,Y=S,z=F,O=j,ee=ee+4;C=l[A>>>24]<<24^l[Y>>16&255]<<16^l[z>>8&255]<<8^l[O&255]^n[ee],S=l[Y>>>24]<<24^l[z>>16&255]<<16^l[O>>8&255]<<8^l[A&255]^n[ee+1],F=l[z>>>24]<<24^l[O>>16&255]<<16^l[A>>8&255]<<8^l[Y&255]^n[ee+2],j=l[O>>>24]<<24^l[A>>16&255]<<16^l[Y>>8&255]<<8^l[z&255]^n[ee+3],x[r]=ae(C^v),x[r+1]=ae(j^p),x[r+2]=ae(F^I),x[r+3]=ae(S^R),v=H,p=U,I=L,R=K,r=r+4}return x.buffer},T}()},"./src/crypt/decrypter.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return r});var k=w("./src/crypt/aes-crypto.ts"),b=w("./src/crypt/fast-aes-key.ts"),m=w("./src/crypt/aes-decryptor.ts"),T=w("./src/utils/logger.ts"),_=w("./src/utils/mp4-tools.ts"),t=w("./src/utils/typed-array.ts"),h=16,r=function(){function c(n,l,f){var d=f===void 0?{}:f,u=d.removePKCS7Padding,o=u===void 0?!0:u;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=l,this.removePKCS7Padding=o,o)try{var s=self.crypto;s&&(this.subtle=s.subtle||s.webkitSubtle)}catch(E){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var i=c.prototype;return i.destroy=function(){this.observer=null},i.isSync=function(){return this.config.enableSoftwareAES},i.flush=function(){var l=this.currentResult;if(!l){this.reset();return}var f=new Uint8Array(l);return this.reset(),this.removePKCS7Padding?Object(m.removePadding)(f):f},i.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},i.decrypt=function(l,f,d,u){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(l),f,d);var o=this.flush();o&&u(o.buffer)}else this.webCryptoDecrypt(new Uint8Array(l),f,d).then(u)},i.softwareDecrypt=function(l,f,d){var u=this.currentIV,o=this.currentResult,s=this.remainderData;this.logOnce("JS AES decrypt"),s&&(l=Object(_.appendUint8Array)(s,l),this.remainderData=null);var E=this.getValidChunk(l);if(!E.length)return null;u&&(d=u);var v=this.softwareDecrypter;v||(v=this.softwareDecrypter=new m.default),v.expandKey(f);var p=o;return this.currentResult=v.decrypt(E.buffer,0,d),this.currentIV=Object(t.sliceUint8)(E,-16).buffer,p||null},i.webCryptoDecrypt=function(l,f,d){var u=this,o=this.subtle;return(this.key!==f||!this.fastAesKey)&&(this.key=f,this.fastAesKey=new b.default(o,f)),this.fastAesKey.expandKey().then(function(s){if(!o)return Promise.reject(new Error("web crypto not initialized"));var E=new k.default(o,d);return E.decrypt(l.buffer,s)}).catch(function(s){return u.onWebCryptoError(s,l,f,d)})},i.onWebCryptoError=function(l,f,d,u){return T.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",l),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(f,d,u)},i.getValidChunk=function(l){var f=l,d=l.length-l.length%h;return d!==l.length&&(f=Object(t.sliceUint8)(l,0,d),this.remainderData=Object(t.sliceUint8)(l,d)),f},i.logOnce=function(l){if(!this.logEnabled)return;T.logger.log("[decrypter.ts]: "+l),this.logEnabled=!1},c}()},"./src/crypt/fast-aes-key.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return k});var k=function(){function b(T,_){this.subtle=void 0,this.key=void 0,this.subtle=T,this.key=_}var m=b.prototype;return m.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},b}()},"./src/demux/aacdemuxer.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/demux/base-audio-demuxer.ts"),b=w("./src/demux/adts.ts"),m=w("./src/utils/logger.ts"),T=w("./src/demux/id3.ts");function _(r,c){r.prototype=Object.create(c.prototype),r.prototype.constructor=r,t(r,c)}function t(r,c){return t=Object.setPrototypeOf||function(n,l){return n.__proto__=l,n},t(r,c)}var h=function(r){_(c,r);function c(n,l){var f;return f=r.call(this)||this,f.observer=void 0,f.config=void 0,f.observer=n,f.config=l,f}var i=c.prototype;return i.resetInitSegment=function(l,f,d){r.prototype.resetInitSegment.call(this,l,f,d),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:l,duration:d,inputTimeScale:9e4,dropped:0}},c.probe=function(l){if(!l)return!1;for(var f=T.getID3Data(l,0)||[],d=f.length,u=l.length;d<u;d++)if(b.probe(l,d))return m.logger.log("ADTS sync word found !"),!0;return!1},i.canParse=function(l,f){return b.canParse(l,f)},i.appendFrame=function(l,f,d){b.initTrackConfig(l,this.observer,f,d,l.manifestCodec);var u=b.appendFrame(l,f,d,this.initPTS,this.frameIndex);if(u&&u.missing===0)return u},c}(k.default);h.minProbeByteLength=9,g.default=h},"./src/demux/adts.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"getAudioConfig",function(){return T}),w.d(g,"isHeaderPattern",function(){return _}),w.d(g,"getHeaderLength",function(){return t}),w.d(g,"getFullFrameLength",function(){return h}),w.d(g,"canGetFrameLength",function(){return r}),w.d(g,"isHeader",function(){return c}),w.d(g,"canParse",function(){return i}),w.d(g,"probe",function(){return n}),w.d(g,"initTrackConfig",function(){return l}),w.d(g,"getFrameDuration",function(){return f}),w.d(g,"parseFrameHeader",function(){return d}),w.d(g,"appendFrame",function(){return u});var k=w("./src/utils/logger.ts"),b=w("./src/errors.ts"),m=w("./src/events.ts");function T(o,s,E,v){var p,I,R,y,x=navigator.userAgent.toLowerCase(),C=v,S=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];p=((s[E+2]&192)>>>6)+1;var F=(s[E+2]&60)>>>2;if(F>S.length-1){o.trigger(m.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+F});return}return R=(s[E+2]&1)<<2,R|=(s[E+3]&192)>>>6,k.logger.log("manifest codec:"+v+", ADTS type:"+p+", samplingIndex:"+F),/firefox/i.test(x)?F>=6?(p=5,y=new Array(4),I=F-3):(p=2,y=new Array(2),I=F):x.indexOf("android")!==-1?(p=2,y=new Array(2),I=F):(p=5,y=new Array(4),v&&(v.indexOf("mp4a.40.29")!==-1||v.indexOf("mp4a.40.5")!==-1)||!v&&F>=6?I=F-3:((v&&v.indexOf("mp4a.40.2")!==-1&&(F>=6&&R===1||/vivaldi/i.test(x))||!v&&R===1)&&(p=2,y=new Array(2)),I=F)),y[0]=p<<3,y[0]|=(F&14)>>1,y[1]|=(F&1)<<7,y[1]|=R<<3,p===5&&(y[1]|=(I&14)>>1,y[2]=(I&1)<<7,y[2]|=2<<2,y[3]=0),{config:y,samplerate:S[F],channelCount:R,codec:"mp4a.40."+p,manifestCodec:C}}function _(o,s){return o[s]===255&&(o[s+1]&246)===240}function t(o,s){return o[s+1]&1?7:9}function h(o,s){return(o[s+3]&3)<<11|o[s+4]<<3|(o[s+5]&224)>>>5}function r(o,s){return s+5<o.length}function c(o,s){return s+1<o.length&&_(o,s)}function i(o,s){return r(o,s)&&_(o,s)&&h(o,s)<=o.length-s}function n(o,s){if(c(o,s)){var E=t(o,s);if(s+E>=o.length)return!1;var v=h(o,s);if(v<=E)return!1;var p=s+v;return p===o.length||c(o,p)}return!1}function l(o,s,E,v,p){if(!o.samplerate){var I=T(s,E,v,p);if(!I)return;o.config=I.config,o.samplerate=I.samplerate,o.channelCount=I.channelCount,o.codec=I.codec,o.manifestCodec=I.manifestCodec,k.logger.log("parsed codec:"+o.codec+", rate:"+I.samplerate+", channels:"+I.channelCount)}}function f(o){return 1024*9e4/o}function d(o,s,E,v,p){var I=t(o,s),R=h(o,s);if(R-=I,R>0){var y=E+v*p;return{headerLength:I,frameLength:R,stamp:y}}}function u(o,s,E,v,p){var I=f(o.samplerate),R=d(s,E,v,p,I);if(R){var y=R.frameLength,x=R.headerLength,C=R.stamp,S=x+y,F=Math.max(0,E+S-s.length),j;F?(j=new Uint8Array(S-x),j.set(s.subarray(E+x,s.length),0)):j=s.subarray(E+x,E+S);var A={unit:j,pts:C};return F||o.samples.push(A),{sample:A,length:S,missing:F}}}},"./src/demux/base-audio-demuxer.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"initPTSFn",function(){return h});var k=w("./src/polyfills/number.ts"),b=w("./src/demux/id3.ts"),m=w("./src/demux/dummy-demuxed-track.ts"),T=w("./src/utils/mp4-tools.ts"),_=w("./src/utils/typed-array.ts"),t=function(){function r(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var c=r.prototype;return c.resetInitSegment=function(n,l,f){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,l){return!1},c.appendFrame=function(n,l,f){},c.demux=function(n,l){this.cachedData&&(n=Object(T.appendUint8Array)(this.cachedData,n),this.cachedData=null);var f=b.getID3Data(n,0),d=f?f.length:0,u,o,s=this._audioTrack,E=this._id3Track,v=f?b.getTimeStamp(f):void 0,p=n.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=h(v,l)),f&&f.length>0&&E.samples.push({pts:this.initPTS,dts:this.initPTS,data:f}),o=this.initPTS;d<p;){if(this.canParse(n,d)){var I=this.appendFrame(s,n,d);I?(this.frameIndex++,o=I.sample.pts,d+=I.length,u=d):d=p}else b.canParse(n,d)?(f=b.getID3Data(n,d),E.samples.push({pts:o,dts:o,data:f}),d+=f.length,u=d):d++;if(d===p&&u!==p){var R=Object(_.sliceUint8)(n,u);this.cachedData?this.cachedData=Object(T.appendUint8Array)(this.cachedData,R):this.cachedData=R}}return{audioTrack:s,avcTrack:Object(m.dummyTrack)(),id3Track:E,textTrack:Object(m.dummyTrack)()}},c.demuxSampleAes=function(n,l,f){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},c.flush=function(n){var l=this.cachedData;return l&&(this.cachedData=null,this.demux(l,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(m.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(m.dummyTrack)()}},c.destroy=function(){},r}(),h=function(c,i){return Object(k.isFiniteNumber)(c)?c*90:i*9e4};g.default=t},"./src/demux/chunk-cache.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return k});var k=function(){function m(){this.chunks=[],this.dataLength=0}var T=m.prototype;return T.push=function(t){this.chunks.push(t),this.dataLength+=t.length},T.flush=function(){var t=this.chunks,h=this.dataLength,r;if(t.length)t.length===1?r=t[0]:r=b(t,h);else return new Uint8Array(0);return this.reset(),r},T.reset=function(){this.chunks.length=0,this.dataLength=0},m}();function b(m,T){for(var _=new Uint8Array(T),t=0,h=0;h<m.length;h++){var r=m[h];_.set(r,t),t+=r.length}return _}},"./src/demux/dummy-demuxed-track.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"dummyTrack",function(){return k});function k(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/utils/logger.ts"),b=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 T=m.prototype;return T.loadWord=function(){var t=this.data,h=this.bytesAvailable,r=t.byteLength-h,c=new Uint8Array(4),i=Math.min(4,h);if(i===0)throw new Error("no bytes available");c.set(t.subarray(r,r+i)),this.word=new DataView(c.buffer).getUint32(0),this.bitsAvailable=i*8,this.bytesAvailable-=i},T.skipBits=function(t){var h;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,h=t>>3,t-=h>>3,this.bytesAvailable-=h,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},T.readBits=function(t){var h=Math.min(this.bitsAvailable,t),r=this.word>>>32-h;return t>32&&k.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=h,this.bitsAvailable>0?this.word<<=h:this.bytesAvailable>0&&this.loadWord(),h=t-h,h>0&&this.bitsAvailable?r<<h|this.readBits(h):r},T.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()},T.skipUEG=function(){this.skipBits(1+this.skipLZ())},T.skipEG=function(){this.skipBits(1+this.skipLZ())},T.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},T.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},T.readBoolean=function(){return this.readBits(1)===1},T.readUByte=function(){return this.readBits(8)},T.readUShort=function(){return this.readBits(16)},T.readUInt=function(){return this.readBits(32)},T.skipScalingList=function(t){for(var h=8,r=8,c,i=0;i<t;i++)r!==0&&(c=this.readEG(),r=(h+c+256)%256),h=r===0?h:r},T.readSPS=function(){var t=0,h=0,r=0,c=0,i,n,l,f=this.readUByte.bind(this),d=this.readBits.bind(this),u=this.readUEG.bind(this),o=this.readBoolean.bind(this),s=this.skipBits.bind(this),E=this.skipEG.bind(this),v=this.skipUEG.bind(this),p=this.skipScalingList.bind(this);f();var I=f();if(d(5),s(3),f(),v(),I===100||I===110||I===122||I===244||I===44||I===83||I===86||I===118||I===128){var R=u();if(R===3&&s(1),v(),v(),s(1),o())for(n=R!==3?8:12,l=0;l<n;l++)o()&&(l<6?p(16):p(64))}v();var y=u();if(y===0)u();else if(y===1)for(s(1),E(),E(),i=u(),l=0;l<i;l++)E();v(),s(1);var x=u(),C=u(),S=d(1);S===0&&s(1),s(1),o()&&(t=u(),h=u(),r=u(),c=u());var F=[1,1];if(o()&&o()){var j=f();switch(j){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=[f()<<8|f(),f()<<8|f()];break}}}return{width:Math.ceil((x+1)*16-t*2-h*2),height:(2-S)*(C+1)*16-(S?2:4)*(r+c),pixelRatio:F}},T.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},m}();g.default=b},"./src/demux/id3.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"isHeader",function(){return k}),w.d(g,"isFooter",function(){return b}),w.d(g,"getID3Data",function(){return m}),w.d(g,"canParse",function(){return _}),w.d(g,"getTimeStamp",function(){return t}),w.d(g,"isTimeStampFrame",function(){return h}),w.d(g,"getID3Frames",function(){return c}),w.d(g,"decodeFrame",function(){return i}),w.d(g,"utf8ArrayToStr",function(){return u}),w.d(g,"testables",function(){return o});var k=function(p,I){return I+10<=p.length&&(p[I]===73&&p[I+1]===68&&p[I+2]===51&&(p[I+3]<255&&p[I+4]<255&&(p[I+6]<128&&p[I+7]<128&&p[I+8]<128&&p[I+9]<128)))},b=function(p,I){return I+10<=p.length&&(p[I]===51&&p[I+1]===68&&p[I+2]===73&&(p[I+3]<255&&p[I+4]<255&&(p[I+6]<128&&p[I+7]<128&&p[I+8]<128&&p[I+9]<128)))},m=function(p,I){for(var R=I,y=0;k(p,I);){y+=10;var x=T(p,I+6);y+=x,b(p,I+10)&&(y+=10),I+=y}return y>0?p.subarray(R,R+y):void 0},T=function(p,I){var R=0;return R=(p[I]&127)<<21,R|=(p[I+1]&127)<<14,R|=(p[I+2]&127)<<7,R|=p[I+3]&127,R},_=function(p,I){return k(p,I)&&T(p,I+6)+10<=p.length-I},t=function(p){for(var I=c(p),R=0;R<I.length;R++){var y=I[R];if(h(y))return d(y)}return},h=function(p){return p&&p.key==="PRIV"&&p.info==="com.apple.streaming.transportStreamTimestamp"},r=function(p){var I=String.fromCharCode(p[0],p[1],p[2],p[3]),R=T(p,4),y=10;return{type:I,size:R,data:p.subarray(y,y+R)}},c=function(p){for(var I=0,R=[];k(p,I);){var y=T(p,I+6);I+=10;for(var x=I+y;I+8<x;){var C=r(p.subarray(I)),S=i(C);S&&R.push(S),I+=C.size+10}b(p,I)&&(I+=10)}return R},i=function(p){return p.type==="PRIV"?n(p):p.type[0]==="W"?f(p):l(p)},n=function(p){if(p.size<2)return;var I=u(p.data,!0),R=new Uint8Array(p.data.subarray(I.length+1));return{key:p.type,info:I,data:R.buffer}},l=function(p){if(p.size<2)return;if(p.type==="TXXX"){var I=1,R=u(p.data.subarray(I),!0);I+=R.length+1;var y=u(p.data.subarray(I));return{key:p.type,info:R,data:y}}var x=u(p.data.subarray(1));return{key:p.type,data:x}},f=function(p){if(p.type==="WXXX"){if(p.size<2)return;var I=1,R=u(p.data.subarray(I),!0);I+=R.length+1;var y=u(p.data.subarray(I));return{key:p.type,info:R,data:y}}var x=u(p.data);return{key:p.type,data:x}},d=function(p){if(p.data.byteLength===8){var I=new Uint8Array(p.data),R=I[3]&1,y=(I[4]<<23)+(I[5]<<15)+(I[6]<<7)+I[7];return y/=45,R&&(y+=4772185884e-2),Math.round(y)}return},u=function(p,I){I===void 0&&(I=!1);var R=E();if(R){var y=R.decode(p);if(I){var x=y.indexOf("\0");return x!==-1?y.substring(0,x):y}return y.replace(/\0/g,"")}for(var C=p.length,S,F,j,A="",Y=0;Y<C;){if(S=p[Y++],S===0&&I)return A;if(S===0||S===3)continue;switch(S>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:A+=String.fromCharCode(S);break;case 12:case 13:F=p[Y++],A+=String.fromCharCode((S&31)<<6|F&63);break;case 14:F=p[Y++],j=p[Y++],A+=String.fromCharCode((S&15)<<12|(F&63)<<6|(j&63)<<0);break;default:}}return A},o={decodeTextFrame:l},s;function E(){return!s&&typeof self.TextDecoder!="undefined"&&(s=new self.TextDecoder("utf-8")),s}},"./src/demux/mp3demuxer.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/demux/base-audio-demuxer.ts"),b=w("./src/demux/id3.ts"),m=w("./src/utils/logger.ts"),T=w("./src/demux/mpegaudio.ts");function _(r,c){r.prototype=Object.create(c.prototype),r.prototype.constructor=r,t(r,c)}function t(r,c){return t=Object.setPrototypeOf||function(n,l){return n.__proto__=l,n},t(r,c)}var h=function(r){_(c,r);function c(){return r.apply(this,arguments)||this}var i=c.prototype;return i.resetInitSegment=function(l,f,d){r.prototype.resetInitSegment.call(this,l,f,d),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:l,duration:d,inputTimeScale:9e4,dropped:0}},c.probe=function(l){if(!l)return!1;for(var f=b.getID3Data(l,0)||[],d=f.length,u=l.length;d<u;d++)if(T.probe(l,d))return m.logger.log("MPEG Audio sync word found !"),!0;return!1},i.canParse=function(l,f){return T.canParse(l,f)},i.appendFrame=function(l,f,d){return this.initPTS===null?void 0:T.appendFrame(l,f,d,this.initPTS,this.frameIndex)},c}(k.default);h.minProbeByteLength=4,g.default=h},"./src/demux/mp4demuxer.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/utils/mp4-tools.ts"),b=w("./src/demux/dummy-demuxed-track.ts"),m=function(){function T(t,h){this.remainderData=null,this.config=void 0,this.config=h}var _=T.prototype;return _.resetTimeStamp=function(){},_.resetInitSegment=function(){},_.resetContiguity=function(){},T.probe=function(h){return Object(k.findBox)({data:h,start:0,end:Math.min(h.length,16384)},["moof"]).length>0},_.demux=function(h){var r=h,c=Object(b.dummyTrack)();if(this.config.progressive){this.remainderData&&(r=Object(k.appendUint8Array)(this.remainderData,h));var i=Object(k.segmentValidRange)(r);this.remainderData=i.remainder,c.samples=i.valid||new Uint8Array}else c.samples=r;return{audioTrack:Object(b.dummyTrack)(),avcTrack:c,id3Track:Object(b.dummyTrack)(),textTrack:Object(b.dummyTrack)()}},_.flush=function(){var h=Object(b.dummyTrack)();return h.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(b.dummyTrack)(),avcTrack:h,id3Track:Object(b.dummyTrack)(),textTrack:Object(b.dummyTrack)()}},_.demuxSampleAes=function(h,r,c){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},_.destroy=function(){},T}();m.minProbeByteLength=1024,g.default=m},"./src/demux/mpegaudio.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"appendFrame",function(){return t}),w.d(g,"parseHeader",function(){return h}),w.d(g,"isHeaderPattern",function(){return r}),w.d(g,"isHeader",function(){return c}),w.d(g,"canParse",function(){return i}),w.d(g,"probe",function(){return n});var k=null,b=[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],T=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],_=[0,1,1,4];function t(l,f,d,u,o){if(d+24>f.length)return;var s=h(f,d);if(s&&d+s.frameLength<=f.length){var E=s.samplesPerFrame*9e4/s.sampleRate,v=u+o*E,p={unit:f.subarray(d,d+s.frameLength),pts:v,dts:v};return l.config=[],l.channelCount=s.channelCount,l.samplerate=s.sampleRate,l.samples.push(p),{sample:p,length:s.frameLength,missing:0}}}function h(l,f){var d=l[f+1]>>3&3,u=l[f+1]>>1&3,o=l[f+2]>>4&15,s=l[f+2]>>2&3;if(d!==1&&o!==0&&o!==15&&s!==3){var E=l[f+2]>>1&1,v=l[f+3]>>6,p=d===3?3-u:u===3?3:4,I=b[p*14+o-1]*1e3,R=d===3?0:d===2?1:2,y=m[R*3+s],x=v===3?1:2,C=T[d][u],S=_[u],F=C*8*S,j=Math.floor(C*I/y+E)*S;if(k===null){var A=navigator.userAgent||"",Y=A.match(/Chrome\/(\d+)/i);k=Y?parseInt(Y[1]):0}var z=!!k&&k<=87;return z&&u===2&&I>=224e3&&v===0&&(l[f+3]=l[f+3]|128),{sampleRate:y,channelCount:x,frameLength:j,samplesPerFrame:F}}}function r(l,f){return l[f]===255&&(l[f+1]&224)===224&&(l[f+1]&6)!==0}function c(l,f){return f+1<l.length&&r(l,f)}function i(l,f){var d=4;return r(l,f)&&d<=l.length-f}function n(l,f){if(f+1<l.length&&r(l,f)){var d=4,u=h(l,f),o=d;u!=null&&u.frameLength&&(o=u.frameLength);var s=f+o;return s===l.length||c(l,s)}return!1}},"./src/demux/sample-aes.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/crypt/decrypter.ts"),b=w("./src/demux/tsdemuxer.ts"),m=function(){function T(t,h,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new k.default(t,h,{removePKCS7Padding:!1})}var _=T.prototype;return _.decryptBuffer=function(h,r){this.decrypter.decrypt(h,this.keyData.key.buffer,this.keyData.iv.buffer,r)},_.decryptAacSample=function(h,r,c,i){var n=h[r].unit,l=n.subarray(16,n.length-n.length%16),f=l.buffer.slice(l.byteOffset,l.byteOffset+l.length),d=this;this.decryptBuffer(f,function(u){var o=new Uint8Array(u);n.set(o,16),i||d.decryptAacSamples(h,r+1,c)})},_.decryptAacSamples=function(h,r,c){for(;;r++){if(r>=h.length){c();return}if(h[r].unit.length<32)continue;var i=this.decrypter.isSync();if(this.decryptAacSample(h,r,c,i),!i)return}},_.getAvcEncryptedData=function(h){for(var r=Math.floor((h.length-48)/160)*16+16,c=new Int8Array(r),i=0,n=32;n<=h.length-16;n+=160,i+=16)c.set(h.subarray(n,n+16),i);return c},_.getAvcDecryptedUnit=function(h,r){for(var c=new Uint8Array(r),i=0,n=32;n<=h.length-16;n+=160,i+=16)h.set(c.subarray(i,i+16),n);return h},_.decryptAvcSample=function(h,r,c,i,n,l){var f=Object(b.discardEPB)(n.data),d=this.getAvcEncryptedData(f),u=this;this.decryptBuffer(d.buffer,function(o){n.data=u.getAvcDecryptedUnit(f,o),l||u.decryptAvcSamples(h,r,c+1,i)})},_.decryptAvcSamples=function(h,r,c,i){if(h instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;r++,c=0){if(r>=h.length){i();return}for(var n=h[r].units;!(c>=n.length);c++){var l=n[c];if(l.data.length<=48||l.type!==1&&l.type!==5)continue;var f=this.decrypter.isSync();if(this.decryptAvcSample(h,r,c,i,l,f),!f)return}}},T}();g.default=m},"./src/demux/transmuxer-interface.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return n});var k=w("./node_modules/webworkify-webpack/index.js"),b=w.n(k),m=w("./src/events.ts"),T=w("./src/demux/transmuxer.ts"),_=w("./src/utils/logger.ts"),t=w("./src/errors.ts"),h=w("./src/utils/mediasource-helper.ts"),r=w("./node_modules/eventemitter3/index.js"),c=w.n(r),i=Object(h.getMediaSource)()||{isTypeSupported:function(){return!1}},n=function(){function l(d,u,o,s){var E=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=d,this.id=u,this.onTransmuxComplete=o,this.onFlush=s;var v=d.config,p=function(C,S){S=S||{},S.frag=E.frag,S.id=E.id,d.trigger(C,S)};this.observer=new r.EventEmitter,this.observer.on(m.Events.FRAG_DECRYPTED,p),this.observer.on(m.Events.ERROR,p);var I={mp4:i.isTypeSupported("video/mp4"),mpeg:i.isTypeSupported("audio/mpeg"),mp3:i.isTypeSupported('audio/mp4; codecs="mp3"')},R=navigator.vendor;if(v.enableWorker&&typeof Worker!="undefined"){_.logger.log("demuxing in webworker");var y;try{y=this.worker=k("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),y.addEventListener("message",this.onwmsg),y.onerror=function(x){d.trigger(m.Events.ERROR,{type:t.ErrorTypes.OTHER_ERROR,details:t.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(x.message+" ("+x.filename+":"+x.lineno+")")})},y.postMessage({cmd:"init",typeSupported:I,vendor:R,id:u,config:JSON.stringify(v)})}catch(x){_.logger.warn("Error in worker:",x),_.logger.error("Error while initializing DemuxerWorker, fallback to inline"),y&&self.URL.revokeObjectURL(y.objectURL),this.transmuxer=new T.default(this.observer,I,v,R,u),this.worker=null}}else this.transmuxer=new T.default(this.observer,I,v,R,u)}var f=l.prototype;return f.destroy=function(){var u=this.worker;if(u)u.removeEventListener("message",this.onwmsg),u.terminate(),this.worker=null;else{var o=this.transmuxer;o&&(o.destroy(),this.transmuxer=null)}var s=this.observer;s&&s.removeAllListeners(),this.observer=null},f.push=function(u,o,s,E,v,p,I,R,y,x){var C=this;y.transmuxing.start=self.performance.now();var S=this.transmuxer,F=this.worker,j=p?p.start:v.start,A=v.decryptdata,Y=this.frag,z=!(Y&&v.cc===Y.cc),O=!(Y&&y.level===Y.level),H=Y?y.sn-Y.sn:-1,U=this.part?y.part-this.part.index:1,L=!O&&(H===1||H===0&&U===1),K=self.performance.now();(O||H||v.stats.parsing.start===0)&&(v.stats.parsing.start=K),p&&(U||!L)&&(p.stats.parsing.start=K);var ee=new T.TransmuxState(z,L,R,O,j);if(!L||z){_.logger.log("[transmuxer-interface, "+v.type+"]: Starting new transmux session for sn: "+y.sn+" p: "+y.part+" level: "+y.level+" id: "+y.id+`
|
|
|
discontinuity: `+z+`
|
|
|
trackSwitch: `+O+`
|
|
|
contiguous: `+L+`
|
|
|
accurateTimeOffset: `+R+`
|
|
|
timeOffset: `+j);var oe=new T.TransmuxConfig(s,E,o,I,x);this.configureTransmuxer(oe)}if(this.frag=v,this.part=p,F)F.postMessage({cmd:"demux",data:u,decryptdata:A,chunkMeta:y,state:ee},u instanceof ArrayBuffer?[u]:[]);else if(S){var ae=S.push(u,A,y,ee);Object(T.isPromise)(ae)?ae.then(function(be){C.handleTransmuxComplete(be)}):this.handleTransmuxComplete(ae)}},f.flush=function(u){var o=this;u.transmuxing.start=self.performance.now();var s=this.transmuxer,E=this.worker;if(E)E.postMessage({cmd:"flush",chunkMeta:u});else if(s){var v=s.flush(u);Object(T.isPromise)(v)?v.then(function(p){o.handleFlushResult(p,u)}):this.handleFlushResult(v,u)}},f.handleFlushResult=function(u,o){var s=this;u.forEach(function(E){s.handleTransmuxComplete(E)}),this.onFlush(o)},f.onWorkerMessage=function(u){var o=u.data,s=this.hls;switch(o.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(o.data);break}case"flush":{this.onFlush(o.data);break}default:{o.data=o.data||{},o.data.frag=this.frag,o.data.id=this.id,s.trigger(o.event,o.data);break}}},f.configureTransmuxer=function(u){var o=this.worker,s=this.transmuxer;o?o.postMessage({cmd:"configure",config:u}):s&&s.configure(u)},f.handleTransmuxComplete=function(u){u.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(u)},l}()},"./src/demux/transmuxer-worker.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return t});var k=w("./src/demux/transmuxer.ts"),b=w("./src/events.ts"),m=w("./src/utils/logger.ts"),T=w("./node_modules/eventemitter3/index.js"),_=w.n(T);function t(n){var l=new T.EventEmitter,f=function(u,o){n.postMessage({event:u,data:o})};l.on(b.Events.FRAG_DECRYPTED,f),l.on(b.Events.ERROR,f),n.addEventListener("message",function(d){var u=d.data;switch(u.cmd){case"init":{var o=JSON.parse(u.config);n.transmuxer=new k.default(l,u.typeSupported,o,u.vendor,u.id),Object(m.enableLogs)(o.debug),f("init",null);break}case"configure":{n.transmuxer.configure(u.config);break}case"demux":{var s=n.transmuxer.push(u.data,u.decryptdata,u.chunkMeta,u.state);Object(k.isPromise)(s)?s.then(function(p){h(n,p)}):h(n,s);break}case"flush":{var E=u.chunkMeta,v=n.transmuxer.flush(E);Object(k.isPromise)(v)?v.then(function(p){c(n,p,E)}):c(n,v,E);break}default:break}})}function h(n,l){if(i(l.remuxResult))return;var f=[],d=l.remuxResult,u=d.audio,o=d.video;u&&r(f,u),o&&r(f,o),n.postMessage({event:"transmuxComplete",data:l},f)}function r(n,l){l.data1&&n.push(l.data1.buffer),l.data2&&n.push(l.data2.buffer)}function c(n,l,f){l.forEach(function(d){h(n,d)}),n.postMessage({event:"flush",data:f})}function i(n){return!n.audio&&!n.video&&!n.text&&!n.id3&&!n.initSegment}},"./src/demux/transmuxer.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return o}),w.d(g,"isPromise",function(){return v}),w.d(g,"TransmuxConfig",function(){return p}),w.d(g,"TransmuxState",function(){return I});var k=w("./src/events.ts"),b=w("./src/errors.ts"),m=w("./src/crypt/decrypter.ts"),T=w("./src/demux/aacdemuxer.ts"),_=w("./src/demux/mp4demuxer.ts"),t=w("./src/demux/tsdemuxer.ts"),h=w("./src/demux/mp3demuxer.ts"),r=w("./src/remux/mp4-remuxer.ts"),c=w("./src/remux/passthrough-remuxer.ts"),i=w("./src/demux/chunk-cache.ts"),n=w("./src/utils/mp4-tools.ts"),l=w("./src/utils/logger.ts"),f;try{f=self.performance.now.bind(self.performance)}catch(R){l.logger.debug("Unable to use Performance API on this environment"),f=self.Date.now}var d=[{demux:t.default,remux:r.default},{demux:_.default,remux:c.default},{demux:T.default,remux:r.default},{demux:h.default,remux:r.default}],u=1024;d.forEach(function(R){var y=R.demux;u=Math.max(u,y.minProbeByteLength)});var o=function(){function R(x,C,S,F,j){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 i.default,this.observer=x,this.typeSupported=C,this.config=S,this.vendor=F,this.id=j}var y=R.prototype;return y.configure=function(C){this.transmuxConfig=C,this.decrypter&&this.decrypter.reset()},y.push=function(C,S,F,j){var A=this,Y=F.transmuxing;Y.executeStart=f();var z=new Uint8Array(C),O=this.cache,H=this.config,U=this.currentTransmuxState,L=this.transmuxConfig;j&&(this.currentTransmuxState=j);var K=s(z,S);if(K&&K.method==="AES-128"){var ee=this.getDecrypter();if(H.enableSoftwareAES){var oe=ee.softwareDecrypt(z,K.key.buffer,K.iv.buffer);if(!oe)return Y.executeEnd=f(),E(F);z=new Uint8Array(oe)}else return this.decryptionPromise=ee.webCryptoDecrypt(z,K.key.buffer,K.iv.buffer).then(function(ne){var J=A.push(ne,null,F);return A.decryptionPromise=null,J}),this.decryptionPromise}var ae=j||U,be=ae.contiguous,_e=ae.discontinuity,fe=ae.trackSwitch,Re=ae.accurateTimeOffset,Ce=ae.timeOffset,ce=L.audioCodec,te=L.videoCodec,W=L.defaultInitPts,X=L.duration,V=L.initSegmentData;if((_e||fe)&&this.resetInitSegment(V,ce,te,X),_e&&this.resetInitialTimestamp(W),be||this.resetContiguity(),this.needsProbing(z,_e,fe)){if(O.dataLength){var Z=O.flush();z=Object(n.appendUint8Array)(Z,z)}this.configureTransmuxer(z,L)}var q=this.transmux(z,K,Ce,Re,F),ie=this.currentTransmuxState;return ie.contiguous=!0,ie.discontinuity=!1,ie.trackSwitch=!1,Y.executeEnd=f(),q},y.flush=function(C){var S=this,F=C.transmuxing;F.executeStart=f();var j=this.decrypter,A=this.cache,Y=this.currentTransmuxState,z=this.decryptionPromise;if(z)return z.then(function(){return S.flush(C)});var O=[],H=Y.timeOffset;if(j){var U=j.flush();U&&O.push(this.push(U,null,C))}var L=A.dataLength;A.reset();var K=this.demuxer,ee=this.remuxer;if(!K||!ee)return L>=u&&this.observer.emit(k.Events.ERROR,k.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),F.executeEnd=f(),[E(C)];var oe=K.flush(H);return v(oe)?oe.then(function(ae){return S.flushRemux(O,ae,C),O}):(this.flushRemux(O,oe,C),O)},y.flushRemux=function(C,S,F){var j=S.audioTrack,A=S.avcTrack,Y=S.id3Track,z=S.textTrack,O=this.currentTransmuxState,H=O.accurateTimeOffset,U=O.timeOffset;l.logger.log("[transmuxer.ts]: Flushed fragment "+F.sn+(F.part>-1?" p: "+F.part:"")+" of level "+F.level);var L=this.remuxer.remux(j,A,Y,z,U,H,!0,this.id);C.push({remuxResult:L,chunkMeta:F}),F.transmuxing.executeEnd=f()},y.resetInitialTimestamp=function(C){var S=this.demuxer,F=this.remuxer;if(!S||!F)return;S.resetTimeStamp(C),F.resetTimeStamp(C)},y.resetContiguity=function(){var C=this.demuxer,S=this.remuxer;if(!C||!S)return;C.resetContiguity(),S.resetNextTimestamp()},y.resetInitSegment=function(C,S,F,j){var A=this.demuxer,Y=this.remuxer;if(!A||!Y)return;A.resetInitSegment(S,F,j),Y.resetInitSegment(C,S,F)},y.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},y.transmux=function(C,S,F,j,A){var Y;return S&&S.method==="SAMPLE-AES"?Y=this.transmuxSampleAes(C,S,F,j,A):Y=this.transmuxUnencrypted(C,F,j,A),Y},y.transmuxUnencrypted=function(C,S,F,j){var A=this.demuxer.demux(C,S,!1,!this.config.progressive),Y=A.audioTrack,z=A.avcTrack,O=A.id3Track,H=A.textTrack,U=this.remuxer.remux(Y,z,O,H,S,F,!1,this.id);return{remuxResult:U,chunkMeta:j}},y.transmuxSampleAes=function(C,S,F,j,A){var Y=this;return this.demuxer.demuxSampleAes(C,S,F).then(function(z){var O=Y.remuxer.remux(z.audioTrack,z.avcTrack,z.id3Track,z.textTrack,F,j,!1,Y.id);return{remuxResult:O,chunkMeta:A}})},y.configureTransmuxer=function(C,S){for(var F=this.config,j=this.observer,A=this.typeSupported,Y=this.vendor,z=S.audioCodec,O=S.defaultInitPts,H=S.duration,U=S.initSegmentData,L=S.videoCodec,K,ee=0,oe=d.length;ee<oe;ee++)if(d[ee].demux.probe(C)){K=d[ee];break}K||(l.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),K={demux:_.default,remux:c.default});var ae=this.demuxer,be=this.remuxer,_e=K.remux,fe=K.demux;(!be||!(be instanceof _e))&&(this.remuxer=new _e(j,F,A,Y)),(!ae||!(ae instanceof fe))&&(this.demuxer=new fe(j,F,A),this.probe=fe.probe),this.resetInitSegment(U,z,L,H),this.resetInitialTimestamp(O)},y.needsProbing=function(C,S,F){return!this.demuxer||!this.remuxer||S||F},y.getDecrypter=function(){var C=this.decrypter;return C||(C=this.decrypter=new m.default(this.observer,this.config)),C},R}();function s(R,y){var x=null;return R.byteLength>0&&y!=null&&y.key!=null&&y.iv!==null&&y.method!=null&&(x=y),x}var E=function(y){return{remuxResult:{},chunkMeta:y}};function v(R){return"then"in R&&R.then instanceof Function}var p=function(y,x,C,S,F){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=y,this.videoCodec=x,this.initSegmentData=C,this.duration=S,this.defaultInitPts=F},I=function(y,x,C,S,F){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=y,this.contiguous=x,this.accurateTimeOffset=C,this.trackSwitch=S,this.timeOffset=F}},"./src/demux/tsdemuxer.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"discardEPB",function(){return E});var k=w("./src/demux/adts.ts"),b=w("./src/demux/mpegaudio.ts"),m=w("./src/demux/exp-golomb.ts"),T=w("./src/demux/id3.ts"),_=w("./src/demux/sample-aes.ts"),t=w("./src/events.ts"),h=w("./src/utils/mp4-tools.ts"),r=w("./src/utils/logger.ts"),c=w("./src/errors.ts"),i={video:1,audio:2,id3:3,text:4},n=function(){function v(I,R,y){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=I,this.config=R,this.typeSupported=y}v.probe=function(R){var y=v.syncOffset(R);return y<0?!1:(y&&r.logger.warn("MPEG2-TS detected but first sync word found @ offset "+y+", junk ahead ?"),!0)},v.syncOffset=function(R){for(var y=Math.min(1e3,R.length-3*188),x=0;x<y;){if(R[x]===71&&R[x+188]===71&&R[x+2*188]===71)return x;x++}return-1},v.createTrack=function(R,y){return{container:R==="video"||R==="audio"?"video/mp2t":void 0,type:R,id:i[R],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:R==="audio"?y:void 0}};var p=v.prototype;return p.resetInitSegment=function(R,y,x){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=v.createTrack("video",x),this._audioTrack=v.createTrack("audio",x),this._id3Track=v.createTrack("id3",x),this._txtTrack=v.createTrack("text",x),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=R,this.videoCodec=y,this._duration=x},p.resetTimeStamp=function(){},p.resetContiguity=function(){var R=this._audioTrack,y=this._avcTrack,x=this._id3Track;R&&(R.pesData=null),y&&(y.pesData=null),x&&(x.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},p.demux=function(R,y,x,C){x===void 0&&(x=!1),C===void 0&&(C=!1),x||(this.sampleAes=null);var S,F=this._avcTrack,j=this._audioTrack,A=this._id3Track,Y=F.pid,z=F.pesData,O=j.pid,H=A.pid,U=j.pesData,L=A.pesData,K=!1,ee=this.pmtParsed,oe=this._pmtId,ae=R.length;if(this.remainderData&&(R=Object(h.appendUint8Array)(this.remainderData,R),ae=R.length,this.remainderData=null),ae<188&&!C)return this.remainderData=R,{audioTrack:j,avcTrack:F,id3Track:A,textTrack:this._txtTrack};var be=Math.max(0,v.syncOffset(R));ae-=(ae+be)%188,ae<R.byteLength&&!C&&(this.remainderData=new Uint8Array(R.buffer,ae,R.buffer.byteLength-ae));for(var _e=be;_e<ae;_e+=188)if(R[_e]===71){var fe=!!(R[_e+1]&64),Re=((R[_e+1]&31)<<8)+R[_e+2],Ce=(R[_e+3]&48)>>4,ce=void 0;if(Ce>1){if(ce=_e+5+R[_e+4],ce===_e+188)continue}else ce=_e+4;switch(Re){case Y:fe&&(z&&(S=u(z))&&this.parseAVCPES(S,!1),z={data:[],size:0}),z&&(z.data.push(R.subarray(ce,_e+188)),z.size+=_e+188-ce);break;case O:fe&&(U&&(S=u(U))&&(j.isAAC?this.parseAACPES(S):this.parseMPEGPES(S)),U={data:[],size:0}),U&&(U.data.push(R.subarray(ce,_e+188)),U.size+=_e+188-ce);break;case H:fe&&(L&&(S=u(L))&&this.parseID3PES(S),L={data:[],size:0}),L&&(L.data.push(R.subarray(ce,_e+188)),L.size+=_e+188-ce);break;case 0:fe&&(ce+=R[ce]+1),oe=this._pmtId=f(R,ce);break;case oe:{fe&&(ce+=R[ce]+1);var te=d(R,ce,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,x);Y=te.avc,Y>0&&(F.pid=Y),O=te.audio,O>0&&(j.pid=O,j.isAAC=te.isAAC),H=te.id3,H>0&&(A.pid=H),K&&!ee&&(r.logger.log("reparse from beginning"),K=!1,_e=be-188),ee=this.pmtParsed=!0;break}case 17:case 8191:break;default:K=!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=z,j.pesData=U,A.pesData=L;var W={audioTrack:j,avcTrack:F,id3Track:A,textTrack:this._txtTrack};return C&&this.extractRemainingSamples(W),W},p.flush=function(){var R=this.remainderData;this.remainderData=null;var y;return R?y=this.demux(R,-1,!1,!0):y={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(y),this.sampleAes?this.decrypt(y,this.sampleAes):y},p.extractRemainingSamples=function(R){var y=R.audioTrack,x=R.avcTrack,C=R.id3Track,S=x.pesData,F=y.pesData,j=C.pesData,A;S&&(A=u(S))?(this.parseAVCPES(A,!0),x.pesData=null):x.pesData=S,F&&(A=u(F))?(y.isAAC?this.parseAACPES(A):this.parseMPEGPES(A),y.pesData=null):(F!=null&&F.size&&r.logger.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=F),j&&(A=u(j))?(this.parseID3PES(A),C.pesData=null):C.pesData=j},p.demuxSampleAes=function(R,y,x){var C=this.demux(R,x,!0,!this.config.progressive),S=this.sampleAes=new _.default(this.observer,this.config,y);return this.decrypt(C,S)},p.decrypt=function(R,y){return new Promise(function(x){var C=R.audioTrack,S=R.avcTrack;C.samples&&C.isAAC?y.decryptAacSamples(C.samples,0,function(){S.samples?y.decryptAvcSamples(S.samples,0,0,function(){x(R)}):x(R)}):S.samples&&y.decryptAvcSamples(S.samples,0,0,function(){x(R)})})},p.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},p.parseAVCPES=function(R,y){var x=this,C=this._avcTrack,S=this.parseAVCNALu(R.data),F=!1,j=this.avcSample,A,Y=!1;R.data=null,j&&S.length&&!C.audFound&&(o(j,C),j=this.avcSample=l(!1,R.pts,R.dts,"")),S.forEach(function(z){switch(z.type){case 1:{A=!0,j||(j=x.avcSample=l(!0,R.pts,R.dts,"")),F&&(j.debug+="NDR "),j.frame=!0;var O=z.data;if(Y&&O.length>4){var H=new m.default(O).readSliceType();(H===2||H===4||H===7||H===9)&&(j.key=!0)}break}case 5:A=!0,j||(j=x.avcSample=l(!0,R.pts,R.dts,"")),F&&(j.debug+="IDR "),j.key=!0,j.frame=!0;break;case 6:{A=!0,F&&j&&(j.debug+="SEI ");var U=new m.default(E(z.data));U.readUByte();for(var L=0,K=0,ee=!1,oe=0;!ee&&U.bytesAvailable>1;){L=0;do oe=U.readUByte(),L+=oe;while(oe===255);K=0;do oe=U.readUByte(),K+=oe;while(oe===255);if(L===4&&U.bytesAvailable!==0){ee=!0;var ae=U.readUByte();if(ae===181){var be=U.readUShort();if(be===49){var _e=U.readUInt();if(_e===1195456820){var fe=U.readUByte();if(fe===3){for(var Re=U.readUByte(),Ce=U.readUByte(),ce=31&Re,te=[Re,Ce],W=0;W<ce;W++)te.push(U.readUByte()),te.push(U.readUByte()),te.push(U.readUByte());s(x._txtTrack.samples,{type:3,pts:R.pts,bytes:te})}}}}}else if(L===5&&U.bytesAvailable!==0){if(ee=!0,K>16){for(var X=[],V=0;V<16;V++)X.push(U.readUByte().toString(16)),(V===3||V===5||V===7||V===9)&&X.push("-");for(var Z=K-16,q=new Uint8Array(Z),ie=0;ie<Z;ie++)q[ie]=U.readUByte();s(x._txtTrack.samples,{pts:R.pts,payloadType:L,uuid:X.join(""),userData:Object(T.utf8ArrayToStr)(q),userDataBytes:q})}}else if(K<U.bytesAvailable)for(var ne=0;ne<K;ne++)U.readUByte()}break}case 7:if(A=!0,Y=!0,F&&j&&(j.debug+="SPS "),!C.sps){var J=new m.default(z.data),$=J.readSPS();C.width=$.width,C.height=$.height,C.pixelRatio=$.pixelRatio,C.sps=[z.data],C.duration=x._duration;for(var le=z.data.subarray(1,4),he="avc1.",Se=0;Se<3;Se++){var Ue=le[Se].toString(16);Ue.length<2&&(Ue="0"+Ue),he+=Ue}C.codec=he}break;case 8:A=!0,F&&j&&(j.debug+="PPS "),C.pps||(C.pps=[z.data]);break;case 9:A=!1,C.audFound=!0,j&&o(j,C),j=x.avcSample=l(!1,R.pts,R.dts,F?"AUD ":"");break;case 12:A=!1;break;default:A=!1,j&&(j.debug+="unknown NAL "+z.type+" ");break}if(j&&A){var Xe=j.units;Xe.push(z)}}),y&&j&&(o(j,C),this.avcSample=null)},p.getLastNalUnit=function(){var R,y=this.avcSample,x;if(!y||y.units.length===0){var C=this._avcTrack.samples;y=C[C.length-1]}if((R=y)!==null&&R!==void 0&&R.units){var S=y.units;x=S[S.length-1]}return x},p.parseAVCNALu=function(R){var y=R.byteLength,x=this._avcTrack,C=x.naluState||0,S=C,F=[],j=0,A,Y,z,O=-1,H=0;for(C===-1&&(O=0,H=R[0]&31,C=0,j=1);j<y;){if(A=R[j++],!C){C=A?0:1;continue}if(C===1){C=A?0:2;continue}if(!A)C=3;else if(A===1){if(O>=0){var U={data:R.subarray(O,j-C-1),type:H};F.push(U)}else{var L=this.getLastNalUnit();if(L&&(S&&j<=4-S&&(L.state&&(L.data=L.data.subarray(0,L.data.byteLength-S))),Y=j-C-1,Y>0)){var K=new Uint8Array(L.data.byteLength+Y);K.set(L.data,0),K.set(R.subarray(0,Y),L.data.byteLength),L.data=K,L.state=0}}j<y?(z=R[j]&31,O=j,H=z,C=0):C=-1}else C=0}if(O>=0&&C>=0){var ee={data:R.subarray(O,y),type:H,state:C};F.push(ee)}if(F.length===0){var oe=this.getLastNalUnit();if(oe){var ae=new Uint8Array(oe.data.byteLength+R.byteLength);ae.set(oe.data,0),ae.set(R,oe.data.byteLength),oe.data=ae}}return x.naluState=C,F},p.parseAACPES=function(R){var y=0,x=this._audioTrack,C=this.aacOverFlow,S=R.data;if(C){this.aacOverFlow=null;var F=C.sample.unit.byteLength,j=Math.min(C.missing,F),A=F-j;C.sample.unit.set(S.subarray(0,j),A),x.samples.push(C.sample),y=C.missing}var Y,z;for(Y=y,z=S.length;Y<z-1&&!k.isHeader(S,Y);Y++);if(Y!==y){var O,H;if(Y<z-1?(O="AAC PES did not start with ADTS header,offset:"+Y,H=!1):(O="no ADTS header found in AAC PES",H=!0),r.logger.warn("parsing error:"+O),this.observer.emit(t.Events.ERROR,t.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:H,reason:O}),H)return}k.initTrackConfig(x,this.observer,S,Y,this.audioCodec);var U;if(R.pts!==void 0)U=R.pts;else if(C){var L=k.getFrameDuration(x.samplerate);U=C.sample.pts+L}else{r.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var K=0;Y<z;)if(k.isHeader(S,Y)){if(Y+5<z){var ee=k.appendFrame(x,S,Y,U,K);if(ee)if(ee.missing)this.aacOverFlow=ee;else{Y+=ee.length,K++;continue}}break}else Y++},p.parseMPEGPES=function(R){var y=R.data,x=y.length,C=0,S=0,F=R.pts;if(F===void 0){r.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;S<x;)if(b.isHeader(y,S)){var j=b.appendFrame(this._audioTrack,y,S,F,C);if(j)S+=j.length,C++;else break}else S++},p.parseID3PES=function(R){if(R.pts===void 0){r.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(R)},v}();n.minProbeByteLength=188;function l(v,p,I,R){return{key:v,frame:!1,pts:p,dts:I,units:[],debug:R,length:0}}function f(v,p){return(v[p+10]&31)<<8|v[p+11]}function d(v,p,I,R){var y={audio:-1,avc:-1,id3:-1,isAAC:!0},x=(v[p+1]&15)<<8|v[p+2],C=p+3+x-4,S=(v[p+10]&15)<<8|v[p+11];for(p+=12+S;p<C;){var F=(v[p+1]&31)<<8|v[p+2];switch(v[p]){case 207:if(!R){r.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:y.audio===-1&&(y.audio=F);break;case 21:y.id3===-1&&(y.id3=F);break;case 219:if(!R){r.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:y.avc===-1&&(y.avc=F);break;case 3:case 4:I?y.audio===-1&&(y.audio=F,y.isAAC=!1):r.logger.log("MPEG audio found, not supported in this browser");break;case 36:r.logger.warn("Unsupported HEVC stream type found");break;default:break}p+=((v[p+3]&15)<<8|v[p+4])+5}return y}function u(v){var p=0,I,R,y,x,C,S=v.data;if(!v||v.size===0)return null;for(;S[0].length<19&&S.length>1;){var F=new Uint8Array(S[0].length+S[1].length);F.set(S[0]),F.set(S[1],S[0].length),S[0]=F,S.splice(1,1)}I=S[0];var j=(I[0]<<16)+(I[1]<<8)+I[2];if(j===1){if(R=(I[4]<<8)+I[5],R&&R>v.size-6)return null;var A=I[7];A&192&&(x=(I[9]&14)*536870912+(I[10]&255)*4194304+(I[11]&254)*16384+(I[12]&255)*128+(I[13]&254)/2,A&64?(C=(I[14]&14)*536870912+(I[15]&255)*4194304+(I[16]&254)*16384+(I[17]&255)*128+(I[18]&254)/2,x-C>60*9e4&&(r.logger.warn(Math.round((x-C)/9e4)+"s delta between PTS and DTS, align them"),x=C)):C=x),y=I[8];var Y=y+9;if(v.size<=Y)return null;v.size-=Y;for(var z=new Uint8Array(v.size),O=0,H=S.length;O<H;O++){I=S[O];var U=I.byteLength;if(Y)if(Y>U){Y-=U;continue}else I=I.subarray(Y),U-=Y,Y=0;z.set(I,p),p+=U}return R&&(R-=y+3),{data:z,pts:x,dts:C,len:R}}return null}function o(v,p){if(v.units.length&&v.frame){if(v.pts===void 0){var I=p.samples,R=I.length;if(R){var y=I[R-1];v.pts=y.pts,v.dts=y.dts}else{p.dropped++;return}}p.samples.push(v)}v.debug.length&&r.logger.log(v.pts+"/"+v.dts+":"+v.debug)}function s(v,p){var I=v.length;if(I>0){if(p.pts>=v[I-1].pts)v.push(p);else for(var R=I-1;R>=0;R--)if(p.pts<v[R].pts){v.splice(R,0,p);break}}else v.push(p)}function E(v){for(var p=v.byteLength,I=[],R=1;R<p-2;)v[R]===0&&v[R+1]===0&&v[R+2]===3?(I.push(R+2),R+=2):R++;if(I.length===0)return v;var y=p-I.length,x=new Uint8Array(y),C=0;for(R=0;R<y;C++,R++)C===I[0]&&(C++,I.shift()),x[R]=v[C];return x}g.default=n},"./src/errors.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"ErrorTypes",function(){return k}),w.d(g,"ErrorDetails",function(){return b});var k;(function(m){m.NETWORK_ERROR="networkError",m.MEDIA_ERROR="mediaError",m.KEY_SYSTEM_ERROR="keySystemError",m.MUX_ERROR="muxError",m.OTHER_ERROR="otherError"})(k||(k={}));var b;(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"})(b||(b={}))},"./src/events.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"Events",function(){return k});var k;(function(b){b.MEDIA_ATTACHING="hlsMediaAttaching",b.MEDIA_ATTACHED="hlsMediaAttached",b.MEDIA_DETACHING="hlsMediaDetaching",b.MEDIA_DETACHED="hlsMediaDetached",b.BUFFER_RESET="hlsBufferReset",b.BUFFER_CODECS="hlsBufferCodecs",b.BUFFER_CREATED="hlsBufferCreated",b.BUFFER_APPENDING="hlsBufferAppending",b.BUFFER_APPENDED="hlsBufferAppended",b.BUFFER_EOS="hlsBufferEos",b.BUFFER_FLUSHING="hlsBufferFlushing",b.BUFFER_FLUSHED="hlsBufferFlushed",b.MANIFEST_LOADING="hlsManifestLoading",b.MANIFEST_LOADED="hlsManifestLoaded",b.MANIFEST_PARSED="hlsManifestParsed",b.LEVEL_SWITCHING="hlsLevelSwitching",b.LEVEL_SWITCHED="hlsLevelSwitched",b.LEVEL_LOADING="hlsLevelLoading",b.LEVEL_LOADED="hlsLevelLoaded",b.LEVEL_UPDATED="hlsLevelUpdated",b.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",b.LEVELS_UPDATED="hlsLevelsUpdated",b.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",b.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",b.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",b.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",b.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",b.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",b.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",b.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",b.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",b.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",b.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",b.CUES_PARSED="hlsCuesParsed",b.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",b.INIT_PTS_FOUND="hlsInitPtsFound",b.FRAG_LOADING="hlsFragLoading",b.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",b.FRAG_LOADED="hlsFragLoaded",b.FRAG_DECRYPTED="hlsFragDecrypted",b.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",b.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",b.FRAG_PARSING_METADATA="hlsFragParsingMetadata",b.FRAG_PARSED="hlsFragParsed",b.FRAG_BUFFERED="hlsFragBuffered",b.FRAG_CHANGED="hlsFragChanged",b.FPS_DROP="hlsFpsDrop",b.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",b.ERROR="hlsError",b.DESTROYING="hlsDestroying",b.KEY_LOADING="hlsKeyLoading",b.KEY_LOADED="hlsKeyLoaded",b.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",b.BACK_BUFFER_REACHED="hlsBackBufferReached"})(k||(k={}))},"./src/hls.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return v});var k=w("./node_modules/url-toolkit/src/url-toolkit.js"),b=w.n(k),m=w("./src/loader/playlist-loader.ts"),T=w("./src/loader/key-loader.ts"),_=w("./src/controller/id3-track-controller.ts"),t=w("./src/controller/latency-controller.ts"),h=w("./src/controller/level-controller.ts"),r=w("./src/controller/fragment-tracker.ts"),c=w("./src/controller/stream-controller.ts"),i=w("./src/is-supported.ts"),n=w("./src/utils/logger.ts"),l=w("./src/config.ts"),f=w("./node_modules/eventemitter3/index.js"),d=w.n(f),u=w("./src/events.ts"),o=w("./src/errors.ts");function s(p,I){for(var R=0;R<I.length;R++){var y=I[R];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,y.key,y)}}function E(p,I,R){return I&&s(p.prototype,I),R&&s(p,R),p}var v=function(){p.isSupported=function(){return Object(i.isSupported)()};function p(R){R===void 0&&(R={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new f.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 y=this.config=Object(l.mergeConfig)(p.DefaultConfig,R);this.userConfig=R,Object(n.enableLogs)(y.debug),this._autoLevelCapping=-1,y.progressive&&Object(l.enableStreamingMode)(y);var x=y.abrController,C=y.bufferController,S=y.capLevelController,F=y.fpsController,j=this.abrController=new x(this),A=this.bufferController=new C(this),Y=this.capLevelController=new S(this),z=new F(this),O=new m.default(this),H=new T.default(this),U=new _.default(this),L=this.levelController=new h.default(this),K=new r.FragmentTracker(this),ee=this.streamController=new c.default(this,K);Y.setStreamController(ee),z.setStreamController(ee);var oe=[L,ee];this.networkControllers=oe;var ae=[O,H,j,A,Y,z,U,K];this.audioTrackController=this.createController(y.audioTrackController,null,oe),this.createController(y.audioStreamController,K,oe),this.subtitleTrackController=this.createController(y.subtitleTrackController,null,oe),this.createController(y.subtitleStreamController,K,oe),this.createController(y.timelineController,null,ae),this.emeController=this.createController(y.emeController,null,ae),this.cmcdController=this.createController(y.cmcdController,null,ae),this.latencyController=this.createController(t.default,null,ae),this.coreComponents=ae}var I=p.prototype;return I.createController=function(y,x,C){if(y){var S=x?new y(this,x):new y(this);return C&&C.push(S),S}return null},I.on=function(y,x,C){C===void 0&&(C=this),this._emitter.on(y,x,C)},I.once=function(y,x,C){C===void 0&&(C=this),this._emitter.once(y,x,C)},I.removeAllListeners=function(y){this._emitter.removeAllListeners(y)},I.off=function(y,x,C,S){C===void 0&&(C=this),this._emitter.off(y,x,C,S)},I.listeners=function(y){return this._emitter.listeners(y)},I.emit=function(y,x,C){return this._emitter.emit(y,x,C)},I.trigger=function(y,x){if(this.config.debug)return this.emit(y,y,x);try{return this.emit(y,y,x)}catch(C){n.logger.error("An internal error happened while handling event "+y+'. Error message: "'+C.message+'". Here is a stacktrace:',C),this.trigger(u.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:y,error:C})}return!1},I.listenerCount=function(y){return this._emitter.listenerCount(y)},I.destroy=function(){n.logger.log("destroy"),this.trigger(u.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(y){return y.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(y){return y.destroy()}),this.coreComponents.length=0},I.attachMedia=function(y){n.logger.log("attachMedia"),this._media=y,this.trigger(u.Events.MEDIA_ATTACHING,{media:y})},I.detachMedia=function(){n.logger.log("detachMedia"),this.trigger(u.Events.MEDIA_DETACHING,void 0),this._media=null},I.loadSource=function(y){this.stopLoad();var x=this.media,C=this.url,S=this.url=k.buildAbsoluteURL(self.location.href,y,{alwaysNormalize:!0});n.logger.log("loadSource:"+S),x&&C&&C!==S&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(x)),this.trigger(u.Events.MANIFEST_LOADING,{url:y})},I.startLoad=function(y){y===void 0&&(y=-1),n.logger.log("startLoad("+y+")"),this.networkControllers.forEach(function(x){x.startLoad(y)})},I.stopLoad=function(){n.logger.log("stopLoad"),this.networkControllers.forEach(function(y){y.stopLoad()})},I.swapAudioCodec=function(){n.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},I.recoverMediaError=function(){n.logger.log("recoverMediaError");var y=this._media;this.detachMedia(),y&&this.attachMedia(y)},I.removeLevel=function(y,x){x===void 0&&(x=0),this.levelController.removeLevel(y,x)},E(p,[{key:"levels",get:function(){var y=this.levelController.levels;return y||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(y){n.logger.log("set currentLevel:"+y),this.loadLevel=y,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(y){n.logger.log("set nextLevel:"+y),this.levelController.manualLevel=y,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(y){n.logger.log("set loadLevel:"+y),this.levelController.manualLevel=y}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(y){this.levelController.nextLoadLevel=y}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(y){n.logger.log("set firstLevel:"+y),this.levelController.firstLevel=y}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(y){n.logger.log("set startLevel:"+y),y!==-1&&(y=Math.max(y,this.minAutoLevel)),this.levelController.startLevel=y}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(y){var x=!!y;x!==this.config.capLevelToPlayerSize&&(x?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=x)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(y){this._autoLevelCapping!==y&&(n.logger.log("set autoLevelCapping:"+y),this._autoLevelCapping=y)}},{key:"bandwidthEstimate",get:function(){var y=this.abrController.bwEstimator;return y?y.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var y=this.levels,x=this.config.minAutoBitrate;if(!y)return 0;for(var C=y.length,S=0;S<C;S++)if(y[S].maxBitrate>x)return S;return 0}},{key:"maxAutoLevel",get:function(){var y=this.levels,x=this.autoLevelCapping,C;return x===-1&&y&&y.length?C=y.length-1:C=x,C}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(y){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,y)}},{key:"audioTracks",get:function(){var y=this.audioTrackController;return y?y.audioTracks:[]}},{key:"audioTrack",get:function(){var y=this.audioTrackController;return y?y.audioTrack:-1},set:function(y){var x=this.audioTrackController;x&&(x.audioTrack=y)}},{key:"subtitleTracks",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTrack:-1},set:function(y){var x=this.subtitleTrackController;x&&(x.subtitleTrack=y)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var y=this.subtitleTrackController;return y?y.subtitleDisplay:!1},set:function(y){var x=this.subtitleTrackController;x&&(x.subtitleDisplay=y)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(y){this.config.lowLatencyMode=y}},{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 u.Events}},{key:"ErrorTypes",get:function(){return o.ErrorTypes}},{key:"ErrorDetails",get:function(){return o.ErrorDetails}},{key:"DefaultConfig",get:function(){return p.defaultConfig?p.defaultConfig:l.hlsDefaultConfig},set:function(y){p.defaultConfig=y}}]),p}();v.defaultConfig=void 0},"./src/is-supported.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"isSupported",function(){return m}),w.d(g,"changeTypeSupported",function(){return T});var k=w("./src/utils/mediasource-helper.ts");function b(){return self.SourceBuffer||self.WebKitSourceBuffer}function m(){var _=Object(k.getMediaSource)();if(!_)return!1;var t=b(),h=_&&typeof _.isTypeSupported=="function"&&_.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!t||t.prototype&&typeof t.prototype.appendBuffer=="function"&&typeof t.prototype.remove=="function";return!!h&&!!r}function T(){var _,t=b();return typeof(t==null||((_=t.prototype)===null||_===void 0)?void 0:_.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return n}),w.d(g,"LoadError",function(){return f});var k=w("./src/polyfills/number.ts"),b=w("./src/errors.ts");function m(d,u){d.prototype=Object.create(u.prototype),d.prototype.constructor=d,r(d,u)}function T(d){var u=typeof Map=="function"?new Map:void 0;return T=function(s){if(s===null||!h(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof u!="undefined"){if(u.has(s))return u.get(s);u.set(s,E)}function E(){return _(s,arguments,c(this).constructor)}return E.prototype=Object.create(s.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),r(E,s)},T(d)}function _(d,u,o){return t()?_=Reflect.construct:_=function(E,v,p){var I=[null];I.push.apply(I,v);var R=Function.bind.apply(E,I),y=new R;return p&&r(y,p.prototype),y},_.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(d){return!1}}function h(d){return Function.toString.call(d).indexOf("[native code]")!==-1}function r(d,u){return r=Object.setPrototypeOf||function(s,E){return s.__proto__=E,s},r(d,u)}function c(d){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},c(d)}var i=Math.pow(2,17),n=function(){function d(o){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=o}var u=d.prototype;return u.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},u.abort=function(){this.loader&&this.loader.abort()},u.load=function(s,E){var v=this,p=s.url;if(!p)return Promise.reject(new f({type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,networkDetails:null},"Fragment does not have a "+(p?"part list":"url")));this.abort();var I=this.config,R=I.fLoader,y=I.loader;return new Promise(function(x,C){v.loader&&v.loader.destroy();var S=v.loader=s.loader=R?new R(I):new y(I),F=l(s),j={timeout:I.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:I.fragLoadingMaxRetryTimeout,highWaterMark:i};s.stats=S.stats,S.load(F,j,{onSuccess:function(Y,z,O,H){v.resetLoader(s,S),x({frag:s,part:null,payload:Y.data,networkDetails:H})},onError:function(Y,z,O){v.resetLoader(s,S),C(new f({type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,response:Y,networkDetails:O}))},onAbort:function(Y,z,O){v.resetLoader(s,S),C(new f({type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:s,networkDetails:O}))},onTimeout:function(Y,z,O){v.resetLoader(s,S),C(new f({type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:s,networkDetails:O}))},onProgress:function(Y,z,O,H){E&&E({frag:s,part:null,payload:O,networkDetails:H})}})})},u.loadPart=function(s,E,v){var p=this;this.abort();var I=this.config,R=I.fLoader,y=I.loader;return new Promise(function(x,C){p.loader&&p.loader.destroy();var S=p.loader=s.loader=R?new R(I):new y(I),F=l(s,E),j={timeout:I.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:I.fragLoadingMaxRetryTimeout,highWaterMark:i};E.stats=S.stats,S.load(F,j,{onSuccess:function(Y,z,O,H){p.resetLoader(s,S),p.updateStatsFromPart(s,E);var U={frag:s,part:E,payload:Y.data,networkDetails:H};v(U),x(U)},onError:function(Y,z,O){p.resetLoader(s,S),C(new f({type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,part:E,response:Y,networkDetails:O}))},onAbort:function(Y,z,O){s.stats.aborted=E.stats.aborted,p.resetLoader(s,S),C(new f({type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:s,part:E,networkDetails:O}))},onTimeout:function(Y,z,O){p.resetLoader(s,S),C(new f({type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:s,part:E,networkDetails:O}))}})})},u.updateStatsFromPart=function(s,E){var v=s.stats,p=E.stats,I=p.total;if(v.loaded+=p.loaded,I){var R=Math.round(s.duration/E.duration),y=Math.min(Math.round(v.loaded/I),R),x=R-y,C=x*Math.round(v.loaded/y);v.total=v.loaded+C}else v.total=Math.max(v.loaded,v.total);var S=v.loading,F=p.loading;S.start?S.first+=F.first-F.start:(S.start=F.start,S.first=F.first),S.end=F.end},u.resetLoader=function(s,E){s.loader=null,this.loader===E&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),E.destroy()},d}();function l(d,u){u===void 0&&(u=null);var o=u||d,s={frag:d,part:u,responseType:"arraybuffer",url:o.url,headers:{},rangeStart:0,rangeEnd:0},E=o.byteRangeStartOffset,v=o.byteRangeEndOffset;return Object(k.isFiniteNumber)(E)&&Object(k.isFiniteNumber)(v)&&(s.rangeStart=E,s.rangeEnd=v),s}var f=function(d){m(u,d);function u(o){for(var s,E=arguments.length,v=new Array(E>1?E-1:0),p=1;p<E;p++)v[p-1]=arguments[p];return s=d.call.apply(d,[this].concat(v))||this,s.data=void 0,s.data=o,s}return u}(T(Error))},"./src/loader/fragment.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"ElementaryStreamTypes",function(){return n}),w.d(g,"BaseSegment",function(){return l}),w.d(g,"Fragment",function(){return f}),w.d(g,"Part",function(){return d});var k=w("./src/polyfills/number.ts"),b=w("./node_modules/url-toolkit/src/url-toolkit.js"),m=w.n(b),T=w("./src/utils/logger.ts"),_=w("./src/loader/level-key.ts"),t=w("./src/loader/load-stats.ts");function h(u,o){u.prototype=Object.create(o.prototype),u.prototype.constructor=u,r(u,o)}function r(u,o){return r=Object.setPrototypeOf||function(E,v){return E.__proto__=v,E},r(u,o)}function c(u,o){for(var s=0;s<o.length;s++){var E=o[s];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(u,E.key,E)}}function i(u,o,s){return o&&c(u.prototype,o),s&&c(u,s),u}var n;(function(u){u.AUDIO="audio",u.VIDEO="video",u.AUDIOVIDEO="audiovideo"})(n||(n={}));var l=function(){function u(s){var E;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(E={},E[n.AUDIO]=null,E[n.VIDEO]=null,E[n.AUDIOVIDEO]=null,E),this.baseurl=s}var o=u.prototype;return o.setByteRange=function(E,v){var p=E.split("@",2),I=[];p.length===1?I[0]=v?v.byteRangeEndOffset:0:I[0]=parseInt(p[1]),I[1]=parseInt(p[0])+I[0],this._byteRange=I},i(u,[{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(b.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(E){this._url=E}}]),u}(),f=function(u){h(o,u);function o(E,v){var p;return p=u.call(this,v)||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=E,p}var s=o.prototype;return s.createInitializationVector=function(v){for(var p=new Uint8Array(16),I=12;I<16;I++)p[I]=v>>8*(15-I)&255;return p},s.setDecryptDataFromLevelKey=function(v,p){var I=v;return(v==null?void 0:v.method)==="AES-128"&&v.uri&&!v.iv&&(I=_.LevelKey.fromURI(v.uri),I.method=v.method,I.iv=this.createInitializationVector(p),I.keyFormat="identity"),I},s.setElementaryStreamInfo=function(v,p,I,R,y,x){x===void 0&&(x=!1);var C=this.elementaryStreams,S=C[v];if(!S){C[v]={startPTS:p,endPTS:I,startDTS:R,endDTS:y,partial:x};return}S.startPTS=Math.min(S.startPTS,p),S.endPTS=Math.max(S.endPTS,I),S.startDTS=Math.min(S.startDTS,R),S.endDTS=Math.max(S.endDTS,y)},s.clearElementaryStreamInfo=function(){var v=this.elementaryStreams;v[n.AUDIO]=null,v[n.VIDEO]=null,v[n.AUDIOVIDEO]=null},i(o,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var v=this.sn;typeof v!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&T.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),v=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,v)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(k.isFiniteNumber)(this.programDateTime))return null;var v=Object(k.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+v*1e3}},{key:"encrypted",get:function(){var v;return!!((v=this.decryptdata)!==null&&v!==void 0&&v.keyFormat&&this.decryptdata.uri)}}]),o}(l),d=function(u){h(o,u);function o(s,E,v,p,I){var R;R=u.call(this,v)||this,R.fragOffset=0,R.duration=0,R.gap=!1,R.independent=!1,R.relurl=void 0,R.fragment=void 0,R.index=void 0,R.stats=new t.LoadStats,R.duration=s.decimalFloatingPoint("DURATION"),R.gap=s.bool("GAP"),R.independent=s.bool("INDEPENDENT"),R.relurl=s.enumeratedString("URI"),R.fragment=E,R.index=p;var y=s.enumeratedString("BYTERANGE");return y&&R.setByteRange(y,I),I&&(R.fragOffset=I.fragOffset+I.duration),R}return i(o,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var E=this.elementaryStreams;return!!(E.audio||E.video||E.audiovideo)}}]),o}(l)},"./src/loader/key-loader.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return T});var k=w("./src/events.ts"),b=w("./src/errors.ts"),m=w("./src/utils/logger.ts"),T=function(){function _(h){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=h,this._registerListeners()}var t=_.prototype;return t._registerListeners=function(){this.hls.on(k.Events.KEY_LOADING,this.onKeyLoading,this)},t._unregisterListeners=function(){this.hls.off(k.Events.KEY_LOADING,this.onKeyLoading)},t.destroy=function(){this._unregisterListeners();for(var r in this.loaders){var c=this.loaders[r];c&&c.destroy()}this.loaders={}},t.onKeyLoading=function(r,c){var i=c.frag,n=i.type,l=this.loaders[n];if(!i.decryptdata){m.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var f=i.decryptdata.uri;if(f!==this.decrypturl||this.decryptkey===null){var d=this.hls.config;if(l&&(m.logger.warn("abort previous key loader for type:"+n),l.abort()),!f){m.logger.warn("key uri is falsy");return}var u=d.loader,o=i.loader=this.loaders[n]=new u(d);this.decrypturl=f,this.decryptkey=null;var s={url:f,frag:i,responseType:"arraybuffer"},E={timeout:d.fragLoadingTimeOut,maxRetry:0,retryDelay:d.fragLoadingRetryDelay,maxRetryDelay:d.fragLoadingMaxRetryTimeout,highWaterMark:0},v={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};o.load(s,E,v)}else this.decryptkey&&(i.decryptdata.key=this.decryptkey,this.hls.trigger(k.Events.KEY_LOADED,{frag:i}))},t.loadsuccess=function(r,c,i){var n=i.frag;if(!n.decryptdata){m.logger.error("after key load, decryptdata unset");return}this.decryptkey=n.decryptdata.key=new Uint8Array(r.data),n.loader=null,delete this.loaders[n.type],this.hls.trigger(k.Events.KEY_LOADED,{frag:n})},t.loaderror=function(r,c){var i=c.frag,n=i.loader;n&&n.abort(),delete this.loaders[i.type],this.hls.trigger(k.Events.ERROR,{type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:i,response:r})},t.loadtimeout=function(r,c){var i=c.frag,n=i.loader;n&&n.abort(),delete this.loaders[i.type],this.hls.trigger(k.Events.ERROR,{type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:i})},_}()},"./src/loader/level-details.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"LevelDetails",function(){return _});var k=w("./src/polyfills/number.ts");function b(t,h){for(var r=0;r<h.length;r++){var c=h[r];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(t,c.key,c)}}function m(t,h,r){return h&&b(t.prototype,h),r&&b(t,r),t}var T=10,_=function(){function t(r){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=r}var h=t.prototype;return h.reloaded=function(c){if(!c){this.advanced=!0,this.updated=!0;return}var i=this.lastPartSn-c.lastPartSn,n=this.lastPartIndex-c.lastPartIndex;this.updated=this.endSN!==c.endSN||!!n||!!i,this.advanced=this.endSN>c.endSN||i>0||i===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(k.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||T}},{key:"drift",get:function(){var c=this.driftEndTime-this.driftStartTime;if(c>0){var i=this.driftEnd-this.driftStart;return i*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(N,g,w){"use strict";w.r(g),w.d(g,"LevelKey",function(){return _});var k=w("./node_modules/url-toolkit/src/url-toolkit.js"),b=w.n(k);function m(t,h){for(var r=0;r<h.length;r++){var c=h[r];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(t,c.key,c)}}function T(t,h,r){return h&&m(t.prototype,h),r&&m(t,r),t}var _=function(){t.fromURL=function(r,c){return new t(r,c)},t.fromURI=function(r){return new t(r)};function t(h,r){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,r?this._uri=Object(k.buildAbsoluteURL)(h,r,{alwaysNormalize:!0}):this._uri=h}return T(t,[{key:"uri",get:function(){return this._uri}}]),t}()},"./src/loader/load-stats.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"LoadStats",function(){return k});var k=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(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return o});var k=w("./src/polyfills/number.ts"),b=w("./node_modules/url-toolkit/src/url-toolkit.js"),m=w.n(b),T=w("./src/loader/fragment.ts"),_=w("./src/loader/level-details.ts"),t=w("./src/loader/level-key.ts"),h=w("./src/utils/attr-list.ts"),r=w("./src/utils/logger.ts"),c=w("./src/utils/codecs.ts"),i=/#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,l=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),f=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("|")),d=/\.(mp4|m4s|m4v|m4a)$/i;function u(I){var R,y;return d.test((R=(y=b.parseURL(I))===null||y===void 0?void 0:y.path)!=null?R:"")}var o=function(){function I(){}return I.findGroup=function(y,x){for(var C=0;C<y.length;C++){var S=y[C];if(S.id===x)return S}},I.convertAVC1ToAVCOTI=function(y){var x=y.split(".");if(x.length>2){var C=x.shift()+".";return C+=parseInt(x.shift()).toString(16),C+=("000"+parseInt(x.shift()).toString(16)).substr(-4),C}return y},I.resolve=function(y,x){return b.buildAbsoluteURL(x,y,{alwaysNormalize:!0})},I.parseMasterPlaylist=function(y,x){var C=[],S={},F=!1;i.lastIndex=0;for(var j;(j=i.exec(y))!=null;)if(j[1]){var A=new h.AttrList(j[1]),Y={attrs:A,bitrate:A.decimalInteger("AVERAGE-BANDWIDTH")||A.decimalInteger("BANDWIDTH"),name:A.NAME,url:I.resolve(j[2],x)},z=A.decimalResolution("RESOLUTION");z&&(Y.width=z.width,Y.height=z.height),s((A.CODECS||"").split(/[ ,]+/).filter(function(H){return H}),Y),Y.videoCodec&&Y.videoCodec.indexOf("avc1")!==-1&&(Y.videoCodec=I.convertAVC1ToAVCOTI(Y.videoCodec)),C.push(Y)}else if(j[3]){var O=new h.AttrList(j[3]);O["DATA-ID"]&&(F=!0,S[O["DATA-ID"]]=O)}return{levels:C,sessionData:F?S:null}},I.parseMasterPlaylistMedia=function(y,x,C,S){S===void 0&&(S=[]);var F,j=[],A=0;for(n.lastIndex=0;(F=n.exec(y))!==null;){var Y=new h.AttrList(F[1]);if(Y.TYPE===C){var z={attrs:Y,bitrate:0,id:A++,groupId:Y["GROUP-ID"],instreamId:Y["INSTREAM-ID"],name:Y.NAME||Y.LANGUAGE||"",type:C,default:Y.bool("DEFAULT"),autoselect:Y.bool("AUTOSELECT"),forced:Y.bool("FORCED"),lang:Y.LANGUAGE,url:Y.URI?I.resolve(Y.URI,x):""};if(S.length){var O=I.findGroup(S,z.groupId)||S[0];E(z,O,"audioCodec"),E(z,O,"textCodec")}j.push(z)}}return j},I.parseLevelPlaylist=function(y,x,C,S,F){var j=new _.LevelDetails(x),A=j.fragments,Y=null,z=0,O=0,H=0,U=0,L=null,K=new T.Fragment(S,x),ee,oe,ae,be=-1,_e=!1;for(l.lastIndex=0,j.m3u8=y;(ee=l.exec(y))!==null;){_e&&(_e=!1,K=new T.Fragment(S,x),K.start=H,K.sn=z,K.cc=U,K.level=C,Y&&(K.initSegment=Y,K.rawProgramDateTime=Y.rawProgramDateTime));var fe=ee[1];if(fe){K.duration=parseFloat(fe);var Re=(" "+ee[2]).slice(1);K.title=Re||null,K.tagList.push(Re?["INF",fe,Re]:["INF",fe])}else if(ee[3])Object(k.isFiniteNumber)(K.duration)&&(K.start=H,ae&&(K.levelkey=ae),K.sn=z,K.level=C,K.cc=U,K.urlId=F,A.push(K),K.relurl=(" "+ee[3]).slice(1),p(K,L),L=K,H+=K.duration,z++,O=0,_e=!0);else if(ee[4]){var Ce=(" "+ee[4]).slice(1);L?K.setByteRange(Ce,L):K.setByteRange(Ce)}else if(ee[5])K.rawProgramDateTime=(" "+ee[5]).slice(1),K.tagList.push(["PROGRAM-DATE-TIME",K.rawProgramDateTime]),be===-1&&(be=A.length);else{if(ee=ee[0].match(f),!ee){r.logger.warn("No matches on slow regex match for level playlist!");continue}for(oe=1;oe<ee.length&&!(typeof ee[oe]!="undefined");oe++);var ce=(" "+ee[oe]).slice(1),te=(" "+ee[oe+1]).slice(1),W=ee[oe+2]?(" "+ee[oe+2]).slice(1):"";switch(ce){case"PLAYLIST-TYPE":j.type=te.toUpperCase();break;case"MEDIA-SEQUENCE":z=j.startSN=parseInt(te);break;case"SKIP":{var X=new h.AttrList(te),V=X.decimalInteger("SKIPPED-SEGMENTS");if(Object(k.isFiniteNumber)(V)){j.skippedSegments=V;for(var Z=V;Z--;)A.unshift(null);z+=V}var q=X.enumeratedString("RECENTLY-REMOVED-DATERANGES");q&&(j.recentlyRemovedDateranges=q.split(" "));break}case"TARGETDURATION":j.targetduration=parseFloat(te);break;case"VERSION":j.version=parseInt(te);break;case"EXTM3U":break;case"ENDLIST":j.live=!1;break;case"#":(te||W)&&K.tagList.push(W?[te,W]:[te]);break;case"DIS":U++;case"GAP":K.tagList.push([ce]);break;case"BITRATE":K.tagList.push([ce,te]);break;case"DISCONTINUITY-SEQ":U=parseInt(te);break;case"KEY":{var ie,ne=new h.AttrList(te),J=ne.enumeratedString("METHOD"),$=ne.URI,le=ne.hexadecimalInteger("IV"),he=ne.enumeratedString("KEYFORMATVERSIONS"),Se=ne.enumeratedString("KEYID"),Ue=(ie=ne.enumeratedString("KEYFORMAT"))!=null?ie:"identity",Xe=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Xe.indexOf(Ue)>-1){r.logger.warn("Keyformat "+Ue+" is not supported from the manifest");continue}else if(Ue!=="identity")continue;J&&(ae=t.LevelKey.fromURL(x,$),$&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(J)>=0&&(ae.method=J,ae.keyFormat=Ue,Se&&(ae.keyID=Se),he&&(ae.keyFormatVersions=he),ae.iv=le));break}case"START":{var $e=new h.AttrList(te),Ye=$e.decimalFloatingPoint("TIME-OFFSET");Object(k.isFiniteNumber)(Ye)&&(j.startTimeOffset=Ye);break}case"MAP":{var et=new h.AttrList(te);K.relurl=et.URI,et.BYTERANGE&&K.setByteRange(et.BYTERANGE),K.level=C,K.sn="initSegment",ae&&(K.levelkey=ae),K.initSegment=null,Y=K,_e=!0;break}case"SERVER-CONTROL":{var qe=new h.AttrList(te);j.canBlockReload=qe.bool("CAN-BLOCK-RELOAD"),j.canSkipUntil=qe.optionalFloat("CAN-SKIP-UNTIL",0),j.canSkipDateRanges=j.canSkipUntil>0&&qe.bool("CAN-SKIP-DATERANGES"),j.partHoldBack=qe.optionalFloat("PART-HOLD-BACK",0),j.holdBack=qe.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Pe=new h.AttrList(te);j.partTarget=Pe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ie=j.partList;Ie||(Ie=j.partList=[]);var Ze=O>0?Ie[Ie.length-1]:void 0,nt=O++,ye=new T.Part(new h.AttrList(te),K,x,nt,Ze);Ie.push(ye),K.duration+=ye.duration;break}case"PRELOAD-HINT":{var ue=new h.AttrList(te);j.preloadHint=ue;break}case"RENDITION-REPORT":{var pe=new h.AttrList(te);j.renditionReports=j.renditionReports||[],j.renditionReports.push(pe);break}default:r.logger.warn("line parsed but not handled: "+ee);break}}}L&&!L.relurl?(A.pop(),H-=L.duration,j.partList&&(j.fragmentHint=L)):j.partList&&(p(K,L),K.cc=U,j.fragmentHint=K);var me=A.length,Oe=A[0],ve=A[me-1];if(H+=j.skippedSegments*j.targetduration,H>0&&me&&ve){j.averagetargetduration=H/me;var xe=ve.sn;j.endSN=xe!=="initSegment"?xe:0,Oe&&(j.startCC=Oe.cc,Oe.initSegment||j.fragments.every(function(Ae){return Ae.relurl&&u(Ae.relurl)})&&(r.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),K=new T.Fragment(S,x),K.relurl=ve.relurl,K.level=C,K.sn="initSegment",Oe.initSegment=K,j.needSidxRanges=!0))}else j.endSN=0,j.startCC=0;return j.fragmentHint&&(H+=j.fragmentHint.duration),j.totalduration=H,j.endCC=U,be>0&&v(A,be),j},I}();function s(I,R){["video","audio","text"].forEach(function(y){var x=I.filter(function(S){return Object(c.isCodecType)(S,y)});if(x.length){var C=x.filter(function(S){return S.lastIndexOf("avc1",0)===0||S.lastIndexOf("mp4a",0)===0});R[y+"Codec"]=C.length>0?C[0]:x[0],I=I.filter(function(S){return x.indexOf(S)===-1})}}),R.unknownCodecs=I}function E(I,R,y){var x=R[y];x&&(I[y]=x)}function v(I,R){for(var y=I[R],x=R;x--;){var C=I[x];if(!C)return;C.programDateTime=y.programDateTime-C.duration*1e3,y=C}}function p(I,R){I.rawProgramDateTime?I.programDateTime=Date.parse(I.rawProgramDateTime):R!=null&&R.programDateTime&&(I.programDateTime=R.endProgramDateTime),Object(k.isFiniteNumber)(I.programDateTime)||(I.programDateTime=null,I.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/polyfills/number.ts"),b=w("./src/events.ts"),m=w("./src/errors.ts"),T=w("./src/utils/logger.ts"),_=w("./src/utils/mp4-tools.ts"),t=w("./src/loader/m3u8-parser.ts"),h=w("./src/types/loader.ts"),r=w("./src/utils/attr-list.ts");function c(l){var f=l.type;switch(f){case h.PlaylistContextType.AUDIO_TRACK:return h.PlaylistLevelType.AUDIO;case h.PlaylistContextType.SUBTITLE_TRACK:return h.PlaylistLevelType.SUBTITLE;default:return h.PlaylistLevelType.MAIN}}function i(l,f){var d=l.url;return(d===void 0||d.indexOf("data:")===0)&&(d=f.url),d}var n=function(){function l(d){this.hls=void 0,this.loaders=Object.create(null),this.hls=d,this.registerListeners()}var f=l.prototype;return f.registerListeners=function(){var u=this.hls;u.on(b.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(b.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(b.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),u.on(b.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.unregisterListeners=function(){var u=this.hls;u.off(b.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(b.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(b.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),u.off(b.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.createInternalLoader=function(u){var o=this.hls.config,s=o.pLoader,E=o.loader,v=s||E,p=new v(o);return u.loader=p,this.loaders[u.type]=p,p},f.getInternalLoader=function(u){return this.loaders[u.type]},f.resetInternalLoader=function(u){this.loaders[u]&&delete this.loaders[u]},f.destroyInternalLoaders=function(){for(var u in this.loaders){var o=this.loaders[u];o&&o.destroy(),this.resetInternalLoader(u)}},f.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},f.onManifestLoading=function(u,o){var s=o.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:h.PlaylistContextType.MANIFEST,url:s,deliveryDirectives:null})},f.onLevelLoading=function(u,o){var s=o.id,E=o.level,v=o.url,p=o.deliveryDirectives;this.load({id:s,groupId:null,level:E,responseType:"text",type:h.PlaylistContextType.LEVEL,url:v,deliveryDirectives:p})},f.onAudioTrackLoading=function(u,o){var s=o.id,E=o.groupId,v=o.url,p=o.deliveryDirectives;this.load({id:s,groupId:E,level:null,responseType:"text",type:h.PlaylistContextType.AUDIO_TRACK,url:v,deliveryDirectives:p})},f.onSubtitleTrackLoading=function(u,o){var s=o.id,E=o.groupId,v=o.url,p=o.deliveryDirectives;this.load({id:s,groupId:E,level:null,responseType:"text",type:h.PlaylistContextType.SUBTITLE_TRACK,url:v,deliveryDirectives:p})},f.load=function(u){var o,s=this.hls.config,E=this.getInternalLoader(u);if(E){var v=E.context;if(v&&v.url===u.url){T.logger.trace("[playlist-loader]: playlist request ongoing");return}T.logger.log("[playlist-loader]: aborting previous loader for type: "+u.type),E.abort()}var p,I,R,y;switch(u.type){case h.PlaylistContextType.MANIFEST:p=s.manifestLoadingMaxRetry,I=s.manifestLoadingTimeOut,R=s.manifestLoadingRetryDelay,y=s.manifestLoadingMaxRetryTimeout;break;case h.PlaylistContextType.LEVEL:case h.PlaylistContextType.AUDIO_TRACK:case h.PlaylistContextType.SUBTITLE_TRACK:p=0,I=s.levelLoadingTimeOut;break;default:p=s.levelLoadingMaxRetry,I=s.levelLoadingTimeOut,R=s.levelLoadingRetryDelay,y=s.levelLoadingMaxRetryTimeout;break}if(E=this.createInternalLoader(u),(o=u.deliveryDirectives)!==null&&o!==void 0&&o.part){var x;if(u.type===h.PlaylistContextType.LEVEL&&u.level!==null?x=this.hls.levels[u.level].details:u.type===h.PlaylistContextType.AUDIO_TRACK&&u.id!==null?x=this.hls.audioTracks[u.id].details:u.type===h.PlaylistContextType.SUBTITLE_TRACK&&u.id!==null&&(x=this.hls.subtitleTracks[u.id].details),x){var C=x.partTarget,S=x.targetduration;C&&S&&(I=Math.min(Math.max(C*3,S*.8)*1e3,I))}}var F={timeout:I,maxRetry:p,retryDelay:R,maxRetryDelay:y,highWaterMark:0},j={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};E.load(u,F,j)},f.loadsuccess=function(u,o,s,E){if(E===void 0&&(E=null),s.isSidxRequest){this.handleSidxRequest(u,s),this.handlePlaylistLoaded(u,o,s,E);return}this.resetInternalLoader(s.type);var v=u.data;if(v.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(u,s,"no EXTM3U delimiter",E);return}o.parsing.start=performance.now(),v.indexOf("#EXTINF:")>0||v.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(u,o,s,E):this.handleMasterPlaylist(u,o,s,E)},f.loaderror=function(u,o,s){s===void 0&&(s=null),this.handleNetworkError(o,s,!1,u)},f.loadtimeout=function(u,o,s){s===void 0&&(s=null),this.handleNetworkError(o,s,!0)},f.handleMasterPlaylist=function(u,o,s,E){var v=this.hls,p=u.data,I=i(u,s),R=t.default.parseMasterPlaylist(p,I),y=R.levels,x=R.sessionData;if(!y.length){this.handleManifestParsingError(u,s,"no level found in manifest",E);return}var C=y.map(function(z){return{id:z.attrs.AUDIO,audioCodec:z.audioCodec}}),S=y.map(function(z){return{id:z.attrs.SUBTITLES,textCodec:z.textCodec}}),F=t.default.parseMasterPlaylistMedia(p,I,"AUDIO",C),j=t.default.parseMasterPlaylistMedia(p,I,"SUBTITLES",S),A=t.default.parseMasterPlaylistMedia(p,I,"CLOSED-CAPTIONS");if(F.length){var Y=F.some(function(z){return!z.url});!Y&&y[0].audioCodec&&!y[0].attrs.AUDIO&&(T.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 r.AttrList({}),bitrate:0,url:""}))}v.trigger(b.Events.MANIFEST_LOADED,{levels:y,audioTracks:F,subtitles:j,captions:A,url:I,stats:o,networkDetails:E,sessionData:x})},f.handleTrackOrLevelPlaylist=function(u,o,s,E){var v=this.hls,p=s.id,I=s.level,R=s.type,y=i(u,s),x=Object(k.isFiniteNumber)(p)?p:0,C=Object(k.isFiniteNumber)(I)?I:x,S=c(s),F=t.default.parseLevelPlaylist(u.data,y,C,S,x);if(!F.fragments.length){v.trigger(b.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:y,reason:"no fragments found in level",level:typeof s.level=="number"?s.level:void 0});return}if(R===h.PlaylistContextType.MANIFEST){var j={attrs:new r.AttrList({}),bitrate:0,details:F,name:"",url:y};v.trigger(b.Events.MANIFEST_LOADED,{levels:[j],audioTracks:[],url:y,stats:o,networkDetails:E,sessionData:null})}if(o.parsing.end=performance.now(),F.needSidxRanges){var A,Y=(A=F.fragments[0].initSegment)===null||A===void 0?void 0:A.url;this.load({url:Y,isSidxRequest:!0,type:R,level:I,levelDetails:F,id:p,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}s.levelDetails=F,this.handlePlaylistLoaded(u,o,s,E)},f.handleSidxRequest=function(u,o){var s=Object(_.parseSegmentIndex)(new Uint8Array(u.data));if(!s)return;var E=s.references,v=o.levelDetails;E.forEach(function(p,I){var R=p.info,y=v.fragments[I];y.byteRange.length===0&&y.setByteRange(String(1+R.end-R.start)+"@"+String(R.start)),y.initSegment&&y.initSegment.setByteRange(String(s.moovEndOffset)+"@0")})},f.handleManifestParsingError=function(u,o,s,E){this.hls.trigger(b.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:o.type===h.PlaylistContextType.MANIFEST,url:u.url,reason:s,response:u,context:o,networkDetails:E})},f.handleNetworkError=function(u,o,s,E){s===void 0&&(s=!1),T.logger.warn("[playlist-loader]: A network "+(s?"timeout":"error")+" occurred while loading "+u.type+" level: "+u.level+" id: "+u.id+' group-id: "'+u.groupId+'"');var v=m.ErrorDetails.UNKNOWN,p=!1,I=this.getInternalLoader(u);switch(u.type){case h.PlaylistContextType.MANIFEST:v=s?m.ErrorDetails.MANIFEST_LOAD_TIMEOUT:m.ErrorDetails.MANIFEST_LOAD_ERROR,p=!0;break;case h.PlaylistContextType.LEVEL:v=s?m.ErrorDetails.LEVEL_LOAD_TIMEOUT:m.ErrorDetails.LEVEL_LOAD_ERROR,p=!1;break;case h.PlaylistContextType.AUDIO_TRACK:v=s?m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,p=!1;break;case h.PlaylistContextType.SUBTITLE_TRACK:v=s?m.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:m.ErrorDetails.SUBTITLE_LOAD_ERROR,p=!1;break}I&&this.resetInternalLoader(u.type);var R={type:m.ErrorTypes.NETWORK_ERROR,details:v,fatal:p,url:u.url,loader:I,context:u,networkDetails:o};E&&(R.response=E),this.hls.trigger(b.Events.ERROR,R)},f.handlePlaylistLoaded=function(u,o,s,E){var v=s.type,p=s.level,I=s.id,R=s.groupId,y=s.loader,x=s.levelDetails,C=s.deliveryDirectives;if(!(x!=null&&x.targetduration)){this.handleManifestParsingError(u,s,"invalid target duration",E);return}if(!y)return;x.live&&(y.getCacheAge&&(x.ageHeader=y.getCacheAge()||0),(!y.getCacheAge||isNaN(x.ageHeader))&&(x.ageHeader=0));switch(v){case h.PlaylistContextType.MANIFEST:case h.PlaylistContextType.LEVEL:this.hls.trigger(b.Events.LEVEL_LOADED,{details:x,level:p||0,id:I||0,stats:o,networkDetails:E,deliveryDirectives:C});break;case h.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(b.Events.AUDIO_TRACK_LOADED,{details:x,id:I||0,groupId:R||"",stats:o,networkDetails:E,deliveryDirectives:C});break;case h.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(b.Events.SUBTITLE_TRACK_LOADED,{details:x,id:I||0,groupId:R||"",stats:o,networkDetails:E,deliveryDirectives:C});break}},l}();g.default=n},"./src/polyfills/number.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"isFiniteNumber",function(){return k}),w.d(g,"MAX_SAFE_INTEGER",function(){return b});var k=Number.isFinite||function(m){return typeof m=="number"&&isFinite(m)},b=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(N,g,w){"use strict";w.r(g);var k=function(){function b(){}return b.getSilentFrame=function(T,_){switch(T){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},b}();g.default=k},"./src/remux/mp4-generator.ts":function(N,g,w){"use strict";w.r(g);var k=Math.pow(2,32)-1,b=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]),h=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:h};var r=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 i=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);m.FTYP=m.box(m.types.ftyp,i,l,i,n),m.DINF=m.box(m.types.dinf,m.box(m.types.dref,r))},m.box=function(_){for(var t=8,h=arguments.length,r=new Array(h>1?h-1:0),c=1;c<h;c++)r[c-1]=arguments[c];for(var i=r.length,n=i;i--;)t+=r[i].byteLength;var l=new Uint8Array(t);for(l[0]=t>>24&255,l[1]=t>>16&255,l[2]=t>>8&255,l[3]=t&255,l.set(_,4),i=0,t=8;i<n;i++)l.set(r[i],t),t+=r[i].byteLength;return l},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 h=Math.floor(t/(k+1)),r=Math.floor(t%(k+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,h>>24,h>>16&255,h>>8&255,h&255,r>>24,r>>16&255,r>>8&255,r&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,h){return m.box(m.types.moof,m.mfhd(_),m.traf(h,t))},m.moov=function(_){for(var t=_.length,h=[];t--;)h[t]=m.trak(_[t]);return m.box.apply(null,[m.types.moov,m.mvhd(_[0].timescale,_[0].duration)].concat(h).concat(m.mvex(_)))},m.mvex=function(_){for(var t=_.length,h=[];t--;)h[t]=m.trex(_[t]);return m.box.apply(null,[m.types.mvex].concat(h))},m.mvhd=function(_,t){t*=_;var h=Math.floor(t/(k+1)),r=Math.floor(t%(k+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,h>>24,h>>16&255,h>>8&255,h&255,r>>24,r>>16&255,r>>8&255,r&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||[],h=new Uint8Array(4+t.length),r,c;for(r=0;r<t.length;r++)c=t[r].flags,h[r+4]=c.dependsOn<<4|c.isDependedOn<<2|c.hasRedundancy;return m.box(m.types.sdtp,h)},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=[],h=[],r,c,i;for(r=0;r<_.sps.length;r++)c=_.sps[r],i=c.byteLength,t.push(i>>>8&255),t.push(i&255),t=t.concat(Array.prototype.slice.call(c));for(r=0;r<_.pps.length;r++)c=_.pps[r],i=c.byteLength,h.push(i>>>8&255),h.push(i&255),h=h.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(h))),l=_.width,f=_.height,d=_.pixelRatio[0],u=_.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,l>>8&255,l&255,f>>8&255,f&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([d>>24,d>>16&255,d>>8&255,d&255,u>>24,u>>16&255,u>>8&255,u&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,h=_.duration*_.timescale,r=_.width,c=_.height,i=Math.floor(h/(k+1)),n=Math.floor(h%(k+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,i>>24,i>>16&255,i>>8&255,i&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,r>>8&255,r&255,0,0,c>>8&255,c&255,0,0]))},m.traf=function(_,t){var h=m.sdtp(_),r=_.id,c=Math.floor(t/(k+1)),i=Math.floor(t%(k+1));return m.box(m.types.traf,m.box(m.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),m.box(m.types.tfdt,new Uint8Array([1,0,0,0,c>>24,c>>16&255,c>>8&255,c&255,i>>24,i>>16&255,i>>8&255,i&255])),m.trun(_,h.length+16+20+8+16+8+8),h)},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 h=_.samples||[],r=h.length,c=12+16*r,i=new Uint8Array(c),n,l,f,d,u,o;for(t+=8+c,i.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),n=0;n<r;n++)l=h[n],f=l.duration,d=l.size,u=l.flags,o=l.cts,i.set([f>>>24&255,f>>>16&255,f>>>8&255,f&255,d>>>24&255,d>>>16&255,d>>>8&255,d&255,u.isLeading<<2|u.dependsOn,u.isDependedOn<<6|u.hasRedundancy<<4|u.paddingValue<<1|u.isNonSync,u.degradPrio&240<<8,u.degradPrio&15,o>>>24&255,o>>>16&255,o>>>8&255,o&255],12+16*n);return m.box(m.types.trun,i)},m.initSegment=function(_){m.types||m.init();var t=m.moov(_),h=new Uint8Array(m.FTYP.byteLength+t.byteLength);return h.set(m.FTYP),h.set(t,m.FTYP.byteLength),h},m}();b.types=void 0,b.HDLR_TYPES=void 0,b.STTS=void 0,b.STSC=void 0,b.STCO=void 0,b.STSZ=void 0,b.VMHD=void 0,b.SMHD=void 0,b.STSD=void 0,b.FTYP=void 0,b.DINF=void 0,g.default=b},"./src/remux/mp4-remuxer.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return o}),w.d(g,"normalizePts",function(){return s});var k=w("./src/polyfills/number.ts"),b=w("./src/remux/aac-helper.ts"),m=w("./src/remux/mp4-generator.ts"),T=w("./src/events.ts"),_=w("./src/errors.ts"),t=w("./src/utils/logger.ts"),h=w("./src/types/loader.ts"),r=w("./src/utils/timescale-conversion.ts");function c(){return c=Object.assign||function(I){for(var R=1;R<arguments.length;R++){var y=arguments[R];for(var x in y)Object.prototype.hasOwnProperty.call(y,x)&&(I[x]=y[x])}return I},c.apply(this,arguments)}var i=10*1e3,n=1024,l=1152,f=null,d=null,u=!1,o=function(){function I(y,x,C,S){if(S===void 0&&(S=""),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=y,this.config=x,this.typeSupported=C,this.ISGenerated=!1,f===null){var F=navigator.userAgent||"",j=F.match(/Chrome\/(\d+)/i);f=j?parseInt(j[1]):0}if(d===null){var A=navigator.userAgent.match(/Safari\/(\d+)/i);d=A?parseInt(A[1]):0}u=!!f&&f<75||!!d&&d<600}var R=I.prototype;return R.destroy=function(){},R.resetTimeStamp=function(x){t.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=x},R.resetNextTimestamp=function(){t.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},R.resetInitSegment=function(){t.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},R.getVideoStartPts=function(x){var C=!1,S=x.reduce(function(F,j){var A=j.pts-F;return A<-4294967296?(C=!0,s(F,j.pts)):A>0?F:j.pts},x[0].pts);return C&&t.logger.debug("PTS rollover detected"),S},R.remux=function(x,C,S,F,j,A,Y,z){var O,H,U,L,K,ee,oe=j,ae=j,be=x.pid>-1,_e=C.pid>-1,fe=C.samples.length,Re=x.samples.length>0,Ce=fe>1,ce=(!be||Re)&&(!_e||Ce)||this.ISGenerated||Y;if(ce){this.ISGenerated||(U=this.generateIS(x,C,j));var te=this.isVideoContiguous,W=-1;if(Ce&&(W=E(C.samples),!te&&this.config.forceKeyFrameOnDiscontinuity))if(ee=!0,W>0){t.logger.warn("[mp4-remuxer]: Dropped "+W+" out of "+fe+" video samples due to a missing keyframe");var X=this.getVideoStartPts(C.samples);C.samples=C.samples.slice(W),C.dropped+=W,ae+=(C.samples[0].pts-X)/(C.timescale||9e4)}else W===-1&&(t.logger.warn("[mp4-remuxer]: No keyframe found out of "+fe+" video samples"),ee=!1);if(this.ISGenerated){if(Re&&Ce){var V=this.getVideoStartPts(C.samples),Z=s(x.samples[0].pts,V)-V,q=Z/C.inputTimeScale;oe+=Math.max(0,q),ae+=Math.max(0,-q)}if(Re){if(x.samplerate||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(x,C,j)),H=this.remuxAudio(x,oe,this.isAudioContiguous,A,_e||Ce||z===h.PlaylistLevelType.AUDIO?ae:void 0),Ce){var ie=H?H.endPTS-H.startPTS:0;C.inputTimeScale||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(x,C,j)),O=this.remuxVideo(C,ae,te,ie)}}else Ce&&(O=this.remuxVideo(C,ae,te,0));O&&(O.firstKeyFrame=W,O.independent=W!==-1)}}return this.ISGenerated&&(S.samples.length&&(K=this.remuxID3(S,j)),F.samples.length&&(L=this.remuxText(F,j))),{audio:H,video:O,initSegment:U,independent:ee,text:L,id3:K}},R.generateIS=function(x,C,S){var F=x.samples,j=C.samples,A=this.typeSupported,Y={},z=!Object(k.isFiniteNumber)(this._initPTS),O="audio/mp4",H,U,L;if(z&&(H=U=Infinity),x.config&&F.length&&(x.timescale=x.samplerate,x.isAAC||(A.mpeg?(O="audio/mpeg",x.codec=""):A.mp3&&(x.codec="mp3")),Y.audio={id:"audio",container:O,codec:x.codec,initSegment:!x.isAAC&&A.mpeg?new Uint8Array(0):m.default.initSegment([x]),metadata:{channelCount:x.channelCount}},z&&(L=x.inputTimeScale,H=U=F[0].pts-Math.round(L*S))),C.sps&&C.pps&&j.length&&(C.timescale=C.inputTimeScale,Y.video={id:"main",container:"video/mp4",codec:C.codec,initSegment:m.default.initSegment([C]),metadata:{width:C.width,height:C.height}},z)){L=C.inputTimeScale;var K=this.getVideoStartPts(j),ee=Math.round(L*S);U=Math.min(U,s(j[0].dts,K)-ee),H=Math.min(H,K-ee)}if(Object.keys(Y).length)return this.ISGenerated=!0,z&&(this._initPTS=H,this._initDTS=U),{tracks:Y,initPTS:H,timescale:L}},R.remuxVideo=function(x,C,S,F){var j=x.inputTimeScale,A=x.samples,Y=[],z=A.length,O=this._initPTS,H=this.nextAvcDts,U=8,L,K,ee,oe=Number.POSITIVE_INFINITY,ae=Number.NEGATIVE_INFINITY,be=0,_e=!1;if(!S||H===null){var fe=C*j,Re=A[0].pts-s(A[0].dts,A[0].pts);H=fe-Re}for(var Ce=0;Ce<z;Ce++){var ce=A[Ce];if(ce.pts=s(ce.pts-O,H),ce.dts=s(ce.dts-O,H),ce.dts>ce.pts){var te=9e4*.2;be=Math.max(Math.min(be,ce.pts-ce.dts),-1*te)}ce.dts<A[Ce>0?Ce-1:Ce].dts&&(_e=!0)}_e&&A.sort(function(Ct,yt){var ht=Ct.dts-yt.dts,Ut=Ct.pts-yt.pts;return ht||Ut}),K=A[0].dts,ee=A[A.length-1].dts;var W=Math.round((ee-K)/(z-1));if(be<0){if(be<W*-2){t.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(r.toMsFromMpegTsClock)(-W,!0)+" ms");for(var X=be,V=0;V<z;V++)A[V].dts=X=Math.max(X,A[V].pts-W),A[V].pts=Math.max(X,A[V].pts)}else{t.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(r.toMsFromMpegTsClock)(be,!0)+" ms to overcome this issue");for(var Z=0;Z<z;Z++)A[Z].dts=A[Z].dts+be}K=A[0].dts}if(S){var q=K-H,ie=q>W,ne=q<-1;if(ie||ne){ie?t.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(q,!0)+" ms ("+q+"dts) hole between fragments detected, filling it"):t.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(-q,!0)+" ms ("+q+"dts) overlapping between fragments detected"),K=H;var J=A[0].pts-q;A[0].dts=K,A[0].pts=J,t.logger.log("Video: First PTS/DTS adjusted: "+Object(r.toMsFromMpegTsClock)(J,!0)+"/"+Object(r.toMsFromMpegTsClock)(K,!0)+", delta: "+Object(r.toMsFromMpegTsClock)(q,!0)+" ms")}}u&&(K=Math.max(0,K));for(var $=0,le=0,he=0;he<z;he++){for(var Se=A[he],Ue=Se.units,Xe=Ue.length,$e=0,Ye=0;Ye<Xe;Ye++)$e+=Ue[Ye].data.length;le+=$e,$+=Xe,Se.length=$e,Se.dts=Math.max(Se.dts,K),Se.pts=Math.max(Se.pts,Se.dts,0),oe=Math.min(Se.pts,oe),ae=Math.max(Se.pts,ae)}ee=A[z-1].dts;var et=le+4*$+8,qe;try{qe=new Uint8Array(et)}catch(Ct){this.observer.emit(T.Events.ERROR,T.Events.ERROR,{type:_.ErrorTypes.MUX_ERROR,details:_.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:et,reason:"fail allocating video mdat "+et});return}var Pe=new DataView(qe.buffer);Pe.setUint32(0,et),qe.set(m.default.types.mdat,4);for(var Ie=0;Ie<z;Ie++){for(var Ze=A[Ie],nt=Ze.units,ye=0,ue=0,pe=nt.length;ue<pe;ue++){var me=nt[ue],Oe=me.data,ve=me.data.byteLength;Pe.setUint32(U,ve),U+=4,qe.set(Oe,U),U+=ve,ye+=4+ve}if(Ie<z-1)L=A[Ie+1].dts-Ze.dts;else{var xe=this.config,Ae=Ze.dts-A[Ie>0?Ie-1:Ie].dts;if(xe.stretchShortVideoTrack&&this.nextAudioPts!==null){var Le=Math.floor(xe.maxBufferHole*j),Me=(F?oe+F*j:this.nextAudioPts)-Ze.pts;Me>Le?(L=Me-Ae,L<0&&(L=Ae),t.logger.log("[mp4-remuxer]: It is approximately "+Me/90+" ms to the next segment; using duration "+L/90+" ms for the last video frame.")):L=Ae}else L=Ae}var We=Math.round(Ze.pts-Ze.dts);Y.push(new v(Ze.key,L,ye,We))}if(Y.length&&f&&f<70){var rt=Y[0].flags;rt.dependsOn=2,rt.isNonSync=0}console.assert(L!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=H=ee+L,this.isVideoContiguous=!0;var at=m.default.moof(x.sequenceNumber++,K,c({},x,{samples:Y})),it="video",st={data1:at,data2:qe,startPTS:oe/j,endPTS:(ae+L)/j,startDTS:K/j,endDTS:H/j,type:it,hasAudio:!1,hasVideo:!0,nb:Y.length,dropped:x.dropped};return x.samples=[],x.dropped=0,console.assert(qe.length,"MDAT length must not be zero"),st},R.remuxAudio=function(x,C,S,F,j){var A=x.inputTimeScale,Y=x.samplerate?x.samplerate:A,z=A/Y,O=x.isAAC?n:l,H=O*z,U=this._initPTS,L=!x.isAAC&&this.typeSupported.mpeg,K=[],ee=x.samples,oe=L?0:8,ae=this.nextAudioPts||-1,be=C*A;if(this.isAudioContiguous=S=S||ee.length&&ae>0&&(F&&Math.abs(be-ae)<9e3||Math.abs(s(ee[0].pts-U,be)-ae)<20*H),ee.forEach(function(Oe){Oe.pts=s(Oe.pts-U,be)}),!S||ae<0){if(ee=ee.filter(function(Oe){return Oe.pts>=0}),!ee.length)return;j===0?ae=0:F?ae=Math.max(0,be):ae=ee[0].pts}if(x.isAAC)for(var _e=j!==void 0,fe=this.config.maxAudioFramesDrift,Re=0,Ce=ae;Re<ee.length;Re++){var ce=ee[Re],te=ce.pts,W=te-Ce,X=Math.abs(1e3*W/A);if(W<=-fe*H&&_e)Re===0&&(t.logger.warn("Audio frame @ "+(te/A).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*W/A)+" ms."),this.nextAudioPts=ae=Ce=te);else if(W>=fe*H&&X<i&&_e){var V=Math.round(W/H);Ce=te-V*H,Ce<0&&(V--,Ce+=H),Re===0&&(this.nextAudioPts=ae=Ce),t.logger.warn("[mp4-remuxer]: Injecting "+V+" audio frame @ "+(Ce/A).toFixed(3)+"s due to "+Math.round(1e3*W/A)+" ms gap.");for(var Z=0;Z<V;Z++){var q=Math.max(Ce,0),ie=b.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);ie||(t.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ie=ce.unit.subarray()),ee.splice(Re,0,{unit:ie,pts:q}),Ce+=H,Re++}}ce.pts=Ce,Ce+=H}for(var ne=null,J=null,$,le=0,he=ee.length;he--;)le+=ee[he].unit.byteLength;for(var Se=0,Ue=ee.length;Se<Ue;Se++){var Xe=ee[Se],$e=Xe.unit,Ye=Xe.pts;if(J!==null){var et=K[Se-1];et.duration=Math.round((Ye-J)/z)}else if(S&&x.isAAC&&(Ye=ae),ne=Ye,le>0){le+=oe;try{$=new Uint8Array(le)}catch(Oe){this.observer.emit(T.Events.ERROR,T.Events.ERROR,{type:_.ErrorTypes.MUX_ERROR,details:_.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:le,reason:"fail allocating audio mdat "+le});return}if(!L){var qe=new DataView($.buffer);qe.setUint32(0,le),$.set(m.default.types.mdat,4)}}else return;$.set($e,oe);var Pe=$e.byteLength;oe+=Pe,K.push(new v(!0,O,Pe,0)),J=Ye}var Ie=K.length;if(!Ie)return;var Ze=K[K.length-1];this.nextAudioPts=ae=J+z*Ze.duration;var nt=L?new Uint8Array(0):m.default.moof(x.sequenceNumber++,ne/z,c({},x,{samples:K}));x.samples=[];var ye=ne/A,ue=ae/A,pe="audio",me={data1:nt,data2:$,startPTS:ye,endPTS:ue,startDTS:ye,endDTS:ue,type:pe,hasAudio:!0,hasVideo:!1,nb:Ie};return this.isAudioContiguous=!0,console.assert($.length,"MDAT length must not be zero"),me},R.remuxEmptyAudio=function(x,C,S,F){var j=x.inputTimeScale,A=x.samplerate?x.samplerate:j,Y=j/A,z=this.nextAudioPts,O=(z!==null?z:F.startDTS*j)+this._initDTS,H=F.endDTS*j+this._initDTS,U=Y*n,L=Math.ceil((H-O)/U),K=b.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);if(t.logger.warn("[mp4-remuxer]: remux empty Audio"),!K){t.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ee=[],oe=0;oe<L;oe++){var ae=O+oe*U;ee.push({unit:K,pts:ae,dts:ae})}return x.samples=ee,this.remuxAudio(x,C,S,!1)},R.remuxID3=function(x,C){var S=x.samples.length;if(!S)return;for(var F=x.inputTimeScale,j=this._initPTS,A=this._initDTS,Y=0;Y<S;Y++){var z=x.samples[Y];z.pts=s(z.pts-j,C*F)/F,z.dts=s(z.dts-A,C*F)/F}var O=x.samples;return x.samples=[],{samples:O}},R.remuxText=function(x,C){var S=x.samples.length;if(!S)return;for(var F=x.inputTimeScale,j=this._initPTS,A=0;A<S;A++){var Y=x.samples[A];Y.pts=s(Y.pts-j,C*F)/F}x.samples.sort(function(O,H){return O.pts-H.pts});var z=x.samples;return x.samples=[],{samples:z}},I}();function s(I,R){var y;if(R===null)return I;for(R<I?y=-8589934592:y=8589934592;Math.abs(I-R)>4294967296;)I+=y;return I}function E(I){for(var R=0;R<I.length;R++)if(I[R].key)return R;return-1}var v=function(R,y,x,C){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=y,this.size=x,this.cts=C,this.flags=new p(R)},p=function(R){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=R?2:1,this.isNonSync=R?0:1}},"./src/remux/passthrough-remuxer.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/polyfills/number.ts"),b=w("./src/utils/mp4-tools.ts"),m=w("./src/loader/fragment.ts"),T=w("./src/utils/logger.ts"),_=function(){function r(){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=r.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,l,f){this.audioCodec=l,this.videoCodec=f,this.generateInitSegment(n),this.emitInitSegment=!0},c.generateInitSegment=function(n){var l=this.audioCodec,f=this.videoCodec;if(!n||!n.byteLength){this.initTracks=void 0,this.initData=void 0;return}var d=this.initData=Object(b.parseInitSegment)(n);l||(l=h(d.audio,m.ElementaryStreamTypes.AUDIO)),f||(f=h(d.video,m.ElementaryStreamTypes.VIDEO));var u={};d.audio&&d.video?u.audiovideo={container:"video/mp4",codec:l+","+f,initSegment:n,id:"main"}:d.audio?u.audio={container:"audio/mp4",codec:l,initSegment:n,id:"audio"}:d.video?u.video={container:"video/mp4",codec:f,initSegment:n,id:"main"}:T.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=u},c.remux=function(n,l,f,d,u){var o=this.initPTS,s=this.lastEndDTS,E={audio:void 0,video:void 0,text:d,id3:f,initSegment:void 0};Object(k.isFiniteNumber)(s)||(s=this.lastEndDTS=u||0);var v=l.samples;if(!v||!v.length)return E;var p={initPTS:void 0,timescale:1},I=this.initData;if((!I||!I.length)&&(this.generateInitSegment(v),I=this.initData),!I||!I.length)return T.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),E;this.emitInitSegment&&(p.tracks=this.initTracks,this.emitInitSegment=!1),Object(k.isFiniteNumber)(o)||(this.initPTS=p.initPTS=o=t(I,v,s));var R=Object(b.getDuration)(v,I),y=s,x=R+y;Object(b.offsetStartDTS)(I,v,o),R>0?this.lastEndDTS=x:(T.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var C=!!I.audio,S=!!I.video,F="";C&&(F+="audio"),S&&(F+="video");var j={data1:v,startPTS:y,startDTS:y,endPTS:x,endDTS:x,type:F,hasAudio:C,hasVideo:S,nb:1,dropped:0};return E.audio=j.type==="audio"?j:void 0,E.video=j.type!=="audio"?j:void 0,E.text=d,E.id3=f,E.initSegment=p,E},r}(),t=function(c,i,n){return Object(b.getStartDTS)(c,i)-n};function h(r,c){var i=r==null?void 0:r.codec;return i&&i.length>4?i:i==="hvc1"?"hvc1.1.c.L120.90":i==="av01"?"av01.0.04M.08":i==="avc1"||c===m.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}g.default=_},"./src/task-loop.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return k});var k=function(){function b(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var m=b.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(){},b}()},"./src/types/cmcd.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"CMCDVersion",function(){return k}),w.d(g,"CMCDObjectType",function(){return b}),w.d(g,"CMCDStreamingFormat",function(){return m}),w.d(g,"CMCDStreamType",function(){return T});var k=1,b;(function(_){_.MANIFEST="m",_.AUDIO="a",_.VIDEO="v",_.MUXED="av",_.INIT="i",_.CAPTION="c",_.TIMED_TEXT="tt",_.KEY="k",_.OTHER="o"})(b||(b={}));var m;(function(_){_.DASH="d",_.HLS="h",_.SMOOTH="s",_.OTHER="o"})(m||(m={}));var T;(function(_){_.VOD="v",_.LIVE="l"})(T||(T={}))},"./src/types/level.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"HlsSkip",function(){return m}),w.d(g,"getSkipValue",function(){return T}),w.d(g,"HlsUrlParameters",function(){return _}),w.d(g,"Level",function(){return t});function k(h,r){for(var c=0;c<r.length;c++){var i=r[c];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(h,i.key,i)}}function b(h,r,c){return r&&k(h.prototype,r),c&&k(h,c),h}var m;(function(h){h.No="",h.Yes="YES",h.v2="v2"})(m||(m={}));function T(h,r){var c=h.canSkipUntil,i=h.canSkipDateRanges,n=h.endSN,l=r!==void 0?r-n:0;return c&&l<c?i?m.v2:m.Yes:m.No}var _=function(){function h(c,i,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=c,this.part=i,this.skip=n}var r=h.prototype;return r.addDirectives=function(i){var n=new self.URL(i);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()},h}(),t=function(){function h(r){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=[r.url],this.attrs=r.attrs,this.bitrate=r.bitrate,r.details&&(this.details=r.details),this.id=r.id||0,this.name=r.name,this.width=r.width||0,this.height=r.height||0,this.audioCodec=r.audioCodec,this.videoCodec=r.videoCodec,this.unknownCodecs=r.unknownCodecs,this.codecSet=[r.videoCodec,r.audioCodec].filter(function(c){return c}).join(",").replace(/\.[^.,]+/g,"")}return b(h,[{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 i=c%this.url.length;this._urlId!==i&&(this.details=void 0,this._urlId=i)}}]),h}()},"./src/types/loader.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"PlaylistContextType",function(){return k}),w.d(g,"PlaylistLevelType",function(){return b});var k;(function(m){m.MANIFEST="manifest",m.LEVEL="level",m.AUDIO_TRACK="audioTrack",m.SUBTITLE_TRACK="subtitleTrack"})(k||(k={}));var b;(function(m){m.MAIN="main",m.AUDIO="audio",m.SUBTITLE="subtitle"})(b||(b={}))},"./src/types/transmuxer.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"ChunkMetadata",function(){return k});var k=function(T,_,t,h,r,c){h===void 0&&(h=0),r===void 0&&(r=-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=b(),this.buffering={audio:b(),video:b(),audiovideo:b()},this.level=T,this.sn=_,this.id=t,this.size=h,this.part=r,this.partial=c};function b(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"AttrList",function(){return m});var k=/^(\d+)x(\d+)$/,b=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,m=function(){function T(t){typeof t=="string"&&(t=T.parseAttrList(t));for(var h in t)t.hasOwnProperty(h)&&(this[h]=t[h])}var _=T.prototype;return _.decimalInteger=function(h){var r=parseInt(this[h],10);return r>Number.MAX_SAFE_INTEGER?Infinity:r},_.hexadecimalInteger=function(h){if(this[h]){var r=(this[h]||"0x").slice(2);r=(r.length&1?"0":"")+r;for(var c=new Uint8Array(r.length/2),i=0;i<r.length/2;i++)c[i]=parseInt(r.slice(i*2,i*2+2),16);return c}else return null},_.hexadecimalIntegerAsNumber=function(h){var r=parseInt(this[h],16);return r>Number.MAX_SAFE_INTEGER?Infinity:r},_.decimalFloatingPoint=function(h){return parseFloat(this[h])},_.optionalFloat=function(h,r){var c=this[h];return c?parseFloat(c):r},_.enumeratedString=function(h){return this[h]},_.bool=function(h){return this[h]==="YES"},_.decimalResolution=function(h){var r=k.exec(this[h]);return r===null?void 0:{width:parseInt(r[1],10),height:parseInt(r[2],10)}},T.parseAttrList=function(h){var r,c={},i='"';for(b.lastIndex=0;(r=b.exec(h))!==null;){var n=r[2];n.indexOf(i)===0&&n.lastIndexOf(i)===n.length-1&&(n=n.slice(1,-1)),c[r[1]]=n}return c},T}()},"./src/utils/binary-search.ts":function(N,g,w){"use strict";w.r(g);var k={search:function(m,T){for(var _=0,t=m.length-1,h=null,r=null;_<=t;){h=(_+t)/2|0,r=m[h];var c=T(r);if(c>0)_=h+1;else if(c<0)t=h-1;else return r}return null}};g.default=k},"./src/utils/buffer-helper.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"BufferHelper",function(){return m});var k=w("./src/utils/logger.ts"),b={length:0,start:function(){return 0},end:function(){return 0}},m=function(){function T(){}return T.isBuffered=function(t,h){try{if(t){for(var r=T.getBuffered(t),c=0;c<r.length;c++)if(h>=r.start(c)&&h<=r.end(c))return!0}}catch(i){}return!1},T.bufferInfo=function(t,h,r){try{if(t){var c=T.getBuffered(t),i=[],n;for(n=0;n<c.length;n++)i.push({start:c.start(n),end:c.end(n)});return this.bufferedInfo(i,h,r)}}catch(l){}return{len:0,start:h,end:h,nextStart:void 0}},T.bufferedInfo=function(t,h,r){h=Math.max(0,h),t.sort(function(p,I){var R=p.start-I.start;return R||I.end-p.end});var c=[];if(r)for(var i=0;i<t.length;i++){var n=c.length;if(n){var l=c[n-1].end;t[i].start-l<r?t[i].end>l&&(c[n-1].end=t[i].end):c.push(t[i])}else c.push(t[i])}else c=t;for(var f=0,d,u=h,o=h,s=0;s<c.length;s++){var E=c[s].start,v=c[s].end;if(h+r>=E&&h<v)u=E,o=v,f=o-h;else if(h+r<E){d=E;break}}return{len:f,start:u||0,end:o||0,nextStart:d}},T.getBuffered=function(t){try{return t.buffered}catch(h){return k.logger.log("failed to get media.buffered",h),b}},T}()},"./src/utils/cea-608-parser.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"Row",function(){return o}),w.d(g,"CaptionScreen",function(){return s});var k=w("./src/utils/logger.ts"),b={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(x){var C=x;return b.hasOwnProperty(x)&&(C=b[x]),String.fromCharCode(C)},T=15,_=100,t={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},h={17:2,18:4,21:6,22:8,23:10,19:13,20:15},r={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},i=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],n;(function(y){y[y.ERROR=0]="ERROR",y[y.TEXT=1]="TEXT",y[y.WARNING=2]="WARNING",y[y.INFO=2]="INFO",y[y.DEBUG=3]="DEBUG",y[y.DATA=3]="DATA"})(n||(n={}));var l=function(){function y(){this.time=null,this.verboseLevel=n.ERROR}var x=y.prototype;return x.log=function(S,F){this.verboseLevel>=S&&k.logger.log(this.time+" ["+S+"] "+F)},y}(),f=function(x){for(var C=[],S=0;S<x.length;S++)C.push(x[S].toString(16));return C},d=function(){function y(C,S,F,j,A){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=C||"white",this.underline=S||!1,this.italics=F||!1,this.background=j||"black",this.flash=A||!1}var x=y.prototype;return x.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},x.setStyles=function(S){for(var F=["foreground","underline","italics","background","flash"],j=0;j<F.length;j++){var A=F[j];S.hasOwnProperty(A)&&(this[A]=S[A])}},x.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},x.equals=function(S){return this.foreground===S.foreground&&this.underline===S.underline&&this.italics===S.italics&&this.background===S.background&&this.flash===S.flash},x.copy=function(S){this.foreground=S.foreground,this.underline=S.underline,this.italics=S.italics,this.background=S.background,this.flash=S.flash},x.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},y}(),u=function(){function y(C,S,F,j,A,Y){this.uchar=void 0,this.penState=void 0,this.uchar=C||" ",this.penState=new d(S,F,j,A,Y)}var x=y.prototype;return x.reset=function(){this.uchar=" ",this.penState.reset()},x.setChar=function(S,F){this.uchar=S,this.penState.copy(F)},x.setPenState=function(S){this.penState.copy(S)},x.equals=function(S){return this.uchar===S.uchar&&this.penState.equals(S.penState)},x.copy=function(S){this.uchar=S.uchar,this.penState.copy(S.penState)},x.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},y}(),o=function(){function y(C){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var S=0;S<_;S++)this.chars.push(new u);this.logger=C,this.pos=0,this.currPenState=new d}var x=y.prototype;return x.equals=function(S){for(var F=!0,j=0;j<_;j++)if(!this.chars[j].equals(S.chars[j])){F=!1;break}return F},x.copy=function(S){for(var F=0;F<_;F++)this.chars[F].copy(S.chars[F])},x.isEmpty=function(){for(var S=!0,F=0;F<_;F++)if(!this.chars[F].isEmpty()){S=!1;break}return S},x.setCursor=function(S){this.pos!==S&&(this.pos=S),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=_)},x.moveCursor=function(S){var F=this.pos+S;if(S>1)for(var j=this.pos+1;j<F+1;j++)this.chars[j].setPenState(this.currPenState);this.setCursor(F)},x.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},x.insertChar=function(S){S>=144&&this.backSpace();var F=m(S);if(this.pos>=_){this.logger.log(n.ERROR,"Cannot insert "+S.toString(16)+" ("+F+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(F,this.currPenState),this.moveCursor(1)},x.clearFromPos=function(S){var F;for(F=S;F<_;F++)this.chars[F].reset()},x.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},x.clearToEndOfRow=function(){this.clearFromPos(this.pos)},x.getTextString=function(){for(var S=[],F=!0,j=0;j<_;j++){var A=this.chars[j].uchar;A!==" "&&(F=!1),S.push(A)}return F?"":S.join("")},x.setPenStyles=function(S){this.currPenState.setStyles(S);var F=this.chars[this.pos];F.setPenState(this.currPenState)},y}(),s=function(){function y(C){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var S=0;S<T;S++)this.rows.push(new o(C));this.logger=C,this.currRow=T-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var x=y.prototype;return x.reset=function(){for(var S=0;S<T;S++)this.rows[S].clear();this.currRow=T-1},x.equals=function(S){for(var F=!0,j=0;j<T;j++)if(!this.rows[j].equals(S.rows[j])){F=!1;break}return F},x.copy=function(S){for(var F=0;F<T;F++)this.rows[F].copy(S.rows[F])},x.isEmpty=function(){for(var S=!0,F=0;F<T;F++)if(!this.rows[F].isEmpty()){S=!1;break}return S},x.backSpace=function(){var S=this.rows[this.currRow];S.backSpace()},x.clearToEndOfRow=function(){var S=this.rows[this.currRow];S.clearToEndOfRow()},x.insertChar=function(S){var F=this.rows[this.currRow];F.insertChar(S)},x.setPen=function(S){var F=this.rows[this.currRow];F.setPenStyles(S)},x.moveCursor=function(S){var F=this.rows[this.currRow];F.moveCursor(S)},x.setCursor=function(S){this.logger.log(n.INFO,"setCursor: "+S);var F=this.rows[this.currRow];F.setCursor(S)},x.setPAC=function(S){this.logger.log(n.INFO,"pacData = "+JSON.stringify(S));var F=S.row-1;if(this.nrRollUpRows&&F<this.nrRollUpRows-1&&(F=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==F){for(var j=0;j<T;j++)this.rows[j].clear();var A=this.currRow+1-this.nrRollUpRows,Y=this.lastOutputScreen;if(Y){var z=Y.rows[A].cueStartTime,O=this.logger.time;if(z&&O!==null&&z<O)for(var H=0;H<this.nrRollUpRows;H++)this.rows[F-this.nrRollUpRows+H+1].copy(Y.rows[A+H])}}this.currRow=F;var U=this.rows[this.currRow];if(S.indent!==null){var L=S.indent,K=Math.max(L-1,0);U.setCursor(S.indent),S.color=U.chars[K].penState.foreground}var ee={foreground:S.color,underline:S.underline,italics:S.italics,background:"black",flash:!1};this.setPen(ee)},x.setBkgData=function(S){this.logger.log(n.INFO,"bkgData = "+JSON.stringify(S)),this.backSpace(),this.setPen(S),this.insertChar(32)},x.setRollUpRows=function(S){this.nrRollUpRows=S},x.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 S=this.currRow+1-this.nrRollUpRows,F=this.rows.splice(S,1)[0];F.clear(),this.rows.splice(this.currRow,0,F),this.logger.log(n.INFO,"Rolling up")},x.getDisplayText=function(S){S=S||!1;for(var F=[],j="",A=-1,Y=0;Y<T;Y++){var z=this.rows[Y].getTextString();z&&(A=Y+1,S?F.push("Row "+A+": '"+z+"'"):F.push(z.trim()))}return F.length>0&&(S?j="["+F.join(" | ")+"]":j=F.join(`
|
|
|
`)),j},x.getTextAndFormat=function(){return this.rows},y}(),E=function(){function y(C,S,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=C,this.outputFilter=S,this.mode=null,this.verbose=0,this.displayedMemory=new s(F),this.nonDisplayedMemory=new s(F),this.lastOutputScreen=new s(F),this.currRollUpRow=this.displayedMemory.rows[T-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=F}var x=y.prototype;return x.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[T-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},x.getHandler=function(){return this.outputFilter},x.setHandler=function(S){this.outputFilter=S},x.setPAC=function(S){this.writeScreen.setPAC(S)},x.setBkgData=function(S){this.writeScreen.setBkgData(S)},x.setMode=function(S){if(S===this.mode)return;this.mode=S,this.logger.log(n.INFO,"MODE="+S),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=S},x.insertChars=function(S){for(var F=0;F<S.length;F++)this.writeScreen.insertChar(S[F]);var j=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(n.INFO,j+": "+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())},x.ccRCL=function(){this.logger.log(n.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},x.ccBS=function(){if(this.logger.log(n.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},x.ccAOF=function(){},x.ccAON=function(){},x.ccDER=function(){this.logger.log(n.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},x.ccRU=function(S){this.logger.log(n.INFO,"RU("+S+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(S)},x.ccFON=function(){this.logger.log(n.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},x.ccRDC=function(){this.logger.log(n.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},x.ccTR=function(){this.logger.log(n.INFO,"TR"),this.setMode("MODE_TEXT")},x.ccRTD=function(){this.logger.log(n.INFO,"RTD"),this.setMode("MODE_TEXT")},x.ccEDM=function(){this.logger.log(n.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},x.ccCR=function(){this.logger.log(n.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},x.ccENM=function(){this.logger.log(n.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},x.ccEOC=function(){if(this.logger.log(n.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var S=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=S,this.writeScreen=this.nonDisplayedMemory,this.logger.log(n.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},x.ccTO=function(S){this.logger.log(n.INFO,"TO("+S+") - Tab Offset"),this.writeScreen.moveCursor(S)},x.ccMIDROW=function(S){var F={flash:!1};if(F.underline=S%2===1,F.italics=S>=46,F.italics)F.foreground="white";else{var j=Math.floor(S/2)-16,A=["white","green","blue","cyan","red","yellow","magenta"];F.foreground=A[j]}this.logger.log(n.INFO,"MIDROW: "+JSON.stringify(F)),this.writeScreen.setPen(F)},x.outputDataUpdate=function(S){S===void 0&&(S=!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),S&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:F),this.lastOutputScreen.copy(this.displayedMemory))},x.cueSplitAtTime=function(S){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,S,this.displayedMemory),this.cueStartTime=S))},y}(),v=function(){function y(C,S,F){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var j=new l;this.channels=[null,new E(C,S,j),new E(C+1,F,j)],this.cmdHistory=R(),this.logger=j}var x=y.prototype;return x.getHandler=function(S){return this.channels[S].getHandler()},x.setHandler=function(S,F){this.channels[S].setHandler(F)},x.addData=function(S,F){var j,A,Y,z=!1;this.logger.time=S;for(var O=0;O<F.length;O+=2){if(A=F[O]&127,Y=F[O+1]&127,A===0&&Y===0)continue;if(this.logger.log(n.DATA,"["+f([F[O],F[O+1]])+"] -> ("+f([A,Y])+")"),j=this.parseCmd(A,Y),j||(j=this.parseMidrow(A,Y)),j||(j=this.parsePAC(A,Y)),j||(j=this.parseBackgroundAttributes(A,Y)),!j&&(z=this.parseChars(A,Y),z)){var H=this.currentChannel;if(H&&H>0){var U=this.channels[H];U.insertChars(z)}else this.logger.log(n.WARNING,"No channel found yet. TEXT-MODE?")}!j&&!z&&this.logger.log(n.WARNING,"Couldn't parse cleaned data "+f([A,Y])+" orig: "+f([F[O],F[O+1]]))}},x.parseCmd=function(S,F){var j=this.cmdHistory,A=(S===20||S===28||S===21||S===29)&&F>=32&&F<=47,Y=(S===23||S===31)&&F>=33&&F<=35;if(!(A||Y))return!1;if(I(S,F,j))return p(null,null,j),this.logger.log(n.DEBUG,"Repeated command ("+f([S,F])+") is dropped"),!0;var z=S===20||S===21||S===23?1:2,O=this.channels[z];return S===20||S===21||S===28||S===29?F===32?O.ccRCL():F===33?O.ccBS():F===34?O.ccAOF():F===35?O.ccAON():F===36?O.ccDER():F===37?O.ccRU(2):F===38?O.ccRU(3):F===39?O.ccRU(4):F===40?O.ccFON():F===41?O.ccRDC():F===42?O.ccTR():F===43?O.ccRTD():F===44?O.ccEDM():F===45?O.ccCR():F===46?O.ccENM():F===47&&O.ccEOC():O.ccTO(F-32),p(S,F,j),this.currentChannel=z,!0},x.parseMidrow=function(S,F){var j=0;if((S===17||S===25)&&F>=32&&F<=47){if(S===17?j=1:j=2,j!==this.currentChannel)return this.logger.log(n.ERROR,"Mismatch channel in midrow parsing"),!1;var A=this.channels[j];return A?(A.ccMIDROW(F),this.logger.log(n.DEBUG,"MIDROW ("+f([S,F])+")"),!0):!1}return!1},x.parsePAC=function(S,F){var j,A=this.cmdHistory,Y=(S>=17&&S<=23||S>=25&&S<=31)&&F>=64&&F<=127,z=(S===16||S===24)&&F>=64&&F<=95;if(!(Y||z))return!1;if(I(S,F,A))return p(null,null,A),!0;var O=S<=23?1:2;F>=64&&F<=95?j=O===1?t[S]:r[S]:j=O===1?h[S]:c[S];var H=this.channels[O];return H?(H.setPAC(this.interpretPAC(j,F)),p(S,F,A),this.currentChannel=O,!0):!1},x.interpretPAC=function(S,F){var j,A={color:null,italics:!1,indent:null,underline:!1,row:S};return F>95?j=F-96:j=F-64,A.underline=(j&1)===1,j<=13?A.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(j/2)]:j<=15?(A.italics=!0,A.color="white"):A.indent=Math.floor((j-16)/2)*4,A},x.parseChars=function(S,F){var j,A=null,Y=null;if(S>=25?(j=2,Y=S-8):(j=1,Y=S),Y>=17&&Y<=19){var z;Y===17?z=F+80:Y===18?z=F+112:z=F+144,this.logger.log(n.INFO,"Special char '"+m(z)+"' in channel "+j),A=[z]}else S>=32&&S<=127&&(A=F===0?[S]:[S,F]);if(A){var O=f(A);this.logger.log(n.DEBUG,"Char codes = "+O.join(",")),p(S,F,this.cmdHistory)}return A},x.parseBackgroundAttributes=function(S,F){var j=(S===16||S===24)&&F>=32&&F<=47,A=(S===23||S===31)&&F>=45&&F<=47;if(!(j||A))return!1;var Y,z={};S===16||S===24?(Y=Math.floor((F-32)/2),z.background=i[Y],F%2===1&&(z.background=z.background+"_semi")):F===45?z.background="transparent":(z.foreground="black",F===47&&(z.underline=!0));var O=S<=23?1:2,H=this.channels[O];return H.setBkgData(z),p(S,F,this.cmdHistory),!0},x.reset=function(){for(var S=0;S<Object.keys(this.channels).length;S++){var F=this.channels[S];F&&F.reset()}this.cmdHistory=R()},x.cueSplitAtTime=function(S){for(var F=0;F<this.channels.length;F++){var j=this.channels[F];j&&j.cueSplitAtTime(S)}},y}();function p(y,x,C){C.a=y,C.b=x}function I(y,x,C){return C.a===y&&C.b===x}function R(){return{a:null,b:null}}g.default=v},"./src/utils/codecs.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"isCodecType",function(){return b}),w.d(g,"isCodecSupportedInMp4",function(){return m});var k={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 b(T,_){var t=k[_];return!!t&&t[T.slice(0,4)]===!0}function m(T,_){return MediaSource.isTypeSupported((_||"video")+'/mp4;codecs="'+T+'"')}},"./src/utils/cues.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/utils/vttparser.ts"),b=w("./src/utils/webvtt-parser.ts"),m=w("./src/utils/texttrack-utils.ts"),T=/\s/,_={newCue:function(h,r,c,i){for(var n=[],l,f,d,u,o,s=self.VTTCue||self.TextTrackCue,E=0;E<i.rows.length;E++)if(l=i.rows[E],d=!0,u=0,o="",!l.isEmpty()){for(var v=0;v<l.chars.length;v++)T.test(l.chars[v].uchar)&&d?u++:(o+=l.chars[v].uchar,d=!1);l.cueStartTime=r,r===c&&(c+=1e-4),u>=16?u--:u++;var p=Object(k.fixLineBreaks)(o.trim()),I=Object(b.generateCueId)(r,c,p);(!h||!h.cues||!h.cues.getCueById(I))&&(f=new s(r,c,p),f.id=I,f.line=E+1,f.align="left",f.position=10+Math.min(80,Math.floor(u*8/32)*10),n.push(f))}return h&&n.length&&(n.sort(function(R,y){return R.line==="auto"||y.line==="auto"?0:R.line>8&&y.line>8?y.line-R.line:R.line-y.line}),n.forEach(function(R){return Object(m.addCueToTrack)(h,R)})),n}};g.default=_},"./src/utils/discontinuities.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"findFirstFragWithCC",function(){return T}),w.d(g,"shouldAlignOnDiscontinuities",function(){return _}),w.d(g,"findDiscontinuousReferenceFrag",function(){return t}),w.d(g,"adjustSlidingStart",function(){return r}),w.d(g,"alignStream",function(){return c}),w.d(g,"alignPDT",function(){return n}),w.d(g,"alignFragmentByPDTDelta",function(){return l}),w.d(g,"alignMediaPlaylistByPDT",function(){return f});var k=w("./src/polyfills/number.ts"),b=w("./src/utils/logger.ts"),m=w("./src/controller/level-helper.ts");function T(d,u){for(var o=null,s=0,E=d.length;s<E;s++){var v=d[s];if(v&&v.cc===u){o=v;break}}return o}function _(d,u,o){return!!(u.details&&(o.endCC>o.startCC||d&&d.cc<o.startCC))}function t(d,u){var o=d.fragments,s=u.fragments;if(!s.length||!o.length){b.logger.log("No fragments to align");return}var E=T(o,s[0].cc);if(!E||E&&!E.startPTS){b.logger.log("No frag in previous level to align on");return}return E}function h(d,u){if(d){var o=d.start+u;d.start=d.startPTS=o,d.endPTS=o+d.duration}}function r(d,u){for(var o=u.fragments,s=0,E=o.length;s<E;s++)h(o[s],d);u.fragmentHint&&h(u.fragmentHint,d),u.alignedSliding=!0}function c(d,u,o){if(!u)return;i(d,o,u),!o.alignedSliding&&u.details&&n(o,u.details),!o.alignedSliding&&u.details&&!o.skippedSegments&&Object(m.adjustSliding)(u.details,o)}function i(d,u,o){if(_(d,o,u)){var s=t(o.details,u);s&&Object(k.isFiniteNumber)(s.start)&&(b.logger.log("Adjusting PTS using last level due to CC increase within current level "+u.url),r(s.start,u))}}function n(d,u){if(!u.fragments.length||!d.hasProgramDateTime||!u.hasProgramDateTime)return;var o=u.fragments[0].programDateTime,s=d.fragments[0].programDateTime,E=(s-o)/1e3+u.fragments[0].start;E&&Object(k.isFiniteNumber)(E)&&(b.logger.log("Adjusting PTS using programDateTime delta "+(s-o)+"ms, sliding:"+E.toFixed(3)+" "+d.url+" "),r(E,d))}function l(d,u){var o=d.programDateTime;if(!o)return;var s=(o-u)/1e3;d.start=d.startPTS=s,d.endPTS=s+d.duration}function f(d,u){if(!u.fragments.length||!d.hasProgramDateTime||!u.hasProgramDateTime)return;var o=u.fragments[0].programDateTime,s=u.fragments[0].start,E=o-s*1e3;d.fragments.forEach(function(v){l(v,E)}),d.fragmentHint&&l(d.fragmentHint,E),d.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/utils/ewma.ts"),b=function(){function m(_,t,h){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=h,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new k.default(_),this.fast_=new k.default(t)}var T=m.prototype;return T.update=function(t,h){var r=this.slow_,c=this.fast_;this.slow_.halfLife!==t&&(this.slow_=new k.default(t,r.getEstimate(),r.getTotalWeight())),this.fast_.halfLife!==h&&(this.fast_=new k.default(h,c.getEstimate(),c.getTotalWeight()))},T.sample=function(t,h){t=Math.max(t,this.minDelayMs_);var r=8*h,c=t/1e3,i=r/c;this.fast_.sample(c,i),this.slow_.sample(c,i)},T.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},T.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},T.destroy=function(){},m}();g.default=b},"./src/utils/ewma.ts":function(N,g,w){"use strict";w.r(g);var k=function(){function b(T,_,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=T,this.alpha_=T?Math.exp(Math.log(.5)/T):0,this.estimate_=_,this.totalWeight_=t}var m=b.prototype;return m.sample=function(_,t){var h=Math.pow(this.alpha_,_);this.estimate_=t*(1-h)+h*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_},b}();g.default=k},"./src/utils/fetch-loader.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"fetchSupported",function(){return l});var k=w("./src/polyfills/number.ts"),b=w("./src/loader/load-stats.ts"),m=w("./src/demux/chunk-cache.ts");function T(s,E){s.prototype=Object.create(E.prototype),s.prototype.constructor=s,c(s,E)}function _(s){var E=typeof Map=="function"?new Map:void 0;return _=function(p){if(p===null||!r(p))return p;if(typeof p!="function")throw new TypeError("Super expression must either be null or a function");if(typeof E!="undefined"){if(E.has(p))return E.get(p);E.set(p,I)}function I(){return t(p,arguments,i(this).constructor)}return I.prototype=Object.create(p.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),c(I,p)},_(s)}function t(s,E,v){return h()?t=Reflect.construct:t=function(I,R,y){var x=[null];x.push.apply(x,R);var C=Function.bind.apply(I,x),S=new C;return y&&c(S,y.prototype),S},t.apply(null,arguments)}function h(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(s){return!1}}function r(s){return Function.toString.call(s).indexOf("[native code]")!==-1}function c(s,E){return c=Object.setPrototypeOf||function(p,I){return p.__proto__=I,p},c(s,E)}function i(s){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},i(s)}function n(){return n=Object.assign||function(s){for(var E=1;E<arguments.length;E++){var v=arguments[E];for(var p in v)Object.prototype.hasOwnProperty.call(v,p)&&(s[p]=v[p])}return s},n.apply(this,arguments)}function l(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(s){}return!1}var f=function(){function s(v){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=v.fetchSetup||u,this.controller=new self.AbortController,this.stats=new b.LoadStats}var E=s.prototype;return E.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},E.abortInternal=function(){var p=this.response;(!p||!p.ok)&&(this.stats.aborted=!0,this.controller.abort())},E.abort=function(){var p;this.abortInternal(),(p=this.callbacks)!==null&&p!==void 0&&p.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},E.load=function(p,I,R){var y=this,x=this.stats;if(x.loading.start)throw new Error("Loader can only be used once.");x.loading.start=self.performance.now();var C=d(p,this.controller.signal),S=R.onProgress,F=p.responseType==="arraybuffer",j=F?"byteLength":"length";this.context=p,this.config=I,this.callbacks=R,this.request=this.fetchSetup(p,C),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){y.abortInternal(),R.onTimeout(x,p,y.response)},I.timeout),self.fetch(this.request).then(function(A){if(y.response=y.loader=A,!A.ok){var Y=A.status,z=A.statusText;throw new o(z||"fetch, bad network response",Y,A)}return x.loading.first=Math.max(self.performance.now(),x.loading.start),x.total=parseInt(A.headers.get("Content-Length")||"0"),S&&Object(k.isFiniteNumber)(I.highWaterMark)?y.loadProgressively(A,x,p,I.highWaterMark,S):F?A.arrayBuffer():A.text()}).then(function(A){var Y=y.response;self.clearTimeout(y.requestTimeout),x.loading.end=Math.max(self.performance.now(),x.loading.first),x.loaded=x.total=A[j];var z={url:Y.url,data:A};S&&!Object(k.isFiniteNumber)(I.highWaterMark)&&S(x,p,A,Y),R.onSuccess(z,x,p,Y)}).catch(function(A){if(self.clearTimeout(y.requestTimeout),x.aborted)return;var Y=A.code||0;R.onError({code:Y,text:A.message},p,A.details)})},E.getCacheAge=function(){var p=null;if(this.response){var I=this.response.headers.get("age");p=I?parseFloat(I):null}return p},E.loadProgressively=function(p,I,R,y,x){y===void 0&&(y=0);var C=new m.default,S=p.body.getReader(),F=function j(){return S.read().then(function(A){if(A.done)return C.dataLength&&x(I,R,C.flush(),p),Promise.resolve(new ArrayBuffer(0));var Y=A.value,z=Y.length;return I.loaded+=z,z<y||C.dataLength?(C.push(Y),C.dataLength>=y&&x(I,R,C.flush(),p)):x(I,R,Y,p),j()}).catch(function(){return Promise.reject()})};return F()},s}();function d(s,E){var v={method:"GET",mode:"cors",credentials:"same-origin",signal:E,headers:new self.Headers(n({},s.headers))};return s.rangeEnd&&v.headers.set("Range","bytes="+s.rangeStart+"-"+String(s.rangeEnd-1)),v}function u(s,E){return new self.Request(s.url,E)}var o=function(s){T(E,s);function E(v,p,I){var R;return R=s.call(this,v)||this,R.code=void 0,R.details=void 0,R.code=p,R.details=I,R}return E}(_(Error));g.default=f},"./src/utils/imsc1-ttml-parser.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"IMSC1_CODEC",function(){return r}),w.d(g,"parseIMSC1",function(){return l});var k=w("./src/utils/mp4-tools.ts"),b=w("./src/utils/vttparser.ts"),m=w("./src/utils/vttcue.ts"),T=w("./src/demux/id3.ts"),_=w("./src/utils/timescale-conversion.ts"),t=w("./src/utils/webvtt-parser.ts");function h(){return h=Object.assign||function(y){for(var x=1;x<arguments.length;x++){var C=arguments[x];for(var S in C)Object.prototype.hasOwnProperty.call(C,S)&&(y[S]=C[S])}return y},h.apply(this,arguments)}var r="stpp.ttml.im1t",c=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,i=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,n={left:"start",center:"center",right:"end",start:"start",end:"end"};function l(y,x,C,S,F){var j=Object(k.findBox)(new Uint8Array(y),["mdat"]);if(j.length===0){F(new Error("Could not parse IMSC1 mdat"));return}var A=j[0],Y=Object(T.utf8ArrayToStr)(new Uint8Array(y,A.start,A.end-A.start)),z=Object(_.toTimescaleFromScale)(x,1,C);try{S(f(Y,z))}catch(O){F(O)}}function f(y,x){var C=new DOMParser,S=C.parseFromString(y,"text/xml"),F=S.getElementsByTagName("tt")[0];if(!F)throw new Error("Invalid ttml");var j={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},A=Object.keys(j).reduce(function(U,L){return U[L]=F.getAttribute("ttp:"+L)||j[L],U},{}),Y=F.getAttribute("xml:space")!=="preserve",z=u(d(F,"styling","style")),O=u(d(F,"layout","region")),H=d(F,"body","[begin]");return[].map.call(H,function(U){var L=o(U,Y);if(!L||!U.hasAttribute("begin"))return null;var K=p(U.getAttribute("begin"),A),ee=p(U.getAttribute("dur"),A),oe=p(U.getAttribute("end"),A);if(K===null)throw v(U);if(oe===null){if(ee===null)throw v(U);oe=K+ee}var ae=new m.default(K-x,oe-x,L);ae.id=Object(t.generateCueId)(ae.startTime,ae.endTime,ae.text);var be=O[U.getAttribute("region")],_e=z[U.getAttribute("style")];ae.position=10,ae.size=80;var fe=s(be,_e),Re=fe.textAlign;if(Re){var Ce=n[Re];Ce&&(ae.lineAlign=Ce),ae.align=Re}return h(ae,fe),ae}).filter(function(U){return U!==null})}function d(y,x,C){var S=y.getElementsByTagName(x)[0];return S?[].slice.call(S.querySelectorAll(C)):[]}function u(y){return y.reduce(function(x,C){var S=C.getAttribute("xml:id");return S&&(x[S]=C),x},{})}function o(y,x){return[].slice.call(y.childNodes).reduce(function(C,S,F){var j;return S.nodeName==="br"&&F?C+`
|
|
|
`:(j=S.childNodes)!==null&&j!==void 0&&j.length?o(S,x):x?C+S.textContent.trim().replace(/\s+/g," "):C+S.textContent},"")}function s(y,x){var C="http://www.w3.org/ns/ttml#styling",S=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return S.reduce(function(F,j){var A=E(x,C,j)||E(y,C,j);return A&&(F[j]=A),F},{})}function E(y,x,C){return y.hasAttributeNS(x,C)?y.getAttributeNS(x,C):null}function v(y){return new Error("Could not parse ttml timestamp "+y)}function p(y,x){if(!y)return null;var C=Object(b.parseTimeStamp)(y);return C===null&&(c.test(y)?C=I(y,x):i.test(y)&&(C=R(y,x))),C}function I(y,x){var C=c.exec(y),S=(C[4]|0)+(C[5]|0)/x.subFrameRate;return(C[1]|0)*3600+(C[2]|0)*60+(C[3]|0)+S/x.frameRate}function R(y,x){var C=i.exec(y),S=Number(C[1]),F=C[2];switch(F){case"h":return S*3600;case"m":return S*60;case"ms":return S*1e3;case"f":return S/x.frameRate;case"t":return S/x.tickRate}return S}},"./src/utils/logger.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"enableLogs",function(){return t}),w.d(g,"logger",function(){return h});var k=function(){},b={trace:k,debug:k,log:k,warn:k,info:k,error:k},m=b;function T(r){var c=self.console[r];return c?c.bind(self.console,"["+r+"] >"):k}function _(r){for(var c=arguments.length,i=new Array(c>1?c-1:0),n=1;n<c;n++)i[n-1]=arguments[n];i.forEach(function(l){m[l]=r[l]?r[l].bind(r):T(l)})}function t(r){if(self.console&&r===!0||typeof r=="object"){_(r,"debug","log","info","warn","error");try{m.log()}catch(c){m=b}}else m=b}var h=m},"./src/utils/mediakeys-helper.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"KeySystems",function(){return k}),w.d(g,"requestMediaKeySystemAccess",function(){return b});var k;(function(m){m.WIDEVINE="com.widevine.alpha",m.PLAYREADY="com.microsoft.playready"})(k||(k={}));var b=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"getMediaSource",function(){return k});function k(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"bin2str",function(){return _}),w.d(g,"readUint16",function(){return t}),w.d(g,"readUint32",function(){return h}),w.d(g,"writeUint32",function(){return r}),w.d(g,"findBox",function(){return c}),w.d(g,"parseSegmentIndex",function(){return i}),w.d(g,"parseInitSegment",function(){return n}),w.d(g,"getStartDTS",function(){return l}),w.d(g,"getDuration",function(){return f}),w.d(g,"computeRawDurationFromSamples",function(){return d}),w.d(g,"offsetStartDTS",function(){return u}),w.d(g,"segmentValidRange",function(){return o}),w.d(g,"appendUint8Array",function(){return s});var k=w("./src/utils/typed-array.ts"),b=w("./src/loader/fragment.ts"),m=Math.pow(2,32)-1,T=[].push;function _(E){return String.fromCharCode.apply(null,E)}function t(E,v){"data"in E&&(v+=E.start,E=E.data);var p=E[v]<<8|E[v+1];return p<0?65536+p:p}function h(E,v){"data"in E&&(v+=E.start,E=E.data);var p=E[v]<<24|E[v+1]<<16|E[v+2]<<8|E[v+3];return p<0?4294967296+p:p}function r(E,v,p){"data"in E&&(v+=E.start,E=E.data),E[v]=p>>24,E[v+1]=p>>16&255,E[v+2]=p>>8&255,E[v+3]=p&255}function c(E,v){var p=[];if(!v.length)return p;var I,R,y;"data"in E?(I=E.data,R=E.start,y=E.end):(I=E,R=0,y=I.byteLength);for(var x=R;x<y;){var C=h(I,x),S=_(I.subarray(x+4,x+8)),F=C>1?x+C:y;if(S===v[0])if(v.length===1)p.push({data:I,start:x+8,end:F});else{var j=c({data:I,start:x+8,end:F},v.slice(1));j.length&&T.apply(p,j)}x=F}return p}function i(E){var v=c(E,["moov"]),p=v[0],I=p?p.end:null,R=c(E,["sidx"]);if(!R||!R[0])return null;var y=[],x=R[0],C=x.data[0],S=C===0?8:16,F=h(x,S);S+=4;var j=0,A=0;C===0?S+=8:S+=16,S+=2;var Y=x.end+A,z=t(x,S);S+=2;for(var O=0;O<z;O++){var H=S,U=h(x,H);H+=4;var L=U&2147483647,K=(U&2147483648)>>>31;if(K===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ee=h(x,H);H+=4,y.push({referenceSize:L,subsegmentDuration:ee,info:{duration:ee/F,start:Y,end:Y+L-1}}),Y+=L,H+=4,S=H}return{earliestPresentationTime:j,timescale:F,version:C,referencesCount:z,references:y,moovEndOffset:I}}function n(E){for(var v=[],p=c(E,["moov","trak"]),I=0;I<p.length;I++){var R=p[I],y=c(R,["tkhd"])[0];if(y){var x=y.data[y.start],C=x===0?12:20,S=h(y,C),F=c(R,["mdia","mdhd"])[0];if(F){x=F.data[F.start],C=x===0?12:20;var j=h(F,C),A=c(R,["mdia","hdlr"])[0];if(A){var Y=_(A.data.subarray(A.start+8,A.start+12)),z={soun:b.ElementaryStreamTypes.AUDIO,vide:b.ElementaryStreamTypes.VIDEO}[Y];if(z){var O=c(R,["mdia","minf","stbl","stsd"])[0],H=void 0;O&&(H=_(O.data.subarray(O.start+12,O.start+16))),v[S]={timescale:j,type:z},v[z]={timescale:j,id:S,codec:H}}}}}}var U=c(E,["moov","mvex","trex"]);return U.forEach(function(L){var K=h(L,4),ee=v[K];ee&&(ee.default={duration:h(L,12),flags:h(L,20)})}),v}function l(E,v){return c(v,["moof","traf"]).reduce(function(p,I){var R=c(I,["tfdt"])[0],y=R.data[R.start],x=c(I,["tfhd"]).reduce(function(C,S){var F=h(S,4),j=E[F];if(j){var A=h(R,4);y===1&&(A*=Math.pow(2,32),A+=h(R,8));var Y=j.timescale||9e4,z=A/Y;if(isFinite(z)&&(C===null||z<C))return z}return C},null);return x!==null&&isFinite(x)&&(p===null||x<p)?x:p},null)||0}function f(E,v){for(var p=0,I=0,R=0,y=c(E,["moof","traf"]),x=0;x<y.length;x++){var C=y[x],S=c(C,["tfhd"])[0],F=h(S,4),j=v[F];if(!j)continue;var A=j.default,Y=h(S,0)|(A==null?void 0:A.flags),z=A==null?void 0:A.duration;Y&8&&(Y&2?z=h(S,12):z=h(S,8));for(var O=j.timescale||9e4,H=c(C,["trun"]),U=0;U<H.length;U++){if(z){var L=h(H[U],4);p=z*L}else p=d(H[U]);j.type===b.ElementaryStreamTypes.VIDEO?I+=p/O:j.type===b.ElementaryStreamTypes.AUDIO&&(R+=p/O)}}if(I===0&&R===0){var K=i(E);if(K!=null&&K.references)return K.references.reduce(function(ee,oe){return ee+oe.info.duration||0},0)}return I||R}function d(E){var v=h(E,0),p=8;v&1&&(p+=4),v&4&&(p+=4);for(var I=0,R=h(E,4),y=0;y<R;y++){if(v&256){var x=h(E,p);I+=x,p+=4}v&512&&(p+=4),v&1024&&(p+=4),v&2048&&(p+=4)}return I}function u(E,v,p){c(v,["moof","traf"]).forEach(function(I){c(I,["tfhd"]).forEach(function(R){var y=h(R,4),x=E[y];if(!x)return;var C=x.timescale||9e4;c(I,["tfdt"]).forEach(function(S){var F=S.data[S.start],j=h(S,4);if(F===0)r(S,4,j-p*C);else{j*=Math.pow(2,32),j+=h(S,8),j-=p*C,j=Math.max(j,0);var A=Math.floor(j/(m+1)),Y=Math.floor(j%(m+1));r(S,4,A),r(S,8,Y)}})})})}function o(E){var v={valid:null,remainder:null},p=c(E,["moof"]);if(p){if(p.length<2)return v.remainder=E,v}else return v;var I=p[p.length-1];return v.valid=Object(k.sliceUint8)(E,0,I.start-8),v.remainder=Object(k.sliceUint8)(E,I.start-8),v}function s(E,v){var p=new Uint8Array(E.length+v.length);return p.set(E),p.set(v,E.length),p}},"./src/utils/output-filter.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"default",function(){return k});var k=function(){function b(T,_){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=T,this.trackName=_}var m=b.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,h){(this.startTime===null||this.startTime>_)&&(this.startTime=_),this.endTime=t,this.screen=h,this.timelineController.createCaptionsTrack(this.trackName)},m.reset=function(){this.cueRanges=[]},b}()},"./src/utils/texttrack-utils.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"sendAddTrackEvent",function(){return b}),w.d(g,"addCueToTrack",function(){return m}),w.d(g,"clearCurrentCues",function(){return T}),w.d(g,"removeCuesInRange",function(){return _}),w.d(g,"getCuesInRange",function(){return h});var k=w("./src/utils/logger.ts");function b(r,c){var i;try{i=new Event("addtrack")}catch(n){i=document.createEvent("Event"),i.initEvent("addtrack",!1,!1)}i.track=r,c.dispatchEvent(i)}function m(r,c){var i=r.mode;if(i==="disabled"&&(r.mode="hidden"),r.cues&&!r.cues.getCueById(c.id))try{if(r.addCue(c),!r.cues.getCueById(c.id))throw new Error("addCue is failed for: "+c)}catch(l){k.logger.debug("[texttrack-utils]: "+l);var n=new self.TextTrackCue(c.startTime,c.endTime,c.text);n.id=c.id,r.addCue(n)}i==="disabled"&&(r.mode=i)}function T(r){var c=r.mode;if(c==="disabled"&&(r.mode="hidden"),r.cues)for(var i=r.cues.length;i--;)r.removeCue(r.cues[i]);c==="disabled"&&(r.mode=c)}function _(r,c,i){var n=r.mode;if(n==="disabled"&&(r.mode="hidden"),r.cues&&r.cues.length>0)for(var l=h(r.cues,c,i),f=0;f<l.length;f++)r.removeCue(l[f]);n==="disabled"&&(r.mode=n)}function t(r,c){if(c<r[0].startTime)return 0;var i=r.length-1;if(c>r[i].endTime)return-1;for(var n=0,l=i;n<=l;){var f=Math.floor((l+n)/2);if(c<r[f].startTime)l=f-1;else if(c>r[f].startTime&&n<i)n=f+1;else return f}return r[n].startTime-c<c-r[l].startTime?n:l}function h(r,c,i){var n=[],l=t(r,c);if(l>-1)for(var f=l,d=r.length;f<d;f++){var u=r[f];if(u.startTime>=c&&u.endTime<=i)n.push(u);else if(u.startTime>i)return n}return n}},"./src/utils/time-ranges.ts":function(N,g,w){"use strict";w.r(g);var k={toString:function(m){for(var T="",_=m.length,t=0;t<_;t++)T+="["+m.start(t).toFixed(3)+","+m.end(t).toFixed(3)+"]";return T}};g.default=k},"./src/utils/timescale-conversion.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"toTimescaleFromBase",function(){return b}),w.d(g,"toTimescaleFromScale",function(){return m}),w.d(g,"toMsFromMpegTsClock",function(){return T}),w.d(g,"toMpegTsClockFromTimescale",function(){return _});var k=9e4;function b(t,h,r,c){r===void 0&&(r=1),c===void 0&&(c=!1);var i=t*h*r;return c?Math.round(i):i}function m(t,h,r,c){return r===void 0&&(r=1),c===void 0&&(c=!1),b(t,h,1/r,c)}function T(t,h){return h===void 0&&(h=!1),b(t,1e3,1/k,h)}function _(t,h){return h===void 0&&(h=1),b(t,k,1/h)}},"./src/utils/typed-array.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"sliceUint8",function(){return k});function k(b,m,T){return Uint8Array.prototype.slice?b.slice(m,T):new Uint8Array(Array.prototype.slice.call(b,m,T))}},"./src/utils/vttcue.ts":function(N,g,w){"use strict";w.r(g),g.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var k=["","lr","rl"],b=["start","middle","end","left","right"];function m(r,c){if(typeof c!="string")return!1;if(!Array.isArray(r))return!1;var i=c.toLowerCase();return~r.indexOf(i)?i:!1}function T(r){return m(k,r)}function _(r){return m(b,r)}function t(r){for(var c=arguments.length,i=new Array(c>1?c-1:0),n=1;n<c;n++)i[n-1]=arguments[n];for(var l=1;l<arguments.length;l++){var f=arguments[l];for(var d in f)r[d]=f[d]}return r}function h(r,c,i){var n=this,l={enumerable:!0};n.hasBeenReset=!1;var f="",d=!1,u=r,o=c,s=i,E=null,v="",p=!0,I="auto",R="start",y=50,x="middle",C=50,S="middle";Object.defineProperty(n,"id",t({},l,{get:function(){return f},set:function(j){f=""+j}})),Object.defineProperty(n,"pauseOnExit",t({},l,{get:function(){return d},set:function(j){d=!!j}})),Object.defineProperty(n,"startTime",t({},l,{get:function(){return u},set:function(j){if(typeof j!="number")throw new TypeError("Start time must be set to a number.");u=j,this.hasBeenReset=!0}})),Object.defineProperty(n,"endTime",t({},l,{get:function(){return o},set:function(j){if(typeof j!="number")throw new TypeError("End time must be set to a number.");o=j,this.hasBeenReset=!0}})),Object.defineProperty(n,"text",t({},l,{get:function(){return s},set:function(j){s=""+j,this.hasBeenReset=!0}})),Object.defineProperty(n,"region",t({},l,{get:function(){return E},set:function(j){E=j,this.hasBeenReset=!0}})),Object.defineProperty(n,"vertical",t({},l,{get:function(){return v},set:function(j){var A=T(j);if(A===!1)throw new SyntaxError("An invalid or illegal string was specified.");v=A,this.hasBeenReset=!0}})),Object.defineProperty(n,"snapToLines",t({},l,{get:function(){return p},set:function(j){p=!!j,this.hasBeenReset=!0}})),Object.defineProperty(n,"line",t({},l,{get:function(){return I},set:function(j){if(typeof j!="number"&&j!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");I=j,this.hasBeenReset=!0}})),Object.defineProperty(n,"lineAlign",t({},l,{get:function(){return R},set:function(j){var A=_(j);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");R=A,this.hasBeenReset=!0}})),Object.defineProperty(n,"position",t({},l,{get:function(){return y},set:function(j){if(j<0||j>100)throw new Error("Position must be between 0 and 100.");y=j,this.hasBeenReset=!0}})),Object.defineProperty(n,"positionAlign",t({},l,{get:function(){return x},set:function(j){var A=_(j);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");x=A,this.hasBeenReset=!0}})),Object.defineProperty(n,"size",t({},l,{get:function(){return C},set:function(j){if(j<0||j>100)throw new Error("Size must be between 0 and 100.");C=j,this.hasBeenReset=!0}})),Object.defineProperty(n,"align",t({},l,{get:function(){return S},set:function(j){var A=_(j);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");S=A,this.hasBeenReset=!0}})),n.displayState=void 0}return h.prototype.getCueAsHTML=function(){var r=self.WebVTT;return r.convertCueToDOMTree(self,this.text)},h}()},"./src/utils/vttparser.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"parseTimeStamp",function(){return m}),w.d(g,"fixLineBreaks",function(){return c}),w.d(g,"VTTParser",function(){return i});var k=w("./src/utils/vttcue.ts"),b=function(){function n(){}var l=n.prototype;return l.decode=function(d,u){if(!d)return"";if(typeof d!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(d))},n}();function m(n){function l(d,u,o,s){return(d|0)*3600+(u|0)*60+(o|0)+parseFloat(s||0)}var f=n.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return f?parseFloat(f[2])>59?l(f[2],f[3],0,f[4]):l(f[1],f[2],f[3],f[4]):null}var T=function(){function n(){this.values=Object.create(null)}var l=n.prototype;return l.set=function(d,u){!this.get(d)&&u!==""&&(this.values[d]=u)},l.get=function(d,u,o){return o?this.has(d)?this.values[d]:u[o]:this.has(d)?this.values[d]:u},l.has=function(d){return d in this.values},l.alt=function(d,u,o){for(var s=0;s<o.length;++s)if(u===o[s]){this.set(d,u);break}},l.integer=function(d,u){/^-?\d+$/.test(u)&&this.set(d,parseInt(u,10))},l.percent=function(d,u){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(u)){var o=parseFloat(u);if(o>=0&&o<=100)return this.set(d,o),!0}return!1},n}();function _(n,l,f,d){var u=d?n.split(d):[n];for(var o in u){if(typeof u[o]!="string")continue;var s=u[o].split(f);if(s.length!==2)continue;var E=s[0],v=s[1];l(E,v)}}var t=new k.default(0,0,""),h=t.align==="middle"?"middle":"center";function r(n,l,f){var d=n;function u(){var E=m(n);if(E===null)throw new Error("Malformed timestamp: "+d);return n=n.replace(/^[^\sa-zA-Z-]+/,""),E}function o(E,v){var p=new T;_(E,function(y,x){var C;switch(y){case"region":for(var S=f.length-1;S>=0;S--)if(f[S].id===x){p.set(y,f[S].region);break}break;case"vertical":p.alt(y,x,["rl","lr"]);break;case"line":C=x.split(","),p.integer(y,C[0]),p.percent(y,C[0])&&p.set("snapToLines",!1),p.alt(y,C[0],["auto"]),C.length===2&&p.alt("lineAlign",C[1],["start",h,"end"]);break;case"position":C=x.split(","),p.percent(y,C[0]),C.length===2&&p.alt("positionAlign",C[1],["start",h,"end","line-left","line-right","auto"]);break;case"size":p.percent(y,x);break;case"align":p.alt(y,x,["start",h,"end","left","right"]);break}},/:/,/\s/),v.region=p.get("region",null),v.vertical=p.get("vertical","");var I=p.get("line","auto");I==="auto"&&t.line===-1&&(I=-1),v.line=I,v.lineAlign=p.get("lineAlign","start"),v.snapToLines=p.get("snapToLines",!0),v.size=p.get("size",100),v.align=p.get("align",h);var R=p.get("position","auto");R==="auto"&&t.position===50&&(R=v.align==="start"||v.align==="left"?0:v.align==="end"||v.align==="right"?100:50),v.position=R}function s(){n=n.replace(/^\s+/,"")}if(s(),l.startTime=u(),s(),n.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+d);n=n.substr(3),s(),l.endTime=u(),s(),o(n,l)}function c(n){return n.replace(/<br(?: \/)?>/gi,`
|
|
|
`)}var i=function(){function n(){this.state="INITIAL",this.buffer="",this.decoder=new b,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var l=n.prototype;return l.parse=function(d){var u=this;d&&(u.buffer+=u.decoder.decode(d,{stream:!0}));function o(){var R=u.buffer,y=0;for(R=c(R);y<R.length&&R[y]!=="\r"&&R[y]!==`
|
|
|
`;)++y;var x=R.substr(0,y);return R[y]==="\r"&&++y,R[y]===`
|
|
|
`&&++y,u.buffer=R.substr(y),x}function s(R){_(R,function(y,x){},/:/)}try{var E="";if(u.state==="INITIAL"){if(!/\r\n|\n/.test(u.buffer))return this;E=o();var v=E.match(/^()?WEBVTT([ \t].*)?$/);if(!v||!v[0])throw new Error("Malformed WebVTT signature.");u.state="HEADER"}for(var p=!1;u.buffer;){if(!/\r\n|\n/.test(u.buffer))return this;p?p=!1:E=o();switch(u.state){case"HEADER":/:/.test(E)?s(E):E||(u.state="ID");continue;case"NOTE":E||(u.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(E)){u.state="NOTE";break}if(!E)continue;if(u.cue=new k.default(0,0,""),u.state="CUE",E.indexOf("-->")===-1){u.cue.id=E;continue}case"CUE":if(!u.cue){u.state="BADCUE";continue}try{r(E,u.cue,u.regionList)}catch(R){u.cue=null,u.state="BADCUE";continue}u.state="CUETEXT";continue;case"CUETEXT":{var I=E.indexOf("-->")!==-1;if(!E||I&&(p=!0)){u.oncue&&u.cue&&u.oncue(u.cue),u.cue=null,u.state="ID";continue}if(u.cue===null)continue;u.cue.text&&(u.cue.text+=`
|
|
|
`),u.cue.text+=E}continue;case"BADCUE":E||(u.state="ID")}}}catch(R){u.state==="CUETEXT"&&u.cue&&u.oncue&&u.oncue(u.cue),u.cue=null,u.state=u.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},l.flush=function(){var d=this;try{if((d.cue||d.state==="HEADER")&&(d.buffer+=`
|
|
|
|
|
|
`,d.parse()),d.state==="INITIAL"||d.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(u){d.onparsingerror&&d.onparsingerror(u)}return d.onflush&&d.onflush(),this},n}()},"./src/utils/webvtt-parser.ts":function(N,g,w){"use strict";w.r(g),w.d(g,"generateCueId",function(){return i}),w.d(g,"parseWebVTT",function(){return l});var k=w("./src/polyfills/number.ts"),b=w("./src/utils/vttparser.ts"),m=w("./src/demux/id3.ts"),T=w("./src/utils/timescale-conversion.ts"),_=w("./src/remux/mp4-remuxer.ts"),t=/\r\n|\n\r|\n|\r/g,h=function(d,u,o){return o===void 0&&(o=0),d.substr(o,u.length)===u},r=function(d){var u=parseInt(d.substr(-3)),o=parseInt(d.substr(-6,2)),s=parseInt(d.substr(-9,2)),E=d.length>9?parseInt(d.substr(0,d.indexOf(":"))):0;if(!Object(k.isFiniteNumber)(u)||!Object(k.isFiniteNumber)(o)||!Object(k.isFiniteNumber)(s)||!Object(k.isFiniteNumber)(E))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+d);return u+=1e3*o,u+=60*1e3*s,u+=60*60*1e3*E,u},c=function(d){for(var u=5381,o=d.length;o;)u=u*33^d.charCodeAt(--o);return(u>>>0).toString()};function i(f,d,u){return c(f.toString())+c(d.toString())+c(u)}var n=function(d,u,o){var s=d[u],E=d[s.prevCC];if(!E||!E.new&&s.new){d.ccOffset=d.presentationOffset=s.start,s.new=!1;return}for(;(v=E)!==null&&v!==void 0&&v.new;){var v;d.ccOffset+=s.start-E.start,s.new=!1,s=E,E=d[s.prevCC]}d.presentationOffset=o};function l(f,d,u,o,s,E,v,p){var I=new b.VTTParser,R=Object(m.utf8ArrayToStr)(new Uint8Array(f)).trim().replace(t,`
|
|
|
`).split(`
|
|
|
`),y=[],x=Object(T.toMpegTsClockFromTimescale)(d,u),C="00:00.000",S=0,F=0,j,A=!0,Y=!1;I.oncue=function(z){var O=o[s],H=o.ccOffset,U=(S-x)/9e4;if(O!=null&&O.new&&(F!==void 0?H=o.ccOffset=O.start:n(o,s,U)),U&&(H=U-o.presentationOffset),Y){var L=z.endTime-z.startTime,K=Object(_.normalizePts)((z.startTime+H-F)*9e4,E*9e4)/9e4;z.startTime=K,z.endTime=K+L}var ee=z.text.trim();z.text=decodeURIComponent(encodeURIComponent(ee)),z.id||(z.id=i(z.startTime,z.endTime,ee)),z.endTime>0&&y.push(z)},I.onparsingerror=function(z){j=z},I.onflush=function(){if(j){p(j);return}v(y)},R.forEach(function(z){if(A)if(h(z,"X-TIMESTAMP-MAP=")){A=!1,Y=!0,z.substr(16).split(",").forEach(function(O){h(O,"LOCAL:")?C=O.substr(6):h(O,"MPEGTS:")&&(S=parseInt(O.substr(7)))});try{F=r(C)/1e3}catch(O){Y=!1,j=O}return}else z===""&&(A=!1);I.parse(z+`
|
|
|
`)}),I.flush()}},"./src/utils/xhr-loader.ts":function(N,g,w){"use strict";w.r(g);var k=w("./src/utils/logger.ts"),b=w("./src/loader/load-stats.ts"),m=/^age:\s*[\d.]+\s*$/m,T=function(){function _(h){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=h?h.xhrSetup:null,this.stats=new b.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 r=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),r&&(r.onreadystatechange=null,r.onprogress=null,r.readyState!==4&&(this.stats.aborted=!0,r.abort()))},t.abort=function(){var r;this.abortInternal(),(r=this.callbacks)!==null&&r!==void 0&&r.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(r,c,i){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=r,this.config=c,this.callbacks=i,this.retryDelay=c.retryDelay,this.loadInternal()},t.loadInternal=function(){var r=this.config,c=this.context;if(!r)return;var i=this.loader=new self.XMLHttpRequest,n=this.stats;n.loading.first=0,n.loaded=0;var l=this.xhrSetup;try{if(l)try{l(i,c.url)}catch(u){i.open("GET",c.url,!0),l(i,c.url)}i.readyState||i.open("GET",c.url,!0);var f=this.context.headers;if(f)for(var d in f)i.setRequestHeader(d,f[d])}catch(u){this.callbacks.onError({code:i.status,text:u.message},c,i);return}c.rangeEnd&&i.setRequestHeader("Range","bytes="+c.rangeStart+"-"+(c.rangeEnd-1)),i.onreadystatechange=this.readystatechange.bind(this),i.onprogress=this.loadprogress.bind(this),i.responseType=c.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),i.send()},t.readystatechange=function(){var r=this.context,c=this.loader,i=this.stats;if(!r||!c)return;var n=c.readyState,l=this.config;if(i.aborted)return;if(n>=2)if(self.clearTimeout(this.requestTimeout),i.loading.first===0&&(i.loading.first=Math.max(self.performance.now(),i.loading.start)),n===4){c.onreadystatechange=null,c.onprogress=null;var f=c.status;if(f>=200&&f<300){i.loading.end=Math.max(self.performance.now(),i.loading.first);var d,u;if(r.responseType==="arraybuffer"?(d=c.response,u=d.byteLength):(d=c.responseText,u=d.length),i.loaded=i.total=u,!this.callbacks)return;var o=this.callbacks.onProgress;if(o&&o(i,r,d,c),!this.callbacks)return;var s={url:c.responseURL,data:d};this.callbacks.onSuccess(s,i,r,c)}else i.retry>=l.maxRetry||f>=400&&f<499?(k.logger.error(f+" while loading "+r.url),this.callbacks.onError({code:f,text:c.statusText},r,c)):(k.logger.warn(f+" while loading "+r.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,l.maxRetryDelay),i.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),l.timeout)},t.loadtimeout=function(){k.logger.warn("timeout while loading "+this.context.url);var r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(r){var c=this.stats;c.loaded=r.loaded,r.lengthComputable&&(c.total=r.total)},t.getCacheAge=function(){var r=null;if(this.loader&&m.test(this.loader.getAllResponseHeaders())){var c=this.loader.getResponseHeader("age");r=c?parseFloat(c):null}return r},_}();g.default=T}}).default})},vHTk:function(B,Q,D){B.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(N){return function(){var g=N,w=g.lib,k=w.StreamCipher,b=g.algo,m=b.RC4=k.extend({_doReset:function(){for(var t=this._key,h=t.words,r=t.sigBytes,c=this._S=[],i=0;i<256;i++)c[i]=i;for(var i=0,n=0;i<256;i++){var l=i%r,f=h[l>>>2]>>>24-l%4*8&255;n=(n+c[i]+f)%256;var d=c[i];c[i]=c[n],c[n]=d}this._i=this._j=0},_doProcessBlock:function(t,h){t[h]^=T.call(this)},keySize:256/32,ivSize:0});function T(){for(var t=this._S,h=this._i,r=this._j,c=0,i=0;i<4;i++){h=(h+1)%256,r=(r+t[h])%256;var n=t[h];t[h]=t[r],t[r]=n,c|=t[(t[h]+t[r])%256]<<24-i*8}return this._i=h,this._j=r,c}g.RC4=k._createHelper(m);var _=b.RC4Drop=m.extend({cfg:m.cfg.extend({drop:192}),_doReset:function(){m._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)T.call(this)}});g.RC4Drop=k._createHelper(_)}(),N.RC4})},wCXF:function(B,Q,D){"use strict";D.d(Q,"a",function(){return $e});var N=D("rePB"),g=D("VTBJ"),w=D("KQm4"),k=D("U8pU"),b=D("ODXe"),m=D("q1tI"),T=D("TSYQ"),_=D.n(T),t=D("Gytx"),h=D.n(t),r=D("Kwbf"),c=D("t23M"),i=D("qx4F"),n=D("6eGT"),l=D("IBYe"),f=D("Ff2n"),d=D("c+Xe"),u=D("fyJ8"),o=D("biw7");function s(Pe,Ie,Ze,nt,ye){var ue=Ze[Pe]||{},pe=Ze[Ie]||{},me,Oe;ue.fixed==="left"?me=nt.left[Pe]:pe.fixed==="right"&&(Oe=nt.right[Ie]);var ve=!1,xe=!1,Ae=!1,Le=!1,Me=Ze[Ie+1],We=Ze[Pe-1];if(ye==="rtl"){if(me!==void 0){var rt=We&&We.fixed==="left";Le=!rt}else if(Oe!==void 0){var at=Me&&Me.fixed==="right";Ae=!at}}else if(me!==void 0){var it=Me&&Me.fixed==="left";ve=!it}else if(Oe!==void 0){var st=We&&We.fixed==="right";xe=!st}return{fixLeft:me,fixRight:Oe,lastFixLeft:ve,firstFixRight:xe,lastFixRight:Ae,firstFixLeft:Le,isSticky:nt.isSticky}}var E=D("sR1s");function v(Pe){var Ie=Pe.cells,Ze=Pe.stickyOffsets,nt=Pe.flattenColumns,ye=Pe.rowComponent,ue=Pe.cellComponent,pe=Pe.onHeaderRow,me=Pe.index,Oe=m.useContext(o.a),ve=Oe.prefixCls,xe=Oe.direction,Ae;pe&&(Ae=pe(Ie.map(function(Me){return Me.column}),me));var Le=Object(E.a)(Ie.map(function(Me){return Me.column}));return m.createElement(ye,Object.assign({},Ae),Ie.map(function(Me,We){var rt=Me.column,at=s(Me.colStart,Me.colEnd,nt,Ze,xe),it;return rt&&rt.onHeaderCell&&(it=Me.column.onHeaderCell(rt)),m.createElement(u.a,Object.assign({},Me,{ellipsis:rt.ellipsis,align:rt.align,component:ue,prefixCls:ve,key:Le[We]},at,{additionalProps:it,rowType:"header"}))}))}v.displayName="HeaderRow";var p=v;function I(Pe){var Ie=[];function Ze(pe,me){var Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ie[Oe]=Ie[Oe]||[];var ve=me,xe=pe.filter(Boolean).map(function(Ae){var Le={key:Ae.key,className:Ae.className||"",children:Ae.title,column:Ae,colStart:ve},Me=1,We=Ae.children;return We&&We.length>0&&(Me=Ze(We,ve,Oe+1).reduce(function(rt,at){return rt+at},0),Le.hasSubColumns=!0),"colSpan"in Ae&&(Me=Ae.colSpan),"rowSpan"in Ae&&(Le.rowSpan=Ae.rowSpan),Le.colSpan=Me,Le.colEnd=Le.colStart+Me-1,Ie[Oe].push(Le),ve+=Me,Me});return xe}Ze(Pe,0);for(var nt=Ie.length,ye=function(me){Ie[me].forEach(function(Oe){!("rowSpan"in Oe)&&!Oe.hasSubColumns&&(Oe.rowSpan=nt-me)})},ue=0;ue<nt;ue+=1)ye(ue);return Ie}function R(Pe){var Ie=Pe.stickyOffsets,Ze=Pe.columns,nt=Pe.flattenColumns,ye=Pe.onHeaderRow,ue=m.useContext(o.a),pe=ue.prefixCls,me=ue.getComponent,Oe=m.useMemo(function(){return I(Ze)},[Ze]),ve=me(["header","wrapper"],"thead"),xe=me(["header","row"],"tr"),Ae=me(["header","cell"],"th");return m.createElement(ve,{className:"".concat(pe,"-thead")},Oe.map(function(Le,Me){var We=m.createElement(p,{key:Me,flattenColumns:nt,cells:Le,stickyOffsets:Ie,rowComponent:xe,cellComponent:Ae,onHeaderRow:ye,index:Me});return We}))}var y=R,x=D("hW8S");function C(Pe){for(var Ie=Pe.colWidths,Ze=Pe.columns,nt=Pe.columCount,ye=[],ue=nt||Ze.length,pe=!1,me=ue-1;me>=0;me-=1){var Oe=Ie[me],ve=Ze&&Ze[me],xe=ve&&ve[x.a];(Oe||xe||pe)&&(ye.unshift(m.createElement("col",Object.assign({key:me,style:{width:Oe,minWidth:Oe}},xe))),pe=!0)}return m.createElement("colgroup",null,ye)}var S=C;function F(Pe,Ie){return Object(m.useMemo)(function(){for(var Ze=[],nt=0;nt<Ie;nt+=1){var ye=Pe[nt];if(ye!==void 0)Ze[nt]=ye;else return null}return Ze},[Pe.join("_"),Ie])}var j=m.forwardRef(function(Pe,Ie){var Ze=Pe.noData,nt=Pe.columns,ye=Pe.flattenColumns,ue=Pe.colWidths,pe=Pe.columCount,me=Pe.stickyOffsets,Oe=Pe.direction,ve=Pe.fixHeader,xe=Pe.offsetHeader,Ae=Pe.stickyClassName,Le=Pe.onScroll,Me=Object(f.a)(Pe,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),We=m.useContext(o.a),rt=We.prefixCls,at=We.scrollbarSize,it=We.isSticky,st=it&&!ve?0:at,Ct=m.useRef(null),yt=m.useCallback(function(wt){Object(d.b)(Ie,wt),Object(d.b)(Ct,wt)},[]);m.useEffect(function(){var wt;function $t(Dt){var Tt=Dt.currentTarget,_t=Dt.deltaX;_t&&(Le({currentTarget:Tt,scrollLeft:Tt.scrollLeft+_t}),Dt.preventDefault())}return(wt=Ct.current)===null||wt===void 0||wt.addEventListener("wheel",$t),function(){var Dt;(Dt=Ct.current)===null||Dt===void 0||Dt.removeEventListener("wheel",$t)}},[]);var ht=ye[ye.length-1],Ut={fixed:ht?ht.fixed:null,onHeaderCell:function(){return{className:"".concat(rt,"-cell-scrollbar")}}},kt=Object(m.useMemo)(function(){return st?[].concat(Object(w.a)(nt),[Ut]):nt},[st,nt]),Yt=Object(m.useMemo)(function(){return st?[].concat(Object(w.a)(ye),[Ut]):ye},[st,ye]),Zt=Object(m.useMemo)(function(){var wt=me.right,$t=me.left;return Object(g.a)(Object(g.a)({},me),{},{left:Oe==="rtl"?[].concat(Object(w.a)($t.map(function(Dt){return Dt+st})),[0]):$t,right:Oe==="rtl"?wt:[].concat(Object(w.a)(wt.map(function(Dt){return Dt+st})),[0]),isSticky:it})},[st,me,it]),Mt=F(ue,pe);return m.createElement("div",{style:Object(g.a)({overflow:"hidden"},it?{top:xe}:{}),ref:yt,className:_()("".concat(rt,"-header"),Object(N.a)({},Ae,!!Ae))},m.createElement("table",{style:{tableLayout:"fixed",visibility:Ze||Mt?null:"hidden"}},m.createElement(S,{colWidths:Mt?[].concat(Object(w.a)(Mt),[st]):[],columCount:pe+1,columns:Yt}),m.createElement(y,Object.assign({},Me,{stickyOffsets:Zt,columns:kt,flattenColumns:Yt}))))});j.displayName="FixedHeader";var A=j,Y=m.createContext(null),z=Y;function O(Pe){var Ie=Pe.prefixCls,Ze=Pe.children,nt=Pe.component,ye=Pe.cellComponent,ue=Pe.fixHeader,pe=Pe.fixColumn,me=Pe.horizonScroll,Oe=Pe.className,ve=Pe.expanded,xe=Pe.componentWidth,Ae=Pe.colSpan,Le=m.useContext(o.a),Me=Le.scrollbarSize;return m.useMemo(function(){var We=Ze;return pe&&(We=m.createElement("div",{style:{width:xe-(ue?Me:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ie,"-expanded-row-fixed")},We)),m.createElement(nt,{className:Oe,style:{display:ve?null:"none"}},m.createElement(u.a,{component:ye,prefixCls:Ie,colSpan:Ae},We))},[Ze,nt,ue,me,Oe,ve,xe,Ae,Me])}var H=O;function U(Pe){var Ie=Pe.className,Ze=Pe.style,nt=Pe.record,ye=Pe.index,ue=Pe.rowKey,pe=Pe.getRowKey,me=Pe.rowExpandable,Oe=Pe.expandedKeys,ve=Pe.onRow,xe=Pe.indent,Ae=xe===void 0?0:xe,Le=Pe.rowComponent,Me=Pe.cellComponent,We=Pe.childrenColumnName,rt=m.useContext(o.a),at=rt.prefixCls,it=rt.fixedInfoList,st=m.useContext(z),Ct=st.fixHeader,yt=st.fixColumn,ht=st.horizonScroll,Ut=st.componentWidth,kt=st.flattenColumns,Yt=st.expandableType,Zt=st.expandRowByClick,Mt=st.onTriggerExpand,wt=st.rowClassName,$t=st.expandedRowClassName,Dt=st.indentSize,Tt=st.expandIcon,_t=st.expandedRowRender,Et=st.expandIconColumnIndex,Bt=m.useState(!1),Dr=Object(b.a)(Bt,2),pt=Dr[0],St=Dr[1],dt=Oe&&Oe.has(Pe.recordKey);m.useEffect(function(){dt&&St(!0)},[dt]);var Ht=Yt==="row"&&(!me||me(nt)),Gt=Yt==="nest",vt=We&&nt&&nt[We],xt=Ht||Gt,Kt;ve&&(Kt=ve(nt,ye));var Ar=function(Pt){if(Zt&&xt&&Mt(nt,Pt),Kt&&Kt.onClick){for(var dn,ct=arguments.length,jr=new Array(ct>1?ct-1:0),xr=1;xr<ct;xr++)jr[xr-1]=arguments[xr];(dn=Kt).onClick.apply(dn,[Pt].concat(jr))}},qt;typeof wt=="string"?qt=wt:typeof wt=="function"&&(qt=wt(nt,ye,Ae));var ut=Object(E.a)(kt),Lt=m.createElement(Le,Object.assign({},Kt,{"data-row-key":ue,className:_()(Ie,"".concat(at,"-row"),"".concat(at,"-row-level-").concat(Ae),qt,Kt&&Kt.className),style:Object(g.a)(Object(g.a)({},Ze),Kt?Kt.style:null),onClick:Ar}),kt.map(function(zr,Pt){var dn=zr.render,ct=zr.dataIndex,jr=zr.className,xr=ut[Pt],Gn=it[Pt],An;Pt===(Et||0)&&Gt&&(An=m.createElement(m.Fragment,null,m.createElement("span",{style:{paddingLeft:"".concat(Dt*Ae,"px")},className:"".concat(at,"-row-indent indent-level-").concat(Ae)}),Tt({prefixCls:at,expanded:dt,expandable:vt,record:nt,onExpand:Mt})));var hn;return zr.onCell&&(hn=zr.onCell(nt,ye)),m.createElement(u.a,Object.assign({className:jr,ellipsis:zr.ellipsis,align:zr.align,component:Me,prefixCls:at,key:xr,record:nt,index:ye,dataIndex:ct,render:dn,shouldCellUpdate:zr.shouldCellUpdate},Gn,{appendNode:An,additionalProps:hn}))})),Hr;if(Ht&&(pt||dt)){var Yr=_t(nt,ye,Ae+1,dt),On=$t&&$t(nt,ye,Ae);Hr=m.createElement(H,{expanded:dt,className:_()("".concat(at,"-expanded-row"),"".concat(at,"-expanded-row-level-").concat(Ae+1),On),prefixCls:at,fixHeader:Ct,fixColumn:yt,horizonScroll:ht,component:Le,componentWidth:Ut,cellComponent:Me,colSpan:kt.length},Yr)}var cn;return vt&&dt&&(cn=(nt[We]||[]).map(function(zr,Pt){var dn=pe(zr,Pt);return m.createElement(U,Object.assign({},Pe,{key:dn,rowKey:dn,record:zr,recordKey:dn,index:Pt,indent:Ae+1}))})),m.createElement(m.Fragment,null,Lt,Hr,cn)}U.displayName="BodyRow";var L=U,K=m.createContext(null),ee=K;function oe(Pe){var Ie=Pe.columnKey,Ze=Pe.onColumnResize,nt=m.useRef();return m.useEffect(function(){nt.current&&Ze(Ie,nt.current.offsetWidth)},[]),m.createElement(c.a,{onResize:function(ue){var pe=ue.offsetWidth;Ze(Ie,pe)}},m.createElement("td",{ref:nt,style:{padding:0,border:0,height:0}},m.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ae(Pe){var Ie=Pe.data,Ze=Pe.getRowKey,nt=Pe.measureColumnWidth,ye=Pe.expandedKeys,ue=Pe.onRow,pe=Pe.rowExpandable,me=Pe.emptyNode,Oe=Pe.childrenColumnName,ve=m.useContext(ee),xe=ve.onColumnResize,Ae=m.useContext(o.a),Le=Ae.prefixCls,Me=Ae.getComponent,We=m.useContext(z),rt=We.fixHeader,at=We.horizonScroll,it=We.flattenColumns,st=We.componentWidth;return m.useMemo(function(){var Ct=Me(["body","wrapper"],"tbody"),yt=Me(["body","row"],"tr"),ht=Me(["body","cell"],"td"),Ut;Ie.length?Ut=Ie.map(function(Yt,Zt){var Mt=Ze(Yt,Zt);return m.createElement(L,{key:Mt,rowKey:Mt,record:Yt,recordKey:Mt,index:Zt,rowComponent:yt,cellComponent:ht,expandedKeys:ye,onRow:ue,getRowKey:Ze,rowExpandable:pe,childrenColumnName:Oe})}):Ut=m.createElement(H,{expanded:!0,className:"".concat(Le,"-placeholder"),prefixCls:Le,fixHeader:rt,fixColumn:at,horizonScroll:at,component:yt,componentWidth:st,cellComponent:ht,colSpan:it.length},me);var kt=Object(E.a)(it);return m.createElement(Ct,{className:"".concat(Le,"-tbody")},nt&&m.createElement("tr",{"aria-hidden":"true",className:"".concat(Le,"-measure-row"),style:{height:0}},kt.map(function(Yt){return m.createElement(oe,{key:Yt,columnKey:Yt,onColumnResize:xe})})),Ut)},[Ie,Le,ue,nt,ye,Ze,Me,st,me,it])}var be=m.memo(ae);be.displayName="Body";var _e=be,fe=D("wRmb"),Re=D("xEkU"),Ce=D.n(Re);function ce(Pe){var Ie=Object(m.useRef)(Pe),Ze=Object(m.useState)({}),nt=Object(b.a)(Ze,2),ye=nt[1],ue=Object(m.useRef)(null),pe=Object(m.useRef)([]);function me(Oe){ue.current===null&&(pe.current=[],ue.current=Ce()(function(){pe.current.forEach(function(ve){Ie.current=ve(Ie.current)}),ue.current=null,ye({})})),pe.current.push(Oe)}return Object(m.useEffect)(function(){return function(){Ce.a.cancel(ue.current)}},[]),[Ie.current,me]}function te(Pe){var Ie=Object(m.useRef)(Pe),Ze=Object(m.useRef)(null);function nt(){window.clearTimeout(Ze.current)}function ye(pe){Ie.current=pe,nt(),Ze.current=window.setTimeout(function(){Ie.current=null,Ze.current=null},100)}function ue(){return Ie.current}return Object(m.useEffect)(function(){return nt},[]),[ye,ue]}function W(Pe,Ie,Ze){var nt=Object(m.useMemo)(function(){for(var ye=[],ue=[],pe=0,me=0,Oe=0;Oe<Ie;Oe+=1)if(Ze==="rtl"){ue[Oe]=me,me+=Pe[Oe]||0;var ve=Ie-Oe-1;ye[ve]=pe,pe+=Pe[ve]||0}else{ye[Oe]=pe,pe+=Pe[Oe]||0;var xe=Ie-Oe-1;ue[xe]=me,me+=Pe[xe]||0}return{left:ye,right:ue}},[Pe,Ie,Ze]);return nt}var X=W;function V(Pe){var Ie=Pe.className,Ze=Pe.children;return m.createElement("div",{className:Ie},Ze)}var Z=V,q=D("n6Qo");function ie(Pe){var Ie,Ze=Pe.prefixCls,nt=Pe.record,ye=Pe.onExpand,ue=Pe.expanded,pe=Pe.expandable,me="".concat(Ze,"-row-expand-icon");if(!pe)return m.createElement("span",{className:_()(me,"".concat(Ze,"-row-spaced"))});var Oe=function(xe){ye(nt,xe),xe.stopPropagation()};return m.createElement("span",{className:_()(me,(Ie={},Object(N.a)(Ie,"".concat(Ze,"-row-expanded"),ue),Object(N.a)(Ie,"".concat(Ze,"-row-collapsed"),!ue),Ie)),onClick:Oe})}function ne(Pe,Ie,Ze){var nt=[];function ye(ue){(ue||[]).forEach(function(pe,me){nt.push(Ie(pe,me)),ye(pe[Ze])})}return ye(Pe),nt}var J=D("zT1h"),$=D("y0+3"),le=function(Ie,Ze){var nt,ye,ue=Ie.scrollBodyRef,pe=Ie.onScroll,me=Ie.offsetScroll,Oe=m.useContext(o.a),ve=Oe.prefixCls,xe=((nt=ue.current)===null||nt===void 0?void 0:nt.scrollWidth)||0,Ae=((ye=ue.current)===null||ye===void 0?void 0:ye.clientWidth)||0,Le=xe&&Ae*(Ae/xe),Me=m.useRef(),We=ce({scrollLeft:0,isHiddenScrollBar:!1}),rt=Object(b.a)(We,2),at=rt[0],it=rt[1],st=m.useRef({delta:0,x:0}),Ct=m.useState(!1),yt=Object(b.a)(Ct,2),ht=yt[0],Ut=yt[1],kt=function(){Ut(!1)},Yt=function(Dt){Dt.persist(),st.current.delta=Dt.pageX-at.scrollLeft,st.current.x=0,Ut(!0),Dt.preventDefault()},Zt=function(Dt){var Tt,_t=Dt||((Tt=window)===null||Tt===void 0?void 0:Tt.event),Et=_t.buttons;if(!ht||Et===0){ht&&Ut(!1);return}var Bt=st.current.x+Dt.pageX-st.current.x-st.current.delta;Bt<=0&&(Bt=0),Bt+Le>=Ae&&(Bt=Ae-Le),pe({scrollLeft:Bt/Ae*(xe+2)}),st.current.x=Dt.pageX},Mt=function(){var Dt=Object($.b)(ue.current).top,Tt=Dt+ue.current.offsetHeight,_t=document.documentElement.scrollTop+window.innerHeight;Tt-Object(i.a)()<=_t||Dt>=_t-me?it(function(Et){return Object(g.a)(Object(g.a)({},Et),{},{isHiddenScrollBar:!0})}):it(function(Et){return Object(g.a)(Object(g.a)({},Et),{},{isHiddenScrollBar:!1})})},wt=function(Dt){it(function(Tt){return Object(g.a)(Object(g.a)({},Tt),{},{scrollLeft:Dt/xe*Ae||0})})};return m.useImperativeHandle(Ze,function(){return{setScrollLeft:wt}}),m.useEffect(function(){var $t=Object(J.a)(document.body,"mouseup",kt,!1),Dt=Object(J.a)(document.body,"mousemove",Zt,!1);return Mt(),function(){$t.remove(),Dt.remove()}},[Le,ht]),m.useEffect(function(){var $t=Object(J.a)(window,"scroll",Mt,!1),Dt=Object(J.a)(window,"resize",Mt,!1);return function(){$t.remove(),Dt.remove()}},[]),m.useEffect(function(){at.isHiddenScrollBar||it(function($t){var Dt,Tt;return Object(g.a)(Object(g.a)({},$t),{},{scrollLeft:ue.current.scrollLeft/((Dt=ue.current)===null||Dt===void 0?void 0:Dt.scrollWidth)*((Tt=ue.current)===null||Tt===void 0?void 0:Tt.clientWidth)})})},[at.isHiddenScrollBar]),xe<=Ae||!Le||at.isHiddenScrollBar?null:m.createElement("div",{style:{height:Object(i.a)(),width:Ae,bottom:me},className:"".concat(ve,"-sticky-scroll")},m.createElement("div",{onMouseDown:Yt,ref:Me,className:_()("".concat(ve,"-sticky-scroll-bar"),Object(N.a)({},"".concat(ve,"-sticky-scroll-bar-active"),ht)),style:{width:"".concat(Le,"px"),transform:"translate3d(".concat(at.scrollLeft,"px, 0, 0)")}}))},he=m.forwardRef(le);function Se(Pe,Ie){return m.useMemo(function(){var Ze=!!Pe;return{isSticky:Ze,stickyClassName:Ze?"".concat(Ie,"-sticky-header"):"",offsetHeader:Object(k.a)(Pe)==="object"&&Pe.offsetHeader||0,offsetScroll:Object(k.a)(Pe)==="object"&&Pe.offsetScroll||0}},[Pe,Ie])}var Ue=[],Xe={},$e="rc-table-internal-hook",Ye=m.memo(function(Pe){var Ie=Pe.children;return Ie},function(Pe,Ie){return h()(Pe.props,Ie.props)?Pe.pingLeft!==Ie.pingLeft||Pe.pingRight!==Ie.pingRight:!1});function et(Pe){var Ie,Ze=Pe.prefixCls,nt=Pe.className,ye=Pe.rowClassName,ue=Pe.style,pe=Pe.data,me=Pe.rowKey,Oe=Pe.scroll,ve=Pe.tableLayout,xe=Pe.direction,Ae=Pe.title,Le=Pe.footer,Me=Pe.summary,We=Pe.id,rt=Pe.showHeader,at=Pe.components,it=Pe.emptyText,st=Pe.onRow,Ct=Pe.onHeaderRow,yt=Pe.internalHooks,ht=Pe.transformColumns,Ut=Pe.internalRefs,kt=Pe.sticky,Yt=pe||Ue,Zt=!!Yt.length,Mt=m.useState(0),wt=Object(b.a)(Mt,2),$t=wt[0],Dt=wt[1];m.useEffect(function(){Dt(Object(i.a)())});var Tt=m.useMemo(function(){return Object(E.c)(at,{})},[at]),_t=m.useCallback(function(Mr,wr){return Object(E.b)(Tt,Mr)||wr},[Tt]),Et=m.useMemo(function(){return typeof me=="function"?me:function(Mr){var wr=Mr&&Mr[me];return wr}},[me]),Bt=Object(x.c)(Pe),Dr=Bt.expandIcon,pt=Bt.expandedRowKeys,St=Bt.defaultExpandedRowKeys,dt=Bt.defaultExpandAllRows,Ht=Bt.expandedRowRender,Gt=Bt.onExpand,vt=Bt.onExpandedRowsChange,xt=Bt.expandRowByClick,Kt=Bt.rowExpandable,Ar=Bt.expandIconColumnIndex,qt=Bt.expandedRowClassName,ut=Bt.childrenColumnName,Lt=Bt.indentSize,Hr=Dr||ie,Yr=ut||"children",On=m.useMemo(function(){return Ht?"row":Pe.expandable&&yt===$e&&Pe.expandable.__PARENT_RENDER_ICON__||Yt.some(function(Mr){return Mr&&Object(k.a)(Mr)==="object"&&Mr[Yr]})?"nest":!1},[!!Ht,Yt]),cn=m.useState(function(){return St||(dt?ne(Yt,Et,Yr):[])}),zr=Object(b.a)(cn,2),Pt=zr[0],dn=zr[1],ct=m.useMemo(function(){return new Set(pt||Pt||[])},[pt,Pt]),jr=m.useCallback(function(Mr){var wr=Et(Mr,Yt.indexOf(Mr)),gr,ai=ct.has(wr);ai?(ct.delete(wr),gr=Object(w.a)(ct)):gr=[].concat(Object(w.a)(ct),[wr]),dn(gr),Gt&&Gt(!ai,Mr),vt&&vt(gr)},[Et,ct,Yt,Gt,vt]),xr=m.useState(0),Gn=Object(b.a)(xr,2),An=Gn[0],hn=Gn[1],Ei=Object(fe.b)(Object(g.a)(Object(g.a)(Object(g.a)({},Pe),Bt),{},{expandable:!!Ht,expandedKeys:ct,getRowKey:Et,onTriggerExpand:jr,expandIcon:Hr,expandIconColumnIndex:Ar,direction:xe}),yt===$e?ht:null),Kn=Object(b.a)(Ei,2),bn=Kn[0],Fr=Kn[1],di=m.useMemo(function(){return{columns:bn,flattenColumns:Fr}},[bn,Fr]),fn=m.useRef(),Vr=m.useRef(),dr=m.useRef(),nn=m.useState(!1),_n=Object(b.a)(nn,2),jt=_n[0],lr=_n[1],ur=m.useState(!1),Rr=Object(b.a)(ur,2),br=Rr[0],hi=Rr[1],Fn=ce(new Map),$i=Object(b.a)(Fn,2),Ji=$i[0],Oi=$i[1],pn=Object(E.a)(Fr),Ki=pn.map(function(Mr){return Ji.get(Mr)}),Zr=m.useMemo(function(){return Ki},[Ki.join("_")]),ri=X(Zr,Fr.length,xe),kn=Oe&&Object(E.d)(Oe.y),sn=Oe&&Object(E.d)(Oe.x),Tn=sn&&Fr.some(function(Mr){var wr=Mr.fixed;return wr}),fi=m.useRef(),zn=Se(kt,Ze),Vn=zn.isSticky,ki=zn.offsetHeader,Mi=zn.offsetScroll,Xn=zn.stickyClassName,ji,pi,mi;kn&&(pi={overflowY:"scroll",maxHeight:Oe.y}),sn&&(ji={overflowX:"auto"},kn||(pi={overflowY:"hidden"}),mi={width:Oe.x===!0?"auto":Oe.x,minWidth:"100%"});var Yn=m.useCallback(function(Mr,wr){Oi(function(gr){var ai=new Map(gr);return ai.set(Mr,wr),ai})},[]),$n=te(null),Pi=Object(b.a)($n,2),ni=Pi[0],gi=Pi[1];function Fi(Mr,wr){if(!wr)return;typeof wr=="function"?wr(Mr):wr.scrollLeft!==Mr&&(wr.scrollLeft=Mr)}var ii=function(wr){var gr=wr.currentTarget,ai=wr.scrollLeft,zi=typeof ai=="number"?ai:gr.scrollLeft,Vi=gr||Xe;if(!gi()||gi()===Vi){var tr;ni(Vi),Fi(zi,Vr.current),Fi(zi,dr.current),Fi(zi,(tr=fi.current)===null||tr===void 0?void 0:tr.setScrollLeft)}if(gr){var It=gr.scrollWidth,ir=gr.clientWidth;lr(zi>0),hi(zi<It-ir)}},Ur=function(){dr.current&&ii({currentTarget:dr.current})},Ft=function(wr){var gr=wr.width;Ur(),hn(fn.current?fn.current.offsetWidth:gr)};m.useEffect(function(){return Ur},[]),m.useEffect(function(){sn&&Ur()},[sn]),m.useEffect(function(){yt===$e&&Ut&&(Ut.body.current=dr.current)});var er=_t(["table"],"table"),zt=m.useMemo(function(){return ve||(Tn?Oe.x==="max-content"?"auto":"fixed":kn||Fr.some(function(Mr){var wr=Mr.ellipsis;return wr})?"fixed":"auto")},[kn,Tn,Fr,ve]),ar,_r={colWidths:Zr,columCount:Fr.length,stickyOffsets:ri,onHeaderRow:Ct,fixHeader:kn},Lr=m.useMemo(function(){return Zt?null:typeof it=="function"?it():it},[Zt,it]),mr=m.createElement(_e,{data:Yt,measureColumnWidth:kn||sn||Vn,expandedKeys:ct,rowExpandable:Kt,getRowKey:Et,onRow:st,emptyNode:Lr,childrenColumnName:Yr}),qr=m.createElement(S,{colWidths:Fr.map(function(Mr){var wr=Mr.width;return wr}),columns:Fr}),Un=Me&&m.createElement(q.b,null,Me(Yt)),hr=_t(["body"]);if(kn||Vn){var vi;typeof hr=="function"?(vi=hr(Yt,{scrollbarSize:$t,ref:dr,onScroll:ii}),_r.colWidths=Fr.map(function(Mr,wr){var gr=Mr.width,ai=wr===bn.length-1?gr-$t:gr;return typeof ai=="number"&&!Number.isNaN(ai)?ai:(Object(r.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):vi=m.createElement("div",{style:Object(g.a)(Object(g.a)({},ji),pi),onScroll:ii,ref:dr,className:_()("".concat(Ze,"-body"))},m.createElement(er,{style:Object(g.a)(Object(g.a)({},mi),{},{tableLayout:zt})},qr,mr,Un),Vn&&m.createElement(he,{ref:fi,offsetScroll:Mi,scrollBodyRef:dr,onScroll:ii})),ar=m.createElement(m.Fragment,null,rt!==!1&&m.createElement(A,Object.assign({noData:!Yt.length},_r,di,{direction:xe,offsetHeader:ki,stickyClassName:Xn,ref:Vr,onScroll:ii})),vi)}else ar=m.createElement("div",{style:Object(g.a)(Object(g.a)({},ji),pi),className:_()("".concat(Ze,"-content")),onScroll:ii,ref:dr},m.createElement(er,{style:Object(g.a)(Object(g.a)({},mi),{},{tableLayout:zt})},qr,rt!==!1&&m.createElement(y,Object.assign({},_r,di)),mr,Un));var kr=Object(x.b)(Pe),Sn=m.createElement("div",Object.assign({className:_()(Ze,nt,(Ie={},Object(N.a)(Ie,"".concat(Ze,"-rtl"),xe==="rtl"),Object(N.a)(Ie,"".concat(Ze,"-ping-left"),jt),Object(N.a)(Ie,"".concat(Ze,"-ping-right"),br),Object(N.a)(Ie,"".concat(Ze,"-layout-fixed"),ve==="fixed"),Object(N.a)(Ie,"".concat(Ze,"-fixed-header"),kn),Object(N.a)(Ie,"".concat(Ze,"-fixed-column"),Tn),Object(N.a)(Ie,"".concat(Ze,"-scroll-horizontal"),sn),Object(N.a)(Ie,"".concat(Ze,"-has-fix-left"),Fr[0]&&Fr[0].fixed),Object(N.a)(Ie,"".concat(Ze,"-has-fix-right"),Fr[Fr.length-1]&&Fr[Fr.length-1].fixed==="right"),Ie)),style:ue,id:We,ref:fn},kr),m.createElement(Ye,{pingLeft:jt,pingRight:br,props:Object(g.a)(Object(g.a)({},Pe),{},{stickyOffsets:ri,mergedExpandedKeys:ct})},Ae&&m.createElement(Z,{className:"".concat(Ze,"-title")},Ae(Yt)),m.createElement("div",{className:"".concat(Ze,"-container")},ar),Le&&m.createElement(Z,{className:"".concat(Ze,"-footer")},Le(Yt))));sn&&(Sn=m.createElement(c.a,{onResize:Ft},Sn));var Rn=m.useMemo(function(){return{prefixCls:Ze,getComponent:_t,scrollbarSize:$t,direction:xe,fixedInfoList:Fr.map(function(Mr,wr){return s(wr,wr,Fr,ri,xe)}),isSticky:Vn}},[Ze,_t,$t,xe,Fr,ri,xe,Vn]),li=m.useMemo(function(){return Object(g.a)(Object(g.a)({},di),{},{tableLayout:zt,rowClassName:ye,expandedRowClassName:qt,componentWidth:An,fixHeader:kn,fixColumn:Tn,horizonScroll:sn,expandIcon:Hr,expandableType:On,expandRowByClick:xt,expandedRowRender:Ht,onTriggerExpand:jr,expandIconColumnIndex:Ar,indentSize:Lt})},[di,zt,ye,qt,An,kn,Tn,sn,Hr,On,xt,Ht,jr,Ar,Lt]),ua=m.useMemo(function(){return{onColumnResize:Yn}},[Yn]);return m.createElement(o.a.Provider,{value:Rn},m.createElement(z.Provider,{value:li},m.createElement(ee.Provider,{value:ua},Sn)))}et.Column=l.a,et.ColumnGroup=n.a,et.Summary=q.a,et.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var qe=Q.b=et},wRmb:function(B,Q,D){"use strict";D.d(Q,"a",function(){return h});var N=D("rePB"),g=D("KQm4"),w=D("VTBJ"),k=D("Ff2n"),b=D("q1tI"),m=D.n(b),T=D("Kwbf"),_=D("Zm9Q"),t=D("hW8S");function h(l){return Object(_.a)(l).filter(function(f){return b.isValidElement(f)}).map(function(f){var d=f.key,u=f.props,o=u.children,s=Object(k.a)(u,["children"]),E=Object(w.a)({key:d},s);return o&&(E.children=h(o)),E})}function r(l){return l.reduce(function(f,d){var u=d.fixed,o=u===!0?"left":u,s=d.children;return s&&s.length>0?[].concat(Object(g.a)(f),Object(g.a)(r(s).map(function(E){return Object(w.a)({fixed:o},E)}))):[].concat(Object(g.a)(f),[Object(w.a)(Object(w.a)({},d),{},{fixed:o})])},[])}function c(l){for(var f=!0,d=0;d<l.length;d+=1){var u=l[d];if(f&&u.fixed!=="left")f=!1;else if(!f&&u.fixed==="left"){Object(T.a)(!1,"Index ".concat(d-1," of `columns` missing `fixed='left'` prop."));break}}for(var o=!0,s=l.length-1;s>=0;s-=1){var E=l[s];if(o&&E.fixed!=="right")o=!1;else if(!o&&E.fixed==="right"){Object(T.a)(!1,"Index ".concat(s+1," of `columns` missing `fixed='right'` prop."));break}}}function i(l){return l.map(function(f){var d=f.fixed,u=Object(k.a)(f,["fixed"]),o=d;return d==="left"?o="right":d==="right"&&(o="left"),Object(w.a)({fixed:o},u)})}function n(l,f){var d=l.prefixCls,u=l.columns,o=l.children,s=l.expandable,E=l.expandedKeys,v=l.getRowKey,p=l.onTriggerExpand,I=l.expandIcon,R=l.rowExpandable,y=l.expandIconColumnIndex,x=l.direction,C=l.expandRowByClick,S=b.useMemo(function(){return u||h(o)},[u,o]),F=b.useMemo(function(){if(s){var Y,z=y||0,O=S[z],H=(Y={},Object(N.a)(Y,t.a,{className:"".concat(d,"-expand-icon-col")}),Object(N.a)(Y,"title",""),Object(N.a)(Y,"fixed",O?O.fixed:null),Object(N.a)(Y,"className","".concat(d,"-row-expand-icon-cell")),Object(N.a)(Y,"render",function(K,ee,oe){var ae=v(ee,oe),be=E.has(ae),_e=R?R(ee):!0,fe=I({prefixCls:d,expanded:be,expandable:_e,record:ee,onExpand:p});return C?b.createElement("span",{onClick:function(Ce){return Ce.stopPropagation()}},fe):fe}),Y),U=S.slice();return z>=0&&U.splice(z,0,H),U}return S},[s,S,v,E,I,x]),j=b.useMemo(function(){var Y=F;return f&&(Y=f(Y)),Y.length||(Y=[{render:function(){return null}}]),Y},[f,F,x]),A=b.useMemo(function(){return x==="rtl"?i(r(j)):r(j)},[j,x]);return[j,A]}Q.b=n},wZgz:function(B,Q,D){(function(N,g,w){B.exports=Q=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(N){return function(){var g=N,w=g.lib,k=w.BlockCipher,b=g.algo,m=[],T=[],_=[],t=[],h=[],r=[],c=[],i=[],n=[],l=[];(function(){for(var u=[],o=0;o<256;o++)o<128?u[o]=o<<1:u[o]=o<<1^283;for(var s=0,E=0,o=0;o<256;o++){var v=E^E<<1^E<<2^E<<3^E<<4;v=v>>>8^v&255^99,m[s]=v,T[v]=s;var p=u[s],I=u[p],R=u[I],y=u[v]*257^v*16843008;_[s]=y<<24|y>>>8,t[s]=y<<16|y>>>16,h[s]=y<<8|y>>>24,r[s]=y;var y=R*16843009^I*65537^p*257^s*16843008;c[v]=y<<24|y>>>8,i[v]=y<<16|y>>>16,n[v]=y<<8|y>>>24,l[v]=y,s?(s=p^u[u[u[R^p]]],E^=u[u[E]]):s=E=1}})();var f=[0,1,2,4,8,16,32,64,128,27,54],d=b.AES=k.extend({_doReset:function(){var u;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var o=this._keyPriorReset=this._key,s=o.words,E=o.sigBytes/4,v=this._nRounds=E+6,p=(v+1)*4,I=this._keySchedule=[],R=0;R<p;R++)R<E?I[R]=s[R]:(u=I[R-1],R%E?E>6&&R%E==4&&(u=m[u>>>24]<<24|m[u>>>16&255]<<16|m[u>>>8&255]<<8|m[u&255]):(u=u<<8|u>>>24,u=m[u>>>24]<<24|m[u>>>16&255]<<16|m[u>>>8&255]<<8|m[u&255],u^=f[R/E|0]<<24),I[R]=I[R-E]^u);for(var y=this._invKeySchedule=[],x=0;x<p;x++){var R=p-x;if(x%4)var u=I[R];else var u=I[R-4];x<4||R<=4?y[x]=u:y[x]=c[m[u>>>24]]^i[m[u>>>16&255]]^n[m[u>>>8&255]]^l[m[u&255]]}},encryptBlock:function(u,o){this._doCryptBlock(u,o,this._keySchedule,_,t,h,r,m)},decryptBlock:function(u,o){var s=u[o+1];u[o+1]=u[o+3],u[o+3]=s,this._doCryptBlock(u,o,this._invKeySchedule,c,i,n,l,T);var s=u[o+1];u[o+1]=u[o+3],u[o+3]=s},_doCryptBlock:function(u,o,s,E,v,p,I,R){for(var y=this._nRounds,x=u[o]^s[0],C=u[o+1]^s[1],S=u[o+2]^s[2],F=u[o+3]^s[3],j=4,A=1;A<y;A++){var Y=E[x>>>24]^v[C>>>16&255]^p[S>>>8&255]^I[F&255]^s[j++],z=E[C>>>24]^v[S>>>16&255]^p[F>>>8&255]^I[x&255]^s[j++],O=E[S>>>24]^v[F>>>16&255]^p[x>>>8&255]^I[C&255]^s[j++],H=E[F>>>24]^v[x>>>16&255]^p[C>>>8&255]^I[S&255]^s[j++];x=Y,C=z,S=O,F=H}var Y=(R[x>>>24]<<24|R[C>>>16&255]<<16|R[S>>>8&255]<<8|R[F&255])^s[j++],z=(R[C>>>24]<<24|R[S>>>16&255]<<16|R[F>>>8&255]<<8|R[x&255])^s[j++],O=(R[S>>>24]<<24|R[F>>>16&255]<<16|R[x>>>8&255]<<8|R[C&255])^s[j++],H=(R[F>>>24]<<24|R[x>>>16&255]<<16|R[C>>>8&255]<<8|R[S&255])^s[j++];u[o]=Y,u[o+1]=z,u[o+2]=O,u[o+3]=H},keySize:256/32});g.AES=k._createHelper(d)}(),N.AES})},wbyO:function(B,Q,D){(function(N,g){B.exports=Q=g(D("Ib8C"))})(this,function(N){return function(){var g=N,w=g.lib,k=w.WordArray,b=g.enc,m=b.Base64url={stringify:function(_,t=!0){var h=_.words,r=_.sigBytes,c=t?this._safe_map:this._map;_.clamp();for(var i=[],n=0;n<r;n+=3)for(var l=h[n>>>2]>>>24-n%4*8&255,f=h[n+1>>>2]>>>24-(n+1)%4*8&255,d=h[n+2>>>2]>>>24-(n+2)%4*8&255,u=l<<16|f<<8|d,o=0;o<4&&n+o*.75<r;o++)i.push(c.charAt(u>>>6*(3-o)&63));var s=c.charAt(64);if(s)for(;i.length%4;)i.push(s);return i.join("")},parse:function(_,t=!0){var h=_.length,r=t?this._safe_map:this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var i=0;i<r.length;i++)c[r.charCodeAt(i)]=i}var n=r.charAt(64);if(n){var l=_.indexOf(n);l!==-1&&(h=l)}return T(_,h,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function T(_,t,h){for(var r=[],c=0,i=0;i<t;i++)if(i%4){var n=h[_.charCodeAt(i-1)]<<i%4*2,l=h[_.charCodeAt(i)]>>>6-i%4*2,f=n|l;r[c>>>2]|=f<<24-c%4*8,c++}return k.create(r,c)}}(),N.enc.Base64url})},"y0+3":function(B,Q,D){"use strict";D.d(Q,"a",function(){return r}),D.d(Q,"b",function(){return i});var N=/margin|padding|width|height|max|min|offset/,g={left:!0,top:!0},w={cssFloat:1,styleFloat:1,float:1};function k(n){return n.nodeType===1?n.ownerDocument.defaultView.getComputedStyle(n,null):{}}function b(n,l,f){if(l=l.toLowerCase(),f==="auto"){if(l==="height")return n.offsetHeight;if(l==="width")return n.offsetWidth}return l in g||(g[l]=N.test(l)),g[l]?parseFloat(f)||0:f}function m(n,l){var f=arguments.length,d=k(n);return l=w[l]?"cssFloat"in n.style?"cssFloat":"styleFloat":l,f===1?d:b(n,l,d[l]||n.style[l])}function T(n,l,f){var d=arguments.length;if(l=w[l]?"cssFloat"in n.style?"cssFloat":"styleFloat":l,d===3)return typeof f=="number"&&N.test(l)&&(f="".concat(f,"px")),n.style[l]=f,f;for(var u in l)l.hasOwnProperty(u)&&T(n,u,l[u]);return k(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 h(){var n=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),l=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:n,height:l}}function r(){var n=document.documentElement.clientWidth,l=window.innerHeight||document.documentElement.clientHeight;return{width:n,height:l}}function c(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function i(n){var l=n.getBoundingClientRect(),f=document.documentElement;return{left:l.left+(window.pageXOffset||f.scrollLeft)-(f.clientLeft||document.body.clientLeft||0),top:l.top+(window.pageYOffset||f.scrollTop)-(f.clientTop||document.body.clientTop||0)}}},ynwM:function(B,Q,D){var N=D("MFOe"),g=N.Global;B.exports={name:"oldFF-globalStorage",read:k,write:b,each:m,remove:T,clearAll:_};var w=g.globalStorage;function k(t){return w[t]}function b(t,h){w[t]=h}function m(t){for(var h=w.length-1;h>=0;h--){var r=w.key(h);t(w[r],r)}}function T(t){return w.removeItem(t)}function _(){m(function(t,h){delete w[t]})}}}]);
|