(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&&/$/,blockCommentStart:"",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>>0?1:0),J=J+me,$=$+pe+(J>>>0>>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>>0?1:0),Ct=Ct+ve,yt=yt+Oe+(Ct>>>0>>0?1:0),Ct=Ct+st,yt=yt+it+(Ct>>>0>>0?1:0),Ct=Ct+J,yt=yt+$+(Ct>>>0>>0?1:0),ht=Me+Ae,Ut=Le+xe+(ht>>>0>>0?1:0);q=V,ie=Z,V=W,Z=X,W=ce,X=te,te=Ce+Ct|0,ce=Re+yt+(te>>>0>>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>>0?1:0)|0}R=f.low=R+oe,f.high=I+ee+(R>>>0>>0?1:0),x=d.low=x+be,d.high=y+ae+(x>>>0>>0?1:0),S=u.low=S+fe,u.high=C+_e+(S>>>0>>0?1:0),j=o.low=j+Ce,o.high=F+Re+(j>>>0>>0?1:0),Y=s.low=Y+te,s.high=A+ce+(Y>>>0>>0?1:0),O=E.low=O+X,E.high=z+W+(O>>>0>>0?1:0),U=v.low=U+Z,v.high=H+V+(U>>>0>>0?1:0),K=p.low=K+ie,p.high=L+q+(K>>>0>>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<>>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<>>32-H,y=O<>>32-H):(R=O<>>64-H,y=z<>>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>>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;eeee&&(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;be0,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;_e0&&(!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=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;n1&&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>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".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(//),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=0&&c=0&&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=0&&r/),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;vfunction(){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-1&&k.substring(T+1,k.length);if(_)return N.findModeByExtension(_)},N.findModeByName=function(k){k=k.toLowerCase();for(var b=0;b=me.length?Oe.slice(me.length):Oe}).join(` `)}var d=[],u=["
    "],o=new n.a.Renderer,s=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function E(){d.length=0,u=["
      "]}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("
    • "+Oe.text+""),ue++;var ve=[];return ue=p(ye,ue,Oe.level,ve),ve.length>0&&(me.push("
        "),ve.forEach(function(xe){me.push(xe)}),me.push("
      ")),me.push("
    • "),ue=p(ye,ue,pe,me),ue}function I(){return p(d,0,0,u),u.push("
    "),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?"

    ".concat(ye,"

    "):'
    ').concat(pe?ye:Object(l.escape)(ye,!0),`
    `):'
    '+(pe?ye:Object(l.escape)(ye,!0))+"
    "},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}),"'+ye+""},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]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''},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;pethis.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+methis.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.canvasWidththis.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_MARGINue+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('',"Toggle grid");Oe.isActive=this.isGridVisible,Oe.onClick=function(){ue.isGridVisible=!ue.isGridVisible,Oe.isActive=ue.isGridVisible},pe.addButton(Oe);var ve=new J('',"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='',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('',"OK");We.onClick=this.startRenderAndClose,Me.addButton(We),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(We.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var rt=new J('',"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('',"Rotate left");me.onClick=this.rotateLeftButtonClicked,pe.addButton(me);var Oe=new J('',"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('',"Flip horizontal");Ae.onClick=this.flipHorizontallyButtonClicked,xe.addButton(Ae);var Le=new J('',"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=/]*>/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("

    [TOC]

    ",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;r0&&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;kt100)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;in.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?` `:"")+"",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?"/":""&&(E+=">"),c[f]=E}if(t.replaceSelections(c),r=t.listSelections(),!l)for(var f=0;f=0&&h[d]==r;d--)++f;c=l.to;for(var d=1;d0){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;Oepe.length)&&(me=pe.length);for(var Oe=0,ve=new Array(me);Oe=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=0&&Me[rt]==="\\";)We=!We;return We?"|":" |"}),ve=Oe.split(/ \|/),xe=0;if(ve.length>me)ve.splice(me);else for(;ve.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 ?/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;Mt1||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/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]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable: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=//,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",")|<(?: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",")|<(?: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",")|<(?:script|pre|style|!--)").replace("tag",ce._tag).getRegex(),ce.pedantic=Ce({},ce.normal,{html:Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\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-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:fe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",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]*?(?:(?=[\\.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;Me0)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?'
    '+(Ae?ve:le(ve,!0))+`
    `:"
    "+(Ae?ve:le(ve,!0))+`
    `},me.blockquote=function(ve){return`
    `+ve+`
    `},me.html=function(ve){return ve},me.heading=function(ve,xe,Ae,Le){return this.options.headerIds?"'+ve+" `:""+ve+" `},me.hr=function(){return this.options.xhtml?`
    `:`
    `},me.list=function(ve,xe,Ae){var Le=xe?"ol":"ul",Me=xe&&Ae!==1?' start="'+Ae+'"':"";return"<"+Le+Me+`> `+ve+" `},me.listitem=function(ve){return"
  • "+ve+`
  • `},me.checkbox=function(ve){return" "},me.paragraph=function(ve){return"

    "+ve+`

    `},me.table=function(ve,xe){return xe&&(xe=""+xe+""),` `+ve+` `+xe+`
    `},me.tablerow=function(ve){return` `+ve+` `},me.tablecell=function(ve,xe){var Ae=xe.header?"th":"td",Le=xe.align?"<"+Ae+' align="'+xe.align+'">':"<"+Ae+">";return Le+ve+" `},me.strong=function(ve){return""+ve+""},me.em=function(ve){return""+ve+""},me.codespan=function(ve){return""+ve+""},me.br=function(){return this.options.xhtml?"
    ":"
    "},me.del=function(ve){return""+ve+""},me.link=function(ve,xe,Ae){if(ve=$(this.options.sanitize,this.options.baseUrl,ve),ve===null)return Ae;var Le='",Le},me.image=function(ve,xe,Ae){if(ve=$(this.options.sanitize,this.options.baseUrl,ve),ve===null)return Ae;var Le=''+Ae+'":">",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;Le0&&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+1An error occurred:

    "+Pe(We.message+"",!0)+"
    ";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=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>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0>>0?1:0)|0,this._b=c[7]>>>0>>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=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;o0;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=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>>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<>>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>>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>>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>>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=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>>2]>>>24-I%4*8&255;s[v+I>>>2]|=R<<24-(v+I)%4*8}else for(var y=0;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>>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>>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>>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>>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>>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>>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);Ep===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.lengthCe)){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;vg.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{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{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=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=0;he--){const Se=$.charCodeAt(he);if(Se!==32&&Se!==9)return he}return-1}function u($,le){return $le?1:0}function o($,le,he=0,Se=$.length,Ue=0,Xe=le.length){for(;heqe)return 1}const $e=Se-he,Ye=Xe-Ue;return $eYe?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=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 $eYe?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;he1){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=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=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[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>>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("![,](/api/attachments/".concat(mr.id,"?type=").concat(mr.content_type,")")):mr.content_type.indexOf("video")>-1?ct.replaceSelection('')):mr.content_type.indexOf("pdf")>-1?ct.replaceSelection('
    ').concat(mr.name,"")):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("![,](/api/attachments/".concat(kr.id,"?type=").concat(kr.content_type,")")):(hr==null||((Rn=hr.type)===null||Rn===void 0)?void 0:Rn.indexOf("video"))>-1?Ft.replaceSelection('')):(hr==null||((li=hr.type)===null||li===void 0)?void 0:li.indexOf("pdf"))>-1?Ft.replaceSelection('').concat(hr.name,"")):ve.includes(vi)?Ft.replaceSelection('').concat(hr.name,"")):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("![,](/api/attachments/".concat(kr.id,"?type=").concat(kr.content_type,")")):(hr==null||((Rn=hr.type)===null||Rn===void 0)?void 0:Rn.indexOf("video"))>-1?Ft.replaceSelection('')):(hr==null||((li=hr.type)===null||li===void 0)?void 0:li.indexOf("pdf"))>-1?Ft.replaceSelection('').concat(hr.name,"")):ve.includes(vi)?Ft.replaceSelection('').concat(hr.name,"")):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);zt0){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(`
    `),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(mr," ]( ").concat(Lr,' "').concat(mr,'" )')):ct.replaceSelection("![,](".concat(Lr,")")),ct.focus();case Xe:for(var qr=Ft.row,Un=Ft.col,hr=Ft.align,vi=` `,kr=0;kr300&&(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>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0>>0?1:0)|0,this._b=c[7]>>>0>>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'),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|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|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;le122||(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;ueLe[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=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=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=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=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*]*(?:>|$)/],[R,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[C,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),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="
    "+ie+"
    ",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;Ue0&&Z[Z.length-1])||le[0]!==6&&le[0]!==2)){ie=0;continue}if(le[0]===3&&(!Z||le[1]>Z[0]&&le[1]',"select"),this.addActionButton(V,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(V,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(V,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(V,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(V,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(V,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(V,'',"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='',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,'',"render"),this.addActionButton(Z,'',"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;X0&&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||'')||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=` `),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||'')||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||'')||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=` `;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='',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='',W}(x),S=function(te){function W(X,V,Z,q){var ie=te.call(this,X,q||'')||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='',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;$0&&(J=!0,$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='',W}(E),A=function(te){function W(X,V,Z){var q=te.call(this,X,Z||'')||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=` `,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=` `,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='',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='',W}(v),O=function(te){function W(X,V,Z,q){var ie=te.call(this,X,q||'')||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='',W}(z),U='',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,''),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.width/2&&this.tipPosition.y>=this.height/2?q.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='',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='',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='',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;Vthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*W:this.editorCanvas.clientWidth,V=X',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-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),Z1&&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))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.keyO.key)return 1;const H=this.regexp?this.regexp.source:"",U=O.regexp?O.regexp.source:"";return HU?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;UO.expr.length)return 1;for(let H=0,U=this.expr.length;H1;){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.lengthO.expr.length)return 1;for(let H=0,U=this.expr.length;HO.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 OH?1:0}function A(O,H,U,L){return OU?1:HL?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=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;n1&&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=0&&c=0&&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||y0&&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._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` ${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)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=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"\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:aP?-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;rea||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;Ga)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-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;G0}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.posa},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.lastColumnPos0?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=e.first&&aP?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;Mthis.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;ttQe&&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(;fte.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&&wea.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.pose.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(;gese;--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.highlightFrontierP;M--){var G=dt(e,M).stateAfter;if(G&&(!(G instanceof jr)||M+G.lookAhead=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=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.from0&&de)for(var Wt=0;Wt0)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;Pa)&&(!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=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;Ga.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;Gwe&&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;sege||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=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;re2&&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;MP)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=P.lineN&&aa)&&(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=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+de0&&(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=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=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=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=ftbt)&&(Fe=Qe,He=bt)}return Fe||(Fe=G[G.length-1]),Fe.fromwe&&(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;se0&&(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;Ma)&&(G.updateLineNumbers=a),e.curOp.viewChanged=!0,a>=G.viewTo)jt&&mi(e.doc,a)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=G.lineN&&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;ge0){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.viewFromP&&(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=e.display.viewTo||de.to().line0?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.005||Fe<-.005)&&(vt(G.line,se),to(G.line),G.rest))for(var He=0;Hee.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=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.topde-M;if(a.topG+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.leftQe+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.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=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&&ttP)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=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.viewFromse&&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-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;sese.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=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;re0: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;M1&&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;de1&&!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-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=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=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=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;Me.lastLine())return;if(a.from.linere&&(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){P1||!(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;a50){for(var se=G.lines.length%25+25,de=se;de10);e.parent.maybeSpill()},iterN:function(e,a,P){for(var M=0;Me.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;G0||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=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.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=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;Me)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.linea&&(a=e.from),e.to!=null&&e.to-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=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=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&&At0==(nr.level!=1),Tr=Qt?Rt.begin:de(Rt.end,-1);if(nr.from<=Tr&&Tr0?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.line0)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;Me&&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.lineQe.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=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;de20*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(ttse,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=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-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;Mre&&(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;He0&&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]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;we0&&Fe(re.charAt(se-1));)--se;for(;de.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+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&&fl(a,M)||{node:de[0].measure.map[2],offset:0},we=G.linee.firstLine()&&(M=ut(M.line-1,dt(e.doc,M.line-1).length)),G.ch==dt(e.doc,G.line).text.length&&G.linea.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);QeM.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=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);se1e3||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;d1&&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 ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].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;ee0||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(Et0||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)/$+(X1&&(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>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;leq&&(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<>>32-o)+l}function r(n,l,f,d,u,o,s){var E=n+(l&d|f&~d)+u+s;return(E<>>32-o)+l}function c(n,l,f,d,u,o,s){var E=n+(l^f^d)+u+s;return(E<>>32-o)+l}function i(n,l,f,d,u,o,s){var E=n+(f^(l|~d))+u+s;return(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;S1?oe-1:0),be=1;be1?U-1:0),K=1;K=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"&&oe1&&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:(Oz&&(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||KU.max?K=U.max:K=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=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;Dz.length)&&(O=z.length);for(var H=0,U=new Array(O);H=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=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;Oz.length)&&(O=z.length);for(var H=0,U=new Array(O);H=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=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;TeJe&&(mt=Je-gt),Object(b.useMemo)(function(){if(!De.length)return[0,0];for(var Ot=De.length,Xt=Ot,sr=0;srKe+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]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;Te1&&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;Je1});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;JnBr?(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 XrHi?[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.rightVt+$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>>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=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=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:"",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;k0&&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.startthis.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;x255)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=` `,f=0;f `,l+=""+d.number+` `,l+=""+d.etag+` `,l+=` `;return l+="",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;n1&&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;x0){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]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 `),_&&_.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]+"":b(T[h])==="object"?t+="<"+h+">"+m(T[h])+"":b(T[h])==="array"?t+=T[h].map(function(r){return"<"+h+">"+m(r)+""}).join(""):t+="<"+h+">"+T[h].toString()+""}):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;b0)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>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;oE?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=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=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 * @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()=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>>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;J0&&(ne=this.toString("hex",0,J).match(/.{2}/g).join(" "),this.length>J&&(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;et2147483647?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;$eSe&&(J=Se-Ue),$e=J;$e>=0;$e--){for(var et=!0,qe=0;qele&&($=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;le239?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;$$)&&(J=$);for(var le="",he=ne;he$&&(ne=$),J<0?(J+=$,J<0&&(J=0)):J>$&&(J=$),JJ)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;++Se0&&(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=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||neie.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>>($?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>>($?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=0;--Se)ne[Se+J]=this[Se+$];else if(he<1e3||!g.TYPED_ARRAY_SUPPORT)for(Se=0;Se>>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>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 * 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;mh;)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;m0?"-":"+")+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]/;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;_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 * 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<>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<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 * @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>>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;g0)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=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=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 * Copyright 2014-2018 Benjamin Tan * Copyright 2011-2013 John-David Dalton * Available under MIT license */(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(;++C3&&"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=_,_=[];++r1)for(var u=1;u= 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=55296&&ee<=56319&&L65535&&(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=128&&I("not-basic"),U.push(H.charCodeAt(_e));for(fe=be>0?be+1:0;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,teE(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=U&&CeE((T-L)/W)&&I("overflow"),L+=(be-U)*W,U=be,ae=0;aeT&&I("overflow"),Ce==U){for(_e=L,fe=_;!(Re=fe<=oe?t:fe>=oe+h?h:fe-oe,_e0&&h>t&&(h=t);for(var r=0;r=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;_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=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-V0?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.length1&&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=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 VJ.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-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.length0?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=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=0;--H){var U=this.tryEntries[H];if(U.tryLoc<=this.prev&&w.call(U,"finallyLoc")&&this.prev=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$)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;$"||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",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.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 $"?(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+=""?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="";++Ye1114111||$(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;dc._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>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=0?(v>0&&(u.lastNeed=v-1),v):--E=0?(v>0&&(u.lastNeed=v-2),v):--E=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",'"',"`"," ","\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&&y127?_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;H0?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=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=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-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""},_=function(i){return i.replace("]]>","]]]]>")},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;R0&&(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":"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=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)+""),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)+""+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=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":((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;RI},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;R0){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"),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("")):(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("");else{for(this.stream.write(">"+this.endline(t,h,r)),h.state=g.InsideTag,E=t.children,f=0,d=E.length;f")}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","]]]]>"),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(/\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(/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)+""+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)+""+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)+"",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+="0){for(y+=" [",y+=this.endline(s,E,v),E.state=g.InsideTag,x=s.children,I=0,R=x.length;I",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+=""+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+=""+this.endline(s,E,v);else{if(E.dontPrettyTextNodes){for(O=s.children,x=0,S=O.length;x"+this.endline(s,E,v),E.state=g.InsideTag,H=s.children,C=0,F=H.length;C",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)+"",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)+""+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)+""+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)+""+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)+""+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;kb?r=h(r):r.length>5]|=128<>>9<<4)+14]=c;for(var i=1732584193,n=-271733879,l=-1732584194,f=271733878,d=0;d>16)+(c>>16)+(i>>16);return n<<16|i&65535}function h(r,c){return 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>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=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^this._lBlock)&d;this._lBlock^=u,this._rBlock^=u<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;f1&&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=0&&n=0&&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=0&&i/),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.newlines0);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(/^(|]]>)$/.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("]*)/),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(//),cdata:R.starting_with(//),conditional_comment:R.starting_with(//),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("","ig"))}else this._is_content_unformatted(y)&&(R=this._input.readUntil(new RegExp("","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>>2]>>>16-c%4*8&65535;r.push(String.fromCharCode(i))}return r.join("")},parse:function(_){for(var t=_.length,h=[],r=0;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>>2]>>>16-c%4*8&65535);r.push(String.fromCharCode(i))}return r.join("")},parse:function(_){for(var t=_.length,h=[],r=0;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=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{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.length0&&(xt.children=[],X(vt,xt.children))})}function V(pt,St){for(var dt=[],Ht=0;Ht0){dt[0]=vt.id;for(var xt=0;xt0&&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;c1)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);l0},!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=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=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||L0&&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&&_eae||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=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;on.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-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;See;(H0&&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=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-1&&YY.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(jA-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=H-A.maxFragLookUpTolerance&&O<=U;if(z!==null&&Y.duration>z&&(O"+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"+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;h0&&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=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=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);do&&(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;Ih){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;fr&&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.ccc?-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=p&&s<=I){d.time.push({startPTS:Math.max(u,f.start(v)),endPTS:Math.min(o,f.end(v))});break}else if(up)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=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;vi&&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=E&&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;o0){x=I[0].bitrate,I.sort(function(H,U){return H.bitrate-U.bitrate}),this._levels=I;for(var Y=0;Ythis.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.loadError1){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;x0){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||Ao.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=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=v.length)return;l(s,v[E].start)}function l(o,s){if(s){for(var E=o.fragments,v=o.skippedSegments;v0&&p0&&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&&C0&&(A1&&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=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=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-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=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=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>>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>>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)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;dt?(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<>>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;i0?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>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;d0},_.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=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;ee0&&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>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;W16){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=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=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;Y1;){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;OU){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.ptsx)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>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;rc.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;r2){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-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>24&255,l[1]=t>>16&255,l[2]=t>>8&255,l[3]=t&255,l.set(_,4),i=0,t=8;i>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>>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>>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;R0?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;Cece.pts){var te=9e4*.2;be=Math.max(Math.min(be,ce.pts-ce.dts),-1*te)}ce.dts0?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(beW,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;he0?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=fe*H&&X0){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;oe4294967296;)I+=y;return I}function E(I){for(var R=0;R0?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;cNumber.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;iNumber.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.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;nl&&(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=E&&h=S&&k.logger.log(this.time+" ["+S+"] "+F)},y}(),f=function(x){for(var C=[],S=0;S_&&(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=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;S0&&(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=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([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=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;so.startCC||d&&d.cc=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=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"):k}function _(r){for(var c=arguments.length,i=new Array(c>1?c-1:0),n=1;n>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;x1?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>>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_)&&(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;fr[i].endTime)return-1;for(var n=0,l=i;n<=l;){var f=Math.floor((l+n)/2);if(cr[f].startTime&&n-1)for(var f=l,d=r.length;f=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;n100)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=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(//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")===-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=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;nt1?ct-1:0),xr=1;xr=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(zi0?[].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=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;R6&&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>>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>>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>>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>>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>>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]})}}}]);